Thursday, February 8, 2007

More Math...

A diet problem:

Using the information in the table below, construct the cheapest diet that gives the dieter at least 2000 kcal of energy, 55 g of protein, and 800mg of calcium.










FoodServing SizeEnergy (kcal)Protein (g)Calcium (mg)Price/Serving (cents)Max daily servings
Oatmeal28g1104234
Chicken100g2053212243
Eggs2 large1601354132
Whole Milk237mL160828598
Cherry Pie170g420422202
Pork & Beans260g2601480192

2 comments:

Kimota94 aka Matt said...

Even though I don't know really how to solve this, I'll take a crack at it since no one else has (as far as I can see, anyway).

The way I'd approach it is to create a second table in parallel to the one you provided, which shows the breakdown, for each food type, of how much of each (energy, protein, calcium) you get PER CENT (the cost effectiveness). In other words, Oatmeal would look like:

36.7 kcal/cent of energy, 1.3 g/cent of protein and 0.7 mg/cent of calcium.

Doing the #s in my head, the rest would be:

Chicken: 8.4, 1.3, 0.5
Eggs: 10.2, 1.0, 4.2
Whole Milk: 17.8, 0.9, 31.5
Cherry Pie: 21.0, 0.2, 1.1
Pork&Beans: 13.6, 0.7, 4.2

I don't know of any formulaic way to solve the problem, but inspection yields:

Consider the energy need first, since no single food can provide all of it (not true of the other two categories)...

Needing 2000 kcal of energy, you can get 36.7 kcal/cent via Oatmeal at 110 kcal per serving, for a daily max of 4 servings. Since Oatmeal also delivers the most cost effective protein (at 1.3 g/cent), I'd load up on Oatmeal and take 4 servings. That provides:

440 kcal, 16 g, and 8 mg, respect.
at the low-low cost of $0.12 so far. What a great start!!

Next most cost effective form of energy is Cherry Pie, but Whole Milk is nearly as good, in terms of kcal/cent, and much better in protein and calcium cost-efficiency. So if we loaded up on Whole Milk, maxing out at 8 servings (yummm), that adds:

1280 kcal, 64 g, 2280 mg, at $0.72,

bringing the totals up to:

1720 kcal, 80 g, 2288 mg, at $0.84

The only thing missing is 280 kcal of energy, which a single Cherry Pie can more than provide, for $0.20. Therefore the whole thing, in this scenario, would cost $1.04.

But if we had chosen the Cherry Pie before the Whole Milk, and maxed out on Pies first (2), that would've added:

840 kcal, 8 g, 44 mg at $0.40 to
440 kcal, 16 g, 8 mg at $0.12

and we'd be up to:

1280 kcal, 24 g, 52 mg at $0.52

To get the missing 720 kcal, we could do 5 servings of Whole Milk, adding another:

800 kcal, 40 g, 1410 mg at $0.45 for totals of:

2080 kcal, 64 g, 1462 mg at $0.97 which meets your minimum criteria and is cheaper still!

I can't see any way to get there more cheaply, so I guess the second scenario (4 Oatmeals, 2 Cherry Pies, & 5 Whole Milks), at $0.97 / day, is the diet I'd recommend! And what a diet!! ;-)

Kimota94 aka Matt said...

Assuming I did all of the arithmetic right, that is....