Home▸Algorithms & AI▸Maximum Flow in a Pipe Network: Dinic Level Graph, Blocking Flow and Minimum Cut

Maximum Flow in a Pipe Network: Dinic Level Graph, Blocking Flow and Minimum Cut

A reservoir feeds a sink tower through a random network of tanks and pipes, each pipe with its own capacity. Watch Dinic's algorithm number the tanks by distance, push a blocking flow along shortest paths and repeat until no path is left, then see that the full pipes form the minimum cut with exactly the same capacity. Switch to Edmonds-Karp or plain depth-first Ford-Fulkerson to compare how many augmentations each needs. Verified against brute-force enumeration of every cut, flow conservation, agreement of the three algorithms, bipartite matching and the strictly increasing phase distance. A Blender-built reservoir, tanks, valves and water tower in 3D.

Algorithms & AI3DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 2D version
Maximum Flow in a Pipe Network: Dinic Level Graph, Blocking Flow and Minimum Cut ↗ Open standalone

A reservoir feeds a sink tower through a random network of tanks and pipes, each pipe with its own capacity. Watch Dinic's algorithm number the tanks by distance, push a blocking flow along shortest paths and repeat until no path is left, then see that the full pipes form the minimum cut with exactly the same capacity. Switch to Edmonds-Karp or plain depth-first Ford-Fulkerson to compare how many augmentations each needs. Verified against brute-force enumeration of every cut, flow conservation, agreement of the three algorithms, bipartite matching and the strictly increasing phase distance. A Blender-built reservoir, tanks, valves and water tower in 3D.

⚙ Under the hood

A reservoir feeds a sink tower through a random network of tanks and pipes, each pipe with its own capacity. Watch Dinic's algorithm number the tanks by distance, push a blocking flow along shortest paths and repeat until no path is left, then see that the full pipes form the minimum cut with exactly the same capacity. Switch to Edmonds-Karp or plain depth-first Ford-Fulkerson to compare how many augmentations each needs. Verified against brute-force enumeration of every cut, flow conservation, agreement of the three algorithms, bipartite matching and the strictly increasing phase distance. A Blender-built reservoir, tanks, valves and water tower in 3D.

Maximum FlowDinic AlgorithmMinimum CutNetwork FlowGraph AlgorithmsEdmonds-Karp

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)