TITLE: Ordering Balls of $N$ Types
QUESTION [1 upvotes]: Given $a_n$ balls of type $n$ (for each $n$ between $1$ and $N$) how many ways of ordering them into an array of length $\sum_n a_n$ given that balls of the same type are indistinguishable?
(Edit: some of the $a_n$'s may be null).

REPLY [0 votes]: This is a multiset permutation; the possible ordering options are: $$\frac{\left( \sum_n a_n \right)!}{\prod_n{a_n!}}$$
And note that $0!=1!=1$, so if all elements are unique this works back to $\left(\sum_n a_n\right)!$ as expected.
{"set_name": "stack_exchange", "score": 1, "question_id": 2075106}