This is a cost minimising problem
The spaghetti and meatball meal planning problem.
The three decision variable consists of how many ounces of uncooked meatballs, how many ounces of uncooked spaghetti, and how many ounces of spaghetti sauce to use in each meal.
The total meal must weigh at least 15 ounces before it is cooked.
Also, each meal must contain at least 4 ounces of meatballs, and 3 ounces of spaghetti sauce, and 6 ounces of spaghetti.
An ounce of meatballs costs $12, an ounce of spaghetti costs $4, an ounce of spaghetti sauce costs $9.
How many ounces of each ingredient should we use, in order to pay the minimum cost?
Your answer should include how many ounces of spaghetti, spaghetti sauce, meatballs, and the total cost.
If you wish to research this more, this problem is an optimisation problem, which is a subset of a bigger discipline called Operations research. You may solve this problem with computational power and different algorithms. However this particular example is simple enough to solve using logic.
هذا التحدي من كتابة
C. Carl Pegels & Vahid Lotfi
The solution to the above problem is rather trivial since you must minimise cost (C), you should try to minimise the cost of the more expensive ingredients.
That is you should use as few meatballs as possible and as little spaghetti sauce as possible in each meal. However, you must use at least 4 ounces of meatballs and at least 3 ounces of spaghetti sauce. If use 4 ounces of meatballs in each meal and 3 ounces of spaghetti sauce, then you must use also at least 8 ounces of spaghetti to satisfy the constraint which specifies that the meal must weigh at least 15 ounces.
Hence the solution to the cost minimisation problem is to make up a meal consisting of
4 ounces of meatballs (X1= 4)
8 ounces of spaghetti (X2=8)
3 ounces of spaghetti sauce (X3=3)
The total cost of the meal will then amount to C= 12(4) + 4(8) +9(3)= 107