Presentation is loading. Please wait.

Presentation is loading. Please wait.

Trees and BFSs Page 1 The Network Simplex Method Spanning Trees and Basic Feasible Solutions.

Similar presentations


Presentation on theme: "Trees and BFSs Page 1 The Network Simplex Method Spanning Trees and Basic Feasible Solutions."— Presentation transcript:

1 Trees and BFSs Page 1 The Network Simplex Method Spanning Trees and Basic Feasible Solutions

2 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.

3 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)

4 Trees and BFSs Page 4 Flow Balance Constraints We can drop one of the constraints.

5 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.

6 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 bounds L = {(1,2), (1,4)} Non-basic arcs at their upper bounds. U = {(3,4)}

7 Trees and BFSs Page 7 Flow Balance Constraints Drop flow balance for node 5 and substitute and u values for non-basic arcs.

8 Trees and BFSs Page 8 Vector-Matrix Form of the Flow- Balance Constraints

9 Trees and BFSs Page 9 Solving Flow Balance Equations

10 Trees and BFSs Page 10 The Basis Matrix Let B be a set of n-1 arcs. Let A B 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 A B must have an inverse in order for it to correspond to a BFS.

11 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.

12 Trees and BFSs Page 12 Vector-Matrix Form of the Flow- Balance Constraints This basis matrix is lower triangular. All diagonal elements are 1. Thus, this matrix has an inverse.

13 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.

14 Trees and BFSs Page 14 BFS 2 51 4 2 3

15 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 3 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1

16 Trees and BFSs Page 16 LowerTriangular Basis Matrix (4,5)(2,5)(1,2)(1,3) 4 5 2 3 1 0 0 0 1 0 0 0 0 0 0 0 All diagonal elements are +1 or –1.

17 Trees and BFSs Page 17 BFS 3 51 4 2 3

18 Trees and BFSs Page 18 Converting the Tree to a Basis Matrix 5 1 4 23 Reverse Thread 4 Arc Order: (3,4)(1,3)(2,5)(1,2) 3 5 2 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1

19 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.

20 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.

21 Trees and BFSs Page 21 Cycle => Not a Basis Matrix i k j (k, i) column is a linear combination of (i, j) and (j, k) columns.


Download ppt "Trees and BFSs Page 1 The Network Simplex Method Spanning Trees and Basic Feasible Solutions."

Similar presentations


Ads by Google