Choosing $12$ donuts from $20$ kinds of donuts

combinationscombinatorics

original question: A donut shop offers $20$ kinds of donuts. Assuming
that there are at least a dozen of each kind as you enter the shop, in
how many ways can you select a dozen donuts?

The correct answer is: ${}^{31}C_{19}$

I think we can assume that there are $20$ boxes and $12$ balls so that there are $19$ lines and It means choosing $19$ or $12$ from $31$. Is what I think correct?

In addition, I wonder the original question said 'assuming at least a dozen of each kind as you enter the shop'.

Best Answer

You are actually asked to find the cardinality of the set:$$\left\{(a_1,\dots, a_{20})\in\mathbb Z_{\geq0}^{20}\,\middle|\, \sum_{i=1}^{20}a_i=12\right\}$$ Here $a_i$ stands for the number of selected donuts that are of kind $i\in\{1,\dots,20\}$.

This can be done by application of stars and bars and indeed leads to outcome $\binom{12+19}{19}=\binom{31}{19}$.

It seems that your "lines" agree with "bars" and your "balls" with "stars", and that your thinking about this is correct.

If there would be less than a dozen donuts of some kind, e.g. there are $10$ of kind $5$ then extra condition $a_5\leq10$ would arise (making things more complex).