15
$\begingroup$

I was at a restaurant that allows you to build your own custom burger. I got bored and started to work out how many possible combinations of burger there could be. After figuring that out and sharing the number with a friend he wondered how much it would cost you if you were to order every possible combination. This is where I got stuck.

Ignoring all the options that don't affect the price here's the basic menu:

  1. Choose either one (\$7.99) or two (\$9.48) patties.
  2. Choose from 7 cheeses \$0.89 each
  3. Choose from 10 hot toppings \$0.99 each
  4. Choose from 3 premium toppings \$1.49 each
  5. Choose from 4 cold toppings \$0.39 each

I've been mulling it over in my head for a few days and I can't really figure out a good way to go about it. The best thing I've come up with so far is to pick a category and find out the total to try all combinations in that category using $\sum _{i=1}^m \binom{m}{i} c i$ where $c$ is the cost per item and $m$ is the total number of items to choose from. Then taking that and multiplying it by all the other possibilities created by the other categories.

Please forgive me if I'm missing something obvious or screwed something up, my formal schooling doesn't extend much beyond algebra and that was a decade ago.

$\endgroup$
5
  • $\begingroup$ Does every valid combination have one cheese, one hot topping, one premium topping, and one cold topping? $\endgroup$ Commented Oct 11, 2013 at 12:56
  • 4
    $\begingroup$ From each of those categories you could choose all, none, or anywhere inbetween. For example, you could have 3 cheeses and 2 hot toppings but no cold or premium toppings. You could also just order a plain one patty burger with nothing on it. $\endgroup$ Commented Oct 11, 2013 at 13:08
  • 3
    $\begingroup$ Eight bucks for a hamburger patty? I hope it's a prime cut. $\endgroup$ Commented Oct 11, 2013 at 14:57
  • 1
    $\begingroup$ This is one of the most important questions yet asked. $\endgroup$
    – Amory
    Commented Oct 11, 2013 at 17:55
  • $\begingroup$ So is one of the toppings a slab of vanilla ice cream? I’ve actually seen that, at a place called (if I remember correctly) the Elegant Elephant, near UC Irvine back in $1969$. $\endgroup$ Commented Oct 12, 2013 at 8:55

3 Answers 3

13
$\begingroup$

Here's an alternative way to justify Thomas Andrews' calculation without appealing to averages:

Order all burgers in pairs containing one selection and its exact opposite. The total cost of each such pair is $$7.99 + 9.48 + 7\cdot 0.89 + 10\cdot 0.99 + 3\cdot 1.49 + 4\cdot 0.39 $$

To count the number of different pairs, identify each pair by its one-patty member. There are $2^{7+10+3+4}$ different one-patty burgers, so this is also the number of pairs.

$\endgroup$
2
  • $\begingroup$ +1, But then if you add a third patty option - the option of three patties, say, the average technique is going to still work, while this technique is going to have a problem. $\endgroup$ Commented Oct 11, 2013 at 13:22
  • $\begingroup$ @Thomas: Yeah, it only works as long as all choices are binary. $\endgroup$ Commented Oct 11, 2013 at 13:25
11
$\begingroup$

The average cost of a burger is easy to compute - it will be $$\frac{(7.99+9.48) + 7\cdot 0.89 + 10\cdot 0.99 + 3\cdot 1.49 + 4\cdot 0.39}2$$

The number of burgers is $2\cdot 2^7\cdot 2^{10}\cdot 2^3 \cdot 2^4$.

Now multiply.

Assuming you are allowed to choose "none" for the non-burger options.

$\endgroup$
4
  • $\begingroup$ Just shy of $1 Billion. Or ~1/30 of McDonalds turnover! $\endgroup$
    – Morphed
    Commented Oct 11, 2013 at 13:43
  • $\begingroup$ Not sure whether I'd call $665$ million "just shy." But maybe I messed up the calculation. $\endgroup$ Commented Oct 11, 2013 at 13:59
  • $\begingroup$ Opps, you're right, I made a mistake: WolframAlpha $\endgroup$
    – Morphed
    Commented Oct 11, 2013 at 14:06
  • $\begingroup$ You have 0.392 in that Wolfram Alpha link, so you got a slightly higher answer than I did. The exact total I got was $664,881,070.08$. $\endgroup$ Commented Oct 11, 2013 at 14:39
-4
$\begingroup$

So easy - too much work done above $$2 \times 2^7 \times 2^{10} \times 2^3 \times 2^4$$ Because except for the burger size (pick one or the other), you have to answer yes or no for each of the other add-ons, so $2^7$ means that you could have no cheese, one cheese, two cheeses, etc... up to $7$ cheeses... and so on.

Answer: $33,554,432$ ways

$\endgroup$
1
  • 1
    $\begingroup$ You have to work out the total cost not the number of ways (why do people downvote rather than point out the mistake?) $\endgroup$ Commented Dec 31, 2014 at 4:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .