~/ learn/ comp-372/ cards/ Approximation ratios & the vertex-cover 2-approximation
1 of 5

Type the CLRS pseudocode for APPROX-VERTEX-COVER

Type the CLRS pseudocode for APPROX-VERTEX-COVER

Answer

C = empty E' = G.E while E' != empty: pick (u, v) in E' C = C + {u, v} remove edges on u or v

Both endpoints of each picked edge go into the cover; the picked edges form a maximal matching, which is the lower bound that gives the ratio 2.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/0f68ef17-ec20-42df-8554-d78c2a757f27/flashcard utf-8 LF