{{title}}

This section is part of Discrete Mathematics. If you do not study that, you may not need to learn this.

An introductory example

A factory produces two types of drink: an energy drink and a refresher drink. The day’s output is to be planned. Each drink requires syrup, vitamin supplement and concentrated flavouring, as shown in the table. The last row in the table show how much of each ingredient is available for the day’s production.

Drink TypeSyrup (litres)Vitamin Supplement (units)Concentrated Flavouring (cc)
Energy Drink (5l)3230
Refresher Drink (5l)1.25120
Available25030030

Syrup constraint:

Constraints

Objective function

We have now formulated the linear programming problem.

Solving

Graph of constraints and objective function

The maximum profit is £880 at point B, where 400 litres of energy drink and 600 litres of refresher drink are produced.

Another example

A factory produces two toys: a bicycle and a truck. Each toy requires time on a lathe and time on an assembler, as shown in the table. The last row in the table shows how much time is available on each machine for the day’s production.

Toy TypeLathe (hours)Assembler (hours)
Bicycle22
Truck13
Available1612

Constraints

Objective function

We have now formulated the linear programming problem.

A third example

A wall is to be built using two types of bricks of equal thickness. The wall is to be 3 metres high, 100 metres long and the thickness of a single brick. The large type of brick is of height 10cm and length 20cm. The small type of brick is of height 5cm and length 10cm.

Ignoring the mortar between the bricks, the constraint 4L+s\ge60000 ensures that there are enough bricks to build the wall. Identify the meanings of the variables L and S, and explain why the constraint works.

Each large brick needs 0.5 litres of mortar. Each small brick requires 0.25 litres of mortar.

Given that 10000 litres of mortar are available, write down a constraint for the number of large and small bricks that can be used.

Large bricks cost 25p each to produce, and small bricks cost 5p each to produce. Formulate a linear programming to find how many bricks of each type should be used to build the wall as cheaply as possible.

We have now formulated the linear programming problem.

Use a graphical method to solve this. Interpret your solution.

Graph of constraints and objective function

The cheapest way to build the wall is to use 10000 large bricks and 20000 small bricks, which will cost £3500.

A fourth example

A landscaping project is being planned to cover an area of 2000m^2. £3700 has been allocated to buy plants for the project. Trees cost £30 each and require 30m^2 of space. Shrubs cost £9 each and require 4m^2 of space. It has been decided that at least 75 shrubs should be planted. Trees are five times as beneficial to the environment as shrubs. How many trees and shrubs should be planted to maximise the environmental benefit?

Objective function

Constraints

We have now formulated the linear programming problem.

Solving

Graph of constraints and objective function

The maximum environmental benefit is 445 (arbitrary units) at point B. This involves planting 21 trees and 340 shrubs.

A more optimal solution?

Because we rounded down the number of trees, it is now possible that we could fit some more shrubs into the budget and space available. We have to check this to ensure that our solution is optimal.

Aha! We can plant another shrub, increasing our environmental benefit to 5(21)+341=105+341=446 (arbitrary units).

You need to consider this in linear programming problems where the values are not integers. In exams, it is unlikely that you will be given a problem where this can happen, but it is worth being aware of.