Question: table [ [ ITEM , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ] , [ WEIGHT
tableITEMWEIGHTUTILITY
Recognizing that the hike to the campsite is a long one, a limit of pounds has been set as the maximum total weight of the items to be carried.
a Formulate this as a programming problem to maximize the total utility of the items carried. Solve this knapsack problem using a computer.
b Suppose item is an extra battery pack, which may be used with several of the other items. Tina has decided that she will take item a CD player, only if she also takes item On the other hand, if she takes item she may or may not take item Modify the problem to reflect this, and solve the new problem.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
