On this page
Pipes, roads and data links all have limits. The max-flow min-cut theorem tells you the most you can push through them, and proves nobody can do better.
What is the max-flow min-cut theorem?
A network is a directed graph with a source s, a sink t and a capacity on every edge. A flow puts an amount on each edge, never above its capacity, and every other node passes on exactly what it receives.
An s-t cut splits the nodes into a group S containing s and a group T containing t; its capacity is the sum of the capacities of the edges going from S to T (Wikipedia: Max-flow min-cut theorem). Edges pointing back from T to S do not count.
The theorem: the maximum value of an s-t flow equals the minimum capacity over all s-t cuts (same source).
Every flow must cross every cut, so no flow beats any cut. The surprise is that the smallest cut is reached.
The question came from railways. Ford and Fulkerson's 1956 paper opens with T. Harris's rail network, each link with a capacity, and the task to "find a maximal flow from one given city to the other" (Ford and Fulkerson, Canadian Journal of Mathematics, 1956).
How does the Ford-Fulkerson algorithm find the maximum flow?
It repeats one move: find an s-to-t path with spare capacity on every edge (an augmenting path), push what its tightest edge allows (the bottleneck), and update.
Spare capacity lives in the residual network: an edge u to v with capacity c carrying flow f has c - f left, and a reverse edge v to u gets f, so a later path can cancel an earlier choice (Wikipedia: Ford-Fulkerson algorithm). With whole-number capacities each path adds at least 1, and the flow can never pass the capacity of any cut, so the algorithm must stop.
Take a six-node network with nodes s, a, b, c, d, t and these capacities:
s→a 10, s→b 8, a→b 6
a→c 5, a→d 3, b→d 6
c→t 8, d→t 10
Run it:
Path s→a→c→t. Bottleneck min(10, 5, 8) = 5. Total flow 5.
Path s→a→d→t. Only 5 is left on s→a, so the bottleneck is min(5, 3, 10) = 3. Total flow 8.
Path s→b→d→t. Bottleneck min(8, 6, 7) = 6. Total flow 14.
From s you can still reach a and b, but a→c, a→d and b→d are full. The algorithm stops at 14.
Path order changes which edges carry what, never the total. Start with s→a→b→d→t and a later path must run backwards along a→b, still ending at 14.
How do you find the minimum cut from the maximum flow?
When the algorithm stops, S is every node still reachable from s in the residual network. Here S = {s, a, b} and T = {c, d, t}. The edges from S to T are a→c (5), a→d (3) and b→d (6), so the cut capacity is 5 + 3 + 6 = 14. The cuts around s and t are both 18; the bottleneck is mid-network.
How does max-flow min-cut prove Hall's theorem?
Hall's theorem says that in a bipartite graph with left side L, every left vertex can be matched to a different right vertex if and only if every set A of left vertices has at least as many neighbours, N(A), as members. Our explainer on Hall's marriage theorem with a jobs example shows it at work.
Join a source to each left vertex and each right vertex to a sink, with capacity 1, and direct every left-right edge from left to right. With whole-number capacities, Ford-Fulkerson returns a whole-number flow on every edge, which is a matching of the same size (Erickson, Algorithms, chapter 11).
Now give each left-right edge a capacity larger than |L|, so a minimum cut never cuts one. A cut that includes a left-right edge already costs more than |L|. In any other cut, let A be the left vertices on the source side; every neighbour of A must then sit there too, or a left-right edge would cross the cut. Such a cut pays 1 for each left vertex outside A and 1 for each vertex of N(A), so it is at least |L| - |A| + |N(A)|. If Hall's condition holds, every cut is at least |L|, so the maximum flow is |L|: a matching that covers L.
Hall's theorem belongs to a family with Kőnig's, Menger's and Dilworth's theorems and max-flow min-cut itself, each more straightforward to prove from another than from first principles (Wikipedia: Hall's marriage theorem). One example is Dilworth's theorem with the divisors of 60.
How should you practise it?
Find an augmenting path and push its bottleneck.
Update residual capacities, reverse edges included.
When stuck, shade the nodes reachable from s, add up the edges leaving them and check that the sum equals the flow.
For the ideas underneath, the Fermi Concept Library gives every concept in mathematics and computing its own lesson and its place in the map. If a step does not add up, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.



