Question: Consider the Knapsack problem solved by the Dynamic Programming. Consider the following weights: w 1 = 2 , w 2 = 1 , w 3

Consider the Knapsack problem solved by the Dynamic Programming. Consider the following weights: w1=2, w2=1, w3=3, w4=2 and the corresponding values of v1=3, v2=1, v3=2, v4=4, with maximum knapsack capacity of W =5. Let F(i, j) be the value of the most valuable subset of the first i items that fits in the knapsack of capacity j. How is F(2,4) evaluate?
Question 9 options:
F(2,4)= max { F(4,1), F(3,1)+2}
F(2,4)= F(1,4)
F(2,4)= max { F(1,4), F(1,3)+1}
F(2,4)= F(1,3)+1

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!