Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ford Fulkerson. Ford-Fulkerson (N=(G, c, s, t)) ; G = (V, E) for each edge, while exists a path P from s to t in residual network N f do for each edge.

Similar presentations


Presentation on theme: "Ford Fulkerson. Ford-Fulkerson (N=(G, c, s, t)) ; G = (V, E) for each edge, while exists a path P from s to t in residual network N f do for each edge."— Presentation transcript:

1 Ford Fulkerson

2 Ford-Fulkerson (N=(G, c, s, t)) ; G = (V, E) for each edge, while exists a path P from s to t in residual network N f do for each edge do return f

3 s t v1v2 v4v דוגמא : s t v1v2 v4v3 0/13 0/16 0/12 0/20 0/14 0/4 0/100/4 0/9 0/7

4 s t v1v2 v4v דוגמא : s t v1v2 v4v3 0/13 0/16 0/12 0/20 0/14 0/4 0/100/4 0/9 0/7 4/16 4/12 4/9 4/14 4/4

5 4/9 4/12 4/16 s t v1v2 v4v דוגמא : s t v1v2 v4v3 0/13 0/20 0/100/4 0/7 4/

6 4/4 4/9 4/12 4/16 s t v1v2 v4v דוגמא : s t v1v2 v4v3 0/13 0/20 0/100/4 0/7 4/ /16 7/10 11/14 7/7 7/20

7 7/7 11/14 7/10 11/16 4/4 4/9 4/12 s t v1v2 v4v דוגמא : s t v1v2 v4v3 0/13 0/ /20 7

8 7/7 11/14 7/10 11/16 4/4 4/9 4/12 s t v1v2 v4v דוגמא : s t v1v2 v4v3 0/13 0/ /20 7 8/13 1/40/10 12/12 15/20

9 12/12 1/40/10 8/13 7/7 11/14 11/16 4/4 4/9 s t v1v2 v4v דוגמא : s t v1v2 v4v

10 15/20 12/12 1/40/10 8/13 7/7 11/14 11/16 4/4 4/9 s t v1v2 v4v דוגמא : s t v1v2 v4v /13 0/9 19/20

11 0/9 12/13 12/12 1/40/107/7 11/14 11/16 4/4 s t v1v2 v4v דוגמא : s t v1v2 v4v

12 זמן ריצה: בכל איטרציה :  מחושב מסלול בזמן לפי BFS.  עידכון הזרימה והרשת השיורית. מספר האיטרציות הוא לכל היותר כגודל הזרימה. סה''כ.


Download ppt "Ford Fulkerson. Ford-Fulkerson (N=(G, c, s, t)) ; G = (V, E) for each edge, while exists a path P from s to t in residual network N f do for each edge."

Similar presentations


Ads by Google