A Level Further Mathematics · Chapter 69 · Decision Mathematics · Decision 1
A factory has limited machine time, labour and materials, and linear programming finds the production plan that makes the most profit within those limits.
Businesses constantly decide how much of each product to make, how to mix ingredients or how to allocate staff, all within limits. Linear programming turns such decisions into straight-line inequalities and finds the best plan, often by looking at just a handful of corner points.
In this chapter · jump to a section
Start here
Your route through this chapter
By the end of this chapter you will be able to:
- formulate a linear programming problem with decision variables, constraints and an objective
- draw the feasible region for a problem with two variables
- use the objective line to find an optimal point
- use the vertex method to find maxima and minima
- find optimal solutions when the variables must be whole numbers
- interpret a solution, including slack in the constraints
Time: three sessions, about 4 hours, plus the practice ladder and the exam workshop.
You need first: graphs of straight lines, solving simultaneous equations and linear inequalities from A-level Mathematics.
The big idea
The big idea
A linear programming problem has decision variables, linear constraints and a linear objective to maximise or minimise. With two variables, the constraints cut out a polygon of feasible points. The best value always occurs at a corner of this polygon, so only the corners need checking.
This chapter's main example is a workshop that makes chairs and tables. Making chairs and tables uses units of wood, hours of labour and spaces of storage. There are 14 units of wood, 18 hours of labour and 8 storage spaces. The profit is , in tens of pounds.
The feasible region lies below all three lines in the first quadrant. Its corners are (0, 0), (0, 7), (2, 6), (5, 3) and (6, 0). The profit is greatest, 30, at (2, 6): two chairs and six tables.
Decision variables
The decision variables are the quantities the decision-maker controls, such as numbers of chairs and tables. Define them precisely, with units, before writing anything else. A vague definition leads to wrong constraints.
Constraints
Each limited resource gives a constraint, an inequality that the variables must satisfy. Most real quantities cannot be negative, so the non-negativity constraints and almost always apply.
The objective function
The objective function is the quantity to be maximised or minimised, such as profit or cost. In linear programming it is a linear expression in the variables, such as .
Why corners matter
A linear objective increases steadily in one direction across the plane. Moving across the feasible region in that direction, the objective keeps improving until the edge is reached. The best point is therefore on the boundary, and in fact at a corner.
Two methods
The objective line method slides a line of constant objective across the region to find the last point touched. The vertex method evaluates the objective at every corner and picks the best. Both give the same answer.
Beyond two variables
With more than two variables the feasible region cannot be drawn, but the principle that optima occur at corners still holds. The simplex algorithm, in the next chapter, searches corners systematically without drawing.
Where linear programming is used
Airlines use linear programming to schedule crews, oil refineries to blend fuels, farms to plan crops and hospitals to plan staff rotas. Wherever limited resources must be shared among competing uses, a linear programme is likely to help.
The word programming
In this context programming means planning, not writing computer code. The name dates from the 1940s, when military planners used the word for schedules and training programmes. The methods were later adopted throughout business and industry.
Section 1
Formulating a problem
Reading the context
Read the problem carefully and list every limit it mentions: materials, time, money, space or demand. Each becomes a constraint. Also note whether the aim is to maximise, such as profit, or to minimise, such as cost.
Common mistake: writing a constraint with the wrong inequality, using ≤ where an "at least" condition needs ≥. Words such as "at least", "no fewer than" and "a minimum of" give ≥ constraints. Words such as "at most", "no more than" and "a maximum of" give ≤ constraints.
Writing each constraint
For each resource, write how much one unit of each product uses, multiply by the variables, and compare with the amount available. A table with one row per resource and one column per product makes this systematic.
Strict and non-strict inequalities
Linear programming uses and , not strict inequalities. Using all of a resource is allowed. If a problem says "less than", the boundary makes little practical difference, and is used.
Ratio constraints
Conditions such as "at least twice as many tables as chairs" give , which rearranges to . Translate each word carefully: the larger quantity goes with the larger multiple.
Units
Make sure every term in a constraint has the same units. If wood is measured in metres for one product and centimetres for another, convert first. The objective should state its units too, such as pounds or tens of pounds.
Checking a formulation
Test a simple point, such as making one of each product, against every constraint. If a sensible plan fails a constraint, the inequality may be the wrong way round. If an absurd plan passes, a constraint may be missing.
A table for formulation
Set out a table with a row for each resource and a column for each product, entering the amount of the resource one unit of the product uses. Add a column for the amount available. Each row then reads directly as a constraint.
Defining the variables carefully
Write, for example, "let be the number of chairs made each day". The phrase "each day" fixes the time period, so that resource limits and the objective refer to the same period. Vague definitions are penalised in exams.
Hidden constraints
Some constraints are not stated as limits on resources. A contract might require at least two tables, or a machine might only make chairs. Read every sentence of the problem for conditions like these and write each as an inequality.
Linear means proportional
A linear model assumes that doubling production doubles the resources used and doubles the profit. It also assumes that resources used by different products simply add up. When these assumptions are reasonable, linear programming gives reliable answers.
Worked example 1: formulating a maximisation
A workshop makes chairs and tables. A chair uses 1 unit of wood and 3 hours of labour; a table uses 2 units and 1 hour. There are 14 units and 18 hours, and room to store 8 items. Profits are 3 and 4, in tens of pounds. Formulate the problem.
| Working | Reason |
|---|---|
| Maximise | Profit is the objective |
| , , | Wood, labour and storage limits |
| , | Numbers made cannot be negative |
Minimisation problems
Cost-minimising problems usually have "at least" constraints, because some requirement must be met. Without them, the cheapest plan would be to do nothing. The feasible region then lies above the lines, away from the origin.
Equality constraints
Occasionally a resource must be used exactly, giving an equation instead of an inequality. The feasible region is then part of a line, and the optimum is at one of its ends. Such problems are rarer but follow the same ideas.
Checking units in a diet problem
In the feed problem, energy and protein are measured in units per kilogram, and the variables are in kilograms. Multiplying gives units, which match the right-hand sides. Checking units like this catches many formulation errors.
Worked example 2: formulating a minimisation
An animal feed is made from kg of oats and kg of barley, costing 2 and 3 pounds per kg. The mix needs at least 6 units of energy, where each kg of either gives 1 unit. It also needs at least 9 units of protein, where oats give 1 unit and barley 3 units per kg. Formulate the problem.
| Working | Reason |
|---|---|
| Minimise | Cost is the objective |
| and | At least the required nutrients |
| , | Amounts cannot be negative |
Check yourself. For the workshop, what profit does the plan of 5 chairs and 3 tables give?
Show the answer
The profit is , in tens of pounds, so £270. The plan satisfies every constraint, so it is feasible.
What feasible means
A plan is feasible if it satisfies every constraint at once. It might not be the best plan, but it can actually be carried out. The feasible region is the set of all feasible plans, drawn as points on the graph.
Bounded and unbounded regions
A region is bounded if it fits inside some circle, as the workshop's region does. Maximisation problems with constraints usually have bounded regions. Minimisation problems with constraints usually have unbounded ones, stretching away from the origin.
Section 2
The feasible region
Graphing a constraint
Draw the boundary line by replacing the inequality with an equals sign. Find where it meets the axes for a quick sketch. Then decide which side satisfies the inequality by testing a point, usually the origin.
Common mistake: taking every point where two constraint lines cross as a vertex of the feasible region, even when it breaks another constraint. A crossing point is only a vertex if it satisfies every constraint. Check each crossing against all the inequalities before using it.
The feasible region
- Vertices
- (0, 0) (0, 7) (2, 6) (5, 3) (6, 0)
- Number of vertices
- 5
Figure 69.1 shows the feasible region for the workshop and how it changes as the storage limit moves.
Shading conventions
Exam questions often ask you to shade the region that is not required, leaving the feasible region clear. Read the instructions and label the region R. Whichever convention you use, make it clear which region is feasible.
Vertices
The vertices are the corners of the feasible region. Each lies where two boundary lines meet. Find them by solving the pairs of equations at each corner, or by reading from an accurate graph and checking algebraically.
Redundant constraints
A constraint is redundant if it does not cut the feasible region, because other constraints are tighter everywhere. Redundant constraints can be ignored when finding vertices, but they should still be drawn if the question asks.
Unbounded regions
With constraints, the feasible region can stretch to infinity. A minimisation still has a best corner, because costs increase away from the origin. A maximisation over an unbounded region may have no maximum at all.
Accuracy of the graph
Use a sharp pencil and a clear scale. Small errors in drawing can make a corner look like it is at the wrong place. Always confirm vertex coordinates by solving the simultaneous equations.
Testing a point to decide the side
To decide which side of a line satisfies an inequality, test a point not on the line. The origin is easiest: for , the origin gives , which is true, so the feasible side contains the origin.
Lines through the origin
If a boundary line passes through the origin, as does, the origin cannot be used as a test point. Choose another point, such as (1, 0), and check which side of the line it lies on.
Reading coordinates from a graph
A well-drawn graph can suggest a vertex such as (2, 6), but small drawing errors are common. Always confirm by substituting into both line equations. Exams expect algebraic working for vertices that are not on the axes.
Intercepts for sketching
To sketch quickly, find its intercepts: set to get , and set to get . Joining the two intercepts gives the line. Choose a scale on which every intercept fits.
Worked example 3: finding a vertex
Find the vertex where meets .
| Working | Reason |
|---|---|
| Subtract: | Eliminate between the equations |
| , so | Substitute back into the first equation |
| Check | The point satisfies the third constraint |
Counting vertices
A region bounded by edges has vertices. The workshop's region is bounded by five edges, three constraint lines and the two axes, so it has five vertices. Counting edges is a quick check that no vertex has been missed.
Which lines meet at each vertex
At each vertex, note which two lines meet there. These two constraints are binding at that vertex. Recording them now makes it easy to compute slack later, and to see which resources limit each plan.
Worked example 4: a crossing that is not a vertex
The lines and cross. Find the crossing and decide whether it is a vertex.
| Working | Reason |
|---|---|
| From the second, | Rearrange the labour equation for y |
| gives , | Solve the simultaneous equations |
| , so not a vertex | It breaks the storage constraint |
Check yourself. Find the point where meets .
Show the answer
Subtracting gives , and then . The point (2, 6) satisfies , so it is a vertex.
Thinking geometrically
The objective line method turns an optimisation problem into a picture. Instead of comparing numbers, you watch a line sweep across the region. This makes it easy to see why the answer is at a corner and which corner it must be.
Section 3
The objective line method
Lines of constant objective
For a fixed value , the equation is a straight line. Every point on it gives the same profit. As increases, the line moves parallel to itself, away from the origin.
Common mistake: drawing the objective line px + qy = P with gradient p/q instead of −p/q. Rearranging gives , so the gradient is negative. A line with the wrong gradient points to the wrong vertex.
The objective line
- Gradient −p/q
- -0.75
- Optimal vertex
- (2, 6)
- Maximum P
- 30
Figure 69.2 slides the objective line across the region. The last point it touches is the optimum.
The method
Draw one objective line, for a convenient value of , using a ruler. Slide a ruler parallel to it, away from the origin for a maximum. The last point of the region the ruler touches is the optimal point.
Choosing a convenient line
Pick to be a multiple of both coefficients so the line meets the axes at whole numbers. For , gives intercepts at and . Draw this line lightly as a guide.
Minimisation with the objective line
For a minimum, slide the line towards the origin instead, and find the last point of the region it touches. With an unbounded region, this is the corner nearest the origin in the direction of the line.
Comparing gradients
The optimal vertex depends on how the objective's gradient compares with the gradients of the boundary lines. If it lies between the gradients of two edges meeting at a vertex, that vertex is optimal.
When the line is parallel to an edge
If the objective line is parallel to an edge of the region, every point on that edge is optimal. The problem then has many solutions, all with the same objective value.
Derivation: the gradient of the objective line
Fix the objective at a value , so that
Making the subject gives
so every objective line has gradient , and increasing moves the line upwards without changing its gradient.
Drawing the objective line accurately
Use the intercepts of a convenient objective line, such as through (4, 0) and (0, 3). A long ruler laid along it can then be slid parallel. A short, inaccurate line can easily point to the wrong vertex.
When two vertices look equally good
If the sliding ruler seems to leave two vertices at once, the objective line is nearly parallel to an edge. Evaluate the objective at both vertices to decide. The objective line method should always be backed by a calculation.
Objective lines for minimisation
For a minimisation, draw an objective line and slide it towards the origin. The last point of the region it touches gives the minimum. For the feed problem, the line for last touches the region at (4.5, 1.5).
Worked example 5: using the objective line
Use the objective line to find the maximum of for the workshop.
| Working | Reason |
|---|---|
| Gradient | Rearrange the objective line equation |
| Between and , the edges at (2, 6) | Compare with the boundary gradients |
| Optimum at (2, 6), | Last point the line touches |
Sensitivity to the objective
As the profit on chairs rises from 3, the objective line gets steeper. Once its gradient passes , the gradient of the storage edge, the optimum jumps from (2, 6) to (5, 3). Small changes below that threshold leave the plan unchanged.
Range of optimality
The vertex (2, 6) stays optimal while the gradient lies between and , that is for . Outside this range, a different vertex becomes optimal. Managers use such ranges to judge how robust a plan is.
Worked example 6: changing the profit
The profit on a chair rises to 6, so . Find the new optimum.
| Working | Reason |
|---|---|
| Gradient | The line is now steeper |
| Between and , the edges at (5, 3) | Compare with the boundary gradients |
| Optimum at (5, 3), | Make more chairs now |
Check yourself. What is the gradient of the objective line for ?
Show the answer
Rearranging gives , so the gradient is . This is steeper than for the original profit, so the optimum may move towards vertices with more chairs.
A method for checking
The vertex method needs no ruler and no accurate graph, only the coordinates of the vertices. That makes it a good check on the objective line method, and the natural choice when a graph is rough or unavailable.
Section 4
The vertex method
Testing every corner
List every vertex of the feasible region and evaluate the objective at each. The largest value is the maximum and the smallest is the minimum. This method avoids drawing objective lines but needs every vertex.
Common mistake: choosing the vertex with the greatest value when the problem asks for a minimum. Read whether the objective is to be maximised or minimised. For costs, the best vertex has the smallest value.
Laying out the vertex method
A table with columns for the vertex, , and the objective is clear and quick. Show the calculation for each vertex, not just the result. Then state the optimum and where it occurs.
Why the vertex method works
The objective is linear, so along any edge of the region it changes steadily from one end to the other. Its best value on the edge is therefore at an end, a vertex. Checking every vertex finds the best value overall.
Proof: a linear objective is optimised at a vertex
On the edge from vertex to , each point is for . A linear objective then satisfies
which lies between the two end values, so
The best value on every edge, and so on the whole region, occurs at a vertex.
Minimisation with the vertex method
For a minimisation over an unbounded region, list the vertices of the region's boundary and pick the smallest objective value. Points further out only cost more, so the minimum is at a vertex.
Ties between vertices
If two adjacent vertices give the same best value, every point on the edge between them is optimal. State this when it happens, since the decision-maker can then choose any point on that edge.
Choosing between the methods
The vertex method is reliable when there are few vertices and their coordinates are easy to find. The objective line method is quicker when the graph is accurate and there are many vertices. Exams may ask for either.
Vertices in order around the region
List the vertices in order around the boundary, for example anticlockwise from the origin. This avoids missing one. For the workshop, the order (0, 0), (6, 0), (5, 3), (2, 6), (0, 7) follows the boundary round.
The origin as a vertex
For a maximisation with constraints, the origin is always a vertex but gives zero profit, so it is never optimal unless every profit is zero. It is still good practice to include it in the list.
Using exact values
When a vertex has fractional coordinates, keep them as exact fractions or decimals. Rounding before evaluating the objective can change which vertex appears best when values are close.
When a vertex is degenerate
Occasionally three or more boundary lines meet at a single vertex. The vertex method still works: evaluate the objective there once. The simplex algorithm in the next chapter needs extra care at such points, called degenerate vertices.
Worked example 7: the vertex method
Use the vertex method to maximise for the workshop.
| Working | Reason |
|---|---|
| (0, 0): 0; (0, 7): 28; (2, 6): 30 | Evaluate at each vertex |
| (5, 3): 27; (6, 0): 18 | Evaluate at the remaining vertices |
| Maximum 30 at (2, 6) | Choose the largest of the values |
Why minima need care
In a minimisation, the region usually extends without limit away from the origin. The minimum is still at a vertex, because moving further out only increases the cost. Make sure every vertex on the boundary nearest the origin is listed.
Both methods for a minimisation
The objective line for has gradient . Sliding it towards the origin, it last touches the region at (4.5, 1.5), agreeing with the vertex method. Using both methods is a useful check.
Unbounded maximisation
If the feed problem asked for the most expensive mix instead, there would be no answer. The region stretches forever, so the cost can be made as large as you like, and no plan is the most expensive. Always check that an optimum exists before searching for it.
Worked example 8: a minimisation
Minimise for the feed problem of worked example 2.
| Working | Reason |
|---|---|
| Vertices (0, 6), (4.5, 1.5) and (9, 0) | Corners of the unbounded region |
| = 18, 13.5 and 18 | Evaluate at each vertex |
| Minimum 13.5 at (4.5, 1.5) | Choose the smallest of the values |
Check yourself. For the feed problem, which vertex minimises instead?
Show the answer
The values are , and . The minimum is 12, at (0, 6).
Why integer problems are harder
Without the integer condition, the optimum is at a vertex, which is easy to find. With it, the best point may be some distance from every vertex. In general, integer programming is much harder than linear programming, though small problems are manageable by hand.
Section 5
Integer solutions
When variables must be whole numbers
Numbers of chairs or people must be whole numbers. If the optimal vertex has non-integer coordinates, the best whole-number plan must be found among the lattice points of the feasible region near that vertex.
Common mistake: rounding the optimal vertex to the nearest whole numbers without checking that the point is feasible or best. Rounding can produce a point outside the region, or miss a better lattice point nearby. Test the lattice points around the vertex instead.
Integer solutions
- Vertex optimum
- (3, 1.5) → 21
- Best lattice point
- (4, 0) → 20
Figure 69.3 shows the lattice points of a region whose best vertex is not a whole-number point.
The integer example
Maximise subject to and , with and whole numbers. The vertices are (0, 0), (0, 3), (3, 1.5) and (4, 0). The best vertex is (3, 1.5), with .
Searching near the vertex
Test the lattice points around the optimal vertex, checking each against every constraint. Here (3, 2) breaks , and (3, 1) gives 19. But (4, 0) gives 20, which is the best.
Using the objective line for integer problems
Slide the objective line back from the optimal vertex towards the origin. The first lattice point inside the region that the line meets is the integer optimum. This avoids checking many points by hand.
How much is lost
The integer optimum can never beat the continuous optimum, because every lattice point is in the region. The difference, here , is the cost of insisting on whole numbers.
Integer minimisation
For a minimisation, search for the lattice point with the least objective value. Lattice points near the optimal vertex are again the best candidates, but the region is on the far side of the boundary lines.
Branch and bound
Computers solve large integer programmes by a method called branch and bound. It splits the region at a non-integer value, such as or , and solves each smaller problem, discarding branches that cannot beat the best found so far.
Presenting an integer answer
List the lattice points tested in a small table with their constraint checks and objective values. State clearly which point is optimal and why the continuous optimum was rejected. Examiners award marks for this reasoning, not only for the final point.
Worked example 9: an integer optimum
Find the best whole-number solution to the integer example.
| Working | Reason |
|---|---|
| Vertex optimum (3, 1.5), | Not a whole-number point |
| (3, 1): 19; (4, 0): 20; (2, 2): 18 | Feasible lattice points nearby |
| Integer optimum at (4, 0) | The best lattice point |
A systematic search
For a maximisation with constraints, check lattice points with the largest possible for each value of , or vice versa. Each candidate is the best for its row. Comparing the candidates finds the integer optimum efficiently.
The integer optimum need not be near the vertex
Sometimes the best lattice point is not one of the four surrounding the optimal vertex. Here (4, 0) is the best, though it is a vertex itself. Widen the search if the nearby points all perform poorly.
Rounding down is not always safe either
Rounding every coordinate down keeps a maximisation with constraints feasible, but it can still miss the best point. Here rounding (3, 1.5) down gives (3, 1) with profit 19, while (4, 0) gives 20.
Worked example 10: why rounding fails
Show that rounding (3, 1.5) to (3, 2) gives an infeasible plan.
| Working | Reason |
|---|---|
| Test the first constraint | |
| The constraint is broken | |
| (3, 2) is not feasible | Rounding has left the region |
Check yourself. Is (2, 2) feasible for the integer example, and what profit does it give?
Show the answer
and , so it is feasible. The profit is .
From numbers to decisions
The solution of a linear programme is only useful once it is translated back into the problem's language. "Make two chairs and six tables each day" is a decision a manager can act on, while "(2, 6)" is not.
Section 6
Interpreting solutions
Slack
The slack in a constraint is how much of the resource is left unused at the optimal point. It is the right-hand side minus the left-hand side. A constraint with zero slack is binding: it limits the solution.
Common mistake: assuming every resource is used up at the optimal solution. Only the binding constraints are used up. Others have slack, which shows resources that could be reduced or reassigned without changing the optimum.
Surplus
For a constraint, the surplus is how much the left-hand side exceeds the right-hand side. At the feed optimum (4.5, 1.5), both constraints are exactly met, so both surpluses are zero.
Binding constraints
The binding constraints are the two lines that meet at the optimal vertex. Increasing the resource in a binding constraint could increase the profit; increasing a slack resource cannot help.
Reporting a solution
State the values of the variables in the context, such as "make 2 chairs and 6 tables", and the optimal objective value with units. Mention any slack and what it means for the business.
Sensitivity
If a profit or cost changes slightly, the optimal vertex often stays the same. It changes only when the objective's gradient passes the gradient of an edge at the vertex. Worked example 6 showed such a change.
Limitations of the model
Linear programming assumes that resources are used in exact proportion and that profits add up linearly. In reality, bulk discounts or overtime break these assumptions. The model is a guide, not a guarantee.
Using slack to guide decisions
Spare labour could be redeployed to another task or offered as overtime elsewhere. Binding resources, such as wood here, are worth buying more of. Slack thus tells a manager where to spend money and where to save it.
Shadow prices
The extra profit from one more unit of a binding resource is called its shadow price. It can be found by moving the binding line slightly and recomputing the optimum. Shadow prices are beyond this chapter, but slack points towards them.
Checking a solution in context
Finally, check that the answer is sensible. Negative production, fractional people or a plan that uses more wood than exists all signal an error. A quick reality check catches mistakes that the algebra hides.
Surplus at the feed optimum
At (4.5, 1.5), the energy constraint gives , exactly the minimum, and the protein constraint gives , also exactly the minimum. Both surpluses are zero, so both constraints are binding.
Slack at other vertices
Slack depends on the point being considered. At (5, 3), wood has slack 3 and labour has slack 0, the opposite pattern to (2, 6). Each vertex has its own pair of binding constraints.
Worked example 11: slack at the optimum
Find the slack in each constraint at the workshop's optimum (2, 6).
| Working | Reason |
|---|---|
| Wood: | Fully used, so binding |
| Labour: | Six hours of labour are unused |
| Storage: | Fully used, so binding |
Several optimal points
If the objective line is parallel to a binding edge, every point on that edge is optimal. For integer problems, there may then be several equally good lattice points, and any of them can be chosen.
Infeasible problems
If the constraints contradict each other, no point satisfies them all and the feasible region is empty. The problem then has no solution. In practice, this usually means a requirement must be relaxed.
Comparing the two answers
The continuous optimum of 21 is an upper bound for the integer problem. The integer optimum of 20 is found by searching below it. This is the same bounding idea that appeared in bin packing and the travelling salesman problem.
Worked example 12: values at the integer example's vertices
Evaluate at each vertex of the integer example.
| Working | Reason |
|---|---|
| (0, 0): 0; (0, 3): 12 | Evaluate at the first two vertices |
| (3, 1.5): 21; (4, 0): 20 | Evaluate at the remaining two vertices |
| Continuous maximum 21 at (3, 1.5) | The largest vertex value |
Check yourself. At the vertex (5, 3) of the workshop, how much wood is unused?
Show the answer
The wood used is , out of 14 available. So 3 units of wood are unused.
Reference
Results in this chapter
| Result | What it says | When to use it | In the formula booklet? |
|---|---|---|---|
| Optimum at a vertex | Corners suffice | Every linear programme | No, derive it |
| Objective gradient | Slope of | Objective line method | No, learn it |
| Slide away or towards the origin | Maximum or minimum | Objective line method | No, learn it |
| Evaluate at every vertex | Vertex method | Few vertices | No, learn it |
| Test lattice points near the vertex | Integer optimum | Whole-number variables | No, learn it |
| Slack | Unused resource | Interpreting solutions | No, learn it |
Reasoning
Modelling task: planning a bakery's production
The situation
A bakery makes loaves and cakes. A loaf needs 1 kg of flour and 3 minutes of oven time; a cake needs 2 kg of flour and 1 minute of oven time. Each day there are 14 kg of flour, 18 minutes of a special oven, and shelf space for 8 items, in batches. Profits are 3 and 4, in tens of pounds per batch.
Assumptions
Batches can be made in any whole number, every batch made is sold, and the profit per batch is fixed. Resources are used in direct proportion to the number of batches.
These assumptions give exactly the workshop's linear programme, with batches of loaves and batches of cakes.
The model
Maximise subject to , and , with . The vertex method gives the maximum at (2, 6), with .
Results
The bakery should make 2 batches of loaves and 6 batches of cakes, for a profit of £300. Flour and shelf space are fully used, while 6 minutes of oven time are spare.
Evaluating the model
The model assumes every batch sells, but demand for cakes may be limited. A demand constraint, such as , would change the optimum. The model also ignores the cost of wasted ingredients.
The spare oven time suggests the bakery could rent out the oven or make another product. Linear programming shows where the real bottlenecks are: here flour and shelf space.
Your turn
Demand for cakes is limited to 5 batches a day. Add the constraint and find the new optimum.
Show a model answer
The vertex (2, 6) now breaks . The new vertices are (0, 5), (3, 5), (5, 3) and (6, 0), with profits 20, 29, 27 and 18. So the optimum is 29 at (3, 5): three batches of loaves and five of cakes.
Practice
Practice ladder
Rung 1: Recall and fluency
Q1. Write down the profit at the vertex (6, 0) of the workshop.
Worked solution to Q1
Substituting and gives . So the profit at (6, 0) is 18, in tens of pounds, which is the profit from making six chairs and no tables.
Q2. Solve and simultaneously.
Worked solution to Q2
From the second equation, . Substituting into the first gives , so and then . This crossing point turns out to lie outside the feasible region.
Q3. List the vertices of the feasible region for , , .
Worked solution to Q3
The region meets the -axis at (0, 6) and the -axis at (9, 0). The two lines cross at (4.5, 1.5), so the vertices are (0, 6), (4.5, 1.5) and (9, 0).
Rung 2: Application
Q4. For the workshop, maximise instead, stating the optimal vertex.
Worked solution to Q4
Evaluating at the vertices (0, 7), (2, 6), (5, 3) and (6, 0) gives 14, 22, 31 and 30. The maximum is 31 at (5, 3), because chairs are now much more profitable than tables.
Q5. Minimise for the feed problem, giving the optimal amounts.
Worked solution to Q5
The vertices give 18, 13.5 and 18. The minimum cost is 13.5 pounds, using 4.5 kg of oats and 1.5 kg of barley.
Q6. If oats and barley can only be bought in whole kilograms, find the least cost for the feed problem.
Worked solution to Q6
Testing lattice points near (4.5, 1.5): (4, 2) satisfies both constraints and costs . Points such as (5, 1) fail , so the least cost is 14 at (4, 2).
Rung 3: Analysis
Q7. Calculate the slack in the labour constraint at (2, 6).
Worked solution to Q7
The labour used is hours out of the 18 available. So the slack is hours, which means labour is not a binding constraint at the optimum.
Q8. Find the gradient of the objective line and use it to explain why (2, 6) is optimal.
Worked solution to Q8
The gradient is , between the gradients and of the edges meeting at (2, 6). So the objective line last touches the region at (2, 6).
Q9. Without the whole-number condition, maximise subject to and .
Worked solution to Q9
Evaluating the objective at the vertices (0, 0), (0, 3), (3, 1.5) and (4, 0) gives 0, 12, 21 and 20. Without the whole-number condition, the maximum is 21 at the vertex (3, 1.5).
Rung 4: Stretch
Q10. A student claims the workshop's maximum profit is 32.4, at the crossing of the wood and labour lines. Explain the error.
Worked solution to Q10
The crossing (4.4, 4.8) gives , but breaks the storage constraint. It is not in the feasible region, so the true maximum is 30 at (2, 6).
Q11. For the integer example, a student rounds (3, 1.5) to (3, 2). Explain why this fails and give the best whole-number plan.
Worked solution to Q11
At (3, 2), , so the plan is infeasible. Testing nearby lattice points shows the best is (4, 0), with profit 20.
Q12. For the workshop with profit , deduce which vertex is optimal and the maximum profit.
Worked solution to Q12
The values at (0, 7), (2, 6), (5, 3) and (6, 0) are 28, 26, 17 and 6. The maximum is 28 at (0, 7), so only tables are made.
Exam practice
Exam technique and worked answer workshop
How these questions are marked
M1 marks go to forming correct constraints, solving for vertices, and evaluating the objective systematically. A1 marks go to correct vertices, optimal points and values. B1 marks go to clear definitions of variables, correct inequality directions and interpretation in context.
Define your variables in words, list every constraint including non-negativity, and state the final answer in context. For integer problems, show the lattice points tested.
Exam question 1 (6 marks · Paper 3 · about 8 minutes)
Formulate the workshop problem as a linear programme, defining your variables. State whether making 5 chairs and 3 tables is feasible. (6)
Mark scheme for exam question 1
Defines and as numbers of chairs and tables B1
Maximise B1
and M1 A1
, A1
(5, 3) satisfies all constraints, so feasible B1
Exam question 2 (7 marks · Paper 3 · about 10 minutes)
Draw the feasible region for the workshop and find the coordinates of every vertex, showing algebraic working for each vertex not on an axis. (7)
Mark scheme for exam question 2
Three lines drawn correctly M1 A1
Correct region identified A1
(0, 7) and (6, 0) B1
Solves for (2, 6) M1 A1
Solves for (5, 3) A1
Exam question 3 (6 marks · Paper 3 · about 8 minutes)
Use the objective line method to find the optimal plan for the workshop, explaining how you identify the optimal vertex. (6)
Mark scheme for exam question 3
Draws an objective line with gradient M1 A1
Slides away from the origin M1
Last point touched (2, 6) A1
A1
2 chairs and 6 tables B1
Exam question 4 (5 marks · Paper 3 · about 7 minutes)
The profit on a chair rises to 6. Find the new optimal plan and the new maximum profit. (5)
Mark scheme for exam question 4
New objective B1
Evaluates at the vertices M1
Values 28, 36, 42, 36 A1
Optimum (5, 3) A1
A1
Exam question 5 (6 marks · Paper 3 · about 8 minutes)
For the feed problem, minimise subject to , and , using the vertex method. (6)
Mark scheme for exam question 5
Vertices (0, 6) and (9, 0) B1
Solves to get (4.5, 1.5) M1 A1
Evaluates at each vertex M1
Minimum 13.5 A1
At (4.5, 1.5) A1
Exam question 6 (7 marks · Paper 3 · about 10 minutes)
Maximise subject to and , where and are non-negative integers. Explain why the optimal vertex cannot be used directly. (7)
Mark scheme for exam question 6
Vertices (0, 3), (3, 1.5), (4, 0) M1 A1
Vertex optimum 21 at (3, 1.5) A1
Not integer, so cannot be used B1
Tests lattice points nearby M1
(3, 2) infeasible; (3, 1) gives 19 A1
Optimum 20 at (4, 0) A1
Exam question 7 (5 marks · Paper 3 · about 7 minutes)
At the workshop's optimum, calculate the slack in each constraint and explain what it means for the business. (5)
Mark scheme for exam question 7
Wood slack 0 B1
Labour: M1
Labour slack 6 A1
Storage slack 0 B1
6 hours of labour are unused B1
Exam question 8 (6 marks · Paper 3 · about 8 minutes)
In the feed problem, the oats and barley can only be bought in whole kilograms. Determine the least cost and the amounts to buy. (6)
Mark scheme for exam question 8
Continuous optimum (4.5, 1.5) B1
Tests nearby lattice points M1
(5, 1) infeasible A1
(4, 2) feasible with cost 14 A1
Other candidates cost at least 15 M1
Least cost 14 at (4, 2) A1
Annotated model answer: exam question 2
Draw through (0, 7) and (14, 0), through (0, 18) and (6, 0), and through (0, 8) and (8, 0). M1 A1. The feasible region lies below all three lines in the first quadrant. A1. Two vertices lie on the axes at (0, 7) and (6, 0). B1.
Solving with gives , . M1 A1. Solving with gives , . A1. The vertices are (0, 0), (0, 7), (2, 6), (5, 3) and (6, 0).
Annotated model answer: exam question 6
The vertices are (0, 0), (0, 3), (3, 1.5) and (4, 0). M1 A1. The largest value is 21 at (3, 1.5). A1. But is not a whole number, so this plan cannot be used. B1.
Testing lattice points near the vertex, M1, (3, 2) gives , so it is infeasible, and (3, 1) gives 19. A1. The point (4, 0) gives 20, so the integer optimum is 20 at (4, 0). A1.
Connections
Synoptic link
Algorithms, sorting and bin packing introduced the idea of an algorithm and of bounds; linear programming gives exact optima for a different kind of problem. Critical path analysis scheduled activities with limited workers, a decision that can also be written as a linear programme.
The simplex algorithm, next, solves linear programmes with more than two variables by moving from vertex to vertex algebraically. The graphical methods here build the intuition it needs.
Synoptic question 1. Explain why the optimum of a linear programme lies at a vertex, using the idea of the objective line.
Answer to synoptic question 1
Lines of constant objective are parallel, and the objective increases steadily as the line moves. Sliding the line until it last touches the region always stops at a corner, or along an edge whose ends are corners.
Recap
Recap and next step
- A linear programme has decision variables, linear constraints and a linear objective.
- The feasible region is the set of points satisfying every constraint; its corners are the vertices.
- The objective line has gradient ; slide it to the last point touched.
- The vertex method evaluates the objective at every vertex and picks the best.
- For whole-number variables, test lattice points near the optimal vertex rather than rounding.
- Slack shows unused resources; binding constraints are fully used.
Next chapter: The simplex algorithm, which solves linear programmes with many variables using tables instead of graphs.
For your exam board
This chapter covers Pearson Edexcel A Level Further Mathematics (9FM0) Decision Mathematics 1 section 6: formulating linear programming problems, graphical solutions, the objective line and vertex methods, and integer solutions. It is assessed on Paper 3D, Decision Mathematics 1. Similar content appears in AQA (7367) and OCR (H245) discrete options.