the network simplex method

Post on 07-Jan-2016

49 Views

Category:

Documents

5 Downloads

Preview:

Click to see full reader

DESCRIPTION

The Network Simplex Method. Spanning Trees and Basic Feasible Solutions. 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 . - PowerPoint PPT Presentation

TRANSCRIPT

Trees and BFSs Page 1

The Network Simplex Method

Spanning Trees and Basic Feasible Solutions

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.

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)

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.

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.

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

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.

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

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

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.

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.

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.

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.

Trees and BFSs Page 14

BFS 2

51

4

2

3

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

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.

Trees and BFSs Page 17

BFS 3

51

4

2

3

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

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.

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.

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.

top related