I'm trying to solve the following problem about arranging pens on rows. The problem goes as the following.
Given $n$ integers $l_1, \dots l_n$, the lengths of the pens, r rows and a goal G. Is it possible to arrange the pens where each row has a maximum length G, where G is the minimum possible.
I have shown that this problem is in NP, but now I'm trying to reduce a subset sum problem to this problem with karp reduction.
I know how the subset sum problem looks like, but I'm having a trouble where to start with the reduction, any tips would be greatly appreciated.