math 407: linear optimizationburke/crs/407/...information associated with the lp. max5x 1 + 4x 2 +...

95
Math 407: Linear Optimization Lecture 5: Simplex Algorithm I Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 1 / 35

Upload: others

Post on 15-Nov-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Math 407: Linear Optimization

Lecture 5: Simplex Algorithm I

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 1 / 35

Page 2: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

1 Dictionaries, Augmented Matrices, the Simplex TableauDictionariesThe Simplex Tableau

2 Basic Feasible Solutions (BFS)

3 The Grand Strategy: Pivoting

4 The Simplex Algorithm in Matrix Form

5 The Simplex Algorithm in Matrix Form

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 2 / 35

Page 3: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Simplex Algorithm

We develop a method for solving standard form LPs by considering thefollowing example.

max 5x1 + 4x2 + 3x3

s.t. 2x1 + 3x2 + x3 ≤ 5

4x1 + x2 + 2x3 ≤ 11

3x1 + 4x2 + 2x3 ≤ 8

0 ≤ x1, x2, x3

At this point we only have one tool for attacking linear systems.Gaussian elimination, a method for solving linear systems of equations.Let’s try to use it to solve LPs.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 3 / 35

Page 4: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Simplex Algorithm

We develop a method for solving standard form LPs by considering thefollowing example.

max 5x1 + 4x2 + 3x3

s.t. 2x1 + 3x2 + x3 ≤ 5

4x1 + x2 + 2x3 ≤ 11

3x1 + 4x2 + 2x3 ≤ 8

0 ≤ x1, x2, x3

At this point we only have one tool for attacking linear systems.Gaussian elimination, a method for solving linear systems of equations.Let’s try to use it to solve LPs.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 3 / 35

Page 5: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Dictionaries

We must first build a linear system of equations that encodes all of theinformation associated with the LP.

max 5x1 + 4x2 + 3x3

s.t. 2x1 + 3x2 + x3 ≤ 5

4x1 + x2 + 2x3 ≤ 11

3x1 + 4x2 + 2x3 ≤ 8

0 ≤ x1, x2, x3

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 4 / 35

Page 6: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Slack Variables and Dictionaries

For each linear inequality we introduce a new variable, called a slackvariable, so that we can write each linear inequality as an equation.

x4 = 5 − [2x1 + 3x2 + x3] ≥ 0,x5 = 11 − [4x1 + x2 + 2x3] ≥ 0,x6 = 8 − [3x1 + 4x2 + 2x3] ≥ 0.

Slack Variables: x4, x5, x6

Next we introduce a variable to represent the objective.

z = 5x1 + 4x2 + 3x3.

This system of equations is called a dictionary for the the LP.The slack variables and the objective are defined by the original decisionvariables.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 5 / 35

Page 7: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Slack Variables and Dictionaries

For each linear inequality we introduce a new variable, called a slackvariable, so that we can write each linear inequality as an equation.

x4 = 5 − [2x1 + 3x2 + x3] ≥ 0,x5 = 11 − [4x1 + x2 + 2x3] ≥ 0,x6 = 8 − [3x1 + 4x2 + 2x3] ≥ 0.

Slack Variables: x4, x5, x6

Next we introduce a variable to represent the objective.

z = 5x1 + 4x2 + 3x3.

This system of equations is called a dictionary for the the LP.The slack variables and the objective are defined by the original decisionvariables.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 5 / 35

Page 8: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Slack Variables and Dictionaries

For each linear inequality we introduce a new variable, called a slackvariable, so that we can write each linear inequality as an equation.

x4 = 5 − [2x1 + 3x2 + x3] ≥ 0,x5 = 11 − [4x1 + x2 + 2x3] ≥ 0,x6 = 8 − [3x1 + 4x2 + 2x3] ≥ 0.

Slack Variables: x4, x5, x6

Next we introduce a variable to represent the objective.

z = 5x1 + 4x2 + 3x3.

This system of equations is called a dictionary for the the LP.The slack variables and the objective are defined by the original decisionvariables.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 5 / 35

Page 9: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Dictionaries, Augmented Matrices, the Simplex Tableau

The LP is now encoded as the system

2x1 + 3x2 + x3 + x4 = 54x1 + x2 + 2x3 + x5 = 11

3x2 + 4x2 + 2x3 + x6 = 8−z + 5x1 + 4x2 + 3x3 = 0

0 ≤ x1, x2, x3, x4, x5, x6.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 6 / 35

Page 10: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Dictionaries, Augmented Matrices, the Simplex Tableau

The associated augmented matrix is0 2 3 1 1 0 0 50 4 1 2 0 1 0 110 3 4 2 0 0 1 8−1 5 4 3 0 0 0 0

with 0 ≤ x1, x2, x3, x4, x5, x6.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 7 / 35

Page 11: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Dictionaries, Augmented Matrices, the Simplex Tableau

The associated augmented matrix is0 2 3 1 1 0 0 50 4 1 2 0 1 0 110 3 4 2 0 0 1 8

−1 5 4 3 0 0 0 0

with 0 ≤ x1, x2, x3, x4, x5, x6.

This augmented matrix is called the initial simplex tableau.The simplex tableau is nothing more than an augmented matrix for thelinear system that relates all of the LP variables.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 8 / 35

Page 12: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Basic and Nonbasic Variables

Recall the initial dictionary for our LP:

x4 = 5 −2x1 −3x2 −x3x5 = 11 −4x1 −x2 −2x3x6 = 8 −3x1 −4x2 −2x3z = 5x1 +4x2 +3x3

basic nonbasic

We call the decision variables on the left (x4, x4, x6) the basic variables,and those on the right the nonbasic variables (x1, x2, x3).

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 9 / 35

Page 13: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Basic and Nonbasic Variables

Recall the initial dictionary for our LP:

x4 = 5 −2x1 −3x2 −x3x5 = 11 −4x1 −x2 −2x3x6 = 8 −3x1 −4x2 −2x3z = 5x1 +4x2 +3x3

basic nonbasic

We call the decision variables on the left (x4, x4, x6) the basic variables,and those on the right the nonbasic variables (x1, x2, x3).

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 9 / 35

Page 14: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Basic Solutions Identified by Dictionaries

We think of the nonbasic variables as taking the value zero. Thisdetermines the value of the basic variables and the objective z .

x4 = 5 −2x1 −3x2 −x3x5 = 11 −4x1 −x2 −2x3x6 = 8 −3x1 −4x2 −2x3z = 5x1 +4x2 +3x3

Nonbasic: x1 = x2 = x3 = 0Basic: x4 = 5, x5 = 11, x6 = 8, z = 0

This is called the basic solution associated with this dictionary.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 10 / 35

Page 15: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Basic Solutions Identified by Dictionaries

We think of the nonbasic variables as taking the value zero. Thisdetermines the value of the basic variables and the objective z .

x4 = 5 −2x1 −3x2 −x3x5 = 11 −4x1 −x2 −2x3x6 = 8 −3x1 −4x2 −2x3z = 5x1 +4x2 +3x3

Nonbasic: x1 = x2 = x3 = 0Basic: x4 = 5, x5 = 11, x6 = 8, z = 0

This is called the basic solution associated with this dictionary.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 10 / 35

Page 16: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Basic Solutions Identified by Dictionaries

We think of the nonbasic variables as taking the value zero. Thisdetermines the value of the basic variables and the objective z .

x4 = 5 −2x1 −3x2 −x3x5 = 11 −4x1 −x2 −2x3x6 = 8 −3x1 −4x2 −2x3z = 5x1 +4x2 +3x3

Nonbasic: x1 = x2 = x3 = 0Basic: x4 = 5, x5 = 11, x6 = 8, z = 0

This is called the basic solution associated with this dictionary.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 10 / 35

Page 17: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Basic Feasible Solutions (BFS)

The basic solution

x1 = x2 = x3 = 0 x4 = 5, x5 = 11, x6 = 8

is feasible for the LP

max 5x1 + 4x2 + 3x3

s.t. 2x1 + 3x2 + x3 ≤ 5

4x1 + x2 + 2x3 ≤ 11

3x1 + 4x2 + 2x3 ≤ 8

0 ≤ x1, x2, x3

Such basic solutions are called basic feasible solutions (BFS).The associated dictionary is said to be a feasible dictionary.

In particular, this LP is said to have feasible origin, i.e.(x1, x2, x3) = (0, 0, 0) is feasible.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 11 / 35

Page 18: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Basic Feasible Solutions (BFS)

The basic solution

x1 = x2 = x3 = 0 x4 = 5, x5 = 11, x6 = 8

is feasible for the LP

max 5x1 + 4x2 + 3x3

s.t. 2x1 + 3x2 + x3 ≤ 5

4x1 + x2 + 2x3 ≤ 11

3x1 + 4x2 + 2x3 ≤ 8

0 ≤ x1, x2, x3

Such basic solutions are called basic feasible solutions (BFS).The associated dictionary is said to be a feasible dictionary.In particular, this LP is said to have feasible origin, i.e.(x1, x2, x3) = (0, 0, 0) is feasible.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 11 / 35

Page 19: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Grand Strategy: Pivoting

Move from one feasible dictionary to another increasing the value of theobjective each time.

x4 = 5 −2x1 −3x2 −x3x5 = 11 −4x1 −x2 −2x3x6 = 8 −3x1 −4x2 −2x3z = 5x1 +4x2 +3x3

↑ ↑ ↑

We do this by choosing a nonbasic variable with a positive coefficient, andthen increase its value from zero as much as we can while maintainingfeasibility.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 12 / 35

Page 20: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Grand Strategy: Pivoting

Move from one feasible dictionary to another increasing the value of theobjective each time.

x4 = 5 −2x1 −3x2 −x3x5 = 11 −4x1 −x2 −2x3x6 = 8 −3x1 −4x2 −2x3z = 5x1 +4x2 +3x3

↑ ↑ ↑

We do this by choosing a nonbasic variable with a positive coefficient, andthen increase its value from zero as much as we can while maintainingfeasibility.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 12 / 35

Page 21: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Grand Strategy: Pivoting

Move from one feasible dictionary to another increasing the value of theobjective each time.

x4 = 5 −2x1 −3x2 −x3x5 = 11 −4x1 −x2 −2x3x6 = 8 −3x1 −4x2 −2x3z = 5x1 +4x2 +3x3

↑ ↑

We do this by choosing a nonbasic variable with a positive coefficient, andthen increase its value from zero as much as we can while maintainingfeasibility.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 12 / 35

Page 22: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Grand Strategy: Pivoting

Move from one feasible dictionary to another increasing the value of theobjective each time.

x4 = 5 −2x1 −3x2 −x3x5 = 11 −4x1 −x2 −2x3x6 = 8 −3x1 −4x2 −2x3z = 5x1 +4x2 +3x3

We do this by choosing a nonbasic variable with a positive coefficient, andthen increase its value from zero as much as we can while maintainingfeasibility.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 12 / 35

Page 23: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Grand Strategy: Pivoting

Move from one feasible dictionary to another increasing the value of theobjective each time.

x4 = 5 −2x1 −3x2 −x3x5 = 11 −4x1 −x2 −2x3x6 = 8 −3x1 −4x2 −2x3z = 5x1 +4x2 +3x3

↑ ↑

We do this by choosing a nonbasic variable with a positive coefficient, andthen increase its value from zero as much as we can while maintainingfeasibility.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 12 / 35

Page 24: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Pivoting

Let us increase the value of x1 from zero.How much can we increase x1 and keep all other variables non-negative?

Consider the equation

0 ≤ x4 = 5− 2x1 − 3x2 − x3 .

Keeping x4 non-negative implies that we cannot increase x1 by more than5/2. Any further increase will push x4 negative.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 13 / 35

Page 25: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Pivoting

Let us increase the value of x1 from zero.How much can we increase x1 and keep all other variables non-negative?Consider the equation

0 ≤ x4 = 5− 2x1 − 3x2 − x3 .

Keeping x4 non-negative implies that we cannot increase x1 by more than5/2. Any further increase will push x4 negative.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 13 / 35

Page 26: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Pivoting

Let us increase the value of x1 from zero.How much can we increase x1 and keep all other variables non-negative?Consider the equation

0 ≤ x4 = 5− 2x1 − 3x2 − x3 .

Keeping x4 non-negative implies that we cannot increase x1 by more than5/2. Any further increase will push x4 negative.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 13 / 35

Page 27: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Pivoting

Next consider the variable x5:

0 ≤ x5 = 11− 4x1 − x2 − 2x3 .

Therefore, we cannot increase x1 by more than 11/4.

Similarly, for x6 we have

0 ≤ x6 = 8− 3x1 − 4x2 − 2x3 .

Therefore, we cannot increase x1 by more than 8/3.Hence, we must have

x1 ≤ min{5/2, 11/4, 8/3} = 5/2 .

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 14 / 35

Page 28: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Pivoting

Next consider the variable x5:

0 ≤ x5 = 11− 4x1 − x2 − 2x3 .

Therefore, we cannot increase x1 by more than 11/4.

Similarly, for x6 we have

0 ≤ x6 = 8− 3x1 − 4x2 − 2x3 .

Therefore, we cannot increase x1 by more than 8/3.Hence, we must have

x1 ≤ min{5/2, 11/4, 8/3} = 5/2 .

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 14 / 35

Page 29: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Pivoting

Next consider the variable x5:

0 ≤ x5 = 11− 4x1 − x2 − 2x3 .

Therefore, we cannot increase x1 by more than 11/4.

Similarly, for x6 we have

0 ≤ x6 = 8− 3x1 − 4x2 − 2x3 .

Therefore, we cannot increase x1 by more than 8/3.

Hence, we must have

x1 ≤ min{5/2, 11/4, 8/3} = 5/2 .

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 14 / 35

Page 30: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Pivoting

Next consider the variable x5:

0 ≤ x5 = 11− 4x1 − x2 − 2x3 .

Therefore, we cannot increase x1 by more than 11/4.

Similarly, for x6 we have

0 ≤ x6 = 8− 3x1 − 4x2 − 2x3 .

Therefore, we cannot increase x1 by more than 8/3.Hence, we must have

x1 ≤ min{5/2, 11/4, 8/3} = 5/2 .

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 14 / 35

Page 31: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Pivoting

ratios

x4 = 5 −2x1 −3x2 −x3

5/2 ← smallest ratio

x5 = 11 −4x1 −x2 −2x3

11/4

x6 = 8 −3x1 −4x2 −2x3

8/3

z = 5x1 +4x2 +3x3

If we increase x1 to 5/2, then x4 decreases to zero.In this case we say x4 leaves the basis and x1 enters.Moving x4 to the rhs and x1 to the lhs gives

x1 = 5/2− 1

2x4 −

3

2x2 −

1

2x3.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 15 / 35

Page 32: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Pivoting

ratiosx4 = 5 −2x1 −3x2 −x3 5/2 ← smallest ratiox5 = 11 −4x1 −x2 −2x3 11/4x6 = 8 −3x1 −4x2 −2x3 8/3z = 5x1 +4x2 +3x3

If we increase x1 to 5/2, then x4 decreases to zero.In this case we say x4 leaves the basis and x1 enters.Moving x4 to the rhs and x1 to the lhs gives

x1 = 5/2− 1

2x4 −

3

2x2 −

1

2x3.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 15 / 35

Page 33: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Pivoting

ratiosx4 = 5 −2x1 −3x2 −x3 5/2 ← smallest ratiox5 = 11 −4x1 −x2 −2x3 11/4x6 = 8 −3x1 −4x2 −2x3 8/3z = 5x1 +4x2 +3x3

If we increase x1 to 5/2, then x4 decreases to zero.In this case we say x4 leaves the basis and x1 enters.

Moving x4 to the rhs and x1 to the lhs gives

x1 = 5/2− 1

2x4 −

3

2x2 −

1

2x3.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 15 / 35

Page 34: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Pivoting

ratiosx4 = 5 −2x1 −3x2 −x3 5/2 ← smallest ratiox5 = 11 −4x1 −x2 −2x3 11/4x6 = 8 −3x1 −4x2 −2x3 8/3z = 5x1 +4x2 +3x3

If we increase x1 to 5/2, then x4 decreases to zero.In this case we say x4 leaves the basis and x1 enters.Moving x4 to the rhs and x1 to the lhs gives

x1 = 5/2− 1

2x4 −

3

2x2 −

1

2x3.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 15 / 35

Page 35: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Pivoting

We now have

x1 = (5/2) −(1/2)x4 −(3/2)x2 −(1/2)x3x5 = 11 −4x1 −x2 −2x3x6 = 8 −3x1 −4x2 −2x3z = 5x1 +4x2 +3x3

Use the first equation to remove x1 from the rhs to recover a dictionary.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 16 / 35

Page 36: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Pivoting

x1 =5

2− 1

2x4 −

3

2x2 −

1

2x3

x5 = 11− 4

(5

2− 1

2x4 −

3

2x2 −

1

2x3

)− x2 − 2x3

= 1 + 2x4 + 5x2

x6 = 8− 3

(5

2− 1

2x4 −

3

2x2 −

1

2x3

)− 4x2 − 2x3

=1

2+

3

2x4 +

1

2x2 −

1

2x3

z = 5

(5

2− 1

2x4 −

3

2x2 −

1

2x3

)+ 4x2 + 3x3

=25

2− 5

2x4 −

7

2x2 +

1

2x3.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 17 / 35

Page 37: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

New Dictionary

x1 =5

2− 1

2x4 −

3

2x2 −

1

2x3

x5 = 1 + 2x4 + 5x2

x6 =1

2+

3

2x4 +

1

2x2 −

1

2x3

z =25

2− 5

2x4 −

7

2x2 +

1

2x3,

New BFSNonbasic Variables: x4 = x2 = x3 = 0Basic Variables: x1 = 5/2, x5 = 1, x6 = 1/2Objective value: z = 25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 18 / 35

Page 38: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

New Dictionary

x1 =5

2− 1

2x4 −

3

2x2 −

1

2x3

x5 = 1 + 2x4 + 5x2

x6 =1

2+

3

2x4 +

1

2x2 −

1

2x3

z =25

2− 5

2x4 −

7

2x2 +

1

2x3,

New BFSNonbasic Variables: x4 = x2 = x3 = 0Basic Variables: x1 = 5/2, x5 = 1, x6 = 1/2Objective value: z = 25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 18 / 35

Page 39: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Second Pivot

ratios

x1 = 52 −1

2x4 −32x2 −1

2x3

5

x5 = 1 +2x4 +5x2x6 = 1

2 +32x4 +1

2x2 −12x3

1 → smallest

z = 252 −5

2x4 −72x2 +1

2x3

↑pos.

x3 enters the basis and x6 leaves.

x3 = 1 + 3x4 + x2 − 2x6

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 19 / 35

Page 40: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Second Pivot

ratiosx1 = 5

2 −12x4 −3

2x2 −12x3 5

x5 = 1 +2x4 +5x2x6 = 1

2 +32x4 +1

2x2 −12x3 1

→ smallest

z = 252 −5

2x4 −72x2 +1

2x3↑

pos.

x3 enters the basis and x6 leaves.

x3 = 1 + 3x4 + x2 − 2x6

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 19 / 35

Page 41: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Second Pivot

ratiosx1 = 5

2 −12x4 −3

2x2 −12x3 5

x5 = 1 +2x4 +5x2x6 = 1

2 +32x4 +1

2x2 −12x3 1 → smallest

z = 252 −5

2x4 −72x2 +1

2x3↑

pos.

x3 enters the basis and x6 leaves.

x3 = 1 + 3x4 + x2 − 2x6

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 19 / 35

Page 42: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Second Pivot

ratiosx1 = 5

2 −12x4 −3

2x2 −12x3 5

x5 = 1 +2x4 +5x2x6 = 1

2 +32x4 +1

2x2 −12x3 1 → smallest

z = 252 −5

2x4 −72x2 +1

2x3↑

pos.

x3 enters the basis and x6 leaves.

x3 = 1 + 3x4 + x2 − 2x6

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 19 / 35

Page 43: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Second Pivot

The new dictionary is

x3 = 1 + 3x4 + x2 − 2x6

x1 = 2− 2x4 − 2x2 + x6

x5 = 1 + 2x4 + 2x2

z = 13− x4 − 3x2 − x6

The BFS identified by this dictionary isNonbasic variables: x4 = x2 = x6 = 0Basic variables: x1 = 2, x3 = 1, x5 = 1Objective value: z = 13

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 20 / 35

Page 44: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Second Pivot

The new dictionary is

x3 = 1 + 3x4 + x2 − 2x6

x1 = 2− 2x4 − 2x2 + x6

x5 = 1 + 2x4 + 2x2

z = 13− x4 − 3x2 − x6

The BFS identified by this dictionary isNonbasic variables: x4 = x2 = x6 = 0Basic variables: x1 = 2, x3 = 1, x5 = 1Objective value: z = 13

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 20 / 35

Page 45: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Third Pivot

x3 = 1 + 3x4 + x2 − 2x6

x1 = 2− 2x4 − 2x2 + x6

x5 = 1 + 2x4 + 2x2

z = 13− x4 − 3x2 − x6

What nonbasic variable should enter the basis?

No candidate! All have a negative coefficient in the z row.If we increase the value of any nonbasic variable, the value of the objectivewill be reduced.What does this mean? The current BFS is optimal!

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 21 / 35

Page 46: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Third Pivot

x3 = 1 + 3x4 + x2 − 2x6

x1 = 2− 2x4 − 2x2 + x6

x5 = 1 + 2x4 + 2x2

z = 13− x4 − 3x2 − x6

What nonbasic variable should enter the basis?No candidate! All have a negative coefficient in the z row.If we increase the value of any nonbasic variable, the value of the objectivewill be reduced.What does this mean?

The current BFS is optimal!

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 21 / 35

Page 47: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Third Pivot

x3 = 1 + 3x4 + x2 − 2x6

x1 = 2− 2x4 − 2x2 + x6

x5 = 1 + 2x4 + 2x2

z = 13− x4 − 3x2 − x6

What nonbasic variable should enter the basis?No candidate! All have a negative coefficient in the z row.If we increase the value of any nonbasic variable, the value of the objectivewill be reduced.What does this mean? The current BFS is optimal!

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 21 / 35

Page 48: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Optimal BFS and Dictionary

The optimal dictionary is

x3 = 1 + 3x4 + x2 − 2x6

x1 = 2− 2x4 − 2x2 + x6

feasible

x5 = 1 + 2x4 + 2x2

z = 13− x4 − 3x2 − x6

→ all neg. coef.s

The optimal BFS is x = (2, 0, 1, 0, 1, 0)T .The optimal value is z = 13.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 22 / 35

Page 49: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Optimal BFS and Dictionary

The optimal dictionary is

x3 = 1 + 3x4 + x2 − 2x6

x1 = 2− 2x4 − 2x2 + x6 feasible

x5 = 1 + 2x4 + 2x2

z = 13− x4 − 3x2 − x6 → all neg. coef.s

The optimal BFS is x = (2, 0, 1, 0, 1, 0)T .The optimal value is z = 13.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 22 / 35

Page 50: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Optimal BFS and Dictionary

The optimal dictionary is

x3 = 1 + 3x4 + x2 − 2x6

x1 = 2− 2x4 − 2x2 + x6 feasible

x5 = 1 + 2x4 + 2x2

z = 13− x4 − 3x2 − x6 → all neg. coef.s

The optimal BFS is x = (2, 0, 1, 0, 1, 0)T .The optimal value is z = 13.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 22 / 35

Page 51: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Simplex Algorithm

The process of moving from one feasible dictionary to another is calledsimplex pivoting.

The process of pivoting from one feasible dictionary to the next untiloptimality is obtained is called the simplex algorithm.

A pivot corresponds to doing Gauss-Jordan elimination on the column inthe simplex tableau (augmented matrix) corresponding to the incomingvariable.Hence the simplex algorithm is a process that can be applied directly tothe simplex tableau.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 23 / 35

Page 52: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Simplex Algorithm

The process of moving from one feasible dictionary to another is calledsimplex pivoting.

The process of pivoting from one feasible dictionary to the next untiloptimality is obtained is called the simplex algorithm.

A pivot corresponds to doing Gauss-Jordan elimination on the column inthe simplex tableau (augmented matrix) corresponding to the incomingvariable.Hence the simplex algorithm is a process that can be applied directly tothe simplex tableau.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 23 / 35

Page 53: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Simplex Algorithm

The process of moving from one feasible dictionary to another is calledsimplex pivoting.

The process of pivoting from one feasible dictionary to the next untiloptimality is obtained is called the simplex algorithm.

A pivot corresponds to doing Gauss-Jordan elimination on the column inthe simplex tableau (augmented matrix) corresponding to the incomingvariable.

Hence the simplex algorithm is a process that can be applied directly tothe simplex tableau.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 23 / 35

Page 54: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

The Simplex Algorithm

The process of moving from one feasible dictionary to another is calledsimplex pivoting.

The process of pivoting from one feasible dictionary to the next untiloptimality is obtained is called the simplex algorithm.

A pivot corresponds to doing Gauss-Jordan elimination on the column inthe simplex tableau (augmented matrix) corresponding to the incomingvariable.Hence the simplex algorithm is a process that can be applied directly tothe simplex tableau.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 23 / 35

Page 55: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Pivoting on the Augmented Matrix

max 5x1 + 4x2 + 3x3

s.t. 2x1 + 3x2 + x3 ≤ 5

4x1 + x2 + 2x3 ≤ 11

3x1 + 4x2 + 2x3 ≤ 8

0 ≤ x1, x2, x3

The linear system associated with the initial dictionary is given by

2x1 + 3x2 + x3 + x4 = 54x1 + x2 + 2x3 + x5 = 11

3x2 + 4x2 + 2x3 + x6 = 8−z + 5x1 + 4x2 + 3x3 = 0

0 ≤ x1, x2, x3, x4, x5, x6.

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 24 / 35

Page 56: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Pivoting on the Augmented Matrix

2x1 + 3x2 + x3 + x4 = 54x1 + x2 + 2x3 + x5 = 11

3x2 + 4x2 + 2x3 + x6 = 8−z + 5x1 + 4x2 + 3x3 = 0

0 ≤ x1, x2, x3, x4, x5, x6.

The augmented matrix associated with the initial dictionary is

[0 A I b

−1 cT 0 0

]=

z x1 x2 x3 x4 x5 x6

0 2 3 1 1 0 0 50 4 1 2 0 1 0 110 3 4 2 0 0 1 8

−1 5 4 3 0 0 0 0

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 25 / 35

Page 57: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Pivoting on the Augmented Matrix

2x1 + 3x2 + x3 + x4 = 54x1 + x2 + 2x3 + x5 = 11

3x2 + 4x2 + 2x3 + x6 = 8−z + 5x1 + 4x2 + 3x3 = 0

0 ≤ x1, x2, x3, x4, x5, x6.

The augmented matrix associated with the initial dictionary is

[0 A I b

−1 cT 0 0

]=

z x1 x2 x3 x4 x5 x6

0 2 3 1 1 0 0 50 4 1 2 0 1 0 110 3 4 2 0 0 1 8

−1 5 4 3 0 0 0 0

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 25 / 35

Page 58: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Pivoting on the Augmented Matrix

2x1 + 3x2 + x3 + x4 = 54x1 + x2 + 2x3 + x5 = 11

3x2 + 4x2 + 2x3 + x6 = 8−z + 5x1 + 4x2 + 3x3 = 0

0 ≤ x1, x2, x3, x4, x5, x6.

The augmented matrix associated with the initial dictionary is

[0 A I b

−1 cT 0 0

]=

z x1 x2 x3 x4 x5 x60 2 3 1 1 0 0 50 4 1 2 0 1 0 110 3 4 2 0 0 1 8

−1 5 4 3 0 0 0 0

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 25 / 35

Page 59: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Pivoting on the Augmented Matrix

[0 A I b

−1 cT 0 0

]=

0 2 3 1 1 0 0 50 4 1 2 0 1 0 110 3 4 2 0 0 1 8

−1 5 4 3 0 0 0 0

↑ ↑ ↑ ↑

ratios5/2

11/48/3

Which variables are in the basis?Columns of the identity.How do we choose the variable to enter the basis?How do we choose the variable to leave the basis?

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 26 / 35

Page 60: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Pivoting on the Augmented Matrix

[0 A I b

−1 cT 0 0

]=

0 2 3 1 1 0 0 50 4 1 2 0 1 0 110 3 4 2 0 0 1 8

−1 5 4 3 0 0 0 0

↑ ↑ ↑

ratios5/2

11/48/3

Which variables are in the basis?Columns of the identity.How do we choose the variable to enter the basis?How do we choose the variable to leave the basis?

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 26 / 35

Page 61: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Pivoting on the Augmented Matrix

[0 A I b

−1 cT 0 0

]=

0 2 3 1 1 0 0 50 4 1 2 0 1 0 110 3 4 2 0 0 1 8

−1 5 4 3 0 0 0 0

↑ ↑ ↑

ratios5/2

11/48/3

Which variables are in the basis?Columns of the identity.How do we choose the variable to enter the basis?How do we choose the variable to leave the basis?

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 26 / 35

Page 62: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Pivoting on the Augmented Matrix

[0 A I b

−1 cT 0 0

]=

0 2 3 1 1 0 0 50 4 1 2 0 1 0 110 3 4 2 0 0 1 8

−1 5 4 3 0 0 0 0

↑ ↑ ↑ ↑

ratios5/2

11/48/3

Which variables are in the basis?

Columns of the identity.How do we choose the variable to enter the basis?How do we choose the variable to leave the basis?

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 26 / 35

Page 63: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Pivoting on the Augmented Matrix

[0 A I b

−1 cT 0 0

]=

0 2 3 1 1 0 0 50 4 1 2 0 1 0 110 3 4 2 0 0 1 8

−1 5 4 3 0 0 0 0

↑ ↑ ↑

ratios5/2

11/48/3

Which variables are in the basis?Columns of the identity.

How do we choose the variable to enter the basis?How do we choose the variable to leave the basis?

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 26 / 35

Page 64: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Pivoting on the Augmented Matrix

[0 A I b

−1 cT 0 0

]=

0 2 3 1 1 0 0 50 4 1 2 0 1 0 110 3 4 2 0 0 1 8

−1 5 4 3 0 0 0 0

↑ ↑ ↑

ratios5/2

11/48/3

Which variables are in the basis?Columns of the identity.

How do we choose the variable to enter the basis?

How do we choose the variable to leave the basis?

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 26 / 35

Page 65: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Pivoting on the Augmented Matrix

[0 A I b

−1 cT 0 0

]=

0 2 3 1 1 0 0 50 4 1 2 0 1 0 110 3 4 2 0 0 1 8

−1 5 4 3 0 0 0 0

↑ ↑ ↑

ratios5/2

11/48/3

Which variables are in the basis?Columns of the identity.

How do we choose the variable to enter the basis?How do we choose the variable to leave the basis?

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 26 / 35

Page 66: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau Pivot

Pivotcolumn

ratios↓

0 2© 3 1 1 0 0 5 5/2©

← Pivot row

0 4 1 2 0 1 0 11 11/40 3 4 2 0 0 1 8 8/3-1 5© 4 3 0 0 0 0

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2

−1 0 −7/2 1/2 −5/2 0 0 −25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 27 / 35

Page 67: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau Pivot

Pivotcolumn ratios↓

0 2© 3 1 1 0 0 5 5/2©

← Pivot row

0 4 1 2 0 1 0 11 11/40 3 4 2 0 0 1 8 8/3-1 5© 4 3 0 0 0 0

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2

−1 0 −7/2 1/2 −5/2 0 0 −25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 27 / 35

Page 68: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau Pivot

Pivotcolumn ratios↓

0 2© 3 1 1 0 0 5 5/2©

← Pivot row

0 4 1 2 0 1 0 11 11/40 3 4 2 0 0 1 8 8/3-1 5© 4 3 0 0 0 0

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2

−1 0 −7/2 1/2 −5/2 0 0 −25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 27 / 35

Page 69: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau Pivot

Pivotcolumn ratios↓

0 2© 3 1 1 0 0 5 5/2© ← Pivot row0 4 1 2 0 1 0 11 11/40 3 4 2 0 0 1 8 8/3-1 5© 4 3 0 0 0 0

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2

−1 0 −7/2 1/2 −5/2 0 0 −25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 27 / 35

Page 70: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau Pivot

Pivotcolumn ratios↓

0 2© 3 1 1 0 0 5 5/2© ← Pivot row0 4 1 2 0 1 0 11 11/40 3 4 2 0 0 1 8 8/3-1 5© 4 3 0 0 0 0

0 1 3/2 1/2 1/2 0 0 5/2

0 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2

−1 0 −7/2 1/2 −5/2 0 0 −25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 27 / 35

Page 71: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau Pivot

Pivotcolumn ratios↓

0 2© 3 1 1 0 0 5 5/2© ← Pivot row0 4 1 2 0 1 0 11 11/40 3 4 2 0 0 1 8 8/3-1 5© 4 3 0 0 0 0

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 1

0 0 −1/2 1/2 −3/2 0 1 1/2

−1 0 −7/2 1/2 −5/2 0 0 −25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 27 / 35

Page 72: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau Pivot

Pivotcolumn ratios↓

0 2© 3 1 1 0 0 5 5/2© ← Pivot row0 4 1 2 0 1 0 11 11/40 3 4 2 0 0 1 8 8/3-1 5© 4 3 0 0 0 0

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2

−1 0 −7/2 1/2 −5/2 0 0 −25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 27 / 35

Page 73: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau Pivot

Pivotcolumn ratios↓

0 2© 3 1 1 0 0 5 5/2© ← Pivot row0 4 1 2 0 1 0 11 11/40 3 4 2 0 0 1 8 8/3-1 5© 4 3 0 0 0 0

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2

−1 0 −7/2 1/2 −5/2 0 0 −25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 27 / 35

Page 74: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau and Its Dictionary

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2−1 0 −7/2 1/2 −5/2 0 −25/2

,

This tableau is the augmented matrix for the dictionary

x1 =5

2− 1

2x4 −

3

2x2 −

1

2x3

x5 = 1 + 2x4 + 5x2

x6 =1

2+

3

2x4 +

1

2x2 −

1

2x3

z =25

2− 5

2x4 −

7

2x2 +

1

2x3,

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 28 / 35

Page 75: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau and Its Dictionary

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2−1 0 −7/2 1/2 −5/2 0 −25/2

,

x1 =5

2− 1

2x4 −

3

2x2 −

1

2x3

x5 = 1 + 2x4 + 5x2

x6 =1

2+

3

2x4 +

1

2x2 −

1

2x3

z =25

2− 5

2x4 −

7

2x2 +

1

2x3,

The BFS is obtained by setting non basic variable equal to zero.

(x1, x2, x3, x4, x5, x6) = (5/2, 0, 0, 0, 1, 1/2).

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 29 / 35

Page 76: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau and Its Dictionary

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2−1 0 −7/2 1/2 −5/2 0 −25/2

,

x1 =5

2− 1

2x4 −

3

2x2 −

1

2x3

x5 = 1 + 2x4 + 5x2

x6 =1

2+

3

2x4 +

1

2x2 −

1

2x3

z =25

2− 5

2x4 −

7

2x2 +

1

2x3,

The BFS is obtained by setting non basic variable equal to zero.

(x1, x2, x3, x4, x5, x6) = (5/2, 0, 0, 0, 1, 1/2).

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 29 / 35

Page 77: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau and Its Dictionary

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2−1 0 −7/2 1/2 −5/2 0 −25/2

,

x1 =5

2− 1

2x4 −

3

2x2 −

1

2x3

x5 = 1 + 2x4 + 5x2

x6 =1

2+

3

2x4 +

1

2x2 −

1

2x3

z =25

2− 5

2x4 −

7

2x2 +

1

2x3,

The BFS is obtained by setting non basic variable equal to zero.

(x1, x2, x3, x4, x5, x6) = (5/2, 0, 0, 0, 1, 1/2).

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 29 / 35

Page 78: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau and Its Dictionary

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2−1 0 −7/2 1/2 −5/2 0 −25/2

,

x1 =5

2− 1

2x4 −

3

2x2 −

1

2x3

x5 = 1 + 2x4 + 5x2

x6 =1

2+

3

2x4 +

1

2x2 −

1

2x3

z =25

2− 5

2x4 −

7

2x2 +

1

2x3,

The BFS is obtained by setting non basic variable equal to zero.

(x1, x2, x3, x4, x5, x6) = (5/2, 0, 0, 0, 1, 1/2).

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 29 / 35

Page 79: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau and Its Dictionary

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2−1 0 −7/2 1/2 −5/2 0 −25/2

,

x1 =5

2− 1

2x4 −

3

2x2 −

1

2x3

x5 = 1 + 2x4 + 5x2

x6 =1

2+

3

2x4 +

1

2x2 −

1

2x3

z =25

2− 5

2x4 −

7

2x2 +

1

2x3,

The BFS is obtained by setting non basic variable equal to zero.

(x1, x2, x3, x4, x5, x6) = (5/2, 0, 0, 0, 1, 1/2).

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 29 / 35

Page 80: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Simplex Tableau and Its Dictionary

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2−1 0 −7/2 1/2 −5/2 0 −25/2

,

x1 =5

2− 1

2x4 −

3

2x2 −

1

2x3

x5 = 1 + 2x4 + 5x2

x6 =1

2+

3

2x4 +

1

2x2 −

1

2x3

z =25

2− 5

2x4 −

7

2x2 +

1

2x3,

The BFS is obtained by setting non basic variable equal to zero.

(x1, x2, x3, x4, x5, x6) = (5/2, 0, 0, 0, 1, 1/2).

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 29 / 35

Page 81: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Second Simplex Pivot on the Tableau

Pivotcolumn ratios↓

0 1 3/2 1/2 1/2 0 0 5/2

5

0 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2

1 ← pivot row

−1 0 −7/2 1/2 −5/2 0 0 −25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 30 / 35

Page 82: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Second Simplex Pivot on the Tableau

Pivotcolumn

ratios

↓0 1 3/2 1/2 1/2 0 0 5/2

5

0 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2

1 ← pivot row

−1 0 −7/2 1/2 −5/2 0 0 −25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 30 / 35

Page 83: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Second Simplex Pivot on the Tableau

Pivotcolumn ratios↓

0 1 3/2 1/2 1/2 0 0 5/2 50 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2 1

← pivot row

−1 0 −7/2 1/2 −5/2 0 0 −25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 30 / 35

Page 84: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Second Simplex Pivot on the Tableau

Pivotcolumn ratios↓

0 1 3/2 1/2 1/2 0 0 5/2 50 0 −5 0 −2 1 0 10 0 −1/2 1/2 −3/2 0 1 1/2 1 ← pivot row−1 0 −7/2 1/2 −5/2 0 0 −25/2

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 30 / 35

Page 85: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Second Simplex Pivot on the Tableau

ratios

0 1 3/2 1/2 1/2 0 0 5/2 50 0 −5 0 −2 1 0 10 0 −1/2 1/2© −3/2 0 1 1/2 1−1 0 −7/2 1/2 −5/2 0 0 −25/2

0 1 2 0 2 0 −1 20 0 −5 0 −2 1 0 10 0 −1 1 −3 0 2 1−1 0 −3 0 −1 0 −1 −13

Optimal Solution: (x1, x2, x3) = (2, 0, 1)

Optimal Value: z = 13

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 31 / 35

Page 86: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Second Simplex Pivot on the Tableau

ratios

0 1 3/2 1/2 1/2 0 0 5/2 50 0 −5 0 −2 1 0 10 0 −1/2 1/2© −3/2 0 1 1/2 1−1 0 −7/2 1/2 −5/2 0 0 −25/2

0 1 2 0 2 0 −1 20 0 −5 0 −2 1 0 1

0 0 −1 1 −3 0 2 1

−1 0 −3 0 −1 0 −1 −13

Optimal Solution: (x1, x2, x3) = (2, 0, 1)

Optimal Value: z = 13

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 31 / 35

Page 87: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Second Simplex Pivot on the Tableau

ratios

0 1 3/2 1/2 1/2 0 0 5/2 50 0 −5 0 −2 1 0 10 0 −1/2 1/2© −3/2 0 1 1/2 1−1 0 −7/2 1/2 −5/2 0 0 −25/2

0 1 2 0 2 0 −1 2

0 0 −5 0 −2 1 0 1

0 0 −1 1 −3 0 2 1

−1 0 −3 0 −1 0 −1 −13

Optimal Solution: (x1, x2, x3) = (2, 0, 1)

Optimal Value: z = 13

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 31 / 35

Page 88: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Second Simplex Pivot on the Tableau

ratios

0 1 3/2 1/2 1/2 0 0 5/2 50 0 −5 0 −2 1 0 10 0 −1/2 1/2© −3/2 0 1 1/2 1−1 0 −7/2 1/2 −5/2 0 0 −25/2

0 1 2 0 2 0 −1 20 0 −5 0 −2 1 0 10 0 −1 1 −3 0 2 1

−1 0 −3 0 −1 0 −1 −13

Optimal Solution: (x1, x2, x3) = (2, 0, 1)

Optimal Value: z = 13

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 31 / 35

Page 89: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Second Simplex Pivot on the Tableau

ratios

0 1 3/2 1/2 1/2 0 0 5/2 50 0 −5 0 −2 1 0 10 0 −1/2 1/2© −3/2 0 1 1/2 1−1 0 −7/2 1/2 −5/2 0 0 −25/2

0 1 2 0 2 0 −1 20 0 −5 0 −2 1 0 10 0 −1 1 −3 0 2 1−1 0 −3 0 −1 0 −1 −13

Optimal Solution: (x1, x2, x3) = (2, 0, 1)

Optimal Value: z = 13

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 31 / 35

Page 90: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Second Simplex Pivot on the Tableau

ratios

0 1 3/2 1/2 1/2 0 0 5/2 50 0 −5 0 −2 1 0 10 0 −1/2 1/2© −3/2 0 1 1/2 1−1 0 −7/2 1/2 −5/2 0 0 −25/2

0 1 2 0 2 0 −1 20 0 −5 0 −2 1 0 10 0 −1 1 −3 0 2 1−1 0 −3 0 −1 0 −1 −13

Optimal Solution: (x1, x2, x3) = (2, 0, 1)

Optimal Value: z = 13

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 31 / 35

Page 91: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Second Simplex Pivot on the Tableau

ratios

0 1 3/2 1/2 1/2 0 0 5/2 50 0 −5 0 −2 1 0 10 0 −1/2 1/2© −3/2 0 1 1/2 1−1 0 −7/2 1/2 −5/2 0 0 −25/2

0 1 2 0 2 0 −1 20 0 −5 0 −2 1 0 10 0 −1 1 −3 0 2 1−1 0 −3 0 −1 0 −1 −13

Optimal Solution: (x1, x2, x3) = (2, 0, 1)

Optimal Value: z = 13

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 31 / 35

Page 92: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Recap: Tableau Pivoting

0 2© 3 1 1 0 0 50 4 1 2 0 1 0 110 3 4 2 0 0 1 8-1 5 4 3 0 0 0 0

0 1 3/2 1/2 1/2 0 0 5/20 0 −5 0 −2 1 0 10 0 −1/2 1/2© −3/2 0 1 1/2−1 0 −7/2 1/2 −5/2 0 0 −25/2

0 1 2 0 2 0 −1 20 0 −5 0 −2 1 0 10 0 −1 1 −3 0 2 1−1 0 −3 0 −1 0 −1 −13

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 32 / 35

Page 93: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Remove z Column

2© 3 1 1 0 0 54 1 2 0 1 0 113 4 2 0 0 1 85 4 3 0 0 0 0

1 3/2 1/2 1/2 0 0 5/20 −5 0 −2 1 0 10 −1/2 1/2© −3/2 0 1 1/20 −7/2 1/2 −5/2 0 0 −25/2

1 2 0 2 0 −1 20 −5 0 −2 1 0 10 −1 1 −3 0 2 10 −3 0 −1 0 −1 −13

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 33 / 35

Page 94: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Another Example

maximize 3x + 2y − 4z

subject to x + 4y ≤ 52x + 4y − 2z ≤ 6x + y − 2z ≤ 20 ≤ x , y , z

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 34 / 35

Page 95: Math 407: Linear Optimizationburke/crs/407/...information associated with the LP. max5x 1 + 4x 2 + 3x 3 s.t. 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 0 x 1;x 2;x

Second Example: Tableau Pivoting

ratios1 4 0 1 0 0 5 52 4 -2 0 1 0 6 31© 1 -2 0 0 1 2 23 2 -4 0 0 0 0

0 3 2 1 0 -1 3 3/20 2 2© 0 1 -2 2 11 1 −2 0 0 1 20 −1 2 0 0 −3 −6

0 1 0 1 −1 1 10 1 1 0 1/2 −1 11 3 0 0 1 −1 40 −3 0 0 −1 −1 −8

Lecture 5: Simplex Algorithm I Math 407: Linear Optimization 35 / 35