All revision notes topics

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 xx and yy: 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 xyxy or powers like x2x^2. Formulation is the translation of the words into this form; solving comes later.
Key termslinear programmingdecision variableobjective functionconstraint
Exam tip

Say 'let xx be the number of ...' with units. An unlabelled xx and yy 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) ×\times (number made), summed over products: P=20x+30yP=20x+30y. Total cost has the same form: C=0.4x+0.6yC=0.4x+0.6y. 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.

Key termsprofittotal cost
Common mistake

Swapping coefficients between variables, e.g. writing 20y+30x20y+30x 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) ×\times (number of units): in the bakery example, flour is 3x+2y≤603x+2y\le60 and oven time is 2x+4y≤802x+4y\le80. Use these words as a guide:

  • 'at most', 'no more than', 'up to', 'a maximum of': ≤\le;
  • 'at least', 'no fewer than', 'a minimum of', 'must provide': ≥\ge;
  • 'at least twice as many yy as xx': y≥2xy\ge2x;
  • 'the number of yy must not exceed the number of xx': y≤xy\le x;
  • 'at least 25% of the total is yy': y≥0.25(x+y)y\ge0.25(x+y), which simplifies to 3y≥x3y\ge x. 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 ≥\ge.
Key termsinequalityresource constraint
Common mistake

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: x≥0x\ge0 and y≥0y\ge0. Some problems have a stronger lower limit, such as x≥40x\ge40; then this replaces x≥0x\ge0, but you still state y≥0y\ge0. If the items are indivisible (tables, parcels, people) the variables must be integers, so state 'xx and yy 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.

Key termsnon-negativityinteger
Exam tip

Always list x≥0x\ge0 and y≥0y\ge0 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 xx of A and yy 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 P=20x+30yP=20x+30y subject to 3x+2y≤603x+2y\le60, 2x+4y≤802x+4y\le80, x≥0x\ge0, y≥0y\ge0. To test whether a plan is feasible, substitute it into every constraint. For x=10x=10, y=10y=10: flour 50≤6050\le60, oven 60≤8060\le80, so it is feasible and gives P=500P=500. For x=20x=20, y=10y=10: flour 80>6080>60, 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.

Key termsfeasible
Common mistake

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

  1. 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 xx batches of A and yy 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
  2. 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 xx kg of X and yy 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
  3. A workshop makes xx tables and yy 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
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).