Skip to content

GATE CS 2018 Q1 — Combinatorics: Counting, Recurrence Relations, Generating Functions

Explain with AI

Which one of the following is a closed form expression for the generating function of the sequence {an}\{a_n\}, where an=2n+3 for all n=0,1,2,…a_n = 2n +3 \text{ for all } n=0, 1, 2, \dots?

Choose one option
View worked solution

Answer: D

The generating function A(x)A(x) for the sequence {an}\{a_n\} is defined as:

A(x)=∑n=0∞anxnA(x) = \sum_{n=0}^{\infty} a_n x^n

Given that an=2n+3a_n = 2n + 3 for n≥0n \ge 0, we can split the summation into two parts:

A(x)=∑n=0∞(2n+3)xn=2∑n=0∞nxn+3∑n=0∞xnA(x) = \sum_{n=0}^{\infty} (2n + 3) x^n = 2 \sum_{n=0}^{\infty} n x^n + 3 \sum_{n=0}^{\infty} x^n

We use the following standard closed-form generating functions:

  1. The sum of an infinite geometric series: ∑n=0∞xn=11−x\sum_{n=0}^{\infty} x^n = \frac{1}{1-x}
  2. Differentiating both sides with respect to xx and multiplying by xx: ∑n=0∞nxn=x(1−x)2\sum_{n=0}^{\infty} n x^n = \frac{x}{(1-x)^2}

Substituting these standard forms back into our expression for A(x)A(x):

A(x)=2(x(1−x)2)+3(11−x)A(x) = 2 \left( \frac{x}{(1-x)^2} \right) + 3 \left( \frac{1}{1-x} \right)

To combine the terms, find a common denominator of (1−x)2(1-x)^2:

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

Thus, the closed-form expression is 3−x(1−x)2\frac{3-x}{(1-x)^2}, which corresponds to option D.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Combinatorics: Counting, Recurrence Relations, Generating Functions questions