Network Flows
Introduction
Network flow theory studies how commodities, information, or other quantities move through networks. Consider water flowing through pipes, traffic through road networks, or data through communication channels. Each edge has a capacity limiting how much can flow through it, and the fundamental question is: what is the maximum amount that can be transported from a source to a destination?
Network flow problems have diverse applications including transportation logistics, telecommunications, bipartite matching, project selection, and image segmentation. The mathematical theory reveals deep connections between maximum flows and minimum cuts.
Flow Networks
A flow network is a directed graph with:
A source vertex with no incoming edges.
A sink (target) vertex with no outgoing edges.
A capacity function assigning a non-negative capacity to each edge
Definition of Flow
A flow is a function satisfying two constraints:
Capacity Constraint
For every edge
The flow through an edge cannot exceed its capacity.
Flow Conservation
For every vertex
Total flow into a vertex equals total flow out (except at the source and sink).
Value of a Flow
The value of a flow is the net flow leaving the source:
By flow conservation, this equals the net flow entering the sink. The maximum flow problem asks: find a flow maximizing
Cuts
An cut is a partition of vertices into sets where and The capacity of a cut is the sum of capacities of edges from to
A minimum cut is a cut with the smallest capacity among all - cuts.
Max-Flow Min-Cut Theorem
One of the fundamental results in combinatorial optimization is the max-flow min-cut theorem:
The value of a maximum flow equals the capacity of a minimum cut.
This theorem has a natural interpretation: the maximum amount that can flow from source to sink is limited by the bottleneck cut, and this limit is always achievable.
Residual Networks
Given a flow the residual network represents remaining capacity. For each edge in the original network:
The residual capacity is (remaining forward capacity).
A backward edge with residual capacity represents the ability to reduce flow.
Ford-Fulkerson Method
The Ford-Fulkerson method is an iterative approach to finding maximum flow:
Initialize for all edges.
While there exists an augmenting path from to in the residual network:
Find the bottleneck capacity
Augment flow along path by
When no augmenting path exists, the current flow is maximum.
Edmonds-Karp Algorithm
The Edmonds-Karp algorithm implements Ford-Fulkerson using BFS to find shortest augmenting paths. This guarantees termination and runs in time.
Applications
Bipartite Matching
Maximum bipartite matching can be solved as a max flow problem. Given a bipartite graph with vertex sets and add a source connected to all vertices in and a sink connected from all vertices in with all capacities equal to 1. The maximum flow equals the maximum matching size.
Edge-Disjoint Paths
The maximum number of edge-disjoint paths from to equals the maximum flow when all edge capacities are 1. By the max-flow min-cut theorem, this also equals the minimum number of edges whose removal disconnects from (Menger's theorem).
Image Segmentation
In computer vision, minimum cuts can separate foreground from background in images. Pixels are vertices with edges to neighbors; edge weights reflect similarity. A minimum cut finds the optimal boundary.
Proof of Max-Flow Min-Cut Theorem
The proof establishes three equivalent conditions: (1) is a maximum flow, (2) there is no augmenting path in and (3) for some cut
Key insight: for any flow and any cut the flow value equals the net flow across the cut:
Thus every flow is bounded by every cut. When equality holds, both are optimal.
Minimum Cost Flows
In minimum cost flow problems, each edge also has a cost per unit of flow. The goal is to find a flow of a specified value that minimizes total cost:
This generalizes shortest path, maximum flow, and assignment problems. Algorithms include successive shortest path and cycle-canceling methods.
Multiple Sources and Sinks
Problems with multiple sources or sinks reduce to single source-sink problems by adding a super-source connected to all sources and a super-sink connected from all sinks.
Summary
A flow network is a directed graph with edge capacities, a source, and a sink. A flow assigns non-negative values to edges respecting capacity constraints and conservation (flow in equals flow out at internal vertices).
The max-flow min-cut theorem establishes that the maximum flow value equals the minimum cut capacity. This fundamental duality has algorithmic implications: finding a maximum flow also finds a minimum cut.
The Ford-Fulkerson method iteratively augments flow along paths in the residual network. The Edmonds-Karp variant using BFS runs in polynomial time.
Applications span bipartite matching, edge connectivity, transportation, and computer vision. Network flow theory exemplifies the power of combinatorial optimization, connecting graph structure to algorithmic solutions.