HOME

TheInfoList



OR:

The set cover problem is a classical question in
combinatorics Combinatorics is an area of mathematics primarily concerned with counting, both as a means and as an end to obtaining results, and certain properties of finite structures. It is closely related to many other areas of mathematics and has many ...
,
computer science Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
,
operations research Operations research () (U.S. Air Force Specialty Code: Operations Analysis), often shortened to the initialism OR, is a branch of applied mathematics that deals with the development and application of analytical methods to improve management and ...
, and complexity theory. Given a set of elements (henceforth referred to as the
universe The universe is all of space and time and their contents. It comprises all of existence, any fundamental interaction, physical process and physical constant, and therefore all forms of matter and energy, and the structures they form, from s ...
, specifying all possible elements under consideration) and a collection, referred to as , of a given subsets whose union equals the universe, the set cover problem is to identify a smallest sub-collection of whose union equals the universe. For example, consider the universe, and the collection of sets In this example, is equal to 4, as there are four subsets that comprise this collection. The union of is equal to . However, we can cover all elements with only two sets: , see picture, but not with only one set. Therefore, the solution to the set cover problem for this and has size 2. More formally, given a universe \mathcal and a family \mathcal of subsets of \mathcal, a set cover is a subfamily \mathcal\subseteq\mathcal of sets whose union is \mathcal. * In the set cover
decision problem In computability theory and computational complexity theory, a decision problem is a computational problem that can be posed as a yes–no question on a set of input values. An example of a decision problem is deciding whether a given natura ...
, the input is a pair (\mathcal,\mathcal) and an integer k; the question is whether there is a set cover of size k or less. * In the set cover
optimization problem In mathematics, engineering, computer science and economics Economics () is a behavioral science that studies the Production (economics), production, distribution (economics), distribution, and Consumption (economics), consumption of goo ...
, the input is a pair (\mathcal,\mathcal), and the task is to find a set cover that uses the fewest sets. The decision version of set covering is
NP-complete In computational complexity theory, NP-complete problems are the hardest of the problems to which ''solutions'' can be verified ''quickly''. Somewhat more precisely, a problem is NP-complete when: # It is a decision problem, meaning that for any ...
. It is one of Karp's 21 NP-complete problems shown to be
NP-complete In computational complexity theory, NP-complete problems are the hardest of the problems to which ''solutions'' can be verified ''quickly''. Somewhat more precisely, a problem is NP-complete when: # It is a decision problem, meaning that for any ...
in 1972. The optimization/search version of set cover is NP-hard. It is a problem "whose study has led to the development of fundamental techniques for the entire field" of
approximation algorithms In computer science and operations research, approximation algorithms are efficient algorithms that find approximate solutions to optimization problems (in particular NP-hard problems) with provable guarantees on the distance of the returned sol ...
.


Variants

In the weighted set cover problem, each set is assigned a positive weight (representing its cost), and the goal is to find a set cover with a smallest weight. The usual (unweighted) set cover corresponds to all sets having a weight of 1. In the fractional set cover problem, it is allowed to select fractions of sets, rather than entire sets. A fractional set cover is an assignment of a fraction (a number in ,1 to each set in \mathcal, such that for each element ''x'' in the universe, the sum of fractions of sets that contain ''x'' is at least 1. The goal is to find a fractional set cover in which the sum of fractions is as small as possible. Note that a (usual) set cover is equivalent to a fractional set cover in which all fractions are either 0 or 1; therefore, the size of the smallest fractional cover is at most the size of the smallest cover, but may be smaller. For example, consider the universe and the collection of sets The smallest set cover has a size of 2, e.g. But there is a fractional set cover of size 1.5, in which a 0.5 fraction of each set is taken.


Linear program formulation

The set cover problem can be formulated as the following integer linear program (ILP). For a more compact representation of the covering constraint, one can define an incidence matrix ''A'', where each row corresponds to an element and each column corresponds to a set, and ''A_=1'' if element e is in set s, and ''A_=0'' otherwise. Then, the covering constraint can be written as A x \geqslant 1 . Weighted set cover is described by a program identical to the one given above, except that the objective function to minimize is \sum_ w_s x_s, where w_ is the weight of set s\in \mathcal. Fractional set cover is described by a program identical to the one given above, except that x_s can be non-integer, so the last constraint is replaced by 0 \leq x_s\leq 1. This linear program belongs to the more general class of LPs for covering problems, as all the coefficients in the objective function and both sides of the constraints are non-negative. The integrality gap of the ILP is at most \scriptstyle \log n (where \scriptstyle n is the size of the universe). It has been shown that its relaxation indeed gives a factor-\scriptstyle \log n
approximation algorithm In computer science and operations research, approximation algorithms are efficient algorithms that find approximate solutions to optimization problems (in particular NP-hard problems) with provable guarantees on the distance of the returned sol ...
for the minimum set cover problem. See randomized rounding#setcover for a detailed explanation.


Hitting set formulation

The set cover problem is equivalent to the hitting set problem. A subset H of U is called a hitting set when H \cap S_j \neq \emptyset for all 1 \leq j \leq m (i.e., H intersects or “hits” all subsets in S). The hitting set problem is to find a minimum hitting set H for a given U and S. To show that the problems are equivalent, for a universe U of size n and collection of sets S of size m, construct U'=\ and S'_i = \. Then a set cover C of S is equivalent to a hitting set H' of U' where S_j \in C \iff j \in H', and vice versa. This equivalence can also be visualized by representing the problem as a bipartite graph of n + m vertices, with n vertices on the left representing elements of U, and m vertices on the right representing elements of S, and edges representing set membership (i.e., there is an edge between the i-th vertex on the left and the j-th vertex of the right iff. i \in S_j). Then a set cover is a subset C of right vertices such that each left vertex is adjacent to at least one member of C, while a hitting set is a subset H of left vertices such that each right vertex is adjacent to at least one member of H. These definitions are exactly the same except that ''left'' and ''right'' are swapped. But there is nothing special about the sides in the bipartite graph; we could have put the elements of U on the right side, and the elements of S on the left side, creating a graph that is a mirror image of the one described above. This shows that set covers in the original graph are equivalent to hitting sets in the mirrored graph, and vice versa. In the field of computational geometry, a hitting set for a collection of geometrical objects is also called a stabbing set or piercing set.


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. This method can be implemented in time linear in the sum of sizes of the input sets, using a bucket queue to prioritize the sets. It 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 In mathematics, the -th harmonic number is the sum of the reciprocals of the first natural numbers: H_n= 1+\frac+\frac+\cdots+\frac =\sum_^n \frac. Starting from , the sequence of harmonic numbers begins: 1, \frac, \frac, \frac, \frac, \dot ...
: H(n) = \sum_^ \frac \le \ln +1 This greedy algorithm actually achieves an approximation ratio of H(s^\prime) where s^\prime is the maximum cardinality set of S. For \delta-dense instances, however, there exists a c \ln-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^-2 elements. The set system consists of k pairwise disjoint sets S_1,\ldots,S_k with sizes 2,4,8,\ldots,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,\ldots,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 exactly \ln - \ln + \Theta(1).


Low-frequency systems

If each element occurs in at most sets, then a solution can be found in polynomial time that approximates the optimum to within a factor of using LP relaxation. If the constraint x_S\in\ is replaced by x_S \geq 0 for all in \mathcal in the integer linear program shown above, then it becomes a (non-integer) linear program . The algorithm can be described as follows: # Find an optimal solution for the program using some polynomial-time method of solving linear programs. # Pick all sets for which the corresponding variable has value at least 1/ in the solution .


Inapproximability results

When n refers to the size of the universe, showed that set covering cannot be approximated in polynomial time to within a factor of \tfrac\log_2 \approx 0.72\ln, unless NP has quasi-polynomial time algorithms. Feige (1998) improved this lower bound to \bigl(1-o(1)\bigr)\cdot\ln under the same assumptions, which essentially matches the approximation ratio achieved by the greedy algorithm. established a lower bound of c\cdot\ln, where c is a certain constant, under the weaker assumption that P\not=NP. A similar result with a higher value of c was recently proved by . showed optimal inapproximability by proving that it cannot be approximated to \bigl(1 - o(1)\bigr) \cdot \ln unless P=NP. In low-frequency systems, proved it is NP-hard to approximate set cover to better than f-1-\epsilon. If the
Unique games conjecture In computational complexity theory, the unique games conjecture (often referred to as UGC) is a conjecture made by Subhash Khot in 2002. The conjecture postulates that the problem of determining the approximate ''value'' of a certain type of g ...
is true, this can be improved to f-\epsilon as proven by . proves that set cover instances with sets of size at most \Delta cannot be approximated to a factor better than \ln \Delta - O(\ln \ln \Delta) unless P=NP, thus making the approximation of \ln \Delta + 1 of the greedy algorithm essentially tight in this case.


Weighted set cover

Relaxing the integer linear program for weighted set cover stated above, one may use
randomized rounding In computer science and operations research, randomized rounding is a widely used approach for designing and analyzing approximation algorithms. Many combinatorial optimization problems are computationally intractability (complexity), intrac ...
to get an O(\log n)-factor approximation. Non weighted set cover can be adapted to the weighted case.


Fractional set cover


Related problems

* 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 \mathbb^d and the sets are induced by the intersection of the universe and geometric shapes (e.g., disks, rectangles). * Set packing * Maximum coverage problem is to choose at most k sets to cover as many elements as possible. *
Dominating set In graph theory, a dominating set for a Graph (discrete mathematics), graph is a subset of its vertices, such that any vertex of is in , or has a neighbor in . The domination number is the number of vertices in a smallest dominating set for ...
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. * Red-blue set cover. * Set-cover abduction. * Monotone dualization is a computational problem equivalent to either listing all minimal hitting sets or listing all minimal set covers of a given set family.


Notes


References

* . * * . * * . * . * . * * * * * *


External links


Benchmarks with Hidden Optimum Solutions for Set Covering, Set Packing and Winner Determination


{{DEFAULTSORT:Set Cover Problem Families of sets NP-complete problems Linear programming Approximation algorithms Covering problems