Presentation is loading. Please wait.

Presentation is loading. Please wait.

15.082 and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem.

Similar presentations


Presentation on theme: "15.082 and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem."— Presentation transcript:

1 15.082 and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem

2 Preflow Push This is the original network, plus reversals of the arcs. 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t

3 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Preflow Push This is the original network, which is also the original residual network. 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t

4 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Initialize Distances 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t The node label henceforth will be the distance label. 0 5 4 3 2 1 t 453 s2 d(j) is at most the distance of j to t in G(x) 02 2 1 1 1

5 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Saturate Arcs out of node s 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Saturate arcs out of node s. 0 5 4 3 2 1 t 453 s2 Move excess to the adjacent arcs 02 2 1 1 1 3 2 1 2 1 3 6 s s Relabel node s after all incident arcs have been saturated. 2 34

6 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select an active node, that is, one with excess 0 5 4 3 2 1 t 453 s2 Push/Relabel 02 2 1 1 1 3 2 1 2 1 3 6 s s Update excess after a push 1 1

7 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select an active node, that is, one with excess 0 5 4 3 2 1 t 453 s2 02 2 1 1 1 3 2 1 2 1 6 s s No arc incident to the selected node is admissible. So relabel. 1 1 2 3 3

8 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 t Select an active node, that is, one with excess 0 5 4 3 2 1 t 45 s2 02 2 1 1 3 2 2 6 s s Push/Relabel 1 2 3 2 1 3 1 2 3

9 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 t Select an active node. 0 5 4 3 2 1 t 45 s2 02 2 1 1 3 2 2 6 s s Push/Relabel 1 2 3 2 1 3 1 2 33 1 3 2 2 1 5

10 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 t Select an active node. 0 5 4 3 2 1 t 45 s2 02 2 1 12 2 6 s s Push/Relabel 1 2 3 2 1 3 1 2 3 1 3 2 1

11 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 t Select an active node. 0 5 4 3 2 1 t 45 s2 02 2 1 12 2 6 s s There is no incident admissible arc. So Relabel. 1 2 3 2 1 3 1 2 3 1 3 2 12 5 5

12 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 t Select an active node. 0 5 4 3 2 1 t 4 5s2 02 2 1 12 2 6 s s Push/Relabel 1 2 3 2 1 3 2 3 1 3 2 2 2 1 4 1

13 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 t Select an active node. 0 5 4 3 2 1 t 4 5s2 02 2 1 12 2 6 s s There is no incident admissible arc. So relabel. 1 2 3 2 1 3 2 3 1 3 2 2 2 1 4 1 3 5 5

14 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 t Select an active node. 0 5 4 3 2 1 t 45 s2 02 2 1 12 2 6 s s Push/Relabel 1 2 3 2 1 3 2 3 1 3 2 22 1 4 1 3 5 5 3

15 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 t Select an active node. 0 5 4 3 2 1 t 45 s2 02 2 1 12 2 6 s s Push/Relabel 1 2 3 2 1 3 2 2 2 22 4 1 3 5 5 3 1 1 4 1 4

16 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 t Select an active node. 0 5 4 3 2 1 t 45 s2 02 2 1 12 2 6 s s Push/Relabel 1 2 3 2 1 3 2 2 2 22 4 1 3 5 5 3 1 4 24 2 2

17 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 t Select an active node. 0 5 4 3 2 1 t 45 s 02 2 1 12 2 6 s s Push/Relabel 1 2 3 2 1 3 2 2 2 22 4 1 3 5 5 3 1 4 4 2 4

18 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 t Select an active node. 0 5 4 3 2 1 t 45 s 02 2 1 12 2 6 s s Push/Relabel 1 2 3 2 1 3 2 1 3 22 4 1 3 5 5 3 1 4 4 2 4 35 5 5

19 4 1 1 4 2 1 2 3 3 1 s 2 4 5 3 t Select, then relabel/push 4 1 1 4 2 1 2 3 3 1 s 2 4 5 t One can keep pushing flow between nodes 2 and 5 until eventually all flow returns to node s. 0 5 4 3 2 1 t 45 s 02 2 1 12 2 6 s s There are ways to speed up the last iterations. 1 2 3 2 1 3 2 1 3 22 4 1 3 5 5 3 1 4 4 2 4 35 5 5

20 MITOpenCourseWare http://ocw.mit.edu 15.082J / 6.855J / ESD.78J Network Optimization Fall 2010 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.http://ocw.mit.edu/terms


Download ppt "15.082 and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem."

Similar presentations


Ads by Google