Sub topic 7
The Max-Flow Min-Cut Theorem
This chapter assumes you know what a feasible flow and an s-t cut are, and that you have seen the weak bound from the previous chapter: for any flow f and any cut (S, T), the value |f| is at most c(S, T). Here we show that this bound is tight. The largest flow value equals the smallest cut capacity.
The Statement
For a flow f in a network G with source s and sink t, the following three statements are equivalent:
- f is a maximum flow.
- The residual graph G_f contains no augmenting path from s to t.
- |f| = c(S, T) for some s-t cut (S, T).
In particular, the value of a maximum flow equals the capacity of a minimum cut.
The Proof
1 implies 2
Suppose G_f has an augmenting path. Pushing its bottleneck amount along that path gives a feasible flow whose value is larger by that amount. So f was not maximum.
2 implies 3
Let S be the set of vertices reachable from s in G_f, and let T = V − S. Since there is no augmenting path, t is in T, so (S, T) is a valid s-t cut. Look at the edges that cross the cut:
| Original edge | Why it is in this state | Its flow |
|---|---|---|
| u → v with u in S, v in T | If f(u, v) < c(u, v), the residual edge u → v would make v reachable | f(u, v) = c(u, v) |
| v → u with v in T, u in S | If f(v, u) > 0, the reverse residual edge u → v would make v reachable | f(v, u) = 0 |
Net flow across a cut always equals |f|. Here it is the full capacity going out of S minus zero coming back in, so |f| = c(S, T).
3 implies 1
By the weak bound, every flow f′ satisfies |f′| ≤ c(S, T) = |f|. No flow can beat f.
Using the Theorem as a Certificate
The theorem gives you a short proof that a flow is optimal. Exhibit a cut whose capacity equals the flow value, and nobody needs to trust your algorithm. In the example network used throughout this tutorial, the maximum flow is 23. Taking S = {0, 1, 2, 4} gives a cut with exactly that capacity:
capacity = [
[0, 16, 13, 0, 0, 0],
[0, 0, 0, 12, 0, 0],
[0, 4, 0, 0, 14, 0],
[0, 0, 9, 0, 0, 20],
[0, 0, 0, 7, 0, 4],
[0, 0, 0, 0, 0, 0],
]
def cut_capacity(capacity, S):
n = len(capacity)
return sum(capacity[u][v] for u in range(n) for v in range(n)
if u in S and v not in S)
print(cut_capacity(capacity, {0, 1, 2, 4})) # 23: matches the flow, so both are optimalThe edge 3 → 2 goes from T back into S. It adds nothing to the cut capacity, because cut capacity counts only edges from S to T.
Exercise
A network has a flow f with |f| = 10. You find a cut (S, T) with c(S, T) = 12. Can you conclude that f is not maximum? What can you conclude?
Show answer
No. The weak bound only tells you that every flow has value at most 12, so the maximum lies between 10 and 12. A smaller cut may exist. To show f is not maximum, find an augmenting path in G_f. To show it is maximum, find a cut of capacity 10.
Exercise
In the 2 implies 3 step, why must every edge from T to S carry zero flow?
Show answer
If an edge v → u with v in T and u in S carried positive flow, the residual graph would contain the reverse edge u → v with positive capacity. Then v would be reachable from s through u, which contradicts v being in T.