Question

Let T(n)T(n) be the recurrence relation defined as follows:

T(0)=1T(0) = 1,
T(1)=2T(1) = 2, and
T(n)=5T(n−1)−6T(n−2)T(n) = 5T(n - 1) - 6T(n - 2) for n≥2n \ge 2

Which one of the following statements is TRUE?

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2024 answer key

Solution

Solve the linear homogeneous recurrence relation using its characteristic equation and substitute the initial conditions T(0)=1,T(1)=2T(0)=1, T(1)=2 to find the coefficients.

  1. The characteristic equation of T(n)−5T(n−1)+6T(n−2)=0T(n) - 5T(n-1) + 6T(n-2) = 0 is:
    r2−5r+6=0  ⟹  (r−2)(r−3)=0  ⟹  r=2,3r^2 - 5r + 6 = 0 \implies (r - 2)(r - 3) = 0 \implies r = 2, 3
  2. The general solution is T(n)=c12n+c23nT(n) = c_1 2^n + c_2 3^n.
  3. Substituting the given base cases T(0)=1T(0) = 1 and T(1)=2T(1) = 2:
    • For n=0n = 0: c1+c2=1c_1 + c_2 = 1
    • For n=1n = 1: 2c1+3c2=22c_1 + 3c_2 = 2
      Solving this system gives c2=0c_2 = 0 and c1=1c_1 = 1.
  4. Because c2=0c_2 = 0, the 3n3^n term vanishes completely, leaving the exact closed form:
    T(n)=2n=Θ(2n)T(n) = 2^n = \Theta(2^n)
Final answer

Option (A)

Common trap

Choosing Θ(3n)\Theta(3^n) from the larger characteristic root r=3r = 3 without checking that the initial conditions T(0)=1,T(1)=2T(0)=1, T(1)=2 make the coefficient of 3n3^n equal to zero.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2024 Computer Science and Information Technology - Set 2 (CS2)
Question
15 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.