Question: a. Apply the dynamic programming algorithm to the following instance of the 0- knapsack problem ItemWeight Value $30 $20 S15 $40 $50 4 4 with

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