Make sure you have read the statement on academic honesty on the homework assignment index page.
The following algorithm is an approximation algorithm for MIN-VERTEX-COVER:
Input: undirected graph G
for all nodes v in G
{mark(v) = false;}
boolean done = false;
while (!done)
done = true;
{for all edges (x,y) in G
if ((mark(x) == false) && (mark(y) == false))
{mark(x) = true;
mark(y) = true;
done = false;
break;
}
}
return set of v such that mark(v) == true;
Last modified 15 August 2003