The Simplex Algorithm: Slack Variables, Tableaux and Pivoting | AQA A Level Further Maths notes
Free preview: The Simplex Algorithm: Slack Variables, Tableaux and Pivoting
Why We Need Simplex, and Slack Variables
Year 2 (A level) for OCR A, where the simplex algorithm is A level content. 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
Let's start with a problem. A factory makes 12 products using 30 machines. Each product is a variable. You can't draw a graph in 12 dimensions! The graphical method stops working after two variables.
- The simplex algorithm is a table-based method that works for any number of variables.
- You met the big fact in the LP notes: the optimum is at a vertex of the feasible region R.
- Simplex uses that fact. It starts at the origin (a vertex), and each step moves to a better neighbouring vertex, until no neighbour is better.
- Think of climbing a hill in fog. You can't see the top, but you can always feel which way is uphill. When every direction is downhill, you are at the top.
Our example
Step 1: slack variables
Algebra is much easier with equations than with inequalities. So we turn each into an equation by adding a new variable that soaks up the gap.
- A slack variable measures how much of a resource is left over. It turns each inequality into an equation.
- becomes with . If x = 1 and y = 1, then r = 2: two units unused.
- Similarly and , with .
- Rewrite the objective with everything on one side: .
๐ก In plain words
- Slack = what is left of a resource after your plan uses some.
- Slack 0 means that resource is used up exactly: you are on that constraint's boundary line.
- Slack can never be negative: you can't use more than you have.
๐ Watch me do it: read off slack values for a plan
| What I write | Why I do it |
|---|---|
| Plan: x = 2, y = 1. | Any feasible point will do. |
| One unit of the first resource left. | |
| Four units of the second left. | |
| One unit of the third left. | |
| All three are , so (2, 1) is feasible. | A negative slack would mean the plan breaks that constraint. |
โ๏ธ YOUR TURN 1
Try this first:
Write the constraints and as equations with slack variables r and s. Find r and s when x = 5 and y = 2.
Answer:
- and , with .
- and .
The Initial Tableau
Now we store all the equations in one table, called a tableau (plural tableaux). Each row is one equation; each column is one variable.
The recipe: building the initial tableau
- One column per variable, original ones first, then the slacks, then a Value column. Why: everyone reads the same layout, and the examiner can follow you.
- One row per constraint, with its coefficients and its right-hand side in Value.
- Label each row with its basic variable: at the start, the slack of that row.
- Last row: the objective, from . The coefficients go in with their minus signs. Why: negatives show which variables would still increase P.
| Basic variable | x | y | r | s | t | Value |
|---|---|---|---|---|---|---|
| r | 1 | 1 | 1 | 0 | 0 | 4 |
| s | 1 | 3 | 0 | 1 | 0 | 9 |
| t | 1 | 0 | 0 | 0 | 1 | 3 |
| P | โ3 | โ2 | 0 | 0 | 0 | 0 |
Reading a tableau
- Each row is one equation. The last row is the objective row.
- Basic variables (here r, s, t) are read from the Value column: r = 4, s = 9, t = 3.
- Non-basic variables (x and y) are zero. So this tableau is the vertex O, with P = 0.
- Notice each basic variable has a column that is all 0s except a single 1 in its own row. That is how you can tell it is basic.
- A negative number in the objective row means increasing that variable would increase P. So we are not at the optimum yet.
๐ Signs in the objective row
- โ Wrong: writing 3 and 2 in the P row for .
- โ Right: rearrange to , so the P row reads โ3, โ2.
- The signs matter: the method looks for negatives.
โ๏ธ YOUR TURN 2
Try this first:
Write the initial tableau for: maximise subject to , , , using slack variables r and s. Which vertex does it represent?
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
- The Simplex Algorithm: Slack Variables, Tableaux and Pivoting
- The Simplex Algorithm: Reading Tableaux, Three Variables and Solver Output
- Simplex with Greater-Than Constraints: Two-Stage and Big-M Methods
Video
What's inside for this topic
3 teacher notes, 64 practice questions, 36 flashcards, 2 quizzes.
Get the full notes, every practice question, flashcards, quizzes and mock papers.
Next note: The Simplex Algorithm: Reading Tableaux, Three Variables and Solver Output
The Simplex Algorithm: Slack Variables, Tableaux and Pivoting on other exam boards
All AQA A Level Further Maths topics ยท A Level Further Maths