Netw ork s
CONTENTS
Network flows on directed acyclic graphs
Ford-Fulkerson Algorithms
-Residual networks
4/9
1/4
s 10 t
7/7
8/13 11/14
v2 v4 4/4
•The net flow across (S,T) is f(s,t)=19, and the capacity is c(S,T)=26
•The net flow across cut is
f(v1,v3) + f(v2,v3) + f(v2,v4) = 12+(-4)+11= 19
•Capacity is
c(v1,v3)+c(v2,v4) = 12 + 14 = 26
Ford-Fulkerson-Method(G,s,t)
1. Initialize flow f to 0
2. While there exists an augmenting path p
3. Do augment flow f along p
4. Return f
Ford Fulkerson algorithm
The Ford Fulkerson method is iterative,
9
4
s 10 t
7
13
v3 v4 4
14
4/12
v1 v2 20
4/16
4/9
Flow network 4
s 10 t
7
13 4/14
v3 v4 4/4
8
Residual network
v1 v2 20
12
4
5
4
s 4 10 7 t
4
13 10
v3 v4 4
4
4/12
v1 v2 7/20
11/16
4/9
Flow network 4
s 7/10 t
7/7
13 11/14
v3 v4 4/4
8
Residual network
v1 v2 13
5
4
5
11 7
s 11 3 t
7
4
13 3
v3 v4 4
11
12/12
v1 v2 15/20
11/16
4/9
Flow network 1/4
s 10 t
7/7
8/13 11/14
v3 v4 4/4
12
Residual network
v1 v2 5
5
5
3 15
s 11 11 t
7
4
8
5 3
v3 v4 4
11
12/12
v1 v2 19/20
11/16
12/13 11/14
v3 v4 4/4
Residual network
12
v1 v2 1
5
9
11 11 3 19
s 7 t
12
1 3 4
v3 v4
11
Max flow min cut theorem
This theorem tell us that a flow is max. if and only if its
residual network contains no augmenting path.