• S
    SwaseekhGATE Preparation
General
  • Dashboard
  • Syllabus
  • Questions
  • Aptitude
  • Mock Tests
  • TCS NQT 2026
Account
  • Pricing
  • Contact
  1. GATE CS
  2. PYQs
  3. Discrete Mathematics

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? A. f(2^n - 1) = 2^n - 1 for all n >= 1 B. f(2^n) = 2^(n-1) for all n >= 1 C. f(2^n + 1) = 3 for all n >= 1 D. f(2^n) = 1 for all n >= 1

GATE 2022 · Discrete Mathematics · Recurrence Relation · medium

Answer: Statements A, C, and D are TRUE. Statement B is FALSE.

  1. Check statement D: f(2^n) = 1 for all n >= 1: Base: f(2^1) = f(2) = 2*f(1)-1 = 1. Step: if f(2^{k-1})=1 then f(2^k) = 2*f(2^{k-1})-1 = 2*1-1 = 1. By induction, D is TRUE.
  2. Check statement C: f(2^n + 1) = 3 for all n >= 1: 2^n+1 is odd, so f(2^n+1) = 2*f(2^{n-1})+1. By D, f(2^{n-1})=1 for n>=1, so f(2^n+1) = 2*1+1 = 3. C is TRUE.
  3. Check statement A: f(2^n - 1) = 2^n - 1 for all n >= 1: Base n=1: f(1) = 1 = 2^1-1. Inductive step: 2^{n+1}-1 = 2*(2^n-1)+1 is odd, so f(2^{n+1}-1) = 2*f(2^n-1)+1 = 2*(2^n-1)+1 = 2^{n+1}-1. A is TRUE.
  4. Check statement B: f(2^n) = 2^(n-1): f(2) = 1 = 2^0 = 2^{1-1} (matches). f(4) = 1 but 2^{2-1} = 2. Contradiction for n=2. B is FALSE.