The Simplex Algorithm: Reading Tableaux, Three Variables and Solver Output | OCR B (MEI) A Level Further Maths notes

Free preview: The Simplex Algorithm: Reading Tableaux, Three Variables and Solver Output

Simplex with Three Variables

Year 2 (A level) for OCR A. OCR B (MEI) Modelling with Algorithms has the same content at AS (Y413) and A level (Y433). AQA and Edexcel do not mark AS content in their specifications, so check your own specification.

Watch: 1-minute explainer

Here's where simplex earns its keep. With three products you would need a 3D graph, which is impossible to draw accurately by hand. Simplex doesn't care: one more variable is just one more column.

A firm makes three products, x, y and z units a day:

Maximise P=4x+5y+3z s.t. {x+2y+z⩽20(labour)3x+y+2z⩽30(materials)x+y+z⩽12(storage)

Quick recap of the recipe

  1. Add a slack to each constraint (r, s, t) and write P−4x−5y−3z=0.
  2. Pivot column: most negative entry in the objective row.
  3. Pivot row: smallest ratio Value ÷ (positive entry in the pivot column).
  4. Divide the pivot row by the pivot; clear the rest of the column.
  5. Repeat until the objective row has no negatives.
Basic variablexyzrstValue
r12110020
s31201030
t11100112
P−4−5−30000

👀 Watch me do it: iteration 1

What I writeWhy I do it
Most negative: −5, so y enters.Each unit of y adds 5 to P, the most of any variable.
Ratios: 20 ÷ 2 = 10, 30 ÷ 1 = 30, 12 ÷ 1 = 12.All three entries in the y column are positive, so all three rows count.
Pivot row r, pivot 2.10 is the smallest ratio: labour runs out first.
New y row = R1 ÷ 2 = (½, 1, ½, ½, 0, 0 | 10).Make the pivot 1.
s row − y row; t row − y row.Each had 1 in the y column, so subtract one lot of the new y row.
P row + 5 × y row.−5 + 5(1) = 0.
Basic variablexyzrstValue
y½1½½0010
s5/203/2−½1020
t½0½−½012
P−3/20−½5/20050
  • Read it: y = 10, s = 20, t = 2; x = z = r = 0; P = 50.
  • Check: 5×10=50 ✓. Still negatives (−3/2 and −½), so keep going.

Finishing the Three-Variable Problem

👀 Watch me do it: iteration 2, with fractions

What I writeWhy I do it
Most negative: −32, so x enters.−32 is more negative than −12.
Ratios: 10÷12=20, 20÷52=8, 2÷12=4.Dividing by a fraction: multiply by its reciprocal.
Pivot row t, pivot 12.4 is smallest.
New x row = t row × 2 = (1, 0, 1, −1, 0, 2 | 4).Dividing by ½ is the same as doubling.
y row − ½ × x rowClears the ½ under x: (0, 1, 0, 1, 0, −1 | 8).
s row − 5/2 × x rowClears the 5/2: (0, 0, −1, 2, 1, −5 | 10).
P row + 3/2 × x rowClears the −3/2: (0, 0, 1, 1, 0, 3 | 56).
Basic variablexyzrstValue
y01010−18
s00−121−510
x101−1024
P00110356
  • No negatives in the objective row: optimal.
  • Make 4 of x, 8 of y and none of z, for a profit of 56.
  • Check in the original objective: 4(4)+5(8)+3(0)=56 ✓.

📝 Fractions or decimals?

  • Keep exact fractions (½, 5/2). Decimals such as 0.333 build up rounding errors over several pivots.
  • ✗ Wrong: choosing the pivot row by the smallest entry (½ appears twice). ✓ Right: the smallest ratio.

✏️ YOUR TURN 1

Try this first:

Maximise P=2x+3y+4z subject to x+y+2z⩽10, 2x+y+z⩽12, x+3y+z⩽15, x,y,z⩾0. Carry out the first iteration and state the vertex reached.

Answer:

  • z enters (−4). Ratios: 10 ÷ 2 = 5, 12 ÷ 1 = 12, 15 ÷ 1 = 15. Pivot row r, pivot 2.
  • New z row = r ÷ 2 = (½, ½, 1, ½, 0, 0 | 5).
  • s − z row = (3/2, ½, 0, −½, 1, 0 | 7). t − z row = (½, 5/2, 0, −½, 0, 1 | 10). P + 4 × z row = (0, −1, 0, 2, 0, 0 | 20).
  • Vertex: x = y = 0, z = 5, with s = 7, t = 10 and P = 20. There is still −1 under y, so it is not yet optimal.

Unlock the full note: start 7 days free.

Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.

Log in · Subscribe · Start free trial

All notes in The Simplex Algorithm

  1. The Simplex Algorithm: Slack Variables, Tableaux and Pivoting
  2. The Simplex Algorithm: Reading Tableaux, Three Variables and Solver Output
  3. Simplex with Greater-Than Constraints: Two-Stage and Big-M Methods

Video

What's inside for this topic

3 teacher notes, 82 practice questions, 39 flashcards, 2 quizzes.

Get the full notes, every practice question, flashcards, quizzes and mock papers.

Start your free 7-day trial

Questions? Chat with us on WhatsApp · Try one live lesson

Previous note: The Simplex Algorithm: Slack Variables, Tableaux and Pivoting Next note: Simplex with Greater-Than Constraints: Two-Stage and Big-M Methods

The Simplex Algorithm: Reading Tableaux, Three Variables and Solver Output on other exam boards

All OCR B (MEI) A Level Further Maths topics · A Level Further Maths