Primal-Dual Algorithm

Slides:



Advertisements
Similar presentations
15.082J & 6.855J & ESD.78J October 14, 2010 Maximum Flows 2.
Advertisements

Chapter 6 Maximum Flow Problems Flows and Cuts Augmenting Path Algorithm.
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
1 Maximum Flow Networks Suppose G = (V, E) is a directed network. Each edge (i,j) in E has an associated ‘capacity’ u ij. Goal: Determine the maximum amount.
Chapter 7 Maximum Flows: Polynomial Algorithms
Network Optimization Models: Maximum Flow Problems In this handout: The problem statement Solving by linear programming Augmenting path algorithm.
Maximum Flows Lecture 4: Jan 19. Network transmission Given a directed graph G A source node s A sink node t Goal: To send as much information from s.
and 6.855J The Capacity Scaling Algorithm.
15.082J and 6.855J and ESD.78J October 19, 2010 Max Flows 3 Preflow-Push Algorithms.
Maximum Flow Algorithms —— ACM 黄宇翔. 目录 Max-flow min-cut theorem 12 Augmenting path algorithms 3 Push-relabel maximum flow algorithm.
Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)
& 6.855J & ESD.78J Algorithm Visualization The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem.
The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem Thanks to Jim Orlin & MIT OCW.
and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem.
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
and 6.855J March 6, 2003 Maximum Flows 2. 2 Network Reliability u Communication Network u What is the maximum number of arc disjoint paths from.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
1 Maximum Flows CONTENTS Introduction to Maximum Flows (Section 6.1) Introduction to Minimum Cuts (Section 6.1) Applications of Maximum Flows (Section.
Cycle Canceling Algorithm
Network Simplex Animations
Lecture 21 Primal-Dual in Algorithms
Dijkstra’s Algorithm with two levels of buckets
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
Introduction to Maximum Flows
Introduction to Maximum Flows
15.082J & 6.855J & ESD.78J Visualizations
Dijkstra’s Algorithm for the Shortest Path Problem
15.082J & 6.855J & ESD.78J Visualizations
Lecture 6 Shortest Path Problem.
Dijkstra’s Algorithm for the Shortest Path Problem
Breadth first search animation
Lecture 4 Graph Search.
Introduction to Minimum Cost Flows
Not Always Feasible 2 (3,5) 1 s (0,2) 3 (, u) t.
Spanning Tree Algorithms
and 6.855J Flow Decomposition
Complexity of Ford-Fulkerson
Algorithms (2IL15) – Lecture 7
Successive Shortest Path Algorithm
Successive Shortest Path Algorithm
EE5900 Advanced Embedded System For Smart Infrastructure
and 6.855J March 6, 2003 Maximum Flows 2
15.082J & 6.855J & ESD.78J Radix Heap Animation
Network Optimization Depth First Search
Introduction to Algorithms
Min Global Cut Animation
Dijkstra’s Algorithm for Shortest Paths
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
Reading before Lecture 13
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
MAXIMUM flow by Eric Wengert.
Network Optimization Topological Ordering
and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem Obtain a network, and use the same network to illustrate the.
and 6.855J Dijkstra’s Algorithm
Visualizations Dijkstra’s Algorithm
Introduction to Maximum Flows
Network Simplex Animations
and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem Obtain a network, and use the same network to illustrate the.
Eulerian Cycles in directed graphs
and 6.855J Topological Ordering
15.082J & 6.855J & ESD.78J Visualizations
The Minimum Cost Spanning Tree Problem
and 6.855J Depth First Search
Breadth first search animation
Introduction to Maximum Flows
Not Always Feasible 2 (3,5) 1 s (0,2) 3 (, u) t.
Max Flows 3 Preflow-Push Algorithms
Class 11 Max Flows Obtain a network, and use the same network to illustrate the shortest path problem for communication networks, the max flow.
15.082J & 6.855J & ESD.78J Visualizations
Excess Scaling Approach Algorithm
Presentation transcript:

Primal-Dual Algorithm

Self-reducibility Incremental Dynamic Program Primal Primal-Dual Divide-and-Conquer Local Ratio Greedy

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 Optimal solution Optimality condition: Max Primal = Min Dual

Max Flows 3 Preflow-Relable Algorithms 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 1 3 3 2 1

Push: Non-Saturating 3 4 2 1 3 1 2 1 3

Relabel 2 3 4 Min{3,5}+1=4 3 2 5 1 1 1 2 3 4 3 4 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 Obtain a network, and use the same network to illustrate the shortest path problem for communication networks, the max flow problem, the minimum cost flow problem, and the multicommodity flow problem. This will be a very efficient way of introducing the four problems. (Perhaps under 10 minutes of class time.)

Preflow Push 4 2 5 1 3 1 1 2 4 s 4 t 3 2 1 3 This is the original network, and the original residual network.

2 2 1 5 2 s 1 4 t 1 3 Initialize Distances 4 5 4 3 2 1 1 3 1 1 2 4 3 2 5 4 3 2 1 1 3 1 1 2 4 2 s 1 4 t 3 2 2 s 1 3 4 5 1 3 t 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 4 2 2 2 5 1 5 4 3 2 1 1 3 1 1 2 4 6 2 s 1 4 1 t 3 2 2 2 s s 2 1 3 3 4 4 5 1 3 1 t 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 4 2 2 2 1 5 5 4 3 2 1 1 3 1 1 2 4 6 2 s 1 4 1 t 3 2 2 s s 2 1 3 4 5 3 1 1 1 t 1 3 Select an active node, that is, one with excess Push/Relabel Update excess after a push

Select, then relabel/push 3 s 4 2 2 2 1 5 5 4 3 2 1 1 3 1 1 2 4 2 6 s 4 1 1 t 3 2 s s 3 2 1 3 3 4 5 2 1 1 3 1 2 t 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 4 2 2 2 1 5 5 4 3 2 1 1 3 1 1 2 4 2 s 6 1 1 4 t 3 2 s 3 3 s 3 2 1 4 5 2 2 2 2 t 1 1 Select an active node, that is, one with excess Push/Relabel

Select, then relabel/push 3 3 s 1 4 2 2 2 2 2 1 1 5 5 4 3 2 1 3 1 3 1 1 2 4 6 2 s 4 1 1 t 3 2 2 3 s s 3 2 1 4 5 5 2 2 2 t 1 1 Select an active node. Push/Relabel

Select, then relabel/push 3 2 s 1 4 2 2 2 2 5 1 1 5 4 3 2 1 3 1 3 1 1 2 4 s 2 6 1 4 1 t 3 2 s 3 s 3 2 1 4 5 2 2 2 t 1 1 Select an active node. Push/Relabel

Select, then relabel/push 2 3 s 4 1 2 2 2 2 5 2 1 1 5 4 3 2 1 3 1 3 1 1 2 4 6 2 s 4 1 1 t 3 2 3 s s 5 2 3 1 4 5 5 2 2 2 t 1 1 Select an active node. There is no incident admissible arc. So Relabel.

Select, then relabel/push 3 1 2 s 4 1 2 2 2 2 5 2 2 1 5 4 3 2 1 3 1 3 1 1 2 4 6 2 s 4 1 1 t 3 2 3 s s 5 3 4 2 1 4 2 2 2 t 1 1 Select an active node. Push/Relabel

Select, then relabel/push 3 1 2 s 4 1 2 2 2 2 2 2 1 5 3 5 4 3 2 1 3 1 3 1 1 2 4 5 s 2 6 1 1 4 t 3 2 3 s s 5 5 4 2 3 1 4 2 2 2 t 1 1 Select an active node. There is no incident admissible arc. So relabel.

Select, then relabel/push 1 2 3 s 4 1 2 2 2 2 2 2 1 5 3 3 5 4 3 2 1 3 1 3 1 1 2 4 5 6 2 s 1 1 4 t 3 2 s s 3 3 4 2 1 4 5 5 2 2 2 t 1 1 Select an active node. Push/Relabel

Select, then relabel/push 1 s 2 4 2 2 2 2 2 3 3 2 5 1 5 4 3 2 1 2 1 3 1 1 2 4 5 s 2 6 1 4 1 1 1 t 3 2 s 3 s 4 3 4 2 1 4 4 5 5 2 2 2 t 1 1 Select an active node. Push/Relabel

Select, then relabel/push 1 s 4 2 2 2 2 2 4 2 3 2 2 1 3 5 5 4 3 2 1 2 1 3 1 2 1 2 4 5 6 s 2 1 4 1 t 3 2 2 s s 3 4 4 2 3 1 4 5 5 2 2 2 t 1 1 Select an active node. Push/Relabel

Select, then relabel/push 1 s 4 2 2 4 2 2 4 2 3 2 2 1 3 5 5 4 3 2 1 2 1 3 1 2 1 2 4 5 6 s 2 4 1 1 t 3 3 s s 4 4 2 3 1 4 5 5 2 2 2 t 1 1 Select an active node. Push/Relabel

Select, then relabel/push 1 s 1 4 4 2 4 2 2 2 5 3 3 5 2 1 2 3 5 4 3 2 1 5 3 1 3 1 2 1 2 4 5 5 6 2 s 1 4 1 t 3 3 s s 4 3 4 2 1 4 5 5 2 2 2 t 1 1 Select an active node. Push/Relabel

Select, then relabel/push 1 s 1 4 4 2 4 2 2 2 5 3 3 5 2 1 2 3 5 4 3 2 1 5 3 1 3 1 2 1 2 4 5 5 6 2 s 1 4 1 t 3 3 s s 4 3 4 2 1 4 5 5 2 2 2 t 1 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 1 3 3 2 1

Push: Non-Saturating 3 4 2 1 3 1 2 1 3

Relabel 2 3 4 Min{3,5}+1=4 3 2 5 1 1 1 2 3 4 3 4 5 1 1 1

Relabel 2 3 4 3 2 5 1 1 1 2 3 4 3 4 5 1 1 1 Min{3,5}+1=4

Push: Non-Saturating Case 1 Case 2 3 4 3 1 4 2 1 2 1 3 4 1 1 2 1 2 1 3 3 4 1 1 2 1 2 1 3 3

Why there are at most nm saturating Pushes? 4 3 4 1 3 3 1 3 3 4 3

Assignments Read sections 7.3 and 7.6 Exercises 7.4