Imagine water flowing through a network of pipes. Each pipe has a limited capacity, and you want to pump as much water as possible from a source to a sink. This is the maximum-flow problem, and it sits at the heart of logistics, chip design, image segmentation, and a dozen other fields.
The earliest algorithms — Ford–Fulkerson (1956) and Edmonds–Karp (1972) — found augmenting paths one at a time. They work, but they can be slow: Ford–Fulkerson can take a number of steps proportional to the total flow value, which may be enormous.
In 1970, a Soviet undergraduate named Yefim Dinic published a two-stage idea that changed everything. Instead of hunting for one path at a time, his algorithm first layers the entire graph with a BFS (producing a level graph where every edge strictly goes one level deeper), then floods that level graph all at once with a single blocking flow pass. Repeat until no more layering is possible — and the maximum flow is in hand.
The result: a provably algorithm, where V is the number of vertices and E the number of edges. In practice it is often much faster, and on unit-capacity graphs it drops to a remarkable . It remains one of the most elegant examples of "structure the problem first, then solve" in all of algorithmics — a principle you will also meet in P vs NP when researchers study what makes problems tractable.
Comments
Loading comments...