18.04.2013 Views

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

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.

Approximating Vertex Cover<br />

Next: <strong>The</strong> Euclidean Traveling Salesman Up: Approximation <strong>Algorithm</strong>s Previous: Approximation <strong>Algorithm</strong>s<br />

Approximating Vertex Cover<br />

As we have seen before, finding the minimum vertex cover of a graph is NP-complete. However, a very simple procedure<br />

can efficiently find a cover that is at most twice as large as the optimal cover:<br />

VertexCover(G=(V,E))<br />

u or v.<br />

while do:<br />

Select an arbitrary edge<br />

Add both u and v to the vertex cover<br />

Delete all edges from E that are incident on either<br />

It should be apparent that this procedure always produces a vertex cover, since each edge is only deleted immediately after an<br />

incident vertex has been added to the cover. More interesting is the claim that any vertex cover must use at least half as many<br />

vertices as this one. Why? Consider just the edges selected by the algorithm. No two of these edges can share a vertex.<br />

<strong>The</strong>refore, any cover of just these edges must include at least one vertex per edge, which makes it at least half the size of the<br />

greedy cover.<br />

<strong>The</strong>re are several interesting things to notice about this algorithm:<br />

● Although the procedure is simple, it is not stupid - Many seemingly smarter heuristics can give a far worse<br />

performance in the worst case. For example, why not modify the procedure above to select only one of the two<br />

vertices for the cover instead of both. After all, the selected edge will be equally well covered by only one vertex.<br />

However, consider the star-shaped graph of Figure . This heuristic will produce a two-vertex cover, while the<br />

single vertex heuristic can return a cover as large as n-1 vertices, should we get unlucky and repeatedly select the leaf<br />

instead of the center as the cover vertex.<br />

file:///E|/BOOK/BOOK3/NODE120.HTM (1 of 2) [19/1/2003 1:29:58]

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

Saved successfully!

Ooh no, something went wrong!