0
$\begingroup$

The number of possible outcomes adding up to $18$ in the experiment of tossing $3$ fair $6$-sided dice is $1$ - all dice showing $6$ or $(6,6,6).$

However, if I try to use generating functions, I am probably making a mistake somewhere...

$$G(x) = (x^1 + x^2 + x^3 + \cdots)^3=x^3(1 + x + x^2 + x^3+\cdots)^3=\frac{x^3}{(1-x)^3}$$

Now to extract the coefficient for $x^{18}$ of the series $(1 + x + x^2 + x^3+\cdots)^3$ the formula would be $\binom{18+3-1}{18}$. However, because there is an $x^3$ factored out, I would assume the correct formula would be:

$$\binom{18 - 3 +3 -1}{18-3}=\binom{17}{15}$$

which is different from the expected $1.$

What am I doing wrong?

  • 1
    Your dice have a maximum value of six., you cannot have a die with a value of, say, 15... so your generating function is counting outcomes such as $(15,2,1)$ and $(1,16,1)$ etc... despite these not being possible results. The pieces used in the generating function should represent the possibilities for each die individually. Since you can only get a $1,2,3,4,5,6$ on a d6 each piece should be $(x+x^2+\dots+x^6)$ and should not continue indefinitely as you currently have it.2017-01-09
  • 0
    @JMoravitz Thank you! I can't use power series, then...2017-01-09
  • 0
    @JMoravitz How do you extract the coefficients of interest?2017-01-09

1 Answers 1

2

The problem is that the infinite power series allows you to select partitions like $(9, 5, 4)$. You need to consider up to $x^6$ for each die, and not further. This finite restriction will make the numbers work out.

So:

$$G(x) = (x + x^{2} + \ldots + x^{6})^{3} = \left( \dfrac{1-x^{7}}{1-x} \right)^{3}$$

Edit: Recall that $(1-x^{7})^{3}$ can be expanded by the binomial theorem, and you are already familiar with the expansion of $\dfrac{1}{(1-x)^{3}}$. Now:

$$\left( \dfrac{1-x^{7}}{1-x} \right)^{3} = (1-x^{7})^{3} \cdot \dfrac{1}{(1-x)^{3}} = \left( \sum_{n=0}^{3} (-1)^{n}x^{7n} \right) \cdot \left( \sum_{n=0}^{\infty} \binom{n+3-1}{n} x^{n} \right)$$

Now by foiling out, deduce the coefficient of $x^{18}$.

  • 0
    Makes a lot of sense, but how do you extract the coefficient of interest?2017-01-09
  • 0
    @AntoniParellada Brute force multiplication seems like a convenient approach. This is easily handled by computers. For this specific case though, we can see by inspection the result though that the coefficient of $x^{18}$ is $1$ since the only combination of terms resulting in $x^{18}$ is using $x^6$'s from each parenthesis. Having used anything other than an $x^{6}$ in any parenthesis results in a power strictly less than $x^{18}$.2017-01-09
  • 0
    @JMoravitz Sure, I chose $18$ for this reason. But for other coefficients, what command would you give to, say, Wolfram Alpha, or R?2017-01-09
  • 0
    @AntoniParellada Using ml0's notation, $\frac{d^{18}}{dx^{18}}[\frac{1}{18!}\cdot G](0)$ or simply have it write out $G(x)$ in full and look at the $x^{18}$ term manually2017-01-09
  • 0
    @JMoravitz I can't follow. Do you have a reference?2017-01-09
  • 0
    @AntoniParellada Look at what happens if you repeatedly take the derivative of a generating function. Any terms of a lower power than what you want to look at will be zeroed out when taking the derivative. Any terms of a higher power than what you want to look at will be zeroed out when you plug in $x=0$. The only term that survives is the term of the power you want but will need to be rescaled due to the effect of the derivatives repeatedly pulling down the power to be multiplied to the coefficient.2017-01-09
  • 0
    @JMoravitz Thank you. It's like a Taylor series... I see that I can automatically get the expanded for plugging into Wolfram Alpha `(x+x^2+x^3+x^4+x^5+x^6)^3`. I wonder why it was still useful before computers in Euler's time...2017-01-09
  • 0
    @AntoniParellada See my edit.2017-01-09