The simplex algorithmAQA A-Level Further Maths: Revision notes
Section 1
Slack variables and the initial tableau
The simplex algorithm solves linear programming problems algebraically, so it works when there are too many variables to draw. First write every constraint as an equation by adding a slack variable: becomes with . The slack is the unused part of the resource. Write the objective as for . The initial tableau lists these equations, one row per constraint plus the objective row. The variables that are non-zero (here and ) are the basic variables; the others are non-basic and equal 0. At the start, , the slack variables take the right-hand sides and .
Forgetting the slack variables in the equations, or giving them the wrong sign. A constraint needs slack.
Section 2
One iteration of the simplex algorithm
- Pivot column: in the objective row choose the most negative entry. If there are none, stop. 2. Pivot row: for each row where the pivot-column entry is positive, calculate the ratio and choose the smallest. 3. Pivot: divide the pivot row by the pivot entry so it becomes 1, then add or subtract multiples of this row from the others (including the objective row) to make every other entry in the pivot column 0. The new tableau gives a better value of . Repeat. Example: with , , the pivot column is , the ratios are and , so the pivot is the 2 in the row.
Ignore zero and negative entries in the pivot column when you do the ratio test.
Dividing by a negative entry in the ratio test. Only positive entries are used.
Section 3
Worked example
Maximise subject to and . Initial: , , . Pivot column ; ratios and , so pivot on the 2. After iteration 1: , , . The objective row still has . Pivot column ; ratios and , so pivot on the . After iteration 2: , , . No negative coefficients remain, so the solution is optimal: , , . This agrees with the graphical method, where the optimum is the vertex .
Check each new tableau: every basic column should be a unit column, and the right-hand sides must stay non-negative.
Section 4
Interpreting a tableau
Read the current solution from the tableau: basic variables take the right-hand side of their row, non-basic variables are 0, and is the right-hand side of the objective row. A solution is optimal when every coefficient in the objective row is non-negative. A slack of 0 means that constraint is binding (that resource is fully used); a positive slack is the amount unused. Example: if the final tableau has , and , the first two resources are fully used and 8 units of the third are spare. If a negative coefficient is still in the objective row, the current solution is not optimal and another iteration is needed.
Reading the value of a non-basic variable from the right-hand side. Non-basic variables are 0.
Section 5
Minimising an objective function
The simplex algorithm as set out maximises. To minimise , maximise instead, then the minimum of is . Example: minimise subject to and . Maximise , with objective row . The pivot column is and the ratios are and , so the pivot is the 1 in the second row. After one iteration the objective row is , with no negative entries, so , and . The minimum value of is .
Giving the answer as . State the minimum of as the negative of the maximum of .
That's the notes covered.
Carry on to the next subtopic.
Exam questions on The simplex algorithm
- Maximise subject to , , and . The simplex algorithm is to be used, with slack variables and added to the first and second constraints.Carry out the first iteration. State the values of , and after it.2 marks
- The simplex algorithm is used to maximise subject to and , with slack variables and . After the first iteration the equations are , and .Find the pivot row for the next iteration, giving a reason.2 marks
- Maximise subject to , , and . The simplex algorithm is to be used with slack variables and added to the first and second constraints.Write down the initial simplex tableau as equations, and state which entry is the pivot in the first iteration, with a reason.3 marks
Written by the Exaim team, led by Shaun Daswani (Head of Upper Secondary, Improve ME Institute; MSc Financial Mathematics, Imperial College London; BSc, UCL) and Jason Daswani (operational lead, Improve ME Institute; LSE).