Presentation is loading. Please wait.

Presentation is loading. Please wait.

15.082 & 6.855J & ESD.78J Algorithm Visualization The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem.

Similar presentations


Presentation on theme: "15.082 & 6.855J & ESD.78J Algorithm Visualization The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem."— Presentation transcript:

1 15.082 & 6.855J & ESD.78J Algorithm Visualization The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem

2 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 2 Ford-Fulkerson Max Flow 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t This is the original network, plus reversals of the arcs.

3 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 3 Ford-Fulkerson Max Flow This is the original network, and the original residual network. 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t

4 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 4 4 1 1 2 2 1 2 3 3 1 Ford-Fulkerson Max Flow Find any s-t path in G(x) s 2 4 5 3 t

5 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 5 4 1 1 2 1 3 Ford-Fulkerson Max Flow Determine the capacity Δ of the path. Send Δ units of flow in the path. Update residual capacities. 1 1 1 2 1 2 3 2 1 s 2 4 5 3 t

6 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 6 4 1 1 2 1 3 Ford-Fulkerson Max Flow Find any s-t path 1 1 1 2 1 2 3 2 1 s 2 4 5 3 t

7 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 7 4 2 1 1 1 1 2 2 1 1 1 1 3 Ford-Fulkerson Max Flow 1 1 1 1 3 2 1 s 2 4 5 3 t Determine the capacity Δ of the path. Send Δ units of flow in the path. Update residual capacities.

8 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 8 4 2 1 1 1 1 2 2 1 1 1 1 3 Ford-Fulkerson Max Flow 1 1 1 1 3 2 1 s 2 4 5 3 t Find any s-t path

9 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 9 1 11 11 4 1 2 1 1 2 1 1 3 Ford-Fulkerson Max Flow 1 1 3 2 1 s 2 4 5 3 t Determine the capacity Δ of the path. Send Δ units of flow in the path. Update residual capacities.

10 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 10 1 11 11 4 1 2 1 1 2 2 1 1 3 Ford-Fulkerson Max Flow 1 1 3 2 1 s 2 4 5 3 t Find any s-t path

11 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 11 1 1 1 2 11 11 4 2 2 1 1 2 2 1 Ford-Fulkerson Max Flow 1 1 3 1 1 s 2 4 5 3 t 2 Determine the capacity Δ of the path. Send Δ units of flow in the path. Update residual capacities.

12 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 12 1 1 2 11 11 4 2 2 1 1 2 2 1 Ford-Fulkerson Max Flow 1 1 3 1 1 s 2 4 5 3 t 2 Find any s-t path

13 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 13 1 1 1 1 1 4 13 1 1 2 11 3 2 2 1 2 1 Ford-Fulkerson Max Flow 2 1 s 2 4 5 3 t 2 Determine the capacity Δ of the path. Send Δ units of flow in the path. Update residual capacities.

14 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 14 1 1 1 1 1 4 13 1 1 2 11 3 2 2 1 2 1 Ford-Fulkerson Max Flow 2 1 s 2 4 5 3 t 2 There is no s-t path in the residual network. This flow is optimal

15 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 15 1 1 1 1 1 4 13 1 1 2 11 3 2 2 1 2 1 Ford-Fulkerson Max Flow 2 1 s 2 4 5 3 t 2 These are the nodes that are reachable from node s. s 2 4 5 3

16 4 1 1 2 2 1 2 3 3 1 s 2 4 5 3 t 16 Ford-Fulkerson Max Flow 1 1 2 2 2 1 2 s 2 4 5 3 t Here is the optimal flow

17 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 & 6.855J & ESD.78J Algorithm Visualization The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem."

Similar presentations


Ads by Google