next up previous
Next: Up: Previous:

Vertex-Cover Problem

Definition

Approximation algorithm:
$\;\;\;\;\;$Keep grabbing edges whose vertices are not already in the cover

Approx-Vertex-Cover(G) $\;\;\;\;\;$ $\;\;\;\;\;$; G = (V, E)
$\;\;\;\;\;$C = {}
$\;\;\;\;\;$E' = E
$\;\;\;\;\;$while E' $\neq$ {}
$\;\;\;\;\;$ $\;\;\;\;\;$(u,v) = arbitrary edge from E'
$\;\;\;\;\;$ $\;\;\;\;\;$C = C $\cup$ {u,v}
$\;\;\;\;\;$ $\;\;\;\;\;$remove from E' every edge incident on u or v
$\;\;\;\;\;$return C



This algorithm takes O(E) time.


next up previous
Next: Up: Previous: