Title: 15.082 and 6.855J
115.082 and 6.855J
- Network Simplex Animations
2Calculating A Spanning Tree Flow
A tree with supplies and demands. (Assume that
all other arcs have a flow of 0)
1
1
-6
2
7
3
1
3
6
-4
What is the flow in arc (4,3)?
2
4
5
3
3Calculating A Spanning Tree Flow
To calculate flows, iterate up the tree, and find
an arc whose flow is uniquely determined.
1
1
-6
2
7
3
1
3
6
-4
2
What is the flow in arc (5,3)?
2
4
5
3
4Calculating A Spanning Tree Flow
1
1
What is the flow in arc (3,2)?
-6
2
7
3
1
3
6
-4
2
3
2
4
5
3
5Calculating A Spanning Tree Flow
1
1
What is the flow in arc (2,6)?
-6
2
7
3
6
1
3
6
-4
2
3
2
4
5
3
6Calculating A Spanning Tree Flow
1
1
What is the flow in arc (7,1)?
-6
2
7
3
6
4
1
3
6
-4
2
3
2
4
5
3
7Calculating A Spanning Tree Flow
1
1
What is the flow in arc (1,6)?
3
-6
2
7
3
6
4
1
3
6
-4
2
3
2
4
5
3
8Calculating A Spanning Tree Flow
1
1
Note there are two different ways of
calculating the flow on (1,2), and both ways give
a flow of 4. Is this a coincidence?
4
3
-6
2
7
3
6
4
1
3
6
-4
2
3
2
4
5
3
9Calculating Simplex Multipliers for a Spanning
Tree
1
Here is a spanning tree with arc costs. How can
one choose node potentials so that reduced costs
of tree arcs is 0?
5
-6
2
7
-4
3
3
6
-2
1
Recall the reduced cost of (i,j) is cij - ?i
?j
4
5
10Calculating Simplex Multipliers for a Spanning
Tree
There is a redundant constraint in the minimum
cost flow problem.
0
1
5
-6
2
7
One can set ?1 arbitrarily. We will let ?i 0.
-4
3
3
6
-2
1
What is the simplex multiplier for node 2?
4
5
11Calculating Simplex Multipliers for a Spanning
Tree
The reduced cost of (1,2) is c12 - ?1 ?2
0. Thus 5 - 0 ?2 0.
0
1
5
-6
-5
2
7
-4
3
3
6
-2
1
What is the simplex multiplier for node 7?
4
5
12Calculating Simplex Multipliers for a Spanning
Tree
The reduced cost of (1,2) is c71 - ?7 ?1
0. Thus -6 - ?2 0 0.
0
1
5
-6
-5
2
7
-4
3
-6
3
6
What is the simplex multiplier for node 3?
-2
1
4
5
13Calculating Simplex Multipliers for a Spanning
Tree
0
1
5
-6
-5
2
7
-4
3
-6
-2
3
6
What is the simplex multiplier for node 6?
-2
1
4
5
14Calculating Simplex Multipliers for a Spanning
Tree
0
1
5
-6
-5
2
7
-4
3
-6
-2
3
6
-1
What is the simplex multiplier for node 4?
-2
1
4
5
15Calculating Simplex Multipliers for a Spanning
Tree
0
1
5
-6
-5
2
7
-4
3
-6
-2
3
6
-1
What is the simplex multiplier for node 5?
-2
1
-4
4
5
16Calculating Simplex Multipliers for a Spanning
Tree
0
These are the simplex multipliers associated with
this tree. They do not depend on arc flows, nor
on costs of non-tree arcs.
1
5
-6
-5
2
7
-4
3
-6
-2
3
6
-1
-2
1
-4
4
-1
5
17Network Simplex Algorithm
2
-4
2, 4
1
4
4, 2
3, 4
4, 2
3
4, 1
1, 4
3, 5
5, 5
2
5
5
-3
The minimum Cost Flow Problem
18Spanning tree flows
T L U
2
-4
1
1
4
1
3
0
3
0
0
2
3
2
5
5
-3
An Initial Spanning Tree Solution
19Simplex Multipliers and Reduced Costs
T L U
0
-4
0
1
4
0
2
3
c45 2
?
3
-2
4
0
0
2
5
3
-2
What arcs are violating?
The initial simplex multipliers and reduced costs
20Add a violating arc to the spanning tree,
creating a cycle
T L U
u14, x14
2, 1
1
4
4,1
3,3
4, 0
3
4,0
1, 0
3,2
5, 3
2
5
What is the cycle, and how much flow can be sent?
Arc (2,1) is added to the tree
21Send Flow Around the Cycle
T L U
u14, x14
2, 1
1
4
4,3
3,3
4, 0
3
4,2
1, 0
3,0
5, 3
2
5
What is the next spanning tree?
2 units of flow were sent along the cycle.
22After a pivot
T L U
u14, x14
2, 1
1
4
4,3
3,3
4, 0
3
4,2
1, 0
3,0
5, 3
2
5
In a pivot, an arc is added to T and an arc is
dropped from T.
The Updated Spanning Tree
23Updating the Multipliers
T L U
0
-4
0
1
4
0
2
3
4
3
-2
4
0
0
2
5
How can we make cp21 0 and have other tree arcs
have a 0 reduced cost?
3
-2
The current multipliers and reduced costs
24Deleting (2,1) from T splits T into two parts
T L U
0
-4
0
1
4
0
2
3
4
3
-2
4
0
0
2
5
What value of ? should be chosen to make the
reduced cost of (2,1) 0?
3?
-2?
Adding ? to nodes on one side of the tree does
not effect the reduced costs of any tree arc
except (2,1). Why?
25The updated multipliers and reduced costs
T L U
0
-4
0
1
4
0
2
3
2
3
0
2
2
0
2
5
Is this tree solution optimal?
1
-4
The updated multipliers and reduced costs
26Add a violating arc to the spanning tree,
creating a cycle
T L U
2, 1
1
4
4,3
3,3
4, 0
3
4,2
1, 0
3,0
5, 3
2
5
What is the cycle, and how much flow can be sent?
Add arc (3,4) to the spanning tree
27Send Flow Around the Cycle
T L U
2, 2
1
4
4,2
3,2
4, 0
3
4,2
1, 0
3,0
5, 3
2
5
What is the next spanning tree solution?
1 unit of flow was sent around the cycle.
28The next spanning tree solution
T L U
2, 2
1
4
4,2
3,2
4, 0
3
4,2
1, 0
3,0
5, 3
2
5
Here is the updated spanning tree solution
29Updated the multipliers
T L U
0
-4
0
1
4
0
2
3
2
3
0
2
2
0
2
5
How should we modify the multipliers?
1
-4
Here are the current multipliers
30Updated the multipliers
T L U
0
-4 ?
0
1
4
0
2
3
2
3
0
2
2
0
2
5
What value should ? be?
1
-4
Here are the current multipliers
31The updated multipliers
T L U
0
-6
-2
1
4
0
0
3
4
3
0
2
2
0
2
5
Is the current spanning tree solution optimal?
1
-4
Here are the updated multipliers.
32The Optimal Solution
T L U
0
-6
-2
1
4
0
0
3
4
3
0
2
2
0
2
5
No arc violates the optimality conditions.
1
-4
Here is the optimal solution.
33Finding the Cycle
1
8
7
2
3
6
9
12
10
11
5
34Use Depth and Predecessor
0
1
8
7
depth(5) 4 depth(3) 2 replace node 5 by
pred(5)
2
2
3
6
9
12
10
11
4
5
35Use Depth and Predecessor
0
1
8
7
depth(9) 3 depth(3) 2 replace node 9 by
pred(9)
2
2
3
6
9
12
3
10
11
5
36Use Depth and Predecessor
0
1
8
7
depth(2) 2 depth(3) 2 replace node 2 by
pred(2) replace node 3 by pred(3)
2
2
2
3
6
9
12
10
11
5
37Use Depth and Predecessor
0
1
1
1
8
7
depth(8) 1 depth(7) 1 replace node 8 by
pred(8) replace node 7 by pred(1)
2
3
6
9
12
10
11
5
38Use Depth and Predecessor
0
1
8
7
The least common ancestor of nodes 3 and 5 has
been found.
2
3
6
9
12
10
11
5
39Updating the multipliers use the thread and
depth
1
Suppose that arc (1,8) will drop out of the tree.
What is the subtree rooted at node 8?
8
7
2
3
6
9
12
10
11
5
40Follow the thread starting with node 8
1
What is thread(8)?
8
7
2
3
6
9
12
10
11
5
41Follow the thread starting with node 8
1
What is thread(3)?
8
7
2
3
6
9
12
10
11
5
42Follow the thread starting with node 8
1
What is thread(10)?
8
7
2
3
6
9
12
10
11
5
43Follow the thread starting with node 8
1
What is thread(11)?
8
7
2
3
6
9
12
10
11
5
44Follow the thread starting with node 8
1
What is thread(6)?
8
7
2
3
6
9
12
10
11
5
45The stopping rule
Stopping rule stop when depth(current node) ?
depth(8)
1
depth 1
8
7
depth 1
2
3
6
9
12
10
11
5