Question: We discussed the fractional Knapsack problem in class as a problem solvable by a greedy algorithm. However, the 0-1 Knapsack problem was not solvable by

We discussed the fractional Knapsack problem in class as a problem solvable by a greedy algorithm. However, the 0-1 Knapsack problem was not solvable by a Greedy algorithm but it is solvable through dynamic programming.

(a)To apply dynamic programing the problem needs to have sub optimality. Proof that the 0-1 Knapsack problem has sub-optimality.

(b) Develop a recursive strategy to solve the 0-1 Knapsack problem leveraging the sub optimality property shown in (a).

(c)Develop a bottom up dynamic programing method to solve the 0-1 Knapsack problem.

(d)Compare the computational complexity between the recursive and the dynamic programing solution.

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!