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 the PTAS will give a approximation in at most
time. Thus, we can trade runtime for approximation accuracy.
a Assume that for all items Show that Greedy is a approximation.
Hint: Use from problem b
b Assume that we know OPT. Let be the set of 'high' valued
items, and be the 'low' valued items. Observe that the optimal
subset contains no more than lon items from otherwise OPT would be larger.
Assuming that we know OPT, consider the following approximation algorithm.
i Try each subset SsubeH with size lon and
ii For any subset let be the output of Greedy using items of with remain
ing weight
iii Return the best result, maxV
Show that the above algorithm is a approximation.
c Assuming that we know OPT, what is the runtime of the algorithm in part b You
can assume is an integer, and you can use crude bound on the number of subsets
tried in line i
d Of course we don't know OPT. Explain how we can overcome this limitation
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
