[Math] Multiple Choice Knapsack Problem (MCKP) where one class requires more than one item

algorithmscombinatoricsextremal-combinatoricslinear programming

I have the following problem of which I am attempting to find a near optimal solution:

I have one knapsack which can hold a maximum weight. I must select exactly one distinct item from a number of classes, except for the last class in which I must select exactly three distinct items.

Each item has both a weight and a profit as an attribute.The goal is to maximize profit while not exceeding the maximum weight of the knapsack. There are a number of papers which suggest algorithms if exactly one item is chosen from each class (MCKP), but I have not found any which speak about a class which requires more than one to be selected.

The immediate solution that comes to mind is to treat the special class as the others by transforming it into a single selection of a combination of three items. For example, if the class which requires three items to be chosen has a total of ten items, the total number of permutations is 720.

This solution would transform the problem back into MCKP, but quickly becomes too resource intensive as the number of items in the special class increase. For example, 100 items in the special class would have 970,200 possible permutations.

So my question is: Is there a better way in which to conceptualize this problem? Has any research addressed this problem specifically?

Best Answer

I think this should work:
Maximize: $$\sum _{j=1}^{N}\sum _{j=1}^{\left | G_{i} \right |}p_{ij}x_{ij}$$ Subject to: $$ \begin{align} \sum _{i=1}^{n}\sum _{j=1}^{\left | G_{i} \right |}w_{ij}x_{ij} &\leq c \\ \sum _{j=1}^{\left | G_{i} \right |}x_{ij} &= 1 \\ \sum _{j=1}^{\left | G_{s} \right |}x_{sj} &= 3 \\ x_{ij} \in \{0,1\} \end{align} $$ Notation:
N the number of items
n the number of groups
c the capacity of a single knapsack
G = {$G_{1},...,G_{n}$} the set of groups
${\left | G_{i} \right |}$ the number of items in group $G_{i}$
${\left | G_{s} \right |}$ the number of items in group $G_{s}$ (special group)
$p_{ij}$ the profit of item j of group $G_{i}$
$w_{ij}$ the weight of item j of group $G_{i}$