[Math] A combination of three dice

binomial-coefficientscombinatoricsdice

It there any formula for calculating dice combinations? For example, for hex-dice, when I roll one die there are six possible results. If I do the same with two dice there are 21 results instead possible 36 because “$1$” with “$2$” is the same as “$2$” with “$1$”. For three dice, there are $6^3 = 216$ combinations, but how many non-repeatable combinations are there? What about $n$ dice?

Best Answer

Notice that you determined $$\binom{n+k-1}{k}=\binom{6+2-1}{2}= \binom{7}{2}= \frac{7!}{5! 2!}= \frac{7 \cdot 6}{2}=7 \cdot 3 = 21$$.

Do you know how to generalise this?

The idea comes from the stars and bars problem, at our university we call it the egg-painting problem (it has something to do with Easter) Suppose we denote the $k$ objects, say eggs, we wish to dye with $n$ colours. We want to find all solutions to the equation:

$$x_1 +x_2 \dots x_n =k $$ Where the $x_i$ denotes which of the $n$ colours we used. and how many. The total number should sum up to the number of eggs. We can also visualise this as follows: there are $n$ buckets, where we just drop a certain amount of eggs in. We denote the walls of the buckets by $1$ and we denote the eggs by $0$. a possible scenario could be: $$ 0000100$$

This resembles $6$ eggs dyed with $2$ colours. 4 are in the left bucket, two are in the right bucket. In how many ways can we make such an arrangement? Yo already answered this. This is the amount of combinations we can have where two dice can be placed into six boxes of "face numbers". That was equal to $21$.

We need to place $n+k-1$ symbols, because if we place $n-1$ walls as observed above, we still need to place $k$ eggs in buckets of paint. So given the walls, we either place $k$ zeros or given the eggs, we place $n-1$ ones amongst them (the walls). This will give us the identity:

$$ \binom{n+k-1}{k}=\binom{n+k-1}{n-1} $$

Also see: https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics)