Download - Complexity of Ford-Fulkerson
![Page 1: Complexity of Ford-Fulkerson](https://reader036.vdocuments.us/reader036/viewer/2022082517/56812e4d550346895d93e39d/html5/thumbnails/1.jpg)
Complexity of Ford-Fulkerson
• Let U = max {(i,j) in A} uij.• If S = {s} and T = N\{s}, then u[S,T] is at
most nU.• The maximum flow is at most nU.
– At most nU augmentations.
• Each iteration of the inner while loop is O(m):– Each arc is inspected at most once– Finding is O(n)– Updating the flow on P is O(n)
• Complexity is O(nmU).
![Page 2: Complexity of Ford-Fulkerson](https://reader036.vdocuments.us/reader036/viewer/2022082517/56812e4d550346895d93e39d/html5/thumbnails/2.jpg)
Pathological Example
s 1
2
3
5
(0,106) (0,106)
(0,106)(0,106)
(0,1) t
![Page 3: Complexity of Ford-Fulkerson](https://reader036.vdocuments.us/reader036/viewer/2022082517/56812e4d550346895d93e39d/html5/thumbnails/3.jpg)
An Augmenting Path
s 1
2
3
5
(1,106) (0,106)
(1,106)(0,106)
(1,1) t
v = 1
![Page 4: Complexity of Ford-Fulkerson](https://reader036.vdocuments.us/reader036/viewer/2022082517/56812e4d550346895d93e39d/html5/thumbnails/4.jpg)
Residual Network
s 1
2
3
5
106-1 106
106-1106
0 t111
![Page 5: Complexity of Ford-Fulkerson](https://reader036.vdocuments.us/reader036/viewer/2022082517/56812e4d550346895d93e39d/html5/thumbnails/5.jpg)
An Augmenting Path in the Residual Network
s 1
2
3
5
106-1 106
106-1106
0 t111
![Page 6: Complexity of Ford-Fulkerson](https://reader036.vdocuments.us/reader036/viewer/2022082517/56812e4d550346895d93e39d/html5/thumbnails/6.jpg)
Updated Flow
s 1
2
3
5
(1,106) (1,106)
(1,106)(1,106)
(0,1) t
v = 2
![Page 7: Complexity of Ford-Fulkerson](https://reader036.vdocuments.us/reader036/viewer/2022082517/56812e4d550346895d93e39d/html5/thumbnails/7.jpg)
Updated Residual Network
s 1
2
3
5
106-1 106 -1
106-1106 -1
1 t01 111
![Page 8: Complexity of Ford-Fulkerson](https://reader036.vdocuments.us/reader036/viewer/2022082517/56812e4d550346895d93e39d/html5/thumbnails/8.jpg)
Next Augmenting Path in the Residual Network
s 1
2
3
5
106-1 106 -1
106-1106 -1
1 t01 111
This will take 2 million iterations to find the maximum flow!
![Page 9: Complexity of Ford-Fulkerson](https://reader036.vdocuments.us/reader036/viewer/2022082517/56812e4d550346895d93e39d/html5/thumbnails/9.jpg)
Polynomial Max Flow Algorithms (Chapter 7)
• Always augment along the shortest augmenting path in the residual network.– O(n2m)
• Always augment along the maximum-capacity augmenting path in the residual network.– O(nm log U)
• Goldberg’s algorithm (preflow-push) with highest-label implementation.– O(n2m1/2)