Show how the following problem can be expressed as a knapsack problem in which all variables must be equal 0 or 1. company is determining how many of 3 types of objects should be brought on board The weight and benefit of each of the items are given in a table. If the space shuttle can carry a maximum of 26 lb of item 1-3, which item should be taken on board?
table:Code: Select all
item;benefit; weight
1 10 3
2 15 4
3 17 5
С одной стороны, вроде 0 or 1(т.е. бинарные значения), а с другой "how many"(это вроде как 0, 1, 2,.., N - т.е. integer). Какие будут мысли?