3. Set Cover
Much of the material in this section is borrowed from Chapter 6 in Parameterized Algorithms.
The Problem
Let be a family of sets over a universe . For a subfamily and a subset , we say that covers if every element of belongs to some set of .
The Set Cover problem is the following:
- The input is a family of sets over a universe and a positive integer .
- The task is to check whether there exists a subfamily of size at most such that covers .
We describe here a algorithm for Set Cover that runs in time . In fact, this algorithm does not use the value of , and finds the minimum possible cardinality of a family that covers .
The Solution
Analysis of Running Time
By using the recurrence, we compute all values for and . The running time is therefore .
Proof of Correctness
Theorem. Given a SET COVER instance , the minimum possible size of a subfamily that covers can be found in time .
Proof. Let . We prove the correctness of the recurrence by showing inequalities in both directions.
In one direction, let be a family of minimum size that covers . We distinguish two cases. If , then note that is also a valid candidate for the entry (i.e., and covers ). If , then is a valid candidate for the entry .
In the other direction, observe that any valid candidate for the entry is also a valid candidate for and, moreover, for every valid candidate for , the family is a valid candidate for .
This completes the proof.