A Bit of History
Jack Edmonds published "Paths, Trees, and Flowers" in 1965, introducing the Blossom Algorithm to solve maximum matching in general graphs — those that need not be bipartite, extending the theory from Part 16 and the Hopcroft-Karp deep dive, both of which apply only to the bipartite case. The paper is doubly historic: beyond the algorithm itself, Edmonds used it to informally articulate what "efficient algorithm" should mean — polynomial-time computability — a conceptual cornerstone that helped shape the entire later field of computational complexity theory, including the eventual formal definitions of the classes P and NP.
Working Principle
Bipartite matching algorithms rely on augmenting paths (Berge's theorem, Part 16): if you can find a path alternating between non-matching and matching edges that starts and ends at unmatched vertices, flipping it grows the matching by one. This works flawlessly in bipartite graphs — but in general graphs, an odd-length cycle (a "blossom") can trap the augmenting-path search in a way that has no valid resolution using the naive bipartite technique.
Edmonds' insight: whenever the search encounters a blossom (an odd cycle reached via alternating paths from two different directions), contract the entire blossom down to a single "super-vertex," continue the augmenting-path search on this smaller contracted graph, and — if an augmenting path is found — expand the blossom back out afterward, carefully routing the path through the correct side of the original cycle.
Key Insight
A blossom, once contracted, behaves exactly like a single unmatched vertex for the purposes of the search — this is the deep structural fact that makes the contraction valid rather than just a convenient hack. It guarantees that any augmenting path found in the contracted graph corresponds to a genuine augmenting path in the original graph once the blossom is expanded back out.
Worked Example
Consider a 5-vertex graph: a triangle \(A\text{-}B\text{-}C\) (an odd cycle) with \(C\) additionally connected to \(D\), and \(D\) connected to \(E\). Suppose \(A\text{-}B\) is currently matched, and \(D\text{-}E\) is matched, leaving \(C\) unmatched. An augmenting-path search from \(C\) reaches the triangle \(A\text{-}B\text{-}C\) — a blossom — since \(C\) can reach both \(A\) and \(B\) via alternating paths. Contracting \(\{A,B,C\}\) into a single super-vertex \(S\), the graph simplifies to \(S\text{-}D\text{-}E\), where \(D\text{-}E\) is matched and \(S\) is unmatched — an ordinary augmenting path \(S \to D \to E\) is immediately visible. Expanding \(S\) back out and routing the path correctly through the triangle (say, via \(C \to A\) or \(C \to B\), whichever preserves a valid alternating structure) produces a genuine augmenting path in the original graph, growing the matching by one.
Correctness
The correctness argument rests on proving the blossom-contraction step is sound: an augmenting path exists in the original graph if and only if one exists in the graph with the blossom contracted. This equivalence follows because every vertex in a blossom can always be matched to any single "entry point" into the blossom via an alternating path within the cycle itself — so treating the whole blossom as one flexible unmatched-or-matched unit loses no essential information about whether augmentation is possible, while dramatically simplifying the search.
Complexity Analysis
Edmonds' original 1965 algorithm ran in \(O(V^4)\). Later refinements improved this substantially — most notably Silvio Micali and Vijay Vazirani's 1980 algorithm, which achieves the same \(O(E\sqrt{V})\) bound as Hopcroft-Karp's bipartite-only algorithm, by generalizing that algorithm's phase-based approach to handle blossom contraction:
$$\text{Time (Edmonds, 1965): } O(V^4) \qquad \text{Time (Micali-Vazirani, 1980): } O(E\sqrt{V})$$
The Micali-Vazirani bound is notoriously intricate to implement correctly — its correctness proof itself remained incompletely documented for decades, with a fully rigorous, modern proof only published in 2012 by Vazirani, nearly 30 years after the original algorithm.
Implementation
Real-World Applications
Christofides' TSP Approximation
The Blossom Algorithm is not merely a theoretical curiosity — it is a required subroutine of the Christofides Algorithm deep dive earlier in this batch, which needs a minimum-weight perfect matching on an arbitrary (non-bipartite) set of odd-degree vertices from a spanning tree. Without a working general-graph matching algorithm, one of the most practically important TSP approximation guarantees in combinatorial optimization simply could not be computed.
Exercises
- Draw a small graph containing exactly one odd cycle (a triangle) and trace through the blossom-contraction step by hand as done in the worked example.
- Explain in your own words why bipartite graphs never require blossom contraction at all — connect this to the fact that bipartite graphs contain no odd cycles.
- Compare the Blossom Algorithm's role in this series to Hopcroft-Karp's: what specific graph-theoretic property (bipartite vs. general) determines which one applies?
- Challenge: Research why the Micali-Vazirani algorithm's correctness proof took nearly 30 years to be fully rigorously documented, and summarize what made the original 1980 argument difficult to formally verify.
Limitations
Notoriously Complex to Implement
Even the simplified \(O(V^3)\)-style implementation shown here is considerably more intricate than any bipartite matching algorithm in this series, and the fastest known \(O(E\sqrt{V})\) Micali-Vazirani version is widely regarded as one of the most difficult-to-implement-correctly algorithms in classical graph theory — in production settings, most engineers rely on well-tested libraries (like NetworkX's or LEMON's matching implementations) rather than writing blossom contraction logic from scratch.