Hopcroft–Karp algorithm

This is an old revision of this page, as edited by Tim32 (talk | contribs) at 16:44, 10 November 2007 (another estimation). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The Hopcroft–Karp algorithm finds maximum cardinality matchings in bipartite graphs in time (another estimation is O(V 5/2) [1]). It is an adaptation of the Edmonds-Karp algorithm for maximum flow, since bipartite matching is equivalent to finding the maximum (integer) flow if the vertices in each partition are considered sources (respectively sinks) of capacity 1. The minimal cut associated with the flow is equivalent to the minimal vertex cover associated with the matching.

Algorithm

Input: Bipartite graph  
Output: Matching  
 
repeat
  maximal set of vertex-disjoint shortest augmenting paths
 
until  

References

  • Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein (2001) [1990]. "26". Introduction to Algorithms (2nd edition ed.). MIT Press and McGraw-Hill. pp. 696–697. ISBN 0-262-03293-7. {{cite book}}: |edition= has extra text (help)CS1 maint: multiple names: authors list (link)
  1. ^ Lipski W., Kombinatoryka dla Programistow, [Combinatorics for Programmers], Wydawnictwa Naukowo-Techniczne, Warzawa, 1982.