Find minimum vertex Cover for bipartite graph given the maximum matching

user1084113 picture user1084113 · Sep 16, 2012 · Viewed 14.1k times · Source

I seem to have found an algorithm but am having trouble understanding it, I was wondering if any of you knew the generic outline of the algorithm.

Here is the link to the algorithm I found on page 2

http://www.cse.iitb.ac.in/~sundar/cs435/lecture23.pdf

Answer

Luixo picture Luixo · Nov 1, 2015

Algorithm is simple as that:

  1. Find unmatched vertex, mark it as not included in minimum vertex cover.
  2. Mark all matched neighbours of this vertex as included in minimum vertex cover.
  3. Treat all mates of vertexes from previous step as unmatched vertexes and repeat step 1.
  4. If recursion ended, repeat from step 1 (that is case of several connected components of graph).
  5. If there is no unmatched vertexes, take all remaining pairs and mark them any way you like (remember that one vertex in pair has to be included in minimum vertex cover, and other one has to be not included).