Hall's Marriage Theorem
Statement
Let be a bipartite graph. There exists an injection that is a matching (each is matched to a distinct neighbor ) if and only if Hall's condition holds:
where is the neighborhood of .
Visualization
Bipartite graph , with , , :
X side Y side
a ─────── 1
a ─────── 2
b ─────── 2
c ─────── 1
Check Hall's condition for all subsets of :
| Subset | | | | Hall? | |-----------|-------|---------|----------|-------| | | 1 | | 2 | ok | | | 1 | | 1 | ok | | | 1 | | 1 | ok | | | 2 | | 2 | ok | | | 2 | | 2 | ok | | | 2 | | 2 | ok | | | 3 | | 2 | FAIL |
Hall's condition fails for : . No perfect matching exists. Indeed and both compete for vertex 2 or 1, so one of is unmatched.
For a success example: adding edge – gives and a perfect matching ... no, .
Proof Sketch
- (Necessity) If a matching exists, then for any the images are distinct, so .
- (Sufficiency by induction on ) Base: trivial. Inductive step has two cases:
- Tight case: every proper satisfies . Pick any , match it to any , remove both, verify Hall's condition still holds for the remainder.
- Non-tight case: there exists with . Recurse on to get a matching; the subgraph on still satisfies Hall's condition by the tight-case argument on the residual.
- In both cases an injection is constructed, completing the induction.
Connections
Hall's theorem is the combinatorial core underlying the König's Theorem (Bipartite)König's Theorem (Bipartite)In any bipartite graph, the size of a maximum matching equals the size of a minimum vertex cover.Read more → min-cover/max-matching duality. It is also used in the proof of the Dilworth's TheoremDilworth's TheoremIn any finite partially ordered set, the minimum number of chains needed to cover the poset equals the maximum size of an antichain.Read more → via Mirsky's dual. The injection it guarantees connects to Inclusion–Exclusion Principle counting arguments and Pigeonhole PrinciplePigeonhole PrincipleIf n+1 objects are placed into n boxes, some box contains at least two objectsRead more → obstructions.
Lean4 Proof
import Mathlib.Combinatorics.Hall.Basic
/-- Hall's Marriage Theorem: a system of finite sets admits an injective
choice function iff Hall's condition holds for every finite subfamily.
Mathlib: `Finset.all_card_le_biUnion_card_iff_exists_injective`. -/
theorem halls_marriage {ι α : Type*} [Fintype ι] [DecidableEq α]
(t : ι → Finset α) :
(∀ s : Finset ι, s.card ≤ (s.biUnion t).card) ↔
∃ f : ι → α, Function.Injective f ∧ ∀ x, f x ∈ t x :=
Finset.all_card_le_biUnion_card_iff_exists_injective tReferenced by
- Menger's TheoremGraph Theory
- König's Theorem (Bipartite)Graph Theory
- Dilworth's TheoremGraph Theory