Network Flows and Max-Flow Min-Cut
How much material can you push through a pipeline network per unit time? Each pipe has a limited capacity. This concrete question was first formalized for railway logistics in the 1950s. It turns out to be one of the most productive problems in all of combinatorial optimization. A flow network models the pipeline as a directed graph with capacities on the edges. It has a source producing material and a sink consuming it. The problem asks for the largest amount of flow that can move from source to sink. This flow must never violate any capacity constraint. This problem matters far beyond plumbing. An enormous number of combinatorial questions can be encoded as flow problems. These include bipartite matching, edge- and vertex-connectivity, scheduling with resource constraints, image segmentation, and project selection. The max-flow min-cut theorem is due to Ford and Fulkerson. It was also discovered independently by Elias, Feinstein, and Shannon. It says that the maximum amount of flow you can send equals something specific. That quantity is the minimum "bottleneck" capacity of any cut separating source from sink. This duality is not just elegant. It is algorithmically constructive. It gives rise to the Ford–Fulkerson method and its many refinements. These remain workhorses of combinatorial optimization to this day. The big picture is that flow networks give a unifying language. They unify a family of min-max theorems in combinatorics. Once you have max-flow min-cut, several other results follow. Menger's Theorem on vertex-disjoint paths, König's theorem on bipartite matchings, and Hall's marriage theorem all become corollaries. They are close relatives, obtained by clever choices of capacities. This article builds the theory from the ground up. It offers precise definitions of networks, flows, and cuts. It gives a full proof of weak and strong duality via the Ford–Fulkerson augmenting-path method. It includes worked numerical examples tracing an actual execution of the algorithm. It also discusses why every hypothesis is load-bearing. These hypotheses include integrality, finiteness, and no negative capacities. By the end, you will be able to do several things. You will state and prove the max-flow min-cut theorem from first principles. You will run Ford–Fulkerson by hand on a small network. You will explain precisely why irrational capacities can break naive implementations. You will see how this single theorem seeds an entire research program. This program culminates in Menger's theorem and beyond.
- A flow network is a digraph with nonnegative edge capacities, a source , and a sink .
- A flow obeys capacity constraints and conservation of flow at every vertex except .
- An - cut partitions vertices into a source side and sink side; its capacity is the total capacity of edges crossing from source side to sink side.
- Weak duality: every flow value is at most every cut capacity — flows and cuts bound each other from opposite sides.
- The max-flow min-cut theorem says the maximum flow value exactly equals the minimum cut capacity, with equality certified by the absence of augmenting paths.
- Key idea: pushing flow along augmenting paths in a residual graph until none remain simultaneously finds a maximum flow and exhibits a minimum cut.
Where this lives today
Flow networks underlie bipartite matching algorithms: constructing a unit-capacity bipartite flow network and computing max flow gives the maximum matching size directly, recovering König's theorem and Hall's marriage theorem as special cases. In connectivity theory, setting all capacities to (or to vertex-splitting gadgets) and computing max flow between two vertices computes the maximum number of edge- (or vertex-) disjoint paths between them, which is precisely the content of Menger's Theorem — the natural next theorem in this circle of ideas, connecting flows back to Vertex and Edge Connectivity. In computer vision, min-cut/max-flow algorithms solve binary image segmentation (foreground/background) by modeling pixel similarity as edge capacities, an approach popularized by Boykov and Jolly. In operations research and scheduling, project selection problems with prerequisite and profit structures reduce to min-cut computations (the "closure problem"). In statistical physics, the max-flow min-cut duality is closely related to computing ground states of certain random-field Ising models via graph cuts. In cryptography and network reliability, min-cut values quantify the minimum number of compromised links needed to disconnect a network, directly informing robustness metrics. In circuit design and VLSI routing, flow techniques bound achievable wire routing capacity between terminal regions.
Ask the tutor: How does the max-flow min-cut theorem's proof structure directly yield Menger's theorem on disjoint paths?
A flow network is a tuple where:
- is a finite directed graph (loops and parallel edges disallowed for simplicity, though the theory extends to multigraphs),
- are distinguished vertices called the source and sink, with ,
- is a capacity function assigning a nonnegative real number to each edge.
We extend to all ordered pairs by setting whenever . A flow on is a function satisfying: 1. Capacity constraint: for every . 2. Conservation: for every ,
The value of a flow is
the net flow leaving the source. An - cut is a partition of with and . Its capacity is
the total capacity of edges directed from to (edges from to do not count). A maximum flow is a flow of maximum possible value; a minimum cut is an - cut of minimum possible capacity.
Intuition
Picture the network as a system of one-way pipes, with a pump station and a reservoir. Water flows along edges, each pipe has a maximum throughput given by its capacity, and at every intermediate junction whatever flows in must flow out — no water is created, destroyed, or stored anywhere except at (production) and (consumption). The value of the flow is the total rate at which water leaves the pump. Now imagine trying to sabotage this system by cutting a set of pipes so that no water can possibly get from to . A cut corresponds to grouping junctions into "source side" and "sink side" ; to physically disconnect from you must sever every pipe running from into (pipes running backward from into do not need to be touched, since water is not trying to flow that way). The capacity of the cut is the total bandwidth you must destroy. Intuitively, no flow can ever exceed the capacity of any single cut, because every unit of flow that reaches must, at some point, cross from the -side to the -side of that cut. The深 theorem asserts something stronger and non-obvious: not only is max-flow bounded by every cut, it is achieved by the tightest possible cut — there is no gap.
Key structural device: the residual graph
The proof of the max-flow min-cut theorem is built on the notion of a residual graph, which records how much more flow can still be pushed along, or canceled back along, each edge.
Given a flow network and a flow , the residual capacity of an ordered pair is
The residual graph has vertex set and an edge whenever , with capacity . An augmenting path is a directed path from to in .
The term is the leftover forward capacity on edge ; the term is the amount of flow on the reverse edge that could be "undone" by pushing flow the other way. Both contribute usable residual capacity.
Let be a flow on and let be an augmenting path in with bottleneck capacity
Define by, for each ordered pair on (in the direction traversed by ), decreasing whichever of can absorb the change: formally set
and otherwise split the increment between raising and reducing to so that net flow along increases by exactly ; leave unchanged on pairs not on . Then is a valid flow with .
We must check that satisfies the capacity constraint, conservation, and the value formula.
Capacity constraint. Fix an edge of , traversed from to . By definition of residual capacity, . The update rule increases the net forward flow along by exactly , meaning . Since (rearranging the residual capacity inequality), and since the update only moves mass between and while keeping both nonnegative (the "otherwise" clause specifically caps at before raising further), we get and . All edges off are unchanged, so capacity constraints continue to hold everywhere.
Conservation. Let be an internal vertex of , entered via edge and left via edge (these are consecutive edges of the path , which is a simple path in ). The net inflow to increases by exactly (from the update) and the net outflow from increases by exactly (from the update); all other edges touching are untouched since is a simple path visiting once. Hence conservation at is preserved. For not on , no incident edge is modified, so conservation trivially holds.
Value. The path begins at with some first edge . The net flow leaving along this edge increases by , and no other term in the definition of (flows on edges into or out of not on ) changes, because is simple and passes through only as its starting vertex. Hence .
∎Let be a finite flow network with a finite vertex set and finitely many edges, each with a finite nonnegative capacity, and suppose a maximum flow exists (guaranteed, for instance, whenever the total capacity is finite and either all capacities are rational or the vertex/edge set is finite and capacities are arbitrary reals — see the discussion below). Then:
Moreover, a flow has maximum value if and only if the residual graph contains no augmenting path from to ; in that case, letting be the set of vertices reachable from in and , the cut achieves capacity , hence is a minimum cut.
We proceed in three steps: weak duality (every flow value is at most every cut capacity), the equivalence of flow-maximality with the absence of augmenting paths, and the exhibition of a matching cut when no augmenting path exists. Together these give the theorem. The technique is a direct combinatorial argument together with the augmenting-path (Ford–Fulkerson) construction; no circular appeal to the theorem itself is made anywhere.
Step 1 (Weak duality). Let be any flow and any - cut. We show . By the conservation law, for every ,
and by definition of value, for ,
Summing these equations over all gives
Split each inner sum over (respectively ) into the part inside and the part in . Terms with both endpoints in cancel exactly, since for appears once with a sign (as an inflow to ) and once with a sign (as an outflow from ), for every such pair with ; contributions from do not arise since is not part of the network ( has no loops). What remains is
i.e.
The first sum is over edges from to and is bounded above by since for each such pair; the second sum is a sum of nonnegative quantities () and so is itself nonnegative. Hence
This proves for every flow and every cut , establishing weak duality.
Step 2 (No augmenting path maximum flow). (, contrapositive) Suppose admits an augmenting path in . By the Lemma, there is a flow with for some . Hence is not a maximum flow. () Suppose has no augmenting path, i.e. is not reachable from in . Let be the set of all vertices reachable from in (including itself), and let . Since , this is a valid - cut. We compute . For any and : since is not reachable from while is, the edge cannot be a residual edge — otherwise would be reachable via , contradicting . Hence , i.e.
Since and , and since by the capacity constraint on , the equation together with forces both to be :
That is, every edge from to is saturated (carries flow equal to its capacity), and every edge from to carries zero flow. Now apply the identity derived in Step 1 (which holds for the specific cut , for the specific flow ):
So . Combined with weak duality ( for every cut, in particular for , giving no new information here, but also for every other cut while actually equals one specific cut's capacity), we get: for every cut ,
Hence is a minimum cut, and , having value equal to the capacity of some cut while being the capacity of every cut, cannot be improved — indeed by weak duality no flow can exceed , so is a maximum flow.
Step 3 (Existence and conclusion). By hypothesis a maximum flow exists. By Step 2 applied in the forward direction (contrapositive), admits no augmenting path in — otherwise it would not be maximum. By Step 2 applied in the reverse direction, the reachable set from in yields a cut with , and this cut is a minimum cut. Therefore
proving the theorem. The equivalence " is maximum has no augmenting path" is exactly the content of Step 2.
∎If every capacity is a positive integer, then starting from the zero flow and repeatedly augmenting along any - path in the residual graph (the Ford–Fulkerson method) terminates after finitely many augmentations, at most many, and produces a maximum flow together with a minimum cut.
By induction on the number of augmentations: the zero flow is integer-valued on every edge. If is integer-valued, then every residual capacity is an integer (difference and sum of integers), so the bottleneck of any augmenting path is a positive integer, hence . By the Lemma, each augmentation strictly increases the flow value by an integer , so remains integer-valued and . Since the maximum flow value is finite (bounded above by the capacity of any single cut, e.g. , which is finite as a finite sum of finite capacities), the value can increase at most times before no augmenting path remains. By Max-Flow Min-Cut (Step 2 of the proof above), termination without an augmenting path certifies that the current flow is maximum and yields a matching minimum cut.
∎Worked examples
Example 1: a network with an asymmetric structure and a bottleneck cut. Let have vertices and directed edges with capacities:
Iteration 1. Start with . Residual graph equals itself. Choose augmenting path . Bottleneck . Push : now
Iteration 2. Residual capacities: , (saturated, but reverse edge now exists), , all others unchanged from . Choose path . Bottleneck . Push : now
Iteration 3. Residual capacities now: , , (saturated; reverse ), (reverse ), , , . Try path : capacities along it are ; bottleneck . Push : update
Iteration 4. Residual capacities: , , (net so far , capacity ), (saturated; reverse ), still (reverse ), , (reverse ). Is there still an augmenting path? From we can reach (via ) and (via and via ). From , edges available: (), reverse nothing else new. From : is saturated (0), but is there ? No, saturated. Reverse edges from : ? That would require , and indeed so — but is already reached, no new information. From (not yet reached): can we reach ? Only via (saturated) or reverse of , i.e. edge which goes from , not to — irrelevant for reaching . Also reverse of doesn't help reach from . So is unreachable, hence is unreachable (all paths to pass through or through the saturated ). So , . Compute : edges from to are (capacity ) and (capacity ); note also crosses ( to ), capacity . Total:
This matches exactly, confirming by the theorem that is maximum and is a minimum cut. The bottleneck of the whole network is the combined capacity out of , namely , even though individual edges like or look larger in isolation — the theorem correctly identifies the global obstruction, not any single edge.
Example 2: using a residual back-edge to correct an earlier greedy choice. Take vertices with edges
Iteration 1. Greedily augment along with bottleneck . Set , . Iteration 2. Augment along , bottleneck . Set , . Iteration 3. Residual graph: , , (untouched), (saturated; reverse ), (saturated; reverse ). Also reverse residuals , exist but point the wrong way for reaching . Path attempt: ? Edge has residual capacity . From , forward to is saturated (residual ). From , is there anywhere else? (reverse of ) doesn't help. So this branch dead-ends at without reaching . Check all reachability from carefully: (residual 6), (residual 1), (residual 2). So reachable set is . From : only available (since saturated). From : nothing forward-usable reaches (saturated), and is not useful. So is unreachable: , .
Max flow is , matching the min cut exactly, and note the edge (capacity ) was never used in the final flow, illustrating that not every edge need carry flow in an optimal solution — its potential role was superseded once and were both saturated directly from .
The theorem's guarantee that some maximum flow exists, and the corollary's proof of termination, both use finiteness/integrality in an essential way. Here is a classical example (due to Ford and Fulkerson) showing that with real-valued capacities, a poorly chosen sequence of augmenting paths in Ford–Fulkerson can fail to terminate and even converge to a value that is not the maximum flow — so the algorithm (not the theorem's existence statement) needs care. Consider a network with vertices and internal vertices arranged so that there are two parallel "chains" from to crossed by two edges of capacity , and all other capacities set to a very large integer , except one designed edge whose capacity is
an irrational number satisfying . By choosing augmenting paths adversarially — always picking the path that uses the small crossing edges rather than the direct high-capacity edges — one can force the sequence of augmentations to follow the recursion (or a similar contracting recursion), so that the bottleneck amounts but converges to a value strictly less than the true maximum flow value determined by the min cut. The algorithm runs forever, the flow value increases at every step (so naive "does the value increase?" monitoring gives no red flag), yet it never reaches, and does not even have a limit equal to, the true max flow. This shows precisely why the hypothesis of rational (or integer) capacities, or more generally a path-selection rule guaranteeing progress (such as always choosing a shortest augmenting path or a maximum-bottleneck path, as in the Edmonds–Karp refinement), is needed for the Ford–Fulkerson method to terminate correctly. The max-flow min-cut theorem itself remains true for arbitrary nonnegative real capacities on a finite graph (existence of a maximizer follows from compactness of the polytope of feasible flows and continuity of the value functional), but the naive augmenting-path algorithm, without a smarter path-selection rule, can fail to compute it.
Scope, edge cases & common traps
| Situation | What happens |
|---|---|
| Integer capacities | Ford–Fulkerson terminates in at most augmentations; flow found is integral (integrality theorem). |
| Rational capacities | Clear denominators by scaling; reduces to the integer case, so termination is guaranteed. |
| Arbitrary real capacities, naive path choice | Max flow still exists and equals min cut (by compactness), but Ford–Fulkerson may fail to terminate or converge to the wrong value; use Edmonds–Karp (BFS shortest augmenting path) instead, which always terminates in augmentations. |
| Multiple sources/sinks | Reduce to single source/sink by adding a super-source and super-sink with infinite-capacity edges to each original source/sink. |
| Undirected edges | Replace each undirected edge of capacity by two opposite directed edges each of capacity (careful: this does not simply double capacity, since flow can use at most one direction's worth net). |
| Vertex capacities | Split each capacitated vertex into with an edge of that capacity, to reduce to edge capacities. |
The mathematician behind it
Origins · 1 minLester Randolph Ford Jr. and how this was discovered
Ford, together with Delbert Ray Fulkerson, developed the theory of network flows at the RAND Corporation in the 1950s, originally motivated by a classified study of Soviet railway capacity commissioned to identify bottleneck links. Their 1956 paper and subsequent 1962 book Flows in Networks established the max-flow min-cut theorem, the augmenting path method, and much of the vocabulary (cuts, residual capacity) still used today. Ford also co-developed the Bellman–Ford shortest path algorithm and made contributions to combinatorics and the theory of Markov chains.
Does the max-flow min-cut theorem require the graph to have no cycles?
No. The theorem holds for arbitrary finite directed graphs, including those with directed cycles. Conservation of flow at internal vertices is a local balance condition and places no restriction on the global cycle structure of . In fact, an optimal flow can circulate flow around a cycle with no effect on the value (though such "wasted" circulation is never needed for an optimal solution and can always be removed without decreasing the value, by a standard flow-decomposition argument). The theorem's proof, based on reachability in the residual graph, works identically whether or not is acyclic.
Can capacities be zero on some edges, and does that cause problems?
Zero-capacity edges are permitted by the definition and cause no issues: such an edge simply can never carry flow (since forces ), so it behaves as if absent from the graph for the purposes of computing max flow. It is often convenient, in fact, to define for all pairs not in , precisely so that the capacity function is total on and formulas like make sense without case analysis on which pairs are edges.
Is the maximum flow itself unique?
No, in general there can be many different maximum flows achieving the same optimal value, and Example 1 above touches on this: different augmenting path choices can route flow differently among edges while achieving the same total value. What the theorem guarantees is a unique optimal value, not a unique optimal flow function. Uniqueness of the flow itself typically requires additional structural assumptions (e.g., a network that is "series-parallel" with no alternative routing) and is not part of the standard theorem statement.
How does this relate to bipartite matching?
Given a bipartite graph with parts , build a flow network with source connected to every vertex of by capacity- edges, sink connected from every vertex of by capacity- edges, and each original edge of the bipartite graph given capacity directed from to . Because all capacities are , the integrality corollary guarantees an integral maximum flow, and such an integral flow of value corresponds exactly to a matching of size (each unit of flow traces out one matched pair). The max-flow min-cut theorem then shows the maximum matching size equals a minimum vertex cover size in the bipartite case, recovering König's theorem.
What is the difference between Ford–Fulkerson and Edmonds–Karp?
Ford–Fulkerson is a method: repeatedly augment along any - path in the residual graph until none exists. It is correct (terminates with a maximum flow) whenever capacities are integers or rationals, but the number of augmentations, and hence the running time, can depend badly on the specific path choices and on the capacity values, as the counterexample in this article illustrates. Edmonds–Karp is a specific implementation of Ford–Fulkerson that always chooses a shortest augmenting path (fewest edges), found via breadth-first search in the residual graph; this guarantees termination in augmentations regardless of capacity values, giving overall running time , and works even for irrational capacities.
Does the theorem extend to networks with multiple sources and sinks?
Yes, via a standard reduction. Introduce a super-source with an edge of infinite (or sufficiently large finite) capacity to each original source, and a super-sink with an edge of infinite capacity from each original sink. A maximum - flow in this augmented network corresponds exactly to a maximum total flow across all source-sink pairs in the original multi-terminal network, and the max-flow min-cut theorem applies directly to the augmented network, giving a min-cut characterization of the multi-source, multi-sink bottleneck as well.
Why is this theorem considered foundational rather than just a clever algorithmic trick?
Because it is a genuine combinatorial duality theorem: it asserts an exact equality between a maximization problem (largest flow) and a minimization problem (smallest cut) with no gap between them, a phenomenon called strong duality that is far from automatic in optimization (linear programming duality is the general machinery behind it, with max-flow min-cut as the integral special case). This duality pattern reappears throughout combinatorics — in Menger's theorem, König's theorem, Hall's theorem, and Dilworth's theorem — making max-flow min-cut a template for an entire family of "min-max" results, not merely an algorithm for pipeline scheduling.