Algebra/objective functions
Expert: Scott A Wilson - 9/22/2009
QuestionCan you please help me set this up?
Craft stores can make a fancy cloth in 2.5 hours and a casual cloth in 1 hour. They charge $9 for a fancy cloth and $4 for a casual cloth. If they work 30 hours and can make at the most 15 cloths, how many of each do they have to make top maximize their profit.
AnswerThis is what you don't need to read, and if you want, skip after the double line.
-----------------------------------------------------------------------------------------
This gives rise to the simplex algorithm.
Lets make the variables P for plain and F for fancy.
The main equation is 9F + 4P.
The 1st constraint is 2.5F + 1P <= 30, so the expansion would be 2.5F + P + x = 30.
The 2nd constraint is F + P <= 15, so the expansion would be F + P + y = 15.
Here, x and y are the slack variables.
==========================================================================================
Since this is just an algebra problem, there are two equations, and two unknowns,
forget about the slack variables and just say that 2.5F + P = 30 and F + P = 15.
The 2nd equation says that P = 15 - F, so this makes the 1st equation into 2.5F + 15 - F = 30.
That reduces to 1.5F = 30 - 15 = 15, so F = 10.
Since F + P = 15, P is then seen to be 5.