Explainer

Max-flow min-cut theorem

A proof of the max-flow min-cut theorem using residual reachability, with a concrete flow-and-cut certificate.

On this page

Interactive

Augmenting paths, residual edges, and the minimum cut

Flow network (flow / capacity)

0 / 10 / 10 / 10 / 10 / 1ssourceabtsink
Augmenting pathMinimum cutFlow

Press Augment to find the first augmenting path.

max flow = min cut

Each augmentation pushes one unit along a path in the residual graph. The second path uses the residual edge b → a, cancelling the earlier a → b flow. When no path remains, the reachable set from s defines a minimum cut.

Why flows and cuts meet

A flow describes how much material can be sent from a source to a sink through capacity-limited directed edges. A cut describes a bottleneck separating them. The max-flow min-cut theorem says these two views identify the same limiting quantity.

Let G=(V,E)G=(V,E) be a finite directed network with distinct source ss and sink tt. Every edge ee has a finite, nonnegative capacity cec_e. A feasible flow assigns fef_e to each edge such that

0≤fe≤ce,0\leq f_e\leq c_e,

and total inflow equals total outflow at every vertex other than ss and tt. Its value ∣f∣|f| is the net flow leaving ss, equivalently the net flow entering tt.

An ss–tt cut is a partition V=S∪˙TV=S\mathbin{\dot\cup}T with s∈Ss\in S and t∈Tt\in T. Its capacity counts original edges directed from SS to TT:

c(S,T)=∑e=(u,v)∈E: u∈S, v∈Tce.c(S,T)=\sum_{e=(u,v)\in E:\,u\in S,\ v\in T}c_e.

The theorem states that the largest feasible flow value equals the smallest ss–tt cut capacity.

Every cut bounds every flow

For any feasible flow and cut, sum net outflow over vertices in SS. Internal edges cancel, leaving

∣f∣=∑e=(u,v): u∈S, v∈Tfe−∑e=(u,v): u∈T, v∈Sfe.\begin{aligned} |f| &= \sum_{e=(u,v):\,u\in S,\,v\in T}f_e\\ &\quad-\sum_{e=(u,v):\,u\in T,\,v\in S}f_e. \end{aligned}

The second sum is nonnegative, while each term in the first is at most its edge capacity. Therefore ∣f∣≤c(S,T)|f|\leq c(S,T) for every flow and every cut.

Residual reachability proves equality

A maximum flow exists: the zero flow is feasible, and the feasible flows form a closed, bounded subset of a finite-dimensional space. For each original edge u→vu\to v, its residual graph has a forward arc of capacity ce−fec_e-f_e and a reverse arc of capacity fef_e. The reverse arc represents the option to cancel existing flow on that particular edge.

Let SS be the vertices reachable from ss along positive-capacity residual arcs, and let T=V∖ST=V\setminus S. The sink cannot be in SS: a residual path to tt would have a positive bottleneck, allowing the flow to increase. No positive-capacity residual arc crosses from SS to TT. Thus every original edge from SS to TT is saturated, and every original edge from TT to SS carries zero flow (otherwise its reverse residual arc would cross the cut). The cut identity becomes ∣f∣=c(S,T)|f|=c(S,T). Together with the bound above, this proves that this flow is maximum and this cut is minimum.

A small certificate

Take edges s→as\to a of capacity 3, s→bs\to b of capacity 2, a→ta\to t of capacity 2, a→ba\to b of capacity 1, and b→tb\to t of capacity 3. Send flows 3,2,2,1,33,2,2,1,3 on those edges, respectively. Conservation holds at aa and bb, and the flow value is 5. The cut S={s}S=\{s\}, T={a,b,t}T=\{a,b,t\} has capacity 3+2=53+2=5. Since a flow of value 5 meets a cut of capacity 5, neither can be improved.

Takeaway: a flow is a feasible shipment, a cut is a capacity bottleneck, and residual reachability constructs a cut whose capacity certifies optimality.