Let 𝑇(𝑛) be the recurrence relation defined as follows: 𝑇(0) = 1, 𝑇(1) =…

2024

Let 𝑇(𝑛) be the recurrence relation defined as follows:

        𝑇(0) = 1,

        𝑇(1) = 2, and

        𝑇(𝑛) = 5𝑇(𝑛 βˆ’ 1) βˆ’ 6𝑇(𝑛 βˆ’ 2) for 𝑛 β‰₯ 2

Which one of the following statements is TRUE?

Answer: A. 𝑇(𝑛) = Θ(2𝑛 ) β€” Key idea: solve the recurrence by the characteristic equation. Form the characteristic equation: r^2 - 5r + 6 = 0, which has roots r = 2 and r = 3. Write the…

  1. A.

    𝑇(𝑛) = Θ(2𝑛 )

  2. B.

    𝑇(𝑛) = Θ(𝑛2𝑛 )

  3. C.

    𝑇(𝑛) = Θ(3𝑛)

  4. D.

    𝑇(𝑛) = Θ(𝑛3𝑛)

Attempted by 93 students.

Show answer & explanation

Correct answer: A

Key idea: solve the recurrence by the characteristic equation.

  • Form the characteristic equation: r^2 - 5r + 6 = 0, which has roots r = 2 and r = 3.

  • Write the general solution: T(n) = AΒ·2^n + BΒ·3^n.

  • Use initial conditions: T(0)=1 β‡’ A + B = 1; T(1)=2 β‡’ 2A + 3B = 2.

  • Solve the system: subtracting 2Γ—(A + B = 1) from (2A + 3B = 2) gives B = 0, so A = 1.

  • Therefore T(n) = 2^n exactly, so T(n) = Θ(2^n).

Conclusion: the recurrence solves to T(n) = 2^n, hence the correct growth is Θ(2^n).

A video solution is available for this question β€” log in and enroll to watch it.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…