Question about generating functions about an exercise

198 Views Asked by At

I have a question about generating functions, I've understood that generating functions are also representing some series of numbers, but is this series could be formed by 2 different functions?

For example, an exercise that I've encountered goes like this: Find the generating function that represents the number of solutions to the equation:

$$ x_1 + x_2 + \dots + x_k=n$$

Where the variables are even numbers that are not divisible by 3, So I assume we should find a function that represents the series:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ...

0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 ..

The zero's and one's stands for the coefficient of $x^n$

So to get to that series we have few options the first one i've thought about is to take the generating function: $1 + x + x^2 + x^3 + \dots$

$$ 1 + x + x^2 + x^3 + ... = \frac{1}{1-x} $$

Which represents the series of 1 1 1 1 1 ...

and then to subtract those (subtract odd numbers and multiples of 6): $$ f(x) = ((1 + x + x^2 + x^3 + ...) - x(1 + x^2 + x^4 + ...) - (1 + x^6 + x^{12} +...))^k $$

Which gives us the series we wanted.

But the solution to this exercise shows different answer and the generating function goes like this:

$$ g(x) = ((x^2 + x^4) + (x^8 + x^{10}) + (x^{14} + x^{16}) + ... )^k $$

which represents the same series as well but looks differently, does those 2 functions coefficients represent the same number of solutions to the equation?

Thanks alot !

2

There are 2 best solutions below

2
On BEST ANSWER

Your approach is fine. We can show the generating functions are equal: $f=g$.

We have \begin{align*} \color{blue}{g(x)}&=\left(\left(x^2 + x^4\right) + \left(x^8 + x^{10}\right) + \left(x^{14} + x^{16}\right) + ... \right)^k \\ &=\left(x^2\left(1+x^2\right)+x^8\left(1+x^2\right)+x^{14}\left(1+x^2\right)+\cdots\right)^k\\ &=\left(1+x^2\right)^k\left(x^2+x^8+x^{14}+\cdots\right)^k\\ &=\left(1+x^2\right)^kx^{2k}\left(1+x^6+x^{12}+\cdots\right)^k\\ &\,\,\color{blue}{=\left(\frac{x^2\left(1+x^2\right)}{1-x^6}\right)^k} \end{align*}

On the other hand we obtain

\begin{align*} \color{blue}{f(x)}&= \left(\left(1 + x + x^2 + x^3 +\cdots\right) - x\left(1 + x^2 + x^4 + \cdots\right) - \left(1 + x^6 + x^{12} +\cdots\right)\right)^k\\ &=\left(\frac{1}{1-x}-\frac{x}{1-x^2}-\frac{1}{1-x^6}\right)^k\\ &=\left(\frac{1+x}{1-x^2}-\frac{x}{1-x^2}-\frac{1}{1-x^6}\right)^k\\ &=\left(\frac{1}{1-x^2}-\frac{1}{1-x^6}\right)^k\\ &=\left(\frac{\left(1-x^6\right)-\left(1-x^2\right)}{\left(1-x^2\right)\left(1-x^6\right)}\right)^k\\ &=\left(\frac{x^2\left(1-x^4\right)}{\left(1-x^2\right)\left(1-x^6\right)}\right)^k\\ &\,\,\color{blue}{=\left(\frac{x^2\left(1+x^2\right)}{1-x^6}\right)^k} \end{align*} and the claim follows.

1
On

The functions $f$ and $g$ are identical.

You have taken all the powers then deleted all odd ones and then the multiples of $6$.

The book has started with the even powers and then deleted the multiples of $6$.

It's just the same!