A Level Further Mathematics · Chapter 70 · Decision Mathematics · Decision 1
When a problem has more variables than a graph can show, the simplex algorithm walks from corner to corner of the feasible region using nothing but row operations.
Graphs work for two variables, but real planning problems have dozens or thousands. The simplex algorithm steps from vertex to better neighbouring vertex in a table called a tableau, stopping when no better neighbour exists.
In this chapter · jump to a section
Start here
Your route through this chapter
By the end of this chapter you will be able to:
- add slack variables and set up the initial simplex tableau
- choose the pivot column and use the ratio test to choose the pivot row
- carry out the row operations of one iteration
- recognise an optimal tableau and read off the solution
- use the two-stage simplex method for problems with ≥ constraints
- use the big-M method for problems with ≥ constraints
Time: three sessions, about 4 hours, plus the practice ladder and the exam workshop.
You need first: linear programming, especially vertices and slack, and row operations on matrices.
The big idea
The big idea
Every vertex of the feasible region corresponds to a tableau. Pivoting moves from one vertex to an adjacent one, always improving the objective. When no improving move is left, the current vertex is optimal.
This chapter starts with the workshop from linear programming: maximise subject to , and , with . The simplex algorithm visits (0, 0), then (0, 7), then (2, 6), where .
The diagram shows the path the algorithm takes. It never visits (5, 3) or (6, 0): each step chooses an improving edge, and two steps are enough here.
Vertices and basic solutions
At a vertex, some variables are zero and the rest are determined by the constraints. In the tableau, the non-zero variables are called basic and the others non-basic. Each tableau records one such basic solution.
Slack variables turn inequalities into equations
A slack variable measures the unused amount of a resource. Adding one to each constraint turns it into an equation. Equations can then be manipulated with row operations, just like simultaneous equations.
Improving step by step
From the current vertex, the algorithm asks which variable, if increased from zero, would raise the objective fastest. It then increases that variable as far as possible without breaking a constraint. This reaches a new vertex.
Knowing when to stop
When no variable can be increased to improve the objective, the current vertex is optimal. In the tableau, this happens when the objective row has no negative entries.
Why simplex is so successful
In theory the algorithm could visit very many vertices, but in practice it usually finds the optimum after a modest number of steps. That is why it is still used to solve huge industrial problems every day.
A tableau is a compact record
The tableau stores the coefficients of every equation in a grid. Writing only the numbers, not the variable names, makes the row operations quick. The column headings remind you which variable each column belongs to.
The history of the algorithm
George Dantzig invented the simplex algorithm in 1947 while planning for the United States Air Force. It quickly spread to industry, and it remains one of the most widely used algorithms in the world, solving problems with millions of variables.
Algebra in place of geometry
With two variables, the vertices of the region can be seen on a graph. With more, they cannot, but they can still be found by solving equations. The tableau keeps track of those equations so that moving between vertices is mechanical.
Section 1
Setting up the tableau
Adding slack variables
For the workshop, introduce slack variables , and , one for each constraint. Then , and , with all variables non-negative.
Common mistake: entering the profits in the objective row with their signs unchanged, instead of negating them. The objective is rearranged to before it is entered. So the objective row holds and .
The initial tableau
Each constraint becomes a row, with a column for every variable and a final column for the value. The objective equation becomes the bottom row. The basic variables at the start are the slack variables.
The initial basic feasible solution
At the start, , so each slack variable equals the full amount of its resource: , , . This is the origin vertex, where nothing is made and .
Labelling the rows
Write the basic variable for each row in a first column headed "Basic". At the start these are the slack variables. When a variable enters the basis during a pivot, it replaces the label of the pivot row.
Many variables
The method is the same for three or more decision variables. Each constraint gets its own slack variable, and the tableau gains a column for every variable. The workshop's tableau has six columns; a problem with three variables and three constraints has seven.
Checking the set-up
Every slack column should contain a single 1 in its own row and zeros elsewhere. The objective row should contain the negated profits under the decision variables and zeros under the slack variables. These checks catch most set-up errors.
Equations with more unknowns than equations
The workshop now has three equations in five unknowns: , , , and . Setting any two of them to zero leaves three equations that usually have a unique solution. Each such choice is a basic solution, and the feasible ones are vertices.
Counting basic and non-basic variables
There is one basic variable for each constraint row, so the workshop always has three basic and two non-basic variables. When a variable enters the basis, another must leave. Keeping count is a useful check on the tableau.
Writing the tableau neatly
Draw the tableau with clear column headings and a line above the objective row. Keep each number aligned under its heading. A tidy tableau makes the row operations far less error-prone, especially once fractions appear.
Worked example 1: the workshop's tableau
Set up the initial tableau for the workshop problem.
| Working | Reason |
|---|---|
| , , | Add a slack variable to each constraint |
| Objective row: | Rearrange the objective to equal zero |
| Basic variables r, s, t with values 14, 18, 8 | The origin is the starting vertex |
Labelling slack variables
Any letters can be used for slack variables, such as , , or , , . Use the same labels consistently throughout, and give each its own column. Clear labels make reading the final tableau straightforward.
Worked example 2: three decision variables
Set up the initial tableau to maximise subject to , and .
| Working | Reason |
|---|---|
| Add slack variables , and | One for each of the three constraints |
| Rows and so on | Coefficients, then slack columns, then value |
| Objective row | Negate the profits for the bottom row |
Check yourself. Before any pivots, what value does P take in the workshop's tableau?
Show the answer
At the start, , so nothing is made and . The bottom-right entry of the initial tableau is 0.
Section 2
The pivot column and the ratio test
Choosing the pivot column
Look along the objective row for the most negative entry. Its column is the pivot column, and its variable is the entering variable. Increasing this variable raises the objective fastest per unit.
Common mistake: choosing the pivot row by the largest ratio, or including rows whose pivot-column entry is zero or negative. Only rows with a positive entry in the pivot column limit the entering variable. The least of their ratios is how far it can increase before a basic variable reaches zero.
The ratio test
- Most negative column
- y
- Ratios
- 14, 6, 8
- Pivot row
- s
- Least value after pivot
- 2
Figure 70.1 shows the ratios for each choice of pivot column. The least ratio keeps every value non-negative after the pivot.
The ratio test
For each constraint row with a positive entry in the pivot column, divide the value by that entry. The row with the least ratio is the pivot row. The entry at the crossing of the pivot row and column is the pivot.
Why the least ratio
The ratio for a row is how far the entering variable can increase before that row's basic variable falls to zero. The least ratio is the first limit reached. Going further would make that basic variable negative.
Rows that do not limit
If a row's pivot-column entry is zero, increasing the entering variable does not affect that row. If the entry is negative, the row's basic variable increases. Neither kind of row limits the increase, so both are left out of the ratio test.
Proof: the least ratio keeps every value non-negative
Let the entering variable increase from 0 to . A row with basic value and pivot-column entry then has new value
which stays non-negative exactly when . Rows with never decrease, so the largest safe increase is
which is the least ratio.
Ties in the ratio test
If two rows have the same least ratio, either may be chosen. One basic variable will then be zero after the pivot, a degenerate case. The algorithm still works, though it may take an extra iteration.
Unbounded problems
If every entry in the pivot column is zero or negative, nothing limits the entering variable. The objective can increase without limit, and the problem is unbounded. In exam problems this rarely happens.
Why the most negative entry
An entry of under y means each unit of y adds 4 to P while the other non-basic variables stay at zero. An entry of under x adds only 3. So y improves the objective fastest per unit, though not necessarily fastest overall.
The pivot column rule is a heuristic
Choosing the most negative entry is a rule of thumb, not a guarantee of the fewest iterations. Any column with a negative entry would improve the objective. Exams use the most negative rule, so follow it unless told otherwise.
Reading the ratio test in words
For row r, the ratio 7 means y can increase to 7 before the wood runs out. For row t, the ratio 8 means storage runs out at 8. Wood runs out first, so y can only reach 7, and r leaves the basis.
Recording the ratio test
Write the ratios in a column beside the tableau, with a dash for rows that are excluded. Circle the least ratio and the pivot. This short record earns method marks and makes the next step clear.
Worked example 3: the first pivot
Find the pivot for the workshop's first iteration.
| Working | Reason |
|---|---|
| Most negative objective entry is , so column y | This gives the pivot column |
| Ratios , , | Value divided by column entry |
| Least ratio 7, so pivot on 2 in row r | The pivot row is r |
What the first pivot means in context
In the three-variable problem, z enters first because tables are the most profitable product per unit. The ratio test shows that wood runs out first, at . So the first new vertex makes 5 tables and nothing else, earning 20.
Worked example 4: a three-variable pivot
Find the first pivot for the three-variable problem of worked example 2.
| Working | Reason |
|---|---|
| Most negative objective entry is , so column z | This gives the pivot column |
| Ratios , , | Value divided by column entry |
| Least ratio 5, so pivot on 2 in the first row | The pivot row is r |
Check yourself. If x were chosen as the pivot column in the workshop's initial tableau, what would the ratios be, and which row would be the pivot row?
Show the answer
The ratios are , and . The least is 6, so the pivot row would be s.
Section 3
Row operations
Dividing the pivot row
First divide every entry of the pivot row by the pivot, so that the pivot becomes 1. Change the row's label to the entering variable. This new row is used for everything that follows in the iteration.
Common mistake: clearing the pivot column using the original pivot row instead of the row after dividing by the pivot. The rest of the column must be cleared with the new pivot row, whose pivot entry is 1. Using the old row subtracts the wrong multiple and gives wrong, often negative, values.
Iterating to the optimum
- Objective value
- 28
- Optimal?
- no, pivot again
- Iterations to optimum
- 2
- Optimal profit
- 30
Figure 70.2 steps through the workshop's iterations, showing each tableau. The objective value rises from 0 to 28 and then to 30.
Clearing the column
For every other row, including the objective row, subtract the multiple of the new pivot row that makes its pivot-column entry zero. If a row has entry in the pivot column, subtract times the new pivot row.
A worked check on one row
Take row s in the first iteration: its y entry is 1, so subtract 1 times the new y row. The value becomes , and the x entry becomes . Every other entry follows the same pattern.
Writing the row operations
Exam answers should state each row operation, for example "R2 − R1" or "R4 + 4R1", where R1 is the new pivot row. This lets the examiner follow your working and award method marks even if an arithmetic slip occurs.
Fractions in the tableau
Pivots often produce fractions such as . Keep them exact, either as fractions or exact decimals. Rounding in the middle of the algorithm can lead to wrong pivot choices later.
What a pivot does geometrically
One pivot moves from the current vertex along an edge of the feasible region to the next vertex. The entering variable becomes positive, and the leaving variable, the old basic variable of the pivot row, becomes zero.
Checking an iteration
After an iteration, the new basic variables' columns should each contain a single 1 and zeros elsewhere, including in the objective row. All values in the final column, except possibly the objective, should be non-negative.
Which variable leaves
The leaving variable is the basic variable of the pivot row. In the first iteration, r leaves, because the wood is used up when y reaches 7. After the pivot, r is non-basic and equal to zero.
Checking with the original equations
After any iteration, the current basic solution must satisfy the original constraint equations. After the first iteration, , and with . Substituting gives , and , as required.
Fractions or decimals?
Exam mark schemes accept exact fractions or exact decimals. Fractions such as should stay as fractions, since their decimals do not terminate. Choose whichever keeps the arithmetic exact and clear.
A shortcut for zero entries
If a row already has a zero in the pivot column, it does not change during the iteration. Copy it straight into the new tableau. This saves time and avoids arithmetic slips.
Keeping the objective row in step
The objective row is cleared in exactly the same way as the other rows. Its new bottom-right entry is the objective value at the new vertex. If that value has decreased, an error has been made.
Worked example 5: the first iteration
Carry out the first iteration for the workshop, pivoting on 2 in row r.
| Working | Reason |
|---|---|
| New y row: | Divide row r by the pivot 2 |
| s row minus y row; t row minus y row | Clear the y column in those rows |
| Objective row plus 4 times y row: | Clear the y column in the objective row |
Iterations and vertices
Each iteration corresponds to one move between adjacent vertices. Counting iterations therefore counts the vertices visited after the start. Exam questions sometimes ask how many iterations were needed; the answer is the number of pivots carried out.
Cycling
In rare degenerate problems the algorithm can return to an earlier tableau and loop forever, called cycling. Special rules for breaking ties prevent this. Exam problems are chosen so that cycling never occurs.
Worked example 6: the second iteration
Complete the next iteration, where the pivot column is x and the pivot row is t.
| Working | Reason |
|---|---|
| Ratios 14, 4.4, 2; pivot 0.5 in row t | Least ratio is 2 in row t |
| New x row: | Divide row t by the pivot 0.5 |
| Objective row plus the x row: | No negative entries remain |
Check yourself. After the first iteration, what is the value of P in the bottom-right corner?
Show the answer
After pivoting on the y column, the objective row ends in 28. This is the profit at the vertex (0, 7).
Section 4
Reading the optimal tableau
The optimality test
A tableau is optimal when the objective row contains no negative entries. No variable can then be increased to improve the objective, so the current vertex is the best.
Common mistake: stopping while the objective row still has a negative entry. A negative entry means increasing that variable would still raise the objective. The algorithm must continue until every entry in the objective row is zero or positive.
Derivation: why a negative entry means P can still improve
After one iteration of the workshop, the objective row means
so
Increasing from 0 raises , so the tableau is not optimal. When every entry is non-negative, increasing any non-basic variable can only lower .
Reading basic variables
Each basic variable equals the value in its row. Non-basic variables are zero. In the workshop's final tableau, , and , while and .
Rounding in the final answer
If the optimal values are fractions, give them exactly unless the context needs whole numbers. In that case, the integer methods of the previous chapter apply, and the simplex answer gives an upper bound for the integer problem.
Reading the objective
The optimal value of the objective is the bottom-right entry of the tableau. For the workshop it is 30, matching the graphical solution.
Surplus at the optimum
For a constraint, the surplus variable plays the role of slack. A positive surplus shows that a requirement is more than met. A zero surplus shows the requirement is exactly met and the constraint is binding.
Interpreting slack
A slack variable that is basic and positive shows an unused resource. Here means 6 hours of labour are unused. Slack variables that are non-basic are zero, so their resources are fully used.
Using shadow prices
A shadow price is valid only for small changes, while the same constraints remain binding. For larger changes, the optimal vertex can move and the shadow price changes. Managers use shadow prices to decide whether buying more of a resource is worth its cost.
Slack and shadow price together
A resource with positive slack always has shadow price zero, since more of it cannot help. A resource with positive shadow price always has zero slack, since it is fully used. This pairing is a quick check on a final tableau.
Shadow prices
In the optimal objective row, the entry under a slack variable is its shadow price: how much the objective would rise per extra unit of that resource. Here wood has shadow price 1 and storage 2.
Writing the solution in context
Translate the tableau back into words: make 2 chairs and 6 tables for a profit of 30, using all the wood and storage but leaving 6 hours of labour. Exams reward this interpretation.
Checking the answer
Substitute the solution back into the original constraints. With and , the wood used is 14, the labour used is 12 and the storage used is 8. These match the slack values , and .
The vertices the algorithm visits
The workshop's algorithm visits (0, 0), then (0, 7), then (2, 6). Each move is along an edge of the region. If x had been chosen first, the path would have gone through (6, 0) and (5, 3) instead, taking three iterations.
Comparing with the graphical method
The simplex algorithm gives the same optimum as the graphical method of the previous chapter: 30 at (2, 6). The graphical method shows why the answer is right; the simplex method scales to problems the graph cannot show.
Alternative optima
If a non-basic variable has a zero in the optimal objective row, increasing it leaves the objective unchanged. Pivoting it in gives another optimal vertex. The problem then has more than one optimal solution.
Worked example 7: reading the workshop's tableau
Read the solution from the workshop's optimal tableau.
| Working | Reason |
|---|---|
| Objective row has no negatives | So the tableau is optimal |
| Basic: , , | Read from the value column |
| Non-basic ; | Wood and storage are fully used |
Tableaux with three decision variables
The three-variable tableau has three constraint rows and seven columns: , , , three slack variables and the value. The procedure is identical to the two-variable case. Only the arithmetic grows.
Interpreting a zero decision variable
In the three-variable optimum, : no stools are made. This is common in linear programming, where the optimum often makes only some products. A decision variable is zero when it is non-basic at the optimal vertex.
Worked example 8: the three-variable problem
After one iteration of the three-variable problem, the objective row is . Complete the solution.
| Working | Reason |
|---|---|
| under y, so not yet optimal | A negative entry remains |
| Ratios 10, 14, 4; pivot in the third row | The least ratio is 4 |
| Final with , , | No negatives remain after pivoting |
Check yourself. In the workshop's optimal tableau, what does the entry 2 under t in the objective row mean?
Show the answer
It is the shadow price of storage. One more storage space would raise the maximum profit by 2, as long as the same constraints stay binding.
Why the origin may not be feasible
With only constraints and non-negative right-hand sides, the origin is always feasible, so the simplex algorithm can start there. A constraint with a positive right-hand side excludes the origin, and a different start is needed.
Section 5
The two-stage simplex method
Problems with ≥ constraints
A constraint such as cannot use a slack variable in the usual way, because the origin breaks it. The initial tableau would then not describe a feasible vertex. The two-stage method first finds a feasible vertex, then optimises from there.
Common mistake: adding a surplus variable to a ≥ constraint instead of subtracting it, or forgetting the artificial variable. For , write , where is the surplus and is an artificial variable. The artificial variable gives a starting basic solution.
Surplus and artificial variables
The surplus variable measures how much exceeds 2. Subtracting it alone would give at the origin, which is not allowed. The artificial variable fixes this, starting at .
Reading the end of stage 1
Stage 1 ends when its objective row has no negative entries. If the stage 1 objective value is 0, the artificial variables are all zero and stage 2 can begin. The current basic variables then form a feasible starting vertex.
Stage 1
In stage 1, minimise the sum of the artificial variables, or equivalently maximise its negative. If the minimum is 0, every artificial variable is zero and the resulting vertex is feasible for the original problem.
A check on the stage 1 row
The stage 1 objective row should have zeros under every basic variable, including the artificial variables. If an artificial column has a non-zero entry in that row, the artificial variable has not been eliminated properly.
Setting up the stage 1 objective row
Write the stage 1 objective in terms of the non-basic variables by subtracting the artificial variable's row. For , maximising gives the objective row for columns .
Stage 2
In stage 2, remove the artificial columns and use the original objective, rewritten in terms of the current non-basic variables. Then continue the simplex algorithm as usual until the tableau is optimal.
Stage 2 objective row
At the start of stage 2, the original objective must be written using only the current non-basic variables. Substitute for any basic decision variables using their rows. This is the step where most two-stage errors occur.
When stage 1 fails
If stage 1 cannot reduce the artificial variables to zero, the original constraints have no common solution. The problem is infeasible, and stage 2 is never reached.
Equality constraints
An equality constraint such as also excludes the origin. It needs an artificial variable but no slack or surplus: . The two-stage or big-M method then handles it in the same way.
Several artificial variables
If a problem has several constraints, each gets its own surplus and artificial variable. Stage 1 then minimises the sum of all the artificial variables. A minimum of zero means every one of them has been driven out.
Naming the extra variables
Exam questions often call surplus variables with a subscript and artificial variables or with a subscript. Use whatever names the question gives. If it gives none, state your own names clearly before writing the equations.
Worked example 9: setting up the two-stage method
Maximise subject to and . Write the constraints as equations for the two-stage method.
| Working | Reason |
|---|---|
| Slack variable for the ≤ constraint | |
| Subtract surplus, add artificial variable | |
| Stage 1: maximise , starting with , | A feasible start for the new system |
Checking the two-stage answer
With only two decision variables, the two-stage answer can be checked graphically. The region is the triangle with vertices (2, 0), (8, 0) and (2, 6), and is greatest at (2, 6), where it is 22.
Removing artificial columns
Once stage 1 ends with every artificial variable non-basic and zero, their columns can be deleted. They play no further part. Keeping them adds clutter and makes stage 2 arithmetic harder.
Worked example 10: completing the two-stage method
Complete both stages for the problem of worked example 9.
| Working | Reason |
|---|---|
| Stage 1 pivots x into the basis: , | The artificial variable leaves |
| Stage 2 objective row | Rewrite P using the stage 1 result |
| Pivot y in: , | No negatives remain, so optimal |
Check yourself. At the optimum (2, 6), what is the value of the surplus variable ?
Show the answer
The surplus measures how far exceeds 2. At it is , so and the constraint is binding.
Section 6
The big-M method
One stage instead of two
The big-M method combines the two stages. The objective is penalised by a very large number for every unit of each artificial variable. The algorithm then drives the artificial variables out as it optimises.
Common mistake: treating M as a modest number, so the artificial variable stays positive and the answer is infeasible. M must be large enough that keeping any artificial variable is never worthwhile. In hand calculations, M is kept as a symbol and treated as larger than any number it is compared with.
The big-M method
- Optimal objective
- 22
- Artificial a
- 0
- True optimum
- 22
Figure 70.3 shows the big-M method for different values of M. A small M lets the artificial variable survive, giving a wrong answer.
Setting up the big-M objective
For the example, maximise . Rewriting with gives . The objective row becomes .
Why big M works
Every unit of an artificial variable costs M in the objective. If M is larger than any possible gain from breaking a constraint, the algorithm will always prefer to drive the artificial variables to zero. That is why M must be treated as larger than any number in the problem.
Comparing entries with M
With M as a symbol, compare objective row entries by their M parts first. The entry is more negative than , because M is huge. So x enters first, which drives out.
After the artificial variable leaves
Once every artificial variable is non-basic, the M terms disappear from the useful parts of the objective row. The rest of the algorithm proceeds exactly as in the ordinary simplex method.
Practical software
Computer solvers use refined versions of both methods, together with techniques that keep the arithmetic accurate for huge problems. The ideas are exactly those in this chapter: find a feasible starting vertex, then improve it one pivot at a time.
Two-stage or big-M?
Both methods give the same optimum. The two-stage method avoids working with M but needs two objective rows. The big-M method needs only one stage but keeps M in the arithmetic. Exam questions specify which to use.
Minimisation problems
To minimise an objective , maximise instead. All the methods in this chapter then apply unchanged. The minimum of is the negative of the maximum of .
The big-M tableau
The big-M tableau has the same constraint rows as the two-stage method, with columns for , , , and . Only the objective row differs. Writing it correctly, with the artificial variable eliminated, is the step examiners check most closely.
Worked example 11: the big-M set-up
Set up the big-M objective row for maximising subject to and .
| Working | Reason |
|---|---|
| Maximise | Penalise the artificial variable |
| Substitute | Express in non-basic variables |
| Row | The initial objective row |
Arithmetic with M
Entries such as are handled like algebraic expressions. Add and subtract the M parts and the number parts separately. Only when comparing entries does the size of M matter: any positive multiple of M beats any number.
Choosing between the methods in an exam
Read the question: it will say whether to use the two-stage method or the big-M method. If it does not, either is acceptable, but say which you are using at the start. Both earn full marks when carried out correctly.
Minimisation by the simplex algorithm
To minimise , maximise . The objective row then holds and , the negatives of and . When the algorithm finishes, the minimum of is the negative of the final value.
Worked example 12: the big-M result
Complete the big-M method for this problem, treating M as very large.
| Working | Reason |
|---|---|
| is most negative, so x enters; a leaves | M dominates every other entry |
| Then y enters with ratio 6 | Least ratio in the remaining rows |
| Optimum at , , | The artificial variable has gone |
Check yourself. If M were only 0.5 in the big-M example, what objective value would the tableau give, and why is it wrong?
Show the answer
The tableau would give 23 with and . The artificial variable is still positive, so the constraint is broken and the answer is infeasible.
Reference
Results in this chapter
| Result | What it says | When to use it | In the formula booklet? |
|---|---|---|---|
| Add slack to each ≤ constraint | Inequalities to equations | Setting up the tableau | No, learn it |
| Objective row holds negated profits | Setting up the tableau | No, learn it | |
| Pivot column: most negative entry | Entering variable | Each iteration | No, learn it |
| Pivot row: least non-negative ratio | Leaving variable | Each iteration | No, derive it |
| Optimal when no negatives remain | Stopping rule | Ending the algorithm | No, learn it |
| Two-stage or big-M for ≥ constraints | Artificial variables | Infeasible origin | No, learn it |
Reasoning
Modelling task: a three-product workshop
The situation
A workshop now makes three products: stools, chairs and tables, in amounts , and . Each uses wood, labour and finishing time, with 10, 12 and 15 units available. The resources used per item are 1, 1, 2 for wood, 2, 1, 1 for labour and 1, 3, 1 for finishing. Profits are 2, 3 and 4.
Assumptions
Resources are used in proportion to the number of items, every item sells, and fractional amounts are acceptable as an average daily plan. The profits are fixed.
This gives a linear programme with three variables, too many to draw, so the simplex algorithm is needed.
The model
Maximise subject to , and , with all variables non-negative.
Results
The simplex algorithm takes two iterations. The optimum is with , and . Wood and finishing are fully used, but 5 units of labour are spare.
Evaluating the model
The model suggests making no stools at all, which may disappoint some customers. A demand constraint such as could be added and solved by the two-stage or big-M method.
The spare labour suggests that the workshop could take on other work. The shadow prices in the final tableau show that extra wood or finishing time would raise the profit, which tells the owner where extra spending would pay off.
Your turn
The final objective row is for columns . Which resource would be most valuable to increase, and by how much would one extra unit raise the profit?
Show a model answer
The shadow prices are 1.8 for wood, 0 for labour and 0.4 for finishing. One extra unit of wood would raise the maximum profit by 1.8, so wood is the most valuable resource to increase.
Practice
Practice ladder
Rung 1: Recall and fluency
Q1. Write down the initial tableau to maximise subject to .
Worked solution to Q1
Adding a slack variable to the single constraint gives the row . The objective row negates the profits, giving , and the slack variable starts as the basic variable with value 10.
Q2. For the workshop's initial tableau, find the ratios for the x column and state the pivot row.
Worked solution to Q2
The ratios are , and . The least ratio, 6, is in row s, so s would be the pivot row.
Q3. Identify the pivot row for the z column of the three-variable problem.
Worked solution to Q3
The ratios are , and . The least, 5, is in the first row, so the first row is the pivot row.
Rung 2: Application
Q4. Give the value of P after the workshop's first iteration.
Worked solution to Q4
Pivoting on 2 in row r and clearing the y column gives the objective row . So P is 28 after one iteration, at the vertex (0, 7).
Q5. State the value of the labour slack s in the workshop's optimal tableau.
Worked solution to Q5
In the optimal tableau, s is basic with value 6 in its row. So 6 hours of labour remain unused at the optimum.
Q6. Calculate the optimal profit for the three-variable problem.
Worked solution to Q6
After two iterations the objective row has no negative entries and ends in 24. So the maximum profit is 24, with and .
Rung 3: Analysis
Q7. Deduce how many iterations the three-variable problem needs.
Worked solution to Q7
The first iteration brings z into the basis, leaving under y. The second brings y in, after which no negatives remain, so 2 iterations are needed.
Q8. In the three-variable problem's optimal tableau, find the value of the labour slack s.
Worked solution to Q8
The slack variable s is basic in the optimal tableau with value 5. So 5 units of labour are unused at the optimum.
Q9. Use the two-stage method's result to state the maximum of subject to and .
Worked solution to Q9
Stage 1 brings x into the basis at 2, and stage 2 brings y in at 6. The maximum is 22, at and .
Rung 4: Stretch
Q10. A student pivots the workshop's initial tableau on the y column in row s, the largest ratio. Explain what goes wrong.
Worked solution to Q10
Increasing y to 18 breaks the wood constraint, so after pivoting the value in row r becomes . A negative basic variable is not feasible, which is why the least ratio must be used.
Q11. A student pivots on 2 in row r but clears the y column with the undivided row r. Find the value that appears in row t and explain.
Worked solution to Q11
Subtracting the undivided row from row t gives in the value column. The new pivot row with value 7 should have been used, giving .
Q12. In the big-M example, a student uses . Find the objective value obtained and explain why it is wrong.
Worked solution to Q12
With the algorithm keeps and gives an objective value of 23. Since is positive, is broken, so the answer is infeasible; the true maximum is 22.
Exam practice
Exam technique and worked answer workshop
How these questions are marked
M1 marks go to correct set-up, a correct choice of pivot with the ratio test shown, and correct row operations stated. A1 marks go to correct tableaux and values. B1 marks go to stating the optimality test and interpreting the final tableau.
Always show the ratios and state which row operations you use. At the end, state the values of every variable and the objective, and explain why the tableau is optimal.
Exam question 1 (6 marks · Paper 3 · about 8 minutes)
Set up the initial simplex tableau for the workshop problem: maximise subject to , and . Identify the pivot, showing the ratio test. (6)
Mark scheme for exam question 1
Slack variables added M1
Correct constraint rows A1
Objective row A1
Pivot column y B1
Ratios 7, 18, 8 M1
Pivot 2 in row r A1
Exam question 2 (7 marks · Paper 3 · about 10 minutes)
Complete the simplex algorithm for the workshop problem, stating the row operations used in each iteration. Give the optimal values of x, y and P. (7)
Mark scheme for exam question 2
Divides row r by 2 M1
First iteration correct, P = 28 A1
Second pivot column x, ratios 14, 4.4, 2 M1
Pivot 0.5 in row t A1
Second iteration correct A1
No negatives in objective row, so optimal B1
, , A1
Exam question 3 (6 marks · Paper 3 · about 8 minutes)
The workshop's optimal objective row is for columns . Interpret the final tableau, stating which resources are fully used and the meaning of the entries under r and t. (6)
Mark scheme for exam question 3
and , non-basic M1
Wood and storage fully used A1
A1
6 hours of labour unused B1
Entry 1: shadow price of wood B1
Entry 2: shadow price of storage B1
Exam question 4 (7 marks · Paper 3 · about 10 minutes)
Use the simplex algorithm to maximise subject to , and , with all variables non-negative. (7)
Mark scheme for exam question 4
Correct initial tableau B1
Pivot column z, ratios 5, 12, 15 M1
First iteration, P = 20 A1
Pivot column y, ratios 10, 14, 4 M1
Second iteration correct A1
No negatives, so optimal B1
, , , A1
Exam question 5 (5 marks · Paper 3 · about 7 minutes)
After one iteration of the workshop problem the objective row is . Explain why this tableau is not optimal and state which variable should enter the basis next. (5)
Mark scheme for exam question 5
A negative entry remains B1
Under x B1
Increasing x would raise P M1
x enters next A1
Current P = 28 is not the maximum A1
Exam question 6 (6 marks · Paper 3 · about 8 minutes)
Use the two-stage simplex method to maximise subject to and . (6)
Mark scheme for exam question 6
B1
Stage 1 objective maximises M1
Stage 1 ends with , A1
Stage 2 objective rewritten M1
y enters, A1
A1
Exam question 7 (6 marks · Paper 3 · about 8 minutes)
Solve the same problem by the big-M method, giving the initial objective row and explaining the choice of the first pivot column. (6)
Mark scheme for exam question 7
Objective B1
Substitutes for M1
Row A1
most negative as M is large B1
a leaves, then y enters M1
A1
Exam question 8 (5 marks · Paper 3 · about 7 minutes)
In the big-M example, explain what goes wrong if M is taken to be 0.5, and state the objective value that the algorithm would give. (5)
Mark scheme for exam question 8
Penalty too small B1
Keeping a is worthwhile M1
Objective value 23 A1
, so broken A1
Answer infeasible; M must be large B1
Annotated model answer: exam question 2
Divide row r by 2 to give the new y row . M1. Then subtract it from rows s and t, and add 4 times it to the objective row, giving . A1. The x column is now the most negative, with ratios 14, 4.4 and 2. M1. The least is 2, so pivot on 0.5 in row t. A1.
Dividing row t by 0.5 and clearing the x column gives the objective row . A1. There are no negative entries, so the tableau is optimal. B1. The solution is , and . A1.
Annotated model answer: exam question 6
Write the constraints as and . B1. In stage 1, maximise , whose row is . M1. Pivoting x in on the second row makes and , ending stage 1. A1.
In stage 2, rewrite using , giving the row . M1. Pivoting y in on the first row gives , A1, and the maximum . A1.
Connections
Synoptic link
Linear programming showed that optima lie at vertices and introduced slack; the simplex algorithm finds those vertices algebraically. Inverse matrices and systems of three equations used row operations, which are exactly what a pivot performs.
Algorithms, sorting and bin packing introduced the idea of an algorithm with a stopping rule. The simplex algorithm's stopping rule, no negatives in the objective row, guarantees the answer is optimal.
Synoptic question 1. Explain why each iteration of the simplex algorithm cannot decrease the objective value.
Answer to synoptic question 1
The pivot column has a negative objective entry, so increasing its variable raises the objective. The ratio test keeps the new vertex feasible, so each iteration moves to a vertex at least as good as the last.
Recap
Recap and next step
- Slack variables turn ≤ constraints into equations; the objective row holds negated profits.
- The pivot column has the most negative objective entry.
- The pivot row has the least ratio among rows with a positive entry in the pivot column.
- Divide the pivot row by the pivot, then clear the column with the new row.
- The tableau is optimal when the objective row has no negatives; read basic variables from the value column.
- For ≥ constraints, use surplus and artificial variables with the two-stage or big-M method.
Next chapter: Transportation problems, which find the cheapest way to move goods from suppliers to customers.
For your exam board
This chapter covers Pearson Edexcel A Level Further Mathematics (9FM0) Decision Mathematics 1 section 7: formulating problems for the simplex algorithm, slack variables, the simplex tableau and its iterations, and the two-stage simplex and big-M methods. It is assessed on Paper 3D, Decision Mathematics 1. Similar content appears in AQA (7367) and OCR (H245) discrete options.