6: Real World Constraints

Real world constraints can limit a set of possible solutions

Since a problem will often be in a real-world context, we need to think about the real-world restrictions on the final answer.

An answer might need to be an integer, or non-negative.

Problem

Part 1

Jericho has three favourite foods, and wants to eat just these three foods while getting his daily requirements of protein, carbohydrates and fats. The amount, in grams, of each of these is listed in the table below, as well as the average daily requirements for an adult.

How much of each food should Jericho eat to get his daily requirements of protein, carbohydrates, and fat?

Part 2

Elspeth is on a high protein diet, and needs 150 grams of protein, 200 grams of carbohydrates, and 50 grams of fat each day. Investigate how Elspeth can use Jericho’s favourite foods in her diet.

Part 3

Robbie orders pre-packaged meals with different ingredients. The packaging shows the following break downs.

Investigate what combination of these products he should eat to get his average daily requirements.

Would it be possible for Robbie to eat a diet with a little less fat from these three products?

Solution

Part 1

Let x, y and z be the number of pieces of chocolate cake, hard boiled eggs, and serves of Nutri-grain, respectively.

We have these equations:

2.5x + 6y + 9z = 50

35x + 0.5y + 85z = 310

10x + 5y + z = 70

Solving this system (using a calculator), (x,y,z) = (4.89, 3.88, 1.61). However, Jericho could probably not eat these exact numbers.

If he ate 5 pieces of chocolate cake, 4 hard-boiled eggs, and 1.6 serves of Nutri-grain, he would get very close.

Part 2

The equations change to:

2.5x + 6y + 9z = 150

35x + 0.5y + 85z = 200

10x + 5y + z = 50

The planes represented by these equations have moved to be new parallel planes. So we expect there to still be a unique solution.

Solving this system (using a calculator), (x,y,z) = (-5.7, 20.5, 4.6).

Although there is a unique solution, it is not possible for Elspeth to use these foods in her diet because she cannot eat -5.7 pieces of chocolate cake. (We expect x, y and z to be non-negative).

Part 3

Let x, y and z be the number of snack bars, tasty meals and healthy meals Robbie eats. The equations are now:

(protien): 6x + 14y + 10z = 50

(carbs): 20x + 80y + 100z = 300

(fat): 10x + 20y + 10z = 70

Using elimination, we find that this system of equations simplifies to:

0.3(carbs) - (protien): 10y + 20z = 40

(carbs) - 2(fat): 40y + 80z = 160

from which we can see the system is consistent.

If we let z be a real number t, then

z = t

y = 4 - 2z = 4 - 2t

x = 7 - 2y - z = 3t - 1

So (x,y,z) = (3t -1, 4 - 2t, t).

Since these must all be positive numbers, we need 3t - 1 ≥ 0, 4 - 2t ≥ 0 and t ≥ 0.

So t ≥ 0.333, t ≤ 2 and t ≥ 0.

The range is 0.333 ≤ t ≤ 2.

This could be (0, 3.33, 0.33), which might not suit Robbie as it is not a whole number of pre-packaged meals.

He could eat (2,2,1) or (5,0,2) from these options with whole-numbers of the products.

We suggest, for variety, Robbie eats two Snack Bars, two Tasty Meals, and one Healthy Meal.