問題詳情
15. A hiker faces the Knapsack problem. There are 7 items to be packed into the knapsack, each with value vi and weight wi as shown in the following table.

The knapsack, which is initially empty, can hold a maximum weight of 15, so some item(s) must be left behind. The optimality criterion is to maximize the total value of the items that are placed in the knapsack. The hiker fills the knapsack one item at a time, using an algorithm that is greed on value density, where the value density of an item is its value/weight ratio.
【題組】(43) Assume fractions of items cannot be packed. When this algorithm is used, what is the total value of the items that are packed?
(A)28
(B)30.5
(C)34
(D)37
(E)38.5
參考答案
答案:[無官方正解]
難度:計算中-1
書單:沒有書單,新增