Why it matters

Bipartite matching is core assignment problem. Hopcroft-Karp is standard fast solution.

Advertisement

The architecture

BFS: layered graph of augmenting paths.

DFS: augment maximal set.

Hopcroft-KarpBFS layersshortest aug pathsDFS augmentvertex-disjoint setRepeatuntil no pathsqrt V phases suffice because path lengths grow by 2 each phase
HK phases.
Advertisement

How it works end to end

Layered by BFS distance.

Multiple augmenting paths per phase.

O(sqrt V) phases proven bound.