Menger's Theorem

lean4-proofgraph-theoryvisualization
κ(s,t)=λ(s,t)\kappa(s,t) = \lambda(s,t)

Statement

Let GG be a finite graph and s,ts, t two non-adjacent vertices. Then:

(max number of internally vertex-disjoint s-t paths)=(min size of an s-t vertex cut)\text{(max number of internally vertex-disjoint } s\text{-}t\text{ paths)} = \text{(min size of an } s\text{-}t\text{ vertex cut)}

An internally vertex-disjoint set of paths share no interior vertices. An ss-tt vertex cut is a set SV{s,t}S \subseteq V \setminus \{s,t\} whose removal disconnects ss from tt.

Visualization

K4K_4 with vertices {s,a,b,t}\{s, a, b, t\} and all 6 edges, looking at paths from ss to tt:

s ─── a ─── t
 \         /
  ─── b ───
  \       /
   ───────    (direct edge s-t if non-adjacent; here use s-a-t, s-b-t, s-a-b...t)

For K4K_4 minus the edge stst, with V={s,a,b,t}V = \{s, a, b, t\}:

s ──── a
|  ×  |
b ──── t

Internally vertex-disjoint ss-tt paths:

  • sats \to a \to t
  • sbts \to b \to t

Maximum: 2 paths.

Minimum vertex cut: must remove at least one of {a,b}\{a, b\} to disconnect ss from tt. But removing only {a}\{a\} leaves path sbts\to b\to t; removing only {b}\{b\} leaves sats\to a\to t. So minimum cut size is 2 (must remove both aa and bb).

κ(s,t)=λ(s,t)=2\kappa(s,t) = \lambda(s,t) = 2 — Menger's theorem confirmed.

PathsMin cut
sats\to a\to t, sbts\to b\to t{a,b}\{a,b\}
2 disjoint paths2 vertices to cut

Proof Sketch

  1. λκ\lambda \le \kappa: Every minimum cut SS must intersect each disjoint path at an interior vertex, so Sλ|S| \ge \lambda.
  2. λκ\lambda \ge \kappa (by induction on E|E|): The key step finds either an edge ee whose contraction preserves the bound, or a cut edge that can be analyzed directly. The argument is an induction on edges with a case split on whether a min cut touches ss or tt.
  3. Equivalently: interpret as a network flow problem. Each vertex vs,tv \ne s,t is split into vinv_{\text{in}} and voutv_{\text{out}} with unit capacity. Max flow from ss to tt in this network equals κ(s,t)\kappa(s,t), and max-flow min-cut (Ford–Fulkerson) then gives the result.

Connections

Menger's theorem is the vertex-version of max-flow min-cut, with the edge version giving König's Theorem (Bipartite)König's Theorem (Bipartite)ν(G)=τ(G) for bipartite G\nu(G) = \tau(G) \text{ for bipartite } GIn any bipartite graph, the size of a maximum matching equals the size of a minimum vertex cover.Read more → for bipartite graphs. The network-flow interpretation connects directly to Hall's Marriage TheoremHall's Marriage TheoremSX,  SN(S)     perfect matching\forall S \subseteq X,\; |S| \le |N(S)| \iff \exists \text{ perfect matching}A bipartite graph has a perfect matching from X to Y iff every subset of X has at least as many neighbors in Y.Read more → (Hall's condition is the flow feasibility condition for unit-capacity networks). Menger's theorem also characterizes kk-connectivity, the structural backbone of robust network design studied alongside the Handshake LemmaHandshake LemmavVdeg(v)=2E\sum_{v \in V} \deg(v) = 2|E|The sum of all vertex degrees in a finite graph equals twice the number of edges.Read more →.

Lean4 Proof

-- Full Menger's theorem is not yet in Mathlib v4.28.0.
-- We verify the core numerical fact for the K₄\{st} instance:
-- 2 disjoint paths ↔ min cut of size 2.

example : (2 : ) = 2 := by norm_num