Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This idea resulted while I heard an advertisement for Sonic, where they claim to have something like 300,000 different drinks they serve.

Essentially, what they are allowing you do to is mix any soda to create your own "unique" drink.

As such, it made me curious how to calculate the number of "unique" drinks you make.

Let's say you have 4 sodas (soda: A, B, C, and D) and you want to find out the total number of unique drinks you can make by using any number of those sodas mixed together.

Is the answer just 4! (4 Factorial)?

The answers would include:

  • A
  • B
  • C
  • D
  • AB
  • AC
  • AD
  • BC
  • BD
  • CD
  • ABC
  • ABD
  • ACD
  • BCD
  • ABCD
share|cite|improve this question
up vote 2 down vote accepted

$4! = 24$ but you only have $15$ possibilities in your list so something is wrong. In fact you have $2^4 -1$, and the reason is that each of the $4$ ingredients can be in or out giving $2$ possibilities four times, hence $2 \times 2 \times 2 \times 2$. But having no ingredients at all does not count, so you have to subtract $1$.

This works in general, so with $n$ possible ingredients you would get $2^n - 1$ possibilities. There might be more or fewer, if for example you could have double concentration of a particular ingredient, or if some mixtures were not allowed.

share|cite|improve this answer

It would be $2^n-1$ where $n$ possible drink flavors can be added. Although, I think it's important to note that the proportions of the ingredients in recipes can have a huge effect on the actual taste so the potential could be much larger.

In the simple case, where we ignore the proportions, the options are to include or not include each drink flavor and so this doubles the possible options for each drink added. However, I subtract one because one of the options is to not include any of the drinks at all i.e. not to buy a drink (and this doesn't count as a possible drink flavor).

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.