GateAI
Recurrence Relations

GATE CSE 2022 · Q51

MSQ2 marksMedium

Time

Consider the following recurrence: f(1)=1; f(1) = 1; f(2n)=2f(n)−1,for n≥1; f(2n) = 2 f(n) - 1, \quad \text{for } n \ge 1; f(2n+1)=2f(n)+1,for n≥1. f(2n+1) = 2 f(n) + 1, \quad \text{for } n \ge 1. Then, which of the following statements is/are TRUE?

Select all that applyOne or more correct

Pick every correct option

Solution

Step-by-step verified solution

Official answer: A) f(2n - 1) = 2n - 1; B) f(2n) = 1; C) f(5 · 2n) = 2n+1 + 1

Recurrence Relations

Let us compute values of f(k)f(k) for small values of kk and test each statement:

  • Base case: $f(1) = 1$

  • For n=1n = 1:

    • f(2)=2f(1)−1=2(1)−1=1f(2) = 2f(1) - 1 = 2(1) - 1 = 1

    • f(3)=2f(1)+1=2(1)+1=3f(3) = 2f(1) + 1 = 2(1) + 1 = 3

  • For n=2n = 2:

    • f(4)=2f(2)−1=2(1)−1=1f(4) = 2f(2) - 1 = 2(1) - 1 = 1

    • f(5)=2f(2)+1=2(1)+1=3f(5) = 2f(2) + 1 = 2(1) + 1 = 3

  • For n=3n = 3:

    • f(6)=2f(3)−1=2(3)−1=5f(6) = 2f(3) - 1 = 2(3) - 1 = 5

    • f(7)=2f(3)+1=2(3)+1=7f(7) = 2f(3) + 1 = 2(3) + 1 = 7

  • For n=4n = 4:

    • f(8)=2f(4)−1=2(1)−1=1f(8) = 2f(4) - 1 = 2(1) - 1 = 1

    • f(9)=2f(4)+1=2(1)+1=3f(9) = 2f(4) + 1 = 2(1) + 1 = 3

  • For n=5n = 5:

    • f(10)=2f(5)−1=2(3)−1=5f(10) = 2f(5) - 1 = 2(3) - 1 = 5

Now, evaluate each option:

  1. Option (A):f(2n−1)=2n−1f(2^n - 1) = 2^n - 1

    • For $n=1$: $f(1) = 1 = 2^1 - 1$.

    • For $n=2$: $f(3) = 3 = 2^2 - 1$.

    • By induction: $f(2^n - 1) = f(2(2^{n-1}-1) + 1) = 2f(2^{n-1}-1) + 1 = 2(2^{n-1}-1) + 1 = 2^n - 1$.

    • Option (A) is TRUE.

  2. Option (B):f(2n)=1f(2^n) = 1

    • For $n=1$: $f(2) = 1$.

    • By induction: $f(2^n) = 2f(2^{n-1}) - 1 = 2(1) - 1 = 1$.

    • Option (B) is TRUE.

  3. Option (C):f(5⋅2n)=2n+1+1f(5 \cdot 2^n) = 2^{n+1} + 1

    • For $n=0$: $f(5) = 3 = 2^{0+1} + 1$.

    • For $n=1$: $f(10) = 2f(5) - 1 = 2(3) - 1 = 5 = 2^{1+1} + 1$.

    • By induction: f(5⋅2n)=2f(5⋅2n−1)−1=2(2n+1)−1=2n+1+1f(5 \cdot 2^n) = 2f(5 \cdot 2^{n-1}) - 1 = 2(2^n + 1) - 1 = 2^{n+1} + 1.

    • Option (C) is TRUE.

  4. Option (D):f(2n+1)=2n+1f(2^n + 1) = 2^n + 1

    • For n=2n=2: f(22+1)=f(5)=3≠22+1=5f(2^2 + 1) = f(5) = 3 \neq 2^2 + 1 = 5.

    • Option (D) is FALSE.

Thus, statements A, B, and C are TRUE.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Recurrence Relations previous year question is Q51 of the GATE CSE 2022 paper. Find more GATE CSE PYQs on Recurrence Relations in Engineering Mathematics, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 4 related Recurrence Relations PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Recurrence Relations in GATE CSE

Recurrence Relations has 4 GATE CSE PYQs across 4 papers from 2016 to 2024. This is the only 2-mark MSQ among them, and it is the only one in GATE CSE 2022.

How GATE tests Recurrence Relations

More from GATE CSE 2022

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2022 · Q51 · MSQ

Consider the following recurrence: f(1) = 1; f(2n) = 2 f(n) - 1, for n ≥ 1; f(2n+1) = 2 f(n) + 1, for n ≥ 1. Then, which of the following statements is/are TRUE?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.