Ford Fulkerson
Ford Fulkerson
of this vertex is 0.
Flow in a network is an integer-valued function f
defined on the edges of G satisfying 0 ≤ f (u,v) ≤
c(u,v), for every edge (u,v) in E.
Contd…
| f | f ( s, v) f (v, t )
vV vV
f (s, v) f (v, t )
vV vV
f
Cut
10 15 15 10
4
s 5 3 8 6 10 t
4 6 15 10
15
4 30 7
Capacity of Cut (S,T)
c( S , T ) c(u, v)
uS ,vT
2 9 5
Cut
10 15 15 10
4
s 5 3 8 6 10 t
4 6 15 10
15
4 30 7
Capacity = 30
Min Cut
s 5 3 8 6 10 t
4 6 15 10
15
4 30 7 Capacity = 28
Flow of Min Cut
FORD-FULKERSON-METHOD(G,s,t)
1. initialize flow f to 0
4. return f
Residual Network
Path: s → v2 → v1 → v3 → t.
Residual capacity: min(13, 4, 8, 20) = 4.
All edges in path exists in E, so add 4 to the flow for
all the edges in the path.
Flow = 4 + 4
Contd…
| f | = 23.
c({s, v1,v2,v4},{v3,t}) = 23.
4
Example 2 2
1
5
3 1 1
2 4 2
4 s t
2 5 3 2
1 1
3 1 1
2 3
2 4
s t
3 2 4
1 2 5
1
3 3 1 1
2/2 4 2/2
s t
3 2
Flow = 2 1
3
4
Contd… 2
1
5
3 1 1
2/2 4 2/2
4 s t
2 5 3 1 2
1
3 1 1
2 2
3
4
s t
3 2 4
1 2 5
1
3 3 1 1
2/2 4 2/2
s t
2/3 1 2/2
Flow = 2 + 2
3
4
Contd… 2
1
5
3 1 1
2/2 4 2/2
4 s t
2 5 2/3 1 2/2
1
3 1 1
2
3
4
s t
1 1/4
1 2 2 5
2 1
1/3 1 1/1
3
2/2 4 2/2
s t
2/3 1 2/2
Flow = 2 + 2 + 1
3
1/4
Contd… 2
1
5
1/3 1 1/1
3 2/2 4 2/2
s t
2 1 5 2/3 1 2/2
2 1 1
1 1
2 3
4
s t
1 2
1
2 | f | = 5.
3
c({s,2,3,4,5},{t}) = 5.
Flow = 2 + 2 + 1 = 5
Analysis