I've read over the theory countless times, and I still have no idea how to think of it.
The formula for the combinations of multisets is $C(k + r - 1, r)$, where $k$ = the number of distinct elements, and $r$ is the $r$-combinations required.
Let's use an example.
If I have the set $S = \{2 \text{ of } 1, 1 \text{ of } 2, 1 \text{ of } 3\}$.
The possible combinations would simply be 1123, 1132, 1231, 1213, 1321, 1312, 2113, 2131, 2311, 3112, 3121, 3211
Which would equal to $12$.
But according to the formula, this should be $C(3 + 4 - 1, 4)$, or $C(6,4)$, or $15$.
Did I do something wrong here?
How do I fix this?
Can someone explain how this formula is derived?
Thanks! Baggio.
That's not the formula for what you're counting. You want the multinomial coefficient
$$ \pmatrix{r\\r_1,\dotsc,r_k}=\frac{r!}{r_1!\cdots r_k!}=\frac{4!}{2!1!1!}=12\;. $$
For explanations, see the "Interpretations" section of the article.