Question

If the ordinary generating function of a sequence {an}n=0∞\{a_n\}_{n=0}^\infty is 1+z(1−z)3\frac{1+z}{(1-z)^3}, then a3−a0a_3 - a_0 is equal to

Official answer and solution
Official answer
15
From
Official GATE 2017 answer key

Solution

Expand the ordinary generating function 1+z(1−z)3\frac{1+z}{(1-z)^3} using the negative binomial series to find coefficients a3a_3 and a0a_0.

Recall the standard binomial series expansion for (1−z)−k(1 - z)^{-k}:

1(1−z)k=∑n=0∞(n+k−1n)zn\frac{1}{(1-z)^k} = \sum_{n=0}^\infty \binom{n + k - 1}{n} z^n

For k=3k = 3:

1(1−z)3=∑n=0∞(n+22)zn=∑n=0∞(n+2)(n+1)2zn\frac{1}{(1-z)^3} = \sum_{n=0}^\infty \binom{n + 2}{2} z^n = \sum_{n=0}^\infty \frac{(n+2)(n+1)}{2} z^n

Let cn=(n+2)(n+1)2c_n = \frac{(n+2)(n+1)}{2} denote the coefficient of znz^n in 1(1−z)3\frac{1}{(1-z)^3}.

The generating function is:

A(z)=1+z(1−z)3=∑n=0∞cnzn+z∑n=0∞cnzn=c0+∑n=1∞(cn+cn−1)znA(z) = \frac{1+z}{(1-z)^3} = \sum_{n=0}^\infty c_n z^n + z \sum_{n=0}^\infty c_n z^n = c_0 + \sum_{n=1}^\infty (c_n + c_{n-1}) z^n

Thus, the general term is a0=c0a_0 = c_0 and an=cn+cn−1a_n = c_n + c_{n-1} for n≥1n \ge 1.

Calculate a0a_0 and a3a_3:

  • For n=0n = 0: a0=c0=2×12=1a_0 = c_0 = \frac{2 \times 1}{2} = 1.
  • For n=3n = 3:
    c3=(3+2)(3+1)2=5×42=10c_3 = \frac{(3+2)(3+1)}{2} = \frac{5 \times 4}{2} = 10
    c2=(2+2)(2+1)2=4×32=6c_2 = \frac{(2+2)(2+1)}{2} = \frac{4 \times 3}{2} = 6
    a3=c3+c2=10+6=16a_3 = c_3 + c_2 = 10 + 6 = 16

Compute a3−a0a_3 - a_0:

a3−a0=16−1=15a_3 - a_0 = 16 - 1 = 15
Final answer

15

Common trap

Taking a3=c3=10a_3 = c_3 = 10 and forgetting the contribution of the numerator's +z+z term (z⋅c2z2=c2z3z \cdot c_2 z^2 = c_2 z^3).

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2017 Computer Science and Information Technology (CS) Session 2
Question
47 of 65, printed as CS Q.47
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.