Formulating linear programsEdexcel International A Level Maths: Revision notes
Section 1
What a linear program is
Linear programming finds the best value of a quantity (for example profit or cost) subject to limits on resources. A formulated problem has three parts:
- the decision variables, such as and : the quantities you can choose;
- the objective function, a linear expression in the variables to be maximised (profit) or minimised (cost);
- the constraints, linear inequalities that the variables must satisfy. 'Linear' means each term is a number times a single variable, with no products like or powers like . Formulation is the translation of the words into this form; solving comes later.
Say 'let be the number of ...' with units. An unlabelled and lose marks.
Section 2
Choosing variables and the objective
Read the question to find what is being decided, and define one variable for each: the number of batches of loaf A and B, the kilograms of each feed, the number of tables and chairs. Write the units in the definition. The objective function comes from what the question wants to optimise. Total profit (profit per unit) (number made), summed over products: . Total cost has the same form: . People fed, items sold and so on follow the same pattern. State clearly 'maximise' or 'minimise'. Take care to attach each coefficient to the right variable.
Swapping coefficients between variables, e.g. writing when A has the profit of 20. Check each against the question.
Section 3
Writing constraints
Each limit in the question becomes an inequality. For a resource (flour, hours, money) the amount used is a sum of (amount per unit) (number of units): in the bakery example, flour is and oven time is . Use these words as a guide:
- 'at most', 'no more than', 'up to', 'a maximum of': ;
- 'at least', 'no fewer than', 'a minimum of', 'must provide': ;
- 'at least twice as many as ': ;
- 'the number of must not exceed the number of ': ;
- 'at least 25% of the total is ': , which simplifies to . Check every constraint with a test value to make sure the inequality points the right way. Where the question gives a requirement (a minimum amount of protein) the inequality uses .
Reversing the inequality for 'at least' or 'at most'. Write the sentence in words first, then in symbols.
Section 4
Non-negativity and integer conditions
Quantities such as the number of items made cannot be negative, so you must state non-negativity: and . Some problems have a stronger lower limit, such as ; then this replaces , but you still state . If the items are indivisible (tables, parcels, people) the variables must be integers, so state ' and are integers'. If they are continuous (kilograms of feed, litres) they need not be. This matters when the problem is later solved: the best integer point may differ from the best point in the region.
Always list and unless a stronger lower limit is given, and say when integers are needed.
Section 5
Worked example and checking a plan
A bakery makes batches of A and of B. A needs 3 kg flour and 2 hours oven time; B needs 2 kg and 4 hours; there are 60 kg and 80 hours; profit is £20 and £30. Maximise subject to , , , . To test whether a plan is feasible, substitute it into every constraint. For , : flour , oven , so it is feasible and gives . For , : flour , so it is not feasible. A feasible plan which is not the best possible is not optimal. New conditions, such as a budget, are just extra inequalities added to the list.
Forgetting a constraint that is only implied in the words, such as 'at least 40 of one type'. Re-read the question against your list.
That's the notes covered.
Carry on to the next subtopic.
Exam questions on Formulating linear programs
- A bakery makes two types of bread. Each batch of loaf A needs 3 kg of flour and 2 hours of oven time. Each batch of loaf B needs 2 kg of flour and 4 hours of oven time. Each day there are 60 kg of flour and 80 hours of oven time available. The profit is £20 per batch of A and £30 per batch of B. The bakery makes batches of A and batches of B each day, and wants to maximise its daily profit.Write down the objective function, saying whether it is to be maximised or minimised, and write down the non-negativity conditions.2 marks
- A farmer mixes two feeds, X and Y, for cattle. Feed X costs £0.40 per kg and contains 3 units of protein and 1 unit of vitamin per kg. Feed Y costs £0.60 per kg and contains 1 unit of protein and 2 units of vitamin per kg. Each day the mixture must provide at least 15 units of protein and at least 12 units of vitamin, and the farmer can store at most 20 kg of mixture. The farmer uses kg of X and kg of Y each day, and wants to minimise the daily cost.Write down the inequality for the vitamin requirement and the inequality for the storage limit.2 marks
- A workshop makes tables and chairs each week. A table needs 6 hours of carpentry and 1 hour of painting. A chair needs 2 hours of carpentry and 1 hour of painting. There are 120 hours of carpentry and 40 hours of painting available each week. The workshop must make at least 4 tables and at least three times as many chairs as tables. The profit is £50 per table and £15 per chair, and the workshop wants to maximise its weekly profit. Only whole tables and chairs can be made.Write down the inequalities for the hours of carpentry and painting, and for the non-negativity of the variables.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).