Back to the 2025 paper

Module 5: Advanced Topics

20252m

What is the approximation ratio (or performance ratio) of the greedy algorithm for the Vertex Cover problem?

(i) 2
(ii) 1.5
(iii) ln n
(iv) 1

Worked SolutionAI Assisted

Answer: (i) 2

Explanation:

  • Classic 2-approximation for Minimum Vertex Cover (greedy matching-based):

    C = ∅
    while E ≠ ∅:
      pick any edge (u,v) ∈ E
      add both u and v to C
      remove all edges incident to u or v
    

    Any optimal cover must include at least one endpoint of each picked edge, and picked edges are disjoint. So ∣C∣≤2⋅∣OPT∣|C| ≤ 2·|OPT|.

  • Ratio 2 is tight; a simple maximal-matching algorithm achieves it. No polynomial algorithm can achieve (2−ϵ)(2-\epsilon) unless P=NPP=NP (inapproximability). The naive greedy "pick highest-degree vertex" can be Θ(log⁡n)\Theta(\log n) bad, not 2.

Correct choice: (i) 2

Similar questions

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.