It was 6:12 PM EST. We were eating dinner on our deck. My sister messaged me. She had a very important question. Her and her colleagues were in a heated debate. Just how many topping combinations were there at Cleveland’s fun hot dog restaurants Happy Dog? I know, right? This is a big deal. Could I swoop in and save the day? Yes. Er, well, with the help of my trusty sidekick Google Sheets I could. (Excel would have worked, but what if I need to access the calculations on the go? or share them? Yup, I made the right choice. gSuite’s trusted cloud-based spreadsheet is the way to go here.)
So, I got the details. There are 50 toppings possible. No limits (you can do all 50, as my oldest son might choose) or minimums (0 toppings, as my youngest son prefers them, counts too). Variations on the dog (veggie? black bean!?) or bun (bleck, wheat?) were to be ignored.
I set right to it. I picked a trusty Google Sheets formula – Combin – and got to work. That formula deals with a common mathematics formula that finds the number of combinations of something. You need only know two things – how many possible things and how many are to be chosen (i.e., 50 toppings choose 1, 50 toppings choose 2, etc.). Now, don’t get this mixed up with permutations where order matters, because no one cares if you go peanut butter, sriracha, alien relish or alien relish, peanut butter, sriracha or … well … you get it.
COMBIN(n, k) where n is the size of the pool of objects to choose from and k is the number of objects to choose.
The rest is history. Check it out in the GIF below.
Oh yeah, I almost forgot to tell you the answer: 1,125,899,906,842,620 – one quadrillion, one hundred twenty-five trillion, eight hundred ninety-nine billion, nine hundred six million, eight hundred forty-two thousand, six hundred twenty combinations.
Side note to math teachers: I love how the numbers are symmetrical (i.e., there are 1,225 different 2-topping dogs and 1,225 different 48-topping dogs). Could be a great discussion with math students.
Now, here’s how I did it: