Sub topic 2
The Ford-Fulkerson Method
This chapter assumes you know BFS and DFS and Big-O notation. It also builds on the previous chapter's residual graph and augmenting paths.
The Method
Ford-Fulkerson starts with zero flow everywhere. While the residual graph has a path from s to t, it pushes that path's bottleneck capacity along the path. Pushing flow lowers the forward residual capacities and raises the reverse ones. When no path is left, the algorithm stops.
The method does not say how to choose the path. That choice decides how fast it runs.
Cuts: Upper Bounds on Any Flow
An s-t cut splits the vertices into a set S that contains s and a set T that contains t. The cut's capacity is the sum of the capacities of edges going from S to T. Edges going from T back to S do not count. Every unit of flow must cross from S to T, so no flow can exceed the capacity of any cut.
The Max-Flow Min-Cut Theorem
The theorem says these three statements are equivalent:
- f is a maximum flow.
- The residual graph has no augmenting path.
- The value of f equals the capacity of some cut.
When Ford-Fulkerson stops, let S be the set of vertices reachable from s in the residual graph. Every edge from S to T is saturated, and every edge from T to S carries zero flow. So the flow equals the capacity of that cut. Because no flow can exceed any cut, the flow is maximum and the cut is minimum.
When Ford-Fulkerson Is Slow or Never Stops
With integer capacities, each augmentation adds at least 1, so the method runs in O(E·|f|), where |f| is the max flow value. That bound depends on the capacities, not just the graph size. Take two s-t routes of capacity C that share a middle edge of capacity 1. Bad path choices that keep crossing the middle edge push only 1 unit each time, which takes 2C augmentations. With irrational capacities, some path choices never terminate and can even converge to a value below the maximum.
Edmonds-Karp: Choosing the Shortest Augmenting Path
Edmonds-Karp uses BFS, so it always augments along a path with the fewest edges. Shortest-path distances in the residual graph never decrease, and each edge can be the bottleneck only O(V) times. That gives O(VE) augmentations at O(E) each, for O(VE²) total, no matter how large the capacities are.
Exercise
In the network with edges 0→1 (16), 0→2 (13), 1→3 (12), 2→1 (4), 2→4 (14), 3→2 (9), 3→5 (20), 4→3 (7), 4→5 (4), what is the capacity of the cut S = {0, 1, 2}? Is it a minimum cut, given that the max flow is 23?
Show answer
The edges from S to T are 1→3 (12) and 2→4 (14), for a capacity of 26. Edge 3→2 runs from T to S, so it does not count. Since 26 > 23, this is not a minimum cut.