Why it matters

Bipartite matching is common optimization. Understanding shapes assignment problems.

Advertisement

The architecture

Reduce to max flow: add source connected to left; sink connected to right; unit capacity edges.

Max flow = max matching.

Bipartite matchingLeft setone sideRight setother sideEdges + reductionto max flowHopcroft-Karp specialized: O(E√V) using augmenting path lengths
Bipartite structure.
Advertisement

How it works end to end

Hopcroft-Karp: BFS to find shortest augmenting paths of same length; augment all simultaneously. O(E√V).

Weighted bipartite matching: Hungarian algorithm O(V³).

Applications: task assignment, course scheduling, kidney exchange.