math models of or: the revised simplex method

32
Math Models of OR: The Revised Simplex Method John E. Mitchell Department of Mathematical Sciences RPI, Troy, NY 12180 USA September 2018 Mitchell The Revised Simplex Method 1 / 25

Upload: others

Post on 03-Dec-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Math Models of OR: The Revised Simplex Method

Math Models of OR:

The Revised Simplex Method

John E. Mitchell

Department of Mathematical Sciences

RPI, Troy, NY 12180 USA

September 2018

Mitchell The Revised Simplex Method 1 / 25

Page 2: Math Models of OR: The Revised Simplex Method

Motivation

Outline

1 Motivation

2 Pivot matrices

3 The revised simplex method

4 A symbolic representation of the pivot matrix and the tableau

Mitchell The Revised Simplex Method 2 / 25

Page 3: Math Models of OR: The Revised Simplex Method

Motivation

Reducing the computation in simplex

At each iteration, we move from a basic feasible solution to a

neighboring basic feasible solution. When we perform a simplex pivot,

we update every entry in the tableau. Do we need to know all theseentries in order to find the next BFS?We need to know:

the pivot column, so we have to find a variable that has a

negative cost. If the current tableau is in optimal form, we need to

check that by looking at every cost cj .

the pivot row, so we need to compute the minimum ratio. This

requires knowledge of the entries in b and the pivot column. Note:once we’ve used the minimum ratio to select the pivot row, we

only need to know two entries in that row in order to update x : the

value on the right hand side, and the value in the pivot column.

the basic sequence, so we know which variable is leaving the

basis.

Mitchell The Revised Simplex Method 3 / 25

Page 4: Math Models of OR: The Revised Simplex Method

Motivation

Reducing the computation in simplex

At each iteration, we move from a basic feasible solution to a

neighboring basic feasible solution. When we perform a simplex pivot,

we update every entry in the tableau. Do we need to know all theseentries in order to find the next BFS?We need to know:

the pivot column, so we have to find a variable that has a

negative cost. If the current tableau is in optimal form, we need to

check that by looking at every cost cj .

the pivot row, so we need to compute the minimum ratio. This

requires knowledge of the entries in b and the pivot column. Note:once we’ve used the minimum ratio to select the pivot row, we

only need to know two entries in that row in order to update x : the

value on the right hand side, and the value in the pivot column.

the basic sequence, so we know which variable is leaving the

basis.

Mitchell The Revised Simplex Method 3 / 25

Page 5: Math Models of OR: The Revised Simplex Method

Motivation

Reducing the computation in simplex

At each iteration, we move from a basic feasible solution to a

neighboring basic feasible solution. When we perform a simplex pivot,

we update every entry in the tableau. Do we need to know all theseentries in order to find the next BFS?We need to know:

the pivot column, so we have to find a variable that has a

negative cost. If the current tableau is in optimal form, we need to

check that by looking at every cost cj .

the pivot row, so we need to compute the minimum ratio. This

requires knowledge of the entries in b and the pivot column. Note:once we’ve used the minimum ratio to select the pivot row, we

only need to know two entries in that row in order to update x : the

value on the right hand side, and the value in the pivot column.

the basic sequence, so we know which variable is leaving the

basis.

Mitchell The Revised Simplex Method 3 / 25

Page 6: Math Models of OR: The Revised Simplex Method

Motivation

Example

For example, consider the tableau, with the circled pivot entry:

#ratio x1 x2 x3 x4 x5

0 �3 �3 0 0 �1

5 5 1 1 1 0 2

3 3 1� �1 0 1 4

basic sequence S = (3, 4).

To determine the pivot position, we need to know the objective function

costs, the right hand side b, and the entries in the pivot column:

#ratio x1 x2 x3 x4 x5

0 �3 �3 0 0 �1

5 5 1 ⇤ ⇤ ⇤ ⇤3 3 1� ⇤ ⇤ ⇤ ⇤

basic sequence S = (3, 4).

Mitchell The Revised Simplex Method 4 / 25

Page 7: Math Models of OR: The Revised Simplex Method

Motivation

Updating x

#ratio x1 x2 x3 x4 x5

0 �3 �3 0 0 �1

5 5 1 ⇤ ⇤ ⇤ ⇤3 3 1� ⇤ ⇤ ⇤ ⇤

basic sequence S = (3, 4).

We can tell from these entries that x1 will replace x4 in the basic

sequence, since x4 is the basic variable corresponding to the pivot row.

We can also calculate the updated entries in b, so we can calculate

the new solution x based just on this part of the tableau:

R0 + 3R2, R1 � R2

�!

x1 x2 x3 x4 x5

9 0 ⇤ ⇤ ⇤ ⇤2 0 ⇤ ⇤ ⇤ ⇤3 1 ⇤ ⇤ ⇤ ⇤

S = (3, 1).

Updated BFS: x3 = 2 and x1 = 3, x2 = x4 = x5 = 0 and value �9.

Mitchell The Revised Simplex Method 5 / 25

Page 8: Math Models of OR: The Revised Simplex Method

Motivation

What about the next pivot?

In order to perform the next pivot, we need to be able to calculate the

updated objective function terms efficiently.

A note on terminology:

the updated objective function entries cj are the reduced costs.

Thus, the entries in the top row of a simplex tableau are known as the

reduced costs of the corresponding variables.

Mitchell The Revised Simplex Method 6 / 25

Page 9: Math Models of OR: The Revised Simplex Method

Pivot matrices

Outline

1 Motivation

2 Pivot matrices

3 The revised simplex method

4 A symbolic representation of the pivot matrix and the tableau

Mitchell The Revised Simplex Method 7 / 25

Page 10: Math Models of OR: The Revised Simplex Method

Pivot matrices

The revised simplex golden rule

Pivoting corresponds to premultiplying the tableau by a pivot matrix.

We find the pivot matrix using the simplex golden rule:

Do unto the identity as you would do unto the tableau.

For our example problem, this gives a pivot matrix:

2

41 0 0

0 1 0

0 0 1

3

5 R0 + 3R2, R1 � R2

�! Q1 =

2

41 0 3

0 1 �1

0 0 1

3

5

Mitchell The Revised Simplex Method 8 / 25

Page 11: Math Models of OR: The Revised Simplex Method

Pivot matrices

Using the pivot matrix

Let’s call the original tableau M0.

If we premultiply M0 by Q1, we get a new tableau:

Q1M0 =

2

41 0 3

0 1 �1

0 0 1

3

50 �3 �3 0 0 �1

5 1 1 1 0 2

3 1 �1 0 1 4

=9 0 �6 0 3 11

2 0 2 1 �1 �2

3 1 �1 0 1 4

=: M1

Mitchell The Revised Simplex Method 9 / 25

Page 12: Math Models of OR: The Revised Simplex Method

Pivot matrices

Comparing with the simplex pivot

The resulting tableau M1 is identical to the one obtained by performing

the pivot on the original tableau:

#ratio x1 x2 x3 x4 x5

0 �3 �3 0 0 �1

5 5 1 1 1 0 2

3 3 1� �1 0 1 4

R0 + 3R2, R1 � R2

�!

x1 x2 x3 x4 x5

9 0 �6 0 3 11

2 0 2 1 �1 �2

3 1 �1 0 1 4

Mitchell The Revised Simplex Method 10 / 25

Page 13: Math Models of OR: The Revised Simplex Method

Pivot matrices

Why do the two approaches agree?

Let’s look at just one entry, a15.

In the pivot, we first divide a25 by the pivot entry (which is just a21 = 1

in this case), and then we subtract a11 multiplied by a25 from a15.

Algebraically, we can write this update to a15 as

a15 a15 � a11a25/a21

= 2 � 1⇥ 4/1 = �2

#ratio x1 x2 x3 x4 x5

0 �3 �3 0 0 �1

5 5 1 1 1 0 2

3 3 1� �1 0 1 4

Mitchell The Revised Simplex Method 11 / 25

↳divide bypivotentry

t o z e r o

o u t a , ,

Page 14: Math Models of OR: The Revised Simplex Method

Pivot matrices

Expressing Q1 in terms of the pivot column

Q1 =

2

41 0 �c1/a21

0 1 �a11/a21

0 0 1/a21

3

5

The updated x5 column of the product Q1M0 is equal to the

matrix-vector product of Q1 with the x5 column of M0:

2

41 0 �c1/a21

0 1 �a11/a21

0 0 1/a21

3

5

2

4c5

a15

a25

3

5 =

2

4⇤

a15 � a25a11/a21

3

5

This is exactly the same formula as calculated for the pivot update.

All the other entries work similarly.

Mitchell The Revised Simplex Method 12 / 25

Page 15: Math Models of OR: The Revised Simplex Method

Finding Q :

f÷÷÷÷j: "dii.is::::.?f÷÷÷)column 1 ofMo: (7)→ [§)

.

I t

±

i n ÷:""::::::::::÷÷o:(ii. ÷÷'t

Page 16: Math Models of OR: The Revised Simplex Method

Pivot matrices

The next iteration

We can now perform another iteration on the updated tableau M1,

M1 =

x1 x2 x3 x4 x5

9 0 �6 0 3 11

2 0 2� 1 �1 �2

3 1 �1 0 1 4

The new pivot column would be the x2 column and the pivot would:

(i) divide row 1 by 2, 1

2R1,

(ii) add 6 copies of row 1 to row 0, R0 + 6R1,(iii) add 1 copy of row 1 to row 2, R2 + R1.

Performing these operations on the identity matrix gives the pivot

matrix Q2:2

41 0 0

0 1 0

0 0 1

3

51

2R1 then R0 + 6R1, R2 + R1

�! Q2 =

2

41 3 0

01

20

01

21

3

5

Mitchell The Revised Simplex Method 13 / 25

basicsequence:

( 3 ,1)

c::::S

Page 17: Math Models of OR: The Revised Simplex Method

Pivot matrices

Premultiply by the pivot matrix

If we premultiply M1 by Q2, we get a new tableau:

Q2M1 =

2

41 3 0

01

20

01

21

3

59 0 �6 0 3 11

2 0 2 1 �1 �2

3 1 �1 0 1 4

=15 0 0 3 0 5

1 0 11

2�1

2�1

4 1 01

2

1

23

=: M2

Mitchell The Revised Simplex Method 14 / 25

basic sequence: (2 ,1)Value: x e l , × , - - 4

(I?I¥)

Page 18: Math Models of OR: The Revised Simplex Method

The revised simplex method

Outline

1 Motivation

2 Pivot matrices

3 The revised simplex method

4 A symbolic representation of the pivot matrix and the tableau

Mitchell The Revised Simplex Method 15 / 25

Page 19: Math Models of OR: The Revised Simplex Method

The revised simplex method

The revised simplex method

The revised simplex method carries out exactly the pivots of the usual

simplex method, but uses pivot matrices to calculate required entries,

and is selective about which entries get calculated.

Note that since we never pivot on the objective function row, the first

column of the pivot matrix is always the first column of the identity

matrix.

We give an example of solving a linear optimization problem with the

revised simplex method in a separate handout.

Mitchell The Revised Simplex Method 16 / 25

i t

Page 20: Math Models of OR: The Revised Simplex Method

A symbolic representation of the pivot matrix and the tableau

Outline

1 Motivation

2 Pivot matrices

3 The revised simplex method

4 A symbolic representation of the pivot matrix and the tableau

Mitchell The Revised Simplex Method 17 / 25

Page 21: Math Models of OR: The Revised Simplex Method

A symbolic representation of the pivot matrix and the tableau

Expressing the pivot matrix symbolically

We have an initial tableau which we can write as

M0 =�d cT

b A

After a few pivots, we end up with a new canonical form tableau

M =�d cT

b A

The sequence of pivots can be represented by a single pivot matrix P.

So we have M = PM0.

Mitchell The Revised Simplex Method 18 / 25

Min c T x

s t . A x e bx 7 0

Page 22: Math Models of OR: The Revised Simplex Method

A symbolic representation of the pivot matrix and the tableau

Treating the basic and nonbasic columns separately

Let us assume without loss of generality that the basic variables

consist of the first m columns of M, by reordering the variables if

necessary. So we can write

M =�d 0T cT

N

b I N

The original tableau can be similarly written

M0 =�d cT

B cTN

b B N

Mitchell The Revised Simplex Method 19 / 25

Page 23: Math Models of OR: The Revised Simplex Method

" ' 'n'' "

'i÷E÷÷÷Original tableau

with s a m e variable ordering:

:÷i¥÷÷i÷÷÷E÷:N

2 invertible

Page 24: Math Models of OR: The Revised Simplex Method

B --f} I ] determinant: titty-41131=-1

B-'=p, i f F . ftp.g"j's cat①" = L -33f}!]

=

[-7-2]%8%1Exercise: check PM.sn/fEuipi;)

Page 25: Math Models of OR: The Revised Simplex Method

A symbolic representation of the pivot matrix and the tableau

Rewriting the pivot matrix

We also choose to write the pivot matrix as

P =

1 �yT

0 G

for some vector y 2 IRm and matrix G 2 IRm⇥m.

Mitchell The Revised Simplex Method 20 / 25

Ty = P Mo

Page 26: Math Models of OR: The Revised Simplex Method

A symbolic representation of the pivot matrix and the tableau

Calculating the pivot

The equation M = PM0 can then be written

M =�d 0T cT

N

b I N

= PM0 =

1 �yT

0 G

��d cT

B cTN

b B N

=�d � yT b cT

B � yT B cTN � yT N

Gb GB GN

Mitchell The Revised Simplex Method 21 / 25

Page 27: Math Models of OR: The Revised Simplex Method

A symbolic representation of the pivot matrix and the tableau

Finding GWe have

�d 0T cTN

b I N=�d � yT b cT

B � yT B cTN � yT N

Gb GB GN

Comparing the entries in the portion of

the constraint matrix corresponding to

the basic variables shows that

I = GB, so G = B�1,

the inverse of the matrix B.

The objective function coefficients for the

basic variables imply

0T = cT

B � yT B, so yT = cTB B�1.

Thus we get

P =

1 �cT

B B�1

0 B�1

We will interpret y and the other terms in M when we discuss duality.

Mitchell The Revised Simplex Method 22 / 25

Fl = P h o

Page 28: Math Models of OR: The Revised Simplex Method

A symbolic representation of the pivot matrix and the tableau

Finding GWe have

�d 0T cTN

b I N=�d � yT b cT

B � yT B cTN � yT N

Gb GB GN

Comparing the entries in the portion of

the constraint matrix corresponding to

the basic variables shows that

I = GB, so G = B�1,

the inverse of the matrix B.

The objective function coefficients for the

basic variables imply

0T = cT

B � yT B, so yT = cTB B�1.

Thus we get

P =

1 �cT

B B�1

0 B�1

We will interpret y and the other terms in M when we discuss duality.

Mitchell The Revised Simplex Method 22 / 25

i t = P h o

Page 29: Math Models of OR: The Revised Simplex Method

A symbolic representation of the pivot matrix and the tableau

Finding GWe have

�d 0T cTN

b I N=�d � yT b cT

B � yT B cTN � yT N

Gb GB GN

Comparing the entries in the portion of

the constraint matrix corresponding to

the basic variables shows that

I = GB, so G = B�1,

the inverse of the matrix B.

The objective function coefficients for the

basic variables imply

0T = cT

B � yT B, so yT = cTB B�1.

Thus we get

P =

1 �cT

B B�1

0 B�1

We will interpret y and the other terms in M when we discuss duality.

Mitchell The Revised Simplex Method 22 / 25

Page 30: Math Models of OR: The Revised Simplex Method

A symbolic representation of the pivot matrix and the tableau

The symbolic version of P for the example

We have

M2 =

x1 x2 x3 x4 x5

15 0 0 3 0 5

1 0 11

2�1

2�1

4 1 01

2

1

23

S = (2, 1)

M0 =

x1 x2 x3 x4 x5

0 �3 �3 0 0 �1

5 1 1 1 0 2

3 1 �1 0 1 4

Since the basic sequence is S = (2, 1), the matrix B contains the

second column followed by the first:

B =

1 1

�1 1

�so B�1 =

1

2

1 �1

1 1

Mitchell The Revised Simplex Method 23 / 25

Page 31: Math Models of OR: The Revised Simplex Method

A symbolic representation of the pivot matrix and the tableau

The symbolic version of P for the example (continued)

Similarly,

cB =

c2

c1

�=

�3

�3

Then

cTB B�1 =

1

2

⇥�3 �3

⇤ 1 �1

1 1

�=

⇥�3 0

Thus,

P =

1 �cT

B B�1

0 B�1

�=

2

41 3 0

01

2�1

2

01

2

1

2

3

5

Mitchell The Revised Simplex Method 24 / 25

y'so r - yCpt'

Page 32: Math Models of OR: The Revised Simplex Method

A symbolic representation of the pivot matrix and the tableau

Checking P

We can calculate

PM0 =

2

41 3 0

01

2�1

2

01

2

1

2

3

50 �3 �3 0 0 �1

5 1 1 1 0 2

3 1 �1 0 1 4

=15 0 0 3 0 5

1 0 11

2�1

2�1

4 1 01

2

1

23

= M2 X

Mitchell The Revised Simplex Method 25 / 25