IAE Academy

GATE 2022 CS Q.51: solution and answer

GATE 2022 · CSQ.51 · 2 marks · MSQ

Consider the following recurrence:

Then, which of the following statements is/are TRUE?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

See the question in the paper

Answer and solution

ANSWER

The TRUE statements are A, B and C; only D is false. Final answer: A, B, C.

Official answer: A, B, CSource: Official answer key, GATE 2022 CS (IIT Kharagpur)

  1. Compute small values directly from the recurrence: , and using , repeatedly gives .

  2. Within the block the values traced above are exactly the consecutive odd numbers , so conjecture the closed form for in that block.

  3. Verify by induction: if lies in block , then lies in block , so , matching the conjectured formula; the odd case checks the same way using . So the closed form for holds for all .

  4. Option A: is the top of block (range ). Then , which matches the claim — TRUE.

  5. Option B: is the bottom of block (range ). Then , which matches the claim — TRUE.

  6. Option C: lies strictly between and , so it is in block . Then , which matches the claim — TRUE.

  7. Option D: lies in block (range , for ). Then , a constant, not equal to in general. Testing : — FALSE.

  8. So the TRUE statements are A, B and C.

KEY IDEA

The recurrence generates, block by block ( from to ), the consecutive odd numbers , giving the closed form whenever . Once this closed form is established (and proved by induction using the two recurrence cases), every option reduces to identifying which block the given falls in and substituting.

WATCH OUT FOR

Two common traps: (1) assuming the closed form applies uniformly without first identifying which power-of-two block the argument falls into — e.g. for option D, plugging into the wrong block's formula, or not testing a concrete value, can hide that is constant rather than ; (2) for option C, misjudging the block of (it is easy to mistake it for block instead of the correct , since sits just above ).

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

More Complexity questions