Bipartite Graphs and Matchings
A bipartite graph is a graph whose vertices split into two disjoint sets with edges only crossing between them. A matching is a set of edges sharing no endpoints. Key result: König's Theorem and Hall's Marriage Theorem completely characterize when perfect matchings exist and relate maximum matchings to minimum vertex covers. Applies to assignment problems, scheduling, and network flows. Foundations laid by Frobenius (1917), König, and Hall (1935).
Bipartite structure forbids odd cycles, which makes "augmenting paths" behave perfectly. A matching is maximum if and only if no augmenting path exists, and in bipartite graphs these paths can be found greedily. This turns matching into a problem of local search along alternating paths, and the obstruction to a perfect matching is always a single "deficient" set, never something subtle.
Formal Statement
A graph is bipartite with bipartition if
Derivation hint: directly encode "every edge crosses the partition" as a logical constraint on endpoints. Here are the two parts (or color classes). The numbers and are the sizes of the sides.
A graph is bipartite if and only if it contains no cycle of odd length.
Derivation hint: 2-color the graph by BFS parity; a conflict appears exactly when an odd closed walk forces a vertex to need both colors.
A matching satisfies: no two edges of share an endpoint.
Derivation hint: "share no endpoint" is just disjointness of the two-element edge sets.
- is maximum if no matching has more edges: , where is the matching number.
- is perfect if every vertex is matched: .
- A vertex covered by is saturated; otherwise exposed/free.
A vertex cover is a set touching every edge:
Derivation hint: a cover must "hit" each edge, so at least one endpoint lies in . The minimum size of a vertex cover is .
Let be bipartite with parts . There exists a matching saturating iff for every subset ,
where is the neighborhood of . Derivation hint: necessity is counting; sufficiency follows by augmenting-path induction or by reducing to König's theorem.
In any bipartite graph, the maximum matching number equals the minimum vertex cover number:
Derivation hint: build a vertex cover of size from an alternating-path reachability argument; weak duality gives always.
The maximum matching size obeys the deficiency formula:
Derivation hint: the term measures the worst Hall-violating set; subtract this "deficiency" from .
Why It Holds / Derivation
We prove the nontrivial direction: if for all , then can be saturated.
Step 1 — Setup. Let be a maximum matching. Suppose for contradiction some is exposed. We build a set violating Hall's condition.
Step 2 — Alternating tree. Grow an alternating path from : edges alternate between non-matching (from to ) and matching (from back to ). Let
Derivation hint: collect exactly the vertices the alternating search touches on each side.
Step 3 — Structure of reached vertices. Every is matched (else we found an augmenting path from to , contradicting maximality of ), and its match lies in . Hence gives a bijection between and , so
Derivation hint: every matched pairs to a distinct reachable , and alone is unmatched.
Step 4 — . Any neighbor of some is reachable (extend the alternating path), so ; trivially . Thus , violating Hall's condition — contradiction. Therefore no exposed vertex exists and is saturated.
∎Let be a maximum matching. Let be the exposed vertices of . Let be the set of all vertices reachable from by alternating paths. Define
Derivation hint: take unreachable -vertices plus reachable -vertices — exactly the "blocked" side of each matching edge.
Claim 1 — is a vertex cover. Any edge with : its other end must be in (reachability extends), so . If , then . So every edge is covered.
Claim 2 — . No edge of connects to (that would extend reachability), and every vertex of is matched (exposed -vertices are in , hence excluded; exposed -vertices are unreachable). Each matching edge contributes exactly one vertex to . Hence . Since always (each matching edge needs its own cover vertex) and we exhibited a cover of size , we get .
∎Philip Hall, a British group theorist at Cambridge, proved the Marriage Theorem in 1935 while studying systems of distinct representatives. Though best known for deep contributions to finite group theory (Hall subgroups, the Hall–Higman theorem), his combinatorial result became a cornerstone of matching theory. The evocative "marriage" framing — matching people to acceptable partners — popularized the abstract statement, and the theorem's many equivalent forms (König, Menger, max-flow) reveal it as one face of a single duality principle.
Building Intuition
Picture jobs () and workers (), with an edge meaning "this worker can do this job." A perfect assignment is a perfect matching. Hall's condition says: assignment fails only if some group of jobs collectively can be done by fewer than workers — a genuine bottleneck. König's duality is the accountant's version: the fewest "checkpoints" (vertices) needed to monitor every connection equals the most independent connections you can run simultaneously. The augmenting path is the trick that fixes a suboptimal assignment: find a free job, follow a chain that re-shuffles existing assignments, and end at a free worker — flipping the chain increases the match by one.
```svg
```
Worked Examples
Given: Jobs , workers , with capability edges: –{1,2}, –{1}, –{1}.
Step 1 — Test small sets. . . Good.
Step 2 — Test the suspicious set. Take : , so but .
Step 3 — Hall's condition fails. Since , no matching saturates .
Step 4 — Maximum matching size. Deficiency . By [7]:
Answer:
Given: Bipartite graph , with edges (a "path-plus" shape).
Step 1 — Find a maximum matching. Take . Both -vertices saturated; .
Step 2 — Is it maximum? Only 4 vertices; a matching of size 2 is perfect, so .
Step 3 — Find a minimum vertex cover. : edge hit by , by , by . Size . No single vertex covers all 3 edges, so .
Step 4 — Confirm [6]. . ✓
Answer:
Common Misconceptions
Hall's condition is on , not symmetric. A matching saturating may exist while has exposed vertices (when ). For a perfect matching you also need , and then checking Hall on suffices. Also: König's theorem () holds only for bipartite graphs. In general graphs , and the gap can be real.
König fails in general graphs. Take the triangle (odd cycle, not bipartite). Maximum matching has (one edge; the third vertex is left out). But minimum vertex cover needs vertices, since one vertex leaves an uncovered edge. Here , so duality breaks precisely because has an odd cycle.
Connections
Bipartite matching is the combinatorial heart of Max-Flow Min-Cut Theorem: model the matching as a flow network with unit capacities, and an integral max flow equals the maximum matching, while a min cut yields a minimum vertex cover — giving König's theorem as a corollary. It is one instance of Menger's Theorem (vertex-disjoint paths) and of LP duality, since the bipartite matching polytope is integral (the constraint matrix is totally unimodular). The weighted version connects to The Assignment Problem and the Hungarian algorithm, and the structural theory generalizes via Tutte's Theorem for matchings in arbitrary graphs.
Real-World Applications
Historical Development
Subtleties & Limits
While exact bipartite matching is solved efficiently, several frontiers remain active. Online bipartite matching with stochastic arrivals: closing the gap between known competitive ratios (e.g., beating under various arrival models) is ongoing. Dynamic matching: maintaining a near-maximum matching under edge insertions/deletions with low update time is a major area, with conditional lower bounds. Counting perfect matchings (the permanent) is -hard even for bipartite graphs (Valiant 1979), though approximate counting is possible via the Jerrum–Sinclair–Vigoda MCMC algorithm. Finally, the precise communication and streaming complexity of approximating maximum matching remains incompletely understood.
See Also
Max-Flow Min-Cut Theorem · Menger's Theorem · Tutte's Theorem · The Assignment Problem · Stable Matching and Gale–Shapley · Linear Programming Duality · Edge Coloring · Total Unimodularity