Network Flows and the Max-Flow Min-Cut Theorem

⚡ Key Takeaways

One-line statement: In any network, the maximum flow from a source to a sink equals the minimum capacity of a cut separating them. Formally, max⁡∣f∣=min⁡c(S,T)\max |f| = \min c(S,T). Applies to transportation, scheduling, image segmentation, bipartite matching, and reliability. Established by L. R. Ford Jr. and D. R. Fulkerson (1956) and independently by P. Elias, A. Feinstein, and C. E. Shannon.

💡 The Core Insight

Every flow value is bounded above by every cut capacity (weak duality). If you can find one flow and one cut whose values are equal, both must be optimal. The augmenting-path method drives the flow up until no augmenting path remains; the set of vertices reachable from ss in the leftover ("residual") network then defines a cut whose capacity equals the achieved flow. Equality is not a coincidence — it is forced by the absence of any further augmenting path.

Formal Statement

DefinitionFlow Network

A flow network is a tuple (G,c,s,t)(G, c, s, t) where:

  • G=(V,E)G = (V, E) is a directed graph,
  • c:E→R≥0c : E \to \mathbb{R}_{\ge 0} assigns a capacity c(u,v)≥0c(u,v) \ge 0 to each edge (we set c(u,v)=0c(u,v) = 0 if (u,v)∉E(u,v) \notin E),
  • s∈Vs \in V is the source, t∈Vt \in V is the sink, with s≠ts \ne t.

A flow is a function f:V×V→Rf : V \times V \to \mathbb{R} satisfying two constraints. The capacity constraint:

1
0≤f(u,v)≤c(u,v)for all (u,v)∈E.\quad 0 \le f(u,v) \le c(u,v) \quad \text{for all } (u,v) \in E.

Derivation hint: The flow on each edge is nonnegative and may not exceed its capacity; this is a definitional requirement, not a derived fact. And flow conservation at every internal vertex u∈V∖{s,t}u \in V \setminus \{s,t\}:

2
∑v∈Vf(v,u)  =  ∑v∈Vf(u,v).\quad \sum_{v \in V} f(v,u) \;=\; \sum_{v \in V} f(u,v).

Derivation hint: "Flow in = flow out" at every node except the source and sink — analogous to Kirchhoff's current law for charge conservation. The value of the flow is the net flow out of the source:

3
∣f∣  =  ∑v∈Vf(s,v)  −  ∑v∈Vf(v,s).\quad |f| \;=\; \sum_{v \in V} f(s,v) \;-\; \sum_{v \in V} f(v,s).

Derivation hint: Total flow leaving ss minus any flow returning to ss; by conservation this equals the net flow into tt.

DefinitionCut and Cut Capacity

An ss-tt cut is a partition (S,T)(S, T) of VV with s∈Ss \in S and t∈Tt \in T (so T=V∖ST = V \setminus S). Its capacity counts only edges crossing forward from SS to TT:

4
c(S,T)  =  ∑u∈S∑v∈Tc(u,v).\quad c(S,T) \;=\; \sum_{u \in S}\sum_{v \in T} c(u,v).

Derivation hint: Backward edges (from TT to SS) contribute nothing to capacity; only the forward-crossing edges constrain throughput. The net flow across the cut is forward minus backward flow:

5
f(S,T)  =  ∑u∈S∑v∈Tf(u,v)  −  ∑u∈S∑v∈Tf(v,u).\quad f(S,T) \;=\; \sum_{u \in S}\sum_{v \in T} f(u,v) \;-\; \sum_{u \in S}\sum_{v \in T} f(v,u).

Derivation hint: Subtract the flow returning across the cut from the flow crossing it; this signed quantity will turn out to equal ∣f∣|f| for every cut.

DefinitionResidual Network

Given a flow ff, the residual capacity is

6
cf(u,v)  =  (c(u,v)−f(u,v))  +  f(v,u).\quad c_f(u,v) \;=\; \big(c(u,v) - f(u,v)\big) \;+\; f(v,u).

Derivation hint: Forward slack c(u,v)−f(u,v)c(u,v)-f(u,v) tells how much more you can push; the term f(v,u)f(v,u) allows you to "cancel" flow already sent backward, modeled as a virtual reverse edge. The residual network Gf=(V,Ef)G_f = (V, E_f) contains every edge (u,v)(u,v) with cf(u,v)>0c_f(u,v) > 0. An augmenting path is a directed s→ts \to t path in GfG_f.

TheoremMax-Flow Min-Cut Theorem (Ford–Fulkerson 1956)

For any flow network (G,c,s,t)(G,c,s,t), the following three statements are equivalent for a flow ff: 1. ff is a maximum flow. 2. The residual network GfG_f contains no augmenting path. 3. ∣f∣=c(S,T)|f| = c(S,T) for some ss-tt cut (S,T)(S,T). Consequently:

7
max⁡f∣f∣  =  min⁡(S,T)c(S,T).\quad \max_{f} |f| \;=\; \min_{(S,T)} c(S,T).

Derivation hint: Weak duality gives ≤\le; the augmenting-path-free condition constructs a cut achieving equality, giving ≥\ge.

Why It Holds

ProofProof of the Max-Flow Min-Cut Theorem

Step 1 — Flow across any cut equals ∣f∣|f|. We claim f(S,T)=∣f∣f(S,T) = |f| for every cut (S,T)(S,T). Sum the conservation equation [2] over all u∈Su \in S. The source ss contributes its net outflow ∣f∣|f| (by [3]), while every internal u∈Su \in S contributes 00. Expanding ∑u∈S(∑vf(u,v)−∑vf(v,u))\sum_{u\in S}\big(\sum_v f(u,v) - \sum_v f(v,u)\big), all terms between two vertices both inside SS cancel pairwise, leaving exactly the net flow from SS to T=V∖ST = V\setminus S. Hence:

8
f(S,T)  =  ∣f∣for every s-t cut (S,T).\quad f(S,T) \;=\; |f| \quad \text{for every } s\text{-}t \text{ cut } (S,T).

Derivation hint: Telescoping cancellation of internal edges; only cut-crossing terms survive, and conservation kills all internal-vertex net flows.

Step 2 — Weak duality. Using [5] and [1], the backward term is ≥0\ge 0 and each forward f(u,v)≤c(u,v)f(u,v) \le c(u,v):

9
∣f∣=f(S,T)≤∑u∈S∑v∈Tf(u,v)≤∑u∈S∑v∈Tc(u,v)=c(S,T).\quad |f| = f(S,T) \le \sum_{u\in S}\sum_{v\in T} f(u,v) \le \sum_{u\in S}\sum_{v\in T} c(u,v) = c(S,T).

Derivation hint: Drop the nonnegative backward term, then bound each forward flow by its capacity. So ∣f∣≤c(S,T)|f| \le c(S,T) for any flow and any cut. Thus max⁡∣f∣≤min⁡c(S,T)\max|f| \le \min c(S,T).

Step 3 — (1)⇒(2). If an augmenting path PP existed in GfG_f, let δ=min⁡(u,v)∈Pcf(u,v)>0\delta = \min_{(u,v)\in P} c_f(u,v) > 0. Pushing δ\delta along PP produces a valid flow of value ∣f∣+δ|f| + \delta, contradicting maximality. So no augmenting path can exist.

Step 4 — (2)⇒(3). Suppose GfG_f has no ss-tt path. Define

S={ v∈V:v reachable from s in Gf },T=V∖S.S = \{\, v \in V : v \text{ reachable from } s \text{ in } G_f \,\}, \qquad T = V \setminus S.

Then s∈Ss \in S and t∈Tt \in T (else tt would be reachable). For every u∈S,v∈Tu \in S, v \in T:

  • The forward edge must be saturated: f(u,v)=c(u,v)f(u,v) = c(u,v), otherwise cf(u,v)>0c_f(u,v) > 0 would make vv reachable.
  • Any backward flow must be zero: f(v,u)=0f(v,u) = 0, otherwise cf(u,v)≥f(v,u)>0c_f(u,v) \ge f(v,u) > 0 again makes vv reachable.

Substituting into [5]:

10
∣f∣=f(S,T)=∑u∈S∑v∈Tc(u,v)−0=c(S,T).\quad |f| = f(S,T) = \sum_{u\in S}\sum_{v\in T} c(u,v) - 0 = c(S,T).

Derivation hint: Saturation of forward edges and absence of backward flow turn inequality [9] into equality.

Step 5 — (3)⇒(1). If ∣f∣=c(S,T)|f| = c(S,T) for some cut, then by weak duality no flow can exceed c(S,T)c(S,T), so ff is maximum and (S,T)(S,T) is minimum. This closes the cycle of equivalences and proves [7]. ■\blacksquare

∎
TheoremIntegrality Theorem

If every capacity c(u,v)c(u,v) is an integer, then there exists a maximum flow ff in which f(u,v)f(u,v) is an integer for every edge.

ProofIntegrality

Run Ford–Fulkerson starting from the zero flow. Each augmentation increases the flow by an integer δ\delta (the residual capacities along the path are integers when capacities and the current flow are integers). The value strictly increases by ≥1\ge 1 each step and is bounded above by c(S,T)<∞c(S,T) < \infty, so the process terminates after finitely many steps with an integral maximum flow. ■\blacksquare

∎
LR
Lester Randolph Ford Jr. & Delbert Ray Fulkerson
1927–2017 / 1924–1976

Working at the RAND Corporation in the mid-1950s, Ford and Fulkerson were motivated by a Cold War problem posed by the U.S. Air Force: how much traffic could the Soviet rail network carry, and where was it most vulnerable to interdiction? The dual question — find the cheapest set of rail links to cut — is the minimum cut. Their 1956 paper "Maximal Flow Through a Network" turned this military logistics puzzle into a foundational theorem of combinatorial optimization. Fulkerson later co-authored the definitive monograph Flows in Networks (1962). The same result was discovered independently and nearly simultaneously by Peter Elias, Amiel Feinstein, and Claude Shannon in an information-theoretic context.

Building Intuition

🧠 Intuition

Think of the network as a system of water pipes. Capacities are pipe diameters; flow is gallons per second. You can never push more water from source to sink than the tightest "wall" of pipes you'd have to sever to fully disconnect them — that wall is the minimum cut. The augmenting-path algorithm is like repeatedly finding any open route from source to sink and cranking up the flow along it. The genius of the residual network is the backward edges: if you over-committed flow on some pipe, a backward residual edge lets a later augmenting path "undo" part of that decision and reroute. This rerouting capability is exactly what guarantees the greedy process reaches the true global optimum rather than getting stuck. When no route remains — even counting these undo-options — the set of pipes you can still reach forms one side of the bottleneck cut.

Figure
A flow network with a minimum cut. Forward edges from SS (left) to TT (right) are saturated; their capacities sum to the max-flow value.
cut (S,T) S side T side s a b c d t a→c: 6 b→d: 5 c(S,T)=6+5=11

Worked Examples

ExampleA Small Network by Hand

Given: Vertices {s,a,b,t}\{s, a, b, t\} with capacities c(s,a)=10c(s,a)=10, c(s,b)=10c(s,b)=10, c(a,b)=2c(a,b)=2, c(a,t)=4c(a,t)=4, c(b,t)=10c(b,t)=10.

Step 1 — Augment along s→a→ts \to a \to t. Bottleneck =min⁡(10,4)=4= \min(10,4) = 4. Push 4. Flow value =4= 4.

Step 2 — Augment along s→b→ts \to b \to t. Bottleneck =min⁡(10,10)=10= \min(10,10) = 10. Push 10. Flow value =14= 14.

Step 3 — Augment along s→a→b→ts \to a \to b \to t. Residual capacities: cf(s,a)=10−4=6c_f(s,a)=10-4=6, cf(a,b)=2c_f(a,b)=2, cf(b,t)=10−10=0c_f(b,t)=10-10=0. The edge b→tb\to t is saturated, so this path is blocked. No other ss-tt path exists in GfG_f (from aa, the only outlet a→ba\to b leads to bb, whose only outlet b→tb\to t is full).

Step 4 — Identify the cut. Reachable from ss in GfG_f: S={s,a,b}S = \{s, a, b\} (we reach bb via a→ba\to b), so T={t}T = \{t\}. Cut capacity =c(a,t)+c(b,t)=4+10=14= c(a,t) + c(b,t) = 4 + 10 = 14.

Answer:

  max⁡∣f∣=14 units,min cut=({s,a,b},{t}) with capacity 14  \boxed{\;\max|f| = 14 \text{ units},\quad \text{min cut} = (\{s,a,b\},\{t\}) \text{ with capacity } 14\;}

Flow equals cut capacity, confirming optimality.

ExampleBipartite Matching via Max-Flow

Given: Three applicants {x1,x2,x3}\{x_1, x_2, x_3\} and three jobs {y1,y2,y3}\{y_1, y_2, y_3\}. Compatible pairs: x1x_1–{y1,y2}\{y_1,y_2\}, x2x_2–{y1}\{y_1\}, x3x_3–{y2,y3}\{y_2,y_3\}. We want the largest possible matching.

Construction: Add source s→xis \to x_i (capacity 1 each), edges xi→yjx_i \to y_j (capacity 1) for each compatible pair, and yj→ty_j \to t (capacity 1 each).

Step 1 — Augment s→x1→y1→ts\to x_1\to y_1\to t. Value 11. Step 2 — Augment s→x3→y2→ts\to x_3\to y_2\to t. Value 22. Step 3 — Augment s→x2→y1→ts\to x_2\to y_1\to t? Edge y1→ty_1\to t saturated. Try s→x2→y1s\to x_2\to y_1, then use backward residual y1→x1y_1 \to x_1 (since f(x1,y1)=1f(x_1,y_1)=1), then x1→y2x_1 \to y_2? But y2→ty_2 \to t is saturated. Dead end. No augmenting path remains.

Step 4 — Verify with min cut. Set S={s,x2,x1,y1}S=\{s,x_2,x_1,y_1\} reachable from ss. Crossing edges: x1→y2x_1\to y_2 (cap 1), s→x3s\to x_3 (cap 1)... computing gives min cut capacity =2= 2.

Answer:

  Maximum matching size=2: {(x1,y1),(x3,y2)}  \boxed{\;\text{Maximum matching size} = 2:\ \{(x_1,y_1),(x_3,y_2)\}\;}

By the integrality theorem the flow is 00/11, so it corresponds to an actual matching — this is König's theorem in disguise.

Common Misconceptions

⚠️ Common mistake

The minimum cut is not unique, but its value is. A network can have several distinct minimum cuts, all with the same capacity. Likewise the maximum flow itself need not be unique — many different flow assignments can achieve the optimal value. Only the value max⁡∣f∣=min⁡c(S,T)\max|f| = \min c(S,T) is invariant.

Cut capacity counts only forward edges. A frequent error is to add edges going from TT back to SS into the cut capacity. By definition [4], backward edges contribute zero to capacity — though their flow is subtracted in the net-flow formula [5].

Ford–Fulkerson with arbitrary path choice may not terminate for irrational capacities. Termination and polynomial running time require care: the Edmonds–Karp refinement (always augment along a shortest augmenting path via BFS) runs in O(VE2)O(VE^2) time and always terminates.

CounterexampleNon-Termination with Irrational Capacities

Ford and Fulkerson exhibited a network with one irrational capacity equal to ϕ=(5−1)/2\phi = (\sqrt 5 - 1)/2 (the golden ratio) on which a poorly chosen sequence of augmenting paths makes the flow value converge to a number strictly less than the true maximum — the algorithm runs forever without reaching optimality. The augmentation amounts form a geometric series in powers of ϕ\phi that sums to a finite value below max⁡∣f∣\max|f|. This shows the bare augmenting-path scheme is not an algorithm unless the path-selection rule is constrained (e.g., shortest path, or capacity scaling). With integer or rational capacities, termination is guaranteed.

Connections

connection

The Max-Flow Min-Cut Theorem is a special case of Linear Programming Duality: max-flow is a linear program, and its dual is exactly the min-cut LP relaxation; strong duality plus integrality of the constraint matrix (total unimodularity) yields the integer min cut. It generalizes <span class="wiki-link-missing">König&#39;s Theorem</span> (max matching = min vertex cover in bipartite graphs) and <span class="wiki-link-missing">Hall&#39;s Marriage Theorem</span> (a perfect matching exists iff every set of vertices has enough neighbors). It is the engine behind <a class="wiki-link" href="/wiki/math-discrete-mengers-theorem">Menger&#39;s Theorem</a> — the maximum number of edge-disjoint ss-tt paths equals the minimum number of edges whose removal disconnects ss from tt. It also relates to <span class="wiki-link-missing">Linear Programming Duality</span> and to <span class="wiki-link-missing">Network Reliability</span>. The minimum-cost variant connects to <span class="wiki-link-missing">Transportation Problem</span> and the <span class="wiki-link-missing">Hungarian Algorithm</span>.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1927 — Karl Menger proves <a class="wiki-link" href="/wiki/math-discrete-mengers-theorem">Menger&#39;s Theorem</a> on disjoint paths and vertex connectivity, a graph-theoretic ancestor of max-flow min-cut.
- 1931 — Dénes König and Jenő Egerváry establish the min-vertex-cover / max-matching duality in bipartite graphs.
- 1951 — George Dantzig formulates the simplex method and studies the transportation problem, providing the linear-programming backdrop.
- 1954 — Ford and Fulkerson begin work at RAND on the Soviet rail interdiction problem.
- 1955 — Independently, T. E. Harris and F. S. Ross (also at RAND) frame the rail-capacity problem; their secret report poses the dual interdiction question.
- 1956 — Ford & Fulkerson publish "Maximal Flow Through a Network," proving the theorem; Elias, Feinstein, and Shannon prove an equivalent result independently the same year.
- 1962 — Ford & Fulkerson's monograph Flows in Networks appears, codifying the field.
- 1969 — A counterexample to Ford–Fulkerson termination on irrational capacities is constructed.
- 1972 — Jack Edmonds and Richard Karp give the first polynomial-time max-flow algorithm (O(VE2)O(VE^2)) using shortest augmenting paths; Dinic independently develops a faster blocking-flow algorithm (1970).

Subtleties & Limits

open-problem

How fast can max-flow be computed? For decades the best general bounds hovered around O(VE)O(VE) (Orlin 2013) and O(V3)O(V^3). A breakthrough in 2022 by Chen, Kyng, Liu, Peng, Probst Gutenberg, and Sachdeva gave an almost-linear-time algorithm running in m1+o(1)m^{1+o(1)} for min-cost flow (and hence max-flow), settling a long-standing question for sparse graphs — though the algorithm is highly intricate and not yet practical. Open questions remain about deterministic almost-linear algorithms, the precise complexity of dynamic (incremental/decremental) max-flow, and tight bounds for parametric and multi-commodity flows. Notably, multi-commodity max-flow min-cut does not satisfy exact duality: with several source-sink pairs, the max total flow can be strictly less than the min cut, with a known O(log⁡k)O(\log k) flow-cut gap — a vibrant area connecting to metric embeddings and approximation algorithms.

See Also

Menger's Theorem · König's Theorem · Linear Programming Duality · Bipartite Matching · Minimum-Cost Flow · Edmonds–Karp Algorithm · Dinic's Algorithm · Hall's Marriage Theorem · Multi-Commodity Flow · Graph Cuts in Computer Vision