Wednesday 16 November 2011

Maths and the Real World: Linear Programming

Linear Programming may be bread and butter to you or it may be an entirely new concept. But it is one of the most applicable pieces of maths that is used in every day life by business and companies alike, this of course is minimising costs and maximising profits.


I will propose a problem to you, you are a company that sells two types of fruit drinks that consists of fruit juice and sugar syrup. Juice A consists of 0.3 litres of fruit juice and 0.5 litres of syrup and Juice B consists of 0.6 litres of juice and 0.4 litres of syrup. You have 30,000 litres of juice and 40,000 litres of syrup already in your stock. The profit for Juice A is 20p and the profit for Juice B is 30p. Given this scenario, you wish to maximise your profit.


How would you go about doing this? Well let's begin by putting the information we have in a table and go from there.



Fruit Juice (in litres)
Syrup (in litres)
Profit (in pence)
A
0.3
0.5
20
B
0.6
0.4
30
Total
20,000
30,000



Now, from this information we need to construct the constraints of the problem into mathematical terms. What inequality will represent the amount of fruit juice that is allowed to be used? Well it must be less than or equal to 30,000 that is clear, it also depends on how much of it is used by Juice A and Juice B, so if 0.3 of A is used each time Juice A is created, and 0.6 of B is used when Juice B is created. This then means that 0.3A+0.6B ≤ 30,000. Using the same rules we must concur that 0.5A+0.4B ≤ 40,000. Also we want to maximise the amount of profit that we make, this means that P = 20A+30B. But there are other less obvious constraints that we must consider. We can not use a negative amount of juice or syrup so A ≥ 0 and B ≥ 0.

To get an idea of what sort of values we can have we plot these inequalities onto a graph which will give us an idea of what values of A and B are actually possible to obtain.

The blue shaded region is the answers that are within
 the constraints of our inequalities. This is called the
region of feasibility.
So we have the region that the answers must be within, now we want to go about maximising the profit which has an equation of, P = 20A+30B. This will be the last point that the line P = 20A+30B touches on the region of feasibility, this means that what P actually equals is arbitrary as we only need to gradient of that line and it will then be moved until it touches the last point it possible can on the region of feasibility. So we will choose a number that is convenient to plot for us, I'll be using P = 600.

The line begins to gain opacity as it moves closer to the
further point on the region of feasibility. Point 'A' is the
 maximum point within the reason of feasibility, therefore
this is the maximum value.
We could try to read this point of the graph but it would far more accurate to solve this using where the point is met by the two equations and solve simultaneously. So we are solving the simultaneous equations of 0.3A+0.6B = 30,000 and 0.5A+0.4B = 40,000.

This then in the context means that to optimise the profit within our constraints we should make 200,000/3 litres of Juice A and 50,000/3 of Juice B. This then equates to about £6333, which is the maximum profit we can achieve from the circumstances we have been given.

This is just an example of how to use linear programming to optimise finances, but it is easily transferable to almost any situation. The only thing you may need to watch out for is if A and B are number of items that need to be sold, they must be whole numbers (obviously) so you may need to round and then check that this will still lie in the region of feasibility.

Again, I hope you find this interesting and in fact very applicable to real life. If you have any questions on anything I have done, how it works or even how I create my images, please comment and I will reply.

No comments:

Post a Comment