Question: You are given a knapsack with capacity T = 7 and the following three items: ( Item 1 ) weight w ( 1 ) =

You are given a knapsack with capacity T=7 and the following three items:
(Item 1) weight w(1)=5, value v(1)=6
(Item 2) weight w(2)=4, value v(2)=4
(Item 3) weight w(3)=2, value v(3)=3
Let OPT(i,U) be the value of the optimal solution to the knapsack problem with items chosen from {1,..., i}, and a knapsack capacity of U. For the next set of questions you will have to compute some of the values OPT(i,U).
Question 1:
What is OPT(0,7)?
Question 2:
What is OPT(3,6)?
Question 3:
What is OPT(2,3)?

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 Databases Questions!