Question: This problem shows how to design a Polynomial Time Approximation Scheme ( PTAS ) for the knapsack problem. For any l o n > 0

This problem shows how to design a Polynomial Time Approximation Scheme (PTAS) for
the knapsack problem. For any lon>0, the PTAS will give a (1-lon)-approximation in at most
f(lon)ng(lon) time. Thus, we can trade runtime for approximation accuracy.
a) Assume that vilon*OPT for all items i. Show that Greedy is a (1-lon)-approximation.
[Hint: Use (1) from problem 1 b).]
b) Assume that we know OPT. Let H={i|vilon*OPT}, be the set of 'high' valued
items, and L={i|vilon*OPT} be the 'low' valued items. Observe that the optimal
subset contains no more than 1lon items from H, otherwise OPT would be larger.
Assuming that we know OPT, consider the following approximation algorithm.
i) Try each subset SsubeH with size |S|1lon and W(S)W.
ii) For any subset S, let G(S) be the output of Greedy using items of L with remain-
ing weight W-W(S).
iii) Return the best result, maxV(SG(S)).
Show that the above algorithm is a (1-lon)-approximation.
c) Assuming that we know OPT, what is the runtime of the algorithm in part b)? You
can assume 1 is an integer, and you can use crude bound on the number of subsets
S tried in line i).
d) Of course we don't know OPT. Explain how we can overcome this limitation.
 This problem shows how to design a Polynomial Time Approximation Scheme

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!