15.082J & 6.855J & ESD.78J October 7, 2010: Introduction To Maximum Flows
15.082J & 6.855J & ESD.78J October 7, 2010: Introduction To Maximum Flows
78J
October 7, 2010
Introduction to Maximum Flows
=
(N,A)
flow on arc (i,j)
uij
s
t
=
=
source node
sink node
Maximize
Subject to
j xij
j xsj
k xki
= 0
= v
Maximum Flows
We refer to a flow x as maximum if it is feasible
and maximizes v. Our objective in the max flow
problem is to find a maximum flow.
10
1
6 5
7
t
10
1
2
retailers
6
5
1
2
4 4
5
retailers
66
77
66
55
1
6 5
10
1
6
6 5
7
t
7
6
10
11
s
6
10
0
1
6
6 5
8
7
t
10
11
s
6
uij
xij
10
uij - xij
1
2
s
1
5
7
4
1
2
xij
2
s
7
4
1
5
for (i,j) P.
1
2
t
8
4
FordFulkerson
Algorithm
Animation
10
Integrality
Assume that all data are integral.
Lemma: At each iteration all residual capacities are
integral.
Proof. It is true at the beginning. Assume it is true
after the first k-1 augmentations, and consider
augmentation k along path P.
The residual capacity of P is the smallest
residual capacity on P, which is integral.
After updating, we modify residual capacities by 0,
or , and thus residual capacities stay integral.
12
2
3
1
11
t
11
1 1
13
Mental Break
What are aglets?
The plastic things on the ends of shoelaces.
How fast does the quartz crystal in a watch vibrate?
About 32,000 times per second.
If Barbie (the doll) were life size and 5 9 tall, how big
would her waist be?
18 inches. Incidentally, Barbies full name is Barbara
Millicent Roberts
Mental Break
True or false. In Alaska it is illegal to shoot a moose from a
helicopter or any other flying vehicle.
True.
True or false. In Athens, Georgia, a drivers license can be
taken away by law if the driver is deemed either unbathed or
poorly dressed.
False. However, it is true for Athens, Greece.
In Helsinki, Finland that dont give parking tickets to illegally
parked cars. What do they do instead?
They deflate the tires of the car.
1
1,1
s
6, 6
s
6
t
10,7
3
7
x* = final flow
If there is a directed path from i
to j in G, we write i j.
1
2
G(x) = residual
network for flow x.
8,8
S* = { j : s j in G(x*)}
t
T* = N\S*
16
1
9
s
6
1
2
3
7
S* = { j : s j in G(x*)}
t
T* = N\S*
10, 9
8,8
1,1
s
6, 6
t
10,7
iSjT uij
18
6, 6
iSjT xji
8,8
1,1
10, 9
t
10,7
8,8
1,1
s
6, 6
t
10,7
20
by definition of v
2. v = Fx(S*, T*)
by Lemma 1.
by Lemma 2.
by Lemmas 1,3.
Proof of Lemma 1
Proof. Add the conservation of flow constraints for
each node i S - {s} to the constraint that the flow
leaving s is v. The resulting equality is Fx(S,T) = v.
10, 9
8,8
1,1
s
6, 6
10, 9
t
10,7
8,8
1,1
s
6, 6
t
10,7
xs1 + xs2 = v
x12 + x1t xs1 = 0
xs1 + xs2 = v
x2t xs2 x12 = 0
22
Proof of Lemma 2
Proof. If i S, and j T, then xij uij. If i T, and j
S, then xij 0.
Fx(S,T)
CAP(S,T)
10, 9
iSjT xij
iSjT xji
= iSjT uij
iSjT 0
8,8
1,1
s
6, 6
CAP(S, T) = 15
10, 9
t
10,7
8,8
1,1
s
6, 6
t
10,7
CAP(S, T) = 16
23
Proof of Lemma 3.
We have already seen that there is no arc from
S* to T* in G(x*).
i S* and
j T*
x*ij = uij
x*ji = 0
Otherwise, there is
an arc (i, j) in G(x*)
24
Review
Corollary. If the capacities are finite integers, then the FordFulkerson Augmenting Path Algorithm terminates in finite
time with a maximum flow from s to t.
Corollary. If the capacities are finite rational numbers, then
the Ford-Fulkerson Augmenting Path Algorithm
terminates in finite time with a maximum flow from s to t.
(why?)
Corollary. To obtain a minimum cut from a maximum flow x*,
let S* denote all nodes reachable from s in G(x), and T* =
N\S*
Remark. This does not establish finiteness if u ij = or if
capacities may be irrational.
25
26
After 1 augmentation
M-1
1
M
M-1
27
M-1
1
1
1
M-1
M-1
1
M-1
28
After 3 augmentations
M-2
M-1
1
M-1
1
M-2
29
And so on
30
After 2M augmentations
1
M
1
M
31
32
2. Ford-Fulkerson Algorithm
3. Duality Theory.
4. Next Lecture:
Polynomial time variants of FF algorithm
Applications of Max-Flow Min-Cut
33
MITOpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.