Skip to main content

Algorithms · Reductions, NP-completeness, and approximation

Consider SET COVER parameterized by the universe size p=|U|, while the number m of…

Problem

Consider SET COVER parameterized by the universe size \(p=|U|\), while the number \(m\) of available sets may be much larger. Encode subsets of \(U\) as \(p\)-bit masks and design a dynamic program that computes, for every mask, the minimum number of available sets whose union covers that mask. Prove the recurrence by considering the last set added, show how to reconstruct an optimum cover, and derive \(O(m2^p)\) time and \(O(2^p)\) space bounds. Use the result to decide whether a cover of size at most \(k\) exists, and prove that this is fixed-parameter tractable in \(p\) even though SET COVER is NP-complete when \(p\) is unrestricted.

Hint

Let the subproblem mask represent elements still required rather than the exact union already formed.

Check your work

Work the problem yourself first. Then open it in Training to check your answer and read the full worked solution.

The answer check and full solution for this problem come with ProofAnvil Practice membership ($19 USD monthly). See membership. Or start with the free Algorithms sample problem: Try the free sample problem.

More Algorithms practice problems

Back to Algorithms

An original ProofAnvil practice problem, written for this course. ProofAnvil is a practice course, not a homework-answer service.