Question: A1. (30 points) a. Apply the dynamic programming algorithm to the following instance of the 0-1 knapsack problem Item Weight Value $30 $20 $15 $40

A1. (30 points) a. Apply the dynamic programming algorithm to the following instance of the 0-1 knapsack problem Item Weight Value $30 $20 $15 $40 $50 2 4 4 with capacity W 6. Show your pseudo codes for the dynamic programming solution. You should include a procedure to retrieve an optimal solution. b. How many different optimal subsets does the instance of part (a) have? Show all optimal subsets. c. In general, how can we use the table generated by the dynamic programming algorithm to tell whether there is more than one optimal subset for the knapsack problem's instance
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
