






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







11/14/
A. Smith; based on slides by K. Wayne and S. Raskhodnikova
10/22/
A. Smith; based on slides by S. Raskhodnikova and K. Wayne
Ford-Fulkerson:
While
you can,
Theorem:
FF algorithm terminates with a maximum flow.
Two big ideas:
a) Max flow
min cut
b) Value(FF output flow) = capacity(some cut)
Proof of (b):Hence… FF flow is maximal and the corresponding cut is minimal.
f = flow output by FF algorithm
from s in residual graph GfA = set of vertices reachable
Lemma:
value(f) = capacity(A)
(see Lecture 22)
original network
s
t
A
B
1
X
X
X
1
0
1
Is generic Ford-Fulkerson algorithm polynomial in input size?
No. If max capacity is C, then algorithm can take C iterations.
s
(^21)
t
C
C 0
0
0
0
0
C
C
1
s
(^21)
t
C
C
1
0
0
0
0
0 X
C
C
X
X
X
1
1
1
X
X
1
1
m, n, and log C
flow by max possible amount.Intuition. Choosing path with highest bottleneck capacity increases
Don't worry about finding exact highest bottleneck path.
Maintain scaling parameter
Let G
f (^) ( ) be the subgraph of the residual graph consisting of only
arcs with capacity at least
110
s
2 4
t
1
170
102
122
G f
110
s
2 4
t
170
102
122
G f (100)
Scaling-Max-Flow(G,
s,
t,
c)
{
foreach
e
E
f(e)
0
smallest power of 2 greater than or equal to C
G f
residual graph
while
(
G f ( )
-residual graph
while
(there
exists
augmenting
path
P
in
G f ( )) {
f
augment(f,
c,
P)
// augment flow by
update G
f ( )
}
/ 2
return}
f
}
Lemma 1. The outer while loop repeats 1 +
log
2 (^) C (^) times.
Pf. Initially C
(^) decreases by a factor of 2 each iteration.
Lemma 2. Let f be the flow at the end of a
-scaling phase. Then the
value of the maximum flow f* is at most v(f) + m
(Sanity check: |v(f*) – v(f)|
m , and
(^) shrinks,
so v(f) converges towards v(f*) )
Lemma 3. There are at most 2m augmentations per scaling phase.
Let f be the flow at the end of the previous scaling phase.
Lemma 2
v(f*)
v(f) + m (
Each augmentation in a
-phase increases v(f) by at least
augmentations. It can be implemented to run in O(m Theorem. The scaling max-flow algorithm finds a max flow in O(m log C)
(^2) log C) time.^
proof on next slide
(Why?)
Lemma 2. Let f be the flow at the end of a
-scaling phase. Then value
of the maximum flow is at most v(f) + m
Pf.
(almost identical to proof of max-flow min-cut theorem)
We show that at the end of a
-phase, there exists a cut (A, B)
such that cap(A, B)
v(f) + m
Choose A to be the set of nodes reachable from s in G
f ( ).
By definition of A, s
By definition of f, t
So v(f*)-v(f)
(^) cap(A,B) – v(f)
m
original network
s
t
A
B