Three dice are thrown simultaneously. How many combinations of numbers allow the sum to be $12$?

183 Views Asked by At

I found this question in a text book and solved it listing the possible sums:

$6,1,5$ gives $3!=6$

$6,2,4$ gives $3!=6$

$6,3,3$ gives $\frac{3!}{2!}=3$

$5,5,2$ gives $\frac{3!}{2!}=3$

$5,4,3$ gives $3!=6$

$4,4,4$ gives $\frac{3!}{3!}=1$

Then I just add up everything $3\times6+2\times 3+1=25$. And I know that's the answer but the thing is the book suggest a solution using inclusion-exclusion principle. The suggestion goes something like this:

The problem is equivalent to find all positive integer solutions of the equation $a_1+a_2+a_3=12$ (which is clear for me) with $a_1, a_2, a_3 \in \{1,...,6\}$ which we can rewrite as $x+y+z=9$ (why?) with $x,y,z \in \{0,...,5\}$ and subtract the solutions where at least one variable is greater than $5$.

I don't get why it's necessary to change the equation. How do I find this sums that are not $12$ using this method?

In this similar question: Rolling dice such that they add up to 13 — is there a more elegant way to solve this type of problem? OP gives a similar solution as mine but @user940 gives some suggestion that I found quite similar to the one in the textbook but I do not understand all his reasoning. I don't know much about generating functions yet so any help that leads me to understand the solution using the suggestion is greatly appreciated.

1

There are 1 best solutions below

0
On

Original problem: $$a_1+a_2+a_3=12; a_1, a_2, a_3 \in \{1,...,6\}.$$

Let $x=a_1+1,y=a_2+1,z=a_3+1$, then the transformed problem: $$x+y+z=9; x, y, z \in \{0,...,5\}.$$ The inclusion-exclusion: from 1) the choices for $0\le x,y,z\le 9$ subtract 2) the choices for $6\le x\le 9, 0\le z,y\le 3$ or its permutation.

1) Using Stars and Bars, it is: ${9+3-1\choose 3-1}=55$.

2) Let $x=t+6$, then the transformed problem: $$t+y+z=3; 0\le x,y,z\le 3.$$ Using Stars and Bars, it is: ${3+3-1\choose 3-1}=10$, which is multiplied by $3$ (the number of variables).

Hence, the final answer is: $55-3\cdot 10=25$.