Search for question
Question

6. The algorithm we saw from the course for KNAPSACK uses time and space (nc)for n items and knapsack capacity c. (a) Show how the decision version of KNAPSACK can be solved using only (c)space. (b) Outline the difficulties with doing so for the search version, i.e., if an explicit solution has to be produced.

Fig: 1

Fig: 2

Fig: 3

Fig: 4