All revision notes topics

Formulating linear programsEdexcel A-Level Further Maths: Revision notes

Section 1

Building a linear program

A linear program has three parts. First choose decision variables (for example xx tables and yy chairs per week), each with a clear meaning and units. Then write the objective function to be maximised (profit) or minimised (cost), which is linear in the variables. Finally write the constraints, linear inequalities from limited resources or requirements, plus non-negativity conditions x≥0x\ge0, y≥0y\ge0. Translate words carefully: 'at most', 'no more than' and 'limited to' give ≤\le; 'at least', 'no fewer than' and 'minimum of' give ≥\ge. 'Exactly' gives ==. Example: a workshop makes tables (xx) needing 3 hours of cutting and chairs (yy) needing 2 hours, with at most 20 hours available: 3x+2y≤203x+2y\le20. If profit is £30 per table and £20 per chair, maximise P=30x+20yP=30x+20y.

Key termsdecision variablesobjective functionconstraintnon-negativity
Common mistake

Reversing an inequality, or forgetting the non-negativity conditions. Check each constraint against a point you know must be allowed.

Exam tip

Write each variable's meaning and units first; every coefficient then has a unit you can check.

Section 2

Slack variables

To use the Simplex algorithm every constraint must be an equation. For a ≤\le constraint add a slack variable, the unused amount of the resource: 3x+2y≤20⇒3x+2y+s1=20,s1≥0.3x+2y\le20\quad\Rightarrow\quad 3x+2y+s_1=20,\qquad s_1\ge0. If x=4x=4 and y=3y=3 then s1=20−12−6=2s_1=20-12-6=2: 2 hours of cutting time are unused. If s1=0s_1=0 the constraint is binding (the resource is fully used). Each ≤\le constraint gets its own slack variable (s1s_1, s2s_2, ...). At the origin (x=y=0x=y=0) every slack variable equals the right-hand side, which gives an obvious starting solution: x=y=0x=y=0 with the slack variables as the basic variables.

Key termsslack variablebinding constraintbasic variable
Common mistake

Subtracting a slack variable. A slack variable is added to a ≤\le constraint.

Exam tip

Say what the slack variable means in context: 'hours unused', not just 'the slack'.

Section 3

Surplus variables

For a ≥\ge constraint the left-hand side exceeds the requirement, so subtract a surplus variable, the amount over the minimum: x+y≥5⇒x+y−s3=5,s3≥0.x+y\ge5\quad\Rightarrow\quad x+y-s_3=5,\qquad s_3\ge0. If x=4x=4 and y=3y=3 then s3=7−5=2s_3=7-5=2: 2 units more than the minimum are supplied. At the origin the equation would give −s3=5-s_3=5, which is impossible because s3≥0s_3\ge0, so a surplus variable alone cannot give a starting solution.

Key termssurplus variable
Common mistake

Adding the surplus variable. For ≥\ge it is subtracted: x+y−s=5x+y-s=5.

Section 4

Artificial variables

Because a surplus variable cannot supply a starting basic solution, add an artificial variable t1≥0t_1\ge0 to a ≥\ge constraint (and to an == constraint): x+y−s3+t1=5.x+y-s_3+t_1=5. Now x=y=0x=y=0, s3=0s_3=0, t1=5t_1=5 is a basic feasible solution, so the algorithm can start. An artificial variable has no meaning in the real problem: it is a device, and a valid final answer must have t1=0t_1=0. Methods that remove artificial variables (the two-stage and big-M methods) come later. Summary: ≤\le gets a slack variable; ≥\ge gets a surplus and an artificial variable; == gets an artificial variable only.

Key termsartificial variablebasic feasible solution
Common mistake

Treating an artificial variable as a real quantity. It is only a starting device.

Section 5

Worked formulation

A company makes xx standard and yy deluxe boxes. Packing: 4 and 6 minutes, at most 240 minutes. Ribbon: 2 m and 5 m, at most 150 m. At least 10 boxes in total. Profit £3 and £5. Maximise P=3x+5yP=3x+5y subject to 2x+3y≤1202x+3y\le120, 2x+5y≤1502x+5y\le150, x+y≥10x+y\ge10, x,y≥0x,y\ge0. With extra variables: 2x+3y+s1=120,2x+5y+s2=150,x+y−s3+t1=10,P−3x−5y=0.2x+3y+s_1=120,\quad 2x+5y+s_2=150,\quad x+y-s_3+t_1=10,\quad P-3x-5y=0. Check by substitution: x=20x=20, y=10y=10 gives s1=120−70=50s_1=120-70=50, s2=150−90=60s_2=150-90=60 and s3=30−10=20s_3=30-10=20 with t1=0t_1=0.

Exam tip

Rearrange the objective as P−3x−5y=0P-3x-5y=0 ready for the tableau.

Exam tip

Count your extra variables: one per constraint, plus one artificial for each ≥\ge or ==.

That's the notes covered.

Carry on to the next subtopic.

Exam questions on Formulating linear programs

  1. A workshop makes xx tables and yy chairs each week. Each table needs 3 hours of cutting time and each chair needs 2 hours. There are at most 20 hours of cutting time available each week.
    Find the value of s1s_1 when x=4x=4 and y=3y=3, and state what it represents in context.2 marks
  2. A farmer mixes xx kg of feed A and yy kg of feed B. Each kilogram of either feed supplies 1 unit of a vitamin, and the mixture must supply at least 5 units of the vitamin in total.
    An artificial variable t1t_1 is also added to this constraint. Write down the equation and explain why t1t_1 is needed.2 marks
  3. A company makes xx standard gift boxes and yy deluxe gift boxes each day. A standard box needs 4 minutes of packing and 2 metres of ribbon; a deluxe box needs 6 minutes of packing and 5 metres of ribbon. Each day there are 240 minutes of packing time and 150 metres of ribbon available, and at least 10 boxes must be made. Profit is £3 per standard box and £5 per deluxe box. The company wishes to maximise its daily profit PP (in pounds).
    Formulate this situation as a linear programming problem.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).