~/ learn/ comp-372/ cards/ Coping with Hardness: Approximation Algorithms
1 of 12

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/6d5f35e3-d1af-4fe7-892b-7485e9db3edc/flashcard utf-8 LF