Network Flow: Max Flow Min Cut Theorem Explained

simulator advanced ~12 min
Loading simulation...
Max-flow min-cut theorem: the maximum flow equals the capacity of the minimum cut.

The Ford-Fulkerson method repeatedly finds augmenting paths from source to sink in the residual graph, increasing flow until no more augmenting paths exist. The max-flow min-cut theorem guarantees this maximum flow equals the minimum cut capacity.

Formula

max flow(s, t) = min cut(S, T) — max-flow min-cut theorem
T(V, E) = O(V × E²) — Edmonds-Karp algorithm complexity

Flow Networks and Bottlenecks

A flow network models any system where something moves through a graph with capacity constraints: water in pipes, data in internet links, cars on highways, goods through supply chains. Each directed edge has a capacity — the maximum flow it can carry. The central question is: what is the maximum total flow from a designated source to a designated sink? This deceptively simple question spawned one of the most beautiful results in combinatorial optimization.

The Ford-Fulkerson Method

Published in 1956, the Ford-Fulkerson method finds maximum flow by repeatedly searching for augmenting paths — routes from source to sink with available capacity. Along each path, the algorithm pushes as much flow as the bottleneck edge allows. The key insight is the residual graph: a modified graph that tracks remaining forward capacity and allows 'undoing' flow by sending flow backward along already-used edges. When no augmenting path exists, the flow is maximum.

The Duality of Max Flow and Min Cut

The max-flow min-cut theorem, proved by Ford and Fulkerson, reveals a profound duality: the maximum flow through a network exactly equals the capacity of the minimum cut. A cut partitions the vertices so that source and sink are on opposite sides; its capacity is the sum of edge capacities crossing the partition. This means the bottleneck of the network — its weakest point — completely determines its maximum throughput. This duality has deep connections to linear programming.

Applications Everywhere

Network flow is one of the most broadly applicable algorithmic tools. Bipartite matching — assigning workers to jobs — reduces to max flow. Image segmentation in computer vision uses min-cut to separate foreground from background. Airline scheduling, baseball elimination, project selection, and telecommunications routing all have elegant flow formulations. The Edmonds-Karp variant (BFS-based Ford-Fulkerson) guarantees polynomial time, making these applications practical even at scale.

FAQ

What is the max-flow min-cut theorem?

The max-flow min-cut theorem states that in any flow network, the maximum amount of flow from source to sink equals the minimum capacity of a cut separating source from sink. A cut is a partition of vertices into two sets S and T such that source is in S and sink is in T. The capacity of the cut is the sum of capacities of edges from S to T.

How does the Ford-Fulkerson algorithm work?

Ford-Fulkerson repeatedly finds augmenting paths from source to sink in the residual graph using BFS or DFS. Along each path, it pushes the maximum possible flow (the bottleneck capacity). It updates the residual graph by decreasing forward edge capacities and increasing reverse edge capacities. It terminates when no augmenting path exists.

What are practical applications of network flow?

Network flow applies to transportation logistics, internet bandwidth routing, bipartite matching (job assignments), airline scheduling, image segmentation, and baseball elimination problems. Any situation with capacity-constrained routing can be modeled as a flow network.

What is the difference between Ford-Fulkerson and Edmonds-Karp?

Ford-Fulkerson is a general method that doesn't specify how to find augmenting paths. Edmonds-Karp is a specific implementation that uses BFS to always find the shortest augmenting path, guaranteeing O(VE²) time complexity regardless of edge capacities.

Sources

Embed

<iframe src="https://homo-deus.com/lab/graph-theory/network-flow/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub