Question: Trace the Subset Sum algorithm on the following input. Make the matrix very large so that the following annotations you need to add are legible

Trace the Subset Sum algorithm on the following input. Make the matrix very large so that the following annotations you need to add are legible in it. For each matrix entry, show using arrows which two previous entries were used to compute it, label these arrows with any additional weight being added into the knapsack if that arrow is used, and then highlight one of the two arrow to indicate which of these two entries was chosen. Highlight the final path from the last cell back to the first, and write down what subset this path indicates is the max-weight subset.
n =4 items with weights: w_1=5, w_2=2, w_3=3,
w_4=4
weight bound W =9

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!