In doing (e), you may assume the truth of the claim in (d). In doing (f), you may assume the truth of the claims in (d) and (e), and you may assume that an instance of 3-CNF-SAT has size Ω(m).
p(i,w) = 0 if i=0 p(i-1,w) if i > 0 and w < wi max{p(i-1,w), vi + p(i-1,w-wi)} otherwise
Show how the dynamic programming algorithm based on this recurrence would fill the array p for the 0-1 knapsack instance where the weight sequence (wi) = (6,3,2,5,4), the value sequence (vi) = (21,10,5,13,12), and W = 12. Do not sort or otherwise rearrange these input sequences; the algorithm will work fine without your doing so.
Don't forget to state the optimal value and the set of items that need to be included in the knapsack to achieve the optimal value. You needn't use any particular algorithm to determine this set of included items.
Assume that the graph is complete and undirected, and use 2-dimensional Euclidean distance for the cost of each edge. You needn't use any particular algorithm to find the minimum-cost spanning tree, or to find the minimum-cost matching.
Do verify that your approximation is within the bound promised by the algorithm. The optimal cost is approximately 15.070.