Presentation is loading. Please wait.

Presentation is loading. Please wait.

Algorithm Design by Éva Tardos and Jon Kleinberg Copyright © 2005 Addison Wesley Slides by Kevin Wayne 7. Edmonds-karp Demo.

Similar presentations


Presentation on theme: "Algorithm Design by Éva Tardos and Jon Kleinberg Copyright © 2005 Addison Wesley Slides by Kevin Wayne 7. Edmonds-karp Demo."— Presentation transcript:

1 Algorithm Design by Éva Tardos and Jon Kleinberg Copyright © 2005 Addison Wesley Slides by Kevin Wayne 7. Edmonds-karp Demo

2 2 Max-Flow Instance s 2 3 4 5t 10 9 8 4 6 2 0 0 0 0 0 0 0 0 G: Flow value = 0 0 flow capacity

3 3 Edmonds-Karp Algorithm s 2 3 4 5t 10 9 8 4 6 2 0 0 0 0 0 0 0 G: s 2 3 4 5t 10 4 6 2 G f : 10 8 0 9 X X 0 Flow value = 0 capacity residual capacity flow 9 9 9 X

4 4 Edmonds-Karp Algorithm s 2 3 4 5t 10 9 8 4 6 2 0 0 0 0 G: s 2 3 4 5t 1 6 2 G f : 10 8 1 0 9 0 Flow value = 9 9 9 9 9 9 4 10 X X X 4 4 4

5 5 Edmonds-Karp Algorithm s 2 3 4 5t 10 9 8 4 6 2 0 0 G: s 2 3 4 5t 1 6 2 G f : 6 1 9 0 Flow value = 13 9 9 9 9 9 4 6 4 4 4 4 4 8 X X X 5 1 10

6 6 Edmonds-Karp Algorithm s 2 3 4 5t 10 9 8 4 6 2 0 G: s 2 3 4 5t 1 2 G f : 5 9 9 0 Flow value = 14 9 9 9 4 4 4 5 4 7 5 1 10 1 6 6 X X X X 6 5 9

7 7 Edmonds-Karp Algorithm s 2 3 4 5t 10 9 8 4 6 2 0 G: s 2 3 4 5t 1 2 G f : 10 9 9 Flow value = 19 9 9 9 4 4 9 2 10 6 1 1 6 5 9 5 Cut capacity = 19 10


Download ppt "Algorithm Design by Éva Tardos and Jon Kleinberg Copyright © 2005 Addison Wesley Slides by Kevin Wayne 7. Edmonds-karp Demo."

Similar presentations


Ads by Google