Data Structures & AlgorithmsVery hardICPC regional · approximation

Problem: What guarantee does the maximal-matching heuristic give for vertex cover?

  1. A. An exact optimum
  2. B. A 1.5-approximation
  3. C. No guarantee at all
  4. D. A 2-approximation: the cover is at most twice the optimum

Correct answer: D. A 2-approximation: the cover is at most twice the optimum

Both endpoints of each matched edge are taken, and any optimal cover must contain one endpoint per matched edge.

More Coding Interview Problems questions

Exams that ask this topic