Calculate the probability that, when we throw $5$ dice, their sum is $18$. To do this, I figured I need to know how many solutions does this diophantine equation have: $$\left \{\begin{array}[c] xx_1+x_2+x_3+x_4+x_5=18 \\ 1\leq x_i \leq 6 \end{array} \right \}$$ (Then I calculate the probability knowing that the total amount of possible outcomes is $6^5$). However I don't know how to calculate the amount of solutions of the equation. Can someone help me?
Asked
Active
Viewed 128 times
0
-
Here is a similar problem. – saulspatz Jun 13 '20 at 00:34
-
And here is a simpler one. – saulspatz Jun 13 '20 at 01:08
1 Answers
2
Here an approach by generating functions:
The numbers of solution with the given constraints is $$[x^{18}](x+\cdots+x^6)^5.$$ Thus, \begin{align} [x^{18}](x+\cdots+x^6)^5 &=[x^{18}]x^5(1+x+\cdots+x^5)^5\\ &=[x^{18}]x^5\left(\frac{1-x^6}{1-x}\right)^5\\ &=[x^{18}]x^5(1-x^6)^5\sum_{n=0}^\infty\binom{n+4}{4}x^n\\ &=[x^{13}](1-x^6)^5\sum_{n=0}^\infty\binom{n+4}{4}x^n\\ &=[x^{13}](1-5x^6+10x^{12})\sum_{n=0}^\infty\binom{n+4}{4}x^n\\ &=\binom{17}{4}-5\binom{11}{4}+10\binom{5}{4}\\ &=780. \end{align}
Thus, the numbers of solutions is 780.
-
I took the liberty of correcting a small typo. You had typed an exponent of $6$ when you meant $5$. – saulspatz Jun 13 '20 at 05:23
-
-
@fdez I consider only the terms with exponent $x^13$, thus, after doing the products, we conclude that these are the only terms with such exponents. Here in MSE there are many question solved by using generating funciotns, I recommend you visit some of these topics. – DiegoMath Jun 14 '20 at 04:25