# How would you math the shit out of this?

**URL:** <https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810>\
**Category:** Factual Questions\
**Created:** [June 25, 2017, 5:05am UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810 "2017-06-25T05:05:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Biggirl](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/biggirl/32/3294_2.png) [@Biggirl](https://boards.straightdope.com/u/Biggirl)\
**Post date:** [June 25, 2017, 5:05am UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/1 "2017-06-25T05:05:35Z")

</div>

[Buzzfeed has a quiz to see if you can keep your fast food cals under 2000.](https://www.buzzfeed.com/jonmichaelpoff/can-you-eat-out-for-every-meal-without-going-over-2000?utm_term=.lne40rpOM#.hxl68Xnm5) There are 6 choices for breakfast, lunch, afternoon snack, a Starbucks drink and dinner you pick one of each and at the end it tells you how many calories you have consumed.

I want to know how to figure out the calories of each item in the quiz. How would you math it? What equations could you use and how do you figure out the best way to, well, figure it out? The first thing I did was run one quiz, find out the total cals and then do the same quiz with one item changed. This only gave me the caloric difference between the two swapped items and I realized I am dumb at math. Can someone smarter talk me through this?

---

<div class="post-metadata">

**Author:** ![Snowboarder\_Bo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/snowboarder_bo/32/229_2.png) [@Snowboarder\_Bo](https://boards.straightdope.com/u/Snowboarder_Bo)\
**Post date:** [June 25, 2017, 5:16am UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/2 "2017-06-25T05:16:40Z")

</div>

1800 calories. Tried once. Tip: bread has a shitload of calories. Listen to Ramona, eh.

---

<div class="post-metadata">

**Author:** ![Biggirl](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/biggirl/32/3294_2.png) [@Biggirl](https://boards.straightdope.com/u/Biggirl)\
**Post date:** [June 25, 2017, 5:42am UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/3 "2017-06-25T05:42:09Z")

</div>

> [@Snowboarder\_Bo](#):
>
> 1800 calories. Tried once. Tip: bread has a shitload of calories. Listen to Ramona, eh.

What?

---

<div class="post-metadata">

**Author:** ![ThisIsTheEnd](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thisistheend/32/4713_2.png) [@ThisIsTheEnd](https://boards.straightdope.com/u/ThisIsTheEnd)\
**Post date:** [June 25, 2017, 7:47am UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/4 "2017-06-25T07:47:12Z")

</div>

> [@Biggirl](#):
>
> [Buzzfeed has a quiz to see if you can keep your fast food cals under 2000.](https://www.buzzfeed.com/jonmichaelpoff/can-you-eat-out-for-every-meal-without-going-over-2000?utm_term=.lne40rpOM#.hxl68Xnm5) There are 6 choices for breakfast, lunch, afternoon snack, a Starbucks drink and dinner you pick one of each and at the end it tells you how many calories you have consumed.
> 
> I want to know how to figure out the calories of each item in the quiz. How would you math it? What equations could you use and how do you figure out the best way to, well, figure it out? The first thing I did was run one quiz, find out the total cals and then do the same quiz with one item changed. This only gave me the caloric difference between the two swapped items and I realized I am dumb at math. Can someone smarter talk me through this?

Don’t the companies’ websites have that info?

---

<div class="post-metadata">

**Author:** ![ThisIsTheEnd](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thisistheend/32/4713_2.png) [@ThisIsTheEnd](https://boards.straightdope.com/u/ThisIsTheEnd)\
**Post date:** [June 25, 2017, 8:12am UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/5 "2017-06-25T08:12:20Z")

</div>

Mediterranean Egg White on Ciabatta Bread - Panera Bread = 420

Egg White Delight McMuffin - McDonalds = 260

Turkey Sausage Flatbread - Dunkin’ Donuts = 480

Spinach, Feta, and Cage-Free Egg White Breakfast Wrap - Starbucks = Not on the menu

Sausage, Egg, Cheese and Hash Brown Burrito - Burger King = 370

Acai Primo Bowl - Jamba Juice = 490

> **[Breakfast](https://www.panerabread.com/en-us/menu/categories/breakfast.html)**
>
> Breakfast

> **[McDonald's Nutrition Calculator: Calories and More | McDonald's](https://www.mcdonalds.com/us/en-us/about-our-food/nutrition-calculator.html)**
>
> Check out our Nutrition Calculator to find McDonald’s calorie counts and nutrition facts for all of your favorite menu items

> **[Turkey Sausage, Egg & Cheese | Twist on a Classic |
    Dunkin'®](https://www.dunkindonuts.com/en/menu/sandwiches-and-more/product-turkey-sausage-flatbread-id2100201)**
>
> Start your mornings off right with a delicious turkey sausage, egg and American cheese. Try this twist on a breakfast favorite today only at Dunkin'!

> **[Starbucks®](https://www.starbucks.com/menu)**

[http://www.bk.com/menu-item/hash-brown-burrito](http://www.bk.com/menu-item/hash-brown-burrito)  
[http://www.jambajuice.com/menu-and-nutrition/menu/energy-bowls/acai-primo](http://www.jambajuice.com/menu-and-nutrition/menu/energy-bowls/acai-primo)

---

<div class="post-metadata">

**Author:** ![Biggirl](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/biggirl/32/3294_2.png) [@Biggirl](https://boards.straightdope.com/u/Biggirl)\
**Post date:** [June 25, 2017, 8:31am UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/6 "2017-06-25T08:31:56Z")

</div>

> [@ThisIsTheEnd](#):
>
> Don’t the companies’ websites have that info?

Yes. But that’s not my question. I’d like to know how to work out this problem.

---

<div class="post-metadata">

**Author:** ![Biggirl](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/biggirl/32/3294_2.png) [@Biggirl](https://boards.straightdope.com/u/Biggirl)\
**Post date:** [June 25, 2017, 8:33am UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/7 "2017-06-25T08:33:09Z")

</div>

> [@ThisIsTheEnd](#):
>
> Mediterranean Egg White on Ciabatta Bread - Panera Bread = 420
> 
> Egg White Delight McMuffin - McDonalds = 260
> 
> Turkey Sausage Flatbread - Dunkin’ Donuts = 480
> 
> Spinach, Feta, and Cage-Free Egg White Breakfast Wrap - Starbucks = Not on the menu
> 
> Sausage, Egg, Cheese and Hash Brown Burrito - Burger King = 370
> 
> Acai Primo Bowl - Jamba Juice = 490
> 
> [Panerabread App | Panera Bread](https://www.panerabread.com/en-us/menu-categories/breakfast-.html#mediterranean-egg-white-on-ciabatta)  
> [McDonald's Nutrition Calculator: Calories and More | McDonald's](https://www.mcdonalds.com/us/en-us/about-our-food/nutrition-calculator.html)  
> [https://www.dunkindonuts.com/en/food-drinks/sandwiches-wraps/turkey-sausage-flatbread](https://www.dunkindonuts.com/en/food-drinks/sandwiches-wraps/turkey-sausage-flatbread)  
> [Starbucks®](https://www.starbucks.com/menu/catalog/nutrition?food=all#food=all&page=2)  
> [Burger King](http://www.bk.com/menu-item/hash-brown-burrito)  
> [http://www.jambajuice.com/menu-and-nutrition/menu/energy-bowls/acai-primo](http://www.jambajuice.com/menu-and-nutrition/menu/energy-bowls/acai-primo)

Again, I don’t want to know the caloric content of these foods. I want to know how to work out this problem and the steps smart people take to understand how to work out this problem.

---

<div class="post-metadata">

**Author:** ![Biggirl](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/biggirl/32/3294_2.png) [@Biggirl](https://boards.straightdope.com/u/Biggirl)\
**Post date:** [June 25, 2017, 8:35am UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/8 "2017-06-25T08:35:02Z")

</div>

Now I’m wondering if I also need help with English along with math as no one understands what my original question is. I’m such a dummy!

---

<div class="post-metadata">

**Author:** ![ThisIsTheEnd](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thisistheend/32/4713_2.png) [@ThisIsTheEnd](https://boards.straightdope.com/u/ThisIsTheEnd)\
**Post date:** [June 25, 2017, 8:57am UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/9 "2017-06-25T08:57:59Z")

</div>

I think you would have to know the actual number for at least one item, or one item in each category.

I thought you just wanted to win, lol.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [June 25, 2017, 9:08am UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/10 "2017-06-25T09:08:40Z")

</div>

You need to set up a system of equations. There are, by my count, 26 unknowns, which means you need 26 equations. Each one would look something like:  
EggMM + BSupr + FnY + GrandePink + Tilapia = 1440

You need to cover each food item at least once, and can’t have any duplicate combos, but beyond that the choices don’t matter.

After that, use your method of choice to solve the system. The usual way is to put them in a matrix. Here, you would have a 26x26 matrix, with each column having a 1 if you chose that item and 0 otherwise. If there were only two meals and two items per meal, the matrix might look like:  
[1 0 1 0]  
[1 0 0 1]  
[0 1 1 0]  
[0 1 0 1]

We multiply this by the unknown vector of per-item calorie counts to get the vector of known calorie totals (S is selection matrix, c is per-item calorie vector, and t is the total calorie vector):  
Sc = t

Invert S to solve for c:  
S[sup]-1[/sup]Sc = S[sup]-1[/sup]t  
c = S[sup]-1[/sup]t

Inverting the matrix is beyond the scope of this post, but it is a very basic linear algebra operation and could even be done by hand, though it would be tedious and error-prone. I would use Wolfram Alpha.

---

<div class="post-metadata">

**Author:** ![ThisIsTheEnd](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thisistheend/32/4713_2.png) [@ThisIsTheEnd](https://boards.straightdope.com/u/ThisIsTheEnd)\
**Post date:** [June 25, 2017, 9:38am UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/11 "2017-06-25T09:38:20Z")

</div>

> [@Dr.Strangelove](#):
>
> You need to set up a system of equations. There are, by my count, 26 unknowns, which means you need 26 equations. Each one would look something like:  
> EggMM + BSupr + FnY + GrandePink + Tilapia = 1440
> 
> You need to cover each food item at least once, and can’t have any duplicate combos, but beyond that the choices don’t matter.
> 
> After that, use your method of choice to solve the system. The usual way is to put them in a matrix. Here, you would have a 26x26 matrix, with each column having a 1 if you chose that item and 0 otherwise. If there were only two meals and two items per meal, the matrix might look like:  
> [1 0 1 0]  
> [1 0 0 1]  
> [0 1 1 0]  
> [0 1 0 1]
> 
> We multiply this by the unknown vector of per-item calorie counts to get the vector of known calorie totals (S is selection matrix, c is per-item calorie vector, and t is the total calorie vector):  
> Sc = t
> 
> Invert S to solve for c:  
> S[sup]-1[/sup]Sc = S[sup]-1[/sup]t  
> c = S[sup]-1[/sup]t
> 
> Inverting the matrix is beyond the scope of this post, but it is a very basic linear algebra operation and could even be done by hand, though it would be tedious and error-prone. I would use Wolfram Alpha.

Nice.

---

<div class="post-metadata">

**Author:** ![John\_DiFool](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/john_difool/32/19543_2.png) [@John\_DiFool](https://boards.straightdope.com/u/John_DiFool)\
**Post date:** [June 25, 2017, 12:06pm UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/12 "2017-06-25T12:06:44Z")

</div>

Mathing weirds arithmetic.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [June 25, 2017, 12:11pm UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/13 "2017-06-25T12:11:59Z")

</div>

True enough, this linear algebra calculates the caloric content of each food item, but the quiz actually asks you to pick exactly one food item from each category such that you _get as close to 2000 calories as possible without going over._ So figuring out the content of each item is not a complete answer.

With a small number of items you (or your computer) could just try all the possibilities; that obviously works. Some dynamic programming would be a more sophisticated way to go about it.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 25, 2017, 12:21pm UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/14 "2017-06-25T12:21:04Z")

</div>

You can’t completely solve the problem. You can get as many equations as you need, but they won’t all be independent. For a simplified example, if I’m given x + 2y = 3, and 2x + 4y = 6, I still can’t solve for x and y, even though I have two equations, because one equation is derived from the other.

**ThisIsTheEnd** is right that you’d need to know a few of the items to begin with. Specifically, you need to know at least one item from all but one of the categories (that is to say, you can’t have two categories without known items). Because suppose you did have two categories with unknown items: There’s some item in Category A that has the least number of Calories. Now take any number less than that number, and subtract it from everything in that category, and add the same number to everything in Category B. You’ve now got a different set of Calorie counts, but one which will give you exactly the same total results, for every combination.

On the other hand, suppose that you do have at least one item from all but one categories. Now it’s easy to figure out: First, you take a menu consisting of all of the known items plus any one item in the last category. Look at the total, and you can find that last item, and so now you have an item in every category. Now, to find any individual item, just pair it up with all the known items in the other categories.

Oh, and to the quiz itself, it’s much easier than the quiz makes it out to be. Just skip the snack and the Starbucks drink and you’ll save a ton of Calories, but the quiz doesn’t give you that option.

---

<div class="post-metadata">

**Author:** ![amarinth](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@amarinth](https://boards.straightdope.com/u/amarinth)\
**Post date:** [June 25, 2017, 1:15pm UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/15 "2017-06-25T13:15:03Z")

</div>

> [@Biggirl](#):
>
> Now I’m wondering if I also need help with English along with math as no one understands what my original question is. I’m such a dummy!

There are 26 unknowns - so you’d need 26 equations.  
Basically, you’d go through it 26 times (making sure you picked every item at least once and never picked the same group of items twice) and write down the answer each time, for example :

McMuffin + Burrito + Cookie + Macchiato + Tilapia = 2500 (or whatever)

Once you have the equations, you solve for each food item. I don’t see how you would get dependent equations from this quiz, it’s a worry sometimes, but not here.

---

<div class="post-metadata">

**Author:** ![Pantastic](https://avatars.discourse-cdn.com/v4/letter/p/3bc359/32.png) [@Pantastic](https://boards.straightdope.com/u/Pantastic)\
**Post date:** [June 25, 2017, 1:44pm UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/16 "2017-06-25T13:44:51Z")

</div>

It seems really odd to me that you’re required to get a full sugar Starbuck’s drink as part of the exercise. Looks to me like it’s actually easy t stay under 2000 calories if you’re actually just eating and not having what’s really a big dessert item.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [June 25, 2017, 1:56pm UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/17 "2017-06-25T13:56:06Z")

</div>

> [@Chronos](#):
>
> You can’t completely solve the problem. You can get as many equations as you need, but they won’t all be independent. For a simplified example, if I’m given x + 2y = 3, and 2x + 4y = 6, I still can’t solve for x and y, even though I have two equations, because one equation is derived from the other.

Sure, but shouldn’t it normally work out when the equation is not a multiple of the first one? For example, if the second equation is 2x+7y=9, they only intersect at [1,1] (in other words x=1, y=1 is the only solution.) or if the second equation is 2x+7y=10, then [1/3 , 4/3] is the solution.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [June 25, 2017, 2:45pm UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/18 "2017-06-25T14:45:23Z")

</div>

> [@Dr.Strangelove](#):
>
> You need to set up a system of equations. There are, by my count, 26 unknowns, which means you need 26 equations…  
> If there were only two meals and two items per meal, the matrix might look like:  
> [1 0 1 0]  
> [1 0 0 1]  
> [0 1 1 0]  
> [0 1 0 1]
> 
> Inverting the matrix… could even be done by hand, though it would be tedious and error-prone. I would use Wolfram Alpha.

As OP seems herself to have guessed, _this will not work_. The matrix you construct — indeed your own example — is _ **singular.** _ Stated differently: there will be infinitely many solutions until you have at least 4 known values.

I might approach such a problem by searching the scripts on the webpage itself. For those agile with, e.g., Chrome’s Developer tools this might be easy. But for me it would be like being a mouse in a tedious maze, with too little cheese at the end.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [June 25, 2017, 3:01pm UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/19 "2017-06-25T15:01:54Z")

</div>

From what I’ve been able to figure out, the caloric range on this quiz seems to be 1370-3710. The single most penalizing item there is the guac and dip, adding 620 calories over the least caloric choice (the fruit parfait) in that category.

I’m not 100% positive my chart is correct, as I did find a couple errors where I clicked on the wrong item without noticing it until I double checked it.

---

<div class="post-metadata">

**Author:** ![chrisk](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@chrisk](https://boards.straightdope.com/u/chrisk)\
**Post date:** [June 25, 2017, 3:07pm UTC](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810/20 "2017-06-25T15:07:04Z")

</div>

> [@Biggirl](#):
>
> What?

That’s a reference to Scott Pilgrim, both the graphic novels and the movie: “Bread makes you fat.” 😉

[Next page](https://boards.straightdope.com/t/how-would-you-math-the-shit-out-of-this/789810.md?page=2)
