Question: Solve the following 0 - 1 knapsack problem. ( Show the dynamic - programming table ) The knapsack can hold at most W = 8

Solve the following 0-1 knapsack problem. (Show the dynamic-programming table)
The knapsack can hold at most W=8 pounds and there are four items.
item #1 weighs 1 pound and its worth $12
item #2 weighs 2 pound and its worth $8
item #3 weighs 3 pound and its worth $6
item #4 weighs 4 pound and its worth $4
Which items should be packed to maximize the value?
And what is the maximum value?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!