# Solving a variant of multiple knapsack problem/ generalized assignment problem

Consider $$m$$ knapsack and $$n$$ items. With each knapsack $$j$$ associated a capacity $$c(j)$$ and with each item $$i$$ associated a profit $$p(i,j)$$ (that depends on the knapsack, so it's not exactly the classic multiple knapsack problem) and a weight $$w(i)$$

• There is a particular knapsack $$j^*$$ with infinite capacity and for which the following condition is satisfied : $$\forall i \in I, p(i,j^*) =0$$ We assume that this knapsack has already all the items (so there is a covering constraint that is always satisfied since the items are always there)

• For a given knapsack $$j$$, an item $$i$$ can have a profit $$p(i,j)$$ that is either positive or negative.

• An item $$i$$ must satisfy the following "presence" constraints:

• Can be put in more than one finite knapsack (it can be "copied" and put in several knapsacks so it's not the classic generalized assignment problem).

• Present at most once in the same knapsack.

The objective is to choose what items to pick in order to maximize the profit while satisfying the capacity constraint for each knapsack and the presence constraints for the items.

I'm interested in:

1. Proving the complexity
2. Finding upper-bounds: intuitively, is there a decomposition method that is suitable for this problem? If so, what is it?
3. Finding lower-bounds: I was thinking about considering the knapsacks independently. Solving each one exactly by a DP and then assign the remaining items to the knapsack $$j^*$$. Do you have another heuristic?

PS: the number of items is $$10000$$ and the number of knapsacks is between $$100$$ and $$500$$ depending on the instance.

• Does anything prevent putting every item in the infinite knapsack, whether or not it is in another knapsack? Nov 20, 2019 at 13:06
• Is this 3 questions disguised as one? Nov 20, 2019 at 13:18
• @RobPratt I've edited the post. We can make the assumption that all of the items are already in the infinite knapsack and rule out the constraint on the presence at least once. Is that what are you thinking of ? Nov 20, 2019 at 14:02
• Yes, it seems that the infinite capacity knapsack can be eliminated. Also, what prevents solving exactly as independent knapsack problems? Nov 20, 2019 at 15:25

It looks like there is no relationship between different knapsacks, so you can solve this exactly as $$m$$ independent 0-1 knapsack problems. Also, for knapsack $$j$$, you can eliminate any items $$i$$ that have $$p(i,j)\le 0$$.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9040722,"math_prob":0.9942439,"size":1579,"snap":"2022-40-2023-06","text_gpt3_token_len":385,"char_repetition_ratio":0.14095238,"word_repetition_ratio":0.0,"special_character_ratio":0.23749208,"punctuation_ratio":0.084745765,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99946576,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-10-03T08:04:43Z\",\"WARC-Record-ID\":\"<urn:uuid:5f33b0bf-4336-40e7-a0c1-a3ee4e63ebdb>\",\"Content-Length\":\"131699\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:70070fa6-2e7b-40d1-adc2-cb8c594e8ba1>\",\"WARC-Concurrent-To\":\"<urn:uuid:bd6a7ba7-76f7-40ed-8274-d575aa94355f>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://or.stackexchange.com/questions/3081/solving-a-variant-of-multiple-knapsack-problem-generalized-assignment-problem\",\"WARC-Payload-Digest\":\"sha1:2FPOHCJOGQWFADUIXTGDNSLZQC3BDFDC\",\"WARC-Block-Digest\":\"sha1:6KEPURPEXLIPKDYLALYORV2WFDXIF2FG\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030337404.30_warc_CC-MAIN-20221003070342-20221003100342-00240.warc.gz\"}"}