A flow network is a tuple \(G = (V, E, s, t, c)\).
Intuition: Material flowing through a transportation network; material originates at source and is sent to sink.
Defn: An \(st\)-cut is partition \((A,B)\) of nodes with \(s \in A\) and \(t \in B\)
Defn: Its capacity is the sum of capacities of edges from \(A\) to \(B\)
\[ \mathrm{cap}(A,B) = \sum_{e \text{ out of } A} c(e) \]
Defn: An \(st\)-cut is partition \((A,B)\) of nodes with \(s \in A\) and \(t \in B\)
Defn: Its capacity is the sum of capacities of edges from \(A\) to \(B\)
\[ \mathrm{cap}(A,B) = \sum_{e \text{ out of } A} c(e) \]
Defn: An \(st\)-cut is partition \((A,B)\) of nodes with \(s \in A\) and \(t \in B\)
Defn: Its capacity is the sum of capacities of edges from \(A\) to \(B\)
Min-cut problem: Find a cut of minimum capacity.
Which is the capacity of the given \(st\)-cut?
Defn: An \(st\)-flow \(f\) is a function that satisfies:
Defn: An \(st\)-flow \(f\) is a function that satisfies:
Defn: The value of a flow \(f\): \(\displaystyle\mathrm{val}(f) = \sum_{e\text{ out of }s} f(e) - \sum_{e\text{ in to }s}f(e)\)
Defn: An \(st\)-flow \(f\) is a function that satisfies:
Defn: The value of a flow \(f\): \(\displaystyle\mathrm{val}(f) = \sum_{e\text{ out of }s} f(e) - \sum_{e\text{ in to }s}f(e)\)
Max-flow Problem: Find a flow of maximum value.
Greedy algorithm (first attempt at max-flow)
Greedy algorithm (first attempt at max-flow)
![]() |
![]() |
Greedy algorithm above ended with flow value of 16, however the max-flow value is 19
Q: Why does the greedy algorithm fail?
A: Once greedy algorithm increases flow on an edge, it never decreases it
Ex: Consider flow network \(G\) below
Bottom line: need some mechanism to "undo" a bad decision
Original edge: \(e = (u,v) \in E\)
Reverse edge: \(e^\text{reverse} = (v,u)\)
Residual capacity: \( c_f(e) = \begin{cases} c(e) - f(e) & \text{if } e \in E \\ f(e) & \text{if } e^\text{reverse} \in E \end{cases} \)
Residual network: \(G_f = (V, E_f, s, t, c_f)\)
Defn: An augmenting path is a simple \(s{\leadsto}t\) path (no repeat vertices) in the residual network \(G_f\)
Defn: The bottleneck capacity of an augmenting path \(P\) is the minimum residual capacity of any edge in \(P\)
Key property: Let \(f\) be a flow and let \(P\) be an augmenting path in \(G_f\). Then, after calling \(f' \leftarrow \mathrm{Augment}(f,c,P)\), the resulting \(f'\) is a flow and \(\mathit{val}(f') = \mathit{val}(f) + \mathit{bottleneck}(G_f,P)\).
Augment(f, c, P) delta <- bottleneck capacity of augmenting path P Foreach edge e in P if e in E: f(e) <- f(e) + delta else: f(erev) <- f(erev) - delta Return f
Which is the augmenting path of highest bottleneck capacity?
Ford-Fulkerson augmenting path algorithm
Ford-Fulkerson(G) Foreach edge e in E: f(e) <- 0 Gf <- residual network of G with respect to flow f While(there exists an s-t path P in Gf) // P: augmenting path f <- Augment(f, c, P) Update Gf Return f
Flow Value lemma: Let \(f\) be any flow and let \((A,B)\) be any cut. Then, value of flow \(f\) equals the net flow across the cut \((A,B)\).
\[ \mathit{val}(f) = \sum_{e\text{ out of }A} f(e) - \sum_{e\text{ in to }A} f(e) \]
Which is the net flow across the given cut?
Flow Value lemma: Let \(f\) be any flow and let \((A,B)\) be any cut. Then, value of flow \(f\) equals the net flow across the cut \((A,B)\).
Pf:
\[ \begin{eqnarray} \mathit{val}(f) & = & \sum_{e\text{ out of }s} f(e) - \sum_{e\text{ in to }s} f(e) \\ & =^\dagger & \sum_{v \in A}\left( \sum_{e\text{ out of }v} f(e) - \sum_{e\text{ in to }v} f(e) \right) \\ & = & \sum_{e\text{ out of }A} f(e) - \sum_{e\text{ in to }A} f(e) \quad\qed \end{eqnarray} \]
\(\dagger\): by flow conservation, all terms except for \(v=s\) are \(0\)
Weak Duality: Let \(f\) be any flow and \((A,B)\) be any cut. Then, \(\mathit{val}(f) \leq \mathit{cap}(A,B)\).
Pf: \[ \mathit{val}(f) =^\dagger \sum_{e\text{ out of }A} f(e) - \sum_{e\text{ in to }A} f(e) \leq \sum_{e\text{ out of }A} f(e) \leq \sum_{e\text{ out of }A} c(e) = \mathit{cap}(A, B) \quad\qed \]
\(\dagger\): flow value lemma
![]() |
![]() |
Corollary: Let \(f\) be a flow and let \((A,B)\) be any cut. If \(\mathit{val}(f) = \mathit{cap}(A,B)\), then \(f\) is a max flow and \((A,B)\) is a min cut.
Pf:
![]() |
![]() |
Max-flow min-cut theorem: Value of max flow = capacity of min cut (strong duality)
Max-flow min-cut theorem: Value of max flow = capacity of min cut (strong duality)
Augmenting path theorem: Flow \(f\) is max flow iff no augmenting paths
Pf: The following three conditions are equivalent for any flow \(f\):
Pf 1 ⇒ 2:
Max-flow min-cut theorem: Value of max flow = capacity of min cut (strong duality)
Augmenting path theorem: Flow \(f\) is max flow iff no augmenting paths
Pf: The following three conditions are equivalent for any flow \(f\):
Pf 2 ⇒ 3 (proved as contrapositive: ¬3 ⇒ ¬2)
Pf 3 ⇒ 1:
\[\begin{eqnarray} \mathit{val}(f) & = & \sum_{e\text{ out of }A} f(e) - \sum_{e\text{ in to }A} f(e) \\ & = & \sum_{e\text{ out of }A} c(e) - 0 \\ & = & \mathit{cap}(A, B) \quad\qed \end{eqnarray}\] |
![]() |