View Full Version : Linear Programming
chloeroxy
10-30-2006, 09:10 PM
A tray of corn muffins requires 4 cups of milk and 3 cups of wheat flour. A tray of bran muffins requires 2 cups of milk and 3 cups of wheat flour. There are only 16 cups of milk and 15 cups of flour. The baker makes $3 profit per tray of corn muffins and $2 profit per tray of bran muffins. How many trays of each should he make in order to maximize profits?
OfficeShredder
10-30-2006, 09:54 PM
call a cup of milk M and a cup of flour F.
What does 4*M + 3*F equal in terms of dollars? How about 2*M + 3*F
Epsilon=One
10-31-2006, 01:44 PM
A tray of corn muffins requires 4 cups of milk and 3 cups of wheat flour. A tray of bran muffins requires 2 cups of milk and 3 cups of wheat flour. There are only 16 cups of milk and 15 cups of flour. The baker makes $3 profit per tray of corn muffins and $2 profit per tray of bran muffins. How many trays of each should he make in order to maximize profits?This is a two step simple algebra problem.
4M + 3F = 3P
2M + 3F = 2P
Solving gives:
M = 1/2P
F = 1/3P
16M = 8P
15F = 5P
Therefore:
Maximum Profit = 13 Dollars
B = 2P
C = 3P
Thus,
3B = 2C; and,
B + C = 5
Solving:
B = 2
C = 3
Therefore:
Corn Muffins, "C" = 3 Trays = 9P
Bran Mufffins, "B" = 2 Trays = 4P
9P + 4P = 13P = Maximum Profit
Checking:
3x4M + 2x2M = 16M
3x3F + 2x3F = 15F
HallsofIvy
11-13-2006, 03:53 PM
call a cup of milk M and a cup of flour F.
What does 4*M + 3*F equal in terms of dollars? How about 2*M + 3*F
I am mystified by this. You know nothing about the cost of milk of flour or how they relate to "dollars".
Epsilon= One, I am even more confused by your reply, since you didn't say what "F", "M", of "P" MEAN! (Although you did get the right answer! Was that because 5+ 8= 13?)
chloeroxy, at least you made it clear that this was a "Linear Programming" problem! If you know that and were given this problem, you ought to know the basics and at least have tried something.
Let "C" be the number of trays of Corn muffins made. Let "B" be the number of trays of Bran muffins made. Since you can make $3 profit on each tray of corn muffins and $2 profit on each tray of bran muffins, you will make 3C+ 2B dollars profit on C trays of corn muffins and B trays of bran muffins.
You are told that each tray of corn muffins requires 4 cups of milk and each tray of bran muffins requires 2 cups of milk. So C trays of corn muffins and B trays of bran muffins requires 4C+ 2B cups of milk- but there are only 16 cups of milk available: 4C+ 2B cannot be more than 16 so 4C+ 2B<= 16 or 2C+ B<= 8.
You are told that each tray of corn muffins requires 3 cups of flour and each tray of bran muffins the same, C trays of corn muffins and B trays of bran muffins requires 3C+ 3B cups of flour- but there are only 15 cups of flour available: 3C+ 3B cannot be more than 15 so 3C+ 3B<= 15 or C+ B<= 5.
If you graph the lines, B+ C= 5 and B+ 2C= 8, you find that the "feasible" region, the region in which there are possible ("feasible") solutions lies in a quadrilateral haveing those two lines as well as the x and y axes. The two lines B+ c= 5 and B+ 2C= 8, cross at B= 2, C= 3. The vertices of that region (as (B,C)) are (0,0), (5, 0), (0, 4), and (2, 3).
Basic concept of linear programming: If a linear function is defined on a polygonal region, the maximum and minimum values must occur at a vertex of that region. That's because f(x,y)= ax+ by= C, for different values of C, graph as parallel lines. Moving a line "parallel to itself", increasing and decreasing C, you can see that it enters and leaves any polygonal area at a vertex (or, in rare cases, along a side but then it has the same max or min value at the two vertices). It is sufficient to evaluate the function at the vertices. Here the function is the profit, 3C+ 2B. Evaluating at each vertex:
(0, 0): 3(0)+ 2(0)= 0 (obviously the minimum), (5, 0):2(5)+ 3(0)= 10, (0,4): 2(0)+ 3(4)= 12, and (2, 3): 2(2)+ 3(3)= 13.
The maximum profit is, just as Epsilon= One said, $13 and requires that we make 3 trays of corn muffins (requiring 12 cups of milk and 9 cups of flour) and 2 trays of bran muffins (requiring 4 cups of milk and 6 cups of flour). Notice that we use exactly 16 cups of milk and 15 cups of flour.
OfficeShredder
11-13-2006, 05:12 PM
I am mystified by this. You know nothing about the cost of milk of flour or how they relate to "dollars".
Yes you do.... four cups of milk and three cups of flour gives you three dollars profit. It's right in the problem. Epsilon solved it the same way I was suggesting
Mr. Robin Parsons
11-13-2006, 11:27 PM
© Mr. Robin Parsons :cool: Kingston Ontario Canada MMVI
HallsofIvy you are incredible, in a GOOD WAY! :cool:
Good at math too, (I) like that, as (I) can learn from you!
Keep going, PLEEEEEASE!
Thanks!
Epsilon=One
11-14-2006, 01:31 AM
Epsilon= One, I am even more confused by your reply, since you didn't say what "F", "M", of "P" MEAN! (Although you did get the right answer! Was that because 5+ 8= 13?)F= Flour; M=Milk; P=Profits; B=Bran muffin tray; C=Corn muffin tray. The right answer was arrived at by the steps of logic that are detailed in the post.
Rather than interpretating a graph, I felt the most important aspect was to first determine the maximum profit that was possible from the given ingredients. After this, it was not stated whether the trays could be fractional or not. Fortunately, the maximum profit could be arrived at with integer values for the trays (as demonstrated); therefore, it was not necessary to proceed any further to answer the original problem.
Truth be told, the answer was obvious. To simplify the logic took a moment or two.
OfficeShredder
11-14-2006, 12:33 PM
Rather than interpretating a graph, I felt the most important aspect was to first determine the maximum profit that was possible from the given ingredients.
Apparently, since it's a linear programming question, and we didn't know what that meant, we used a method that wasn't contextually the best (well, you used the method, I just suggested it)
Epsilon=One
11-14-2006, 05:38 PM
...(well, you used the method, I just suggested it)Thanks.
I thought my first statement, in my first post, clearly cited your assist.
If not, I now have.
vBulletin® v3.6.8, Copyright ©2000-2012, Jelsoft Enterprises Ltd.