Find minimum vertex Cover for bipartite graph given the maximum matching

筅森魡賤 提交于 2019-12-03 22:11:57
Luixo

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).

first you should know bipartite graph, two sets of vertexes, and edges, ok, you know that now.

then you need to choose some vertexes from the two sets, to cover all the edges. As long as one vertex is chosen, all the edges link to it is covered. Now your task is to choose the minimum number of vertexes, to cover all the edges.

the principle means, the minimum number you need equals to the number of max matching pairs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!