2
Soviet Rail Network, 1955
Reference: On the history of the transportation and maximum flow problems. Alexander Schrijver in Math Programming, 91: 3, 2002.
Soviet Rail Network, 1955 Reference: On the history of the - - PowerPoint PPT Presentation
Soviet Rail Network, 1955 Reference: On the history of the transportation and maximum flow problems . Alexander Schrijver in Math Programming, 91: 3, 2002. 2 Maximum Flow and Minimum Cut Max flow and min cut. Two very rich algorithmic problems.
2
Reference: On the history of the transportation and maximum flow problems. Alexander Schrijver in Math Programming, 91: 3, 2002.
3
4
Abstraction for material flowing through the edges. G = (V, E) = directed graph, no parallel edges. Two distinguished nodes: s = source, t = sink. c(e) = capacity of edge e.
s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10 15 4 4
capacity source sink
5
s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10 15 4 4 Capacity = 10 + 5 + 15 = 30 A
e out of A
6
s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10 15 4 4 A
e out of A
Capacity = 9 + 15 + 8 + 30 = 62
7
s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10 15 4 4 A Capacity = 10 + 8 + 10 = 28
8
For each e ∈ E:
For each v ∈ V – {s, t}:
4 4 4
Value = 4
e in to v
e out of v
capacity flow
s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10 15 4 4
e out of s
4
9
For each e ∈ E:
For each v ∈ V – {s, t}:
10 6 6 11 1 10 3 8 8 11
capacity flow
s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10 15 4 4
Value = 24
e in to v
e out of v
e out of s
4
10
10 9 9 14 4 10 4 8 9 1 14
capacity flow
s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10 15 4 4
Value = 28
11
10 6 6 11 1 10 3 8 8 11 s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10 15 4 4
Value = 24
e out of A
e in to A
4 A
12
10 6 6 1 10 3 8 8 11 s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10 15 4 4
e out of A
e in to A
Value = 6 + 0 + 8 - 1 + 11 = 24 4 11 A
13
10 6 6 11 1 10 3 8 8 11 s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10 15 4 4
e out of A
e in to A
Value = 10 - 4 + 8 - 0 + 10 = 24 4 A
14
e out of A
e in to A
e out of s
v ∈A
e out of v
e in to v
e out of A
e in to A
by flow conservation, all terms except v = s are 0
15
s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10 15 4 4
Capacity = 30
A
16
e out of A
e in to A
e out of A
e out of A
s t
A B
7 6 8 4
17
10 9 9 14 4 10 4 8 9 1 14 s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10 15 4 4
A
18
Start with f(e) = 0 for all edge e ∈ E. Find an s-t path P where each edge has f(e) < c(e). Augment flow along path P. Repeat until you get stuck.
s 1 2 t
10 10 20 20 30
19
Start with f(e) = 0 for all edge e ∈ E. Find an s-t path P where each edge has f(e) < c(e). Augment flow along path P. Repeat until you get stuck.
s 1 2 t
20
10 10 20 30
20 20 20
20
Start with f(e) = 0 for all edge e ∈ E. Find an s-t path P where each edge has f(e) < c(e). Augment flow along path P. Repeat until you get stuck.
s 1 2 t
20 10 10 20 30 20 20 20
s 1 2 t
20 10 10 20 30 20 10 10 10 20 locally optimality ⇒ global optimality
21
Flow f(e), capacity c(e).
"Undo" flow sent. e = (u, v) and eR = (v, u). Residual capacity:
Residual edges with positive residual capacity. Ef = {e : f(e) < c(e)} ∪ {eR : c(e) > 0}.
capacity
residual capacity
residual capacity flow
22
s 2 3 4 5 t
10 10 9 8 4 10 10 6 2
23
forward edge reverse edge
24
Let f be a flow. If there exists an augmenting path, then we can
25
Let f be a flow with no augmenting paths. Let A be set of vertices reachable from s in residual graph. By definition of A, s ∈ A. By definition of f, t ∉ A.
e out of A
e in to A
e out of A
s t
26
28
s 1 2 t
C C C C 1
s 1 2 t
C C 1
C C
1 1 1
1 1
1 1
m, n, and log C
29
Some choices lead to exponential algorithms. Clever choices lead to polynomial algorithms. If capacities are irrational, algorithm not guaranteed to terminate!
Can find augmenting paths efficiently. Few iterations.
Max bottleneck capacity. Sufficiently large bottleneck capacity. Fewest number of edges.
30
Don't worry about finding exact highest bottleneck path. Maintain scaling parameter Δ. Let Gf (Δ) be the subgraph of the residual graph consisting of only
110
s 4 2 t
1 170 102 122 Gf 110
s 4 2 t
170 102 122 Gf (100)
31
32
By integrality invariant, when Δ = 1 ⇒ Gf(Δ) = Gf. Upon termination of Δ = 1 phase, there are no augmenting paths. ▪
33
Let f be the flow at the end of the previous scaling phase. L2 ⇒ v(f*) ≤ v(f) + m (2Δ). Each augmentation in a Δ-phase increases v(f) by at least Δ. ▪
proof on next slide
34
We show that at the end of a Δ-phase, there exists a cut (A, B)
Choose A to be the set of nodes reachable from s in Gf(Δ). By definition of A, s ∈ A. By definition of f, t ∉ A.
e out of A
e in to A
e out of A
e in to A
e out of A
e out of A
e in to A
s t