0
$\begingroup$

Suppose, I have a generating function:

G(z) = Σ tnzn

and an equation as:

tn=tn-1+(n-1)

I rewrite it in terms of G(z) as:
Σ tnzn = Σ tn-1 zn + Σ n . zn - Σ zn

Σ tnzn = z Σ tn zn + Σ n . zn - Σ zn

G(z) = z G(z) + $\frac{n}{(1-z)}- \frac{1}{(1-z)}$

Is the last step valid?

Thanks.

  • 1
    There should be a $t_{0}$ somewhere. When you take out the $z$ to get $z*G(z)$, you also need to take out the first term in the sequence.2017-02-25
  • 2
    "Is the last step valid?" No, because n should not appear in the evaluation of the series on the RHS. Once you correct this (and some problems of initialization mentioned in another comment), you should be fine.2017-02-25

2 Answers 2

0

So, I tackled this question in the following manner.

Given $G(z)=\sum_{n=0}^\infty t_nz^n$

and the equation $t_n=t_{n-1}+(n-1)$

$\sum_{n=0}^\infty t_nz^n=\sum_{n=0}^\infty t_{n-1}z^n+\sum_{n=0}^\infty (n-1)z^n$

$\sum_{n=0}^\infty t_nz^n=z\sum_{n=0}^\infty t_{n}z^n+{z^2\over(1-z)^2}$

$G(z)=zG(z)+{z^2\over(1-z)^2}$

$G(z)-zG(z)={z^2\over(1-z)^2}$

$G(z)(1-z)={z^2\over(1-z)^2}$

$G(z)={z^2\over(1-z)^3}$

$G(z)=z^2\sum_{n=0}^\infty {n(n-1)\over2}z^{n}$

$\therefore t_n={n(n-1)\over2}$

Thanks for all the help!

2

You can say

$$ \sum_{n=1}^{\infty} t_{n} z^n = \sum_{n=1}^{\infty} t_{n-1} z^n + \sum_{n=1}^{\infty} (n-1) z^n. $$

Thus,

$$ = t_{0}z + \sum_{n=1}^{\infty} t_{n} z^{n+1} + z^{2} \sum_{n=1}^{\infty} (n-1) z^{n-2}. $$

From here you can say

$$ G(z) = t_{0}z + zG(z) + z^{2}\frac{d}{dz} \Big( \frac{1}{1-z} \Big) $$

and solve for $G(z)$.

  • 0
    Uh, I have to prove this as $\frac{n(n-1)}{2}$, this seems to be a bit complicated.2017-02-25
  • 1
    You should get something like $G(z) = \frac{z^{2}}{(1-z)^3} = z^{2}\frac{d^{2}}{dz^{2}}\Big(\frac{1}{2} \frac{1}{1-z}\Big)$ and then write $\frac{1}{1-z}$ as a sum again. Then differentiate (twice) term by term. Make sure you justify why you can (if you need to).2017-02-25