0

If I can assume that it is NP-complete to determine whether a set of objects can be packed into 2 bins, how can I prove that it is NP-complete to determine whether a set of objects can be packed into 3 bins?

I understand that this is like the Knapsack problem, but I am having trouble going backwards essentially, since 2 bins is the reduced version of 3 bins.

lostCS
  • 1
  • 1
    big item ​ ​ ​ ​ –  Nov 03 '16 at 02:57
  • 1
    The usual approach to this type of problem is indeed a polynomial reduction. Basically, you allow yourself, or your algorithm, to have the ability to solve the 3-bin problem. In other words, you assume that you have an algorithm that can "determine whether a set of objects can be packed into" 3 bins. Then you show that this algorithm can "determine whether a set of objects can be packed into 2 bins". Then, most approaches usually find a way to force the objects into only 2 of the 3 bins. – Matt Groff Nov 03 '16 at 02:59
  • I should add, from there you simply show that you can extract the 2 bin solution from the 3 bin solution in polynomial time. – Matt Groff Nov 03 '16 at 04:08
  • 1
    Welcome to CS.SE! What have you tried and what progress have you made so far? Where did you get stuck? We're happy to help you understand the concepts but just solving exercises for you is unlikely to achieve that. You might want to take a look at http://meta.cs.stackexchange.com/q/1284/755, and review the material in http://cs.stackexchange.com/q/11209/755 and http://cs.stackexchange.com/q/9556/755: that should cover what you need. – D.W. Nov 03 '16 at 04:41
  • @MattGroff The usual definition of NP-completeness is to use polynomial time many-one reductions (a.k.a. polynomial time mapping reductions, a.k.a. Karp reductions). Using those reductions, you don't get to extract the 2-bin solution from the 3-bin solution: you must construct a 3-bin solution whose answer ("yes" or "no") is equal to the 2-bin solution you want to solve. – David Richerby Nov 03 '16 at 08:38

0 Answers0