# Three dice are rolled simultaneously. In how many different ways can the sum of the numbers appearing on the top faces of the dice be $9$?

Three dice are rolled simultaneously. In how many different ways can the sum of the numbers appearing on the top faces of the dice be $$9$$?

What I did:
I know that the maximum value on the dice can be $$6$$. So, restricting the values of dice, $$6-x+6-y+6-z=9$$, $$x+y+z=9$$, $$n=9$$ and $$r=3$$.

Applying partition again: $$\binom{9+3-1}{3-1}=\binom{11}2=55$$

But the answer is $$25$$. Please, someone explain this one.

This is a gmat exam question.

• This example is sufficiently small that it is easy to just write the $6$ posibilities down. There are $\color{blue}{6}$ ways to roll $\{1,2,6 \}$,$\color{blue}{6}$ ways to roll $\{1,3,5 \}$,$\color{blue}{3}$ ways to roll $\{1,4,4 \}$,$\color{blue}{3}$ ways to roll $\{2,2,5 \}$,$\color{blue}{6}$ ways to roll $\{2,3,4 \}$,$\color{blue}{1}$ way to roll $\{3,3,3 \}$. So $\color{blue}{6+6+3+3+6+1}= \color{red}{25}$ ways (in toto). – Donald Splutterwit Sep 23 '17 at 13:11
• what if there are 4 dices? so that is why i was asking about partition method @DonaldSplutterwit – Cruzi Seku Sep 23 '17 at 13:16
• \begin{eqnarray*} [x^\color{blue}{9}]:(x+x^2+x^3+x^4+x^5+x^6)^\color{red}{3} \end{eqnarray*} & get reduce or Wolfram alpha to calculate this. – Donald Splutterwit Sep 23 '17 at 13:21

In these types of problems, it is not too hard to just consider case by case. Let's list out all the possibilities and how many ways to reorganize them: $$1,2,6 \rightarrow 3!=6 \text{ ways}$$ $$1,3,5 \rightarrow 3!=6 \text{ ways}$$ $$1,4,4 \rightarrow 3!/2!=3 \text{ ways}$$ $$2,2,5 \rightarrow 3!/2!=3 \text{ ways}$$ $$2,3,4 \rightarrow 3!=6 \text{ ways}$$ $$3,3,3 \rightarrow 3!/3!=1 \text{ way}$$ So in total there are $25$ ways to get a sum of $9$. If you want the probability, just take this over the total number of possibilities and you get $25/6^3 = 25/216$.

What you did also counts solutions where $x,\,y,\,z$ can be $0$ as well, but that can't happen with dice.

You should do this for $$(x-1)+(y-1) + (z-1) = 9 -3,$$ i.e. $$x'+y'+z' =6$$ because it is now ok to have $x', y'$ or $z'$ to be $0$.

Now we get $\binom{6+3-1}{3-1} = 28.$ But, this is wrong as well, because $x',y',z'\leq 5$, so if we discard the three solutions where one of the $x', y', z'$ is equal to $6$, we get exactly $25$ ways.

• But, this is wrong as well, because x−1,y−1,z−1≤5x−1,y−1,z−1≤5, so if we discard the three solutions where one of the x−1,y−1,z−1x−1,y−1,z−1 is equal to 66, we get exactly 2525 ways. @Ennar Didn't understand this part – Cruzi Seku Sep 23 '17 at 13:23
• @Cruzi Seku, we know that $x,y,z\leq 6$, so $x-1,y-1,z-1\leq 5$. But, writing $\binom{6+3-1}{3-1}$ also counts solutions $(6,0,0)$, $(0,6,0)$, $(0,0,6)$ which can't happen with dice because there is no face with $7$ on it. – Ennar Sep 23 '17 at 13:27
• there is no face with 7 on it. I did not understand this part. But you said that solutions are (6,0,0),(0,6,0) and (0,0,6).Where is 7? @Ennar – Cruzi Seku Sep 23 '17 at 13:43
• Oh, ok, I haven't written it explicitly, sorry, I'm thinking of substitution $x' = x-1$, $y' = y-1$, $z' = z - 1$ and solutions of $x'+y'+z' = 6$. If, for example, we counted solution $(6,0,0)$ that would imply that $x = 7$. @Cruzi Seku. – Ennar Sep 23 '17 at 13:45

We must find the number of solutions of the equation $$x_1 + x_2 + x_3 = 9 \tag{1}$$ in the positive integers subject to the restrictions that $$x_1, x_2, x_3 \leq 6$$.

A particular solution of equation 1 in the positive integers corresponds to the placement of $$3 - 1 = 2$$ addition signs in the $$9 - 1 = 8$$ spaces between successive ones in a row of nine ones. $$1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1$$ For instance, placing addition signs in the third and seventh spaces yields $$1 1 1 + 1 1 1 1 + 1 1$$ which corresponds to the solution $$x_1 = 3$$, $$x_2 = 4$$, $$x_3 = 2$$.

The number of solutions of equation 1 in the positive integers is $$\binom{9 - 1}{3 - 1} = \binom{8}{2}$$ since we must choose which two of the eight spaces between successive ones to fill with addition signs.

However, we have included solutions in which some $$x_i > 6$$. Since the summands are positive integers, this can only occur if one of the $$x_i$$'s is $$7$$ and the other two $$x_i$$'s are $$1$$. There are three choices for which $$x_i$$ is equal to $$7$$. Hence, the number of ways the sum of the numbers on the three dice could add up to $$9$$ is $$\binom{8}{2} - \binom{3}{1}$$

We can formalize the argument about the restrictions as follows. Suppose $$x_1 > 6$$. Then $$x_1' = x_1 - 6$$ is a positive integer. Substituting $$x_1' + 6$$ for $$x_1$$ in equation 1 yields \begin{align*} x_1' + 6 + x_2 + x_3 & = 9\\ x_1' + x_2 + x_2 & = 3 \tag{2} \end{align*} Equation 2 is an equation in the positive integers with $$\binom{3 - 1}{3 - 1} = \binom{2}{2}$$ solutions. By symmetry, the number of solutions of equation 1 in which $$x_1 > 6$$ is equal to the number of solutions in which $$x_2 > 6$$ and to the number of solutions in which $$x_3 > 6$$. Hence, $$\binom{3}{1}\binom{2}{2}$$ solutions of equation 1 violate the restrictions. Therefore, the number of admissible solutions is $$\binom{8}{2} - \binom{3}{1}\binom{2}{2}$$