简体   繁体   English

二部图中的最大匹配

[英]Maximum matching in a bipartite graph

Use the following heuristic algorithm: 使用以下启发式算法:

M = NULL
while E != NULL do {
if ((∃u vertex) and (gr(u) == 1)) then 
    e ← the incident edge with u
  else 
    e ← an incident edge with a vertex with the most incident edges
M ← M ∪ {e}
E ← E - (all the incident edges with e)
}
return M //return the matching

Where: M,E - edges ; 其中:M,E-边; gr(u) - the grade of u (the number of incident edges with u) ; gr(u)-u的等级(与u的入射边数);

What we were asked: 我们被问到的是:

  a) Prove that this algorithm returns the maximum matching for a tree.
  b) Prove that if there is a perfect matching M0 then the algorithm returns it, for any bipartite graph.
  c) Prove that |M| ≥ (v(G)/2), for any bipartite graph. 
  //G is the graph, v(G) is the matching number, size of the maximum matching.

I'm almost sure this algorithm is similar to some classic algorithm that I'm failing to find, or the solution could be completely based on theorems and properties of bipartite graphs. 我几乎可以肯定,该算法与我无法找到的某些经典算法相似,或者该解决方案可能完全基于二部图的定理和属性。

Can you please give me a starting point.. What am I missing ? 您能给我一个起点吗?我想念的是什么?

I think a) is easy.. I'm still trying to find the right proof, I think it may be completely based on properties of trees and bipartite graphs. 我认为a)很容易。我仍在尝试寻找正确的证明,我认为这可能完全基于树和二部图的性质。
For b) and c) .. I don't have any idea yet. 对于b)和c)..我还没有任何想法。

This is very similar to the greedy matching algorithm. 这与贪婪匹配算法非常相似。 See the wikipedia article for more information. 有关更多信息,请参见Wikipedia文章

As for the questions... 至于问题...

a) Show that the matching you get is maximal (there are no larger matchings containing it). What does this imply on a tree?
b) Show that if M0 is a valid matching that can be found in M ∪ E in a given step, that it can be found in M ∪ E in the next. By induction, the statement holds.
c) Consider a maximum matching M1. Why must at least one of the vertices adjacent to any given edge in M1 appear as an endpoint for some edge in the matching the algorithm outputs? What does this tell you about a lower bound for its size?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM