220 likes | 679 Views
7. Edmonds-Karp Algorithm. Edmonds-Karp Algorithm. 0. flow. 2. 4. 4. capacity. G:. 0. 0. 0. 6. 0. 8. 10. 10. 2. 0. 0. 0. 0. 10. s. 3. 5. t. 10. 9. Flow value = 0. 8. X. 8. X. 8. X. Edmonds-Karp Algorithm. 0. flow. 2. 4. 4. capacity. G:. 0. 0. 0. 6.
E N D
Edmonds-Karp Algorithm 0 flow 2 4 4 capacity G: 0 0 0 6 0 8 10 10 2 0 0 0 0 10 s 3 5 t 10 9 Flow value = 0
8 X 8 X 8 X Edmonds-Karp Algorithm 0 flow 2 4 4 capacity G: 0 0 0 6 0 8 10 10 2 0 0 0 0 8 10 s 3 5 t 10 9 Flow value = 0 2 4 4 residual capacity Gf: 6 8 10 10 2 10 s 3 5 t 10 9
2 X X 10 8 X 8 Edmonds-Karp Algorithm 0 2 4 4 G: 0 8 2 6 0 8 10 10 2 0 0 0 10 10 s 3 5 t 10 9 Flow value = 8 2 4 4 Gf: 8 6 8 10 2 2 10 s 3 5 t 2 9 8 4
10 10 X X 2 2 X 2 2 4 4 G: 2 8 6 0 8 10 10 2 0 0 8 0 10 s 3 5 t 10 9 12 Flow value = 10 2 2 4 2 Gf: 2 6 8 8 10 2 10 s 3 5 t 2 9 8
10 X X 8 10 X 8 X 2 2 4 4 G: 2 8 8 6 0 8 10 10 2 0 6 2 2 10 s 3 5 t 10 9 18 Flow value = 12 2 2 4 2 Gf: 2 6 8 8 10 2 8 s 3 5 t 10 7 2 2 6
X 10 X X X 9 10 9 X 2 3 2 4 4 G: 8 8 9 7 6 6 8 10 10 2 0 8 8 10 s 3 5 t 10 9 19 Flow value = 18 2 2 4 2 Gf: 8 6 8 2 10 2 2 s 3 5 t 10 1 8 8
3 2 4 4 G: 9 10 7 6 6 8 10 10 2 0 9 10 9 10 s 3 5 t 10 9 Flow value = 19 3 2 4 1 Gf: 9 1 6 7 1 10 2 1 s 3 5 t 10 9 9
3 2 4 4 G: 9 10 7 6 6 8 10 10 2 0 9 10 9 10 s 3 5 t 10 9 Cut capacity = 19 Flow value = 19 3 2 4 1 Gf: 9 1 6 7 1 10 2 1 s 3 5 t 10 9 9