## Constructing a Linear Programming Problem

The linear programming method maximises a function subject to certain constraints. The function must be linear and any variables must be non negative. A simple example is the 'diet problem'. In this problem a nutritionist attempts to find a least cost diet that meets certain nutritional requirements.Suppose only two foods, A and B are available. Each ounce of food A contains 2g of protein, 1 g iron and 1g thiamine. Each unit of food B contains 1g protein, 1g iron and 3 g thiamine. Each ounce of A costs 30p and each ounce of B costs 40p. The nutritionist wants a meal to provide at least 12g protein, at least 9g iron and an at least 15g thiamine. How many ounces of each food must meet be used to minimise the cost of the meal while meeting the nutritionists requirements?

Let

\[a\]

and \[b\]

be the number of ounces of each of foods A and B used.The meal contains

\[2a+b\]

units of protein and the nutritionist requires \[2a+b \geq 12\]

.The meal contains

\[a+b\]

units of iron and the nutritionist requires \[a+b \geq 9\]

.The meal contains

\[a+3b\]

units of thiamine and the nutritionist requires \[a+3b \geq 15\]

.The cost of the meal is

\[30a+40b\]

and we want to minimise this.The linear programming problem is then to minimise

\[z=30a+40b\]

subject to the constraints\[2a+b \geq 12\]

\[a+b \geq 9\]

\[a+3b \geq 15\]

\[a, \: b \geq 0\]

This problem is solved graphically here.