Network Flow
Max Flow Introduction
Learn how to model flow through networks, understand capacity constraints, and discover the maximum flow from source to sink.
What Is a Flow Network?
A flow network is a directed graph where each edge has a capacity: a non-negative upper bound on how much "stuff" can pass through it. Every network has a special source node \( s \) (where flow originates) and a sink node \( t \) (where flow is collected).
A Simple Flow Network
The Two Fundamental Rules
Any valid flow \( f \) on a network must satisfy two constraints at every edge and every node:
The Maximum Flow Problem
The value of a flow is the total amount leaving the source (equivalently, arriving at the sink):
The maximum flow problem asks: what is the largest possible value \( |f| \) that satisfies all capacity and conservation constraints?
The Max-Flow Min-Cut Theorem
An s-t cut partitions the nodes into two sets \( S \) and \( T \) with \( s \in S \) and \( t \in T \). The capacity of the cut is the sum of capacities on edges from \( S \) to \( T \):
The theorem states:
Visualizing a Min Cut
Flow vs Capacity
These two concepts are related but distinct. Confusing them is the most common source of errors:
| Flow \( f(u,v) \) | Capacity \( c(u,v) \) | |
|---|---|---|
| Definition | Actual amount sent along an edge | Maximum allowed along an edge |
| Can change? | Yes: depends on the flow chosen | No: fixed by the network |
| Constraint | \( 0 \leq f(u,v) \leq c(u,v) \) | Given as input |
| Notation | \( f(u,v) \) or flow/capacity | \( c(u,v) \) or label on edge |
Augmenting Paths & Residual Graphs
To find max flow, we use the residual graph: a modified version of the network that shows remaining capacity on each edge.
The Ford-Fulkerson Method
Worked Example: Finding Max Flow
Iteration 1: First Augmenting Path
Iteration 2: Second Augmenting Path
Iteration 3: Third Augmenting Path
Common Mistakes
Network Flow Summary
| Concept | Key Idea | Notation |
|---|---|---|
| Flow Network | Directed graph with capacities, source, sink | \( G = (V, E, c, s, t) \) |
| Flow Value | Total flow leaving source | \( |f| \) |
| Capacity Constraint | Flow cannot exceed edge capacity | \( 0 \leq f(u,v) \leq c(u,v) \) |
| Conservation | Flow in = flow out at internal nodes | \( \sum f_{in} = \sum f_{out} \) |
| Min Cut | Partition minimizing crossing capacity | \( c(S, T) \) |
| Max-Flow Min-Cut | Max flow = min cut capacity | \( \max |f| = \min c(S,T) \) |
Question 1 of 5
In a flow network, the conservation of flow constraint applies to which nodes?
Question 2 of 5
If edge \( (u,v) \) has capacity \( c(u,v) = 10 \) and current flow \( f(u,v) = 7 \), what is the residual capacity of the forward edge?
Question 3 of 5
According to the Max-Flow Min-Cut Theorem, the maximum flow in a network equals:
Question 4 of 5
In the Ford-Fulkerson method, the bottleneck of an augmenting path is:
Question 5 of 5
A network has source \( s \) with two outgoing edges of capacity 5 and 8. What is the upper bound on the max flow?