## Optimising Fuel Production From Crude Oil

Crude oil is separated into several types of fuel by fractional distillation - petrol, oil and gas. Depending on the demand for each type of oil, one can be processed into another. Petrol and oil can be processed into gas by 'cracking' for example. Suppose that to produce a unit of petrol, one unit each of oil and gas were used. To produce a unit of oil, 1/5 of a unit of oil and 2/5 of a unit of gas must be used. To produce a unit of gas, 1.5 of a unit of petrol, 2/5 of a unit of oil and 1/5 of a unit of gas. A company has orders for 100 units each of petrol, oil and gas.
How many units of each are needed from crude oil to satisfy the orders?
We can represent the conversion from one fuel to another in a table.
 Consumed\Product Petrol Oil Gas Petrol 0 0 1/5 Oil 1 1/5 2/5 Gas 1 2/5 1/5
We can represent this by the matrix
$C =\left( \begin{array}{ccc} 0 & 0 & 1/5 \\ 1 & 1/5 & 2/5 \\ 1 & 2/5 & 1/5 \end{array} \right)$
.
Let
$P, \: O, \: G$
represent the production of petrol, oil and gas respectively. We can represent conversion between fuels by
$\left( \begin{array}{ccc} 0 & 0 & 1/5 \\ 1 & 1/5 & 2/5 \\ 1 & 2/5 & 1/5 \end{array} \right) \mathbf{Y}=\begin{pmatrix}P\\O\\G\end{pmatrix}$
.
Let
$\mathbf{D}=\begin{pmatrix}100\\100\\100\end{pmatrix}$
be the demand vector, then
$\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right) \begin{pmatrix}P\\O\\G\end{pmatrix} - \left( \begin{array}{ccc} 0 & 0 & 1/5 \\ 1 & 1/5 & 2/5 \\ 1 & 2/5 & 1/5 \end{array} \right) \begin{pmatrix}P\\O\\G\end{pmatrix}=\begin{pmatrix}100\\100\\100\end{pmatrix}$

$\left( \begin{array}{ccc} 1 & 0 & -1/5 \\ -1 & 4/5 & 3/5 \\ -1 & -2/5 & 4/5 \end{array} \right) \begin{pmatrix}P\\O\\G\end{pmatrix}=\begin{pmatrix}100\\100\\100\end{pmatrix}$

$\begin{pmatrix}P\\O\\G\end{pmatrix}={\left( \begin{array}{ccc} 1 & 0 & -1/5 \\ -1 & 4/5 & 3/5 \\ -1 & -2/5 & 4/5 \end{array} \right)}^{-1}\begin{pmatrix}100\\100\\100\end{pmatrix}=\left( \begin{array}{ccc} 2 & 1/3 & 2/3 \\ 5 & 5/2 & 5/2 \\ 5 & 5/3 & 10/3 \end{array} \right) \begin{pmatrix}100\\100\\100\end{pmatrix}=\begin{pmatrix}300\\1000\\1000\end{pmatrix}$