Ways to select donuts

21k Views Asked by At

Wanted to share this puzzle: A restaurant offers choice of six different types of donuts, each available in unlimited quantity. How many ways can you select three donuts? You can pick any number of donuts of each type. For answer, hover your mouse above the text below.

Answer: 56

3

There are 3 best solutions below

0
On BEST ANSWER

There are ${6 \choose 1} = 6$ ways of choosing a set of three donuts using only one variety.

If there are two varieties used in a set of three donuts, one of the three has one variety, and the remaining two have a different variety. There are ${6 \choose 1} = 6$ ways of choosing the first variety and ${5 \choose 1} = 5$ ways of choosing the second variety. Therefore there are $6\times 5 = 30$ ways of choosing three donuts using precisely two varieties.

Finally, there are ${6 \choose 3} = 20$ ways of choosing a set of three donuts using precisely three varieties.

Therefore, there are $6 + 30 + 20 = 56$ ways of choosing a set of three donuts.


Note, the reason why we can't use the binomial coefficient to calculate the number of sets of three donuts when precisely two varieties are used is that there is no symmetry between the two varieties. That is, swapping the order of the varieties gives a different set of three. For example, a set of three could be Chocolate, Sprinkles, Sprinkles; swapping the varieties we have Sprikles, Chocolate, Chocolate, which is a different set of three. In the one and three varieties case, we can use the binomial coefficient because swapping the varieties does not lead to different sets of three.

0
On

This means that n = 6 and k = 3, you'll calulate the number of combinations using this formula:

$$\left(\binom{n}{k}\right) = \binom{n+k-1}{k}$$

In this case that would be:

$$\binom{6 + 3 - 1}{3} = \binom {8}{3} = 56$$

1
On

If you consider ordered triplets, then you have $6$ choices for the first, then again other $6$ for the second and still $6$ for the third, summing up to $6^3=216$.

If instead you are looking for unordered triplets (i.e. where "aab" and "aba" are the same outcome), then either you know the formula with binomial coefficients, which is $$ \binom{6+3-1}{3} = 56 $$ or you count as follows: the outcome contains exactly either $3$, $2$ or $1$ different types of donuts.

In the first case you have $6\cdot 5\cdot 4$ ordered triplets, and since order doesn't count you divide by the number of different permutation of $3$ different elements, i.e. $3!=6$. Therefore in the first case you have $6\cdot 5\cdot 4 / 6 =20$ possibilities.

In the second case you have $6$ choices for the single donut and other $5$ for the couple of the same type, resulting in $6\cdot 5$ ordered triplets. Now you have to divide by the number of permutation of $2$ different elements which is $2!=2$, resulting in $6\cdot 5/2=15$ possibilities.

If the $3$ donuts are all of the same type, then it is trivial that you have exactly $6$ other choices.

Therefore $30+20+6=56$ as stated in the binomial formula.