Flow Network
Flow f
Residual G_f
Augmenting Path
Directed graph with source s, sink t, non-negative capacities c(u,v) on every edge.
Every edge carries flow \le its capacity; flow in = flow out at every vertex except s and t.
Forward edges = remaining capacity, backward edges = ability to “undo” flow already sent.
An s \to t path in the residual graph; bottleneck = smallest residual capacity on it.
FORD-FULKERSON(G, s, t):
initialize flow f to 0 for all edges
while there exists an augmenting path p in G_f:
cf(p) = min{cf(u,v) : (u,v) in p}
augment f along p by cf(p)
return f
Each augmentation pushes at least 1 unit. Max flow |f^*| is finite. \text{Time} = O(E \cdot |f^*|)
Network: same as L22 example.
Augment s \to a \to t: bottleneck = 3. Flow = 3.
After s \to a \to t (flow = 3), residual graph shows:
Now a \to t is saturated. Augment s \to b \to t: bottleneck = 2. Flow = 3 + 2 = 5.
After both augmentations, G_f shows:
Forward edges (green): s→a (2), a→b (1). Backward edges (red, dashed): undo each unit of flow sent.
No s \to t path exists in G_f. Algorithm terminates. Flow = 5.
After both augmentations, no more s \to t paths in G_f. Flow = 5.
Question: How do we prove this is the maximum? This is where cuts come in.
An s-t cut (S, T) partitions V with s \in S and t \in T.
Sum of capacities of edges crossing from S to T only: c(S, T) = \sum_{u \in S, v \in T} c(u,v) (Edges T \to S do not count.)
Cut (S,T) with S = \{s, a, b\}, T = \{t\}: c(S, T) = c(a \to t) + c(b \to t) = 3 + 2 = 5
For any flow f and any s-t cut (S, T), the net flow across the cut equals |f|: f(S, T) = \sum_{u \in S, v \in T} f(u,v) - \sum_{u \in S, v \in T} f(v,u) = |f|
(Proof follows from flow conservation — all internal flow cancels, leaving only what exits S.)
Net flow w.r.t. a cut S = flow going out of S − flow coming into S.
Augmenting along path p by \Delta:
Since s \in S and t \in T, one more S \to T edge than T \to S on p.
Net outflow change = \Delta = change in |f|.
Why it’s preserved: Whatever flow we reduce on an edge, we add as capacity of a backward edge. So \displaystyle f(S,T) = \sum_{S \to T} f(u,v) - \sum_{T \to S} f(v,u) = |f| holds after every augmentation.
Every flow is bounded by every cut: |f| \le c(S, T)
Proof: |f| = f(S, T) = \sum_{S \to T} f(u,v) - \sum_{T \to S} f(v,u) \le \sum_{S \to T} c(u,v) = c(S, T).
If |f| = c(S, T), then f is a maximum flow and (S, T) is a minimum cut.
For any flow network, the following are equivalent:
When Ford-Fulkerson terminates, G_f has no s \to t path.
Since t \notin S (no augmenting path), (S,T) is a valid s-t cut.
In our example: S = \{s, a, b\}, T = \{t\}.
c(S,T) = \sum_{S \to T} c(u,v) = \sum_{S \to T} f(u,v) = |f|
Therefore c(S,T) equals the max flow value, and (S,T) is a minimum cut.
CS F364: Design & Analysis of AlgorithmsTulasimohan Molli