Home > other >  01 knapsack problem if the specified item number how to solve
01 knapsack problem if the specified item number how to solve

Time:10-17

01 knapsack problem is to point to:
Have n items, the weight of the goods for w [I], the value of the goods to c [I], now the selected item in the backpack, make the goods total weight is less than the maximum weight of backpack can afford to V, and items in the backpack value maximum,

Can use dynamic programming to solve this problem, but if you add a limitation must select the goods specified number m, so how to solve?
  • Related