All revision notes topics

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: 2x+y≤102x+y\leq10 becomes 2x+y+r=102x+y+r=10 with r≥0r\geq0. The slack is the unused part of the resource. Write the objective as P−4x−3y=0P-4x-3y=0 for P=4x+3yP=4x+3y. The initial tableau lists these equations, one row per constraint plus the objective row. The variables that are non-zero (here rr and ss) are the basic variables; the others are non-basic and equal 0. At the start, x=y=0x=y=0, the slack variables take the right-hand sides and P=0P=0.

Key termsslack variablebasic variablenon-basic variable
Common mistake

Forgetting the slack variables in the equations, or giving them the wrong sign. A ≤\leq constraint needs ++ slack.

Section 2

One iteration of the simplex algorithm

  1. 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 right-hand sideentry\frac{\text{right-hand side}}{\text{entry}} 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 PP. Repeat. Example: with P−4x−3y=0P-4x-3y=0, 2x+y+r=102x+y+r=10, x+y+s=8x+y+s=8 the pivot column is xx, the ratios are 102=5\frac{10}{2}=5 and 81=8\frac81=8, so the pivot is the 2 in the rr row.
Key termspivot columnpivot rowratio test
Exam tip

Ignore zero and negative entries in the pivot column when you do the ratio test.

Common mistake

Dividing by a negative entry in the ratio test. Only positive entries are used.

Section 3

Worked example

Maximise P=3x+2yP=3x+2y subject to 2x+y≤142x+y\leq14 and x+2y≤10x+2y\leq10. Initial: 2x+y+r=142x+y+r=14, x+2y+s=10x+2y+s=10, P−3x−2y=0P-3x-2y=0. Pivot column xx; ratios 77 and 1010, so pivot on the 2. After iteration 1: x+12y+12r=7x+\frac12y+\frac12r=7, 32y−12r+s=3\frac32y-\frac12r+s=3, P−12y+32r=21P-\frac12y+\frac32r=21. The objective row still has −12-\frac12. Pivot column yy; ratios 1414 and 22, so pivot on the 32\frac32. After iteration 2: x+23r−13s=6x+\frac23r-\frac13s=6, y−13r+23s=2y-\frac13r+\frac23s=2, P+43r+13s=22P+\frac43r+\frac13s=22. No negative coefficients remain, so the solution is optimal: x=6x=6, y=2y=2, P=22P=22. This agrees with the graphical method, where the optimum is the vertex (6,2)(6,2).

Exam tip

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 PP 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 r=0r=0, s=0s=0 and t=8t=8, 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.

Key termsoptimalbinding constraint
Common mistake

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 QQ, maximise P=−QP=-Q instead, then the minimum of QQ is −P-P. Example: minimise Q=x−2yQ=x-2y subject to 2x+y≤122x+y\leq12 and x+y≤7x+y\leq7. Maximise P=−x+2yP=-x+2y, with objective row P+x−2y=0P+x-2y=0. The pivot column is yy and the ratios are 1212 and 77, so the pivot is the 1 in the second row. After one iteration the objective row is P+3x+2s=14P+3x+2s=14, with no negative entries, so y=7y=7, x=0x=0 and P=14P=14. The minimum value of QQ is −14-14.

Key termsminimising
Common mistake

Giving the answer as PP. State the minimum of QQ as the negative of the maximum of P=−QP=-Q.

That's the notes covered.

Carry on to the next subtopic.

Exam questions on The simplex algorithm

  1. Maximise P=2x+yP=2x+y subject to x+y≤8x+y\leq8, 3x+y≤183x+y\leq18, x≥0x\geq0 and y≥0y\geq0. The simplex algorithm is to be used, with slack variables rr and ss added to the first and second constraints.
    Carry out the first iteration. State the values of xx, yy and PP after it.2 marks
  2. The simplex algorithm is used to maximise P=2x+3yP=2x+3y subject to x+2y≤14x+2y\leq14 and 3x+y≤183x+y\leq18, with slack variables rr and ss. After the first iteration the equations are 12x+y+12r=7\frac12x+y+\frac12r=7, 52x−12r+s=11\frac52x-\frac12r+s=11 and P−12x+32r=21P-\frac12x+\frac32r=21.
    Find the pivot row for the next iteration, giving a reason.2 marks
  3. Maximise P=4x+3yP=4x+3y subject to 2x+y≤102x+y\leq10, x+y≤8x+y\leq8, x≥0x\geq0 and y≥0y\geq0. The simplex algorithm is to be used with slack variables rr and ss 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
See the full worksheet

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).