Linear programming is a method used in mathematics to achieve the best possible outcome in a given situation—typically maximising or minimising a quantity such as profit, cost, or time—while working within a set of constraints. For A-Level Maths, linear programming appears in the Decision Mathematics module (also known as D1 or D2 in some exam boards), and is often presented through real-life scenarios involving resource allocation, budgeting, production limits, and transportation planning.

The best Maths tutors available
Poonam
5
5 (65 reviews)
Poonam
£100
/h
Gift icon
1st lesson free!
Paolo
4.9
4.9 (82 reviews)
Paolo
£35
/h
Gift icon
1st lesson free!
Sehaj
4.9
4.9 (58 reviews)
Sehaj
£60
/h
Gift icon
1st lesson free!
Anthony
5
5 (82 reviews)
Anthony
£15
/h
Gift icon
1st lesson free!
Mishi
4.9
4.9 (36 reviews)
Mishi
£45
/h
Gift icon
1st lesson free!
Johann
5
5 (53 reviews)
Johann
£60
/h
Gift icon
1st lesson free!
Hiren
5
5 (32 reviews)
Hiren
£149
/h
Gift icon
1st lesson free!
Harjinder
4.9
4.9 (163 reviews)
Harjinder
£25
/h
Gift icon
1st lesson free!
Poonam
5
5 (65 reviews)
Poonam
£100
/h
Gift icon
1st lesson free!
Paolo
4.9
4.9 (82 reviews)
Paolo
£35
/h
Gift icon
1st lesson free!
Sehaj
4.9
4.9 (58 reviews)
Sehaj
£60
/h
Gift icon
1st lesson free!
Anthony
5
5 (82 reviews)
Anthony
£15
/h
Gift icon
1st lesson free!
Mishi
4.9
4.9 (36 reviews)
Mishi
£45
/h
Gift icon
1st lesson free!
Johann
5
5 (53 reviews)
Johann
£60
/h
Gift icon
1st lesson free!
Hiren
5
5 (32 reviews)
Hiren
£149
/h
Gift icon
1st lesson free!
Harjinder
4.9
4.9 (163 reviews)
Harjinder
£25
/h
Gift icon
1st lesson free!
Let's go

📝 Linear Programming Practice Questions

beenhere
Summary of Steps: Linear Programming Problems

1. Defining decision variables (e.g. number of items produced)
2. Formulating a linear objective function to maximise or minimise
3. Writing a set of linear inequalities that represent constraints
4. Graphing the feasible region and identifying possible solutions
5. Using a corner-point or vertex-testing method to find the optimal solution

1

A transport company has two types of trucks, Type A and Type B. Type A has a refrigerated capacity of and a non-refrigerated capacity of . In contrast, Type B has the same overall volume with equal refrigerated and non-refrigerated stock sections. A grocer must hire trucks to transport of refrigerated stock and of non-refrigerated stock. The cost per kilometre of Type A is , and for Type B. How many trucks of each type should the grocer rent to achieve the minimum total cost?

Solution

a) Choose the unknowns.

x = Type A trucks

y = Type B trucks

b) Write the objective function.

c) Write the constraints as a system of inequalities.

d) Find the set of feasible solutions that graphically represent the constraints.

graph maths problem

e) Calculate the coordinates of the vertices from the compound of feasible solutions. 

graphic question

 

f) Calculate the value of the objective function at each vertex to determine which has the maximum or minimum values.

As x and y must be natural numbers round the value of y.

By default, we see what takes the value x to y = 66 in the equation , which is within the feasible solutions.

The minimum cost is . To achieve this 51 trucks of Type A and 66 trucks of Type B are needed.

2

A school is preparing a trip for 400 students. The transportation company has 10 buses of 50 seats each and 8 buses of 40 seats but only has 9 drivers available. The rental cost for a large bus is and for a small bus. Calculate how many buses of each type should be used for the trip for the least possible cost.

 

Solution

a)Choose the unknowns.

x = small buses

y = big buses

b) Write the objective function.

c) Write the constraints as a system of inequalities.

d)  Find the set of feasible solutions that graphically represent the constraints.

graphic questiongraphic exercise

e)  Calculate the coordinates of the vertices from the compound of feasible solutions.

f)  Calculate the value of the objective function at each vertex to determine which has the maximum or minimum values.

Hence, the minimum cost is . This is achieved with 4 large and 5 small buses.

We substituted the points (0,9), (0,8), and (5,4) in the equation to determine the minimum cost. However, you can tell this by directly looking at the graph. The coordinate (5,4) comes under the feasible region and is the minimum point of it.

3

A store wants to liquidate 200 shirts and 100 pairs of pants from last season. They have decided to create two promotional offers, A and B.

Offer A includes one shirt and one pair of pants, and sells for 30.
Offer B includes three shirts and one pair of pants, and sells for 50.

The store does not want to sell fewer than 20 packages of Offer A or fewer than 10 packages of Offer B. How many packages of each offer should the store prepare in order to maximise total sales revenue from the promotion?

Solution

a) Choose the unknowns.

x = number of packages of Offer A

y = number of packages of Offer B

b) Write the objective function.

c) Write the constraints as a system of inequalities.

d) Find the set of feasible solutions that graphically represent the constraints.

graphic question

Example 3 - part d

e)  Calculate the coordinates of the vertices from the compound of feasible solutions.

graphic question

Example 3 - part e

f) Calculate the value of the objective function at each vertices to determine which has the maximum or minimum values.

50 packages of each offer generate a maximum of  in sales.

Linear Programming Word Problem Example

A company produces two types of products: A and B. Each unit of A requires 2 hours of labour and 1 hour of machine time. Each unit of B requires 1 hour of labour and 2 hours of machine time. A total of 100 labour hours and 80 machine hours are available. Profit per unit is $40 for A and $50 for B. How many of each product should be produced to maximise profit?

Step 1 – Define the decision variables
x = number of product A units
y = number of product B units

Step 2 – Write the objective function

We want to maximise profit:

Step 3 – Write the constraints

Labour time:

Machine time:

Non-negativity:

Step 4 – Graph the constraints

<img decoding=

Step 5 – Find intersection points

Solve the system:

Multiply the second by 2 and subtract:

Substitute back:

So the intersection point is (40, 20).

Step 6 – Evaluate profit at each vertex

Vertices: (0,0), (0,40), (40,20), (50,0)

Step 7 – Choose the maximum

The maximum profit is $2600 at (40, 20).

Answer:

Linear Programming Questions and Solutions

1

A factory produces chairs and tables.
Each chair requires 2 hours of carpentry and 1 hour of painting.
Each table requires 3 hours of carpentry and 2 hours of painting.
The factory has 60 hours of carpentry and 40 hours of painting available per week.
The profit per chair is $15 and per table is $20.
How many of each should be made to maximize profit?

Solution

Let:

x = chairs, y = tables

Objective function:

Constraints:

Intersection of 2x + 3y = 60 and x + 2y = 40:

Evaluate P at (0,0), (0,20), (30,0):

Answer:

2

A farm grows wheat and corn.
Each hectare of wheat requires 3 labour days and 2 fertilizer units.
Each hectare of corn requires 2 labour days and 4 fertilizer units.
A total of 60 labour days and 80 fertilizer units are available.
Profit per hectare is $200 for wheat and $300 for corn.
Find how many hectares of each crop should be planted for maximum profit.

Solution

Let:

x= hectares of wheat, y = hectares of corn

Objective:

Constraints:

Find intersection:


Multiply the first by 2 and subtract the second:

Substitute into 3x + 2y = 60:

Vertices: (0,0), (0,20), (10,15), (20,0)

Evaluate:

Answer:

3

A nutritionist designs a diet using foods F1 and F2.
Each unit of F1 contains 3 units of protein and 1 unit of fat.
Each unit of F2 contains 1 unit of protein and 2 units of fat.
The diet must provide at least 6 units of protein and 4 units of fat.
The cost is $4 per unit of F1 and $3 per unit of F2.
Find the least costly diet.

Solution

Let:

x = F1 units, y = F2 units

Objective (minimize cost):

Constraints:

Solve for intersection:


Multiply the second by 3 and subtract:

Substitute:

Evaluate cost at (1.6, 1.2):

Answer:

4

A pet food manufacturer blends two dry mixes, Brand A and Brand B, to produce a daily supplement for dogs. Each kilogram of Brand A provides 1 g of protein and 1 mg of calcium. Each kilogram of Brand B provides 1 g of protein and 3 mg of calcium. The daily supplement must contain at least 6 g of protein and at least 12 mg of calcium. Brand A costs £2 per kilogram and Brand B costs £3 per kilogram.

Let x be the number of kilograms of Brand A used and y the number of kilograms of Brand B used.

a)  Write down the constraints as inequalities.

b)  Write down the objective function to minimise.

c)  Find the vertices of the feasible region and hence find the minimum cost.

Solution

a) Constraints
Protein requirement (at least 6 g):

Calcium requirement (at least 12 mg):

Non-negativity:

b) Objective function
Minimise the daily cost C (in £):

c) Finding the minimum
The boundary lines of the two main constraints are:

•       Line 1: x + y = 6

•       Line 2: x + 3y = 12

 

Find the intersection of these two lines by subtracting Line 1 from Line 2:

Substituting back into Line 1:

 

The minimum daily cost is £15.00, achieved by using 3 kg of Brand A and 3 kg of Brand B.

5

A small workshop manufactures two products: standard toolkits (x) and premium toolkits (y). Each standard toolkit requires 3 hours of labour and 2 hours of machine time. Each premium toolkit requires 5 hours of labour and 2 hours of machine time. The workshop has at most 90 labour-hours and 48 machine-hours available per week. Standard toolkits sell at a profit of £25 each and premium toolkits at a profit of £40 each.

Find the number of each type of toolkit the workshop should produce each week to maximise its profit, and state the maximum profit.

Solution

Define variables
Let x = number of standard toolkits and y = number of premium toolkits produced per week.

Constraints
Labour (at most 90 hours):

Machine time (at most 48 hours):

Non-negativity:

Objective function
Maximise profit P (in £):

Vertices of the feasible region
The four corners are found from the constraint boundaries:

•       (0, 0): both machines idle.

•       (24, 0): machine time is fully used (x + y = 24), no premium toolkits.

•       (0, 18): labour is fully used (3(0) + 5(18) = 90), no standard toolkits.

•       Intersection of 3x + 5y = 90 and x + y = 24:

From x + y = 24, we get x = 24 − y. Substituting:

The maximum weekly profit is £735, achieved by producing 15 standard toolkits and 9 premium toolkits.

6

A bakery produces loaves of bread (x) and celebration cakes (y) each day. Each loaf requires 2 minutes of oven time and uses one unit of ingredients. Each cake requires 3 minutes of oven time and also uses one unit of ingredients. The oven is available for at most 120 minutes per day, and the bakery's daily ingredient allowance covers at most 50 units in total. The bakery makes a profit of £4 on each loaf and £5 on each cake.

Find the daily production mix that maximises profit, and state the maximum daily profit.

Solution

Define variables: 

Let x = number of loaves and y = number of cakes produced per day.

Constraints
Oven time (at most 120 minutes):

Ingredients (at most 50 units):

Non-negativity:

Objective function
Maximise profit P (in £):

Vertices of the feasible region
•       (0, 0): nothing produced.

•       (50, 0): ingredients fully used, no cakes.

•       (0, 40): oven fully used (2(0) + 3(40) = 120), no loaves.

•       Intersection of 2x + 3y = 120 and x + y = 50:

 

From x + y = 50, substitute x = 50 − y:

xyObjective value 
00P = £0
500P = £200
3020P = 4(30) + 5(20) = £120 + £100 = £220← Maximum
040P = £200

The maximum daily profit is £220, achieved by baking 30 loaves and 20 celebration cakes.

7

A nutritionist recommends a daily supplement made from two powders, Supplement A (x grams) and Supplement B (y grams). Each gram of Supplement A provides 4 units of protein and 1 unit of iron. Each gram of Supplement B provides 2 units of protein and 3 units of iron. The patient must receive at least 20 units of protein and at least 15 units of iron per day. Supplement A costs 50p per gram and Supplement B costs 80p per gram.

Find the combination of supplements that meets the nutritional requirements at minimum daily cost, and state that minimum cost.

Solution

Define variables
Let x = grams of Supplement A and y = grams of Supplement B taken daily.

Constraints
Protein (at least 20 units):

Iron (at least 15 units):

Non-negativity:

Objective function
Minimise cost C (in pence):

Vertices of the feasible region
For a minimisation problem with ≥ constraints, the feasible region is unbounded above-right. The minimum lies at a vertex on the lower boundary.

 

•       Vertex at x = 0: from 2x + y ≥ 10, we need y ≥ 10. Check iron: 0 + 3(10) = 30 ≥ 15 ✓. Vertex: (0, 10).

•       Vertex at y = 0: from x + 3y ≥ 15, we need x ≥ 15. Check protein: 2(15) + 0 = 30 ≥ 10 ✓. Vertex: (15, 0).

•       Intersection of 2x + y = 10 and x + 3y = 15:

 

From 2x + y = 10, substitute y = 10 − 2x:

xyObjective value 
010C = 50(0) + 80(10) = 800p = £8.00
34C = 50(3) + 80(4) = 150 + 320 = 470p = £4.70← Minimum
150C = 50(15) + 80(0) = 750p = £7.50

The minimum daily cost is £4.70, achieved by taking 3 g of Supplement A and 4 g of Supplement B.

8

A market trader sells handmade candles (x) and scented diffusers (y). Each candle requires 4 minutes of assembly time and 1 unit of packaging material. Each diffuser requires 3 minutes of assembly time and 2 units of packaging material. The trader has at most 120 minutes of assembly time and at most 50 units of packaging material available for each market day. The trader makes a profit of £5 on each candle and £8 on each diffuser.

Determine the combination of products that maximises daily profit, and state the maximum profit.

Solution

Define variables
Let x = number of candles and y = number of diffusers produced per market day.

Constraints
Assembly time (at most 120 minutes):

Packaging material (at most 50 units):

Non-negativity:

Objective function
Maximise profit P (in £):

Vertices of the feasible region
•       (0, 0): nothing produced.

•       (30, 0): assembly time fully used with y = 0.

•       (0, 25): packaging fully used with x = 0 (0 + 2(25) = 50).

•       Intersection of 4x + 3y = 120 and x + 2y = 50:

 

From x + 2y = 50, substitute x = 50 − 2y:

Verify feasibility: 4(18) + 3(16) = 72 + 48 = 120 ✓  and  18 + 2(16) = 18 + 32 = 50 ✓

xyObjective value 
00P = £0
300P = £150
1816P = 5(18) + 8(16) = £90 + £128 = £218← Maximum
025P = £200

The maximum daily profit is £218, achieved by producing 18 candles and 16 diffusers.

Note: in this problem both the assembly and packaging constraints are active (binding) at the optimal vertex — a common feature of harder A-Level questions. Always verify that a candidate vertex satisfies all constraints before reading off the objective value.

Summarise with AI:

Did you like this article? Rate it!

4.00 (99 rating(s))
Loading...

Gianpiero Placidi

UK-based Chemistry graduate with a passion for education, providing clear explanations and thoughtful guidance to inspire student success.