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 tables and 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 , . Translate words carefully: 'at most', 'no more than' and 'limited to' give ; 'at least', 'no fewer than' and 'minimum of' give . 'Exactly' gives . Example: a workshop makes tables () needing 3 hours of cutting and chairs () needing 2 hours, with at most 20 hours available: . If profit is £30 per table and £20 per chair, maximise .
Reversing an inequality, or forgetting the non-negativity conditions. Check each constraint against a point you know must be allowed.
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 constraint add a slack variable, the unused amount of the resource: If and then : 2 hours of cutting time are unused. If the constraint is binding (the resource is fully used). Each constraint gets its own slack variable (, , ...). At the origin () every slack variable equals the right-hand side, which gives an obvious starting solution: with the slack variables as the basic variables.
Subtracting a slack variable. A slack variable is added to a constraint.
Say what the slack variable means in context: 'hours unused', not just 'the slack'.
Section 3
Surplus variables
For a constraint the left-hand side exceeds the requirement, so subtract a surplus variable, the amount over the minimum: If and then : 2 units more than the minimum are supplied. At the origin the equation would give , which is impossible because , so a surplus variable alone cannot give a starting solution.
Adding the surplus variable. For it is subtracted: .
Section 4
Artificial variables
Because a surplus variable cannot supply a starting basic solution, add an artificial variable to a constraint (and to an constraint): Now , , 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 . Methods that remove artificial variables (the two-stage and big-M methods) come later. Summary: gets a slack variable; gets a surplus and an artificial variable; gets an artificial variable only.
Treating an artificial variable as a real quantity. It is only a starting device.
Section 5
Worked formulation
A company makes standard and 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 subject to , , , . With extra variables: Check by substitution: , gives , and with .
Rearrange the objective as ready for the tableau.
Count your extra variables: one per constraint, plus one artificial for each or .
That's the notes covered.
Carry on to the next subtopic.
Exam questions on Formulating linear programs
- A workshop makes tables and 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 when and , and state what it represents in context.2 marks
- A farmer mixes kg of feed A and 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 is also added to this constraint. Write down the equation and explain why is needed.2 marks
- A company makes standard gift boxes and 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 (in pounds).Formulate this situation as a linear programming problem.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).