Why it matters

Edmonds-Karp is standard Ford-Fulkerson variant. Understanding shapes max-flow.

Advertisement

The architecture

Find shortest s-t augmenting path via BFS.

Augment min bottleneck.

Repeat until no path.

Edmonds-Karp flowBFSshortest pathAugmentmin bottleneckUpdate residualreverse edgesBFS ensures polynomial; O(VE) augmentations; O(E) per BFS = O(VE^2)
Edmonds-Karp.
Advertisement

How it works end to end

BFS: O(E) per iteration.

Augmentations: O(VE).

Total: O(VE^2).

Dinic's improves to O(V^2 E).