Back to all solvers
Maximum Flow Solver
Compute max flow with Edmonds–Karp (BFS augmenting paths) and report a corresponding min-cut.
Capacity network
| →1 | →2 | →3 | →4 | |
|---|---|---|---|---|
| 1→ | — | |||
| 2→ | — | |||
| 3→ | — | |||
| 4→ | — |
CSV: source/sink (1-based) key-value rows, then capacity matrix (0 = no arc). After Solve, also Export results CSV.
Max-flow / min-cut
In a directed network with edge capacities, the maximum flow from source s to sink t equals the capacity of the minimum s–t cut (Ford–Fulkerson theorem).
Edmonds–Karp
Repeatedly find a shortest (BFS) augmenting path in the residual graph, push the bottleneck capacity, update residuals, until no path remains.
Complexity O(V E²) with unit-length BFS augmentations
Applications
Pipeline capacity, bipartite matching via flow networks, project selection, circulation with demands, and cut-based bottlenecks in logistics.
Classic 4-node network. Max flow from node 1 to 4 equals 15.
Frequently Asked Questions
Forward residual = leftover capacity; backward residual = flow that can be canceled. Augmenting paths may use reverse edges.