Generating Function, and Combinations

138 Views Asked by At

How many ways are there to obtain an even sum when 10 indistinguishable disce are rolled? hint: let $x_i$ be the number of dice showing the number $i$.

OK, so the answer is $(\frac{1}{1-z})^3 [\binom{3}{1}(\frac{1}{1-z^2})(\frac{z}{1-z^2})^2+(\frac{1}{1-z^2})^3] $

This is the same as saying $x_1+x_2+x_3+x_4+x_5+x_6=10$ with the condition that $x_1+2x_2+3x_3+4x_4+5x_5+6x_6$ is even.

This is what the text says.

This is what I understand so far

$(\frac{1}{1-z})^3$ this is the $2x_2+4x_4+6x_6$ since these will always be even, but in reality they are all three represented as $(z^{0}+z^{1}+z^{2}....)(z^{0}+z^{1}+z^{2}....)(z^{0}+z^{1}+z^{2}....)$ since the problem is actually $x_2+x_4+x_6$ and we are saying doesnt matter what they come out as cause those are predetermined to be the $2x_2+4x_4+6x_6$ even though they are not written that way.

Because if it was truly $2x_2+4x_4+6x_6$ then it would actually be generating $(z^{0}+z^{2}+z^{4}....)(z^{0}+z^{4}+z^{8}....)(z^{0}+z^{6}+z^{12}....)$ whose anser is $(\frac{1}{1-z^2})(\frac{1}{1-z^4})(\frac{1}{1-z^6})$ for this part, but since it is not, I gather they were just advising us of the $2x_2+4x_4+6x_6$ just for a mental picture. I was confused and just wanted someone elses thoughts as well.

Cause it happens again in the second part.

$(\frac{1}{1-z^2})^3$ this term is when they are all even odd numbers are even but the odd in the question are actually written $x_1+x_3+x_5$ which makes them generate $(z^{0}+z^{1}+z^{2}....)(z^{0}+z^{1}+z^{2}....)(z^{0}+z^{1}+z^{2}....)$ which makes since since if you only want even numbers then we have $(z^{0}+z^{2}+z^{4}....)(z^{0}+z^{2}+z^{4}....)(z^{0}+z^{2}+z^{4}....)$ which is $(\frac{1}{1-z^2})^3$

Cause again if they were truly $x_1+3x_3+5x_5$ they would be $(z^{0}+z^{1}+z^{2}....)(z^{3}+z^{6}+z^{9}....)(z^{5}+z^{10}+z^{15}....)$ which just not generate that.

Just wanted to make sure i was looking at this correctly. if anyone can help!

1

There are 1 best solutions below

2
On

Your interpretation is besides the last paragraph essentially correct. To better see the connection with the generating function stated here we derive in a first step a multivariate generating function \begin{align*} A(z_1,z_2,z_3,z_4,z_5,z_6) \end{align*} where we mark occurrences of $i$ as indices.

We are looking for rolls of $10$ dice resulting in an even sum.

Even contributions: Dice may show zero or more occurrences of $2$ and each of these configurations contributes to the resulting sum. The number of dice showing $2$ is encoded with $x_2$, the corresponding generating function is \begin{align*} \frac{1}{1-z_2}=1+z_2+z_2^2+\cdots \end{align*} The same holds for the other even numbers $4$ and $6$ resulting in \begin{align*} \color{blue}{\frac{1}{(1-z_2)(1-z_4)(1-z_6)}} \end{align*}

Odd contributions: Next we consider odd contributions of a die. In order to contribute to the resulting sum which has to be even, the number of dice with odd contributions has to be even.

We can classify this contributions in

  • each odd number occurs an even number of times. So, the number $1$ occur s zero, or twice or four times, etc. in general \begin{align*} \frac{1}{1-z_1^2}=1+z_1^2+z_1^4+\cdots \end{align*}

    The same occurs with $3$ and $5$ resulting in \begin{align*} \color{blue}{\frac{1}{(1-z_1^2)(1-z_3^2)(1-z_5^2)}} \end{align*}

  • one odd number occurs an even number of times and two odd numbers occur an odd number of times. This also contributes to the resulting even sum, since the sum of two odd numbers and an even number is even.

    Let's assume the number $1$ occurs an odd number of times. This is encoded as \begin{align*} \frac{z_1}{1-z_1^2}=z_1+z_1^3+z_1^5+\cdots \end{align*}

    So, if $1$ and $3$ occur an odd number of times and necessarily $5$ occurs an even number of times this case is encoded as \begin{align*} \frac{z_1}{1-z_1^2}\cdot\frac{z_3}{1-z_3^2}\cdot\frac{1}{1-z_5^2} =\color{blue}{\frac{z_1z_3}{(1-z_1^2)(1-z_3^2)(1-z_5^2)}} \end{align*}

Since there are $\binom{3}{1}=3$ possible configurations of this type and no further configurations which contribute to the resulting even sum, we conclude:

A generating function $A(z_1,z_2,z_3,z_4,z_5,z_6)$ describing this szenario is given as \begin{align*} \color{blue}{A(z_1}&\color{blue}{,z_2,z_3,z_4,z_5,z_6)}\\ &=\frac{1}{(1-z_2)(1-z_4)(1-z_6)}\left(\frac{1}{(1-z_1^2)(1-z_3^2)(1-z_5)^2}\right.\\ &\qquad\qquad+\frac{z_1z_3}{(1-z_1^2)(1-z_3^2)(1-z_5^2)}\\ &\qquad\qquad+\frac{z_1z_5}{(1-z_1^2)(1-z_3^2)(1-z_5^2)}\\ &\qquad\qquad+\left.\frac{z_3z_5}{(1-z_1^2)(1-z_3^2)(1-z_5^2)}\right)\\ &=\color{blue}{\frac{1+z_1z_3+z_1z_5+z_3z_5}{(1-z_2)(1-z_4)(1-z_6)(1-z_1^2)(1-z_3^2)(1-z_5^2)}}\tag{1} \end{align*}

Since we don't need to differentiate between the $z_i$'s we can set $z_i=z$ in $A(z_1,z_2,z_3,z_4,z_5,z_6)$.

We obtain \begin{align*} \color{blue}{A(z)}&=\frac{1}{(1-z)^3}\left(\frac{1}{(1-z^2)^3}+\binom{3}{1}\frac{z^2}{(1-z^2)^3}\right)\\ &=\color{blue}{\frac{1+3z^2}{(1-z)^3(1-z^2)^3}} \end{align*}

Since we need the coefficient $[z^{10}]$ of $A(z)$ we finally obtain with some help of Wolfram Alpha \begin{align*} \color{blue}{[z^{10}]\frac{1+3z^2}{(1-z)^3(1-z^2)^3}=1512} \end{align*}