AlgoScope

Edmonds-Karp

AlgorithmadvancedNetwork Flow

Ford-Fulkerson with BFS, so each path is shortest; O(V E^2) regardless of capacities.

Decision · step 2 of 9Maximum Flow: Edmonds-Karp, shortest paths first
0/100/80/20/50/100/30/70/10012345

BFS finds the shortest augmenting path 0 > 1 > 3 > 5, residual capacities 10, 5, 7. The bottleneck is 5.

Open in the player →or start at step 2

What you will see

BFS finds the fewest-edge path each round.

How maximum flow works →

Cost

BestO(E)
AverageO(V * E^2)
WorstO(V * E^2)
SpaceO(V + E)

How you work with it here

play it through, step one change at a time, scrub to any step, run it on your own input.

Screen readers: Edges announce capacity, flow and residual; each step announces the augmenting path and bottleneck.

Reduced motion: Flow labels update with a crossfade; the augmenting path is emphasized statically.

A variant of

Leads to

Topics that need this one first.

Taught by the same lesson

Maximum Flow covers these too, in the same run.