# Analyze a combination problem : Why not producing more and Why advertising on just $1$ product?

Question :

A company produces three kinds of gas ( Kind $1$, $2$ and $3$ ). Each kind of gas is made from combination of three kinds of petroleums ( Kind $1$, $2$ and $3$).

• The price of one barrel of the first kind of petroleum, the second kind and the third kind is $45$, $35$ and $25$ dollars, relatively.
• The proceeds from the sale of the first kind of gas, the second kind and the third kind is $70$,$60$ and $50$ dollars relatively.
• The company can afford buying at most $5000$ barrels of each kind of petroleum in a day.
• Each barrel of the first kind of petroleum, the second kind and the third kind contains $12$,$6$ and $8$ unit of Octane, relatively.
• Each barrel of the first kind of petroleum, the second kind and the third kind contains $0.005$,$0.02$ and $0.03$ unit of Sulfur, relatively.
• The ratio of Octane should be at least $10$,$8$ and $6$ in the first, second and third kind of gas.
• The ratio of Sulfur should be at most $0.01$, $0.02$ and $0.01$ in the first, second and third kind of gas.
• Converting a barrel of petroleum to a barrel of gas costs $4$ dollars.
• The company can afford producing at most $14000$ barrels of gas in a day.
• The customers need $3000$, $2000$ and $1000$ barrels of gas in day and the company should fulfill their needs.
• The company can advertise to sell more barrels of gas in a day. Each dollar spent on advertisement of a kind of gas, increases the need of that kind of gas to $10$ more barrels.

The company should decide on combining the kinds of petroleum to maximize the benefit of a day.

Provide a linear programming model for this problem and analyze the results.

Decision variables :
$x_{ij}=$ The number of barrels of petroleum of kind $i$ used to produce gas of kind $j$
$y_j=$The money (dollars) spent on advertising the gas of kind $j$

I wrote all of the constraints and the $LP$'s solution is like this :

$x_{11}=2088/889 \space\space, x_{12}=2111/111 \space\space, x_{13}=800$
$x_{21}=777/778\space\space , x_{22}=4222/222 \space\space, x_{23}=0$
$x_{31}=133/333\space\space , x_{32}=3166/667 \space\space, x_{33}=200$
$y_1=0 \space\space, y_2=750 \space\space, y_3=0$

It seems that everything is correct ( I double-checked the answer with a software ). But i can't analyze two things!

(i) Why advertising on just the second kind of gas? Specially when the first kind costs more?

(ii) The amount of gas produced ( of all kinds ) is $13500$ barrels. Why not producing the maximum amount that the company can afford? ( Which the question states that is $14000$ barrels? )

• For the first question, I can tell that if some product costs more then its chance of being sold might be decreased, regardless of its quality. There is always a balance between the quality and cost and one might prefer to buy cheaper product with lower quality. For the second question, take the cost of production into account. And although it is not mentioned in this question, the storage cost is also an important factor which urges the companies to produce less than their potential. – polfosol Feb 6 '17 at 8:23
• @polfosol i understand your argument... but the problem is... i think if someone else wanted to analyze the result, he/she could say something else... i mean, its like commenting! not a mathematical proof or something like that ... am i correct? – Arman Malekzadeh Feb 6 '17 at 8:36
• I thought you were expecting an intuitive explanation. It is a common practice to first do the math, and then find an explanation for it! – polfosol Feb 6 '17 at 9:20
• @polfosol of course your argument was useful. ( thank you for that :) ) but i'm thinking of writing a mathematical explanation too :) – Arman Malekzadeh Feb 6 '17 at 9:25

Are you sure your solution is correct? I translated the words into math and the code below shows what I am asking Mathematica to solve (your notation). When I do that, I get $x_{11}=29000/9$, $x_{12}=16000/9$, $x_{13}=0$, $x_{21}=4000/9$, $x_{22}=32000/9$, $x_{23}=0$, $x_{31}=7000/3$, $x_{32}=8000/3$, $x_{33}=0$, $y_{1}=300$, $y_{2}=600$, $y_{3}=0$. One of us is missing something.

No matter what the solution is, the way to understand why it looks the way it looks is to evaluate the system at the solution and see which constraints are binding.

c1 := x11 + x12 + x13 <= 5000
c2 := x21 + x22 + x23 <= 5000
c3 := x31 + x32 + x33 <= 5000
c4 := x11 + x12 + x13 + x21 + x22 + x23 + x31 + x32 + x33 <= 14000
c5 := 12*x11 + 6*x21 + 8*x31 >= 10*(x11 + x21 + x31)
c6 := 12*x12 + 6*x22 + 8*x32 >= 8*(x12 + x22 + x32)
c7 := 12*x13 + 6*x23 + 8*x33 >= 6*(x13 + x23 + x33)
c8 := 5/1000*x11 + 2/100*x21 + 3/100*x31 >= 1/100*(x11 + x21 + x31)
c9 := 5/1000*x12 + 2/100*x22 + 3/100*x32 <= 2/100*(x12 + x22 + x32)
c10 := 5/1000*x13 + 2/100*x23 + 3/100*x33 <= 1/100*(x13 + x23 + x33)
c11 := x11 + x21 + x31 <= 3000 + 10*y1
c12 := x12 + x22 + x32 <= 2000 + 10*y2
c13 := x13 + x23 + x33 <= 1000 + 10*y3
c14 := {x11 >= 0, x12 >= 0, x13 >= 0, x21 >= 0, x22 >= 0, x23 >= 0,
x31 >= 0, x32 >= 0, x33 >= 0, y1 >= 0, y2 >= 0, y3 >= 0}
c := Flatten[{c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13,
c14}]
Maximize[{70*(x11 + x21 + x31) + 60*(x12 + x22 + x32) +
50*(x13 + x23 + x33) - 45*(x11 + x12 + x13) -
35*(x21 + x22 + x23) - 25*(x31 + x32 + x33) -
4*(x11 + x12 + x13 + x21 + x22 + x23 + x31 + x32 + x33) - y1 - y2 -
y3, c}, {x11, x12, x13, x21, x22, x23, x31, x32, x33, y1, y2, y3}]


• Well, the problem is at c11, c12 and c13. The production should be exactly the same as the needs of customers. ( write $=$ instead of $\leq$ ) – Arman Malekzadeh Feb 6 '17 at 9:25
• Also, the point is not the solution :) even if your solution was right, the point would still be holding. Why don't you advertise for the third kind of gas? Why don't you produce exactly 14000 barrels? – Arman Malekzadeh Feb 6 '17 at 9:30
• @ArmanMalekzade I am not sure the solution is not the point. You are asking why it looks the way it looks. So first you need to know what it is. Once you have a solution, you can evaluate the constraints and see which ones bind. This is the answer to your 'why' question. I've added this to my answer. – Jan Feb 6 '17 at 10:40
• @ArmanMalekzade My $c11$, $c12$ and $c13$ are correct or not depending on interpretation. Mine is that $3000$, $2000$ and $1000$ is demand; if the company wants to sell more, it needs to advertise. If the interpretation is that the production has to fulfil the requirements, set the inequalities to equalities, resolve the problem and check which constraints bind to get your why answer. I am getting $x_{11}=2500$, $x_{12}=5500/3$, $x_{13}=2000/3$, $x_{21}=0$, $x_{22}=11000/3$, $x_{23}=1000/3$, $x_{31}=2500$, $x_{32}=2500$, $x_{33}=0$, $y_{1}=200$, $y_{2}=600$, $y_{3}=0$ in this case. – Jan Feb 6 '17 at 10:41