linear programming for maximum proceeds

51 Views Asked by At

You can find the problem here

Here's what I did:

 First assign variables for each of the ingredients:

 x_1 := Sugar
 x_2 := Flour
 x_3 := Dried Fruit
 x_4 := Chocolate Chips

The first four constraints are straightforward:

x_1 <= 20
x_2 <= 20
x_3 <= 5
x_4 <= 5

We want to maximize profit, so the objective is

max.  z = 10(y_1) + 12(y_2) + 14(y_3) + 7(y_4) + 2(y_5)
where

y_1 = 0.5(x_1) + x_2 + 0.5(x_4)
y_2 = x_1 + 0.5(x_2) + x_3
y_3 = 0.5(x_1) + 2.5(x_3) + 0.25(x_4)
y_4 = 2(x_1)
y_5 = x_1 + 2(x_2) + x_3 + x_4

Now I just substitute y_1, ..., y_5 into the objective function z in order 
to obtain the objective function as an immediate function of x_1, ..., x_4.

I don't know if this is right. Could anyone verify? Also, now suppose that I am actually required to use up all the ingredients. How would I modify the program from to address this constraint?