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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Vertex Cover<br />

Vertex cover and independent set are very closely related graph problems. Since every edge in E is (by<br />

definition) incident on a vertex in a cover S, there can be no edge for which both endpoints are not in S.<br />

Thus V-S must be an independent set. Further, since minimizing S is the same as maximizing V-S, a<br />

minimum vertex cover defines a maximum independent set, and vice versa. This equivalence means that<br />

if you have a program that solves independent set, you can use it on your vertex cover problem. Having<br />

two ways of looking at it can be helpful if you expect that either the cover or independent set is likely to<br />

contain only a few vertices, for it might pay to search all possible pairs or triples of vertices if you think<br />

that it will pay off.<br />

<strong>The</strong> simplest heuristic for vertex cover selects the vertex with highest degree, adds it to the cover, deletes<br />

all adjacent edges, and then repeats until the graph is empty. With the right data structures, this can be<br />

done in linear time, and the cover you get ``usually'' should be ``pretty good''. However, for certain input<br />

graphs the resulting cover can be times worse than the optimal cover.<br />

Much better is the following approximation algorithm, discussed in Section , which always finds a<br />

vertex cover whose size is at most twice as large as optimal. Find a maximal matching in the graph, i.e.<br />

a set of edges no two of which share a vertex in common and that cannot be made larger by adding<br />

additional edges. Such a maximal matching can be built incrementally, by picking an arbitrary edge e in<br />

the graph, deleting any edge sharing a vertex with e, and repeating until the graph is out of edges. Taking<br />

both of the vertices for each edge in the matching gives us a vertex cover, since we only delete edges<br />

incident to one of these vertices and eventually delete all the edges. Because any vertex cover must<br />

contain at least one of the two vertices in each matching edge just to cover the matching, this cover must<br />

be at most twice as large as that of the minimum cover.<br />

This heuristic can be tweaked to make it perform somewhat better in practice, without losing the<br />

performance guarantee or costing too much extra time. We can select the matching edges so as to ``kill<br />

off'' as many edges as possible, which should reduce the size of the maximal matching and hence the<br />

number of pairs of vertices in the vertex cover. Also, some vertices selected for our cover may in fact not<br />

be necessary, since all of their incident edges could also have been covered using other selected vertices.<br />

By making a second pass through our cover, we can identify and delete these losers. If we are really<br />

lucky, we might halve the size of our cover using these techniques.<br />

A problem that might seem closely related to vertex cover is edge cover, which seeks the smallest set of<br />

edges such that each vertex is included in one of the edges. In fact, edge cover can be efficiently solved<br />

by finding a maximum cardinality matching in G (see Section ) and then selecting arbitrary edges to<br />

account for the unmatched vertices.<br />

Implementations: Programs for the closely related problems of finding cliques and independent sets<br />

were sought for the Second DIMACS Implementation Challenge, held in October 1993. See Section<br />

for details.<br />

file:///E|/BOOK/BOOK4/NODE174.HTM (2 of 3) [19/1/2003 1:31:19]

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

Saved successfully!

Ooh no, something went wrong!