Set cover problem

Example of an instance of set cover problem.

The set cover problem is a classical question in combinatorics, computer science, operations research, and complexity theory.

Given a set of elements {1, 2, …, n} , (henceforth referred to as the universe, specifying all possible elements under consideration) and a collection, referred to as S, of a given m subsets whose union equals the universe, the set cover problem is to identify a 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} }. In this example, m is equal to 4, as there are four subsets that comprise this collection. The union of S is equal to U. However, we can cover all elements with only two sets: { {1, 2, 3}, {4, 5} }‍, see picture, but not with only one set. Therefore, the solution to the set cover problem for this U and S has size 2.

More formally, given a universe and a family of subsets of , a set cover is a subfamily of sets whose union is .

  • In the set cover decision problem, the input is a pair and an integer ; the question is whether there is a set cover of size or less.
  • In the set cover optimization problem, the input is a pair , and the task is to find a set cover that uses the fewest sets.

The decision version of set covering is NP-complete. It is one of Karp's 21 NP-complete problems shown to be NP-complete in 1972. The optimization/search version of set cover is NP-hard.[1] It is a problem "whose study has led to the development of fundamental techniques for the entire field" of approximation algorithms.[2]

  1. ^ Korte & Vygen 2012, p. 414.
  2. ^ Vazirani (2001, p. 15)