Samiksha Jaiswal (Editor)

Set cover problem

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

The set cover problem is a classical question in combinatorics, computer science and complexity theory. It is one of Karp's 21 NP-complete problems shown to be NP-complete in 1972.

Contents

It is a problem "whose study has led to the development of fundamental techniques for the entire field" of approximation algorithms.

Given a set of elements { 1 , 2 , . . . , n } (called the universe) and a collection S of m sets whose union equals the universe, the set cover problem is to identify the smallest sub-collection of S whose union equals the universe. For example, consider the universe U = { 1 , 2 , 3 , 4 , 5 } and the collection of sets S = { { 1 , 2 , 3 } , { 2 , 4 } , { 3 , 4 } , { 4 , 5 } } . Clearly the union of S is U . However, we can cover all of the elements with the following, smaller number of sets: { { 1 , 2 , 3 } , { 4 , 5 } } .

More formally, given a universe U and a family S of subsets of U , a cover is a subfamily C S of sets whose union is U . In the set covering decision problem, the input is a pair ( U , S ) and an integer k ; the question is whether there is a set covering of size k or less. In the set covering optimization problem, the input is a pair ( U , S ) , and the task is to find a set covering that uses the fewest sets.

The decision version of set covering is NP-complete, and the optimization/search version of set cover is NP-hard.

If each set is assigned a cost, it becomes a weighted set cover problem.

Integer linear program formulation

The minimum set cover problem can be formulated as the following integer linear program (ILP).

This ILP belongs to the more general class of ILPs for covering problems. The integrality gap of this ILP is at most log n , so its relaxation gives a factor- log n approximation algorithm for the minimum set cover problem (where n is the size of the universe).

Hitting set formulation

Set covering is equivalent to the hitting set problem. That is seen by observing that an instance of set covering can be viewed as an arbitrary bipartite graph, with sets represented by vertices on the left, the universe represented by vertices on the right, and edges representing the inclusion of elements in sets. The task is then to find a minimum cardinality subset of left-vertices which covers all of the right-vertices. In the Hitting set problem, the objective is to cover the left-vertices using a minimum subset of the right vertices. Converting from one problem to the other is therefore achieved by interchanging the two sets of vertices.

Greedy algorithm

There is a greedy algorithm for polynomial time approximation of set covering that chooses sets according to one rule: at each stage, choose the set that contains the largest number of uncovered elements. It can be shown that this algorithm achieves an approximation ratio of H ( s ) , where s is the size of the set to be covered. In other words, it finds a covering that may be H ( n ) times as large as the minimum one, where H ( n ) is the n -th harmonic number:

H ( n ) = k = 1 n 1 k ln n + 1

This greedy algorithm actually achieves an approximation ratio of H ( s ) where s is the maximum cardinality set of S . For δ dense instances, there exists, however, a c ln m -approximation algorithm for every c > 0 .

There is a standard example on which the greedy algorithm achieves an approximation ratio of log 2 ( n ) / 2 . The universe consists of n = 2 ( k + 1 ) 2 elements. The set system consists of k pairwise disjoint sets S 1 , , S k with sizes 2 , 4 , 8 , , 2 k respectively, as well as two additional disjoint sets T 0 , T 1 , each of which contains half of the elements from each S i . On this input, the greedy algorithm takes the sets S k , , S 1 , in that order, while the optimal solution consists only of T 0 and T 1 . An example of such an input for k = 3 is pictured on the right.

Inapproximability results show that the greedy algorithm is essentially the best-possible polynomial time approximation algorithm for set cover up to lower order terms (see Inapproximability results below), under plausible complexity assumptions. A tighter analysis for the greedy algorithm shows that the approximation ratio is in fact ln n ln ln n + Θ ( 1 ) .

Low-frequency systems

If each element occurs in at most f sets, then a solution can be found in polynomial time that approximates the optimum to within a factor of f using LP relaxation.

Inapproximability results

When n refers to the size of the universe, Lund & Yannakakis (1994) showed that set covering cannot be approximated in polynomial time to within a factor of 1 2 log 2 n 0.72 ln n , unless NP has quasi-polynomial time algorithms. Feige (1998) improved this lower bound to ( 1 Ω ( 1 ) ) ln n under the same assumptions, which essentially matches the approximation ratio achieved by the greedy algorithm. Raz & Safra (1997) established a lower bound of c ln n , where c is a certain constant, under the weaker assumption that P NP. A similar result with a higher value of c was recently proved by Alon, Moshkovitz & Safra (2006). Dinur & Steurer (2013) showed optimal inapproximability by proving that it cannot be approximated to ( 1 Ω ( 1 ) ) ln n unless P = NP.

  • Hitting set is an equivalent reformulation of Set Cover.
  • Vertex cover is a special case of Hitting Set.
  • Edge cover is a special case of Set Cover.
  • Geometric set cover is a special case of Set Cover when the universe is a set of points in R d and the sets are induced by the intersection of the universe and geometric shapes (e.g., disks, rectangles).
  • Set packing is the dual problem of Set Cover.
  • Maximum coverage problem is to choose at most k sets to cover as many elements as possible.
  • Dominating set is the problem of selecting a set of vertices (the dominating set) in a graph such that all other vertices are adjacent to at least one vertex in the dominating set. The Dominating set problem was shown to be NP complete through a reduction from Set cover.
  • Exact cover problem is to choose a set cover with no element included in more than one covering set.
  • Closest pair of points problem
  • Nearest neighbor search
  • References

    Set cover problem Wikipedia