When someone hits a new PR at Asheville Strength we tell them to go get a PR-Milkshake from Cookout. Of course, PR’s are recursively acquired. In order to hit PR’s regularly you need more milkshakes 😉
Given that, Tamara and I went to Cookout last night and I got a milkshake.
The sign says they have 40 flavors. However, that’s misleading because you are allowed to make your own flavor by combining any of the 40 flavors.
How many total possible flavors can be made by combining the 40 Cookout milkshake flavors?
Let’s go through it. Say I wanted to make one with ALL the flavors at once! How many ways can I TAKE 40 options from a list of 40? Just one.
Now, what if I wanted to make a milkshake with 15 flavors in it. How many ways can I take 15 options from a list of 40? That’s less obvious… Wouldn’t it be nice if there was a simple math formula you could just plug the numbers into and get answer? There is!
Just a Taste
To get a feel for how to compute this for arbitrary numbers, lets take an easier case.
Assume you have 3 colored marbles: pink, green, blue. How many sets of 2 can you take from it?
- pink and green
- green and blue
- pink and blue
There are 3 ways you can take 2 marbles out of set of 3.
Combination: n-flavors, choose k
We call a k-combination a collection of k elements from a larger set of n elements. So in the marble example above, a 2-combination was a collection of 2 marbles from the original set of 3 marbles.
In math, this has the nifty notation:
Which we read as “n choose k”. And this expands out to the following equation that you can use to calculate the answer:
Where is .
Shake it Like a Binomial Coefficient
To choose some smaller set (flavor combination) from the possible 40 milkshake flavors is just a matter of applying the theorem.
Starting from the beginning again, let’s make a milkshake with 40 flavors. How many possible options do we have? By applying the theorem we get:
Don’t worry! You are not about to divide by zero, LOL.
Since , we get to cancel the from the top and bottom, leaving us with .
How about the other way around? What if wanted to know how many ways we can make a milkshake with only 1 flavor. While the answer is obvious, it’s still good to do the obvious cases with the formula just to see how it works:
Which simplifies down to
How About 2-Flavors?
We’ll start slow and imagine what happens when we choose 2. How many possible milkshakes can be made using 2 flavors out of 40?
Which can be broken down to
Which becomes .
Wow! You could go every day for 2 years, getting a different 2-combination of milkshake flavors and still have not gotten through them all!
Go Big Or Go Home
Let’s take something in the middle.
How many possible milkshakes can be made by using 15 flavors out of the 40?
Holy Bojangles! (… I mean, Cookout!) That’s a fuck-shit-ton of possible ways to make a milkshake! 40,225,345,056…
Putting It All Together
To get the total number of possible k-combinations (possible milkshake flavors using k options) means that we have to ADD together the results of EACH ONE of these cases. There are 40 of them. Given how large the last one was, that will give you hint of how large the total will be!
I’m not going to bother with doing them all, I’d rather just go drink a milkshake! But now you have the tools to do it yourself if you choose (… k).
Now go lift something heavy,