PrimalDual Algorithm Selfreducibility Incremental Dynamic Program DivideandConquer Local
Primal-Dual Algorithm
Self-reducibility Incremental Dynamic Program Divide-and-Conquer Local Ratio Greedy Primal-Dual
Primal-Dual ¡ An optimality condition comes from the primal-dual theorem e. g. , max-flow=min-cut. ¡ Start from a pre-solution satisfying the optimality condition. ¡ A pre-solution is not feasible, but approaching to feasibility step by step. ¡ Eventually, the pre-solution becomes a feasible solution which is optimal.
Primal-Feasible Consider a maximization problem Optimality condition: Max Primal = Min Dual Optimal solution Primal feasible solutions
Dual Feasible Consider a maximization problem Dual feasible solutions coincide with pre-primal solution Optimality condition: Max Primal = Min Dual
Lecture 16 Max Flows 3 Preflow-Relable Algorithms
Review
The Ford Fulkerson Maximum Flow Algorithm Begin x : = 0; create the residual network G(x); while there is some directed path from s to t in G(x) do begin let P be a path from s to t in G(x); ∆: = δ(P); send ∆ units of flow along P; update the r's; End end {the flow x is now maximum}.
Push: Saturating 4 3 2 1 3 3 1
Push: Non-Saturating 3 4 2 1 0 3 2 1 3 1
Relabel 3 2 4 2 3 Min{3, 5}+1=4 5 1 1 3 2 4 4 1 3 5 1 1 1
e(3)=1
Exact distance: d(i) equals the length of the shortest path from node i to node t in G(x)
The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem
Preflow Push 4 2 3 s 5 1 1 2 3 4 1 1 4 2 3 This is the original network, and the original residual network. t
Initialize Distances 2 5 3 4 3 s 2 2 2 s 1 3 4 5 t 0 4 5 1 1 1 2 3 4 1 1 1 4 2 0 t 3 1 The node label henceforth will be the distance label. d(j) is at most the distance of j to t in G(x)
Saturate Arcs out of node s 3 s 2 5 3 4 3 s 2 6 2 2 s 1 3 4 5 t 0 4 5 1 1 1 2 3 4 1 1 2 1 4 2 0 t 3 1 3 Saturate arcs out of node s. Move excess to the adjacent arcs Relabel node s after all incident arcs have been saturated.
Select, then relabel/push 3 s 2 5 3 4 3 s 2 6 2 2 s 1 3 4 5 t 0 4 5 1 1 1 2 3 4 1 1 2 1 4 2 3 1 Select an active node, that is, one with excess Push/Relabel Update excess after a push 0 t
Select, then relabel/push 3 s 2 5 3 4 3 s 2 6 2 2 3 s 1 3 4 5 t 0 4 5 1 1 1 2 3 4 1 1 3 1 2 1 4 0 t 2 2 1 Select an active node, that is, one with excess No arc incident to the selected node is admissible. So relabel.
Select, then relabel/push 3 s 2 5 3 4 3 s 2 6 2 2 3 s 1 4 5 t 0 4 5 1 1 1 2 3 4 1 1 2 1 4 2 3 2 1 Select an active node, that is, one with excess Push/Relabel 0 t
Select, then relabel/push 3 s 2 5 3 4 3 s 2 6 2 2 3 s 1 4 5 t 0 1 2 Push/Relabel 5 1 3 1 4 1 3 3 2 1 Select an active node. 3 4 1 1 4 2 0 t
Select, then relabel/push s 2 5 3 4 3 s 2 6 2 2 3 s 1 4 5 t 0 1 2 Push/Relabel 5 1 3 1 4 1 3 3 2 1 Select an active node. 3 2 4 1 1 4 2 0 t
Select, then relabel/push s 2 5 3 4 3 s 2 6 2 2 3 s 5 1 4 5 t 0 3 2 4 1 1 2 5 2 1 3 1 4 1 3 3 2 1 2 4 1 2 1 Select an active node. There is no incident admissible arc. So Relabel. 0 t
Select, then relabel/push s 2 5 3 4 3 s 2 6 2 2 3 s 5 1 4 t 0 1 2 Push/Relabel 5 1 2 3 1 4 1 3 4 2 3 1 2 1 Select an active node. 3 2 1 4 2 1 0 t
Select, then relabel/push s 2 5 3 4 3 5 2 2 3 s 5 1 4 t 0 s 2 6 3 2 1 4 1 1 2 5 1 2 3 3 1 4 1 3 4 2 3 1 2 4 1 2 1 Select an active node. There is no incident admissible arc. So relabel. 0 t
Select, then relabel/push s 2 5 3 4 3 5 2 2 3 s 1 4 5 t 0 s 2 6 1 2 Push/Relabel 5 1 2 3 3 1 4 1 3 4 2 3 1 2 1 Select an active node. 3 2 1 4 2 1 0 t
Select, then relabel/push 1 s 2 5 3 4 3 5 2 2 3 s 1 4 5 t 0 4 2 s 2 6 1 2 Push/Relabel 1 4 1 3 2 3 4 1 2 1 Select an active node. 5 1 2 3 2 4 2 1 0 t
Select, then relabel/push 1 s 4 2 5 4 3 2 3 5 2 2 3 s 1 4 5 t 0 4 2 s 2 6 1 2 Push/Relabel 1 4 1 3 2 3 4 1 2 1 Select an active node. 5 1 2 3 2 4 2 1 0 t
Select, then relabel/push 1 s 2 4 5 4 3 2 3 5 2 3 s 1 4 5 t 0 4 2 s 2 6 1 2 Push/Relabel 1 4 1 3 2 3 4 1 2 1 Select an active node. 5 1 2 3 2 4 2 1 0 t
Select, then relabel/push s 5 5 4 2 3 5 2 3 s 1 4 5 t 0 2 4 3 s 2 6 1 2 Push/Relabel 1 2 5 3 3 1 4 1 3 2 3 4 1 2 1 Select an active node. 1 4 2 1 0 t
Select, then relabel/push s 5 5 4 2 3 5 2 3 s 1 4 5 t 0 2 4 3 s 2 6 1 4 1 1 2 5 3 3 1 4 1 3 2 3 4 1 2 4 1 0 t 2 1 One can keep pushing flow between nodes 2 and 5 until eventually all flow returns to node s. There are no paths from nodes 2 and 5 to t, and there are ways to speed up the last iterations.
Push: Saturating 4 3 2 1 3 3 1
Push: Non-Saturating 3 4 2 1 0 3 2 1 3 1
Relabel 3 2 4 2 3 Min{3, 5}+1=4 5 1 1 3 2 4 4 1 3 5 1 1 1
Relabel 3 2 4 2 3 5 1 1 3 2 4 4 3 5 1 Min{3, 5}+1=4 1 1 1
Push: Non-Saturating Case 1 3 Case 2 4 2 1 0 3 2 1 3 4 1 2 1 0 4 2 1 3 1
Why there at most nm saturating Pushes? 4 3 1 3 3 4
Assignments Read sections 7. 3 and 7. 6 Exercises 7. 4
- Slides: 70