Talk:Knapsack problem/Bounded

Revision as of 16:34, 22 June 2011 by rosettacode>Paddy3118 (→‎Some technical details: Pseudo-polynomial time?)

Some technical details

Some solutions, including my perl one, use the 0-1 problem solution, but counting items with multiples as multiple different items. This is almost a good solution, but not quite: if some items have a huge count, the correct solution will not much care, but the hacked 0-1 solution generally can hang. Try for this example set the beer count to say 1000, and see how well your code copes. --Ledrug 09:11, 22 June 2011 (UTC)

Hi, wp has the problem marked as taking wp:Pseudo-polynomial time. Does that mean that there is no better exact algo? --Paddy3118 16:34, 22 June 2011 (UTC)
Return to "Knapsack problem/Bounded" page.