0

We throw 4 dice. We are interested in the number of ways to get at most $k$. So we are looking for the coefficient of $x^k$ in the generating function. The generating function will look like this: i=1,2,3,4 \begin{align} x_1 + x_2 + x_3 + x_4 \leq k \qquad \text{with} \qquad 1 \leq x_i \leq 6. \end{align} \begin{align} x_1 + x_2 + x_3 + x_4 + x' = k \qquad \text{with} \qquad 0 \leq x' \leq k-4 \end{align} So we obtain: \begin{align}(x + x^2 + x^3 + x^4 + x^5 + x^6)^4 \cdot (0 + 1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^{10}). \end{align} Which can be written like this: \begin{align} \bigg( \frac{1-x^7}{1-x} -1\bigg)^4 \cdot \frac{1}{1-x} = \frac{(x-x^7)^4}{(1-x)^5}. \end{align} How can I extract e.g. the coefficient of $x^{15}$ form this expression?

iJup
  • 1,999
  • A couple of language questions: by "subtract" do you mean "extract"? And by "i.e." (= "that is") do you mean "e.g." (= "for example")? – Théophile May 19 '15 at 14:38
  • Yeah sure, I will edit! – iJup May 19 '15 at 14:39
  • By "Extract the coefficient of $x^{15}$", do you mean "find the coefficient"? For instance, if we want to extract the coefficient of $x^{15}$ from the polynomial $x^{13} - 5x^{14} + 36x^{15} - 7x^{16}$, would the answer be $36$? – Arthur May 19 '15 at 15:16
  • Yes I mean: find the coefficient of $x^{15}$. – iJup May 19 '15 at 15:20
  • As mentioned in the related question you asked earlier here you have again forgotten $x^0=1$ in your parenthesis to the right. It should have been $(0+1+x+x^2+x^3+\dots)$. – JMoravitz May 19 '15 at 15:20
  • 2
    You can compute Taylor Series at $x=0$: http://www.wolframalpha.com/input/?i=taylor+series+%28%28x-x%5E7%29%5E4%29+%2F+%281-x%29%5E5

    So the coefficient of $x^{15}$ is 861.

    – Valerii Sokolov May 19 '15 at 15:50

2 Answers2

1

We can obtain coefficients of $\frac{1}{(1-x)^5}$ by: $p_k = {5+k-1 \choose k}$.

We know that $(x-x^7)^4$ to get $x^{15}$ we only need ${4 \choose 0} \cdot x^{4}$ and ${4 \choose 1} \cdot (x)^{3}(-x)^{7}$. We will need the coefficients of $p_k$ for $x^{11}$ and $x^{5}$.

So: ${4 \choose 0} \cdot {15 \choose 11} x^{15} - {4 \choose 1} \cdot {9 \choose 5} x^{15} = 861x^{15}$. Thus 861 possibilities.

iJup
  • 1,999
0

$$ \dfrac{\left(x-x^7\right)^4}{\left(1-x\right)^5} = \dfrac{x^4\,\left(x+1\right)^4\,\left(x^2-x+1\right)^4\,\left(x^2+x+1\right)^4}{1-x} $$ I think this is the best you can do and I sadly do not really know what you mean by extract.