Paths, Trees, and Flowers I: Matching-Duality Theorem — the Maximum Cardinality of a Matching Equals the Minimum Capacity-Sum of an Odd-Set CoverResearch Paper
Motivation
A matching in a graph is a set of edges no two of which share a vertex. Finding a matching of maximum cardinality is one of the basic problems of combinatorial optimization: it models pairing tasks (workers to shifts, kidney donors to recipients, players to rounds), it is a subroutine of algorithms for the travelling salesman and Chinese postman problems, and it was the first problem shown to need more than linear programming over the obvious constraints to be solved exactly.
For bipartite graphs, König's theorem (1931) gives a min–max formula: the maximum size of a matching equals the minimum size of a set of vertices meeting every edge. In general graphs this fails already for a triangle, where a single edge is a maximum matching but two vertices are needed to meet all three edges. Jack Edmonds' paper Paths, trees, and flowers (1965) gave both a polynomial-time algorithm for maximum matching in general graphs, the blossom algorithm, and, as a by-product of its analysis, the correct min–max theorem for general graphs.
Timeline.
- 1891: Petersen uses alternating paths to prove the existence of factors in certain graphs.
- 1947: Tutte characterizes graphs with a perfect matching.
- 1957: Berge proves that a matching is maximum if and only if there is no augmenting path, and derives the deficiency formula now called the Tutte–Berge formula (Berge 1957).
- 1965: Edmonds shrinks odd circuits ("blossoms") to search for augmenting paths in polynomial time and proves the matching-duality theorem in terms of odd-set covers (Edmonds 1965); the companion paper on the matching polyhedron extends this to weighted matching.
Setting
A graph is a finite set of vertices and a finite set of edges, each edge meeting exactly two distinct vertices, its end-points. Several edges may join the same two vertices; this is needed because shrinking creates parallel edges. A matching is a set of edges no two of which meet the same vertex; a vertex is exposed if it meets no edge of . "Maximum" refers to cardinality.
An odd set is a set of vertices with an odd number of elements. Its capacity is
A one-vertex set covers the edges meeting its vertex; a set of vertices covers the edges with both end-points in it. An odd-set cover is a family of odd sets such that every edge is covered by some member, and its capacity-sum is .
The proof uses the following objects of §3–§4 of the paper. An alternating path is a simple path whose edges alternate between and the non-matching edges . An alternating tree is a tree whose vertices are split into inner and outer vertices, every edge joining an inner to an outer vertex and every inner vertex meeting exactly two tree edges; it is planted if restricted to the tree is a maximum matching of the tree whose one exposed vertex (the root) is exposed in , and Hungarian if its outer vertices are adjacent only to its inner vertices. A blossom is an odd circuit on which is a maximum matching, leaving one vertex exposed; with a stem (an alternating path from an exposed vertex ending in a matching edge at ) it forms a flower. Shrinking a vertex set replaces it by a single vertex , deletes the edges inside and keeps all other edges; and denote the result for a blossom .
Formalization targets
Goal: the matching-duality theorem (5.6, p. 462)
It is stated as: there are a maximum matching and a minimum odd-set cover with .
Milestones (attack order)
- Weak duality: for every matching and odd-set cover.
- 3.7 (Berge): is not maximum iff an alternating path joins two exposed vertices.
- 4.1–4.2: maximum matchings of an alternating tree.
- 4.14 and 4.15: the two directions of 4.12, in stronger form.
- 4.12: for the blossom of a flower, is maximum in iff is maximum in .
- 4.17: removing a Hungarian tree preserves maximality.
- 5.7: the theorem for graphs with at most one exposed vertex.
- 5.8: the configuration produced by the algorithm on a maximum matching, and the odd sets it yields, which reduce the theorem to a graph with one exposed vertex fewer.
Significance
The matching-duality theorem gives a certificate of optimality: a matching and an odd-set cover of equal size prove each other optimal, and the blossom algorithm produces both. It is equivalent to the Tutte–Berge formula , it contains König's theorem as the case where all members of the cover are singletons, and it is the cardinality case of Edmonds' description of the matching polytope by odd-set constraints, which underlies weighted matching, -matching and the polyhedral approach to combinatorial optimization.
The theorem has been proved since 1965, with several independent proofs (via Tutte's theorem, via the Gallai–Edmonds decomposition, via linear programming). Mathlib contains Tutte's perfect-matching theorem for simple graphs, but neither the Tutte–Berge formula nor odd-set covers, alternating trees, blossom shrinking or Berge's augmenting-path theorem in a multigraph setting. This mission produces a machine-checked version of Edmonds' statement together with the lemmas of his algorithmic proof (4.12, 4.14, 4.15, 4.17), which are the correctness core of the blossom algorithm.
Difficulty
Weak duality and Berge's theorem are elementary. The difficulty is the strong direction. The obvious argument, a search for augmenting paths from an exposed vertex, fails because an alternating search tree in a non-bipartite graph can close an odd circuit, after which a vertex is reachable both by an even and by an odd alternating path; a naive search either misses augmenting paths or must back-track exponentially. The proof therefore has to work in shrunken graphs, whose vertices are nested sets of original vertices, and transfer maximality and covers back through every shrinking (4.12–4.15). Keeping track of nested blossoms, of the identity of edges under shrinking and of the parity bookkeeping of 5.8 is the main formal burden.
Formalization scope
- Graphs are the published
EdmondsMatching65.Polyhedron.Graph V E(a map from edges to unordered pairs of distinct vertices) with finiteV,E; parallel edges are allowed and loops are not. Matchings areFinset E. Maximum and minimum are by cardinality, stated with explicit comparisons rather thansSup/sInf. - A family of odd sets is a
Finset (Finset V); repeating a member only adds capacity, so this does not change the minimum. The capacity of a singleton is , not . - Paths and circuits are lists of vertices and edges; subgraphs are vertex and edge sets; a matching of a subgraph is a matching of using only its edges.
- Shrinking is contraction along a partition of the vertices: the vertex type of is the set of parts, the edge type is the set of edges not inside a part. Nested blossom shrinking is encoded by an inductive predicate of blossom sets (the complete expansions of pseudovertices), not by a tower of quotient types. Statements that shrink a set other than a circuit assume its induced subgraph connected, the standing assumption of 4.9.
- 5.7 is stated as the existence of a cover: the page's explicit families fail for the two-vertex graph with one edge and for the one-vertex graph, where the claim still holds.
- 5.8 is stated through the configuration the algorithm outputs (blossom sets, a planted Hungarian tree in , pseudovertices outer), not through the algorithm as a procedure.
- A trivializing formalization is excluded: the goal asserts the equality of the maximum and the minimum, not weak duality and not the separate existence of an optimal matching and an optimal cover.
Reusable beyond this mission: the multigraph shrinking construction, blossom sets, alternating and Hungarian trees, and Berge's theorem in the multigraph setting; these are shared with the companion mission on the invariance of the dual (Gallai–Edmonds). Proofs of any milestone, and alternative proofs of the goal (e.g. through Mathlib's Tutte theorem), are welcome.
Selected references
- J. Edmonds, Paths, trees, and flowers, Canadian Journal of Mathematics 17 (1965), 449–467. https://doi.org/10.4153/CJM-1965-045-4
- C. Berge, Two theorems in graph theory, Proceedings of the National Academy of Sciences USA 43 (1957), 842–844. https://doi.org/10.1073/pnas.43.9.842
- W. T. Tutte, The factorization of linear graphs, Journal of the London Mathematical Society 22 (1947), 107–111. https://doi.org/10.1112/jlms/s1-22.2.107
- J. Edmonds, Maximum matching and a polyhedron with 0,1-vertices, Journal of Research of the National Bureau of Standards 69B (1965), 125–130. https://doi.org/10.6028/jres.069B.013
- L. Lovász and M. D. Plummer, Matching Theory, North-Holland, 1986. https://doi.org/10.1090/chel/367