Fast maximum matching algorithm for bipartite graphs

I am trying to solve the following problem but my algorithm is too slow. This is because I use the Edmonds-Karp algorithm to find the maximum flow, which when applied to bipartite graphs also gives the maximum match. Runtime n ^ 5. I would like to know any faster algorithms to solve this problem (for two-sided graphs). One of the algorithms that I am studying right now is “Move to the front,” which is n ^ 3.

+4
source share
2 answers

I am writing two-way matching using dinitz algorithm . There is also a theorem that for graphs such as maximal two-party coincidence problems, it has the same complexity as relative to the front (and it is easier to implement).

In networks that arise when solving the bipartite comparison problem, the number of phases is limited to O (\ sqrt {V}), which leads to O (\ sqrt {V} E). The resulting algorithm is also known as the Hopcroft-Karp Algorithm. In a more general sense, this estimate is performed for any unit network - a network in which each vertex, with the exception of the source and receiver, either has one input edge of the capacity one, or one outgoing edge of the capacity one, and all other capacities are arbitrary integers.

, , . , -.

+7

.

+2

Source: https://habr.com/ru/post/1536440/


All Articles