0
Max Flow
0
Augmentations
โ
Bottleneck
โ
Path Length
Ready
Status
Augmentation Log
Active path search
Augmenting path found
Bottleneck edge
Full (saturated)
Reverse (residual)
Unused capacity
How It Works
Ford-Fulkerson finds the maximum flow from source S to sink T by repeatedly discovering augmenting paths through a residual graph and pushing flow along them.
- Residual graph โ for every forward edge (uโv) with capacity
cand current flowf, we maintain a forward residual edge with remaining capacityc-fand a backward edge with capacityf(allowing "undo"). - Augmenting path โ any path from S to T in the residual graph. The flow pushed equals the minimum residual capacity along the path (bottleneck).
- BFS (Edmonds-Karp) always picks the shortest augmenting path, guaranteeing
O(VEยฒ)time. - DFS (Ford-Fulkerson) picks an arbitrary path, which may be faster in practice but has worse worst-case complexity with irrational capacities.
- The algorithm terminates when no augmenting path exists. By the max-flow min-cut theorem, the result equals the minimum cut capacity separating S from T.