Friday, January 8, 2010

Can someone give me an example of a linear programming problem?

Here's an example:





You're going to make cookies and pies for a bake sale. It starts in 6 hours. You have 15 eggs. Cookies are made by the dozen, take 30 minutes to make, uses 2 eggs in the process, and sell for $8. A pie takes 40 minutes to make, uses 3 eggs in the process, but sells for $12. With the limited amount of time you have, how much of each kind should you make, in order to maximize your profit?





Let C be the number of dozens of cookies you make, and P the number of pies you make. Then:





C %26gt;= 0


P %26gt;=0


2C + 3P %26lt;= 15 eggs


30C + 45P %26lt;= 8*60 minutes


And we want to find the values that maximize 7C + 12P





Linear Programming shows you different methods for solving problems like this.Can someone give me an example of a linear programming problem?
Glad I could help. Thanks for the points! Report Abuse
Can someone give me an example of a linear programming problem?
I found this on a website :) It's an amusing one...





Goldilocks needs to find at least 12 lbs of gold and at least 18 lbs of silver to pay the monthly rent.





There are two mines in which Goldilocks can find gold and silver.





Each day that Goldilocks spends in mine 1, she finds 2 lbs of gold and 2 lbs of silver.





Each day that Goldilocks spends in mine 2, she finds 1 lb of gold and 3 lbs of silver.





Formulate an LP to help Goldilocks meet her requirements while spending as little time as possible in the mines.





Let xi = no. of days spent in mine i (i =1,2)





Min z = x1 + x2





Subject to


2 x1 + x2 鈮?12 (Gold constraint)


2 x1 + 3 x2 鈮?18 (Silver constraint)


x1, x2 鈮?0
I believe that it is something like this...





X=3 y=5





If x%26gt;y then display ';x is greater than y';


If x%26lt;y then display ';x is less than y';


Else display ';x is equal to y';





This is of course not in any programming language but it is the general idea behind linear programming (I think).
  • powder
  • oil offshore
  • oil weight
  • tca chemical peel
  • No comments:

    Post a Comment