The Network Simplex Method
description
Transcript of The Network Simplex Method
![Page 1: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/1.jpg)
Trees and BFSs Page 1
The Network Simplex Method
Spanning Trees and Basic Feasible Solutions
![Page 2: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/2.jpg)
Trees and BFSs Page 2
BFS Spanning Tree
• Theorem 11.10: Every spanning tree of G defines a basis of the MCNFP LP and every basis of the MCNFP LP defines a spanning tree of G.
• There is a one-to-one correspondence between spanning trees and basic solutions.
![Page 3: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/3.jpg)
Trees and BFSs Page 3
MCNFP Example
51
4
2
3
(0,4,5) (0,10,2)
(0,5,5)(0,4,7)
(0,10,4) (0,5,8)
(0,5,10)10
4
-4
-3
-7
(, u, c)
![Page 4: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/4.jpg)
Trees and BFSs Page 4
Flow Balance Constraints
7
4
3
4
10
453525
341445
133534
1225
141312
xxxxxxxxxxxxxx
We can drop one of the constraints.
![Page 5: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/5.jpg)
Trees and BFSs Page 5
Basic Feasible Solutions (BFS)
• We can drop the flow balance constraint for one of the nodes.
• The flow balance constraints form a system of 4 equations with 7 variables.
• Thus, A BFS will have 4 basic variables and 7- 4 = 3 non-basic variables.
![Page 6: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/6.jpg)
Trees and BFSs Page 6
An initial BFS (Solution 1)
• Basic arcs (variables)B = {(1,3), (2,5), (3,5), (4,5)}
• Non-basic arcs at their lower boundsL = {(1,2), (1,4)}
• Non-basic arcs at their upper bounds.U = {(3,4)}
![Page 7: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/7.jpg)
Trees and BFSs Page 7
Flow Balance Constraints
45
35
4
10
45
1335
25
13
xxx
xx
Drop flow balance for node 5 andsubstitute and u values for non-basic arcs.
![Page 8: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/8.jpg)
Trees and BFSs Page 8
Vector-Matrix Form of the Flow-Balance Constraints
1
8
4
10
1000
0101
0010
0001
45
35
25
13
xxxx
![Page 9: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/9.jpg)
Trees and BFSs Page 9
Solving Flow Balance Equations
1
2
4
10
1
8
4
10
1000
0101
0010
00011
45
35
25
13
xxxx
![Page 10: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/10.jpg)
Trees and BFSs Page 10
The Basis Matrix
• Let B be a set of n-1 arcs.• Let AB be the n-1 by n-1 submatrix of the
node-arc incidence matrix formed by taking the columns corresponding to the arcs in B and removing one row.
• The Basis Matrix AB must have an inverse in order for it to correspond to a BFS.
![Page 11: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/11.jpg)
Trees and BFSs Page 11
Results from Linear Algebra
• The determinant of a lower triangular matrix is the product of its diagonal elements.
• A set of n-1 column vectors with n-1 elements each has an inverse if and only if the matrix comprised of these columns has a non-zero determinant.
![Page 12: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/12.jpg)
Trees and BFSs Page 12
Vector-Matrix Form of the Flow-Balance Constraints
1
8
4
10
1000
0101
0010
0001
45
35
25
13
xxxx
This basis matrix is lower triangular.All diagonal elements are 1.Thus, this matrix has an inverse.
![Page 13: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/13.jpg)
Trees and BFSs Page 13
Converting Spanning Trees to Basis Matrices
• Perform a DFS of the underlying, undirected tree.• Traverse the nodes with a reverse thread: visit
node i before pred(i)• Order the nodes (rows) according to the order they
were visited in the reverse thread.• Order the arcs (columns): visit the nodes in order,
and for each node i visited, select the unique arc incident to i on the path in the DFS tree.
![Page 14: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/14.jpg)
Trees and BFSs Page 14
BFS 2
51
4
2
3
![Page 15: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/15.jpg)
Trees and BFSs Page 15
Converting the Spanning Tree to a Basis Matrix
5
1
4
23
Reverse Thread: visit i before pred(i).
4
Arc Order:
(4,5) (2,5) (1,2) (1,3)
5
2
31
1-10
00
0-11
00
00
-1
01
000
-11
![Page 16: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/16.jpg)
Trees and BFSs Page 16
LowerTriangular Basis Matrix
(4,5) (2,5) (1,2) (1,3)
45
2
3
1-10
0
0-11
0
00
-1
0
000
-1
All diagonal elements are +1 or –1.
![Page 17: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/17.jpg)
Trees and BFSs Page 17
BFS 3
51
4
2
3
![Page 18: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/18.jpg)
Trees and BFSs Page 18
Converting the Tree to a Basis Matrix
5
1
4
23
Reverse Thread4
Arc Order:
(3,4) (1,3) (2,5) (1,2)
3
5
21
-1 10
00
0-10
01
00
-1
10
000
-11
![Page 19: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/19.jpg)
Trees and BFSs Page 19
General Case
• Suppose arc (i, j) is in the spanning tree and assume j = pred(i) in the DFS.
• Consider the column corresponding to arc (i, j):– This column will have a +1 or a –1 in the row (r)
corresponding to node i.– The only other non-zero entry in the column will be in
the row for node j which will be below row r.– Thus, the matrix is always lower triangular with +1 or –
1 in all the diagonal elements.
![Page 20: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/20.jpg)
Trees and BFSs Page 20
Tree => Basis Matrix
• Theorem 11.9: The rows and columns of the node-arc incidence matrix of any spanning tree can be rearranged to be lower triangular.
• Every spanning tree of G corresponds to a basis of the minimum-cost network flow problem.
![Page 21: The Network Simplex Method](https://reader036.fdocument.pub/reader036/viewer/2022062309/56813dd0550346895da798c3/html5/thumbnails/21.jpg)
Trees and BFSs Page 21
Cycle => Not a Basis Matrix
i
k
j
000?
110?
011?
101?
000?
),(),(),(?)(?,
k
j
i
ikkjji
(k, i) column is a linear combinationof (i, j) and (j, k) columns.