39. A hiker faces the Knapsack problem. There are 7 items to be packed into the knapsack, each with value viand weight wi as shown in the following table.

The knapsack, which is initially empty, can hold a maximum weight of 16, 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. Now consider the following two cases: (a) fractions of items cannot be packed, and (2) fractions of items can be packed. What are the optimal values of the items that are packed in these two cases respectively?

Give the answer in the form of (no-fractions-allowed, fractions-allowed).


(A)(28,30.5)
(B)(37,40)
(C)(30,34)
(D)(38,40)
(E)(34,38.5)


答案:登入後查看
統計: A(0), B(0), C(0), D(1), E(0) #3067445

詳解 (共 1 筆)

#7102363
題目解析 這道題目涉及到「背包問題」(...
(共 1110 字,隱藏中)
前往觀看
0
0