Two-stage Simplex Method (Edexcel A Level Further Maths: Decision Maths 1)

Revision Note

Test Yourself
Paul

Author

Paul

Expertise

Maths

Introduction to Two-Stage Simplex Method

What is the two-stage simplex method?

  • The simplex algorithm solves maximisation linear programming problems where all (non-negativity) constraints involve
  • The two-stage simplex method adapts the simplex algorithm to solve linear programming problems
    • involving constraints with ≥
    • where the objective function is to be minimised
    • In both cases the simplex algorithm cannot be used directly
      • it is based on the basic feasible region containing the basic feasible solution of the origin
  • The two-stage simplex method is two applications of the simplex algorithm
    • The first stage of the two-stage simplex method finds a basic feasible solution (if one exists)
    • If a basic feasible solution is found the second stage applies the simplex algorithm as usual

Surplus & Artificial Variables

What are surplus variables?

  • Surplus variables are used to turn inequalities involving ≥ into equations
    • A surplus variable, as the name implies, takes up the excess (surplus) that a function has in "greater than or equal to" constraints
    • A surplus variable will be subtracted from (the left hand side of) each constraint so will be non-negative
  • The number of surplus variables required in a problem will be the same as the number of (non-negativity) constraints that contain
    • Any inequalities involving will still require slack variables
  • Whenever a surplus variable is introduced, an artificial variable will also be needed

What are artificial variables?

  • Artificial variables are used to ensure each constraint with a surplus variable contains a basic variable
    • A surplus variable is subtracted, so will have a coefficient of -1
      • basic variables have a coefficient of 1
    • Artificial variables will always start with a coefficient of 1

Exam Tip

  • You need to be able to recognise when the simplex algorithm cannot (directly) be used to solve a linear programming problem
    • This is due to the presence of constraints involving ≥ (or a mixture of ≤ and ≥) 

Worked example

The following linear programming problem is to be solved using the two-stage simplex method.

Maximise

P equals 2 x plus 4 y plus 3 z

subject to

table row cell x plus y plus z end cell greater or equal than 20 row cell 2 x minus y plus 2 z end cell greater or equal than 25 row cell 2 x plus 3 y plus 4 z end cell less or equal than 80 row cell x comma y comma z end cell greater or equal than 0 end table

Use slack, surplus and artificial variables as necessary to write the constraints (except the non-negativity constraint) of the linear programming problem as equations.

Use s subscript 1 and a subscript 1 as surplus and artificial variables in the first constraint as it involves ≥

x plus y plus z minus s subscript 1 plus a subscript 1 equals 20

The second constraint involves ≥ too so will also need a surplus and artificial variable

2 x minus y plus 2 z minus s subscript 2 plus a subscript 2 equals 25

The third constraint involves ≤ so requires a slack variable

2 x plus 3 y plus 4 z plus s subscript 3 equals 80

The constraints as equations using slack, surplus and artificial variables are

table attributes columnalign right center left columnspacing 0px end attributes row cell bold italic x bold plus bold italic y bold plus bold italic z bold minus bold italic s subscript bold 1 bold plus bold italic a subscript bold 1 end cell bold equals bold 20 row cell bold 2 bold italic x bold minus bold italic y bold plus bold 2 bold italic z bold minus bold italic s subscript bold 2 bold plus bold italic a subscript bold 2 end cell bold equals bold 25 row cell bold 2 bold italic x bold plus bold 3 bold italic y bold plus bold 4 bold italic z bold plus bold italic s subscript bold 3 end cell bold equals bold 80 end table

How do I set up the initial tableau for the two-stage simplex method?

  • To set up the initial tableau, the equations derived from the inequalities (constraints) are needed along with
    • a rearrangement of the objective function such that zero is on one side
      • e.g. P equals 2 x plus 4 y plus 3 z becomes P minus 2 x minus 4 y minus 3 z equals 0
    • a new objective function, I. which is the negative sum of the artificial variables
      • e.g. where two artificial variables a subscript 1 and a subscript 2 have been introduced, I equals negative open parentheses a subscript 1 plus a subscript 2 close parentheses
      • In general, I equals negative open parentheses a subscript 1 plus a subscript 2 plus... plus a subscript n close parentheses for n artificial variables
      • artificial variables should be written in terms of the decision and surplus variables before being substituted into I
      • I is then rearranged such that all variables are on one side and a constant is on the other
  • The initial tableau can then be constructed with two objective rows
    • one for P, one for I

Worked example

Construct the initial tableau for the two-stage simplex method for the objective function

P minus 2 x minus 4 y minus 3 z equals 0

and equations (constraints)

table row cell x plus y plus z minus s subscript 1 plus a subscript 1 end cell equals 20 row cell 2 x minus y plus 2 z minus s subscript 2 plus a subscript 2 end cell equals 25 row cell 2 x plus 3 y plus 4 z plus s subscript 3 end cell equals 80 end table

Introduce I (P is already in the required form)

I equals negative open parentheses a subscript 1 plus a subscript 2 close parentheses

Rewrite a subscript factorial and a subscript 2 in terms of x comma space y comma space z comma space s subscript 1 and s subscript 2 (s subscript 3 is a slack variable)

table attributes columnalign right center left columnspacing 0px end attributes row cell a subscript 1 end cell equals cell 20 minus x minus y minus z plus s subscript 1 end cell row cell a subscript 2 end cell equals cell 25 minus 2 x plus y minus 2 z plus s subscript 2 end cell end table

Substitute into I

table row I equals cell negative open parentheses 20 minus x minus y minus z plus s subscript 1 plus 25 minus 2 x plus y minus 2 z plus s subscript 2 close parentheses end cell row I equals cell negative open parentheses 45 minus 3 x minus 3 z plus s subscript 1 plus s subscript 2 close parentheses end cell end table

Rearrange so all variables are on the same side as (positive) I and a constant on the other

I minus 3 x minus 3 z plus s subscript 1 plus s subscript 2 equals negative 45

Set up the initial tableau two objective rows for P and I

b.v. bold italic x bold italic y bold italic z bold italic s subscript bold 1 bold italic s subscript bold 2 bold italic s subscript bold 3 bold italic a subscript bold 1
bold italic a subscript bold 2
Value
bold italic a subscript bold 1 1 1 1 -1 0 0 1 0 20
bold italic a subscript bold 2 2 -1 2 0 -1 0 0 1 25
bold italic s subscript bold 3 2 3 4 0 0 1 0 0 80
bold italic P -2 -4 -3 0 0 0 0 0 0
bold italic I
-3 0 3 1 1 0 0 0 -45

Maximising Problems

How do I apply the first-stage of the two-stage simplex method to maximising problems?

  • In the first-stage, I will be maximised
    • the maximum I can be is 0
    • this is when each artificial variable equals 0
      • artificial variables cannot be negative
  • At the end of the first-stage
    • if I not equal to 0 then a basic feasible region does not exist and the linear programming problem cannot be solved
      • there will be no need (or point) in progressing to the second-stage
    • if I equals 0 then a basic feasible region does exist
      • the objective row I and the artificial variable columns can be removed from the tableau before commencing the second stage

Worked example

The initial tableau for using the two-stage simplex method is given below.
Apply the first-stage of the two-stage simplex method to maximise I.
Give your final answer as the tableau with I comma space a subscript 1 and a subscript 2 removed.

b.v. x y z s subscript 1 s subscript 2 s subscript 3 a subscript 1
a subscript 2
Value
a subscript bold 1 1 1 1 -1 0 0 1 0 20
a subscript 2 2 -1 2 0 -1 0 0 1 25
s subscript 3 2 3 4 0 0 1 0 0 80
P -2 -4 -3 0 0 0 0 0 0
I
-3 0 3 1 1 0 0 0 -45


Apply the simplex algorithm to maximise I

There is a negative entry in the (I) objective row
-3 is the most negative

C1 is the pivot column, the theta-values are

table row cell theta subscript 1 end cell equals cell 20 divided by 1 equals 20 end cell row cell theta subscript 2 end cell equals cell 25 divided by 2 equals 12.5 end cell row cell theta subscript 3 end cell equals cell 80 divided by 2 equals 40 end cell end table

theta subscript 2 is the least positive so R2 is the pivot row
The pivot element is in cell R2C1 (highlighted in tableau above)

Pivot is 2

Apply the appropriate row operations, starting with the pivot row, R2

b.v. x y z s subscript 1 s subscript 2 s subscript 3 a subscript 1 a subscript 2 Value Row Op.
a subscript 1 0 1.5 0 -1 0.5 0 1 -0.5 7.5 apostrophe straight R 1 apostrophe minus straight R 2
x 1 -0.5 1 0 -0.5 0 0 0.5 12.5 0.5 apostrophe straight R 2 apostrophe
s subscript 3 0 4 2 0 1 1 0 -1 55 apostrophe straight R 3 apostrophe minus 2 straight R 2
P 0 -5 -1 0 -1 0 0 1 25 0.5 apostrophe straight R 4 apostrophe plus 2 straight R 2
I 0 -1.5 0 1 -0.5 0 0 1.5 -7.5 apostrophe straight R 5 apostrophe plus 3 straight R 2

There is a negative entry in the (I) objective row
-1.5 is the most negative

C2 is the pivot column, the theta-values are

table row cell theta subscript 1 end cell equals cell 7.5 divided by 1.5 equals 5 end cell row cell theta subscript 2 end cell equals cell 12.5 divided by open parentheses negative 0.5 close parentheses equals negative 25 end cell row cell theta subscript 3 end cell equals cell 55 divided by 4 equals 13.75 end cell end table

theta subscript 1 is the least positive so R1 is the pivot row
The pivot element is in cell R1C2

Pivot is 1.5

Apply the appropriate row operations, starting with the pivot row, R1

b.v. x y z s subscript 1 s subscript 2 s subscript 3 a subscript 1 a subscript 2 Value Row Op.
y 0 1 0 -2/3 1/3 0 2/3 -1/3 5 1.5 apostrophe straight R 1 apostrophe
x 1 0 1 -1/3 -1/3 0 1/3 1/3 15 apostrophe straight R 2 apostrophe plus 0.5 straight R 1
s subscript 3 0 0 2 8/3 -1/3 1 -8/3 1/3 35 apostrophe straight R 3 apostrophe minus 4 straight R 1
P 0 0 -1 -10/3 2/3 0 10/3 -2/3 50 apostrophe straight R 4 apostrophe plus 5 straight R 1
I 0 0 0 0 0 0 1 1 0 apostrophe straight R 5 apostrophe plus 1.5 straight R 1

There are no negative values in the (I) objective row so I has been maximised and the first-stage of the method is complete
Reading from the tableau, we see that neither a subscript 1 nor a subscript 2 are basic variables so both have the value 0, and the value of I is 0

The final answer is required as the tableau with I comma space a subscript 1 and a subscript 2 removed

b.v. x y z s subscript 1 s subscript 2 s subscript 3 Value
bold italic y 0 1 0 -2/3 1/3 0 5
bold italic x 1 0 1 -1/3 -1/3 0 15
bold italic s subscript bold 3 0 0 2 8/3 -1/3 1 35
P 0 0 -1 -10/3 2/3 0 50

How do I apply the second-stage of the two-stage simplex method to maximising problems?

  • After the first-stage, the value of I should be zero
    • If it is not then a feasible region does not exist and the linear programming problem cannot be solved 
  • In the second-stage, the simplex algorithm is applied as usual to maximise the objective function P

Worked example

After the first-stage of the two-stage simplex method has been applied to a linear programming problem the following tableau is formed.  Apply the second-stage of the two-stage simplex method to find the optimal solution.

b.v. x y z s subscript 1 s subscript 2 s subscript 3 Value
y 0 1 0 -2/3 1/3 0 5
x 1 0 1 -1/3 -1/3 0 15
s subscript 3 0 0 2 8/3 -1/3 1 35
P 0 0 -1 -10/3 2/3 0 50

The second-stage of the two stage simplex method is to apply the simplex algorithm

There is a negative entry in the objective row
-10/3 is the most negative

C4 is the pivot column, the theta-values are

table row cell theta subscript 1 end cell equals cell 5 divided by open parentheses negative 2 divided by 3 close parentheses equals negative 7.5 end cell row cell theta subscript 2 end cell equals cell 15 divided by open parentheses negative 1 divided by 3 close parentheses equals negative 45 end cell row cell theta subscript 3 end cell equals cell 35 divided by 8 divided by 3 equals 13.125 end cell end table

theta subscript 3 is the least positive so R3 is the pivot row
The pivot element is in cell R3C4 (highlighted in tableau above)

Pivot is 8/3

Apply the appropriate row operations, starting with the pivot row, R3

b.v. x y z s subscript 1 s subscript 2 s subscript 3 Value Row Op.
y 0 1 0.5 0 0.25 0.25 13.75 apostrophe straight R 1 apostrophe plus 2 divided by 3 space straight R 3
x 1 0 1.25 0 -0.375 0.125 18.375 apostrophe straight R 2 apostrophe plus 1 divided by 3 space straight R 3
s subscript 1 0 0 0.75 1 -0.125 0.375 13.126 8 divided by 3 space apostrophe straight R 3 apostrophe
P 0 0 1.5 0 0.25 1.25 93.75 apostrophe straight R 4 apostrophe plus 10 divided by 3 space straight R 1

There are no negative values in the objective row so the algorithm is complete and the optimal solution can be read from the final tableau
x comma space y comma space s subscript 1 are basic variables, s subscript 2 comma space s subscript 3are non-basic

bold italic x bold equals bold 18 bold. bold 375 bold comma bold space bold italic y bold equals bold 13 bold. bold 75 bold comma bold space bold italic s subscript bold 1 bold equals bold 13 bold. bold 126
bold italic z bold equals bold italic s subscript bold 2 bold equals bold italic s subscript bold 3 bold equals bold 0
bold italic P has a maximum value of 93.75

Minimising Problems

How do I apply the two-stage simplex method to minimising problems?

  • Minimising the objective function is the same as maximising the negative of the objective function
  • So in minimisation problems, we maximise the negative of the objective function
    • e.g.  Minimising C equals 4 x plus 2 y is the same as maximising P equals negative C equals negative open parentheses 4 x plus 2 y close parentheses equals negative 4 x minus 2 y
  • The two-stage simplex method for minimisation problems is otherwise the same as for maximisation problems
    • The first-stage maximises the (new) objective function, I
      • where I is the negative sum of the artificial variables
      • I equals negative open parentheses a subscript 1 plus a subscript 2 plus... plus a subscript n close parentheses
    • At the end of the first-stage, if I equals 0 a feasible region exists
      • the tableau can have the row for I and the columns for the artificial variable removed
      • the second-stage of applying the simplex algorithm will then maximise P
  • For minimisation problems, the maximum P will need interpreting as the minimum for C
    • C is often used as 'costs' require minimising (P is often for profit)

Worked example

Solve the following linear programming problem using the two-stage simplex method.

Minimise

C equals 4 x plus 2 y

subject to

table row cell x plus 8 y end cell greater or equal than 9 row cell x plus y end cell less or equal than 9 row cell 6 x minus y end cell greater or equal than 5 row cell x comma y end cell greater or equal than 0 end table

Minimising C is the same as maximising P, where

P equals negative C equals negative 4 x minus 2 y

P will need rewriting in the correct form for the initial tableau

P plus 4 x plus 2 y equals 0

Use slack, surplus and artificial variables to rewrite the constraints as equations

table row cell x plus 8 y minus s subscript 1 plus a subscript 1 end cell equals 9 row cell x plus y plus s subscript 2 end cell equals 9 row cell 6 x minus y minus s subscript 3 plus a subscript 2 end cell equals 5 end table

Introduce, find and write I in the correct format for the initial tableau

Let table row I equals cell negative open parentheses a subscript 1 plus a subscript 2 close parentheses end cell end table 

table row I equals cell negative open parentheses 9 minus x minus 8 y plus s subscript 1 plus 5 minus 6 x plus y plus s subscript 3 close parentheses end cell row I equals cell negative open parentheses 14 minus 7 x minus 7 y plus s subscript 1 plus s subscript 3 close parentheses end cell end table

table attributes columnalign right center left columnspacing 0px end attributes row cell I minus 7 x minus 7 y plus s subscript 1 plus s subscript 3 end cell equals cell negative 14 end cell end table

Construct the initial tableau

b.v. x y s subscript 1 s subscript 2 s subscript 3 a subscript 1
a subscript 2
Value
a subscript bold 1 1 8 -1 0 0 1 0 9
s subscript 2 1 1 0 1 0 0 0 9
a subscript 2 6 -1 0 0 -1 0 1 5
P 4 2 0 0 0 0 0 0
I
-7 -7 1 0 1 0 0 -14


Apply the simplex algorithm to maximise I

There is a negative entry in the (I) objective row
-7 is the most negative (either can be chosen, we're choosing the first)

C1 is the pivot column, the theta-values are

table row cell theta subscript 1 end cell equals cell 9 divided by 1 equals 9 end cell row cell theta subscript 2 end cell equals cell 9 divided by 1 equals 9 end cell row cell theta subscript 3 end cell equals cell 5 divided by 6 equals 0.833... end cell end table

theta subscript 3 is the least positive so R3 is the pivot row
The pivot element is in cell R3C1

Pivot is 6

Apply the appropriate row operations, starting with the pivot row, R3

b.v. x y s subscript 1 s subscript 2 s subscript 3 a subscript 1 a subscript 2 Value Row Op.
a subscript 1 0 49/6 -1 0 1/6 1 -1/6 49/6 apostrophe straight R 1 apostrophe minus straight R 3
s subscript 2 0 7/6 0 1 1/6 0 -1/6 49/6 apostrophe straight R 2 apostrophe minus straight R 3
x 1 -1/6 0 0 -1/6 0 1/6 5/6 1 divided by 6 space apostrophe straight R 3 apostrophe
P 0 8/3 0 0 2/3 0 -2/3 -10/3 apostrophe straight R 4 apostrophe minus 4 straight R 3
I 0 -49/6 1 0 -1/6 0 -7/6 -49/6 apostrophe straight R 5 apostrophe plus 7 straight R 3

There is a negative entry in the (I) objective row
-49/6 is the most negative

C2 is the pivot column, the theta-values are

table row cell theta subscript 1 end cell equals cell 49 divided by 6 divided by 49 divided by 6 equals 1 end cell row cell theta subscript 2 end cell equals cell 49 divided by 6 divided by 7 divided by 6 equals 7 end cell row cell theta subscript 3 end cell equals cell 5 divided by 6 divided by open parentheses negative 1 divided by 6 close parentheses equals negative 5 end cell end table

theta subscript 1 is the least positive so R1 is the pivot row
The pivot element is in cell R1C2

Pivot is 49/6

Apply the appropriate row operations, starting with the pivot row, R1

b.v. x y s subscript 1 s subscript 2 s subscript 3 a subscript 1 a subscript 2 Value Row Op.
y 0 1 -6/49 0 1/49 6/49 -1/49 1 6 divided by 49 space apostrophe straight R 1 apostrophe
s subscript 2 0 0 1/7 1 1/7 -1/7 -1/7 7 apostrophe straight R 2 apostrophe minus 7 divided by 6 space straight R 1
x 1 0 -1/49 0 -8/49 1/49 8/49 1 apostrophe straight R 3 apostrophe plus 1 divided by 6 space straight R 1
P 0 0 16/49 0 30/49 -16/49 -30/49 -6 apostrophe straight R 4 apostrophe minus 8 divided by 3 space straight R 1
I 0 0 0 0 0 1 1 0 apostrophe straight R 5 apostrophe plus 49 divided by 6 space straight R 1

There are no negative entries in the (I) objective row so the first-stage is complete, a subscript 1 equals a subscript 2 equals I equals 0

Remove a subscript 1 comma space a subscript 2 comma space I from the tableau to complete the first-stage

b.v. x y s subscript 1 s subscript 2 s subscript 3 Value
y 0 1 -6/49 0 1/49 1
s subscript 2 0 0 1/7 1 1/7 7
x 1 0 -1/49 0 -8/49 1
P 0 0 16/49 0 30/49 -6

There are no negative values in the objective row so the method is complete (no second-stage required) and the optimal solution can be read from the final tableau

x comma space y comma space s subscript 2 are basic variables, s subscript 1 comma space s subscript 3are non-basic

Change from maximising P to minimising C

C subscript m i n end subscript equals negative P subscript m a x end subscript equals negative open parentheses negative 6 close parentheses equals 6

The solution to the linear programming problem is
bold italic x bold equals bold 1 bold comma bold space bold italic y bold equals bold 1
with bold italic C minimised at bold italic C bold equals bold 6
(bold italic s subscript bold 1 bold equals bold italic s subscript bold 3 bold equals bold 0 bold comma bold space bold italic s subscript bold 2 bold equals bold 7)

You've read 0 of your 0 free revision notes

Get unlimited access

to absolutely everything:

  • Downloadable PDFs
  • Unlimited Revision Notes
  • Topic Questions
  • Past Papers
  • Model Answers
  • Videos (Maths and Science)

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Paul

Author: Paul

Paul has taught mathematics for 20 years and has been an examiner for Edexcel for over a decade. GCSE, A level, pure, mechanics, statistics, discrete – if it’s in a Maths exam, Paul will know about it. Paul is a passionate fan of clear and colourful notes with fascinating diagrams – one of the many reasons he is excited to be a member of the SME team.