IAE Academy

GATE 2022 CS Q.36: solution and answer

GATE 2022 · CSQ.36 · 2 marks · MCQ

Which one of the following is the closed form for the generating function of the sequence defined below?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

See the question in the paper

Answer and solution

ANSWER

The closed form is , option (A).

Official answer: ASource: Official answer key, GATE 2022 CS (IIT Kharagpur)

  1. Write , so the sequence is The all-ones part is for every , and the extra part is at odd and at even .

  2. The all-ones part has generating function .

  3. The extra part is . First, .

  4. Multiplying each coefficient by corresponds to the operator , so .

  5. Differentiate: .

  6. Hence the extra part is .

  7. Add the two parts: , which is option (A).

  8. Check: , so the coefficient of is and of is . Option (B) would give at , which is wrong, and (C) and (D) give and at but fail at (coefficients and against ).

KEY IDEA

Split the sequence into a constant part and an odd-index part. Get the odd-index part by applying to , the generating function of the odd powers.

WATCH OUT FOR

Forgetting that is a coefficient multiplier only on odd terms and using or . Also, differentiating and getting is the series for , which is not the extra part here.

From the GATE 2022 CS paper. Every question of this paper · Download the full paper · All 3 Recurrences questions, with notes