15.082 and 6.855J Topological Ordering
1
Preliminary to Topological Sorting
LEMMA. If each node has at least one arc going out, then the first inadmissible arc of a depth first search determines a directed cycle.
1 4 6 7 3
COROLLARY 1. If G has no directe
15.082 and 6.855J
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
1
Shortest Augmenting Path
2
3 2 3 1 4 1 1
5
1 4 2
s
4 3
t
This is the original network, plus reversals of the arcs.
2
Shortest Augmenting Path
2
3 2 3 1 4 1 1
5
1 4 2
s
15.082 and 6.855J
The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem
Preflow Push
2
3 2 3 1 4 1 1
5
1 4 2
s
4 3
t
This is the original network, plus reversals of the arcs.
Preflow Push
2
3 2 3 1 4 1 1
5
1 4 2
s
4 3
t
This is the origi
15.082 and 6.855J Network Simplex Animations
1
Calculating A Spanning Tree Flow
1 1 -6 2 1 3 5 3 6 -4 7
3
A tree with supplies and demands. (Assume that all other arcs have a flow of 0) What is the flow in arc (4,3)?
2
4
2
Calculating A Spanning Tree Flow
15.082 and 6.855J
Modified Label Correcting Algorithm
1
The Modified Label Correcting Algorithm
2
3 1 6 3 4 3 2
5
3 -2 3
Initialize d(1) := 0; d(j) := for j 1 LIST := cfw_1
0
1
4 3
-4
2
7
6
In next slides: the number inside the node will be d(j).
2
A
15.082 and 6.855J
Min Global Cut Animation
1
Initialize
1
1 5 3 3 2 Saturate the arcs out of node 1. Update the residual network
4 4
1 6 1 5
6
2
Initialize
1 5 4 3 2 1 0 4 6 3 5 2 We will never push from node 1 5 again or into node 1. 5 3 3 3 2 Compute di
15.082 and 6.855J
Label Correcting Algorithm
1
An Example
2
3 1 6 3 4 3 2
4
3 -2 3
Initialize d(1) := 0; d(j) := for j 1
0
1
5 3
-4
2
7
6
In next slides: the number inside the node will be d(j). Violating arcs will be in thick lines.
2
An Example
2
15.082 and 6.855J
The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem
1
Ford-Fulkerson Max Flow
2
3 2 3 1 4 1 1
5
1 2 2
s
4 3
t
This is the original network, plus reversals of the arcs.
2
Ford-Fulkerson Max Flow
2
3 2 3 1 4 1 1
5
1 2
15.082 and 6.855J
Flow Decomposition
1
begin Initialize while y do begin Select(s, y) Search(s, y) if a cycle C is found then do begin let = Capacity(C, y) Add Flow( , C) to cycle flows Subtract Flow( , C) from y. end if a path P is found then do begin le
15.082 and 6.855J
Depth First Search
1
Initialize
2 1 1 pred(1) all Unmark= 0 nodes in N; next := 1 order(next) = Mark node s 1 LIST:= cfw_1 LIST 1 next 1
2
4
8 7
5 3 6
9
Select a node i in LIST
2 1 1 In depth first search, i is the last node in LIST 3 5
15.082 and 6.855J
Cycle Canceling Algorithm
1
A minimum cost flow problem
0 2 30, $7 25 1 25, $5 20, $6 3 0 20, $2 20, $1 5 -25 10, $4 0 4
25, $2
2
The Original Capacities and Feasible Flow
0 2 30,25 25 1 20,0 The feasible flow can be found by solving a m
15.082 and 6.855J Breadth First Search
Breadth first search animation
1
Initialize
2 1 1 pred(1) all Unmark= 0 nodes in N; next := 1 order(next) = Mark node s 1 LIST:= cfw_1 LIST 1 next
Breadth first search animation
4
8 7
5 3 6
9
1
2
Select a node i in L
15.082 and 6.855
Multicommodity Flows 2
1
On the Multicommodity Flow Problem O-D version
K origin-destination pairs of nodes (s1, t1), (s2, t2), ., (sK, tK) Network G = (N, A) dk = amount of flow that must be sent from sk to tk. uij = capacity on (i,j) sh
15.082 and 6.855
The Multicommodity Flow Problem
1
On the Multicommodity Flow Problem O-D version
K origin-destination pairs of nodes (s1, t1), (s2, t2), ., (sK, tK) Network G = (N, A) dk = amount of flow that must be sent from sk to tk. uij = capacity on
15.082J and 6.855J
Lagrangian Relaxation 2 xAlgorithms xApplication to LPs
1
The Constrained Shortest Path Problem
2
(1,10) (1,2)
(1,1) (2,3) (5,7)
4
(1,7)
1
(10,1) (2,2)
6
(10,3)
3
(12,3)
5
Find the shortest path from node 1 to node 6 with a transit time
15.082 and 6.855J
Lagrangian Relaxation I never missed the opportunity to remove obstacles in the way of unity.
-Mohandas Gandhi
1
On bounding in optimization
In solving network flow problems, we not only solve the problem, but we provide a guarantee that
15.082J and 6.855J
Generalized Flows
1
Overview of Generalized Flows
Suppose one unit of flow is sent in (i,j). We relax the assumption that one unit arrives at node j. If 1 unit is sent from i, ij units arrive at j. ij is called the multiplier of (i,j) i
15.082 and 6.855J
Review of Linear Programming
1
Overview
Describe LP and IP min cost flow as an LP Graphical solution Basic feasible solutions. Simplex Method Basic feasible solutions in matrix form Duality Note: this will cover lots of material. We will
15.082 and 6.855
The Minimum Cost Spanning Tree Problem
1
Communications Systems
Consider a communications company, such as AT&T or GTE that needs to build a communication network that connects n different users. The cost of making a link joining i and j
15.082 and 6.855J
The Network Simplex Algorithm
1
Calculating A Spanning Tree Flow
1 1 -6 2 1 3 5 3 6 -4 7
3
A tree with supplies and demands. (Assume that all other arcs have a flow of 0) What is the flow in arc (4,3)?
2
4
See the animation.
2
What would
15.082 and 6.855J
The Successive Shortest Path Algorithm and the Capacity Scaling Algorithm for the Minimum Cost Flow Problem
1
Pseudo-Flows
A pseudo-flow is a "flow" vector x such that 0 x u. Let e(i) denote the excess (deficit) at node i. The infeasibli
15.082 and 6.855J
April 3, 2003
Introduction to Minimum Cost Flows
1
The Minimum Cost Flow Problem
uij = capacity of arc (i,j). cij = unit cost of shipping flow from node i to node j on (i,j). xij = amount shipped on arc (i,j) Minimize j xij (i,j)A cijxij
15.082 and 6.855J April 1, 2003
The Global Min Cut problem
1
Global Min cut
INPUT: A network G = (N, A) OUTPUT: A cut (S, N\S) such that cap(S, N\S) is minimum. Note: We do not assume that there is a source node s and destination node t. Typically, but no
15.082 and 6.855J March 13, 2003 Max Flows 4
1
Overview of today's lecture
x
Very quick review of Preflow Push Algorithm The Excess Scaling Algorithm O(n2 log U) non-saturating pushes O(nm + n2 log U) running time. A proof that Highest Preflow Push uses O
15.082 and 6.855J March 11, 2003
Max Flows 3 Preflow-Push Algorithms
1
Review of Augmenting Paths
At each iteration: maintain a flow x Let G(x) be the residual network At each iteration, find a path from s to t in G(x). In the shortest augmenting path alg