Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Dinitz Algorithm An example of a run. v1v1 Residual & Layered Networks construction s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 25 1114 9 5 10 8 1 5 8 9 7 6.

Similar presentations


Presentation on theme: "The Dinitz Algorithm An example of a run. v1v1 Residual & Layered Networks construction s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 25 1114 9 5 10 8 1 5 8 9 7 6."— Presentation transcript:

1 The Dinitz Algorithm An example of a run

2 v1v1 Residual & Layered Networks construction s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 25 1114 9 5 10 8 1 5 8 9 7 6 The original network N v1v1 s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 25 1114 9 5 10 81 5 8 9 7 6 The residual network N f ( f = 0) v1v1 st v2v2 v4v4 v5v5 v6v6 v7v7 25 11 9 5 5 9 10 The layered network L f 4 4 4

3 Computing a blocking flow in L f v1v1 st v2v2 v4v4 v5v5 v6v6 v7v7 0/25 0/11 0/9 0/5 0/9 0/10 Finding an augmentation path by arbitrarily backtracking from t Updating the flow 0/4

4 Computing a blocking flow in L f v1v1 st v2v2 v4v4 v5v5 v6v6 v7v7 0/25 0/11 0/9 5/5 0/5 0/9 5/10 Updating the flow 0/4

5 Computing a blocking flow in L f v1v1 st v2v2 v4v4 v5v5 v6v6 v7v7 0/25 0/11 0/9 5/5 0/5 0/9 5/10 Updating the flow 0/4 Cleaning forward

6 Computing a blocking flow in L f v1v1 st v2v2 v4v4 v5v5 v6v6 v7v7 0/25 0/11 0/9 5/5 0/5 0/9 5/10 0/4 Cleaning forward Finding an augmentation path by arbitrarily backtracking from t.

7 Computing a blocking flow in L f v1v1 st v2v2 v4v4 v5v5 v6v6 v7v7 0/25 0/11 0/9 5/5 0/5 0/9 5/10 0/4 Finding an augmentation path by arbitrarily backtracking from t. Updating the flow.

8 Computing a blocking flow in L f v1v1 st v2v2 v4v4 v5v5 v6v6 v7v7 9/25 0/11 9/9 5/5 0/5 0/9 5/10 0/4 Updating the flow.

9 Computing a blocking flow in L f v1v1 st v2v2 v4v4 v5v5 v6v6 v7v7 9/25 0/11 9/9 5/5 0/5 0/9 5/10 0/4 Updating the flow. Cleaning forward There aren’t any edges going into t – a blocking flow is found!

10 Adding the blocking flow to f v1v1 st v2v2 v4v4 v5v5 v6v6 v7v7 9/25 0/11 9/9 5/5 0/5 0/9 5/10 0/4 v1v1 s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 0/25 0/110/14 0/9 0/5 0/10 0/80/1 0/5 0/8 0/9 0/7 0/6 0/10 0/4

11 Adding the blocking flow to f v1v1 st v2v2 v4v4 v5v5 v6v6 v7v7 9/25 0/11 9/9 5/5 0/5 0/9 5/10 0/4 v1v1 s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 9/25 0/110/14 9/9 5/5 0/10 0/80/1 0/5 0/8 0/9 0/7 0/6 5/10 0/4

12 7 v6v6 t v5v5 s 16 Constructing N f and L f v1v1 s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 9/25 0/110/14 9/9 5/5 0/10 0/80/1 0/5 0/8 0/9 0/7 0/6 5/10 0/4 v1v1 v2v2 v3v3 v4v4 v6v6 v7v7 1114 9 5 10 81 5 8 9 7 6 5 4 9 5 s t v4v4 v5v5 v7v7 16 11 10 55 4 8 9 v1v1 v2v2 v3v3 14

13 0/7 v6v6 Computing a blocking flow in L f s t v4v4 v5v5 v7v7 0/16 0/11 0/10 0/5 0/4 0/8 0/9 v1v1 v2v2 v3v3 0/14

14 0/7 v6v6 Computing a blocking flow in L f s t v4v4 v5v5 v7v7 0/16 0/11 0/10 5/5 0/4 5/8 0/9 v1v1 v2v2 v3v3 0/14

15 0/7 v6v6 Adding the blocking flow to f s t v4v4 v5v5 v7v7 0/16 0/11 0/10 5/5 0/4 5/8 0/9 v1v1 v2v2 v3v3 0/14 v1v1 s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 9/25 0/110/14 9/9 5/5 0/10 0/8 0/1 0/5 0/8 0/9 0/7 0/6 5/10 0/4

16 0/7 v6v6 Adding the blocking flow to f s t v4v4 v5v5 v7v7 0/16 0/11 0/10 5/5 0/4 5/8 0/9 v1v1 v2v2 v3v3 0/14 v1v1 s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 9/25 0/110/14 9/9 5/5 0/10 0/80/1 5/5 5/8 0/9 0/7 0/6 10/10 0/4

17 v4v4 6 v6v6 Constructing N f and L f st v4v4 v5v5 v7v7 16 11 10 8 5 4 9 v1v1 v2v2 v3v3 14 v1v1 s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 9/25 0/110/14 9/9 5/5 0/10 0/80/1 5/5 5/8 0/9 0/7 0/6 10/10 0/4 t v5v5 s 16 v1v1 v2v2 v3v3 v6v6 v7v7 1114 9 5 10 0/81 5 5 9 7 6 4 9 10 3 1

18 0/6 v6v6 Computing a blocking flow in L f st v4v4 v5v5 v7v7 0/16 0/11 0/10 0/8 0/5 0/4 0/9 v1v1 v2v2 v3v3 0/14 0/1

19 4/6 v6v6 Computing a blocking flow in L f st v4v4 v5v5 v7v7 4/16 0/11 4/10 0/8 0/5 4/4 0/9 v1v1 v2v2 v3v3 0/14 0/1

20 4/6 v6v6 Computing a blocking flow in L f st v4v4 v5v5 v7v7 4/16 0/11 4/10 0/8 0/5 4/4 0/9 v1v1 v2v2 v3v3 0/14 0/1

21 4/6 v6v6 Computing a blocking flow in L f st v4v4 v5v5 v7v7 12/16 8/11 4/10 8/8 0/5 4/4 0/9 v1v1 v2v2 v3v3 8/14 0/1

22 4/6 v6v6 Adding the blocking flow to f st v4v4 v5v5 v7v7 12/16 8/11 4/10 8/8 0/5 4/4 0/9 v1v1 v2v2 v3v3 8/14 0/1 v1v1 s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 9/25 0/110/14 9/9 5/5 0/10 0/8 0/1 5/5 5/8 0/9 0/7 0/6 10/10 0/4

23 4/6 v6v6 Adding the blocking flow to f st v4v4 v5v5 v7v7 12/16 8/11 4/10 8/8 0/5 4/4 0/9 v1v1 v2v2 v3v3 8/14 0/1 v1v1 s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 21/25 8/118/14 9/9 5/5 4/10 8/8 0/1 5/5 5/8 0/9 0/7 4/6 10/10 4/4

24 7 v6v6 Constructing N f and L f st v4v4 v5v5 v7v7 4 3 6 259 v1v1 v2v2 v3v3 6 1 v1v1 s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 21/25 8/118/14 9/9 5/5 4/10 8/80/1 5/5 5/8 0/9 0/7 4/6 10/10 4/4 v4v4 t v5v5 s 4 v1v1 v2v2 v3v3 v6v6 v7v7 36 9 5 6 81 5 5 9 7 4 4 21 10 3 88 4 2

25 0/7 v6v6 Computing a blocking flow in L f st v4v4 v5v5 v7v7 0/4 0/3 0/6 0/20/50/9 v1v1 v2v2 v3v3 0/6 0/1

26 2/7 v6v6 Computing a blocking flow in L f st v4v4 v5v5 v7v7 2/4 0/3 2/6 2/22/52/9 v1v1 v2v2 v3v3 0/6 0/1

27 2/7 v6v6 Adding the blocking flow to f st v4v4 v5v5 v7v7 2/4 0/3 2/6 2/22/52/9 v1v1 v2v2 v3v3 0/6 0/1 v1v1 s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 21/25 8/118/14 9/9 5/5 4/10 8/80/1 5/5 5/8 0/9 0/7 4/6 10/10 4/4

28 2/7 v6v6 Adding the blocking flow to f st v4v4 v5v5 v7v7 2/2 0/3 2/6 2/22/52/9 v1v1 v2v2 v3v3 0/6 0/1 v1v1 s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 23/25 8/118/14 9/9 5/5 6/10 8/8 0/1 5/5 3/8 2/9 2/7 6/6 10/10 4/4

29 v7v7 v6v6 Termination: no path from s to t in N f v1v1 s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 23/25 8/118/14 9/9 5/5 6/10 8/8 0/1 5/5 3/8 2/9 2/7 6/6 10/10 4/4 v4v4 t v5v5 s 2 v1v1 v2v2 v3v3 36 9 5 6 81 5 3 7 5 6 4 23 10 5 88 4 2 2 The flow f is maximal!


Download ppt "The Dinitz Algorithm An example of a run. v1v1 Residual & Layered Networks construction s t v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 25 1114 9 5 10 8 1 5 8 9 7 6."

Similar presentations


Ads by Google