GATE | GATE CS 2018 | Question 18

Which one the following is a closed form expression for the generating function of the sequence {an}, where an = 2n + 3 for all n = 0, 1, 2,…?
3
(A) A
(B) B
(C) C
(D) D


Answer: (D)

Explanation: Given an = 2n + 3

Generating function G(x) for the sequence an is
G(x) = \sum_{n=0}^{\infty} a_n x^n

= \sum_{n=0}^{\infty} 2n(x^n) + 3(x^n)



= 2 \sum_{n=0}^{\infty} n(x^n) + 3 \sum_{n=0}^{\infty} x^n

= 2(0+x+2x2+3x3+…..) + 3(1+x+x2+….)

We know that \frac{1}{1-x} = 1+x+x2+….

x+2x2+3x3+… = x(1+2x+3x2+….) = \frac{x}{(1-x)^2}

Substituting calculated values in G(x)

G(x) =  2(\frac{x}{(1-x)^2}) + 3(\frac{1}{1-x})

= \frac{2x+3-3x}{(1-x)^2}

= \frac{3-x}{(1-x)^2}

Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.