Building a Diet Using Linear Algebra

4.2k Views Asked by At

The Question

Suppose a diet calls for 7 units of fats, 9 units of protein and 16 units of carbohydrates for the main meal. Suppose the dieter has 3 possible types of food to satisfy this requirement:

Food 1 which has 2 units of fat, 2 units of protein, 4 units of carbs Food 2 which has 3 units of fat, 1 units of protein, and 2 units of carbs Food 3 which has 1 unit of fat, 3 nits of protein and 5 units of carbs

Let $x,y,z$ denote the number of ounces of Food 1,Food 2 and Food 3 the dieter will consume. Find a linear system in the 3 unknowns $x,y,z$ whose solution will tell us how many ounces of each food must be consumed for the dieter to meet their requirement.

My Work

I've looked at this problem for 15 minutes now and still haven't made much progress. $x+y+z = 6f + 6p + 11c$ where $f=$ fats,$p=$ proteins, $c=$ carbs. I was definitely hoping for something that didn't have different units so that it could look more like a linear equation. Can anyone show me how to write out the sum of these 3 unknowns(or some multiple of them) so that I get something a bit more useful?

1

There are 1 best solutions below

1
On BEST ANSWER

Define "nutrient space" as a 3-dimensional space of fats, protiens and carbs, with units as ounces. A "food" is then a 3D point in this space, and a "diet" is a linear combination of "foods". We have foods 1 through 3,

$$ f_1 = [2, 2, 4]\\ f_2 = [3, 1, 2]\\ f_3 = [1, 3, 5]\\ $$

A diet is then a linear combination:

$$ d = xf_1 + yf_2 + zf_3 $$

And we simply wish to find $x, y, z$ such that

$$ d = [7, 9, 16] $$

which I'm sure you can figure out ;)