2

Let $a_n$ be the number of solutions of the equation:

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

where $x_i$ is the positive odd integer.

Hereto I would like to find the ordinary generating function for the sequence $a_n$

ODG has is a function satisfies the below :

$$G(a_n;n) = \sum_0^\infty a_nx^n$$

But what is the typical algorithm to find the ordinary generating function that uniquely determines its coefficient that corresponds to the regarding combinatorial situation?

Anyone can guide me where to start from?

Beverlie
  • 2,645

2 Answers2

1

The generating function is $$ \begin{align} &\left(\sum_{j=0}^\infty x^{2j+1}\right)^k\tag1\\ &=\left(\frac{x}{1-x^2}\right)^k\tag2\\ &=x^k\sum_{j=0}^\infty(-1)^j\binom{-k}{j}x^{2j}\tag3\\ &=\sum_{j=0}^\infty\binom{k+j-1}{j}x^{2j+k}\tag4\\ &=\sum_{n=k}^\infty\binom{\frac{n+k-2}2}{\frac{n-k}2}x^n\ [2|(n-k)]\tag5 \end{align} $$ Explanation:
$(1)$: the exponent of $x$ chosen for each factor
$\phantom{(1)\text{: }}$represents the value chosen for each summand
$(2)$: sum the geometric series
$(3)$: apply the Binomial Theorem
$(4)$: $\binom{-n}{k}=(-1)^k\binom{n+k-1}{k}$ see this answer
$(5)$: $n=2j+k\implies j=\frac{n-k}2\ [2|(n-k)]$ where $[\cdots]$ are Iverson brackets

In step $(1)$, the exponent of $x$ chosen for each factor represents the value chosen for each summand. For example, if $k=4$, $$ \scriptsize\left(\color{#CCC}{x^1+x^3+}x^5\color{#CCC}{+x^7+\cdots}\right)\left(\color{#CCC}{x^1+}x^3\color{#CCC}{+x^5+x^7+\cdots}\right)\left(\color{#CCC}{x^1+x^3+}x^5\color{#CCC}{+x^7+\cdots}\right)\left(\color{#CCC}{x^1+x^3+x^5+}x^7\color{#CCC}{+\cdots}\right) $$ represents the sum $5+3+5+7=20$, and $$ \scriptsize\left(\color{#CCC}{x^1+x^3+}x^5\color{#CCC}{+x^7+\cdots}\right) \left(x^1\color{#CCC}{+x^3+x^5+x^7+\cdots}\right) \left(\color{#CCC}{x^1+x^3+x^5+}x^7\color{#CCC}{+\cdots}\right)\left(\color{#CCC}{x^1+x^3+x^5+}x^7\color{#CCC}{+\cdots}\right) $$ represents the sum $5+1+7+7=20$.

robjohn
  • 345,667
  • Could you provide me some notions of each equational path? It looks beautiful, but hard to interpret on my level of background. – Beverlie Nov 19 '17 at 04:25
  • How to draw out the equation:$$\binom{-k}{j}=\binom{k+j-1}{j}$$ – Beverlie Nov 19 '17 at 04:34
  • @achillehui: I missed that they were odd. I will adjust my answer, or perhaps amend it, leaving the old answer to the question I was answering. – robjohn Nov 19 '17 at 04:42
1

Let $X$ be the set of positive odd numbers.

For any formal power series $f(t) = \sum_{j=0}^\infty f_k t^k$, let $[t^k]f(t)$ be the coefficient $f_k$.

When one expand following product into a series of $t$.

$$\left(\sum_{x_1\in X} t^{x_1}\right)\cdots\left(\sum_{x_k\in X} t^{x_k}\right) = \sum_{x_1,\ldots,x_k \in X} t^{x_1+\ldots + x_k} = \sum_{n=1}^\infty \alpha_n t^n$$

One will notice there is a one-one correspondence between terms contributing to $\alpha_n$ and solution $x_1 + \ldots + x_k = n$ for $(x_1,\ldots,x_k) \in X^k$. For example, in the expansion of $$(t + t^3 + t^5 + \cdots)(t + t^3 + t^5 + \cdots)(t + t^3 + t^5 + \cdots) = x^3+3x^5+6x^7+10x^9 + \cdots $$ There are $6$ terms that contribute to $\alpha_7 = 6$. Namely,

$$ \begin{array}{lcr} (t + t^3 + \color{blue}{t^5} + \cdots) (\color{blue}{t} + t^3 + t^5 + \cdots) (\color{blue}{t} + t^3 + t^5 + \cdots) &\leftrightarrow & 5+1+1 = 7\\ (\color{blue}{t} + t^3 + t^5 + \cdots) (t + t^3 + \color{blue}{t^5} + \cdots) (\color{blue}{t} + t^3 + t^5 + \cdots) &\leftrightarrow & 1+5+1 = 7\\ (\color{blue}{t} + t^3 + t^5 + \cdots) (\color{blue}{t} + t^3 + t^5 + \cdots) (t + t^3 + \color{blue}{t^5} + \cdots) &\leftrightarrow & 1+1+5 = 7\\ (\color{blue}{t} + t^3 + t^5 + \cdots) (t + \color{blue}{t^3} + t^5 + \cdots) (t + \color{blue}{t^3} + t^5 + \cdots)&\leftrightarrow & 1+3+3 = 7\\ (t + \color{blue}{t^3} + t^5 + \cdots) (\color{blue}{t} + t^3 + t^5 + \cdots) (t + \color{blue}{t^3} + t^5 + \cdots)&\leftrightarrow & 3+1+3 = 7\\ (t + \color{blue}{t^3} + t^5 + \cdots) (t + \color{blue}{t^3} + t^5 + \cdots) (\color{blue}{t} + t^3 + t^5 + \cdots)&\leftrightarrow & 3+3+1 = 7\\ \end{array} $$ In general, this leads to

$$\alpha_n = \sum_{n = \sum_{j=1}^k x_j} 1 = a_n \quad\leftarrow \text{ the number of solutions we seek. } $$ Since $\displaystyle\;\sum_{x\in X}t^x = \sum_{j=0}^\infty t^{2j+1} = t \sum_{j=0}^\infty (t^2)^j = \frac{t}{1-t^2},$ the OGF at hand is simply

$$\sum_{n=0}^\infty a_n t^n = \frac{t^k}{(1-t^2)^k} \quad\implies\quad a_n = [t^n] \frac{t^k}{(1-t^2)^k} = [t^{n-k}]\frac{1}{(1-t^2)^k} $$ In order for $a_n \ne 0$, we need $n \ge k$ and $n$ and $k$ has same parity. When this happens, we have $$a_n = [t^{(n-k)/2}] \frac{1}{(1-t)^k} = \binom{\frac{n-k}{2} + k - 1}{\frac{n-k}{2}} = \binom{\frac{n+k}{2}-1}{\frac{n-k}{2}}$$

Note

Above answer is under the assumption we want the number of solutions for a fixed $k$. If one want the number of solutions for a given $n$ but the number of $k$ can vary, the corresponding OGF will be

$$1 + \frac{t}{1-t^2} + \frac{t^2}{(1-t^2)^2} + \cdots = \sum_{k=0}^\infty \left(\frac{t}{1-t^2}\right)^k = \frac{1}{1 - \frac{t}{1-t^2}} = 1 + \frac{t}{1 - t - t^2} $$ The rightmost expression is the famous OGF for Fibonacci numbers. $$\frac{t}{1 - t - t^2} = \sum_{n=1}^\infty F_n t^n$$ This means for any $n > 0$, the number of ways of breaking $n$ into an ordered list of odd numbers $(x_1, \ldots, x_k)$ which sum to $n$ is simply $F_n$.

achille hui
  • 122,701
  • what does "n and k has same parity" mean? If it means n=k, why do we need this condition for $a_n \ne 0$? – Beverlie Nov 19 '17 at 05:16
  • @Beverlie parity of a number refers to whether the number is odd or even. two numbers have same parity means they are both even or both odd. We need the condition $n, k$ have same parity because in the expression $[t^{n-k}]\frac{1}{(1-t^2)^k}$, the piece at the right, $\frac{1}{(1-t^2)^k}$, only contains even power of $t$. – achille hui Nov 19 '17 at 05:18
  • then for given n = 7 we need to sum up every case which are {(n,k)} = {(7,1), (7,3), (7,5), (7,7)} calculated with $\binom{n+k-2\over2}{n-k\over2}$? – Beverlie Nov 19 '17 at 05:24
  • 1
    @Beverlie your $k$ is the number of $x_k$. Are you $k$ fixed (i.e you want the solution for a given $k$) or varying (i.e you want the number of solution for all possible $k$). You question is not very clear about that.. – achille hui Nov 19 '17 at 05:28
  • You're right. So (n,k)= (7,3) actually leads to 6 as you exemplified at OP. – Beverlie Nov 19 '17 at 05:32