Max-Flow Min-Cut Theorem
Imagine a water-supply network: pipes of fixed capacity connect a source reservoir to a destination city through a maze of junctions. A natural question is twofold. How much water can possibly flow from source to sink per unit time? Separately, consider an adversary who wants to shut off the supply entirely. If they sealed the fewest gallons-per-minute worth of pipes, how much sealing capacity would that take? These sound like different problems. One is a maximization over flow patterns. The other is a minimization over ways to disconnect the graph. The Max-Flow Min-Cut Theorem reveals that they are the same number. This equivalence is not a curiosity. It is the load-bearing wall of an enormous part of combinatorial optimization. It converts a max-flow computation into a certificate of optimality. Once you exhibit a flow and a cut of matching value, you know instantly that the flow is maximum. You also know, without further argument, that the cut is minimum. That certificate structure is what makes flow algorithms trustworthy building blocks. They are used in compilers, network reliability analysis, image segmentation, airline scheduling. Most famously, they appear in Bipartite Matching via Augmenting Paths. There, a maximum matching is extracted directly from a maximum flow. The theorem also explains why the Ford-Fulkerson Method terminates correctly. When no augmenting path exists in the residual graph, something important happens. The set of nodes still reachable from the source forms a cut. That cut's capacity exactly equals the current flow value. That reachability set is not a side observation. It is the proof. Understanding this connection changes how we see Ford-Fulkerson. It turns from "a greedy heuristic that happens to work" into something more. It becomes an algorithm with an ironclad termination and optimality argument. This article develops the theorem precisely. It covers what a flow network and an s-t cut are. It explains why flow value is always bounded above by cut capacity (weak duality). Then it presents the three-way characterization: maximum flow, no augmenting path, and minimum cut equality. Together these close the loop into a full "if and only if" statement. The article also includes a worked numerical trace. It also covers the classic pitfalls in applying it.
- An s-t cut partitions vertices into sets and ; its capacity is the sum of capacities of edges crossing from to .
- Weak duality: any flow's value is always the capacity of any cut — flow is bounded above by every cut, always.
- Strong duality (the theorem): the maximum flow value equals the minimum cut capacity — the bound is always achievable exactly.
- Three-way equivalence: a flow is maximum its residual graph has no augmenting path some cut has capacity equal to 's value.
- The minimum cut is read off for free from the residual graph at termination: = vertices reachable from , = the rest.
- This duality underlies correctness proofs for Ford-Fulkerson/Edmonds-Karp and powers reductions such as Bipartite Matching via Augmenting Paths and min-cut segmentation.
The maximum amount of flow a network can carry from source to sink is exactly equal to the minimum total capacity of edges whose removal disconnects the source from the sink.
The idea
A flow network is a directed graph with a nonnegative capacity on each edge, a source , and a sink (assume no edges enter or leave , without loss of generality). A flow is a function satisfying capacity constraints () and flow conservation (inflow equals outflow at every vertex except and ). The value of a flow is the net flow leaving the source, . An s-t cut is a partition of into two sets and with and . The capacity of the cut is
summing capacities only in the direction from to — edges from back into do not count, even though they exist in the graph. This asymmetry is essential: a cut is meant to bound flow that must cross the boundary going "forward," and reverse-direction capacity does nothing to prevent that. The central claim connecting these two objects has two halves. Weak duality says every flow value is at most every cut capacity — this direction is a simple accounting argument and holds unconditionally. Strong duality, the Max-Flow Min-Cut Theorem proper, says that equality is always attainable: there exists some flow and some cut whose numbers coincide, and that common value is simultaneously the maximum flow and the minimum cut. The proof of strong duality is where the real content lives, and it comes packaged with a residual graph — the same structure used to run Ford-Fulkerson Method — which supplies both the augmenting-path termination condition and the minimum cut itself, in one stroke.
How it works
Weak duality, precisely
Claim. For any flow and any s-t cut , .
Argument. By conservation, the flow value equals the net flow crossing the cut in either direction:
This holds because summing conservation at every vertex in telescopes internal-to- terms to zero, leaving exactly the boundary terms (a standard "flow across a cut" identity). Each term , and each subtracted term is nonnegative, so
This holds for every flow and every cut, immediately giving: . The theorem's content is that this inequality is actually equality.
The residual graph and augmenting paths
For a flow , the residual graph has, for each edge , a forward residual edge with capacity (if positive), and a backward residual edge with capacity (if positive) representing the ability to cancel existing flow. An augmenting path is any path in using only positive-residual-capacity edges; pushing flow equal to the path's bottleneck capacity along it strictly increases .
The three-way characterization
Theorem. Let be a flow in network . The following are equivalent: 1. is a maximum flow in . 2. The residual graph contains no augmenting path from to . 3. for some s-t cut .
Proof sketch. (1) (2). If an augmenting path existed, we could push additional flow along it and strictly increase , contradicting maximality. (2) (3). Suppose has no augmenting path. Let be the set of vertices reachable from in , and . Since there is no path to , , so is a valid s-t cut. Now examine any edge with , : since is unreachable from but is reachable, the residual edge cannot exist in (else would be reachable too) — so , meaning (the forward edge is saturated). Symmetrically, for any edge with , the residual backward edge cannot exist either, forcing (no flow enters from ). Plugging both facts into the flow-across-a-cut identity:
(3) (1). By weak duality, for every cut, in particular this one, so . But we're given exactly, and every other flow satisfies . Hence is maximum. Chaining these three implications closes the cycle , proving all three equivalent — and, as a byproduct, proving strong duality: the maximum flow value equals the capacity of the specific cut constructed in step (2), which must therefore be a minimum cut (any smaller cut would violate weak duality against this flow).
Algorithm: extracting flow and cut together
``` FORD-FULKERSON-WITH-CUT(G, s, t, c): for each edge (u, v) in G: f(u, v) <- 0 build residual graph G_f from f and c while there exists a path P from s to t in G_f (using edges with positive residual capacity): b <- min residual capacity along P // bottleneck for each edge (u, v) in P: if (u, v) is a forward edge in G: f(u, v) <- f(u, v) + b else // (u,v) is a backward residual edge, f(v, u) <- f(v, u) - b // meaning true edge is (v,u) update G_f accordingly // No augmenting path remains: extract the minimum cut for free S <- { v in V : v is reachable from s in G_f } // via BFS/DFS T <- V \ S return f, (S, T) ``` The loop is exactly Ford-Fulkerson; the only addition is the final reachability pass, which is what the proof of constructs explicitly. Running BFS instead of arbitrary path search gives Edmonds–Karp, with the same cut-extraction step appended unchanged.
Complexity & correctness
Correctness is exactly the three-way equivalence proved above: the algorithm halts precisely when no augmenting path exists, at which point condition (2) holds, forcing conditions (1) and (3) — the current flow is simultaneously maximum, and the reachable-set partition is simultaneously a minimum cut. No separate correctness argument is needed for "why does the cut we output actually have minimum capacity" — it falls out of the same reachability computation used to detect termination. This is the theorem's real payoff: optimality is self-certifying, not something requiring an external check against all other cuts.
Time complexity depends on the augmenting-path strategy layered on top of this framework, since the theorem itself is strategy-agnostic:
- Generic Ford-Fulkerson (arbitrary augmenting path, integer capacities): each augmentation increases by at least , so the loop runs at most times (the max-flow value), each augmentation costing to find a path via BFS/DFS and to update it — total . This is pseudo-polynomial: with capacities in the billions, can be astronomically larger than or , and a poorly chosen sequence of paths can genuinely realize this slowdown.
- Edmonds–Karp (always augment along a shortest path, by edge count, found via BFS): guarantees augmentations, each costing , for total — genuinely polynomial, independent of capacity magnitudes.
- The final cut-extraction step (one BFS/DFS over ) costs and is performed once, so it never dominates the asymptotic bound.
Space complexity is : the residual graph mirrors the original graph's structure with at most a constant-factor blowup (one reverse edge per original edge), and the flow values themselves are stored per edge.
Honest tradeoffs. The theorem guarantees the existence of a matching flow/cut pair and gives a clean stopping condition, but says nothing about how fast you reach that state — that is entirely the job of the augmenting-path selection rule. The theorem also assumes finite capacities (or requires care with infinite-capacity edges) and, in its basic form, real- or integer-valued capacities; with irrational capacities and poorly chosen augmenting paths, Ford-Fulkerson can in principle fail to converge at all, though this pathology does not arise under Edmonds–Karp or with integer capacities. Finally, the minimum cut produced is a minimum cut — networks can have multiple cuts of equal minimum capacity, and the algorithm returns whichever one corresponds to the specific terminal residual graph reached.
Worked example
Consider a small network: source , sink , and intermediate vertices . Edges and capacities: , , , , .
| Step | Augmenting path found | Bottleneck | Flow value after | Residual graph notes |
|---|---|---|---|---|
| 0 | — (initial, ) | — | 0 | all forward edges at full residual capacity |
| 1 | 2 | residual now ; residual now (saturated); backward edges (2), (2) appear | ||
| 2 | 4 | saturated; residual now ; backward edges (2), (2) appear | ||
| 3 | 5 | now saturated; saturated; now saturated | ||
| 4 | search for augmenting path in | none found | 5 | terminate |
At termination, run BFS from in . Remaining forward residual edges: none out of (both and are saturated, residual ); the only edges out of in would be backward edges into , which don't count as outgoing. So exactly — no vertex is reachable — and . Compute the cut capacity : sum capacities of edges from to . These are (capacity 3) and (capacity 2), giving
This matches exactly, confirming via condition (3) that is maximum and is a minimum cut — no further search over other partitions is needed. Notice this is not the visually "obvious" bottleneck (one might have guessed the edge, capacity , matters more than it does); the theorem's certificate removes any doubt about which cut is truly binding.
Common pitfalls & traps
| Pitfall | Why it happens | Fix |
|---|---|---|
| Forgetting reverse residual edges | Treating residual graph as a simple copy of with reduced capacities | Always add a backward edge of capacity for every unit of flow sent — it lets the algorithm "undo" bad early choices |
| Summing capacity in both directions for a cut | Confusing an undirected cut in general graphs with a directed s-t cut | Only count edges strictly from to ; edges from to contribute zero to |
| Assuming any terminal residual graph gives the unique min cut | Multiple minimum cuts can coexist when several bottlenecks tie | State clearly that the algorithm returns a minimum cut, and note ties are possible |
| Using DFS/arbitrary paths and expecting polynomial time on huge capacities | Confusing "terminates" with "terminates quickly" — pseudo-polynomial vs. polynomial bounds | Use Edmonds–Karp (BFS shortest augmenting paths) or scaling algorithms for guaranteed polynomial behavior |
| Ignoring parallel edges or self-loops when building | Naive implementations overwrite residual capacities when merging edges | Track capacities per directed edge pair carefully, or merge parallel edges into one with summed capacity before running |
Pioneers & history
The theorem emerged from RAND Corporation research into Cold War-era logistics and transportation-network planning, where the practical question was literally about rail and pipeline capacities under adversarial interdiction.
Origins · 1 minLester Randolph Ford Jr. and how this was discovered
Ford, working with Delbert Fulkerson, formalized the flow network model and the augmenting-path method, publishing the algorithm that bears their names and, alongside it, the proof that maximum flow equals minimum cut — turning a military logistics question into one of the foundational theorems of combinatorial optimization.
Where this matters
Network reliability engineers use min-cut computations to find the cheapest set of links whose failure would partition a communication or power network — directly reporting the min-cut capacity as the "weakest link" bandwidth of the whole system. Compiler and hardware design tools use flow-based min-cut algorithms for register allocation and circuit partitioning, where the cut corresponds to wires or variables that must cross a physical or logical boundary. Computer vision systems use min-cut/max-flow formulations for image segmentation, treating pixel similarity as edge capacity and separating foreground from background via a minimum boundary cut. Airline and logistics scheduling systems model crew and aircraft assignment as flow problems, where max-flow answers "can this schedule be covered" and min-cut identifies the exact bottleneck resource. Most directly, the theorem is the correctness backbone for Bipartite Matching via Augmenting Paths: casting bipartite matching as a unit-capacity flow problem, the max-flow min-cut equivalence guarantees that the maximum matching size equals the flow value found by augmenting paths, with König's theorem on minimum vertex covers falling out as a direct corollary of the minimum cut structure.
Ask the tutor: How does the choice of augmenting path (arbitrary vs. shortest vs. max-bottleneck) affect which minimum cut the algorithm ultimately reports?
Is the minimum cut always unique?
No. Multiple distinct partitions can share the same minimum capacity, especially in networks with symmetric or repeated bottleneck structures. The algorithm described here returns one specific minimum cut — the one determined by reachability in the particular residual graph reached when augmenting paths run out. If a different sequence of augmenting paths were chosen, the algorithm could terminate at a different maximum flow (flow decompositions aren't always unique either) and hence potentially report a different, equally valid, minimum cut. Uniqueness of the value is guaranteed by the theorem; uniqueness of the partition is not.
Does the theorem require integer capacities?
No — the theorem holds for real-valued, nonnegative capacities in general. What integer capacities buy you is a clean termination and complexity argument for basic Ford-Fulkerson: since each augmentation increases the flow by an integer amount, and the maximum flow is bounded, the number of augmentations is finite and bounded by the max-flow value. With real-valued capacities and adversarial path choices, generic Ford-Fulkerson can, in pathological constructed examples, fail to converge to the optimum or converge arbitrarily slowly. Algorithms like Edmonds–Karp sidestep this entirely by choosing shortest augmenting paths, guaranteeing polynomial-time convergence regardless of whether capacities are integers or reals.
How does this theorem relate to linear programming duality?
Max-flow is naturally expressible as a linear program: maximize flow value subject to capacity and conservation constraints. Min-cut corresponds to the dual linear program of that formulation. The Max-Flow Min-Cut Theorem is then a special, combinatorially cleaner instance of the general LP Strong Duality Theorem, which states that a linear program's optimal value equals its dual's optimal value whenever both are feasible and bounded. What makes max-flow special is that the dual variables can be shown to correspond exactly to a 0/1 indicator of the cut partition, so the abstract LP duality gap collapses into a concrete graph-theoretic statement about disconnecting edges.
What happens if the network has directed cycles or multiple edges between the same pair of vertices?
The theorem and the algorithm both handle these gracefully with minor bookkeeping. Directed cycles cause no conceptual issue: conservation still holds at every vertex, and augmenting paths simply may pass through cycle vertices without using the cyclic edges unless useful. Parallel edges between the same ordered pair should be merged into a single edge with capacity equal to the sum (or tracked separately with care in the residual graph construction) to avoid double-counting or capacity-update bugs. Antiparallel edges — an edge and a separate edge — require slightly careful residual-graph bookkeeping since a naive implementation might conflate a "real" edge with the "residual" reverse edge of the opposite one; splitting each real edge with an intermediate vertex is a standard, safe fix.
Can the theorem fail if there are infinite-capacity edges, such as unlimited-bandwidth links?
As long as some finite s-t cut exists — that is, the max flow value is finite — the theorem still holds cleanly, and infinite-capacity edges simply never appear in the minimum cut (since including them would make the cut capacity infinite, never minimal). Problems only arise if every s-t cut has infinite capacity, meaning there's no way to disconnect from with finite total capacity; in that degenerate case, the maximum flow is unbounded (infinite), and "minimum cut" is not a meaningful finite quantity. Well-posed modeling should avoid this by ensuring at least one finite cut exists, which is true for any network where source out-capacity or sink in-capacity is itself bounded.
How is the theorem used to prove König's theorem for bipartite matching?
Casting bipartite matching as a flow problem — source connected to one side, sink from the other, unit capacities throughout — makes max-flow equal max-matching by the integrality of flow values on unit-capacity networks (each augmenting path corresponds to an alternating path augmenting the matching by exactly one edge). The minimum cut in this construction corresponds exactly to a minimum vertex cover: vertices whose separating edges are cut. Because max-flow equals min-cut by this theorem, maximum matching size equals minimum vertex cover size in bipartite graphs — precisely König's theorem, obtained as a direct corollary rather than requiring separate combinatorial proof. This is the seed idea developed fully in Bipartite Matching via Augmenting Paths.
Why is the reverse-direction capacity excluded from a cut's definition?
A cut is meant to model "how much flow-carrying capacity must be crossed to get water from 's side to 's side." Only forward-direction edges (from into ) can carry flow that direction; an edge running the opposite way, from back into , contributes nothing to pushing flow toward and, if anything, could only carry flow the "wrong" way. Including it in the capacity sum would overstate how much interdiction is needed to fully disconnect from , breaking the tight equality with maximum flow — weak duality would still hold (the bound would just be looser and no longer achievable), but strong duality, the actual theorem, requires this precise, direction-sensitive definition.