Problem Definition

  • Given a set of elements
  • A set of non-empty subsets of such that
  • Question is to find a collection from of minimum size such that the union of sets in covers all elements of
  • Assumption: Union of all sets in covers all elements of

Brute force algorithm: Takes time

  • Tries all possible subsets of
  • Given one such subset we can check in time if union of all sets in covers all elements of
    • Each of the sets in can have at most elements each
  • Can we do better, say time ?
    • Note that

Setting up the recurrence for dynamic programming

  • For each non-empty subset and each let be the size of minimum cardinality subset of that covers all elements from .
    • Find a recurrence for
    • What happens if does not cover
  • Base case is when