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.

Set Cover<br />

<strong>The</strong>re are several variations of set cover problems to be aware of:<br />

● Are you allowed to cover any element more than once? - <strong>The</strong> distinction here is between set<br />

covering and set packing, the latter of which is discussed in Section . If we are allowed to<br />

cover elements more than once, as in the logic minimization problem above, we should take<br />

advantage of this freedom, as it usually results in a smaller covering.<br />

● Are your sets derived from the edges or vertices of a graph? - Set cover is a very general problem,<br />

and it includes several useful graph problems as special cases. Suppose instead that you seek the<br />

smallest set of edges in a graph that covers each vertex at least once. <strong>The</strong> solution is to find a<br />

maximum matching in the graph (see Section ), and then add arbitrary edges to cover the<br />

remaining vertices. Suppose you seek the smallest set of vertices in a graph that covers each edge<br />

at least once. This is the vertex cover problem, discussed in Section .<br />

It is instructive to model vertex cover as an instance of set cover. Let the universal set U be the set<br />

of edges . Construct n subsets, with consisting of the edges incident on vertex .<br />

Although vertex cover is just a set cover problem in disguise, you should take advantage of the<br />

fact that better algorithms exist for vertex cover.<br />

● Do your subsets contain only two elements each? - When all of your subsets have at most two<br />

elements each, you are in luck. This is about the only special case that you can solve efficiently to<br />

optimality, by using the matching technique described above. Unfortunately, as soon as your<br />

subsets get to have three elements each, the problem becomes NP-complete.<br />

● Do you want to cover elements with sets, or sets with elements? - In the hitting set problem, we<br />

seek a small number of items that together represent an entire population. Formally, we are given<br />

a set of subsets of the universal set , and we seek the smallest<br />

subset such that each subset contains at least one element of T. Thus for all<br />

. Suppose we desire a small Congress with at least one representative of each ethnic<br />

group. If each ethnic group is represented as a subset of people, the minimum hitting set is the<br />

smallest possible politically correct Congress. Hitting set is illustrated in Figure .<br />

file:///E|/BOOK/BOOK5/NODE201.HTM (2 of 4) [19/1/2003 1:32:04]

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

Saved successfully!

Ooh no, something went wrong!