04.09.2013 Views

Algorithm Design

Algorithm Design

Algorithm Design

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

646<br />

Chapter 11 Approximation <strong>Algorithm</strong>s<br />

(11.34) For each item i we have v i W are not in<br />

any solution, and hence can be deleted). We also assume for simplicity that<br />

~-1 is an integer.<br />

Knapsack-Approx (E) :<br />

Set b = @/(2rt)) maxi vi<br />

Solve the Knapsack Problem with values Oi (equivalently ~i)<br />

Keturn the set S of items found<br />

/.~ Analyzing the <strong>Algorithm</strong><br />

First note that the solution found is at least feasible; that is, ~7~ias wi 0 as claimed; but the dependence on the<br />

desired precision ~ is not polynomial, as the running time includes ~-1 rather<br />

than log ~-1. []<br />

Finally, we need to consider the key issue: How good is the solution<br />

obtained by this algorithm? Statement (!1.34) shows that the values 9i we used<br />

are close to the real values vi, and this suggests that the solution obtained may<br />

not be far from optimal. .,<br />

then w~ have<br />

Proof. Let S* be any set satisfying Y~,i~s* wi fi] = 2¢-lnb. Finally, the chain of inequalities<br />

above says Y~i~s vi >- Y~.i~s fii - nb, and thus ~i~s vi > ( 2~-~ - 1)nb. Hence<br />

nb < ~ Y~.iss vi for ~ _< !, and so<br />

Evi

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!