Down the street from where I live is a pizza place that also serves shakes. What is notable is that there are 18 flavors, and they allow the customer to combine shake flavors in any way the want. Every time I go in, I wonder how many possible shakes there are. I searched the combinatorics literature, and didn't find one equation that would answer this problem. So I needed to invent one.

My starting point was the “choose” function. This is for calculating total combinations without repetition. The formula is , where n is the number of objects from which you can choose and k is the number of objects to be chosen. If we were to calculated 18 choose (2), this would tell us how many two-flavor shakes can be made with 18 flavors. But we want to know how many combinations there are if you can choose between 1 and 18 of the eighteen flavors. So we need to add 18 choose functions.

At this point someone pointed out to me the “vanilla” isn't really a flavor, because it is just the ice cream with no flavor added. So I modified it to 17 elements, but choosing 0 is valid.

So we calculate and the answer is 131,072. Consider the implications. You could have a different shake every day for almost 359 years. Or 359 shakes a day for one year.

Something for the math-clever among you to consider: If we replace k in formula two with 18, the result doubles. Why is it that increasing the number of elements by one always doubles the result? (Also, does anyone know a better way to write formulas in blogger?)

## 1 comment:

It has been brought to my attention that 131,072 is 2^17. Which, upon reflection, makes perfect sense. We can think of each shake flavor as a bit that can be on or off. How many possible states are there? 2^17=131,072. So the number of possible shakes is always two, to the power of how many flavors there are. This is much simpler than the original formula I came up with, but somehow less satisfying.

Post a Comment