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
Get step-by-step solutions from verified subject matter experts
