The Shortest Augmenting Path Algorithm for the Maximum Flow Problem

Slides:



Advertisements
Similar presentations
Max Flow Problem Given network N=(V,A), two nodes s,t of V, and capacities on the arcs: uij is the capacity on arc (i,j). Find non-negative flow fij for.
Advertisements

15.082J & 6.855J & ESD.78J October 14, 2010 Maximum Flows 2.
Chapter 6 Maximum Flow Problems Flows and Cuts Augmenting Path Algorithm.
Network Optimization Models: Maximum Flow Problems
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
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
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
Network Optimization Models: Maximum Flow Problems In this handout: The problem statement Solving by linear programming Augmenting path algorithm.
3 t s the black numbers next to an arc is its capacity.
NetworkModel-1 Network Optimization Models. NetworkModel-2 Network Terminology A network consists of a set of nodes and arcs. The arcs may have some flow.
and 6.855J The Capacity Scaling Algorithm.
Lecture 10 The Label Correcting Algorithm.
CS 4407, Algorithms University College Cork, Gregory M. Provan Network Optimization Models: Maximum Flow Problems In this handout: The problem statement.
& 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.
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.
EMIS 8374 The Ford-Fulkerson Algorithm (aka the labeling algorithm) Updated 4 March 2008.
ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6) (6,8) (3,3) (4,4) (4,10)
Cycle Canceling Algorithm
Network Simplex Animations
Dijkstra’s Algorithm with two levels of buckets
Maximum Flow Solutions
Edmonds-Karp Algorithm
Introduction to Maximum Flows
Introduction to Maximum Flows
15.082J & 6.855J & ESD.78J Visualizations
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.
Lecture 19-Problem Solving 4 Incremental Method
Introduction to Minimum Cost Flows
Augmenting Path Algorithm
Spanning Tree Algorithms
and 6.855J Flow Decomposition
Primal-Dual Algorithm
Complexity of Ford-Fulkerson
Successive Shortest Path Algorithm
Successive Shortest Path Algorithm
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
The Ford-Fulkerson Algorithm
Augmenting Path Algorithm
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
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
Presentation transcript:

The Shortest Augmenting Path Algorithm for the Maximum Flow Problem 15.082 and 6.855J The Shortest Augmenting Path 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.)

Shortest Augmenting Path 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.

Initialize Distances 2 2 1 5 2 s 1 4 t 1 3 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)

Representation of admissible arcs 4 2 2 1 5 5 4 3 2 1 1 3 1 1 2 4 s 2 4 1 t 3 2 2 s 1 3 4 5 3 1 t An arc (i,j) is admissible if d(i) = d(j) + 1. An s-t path of admissible arcs is a shortest path Admissible arcs will be represented with thick lines

Look for a shortest s-t path 4 2 2 1 5 5 4 3 2 1 1 3 1 1 2 2 4 4 2 2 s 1 1 4 t 3 2 2 s 1 3 4 5 1 3 t Start with s and do a depth first search using admissible arcs. Next. Send flow, and update the residual capacities.

Update residual capacities 4 2 2 1 5 5 4 3 2 1 1 3 1 1 2 4 2 s 2 1 4 t 2 3 2 2 s 1 3 4 5 1 3 t Here are the updated residual capacities. We will update distance labels later, as needed.

Look for a shortest s-t path 4 2 2 5 1 5 4 3 2 1 1 3 1 1 4 2 2 s 2 2 4 1 t 2 3 2 2 s 1 3 4 5 1 3 1 t Start with s and do a depth first search using admissible arcs. Next. Send flow, and update the residual capacities.

Update residual capacities 4 2 2 1 5 5 4 3 2 1 1 3 1 1 4 2 2 2 s 1 4 t 2 1 2 s 1 3 4 5 2 2 3 1 t Here are the updated residual capacities. We will update distance labels later, as needed.

Search for a shortest s-t path 4 2 2 1 5 5 4 3 2 1 1 3 1 1 4 2 2 s 2 2 1 4 t 2 1 2 s 1 3 4 5 2 2 1 3 1 t Start with s and do a depth first search using admissible arcs. If there are no admissible arcs from i, then relabel(i) and reverse along the path leading to i.

Update distances and path 4 2 2 1 5 5 4 3 2 1 1 3 1 1 2 4 2 2 s 2 1 4 t 2 1 2 s 3 1 4 5 2 2 1 2 3 1 t Start with s and do a depth first search using admissible arcs. If there are no admissible arcs from i, then relabel(i) and reverse one arc along the path leading from s .

Update distances and path 4 2 2 5 1 5 4 3 2 1 1 3 1 1 4 2 2 s 2 2 3 s 4 1 t 2 1 2 s 3 1 4 5 2 2 1 2 3 1 t Start with s and do a depth first search using admissible arcs. If there are no admissible arcs from i, then relabel(i) and reverse one arc along the path leading from s.

Look for a shortest s-t path 4 2 2 2 1 1 5 5 4 3 2 1 1 3 1 1 4 2 2 s s 3 2 2 4 1 t 2 1 2 3 1 4 5 2 2 1 3 2 1 t Continue the path from where it left off. If the path reaches t, then send flow and update residual capacities.

Update residual capacities 3 2 2 5 1 5 4 3 2 1 1 1 2 1 1 1 2 4 2 s 2 s 2 3 4 1 t 2 1 2 3 1 4 5 2 2 2 1 1 3 t Here are the updated residual capacities.

Search for a shortest s-t path 3 3 2 2 2 1 5 1 5 4 3 2 1 1 1 2 1 1 1 4 2 2 s 2 s 2 3 3 1 4 t 2 1 2 3 1 4 5 2 2 3 1 2 1 t Search for a shortest s-t path starting from s If there are no admissible arcs from i, then relabel(i) and reverse one arc along the path leading from s.

Search for a shortest s-t path 3 3 2 3 2 2 1 5 2 1 5 4 3 2 1 1 1 2 1 1 1 4 2 2 s 2 2 3 3 2 s 1 4 t 2 1 2 3 5 1 4 5 2 2 1 1 3 2 t Search for a shortest s-t path starting from s If there are no admissible arcs from i, then relabel(i) and reverse one arc along the path leading from s.

Search for a shortest s-t path 3 3 2 3 2 2 1 2 5 1 5 4 3 2 1 1 1 2 1 1 1 4 2 2 s 2 2 s 3 3 2 1 1 4 t 2 1 3 5 1 4 5 2 2 2 3 1 1 2 t Search for a shortest s-t path starting from s If the path reaches t, then send flow and update residual capacities.

update the residual capacities 3 3 2 3 2 2 1 1 2 5 5 4 3 2 1 1 1 2 1 1 1 1 4 2 s 2 2 3 2 s 4 1 t 3 3 5 1 4 5 3 2 1 1 3 2 t Here are the updated residual capacities

Search for a shortest s-t path 3 3 3 2 3 2 2 2 2 1 5 1 5 4 3 2 1 1 1 2 1 1 s 1 1 4 2 s 2 4 3 3 2 2 s 1 1 1 4 t 3 3 5 1 4 5 3 2 1 3 1 2 t Search for a shortest s-t path Next: update the residual capacities

Update the residual capacities 2 2 2 2 3 5 1 2 1 5 4 3 2 1 2 1 1 1 s 2 1 2 2 s 3 4 2 3 2 1 1 4 t 4 3 5 1 4 5 3 2 3 1 1 2 t Here are the updated residual capacities

Look for a shortest s-t path 2 5 3 2 3 2 2 1 4 1 2 5 2 5 4 3 2 1 2 2 1 1 1 s 5 2 1 2 2 3 4 6 2 4 2 s 3 4 1 1 t 4 3 5 1 4 5 3 2 2 3 1 1 t update distance labels and path If d(s) > n-1, then there is no path from s to t

These are the residual capacities for the optimum flow 2 3 2 2 5 2 5 1 4 1 2 5 4 5 4 3 2 1 2 2 1 1 1 5 2 1 2 2 3 4 6 2 6 2 s 3 4 1 1 t 4 3 5 1 4 5 3 2 2 3 1 1 t There is no s-t path in the residual network A min cut has S = {s, 2, 5}.