Me and the generating functions – dice, probability (Introductory)

combinatoricsgenerating-functionsprobability

"Five regular dice are rolled. What is the probability that the sum of the five numbers shown is equal to 14?"

This problem is not specifically ment to be solved with a generating function, but since I've just read about generating functions (the basics) I figured that I should try anyways, and that only got me so far…

My approach using Generating functions:

Each die can give the numbers $1$$6$, and we have $5$ dice which gives our generating function:

$G(x)=$ ($x+x^2+x^3+x^4+x^5+x^6$)$^5=x^5$($1+x+x^2+x^3+x^4+x^5$)$^5$

Next, we are going to utilize the expression whose Taylor Expansion yields $(1,x,x^2,x^3,…)$, which is $(1-x)^{-1}$, and rewrite our generating function as if we were dealing with this infinite series instead:

$G(x) = x^5(1-x)^{-5}$

This i reckon is done primarily so that we handle binomials instead of series, for which we have powerful formulas for finding coefficients. We can do this because the use of Taylor Expansions "back and forth" do not affect the coefficients(?).

To compute the probability we need to divide the number of ways the sum $14$ can appear, with the number of ways any sum $5$$30$ can appear. I.e. we are going to compute:

$$\frac {[x^{14}]G(x)}{\sum_{i=5}^{30} [x^i]G(x)}.$$

By the Binomial Theorem we know the coefficent is the same as $C(n,k)a^{n-k}b^k$; for our numerator $[x^{14}]G(x)=[x^{9}](1-x)^{-5}$, we have $a = 1, b = -x, n = -5, k = 9$, so the coefficinet is:

$C(n,k)a^{n-k}b^k$$=$$C(-5,9) 1^{(-5-9)} (-1)^{-9}=-C(-5,9)=C(13,9).$

Similarly we get $\sum_{i=5}^{30} [x^i]G(x)=\sum_{i=1}^{25} C(-5,i)(-1)^{i}$ and so we should have the answer after dividing. However, when i compute the probability with the use of Wolffram alpha, I get $715/142505$ which is around $0.5$%, whereas the desired answer is approximately $7$%.

I believe that my mistake is that I have assumed the dice to be distinguishable, which they appear not to be, and so now I can't figure out how to adjust the formula so that it gives the correct answer. That is, if it is possible to formulate a "multichoose combination scenario" with generating functions. Furthermore, I am new to generating functions so it would be nice if you explained your answer thoroughly, any thoughts regarding improvements are appreciated aswell. Thanks in advance.

Best Answer

What you did at the very beginning is correct, and leads to the correct answer.

$[x^{14}](x+x^2+x^3+x^4+x^5+x^6)^5=540$
See https://www.wolframalpha.com/input/?i=Coefficient((x%2Bx%5E2%2Bx%5E3%2Bx%5E4%2Bx%5E5%2Bx%5E6)%5E5,x%5E14)

Then $${540\over6^5}=.06944444444$$ is the probability.

I don't understand what you did after the first paragraph of your question. I think you may have wanted to do something like

$$(1+x+x^2+x^3+x^4+x^5)^5=\left({1-x^6\over1-x}\right)^5=\left(1-x^6\right)^5(1-x)^{-5}$$ so that $$G(x)=x^5H(x)J(x)$$ where $H,J$ can be computed by the binomial formula. As it is, you've replaced $G$ by some other function.

What you say at the end about the dice perhaps not being distinguishable is also confusing. The dice are distinguishable, as you have assumed. I don't know what the problem would mean if the dice weren't distinguishable. How could they show different numbers?

Related Question