edited by
26,972 views
53 53 votes

​​​​​Let $\text{T(n)}$ be the recurrence relation defined as follows:

\[
\begin{array}{l}
T(0)=1, \\
T(1)=2, \text { and } \\
T(n)=5 T(n-1)-6 T(n-2) \text { for } n \geq 2
\end{array}
\]

Which one of the following statements is TRUE?

  1. $T(n)=\Theta\left(2^{n}\right)$
  2. $T(n)=\Theta\left(n 2^{n}\right)$
  3. $T(n)=\Theta\left(3^{n}\right)$
  4. $T(n)=\Theta\left(n 3^{n}\right)$

16 Answers

54 54 votes
I believe Correct answer will be (A).

Given , $T(n)=5T(n-1)-6T(n-2)$ ; $n \geq2$

            $T(0)=1$

            $T(1)=2$

            Calculate ,$T(2)=5*T(1)-6*T(0)=5*2-6*1=4=2^{2}$

                             $T(3)=5*T(2)-6*T(1)=5*4-2=8=2^{3}$

                              $T(4)=5*T(3)-6*T(2)=5*2^{3}-6*2^{2}=2^4$

so we can see the trend it is for $n \geq 2$ is $2^{n}$ .

Let's try to proof this formally using mathematical Induction ,

Assumption is $T(n)=2^{n}$

Base case :

For n=0 , $T(0)=2^{0}=1$ and n=0 , $T(1)=2^{1}=2$ .

So it is true for base cases.

Let us assume it is true for $n \leq k$ .

So , $T(k)=2^{k}$.

Now we have to show it is true for k+1 as well .

$T(k+1)=5*T(k)-6*T(k-1)$

$T(k+1)=5*2^k-6*2^{k-1}$

$T(k+1)=2^{k-1}(5*2-6*1)$

$T(k+1)=2^{k-1}*4=2^{k+1}$

So we proof our assumption $T(n)=2^{k}$ is true using mathematical induction.
edited by
30 30 votes

$\underline{\textbf{Given}}$

$T_0 = 1; \ T_1 = 2; \ T_n = 5T_{n-1} - 6T_{n-2} \text{ for } (n \ge 2)$


$\underline{\textbf{Observations}}$

$$\begin{align}
\begin{pmatrix}T_n \\ T_{n-1}\end{pmatrix} &= \begin{pmatrix}5 & -6 \\ 1 & 0\end{pmatrix}\begin{pmatrix} T_{n-1}\\ T_{n-2}\end{pmatrix} \\ 
&= \begin{pmatrix}5 & -6 \\ 1 & 0\end{pmatrix}\begin{pmatrix}5 & -6 \\ 1 & 0\end{pmatrix}\begin{pmatrix} T_{n-2}\\ T_{n-3}\end{pmatrix} \\ 
&= \begin{pmatrix}5 & -6 \\ 1 & 0\end{pmatrix}^{n-1}\begin{pmatrix} T_{n-(n-1)}\\ T_{n-1-(n-1)}\end{pmatrix} = \underbrace{\begin{pmatrix}5 & -6 \\ 1 & 0\end{pmatrix}^{n-1}}_{A^{n-1}}\underbrace{\begin{pmatrix} 2 \\ 1\end{pmatrix}}_{F} \\ 
\end{align}$$  

$A$ is invertible $2\times 2$ matrix. Hence, we can use the power of diagonalization to solve for $A^{n-1}$ neatly. 


$\underline{\textbf{Diagonalization}}$

$\Lambda = P^{-1}AP$ or $A = P\Lambda P^{-1}$, where $\Lambda$ is $2\times 2$ diagonal matrix and $\Lambda_{i,i} = \lambda_i$, here $\lambda_i$ is eigen value of $A$. $P$ is $2\times 2$ invertible matrix such that $P = \begin{pmatrix}e_1 & e_2 \end{pmatrix}$, where $e_i$ is eigenvector corresponding to $\lambda_i$. Hence, using diagonalization we can represent any matrix in terms of its eigenvalues and eigenvectors. 

$A^m = \underbrace{(P\Lambda P^{-1})(P\Lambda P^{-1})\dots(P\Lambda P^{-1})}_{m \text{ times}} = P\Lambda^m P^{-1} \implies \boxed{A^{n-1}F = P \Lambda^{n-1}P^{-1}F}$ 

Eigen values of $A$ are $\lambda_1 = 3$, $\lambda_2 = 2$, so $\Lambda = \begin{pmatrix}3 & 0 \\ 0 & 2 \end{pmatrix}$. $e_1 = \begin{pmatrix}3 \\ 1 \end{pmatrix}$ and $e_2 = \begin{pmatrix}2 \\ 1 \end{pmatrix}$, so $P = \begin{pmatrix}3 & 2 \\ 1 & 1 \end{pmatrix}$ and $P^{-1} = \begin{pmatrix}1 & -2 \\ -1 & 3 \end{pmatrix}$ 

$$\begin{align}
A^{n-1}F &= \begin{pmatrix}3 & 2 \\ 1 & 1 \end{pmatrix} \begin{pmatrix}3 & 0 \\ 0 & 2 \end{pmatrix} ^{n-1} \begin{pmatrix}1 & -2 \\ -1 & 3 \end{pmatrix} \begin{pmatrix} 2 \\ 1\end{pmatrix} \\ 
&= \begin{pmatrix}3 & 2 \\ 1 & 1 \end{pmatrix} \begin{pmatrix}3^{n-1} & 0 \\ 0 & 2^{n-1} \end{pmatrix}  \begin{pmatrix}1 & -2 \\ -1 & 3 \end{pmatrix} \begin{pmatrix} 2 \\ 1\end{pmatrix} \\ 
&= \begin{pmatrix}3^{n} & 2^{n} \\ 3^{n-1} & 2^{n-1}  \end{pmatrix} \begin{pmatrix} 0 \\ 1\end{pmatrix} \\ 
A^{n-1}F  &= \begin{pmatrix} 2^n \\ 2^{n-1} \end{pmatrix} \\
\end{align}$$  


$\underline{\textbf{Final Solution}}$

$\begin{pmatrix}T_n \\ T_{n-1}\end{pmatrix} = A^{n-1}F  = \begin{pmatrix} 2^n \\ 2^{n-1} \end{pmatrix} \implies T_n = 2^n$. Hence $\boxed{T_n = \Theta(2^n)}$. 

$\textbf{Option (A) is correct}$ 

1 flag:
✌ Edit necessary (C1h2a3i4t5 “Not every Invertible matrix is Diagonalizable.”)
21 21 votes

NOTE that $T(n) = 2^n $ satisfies the given recurrence relation. So, $T(n) = 2^n$ is the EXACT value of the function $T(n).$ Hence, $T(n) = \Theta(2^n).$ See HERE.

13 13 votes

Ans Is (A)

by puting n=0

B and D got elliminated  T(0)=1;

then 

by putting n=1 option c got elliminated because dont satisfyT(1)=2 and

only option remaining is A

 

1 flag:
✌ Edit necessary (Sharad Kumar “here absolute value not given, so this method is wrong”)
11 11 votes

We can use the characteristic root method to solve this recurrence relation:

Given T(n) = 5T(n-1) - 6T(n-2) n >=2

T(0) = 1 and T(1) = 2

We can write it as: 

an = 5an-1 - 6an-2  n >= 2

a0 = 1 and a1 = 2

Now solving the recurrence relation:

an - 5an-1 + 6an-2 = 0

We can also write the relation as follows by shifting n to n+2:

an+2 - 5an+1 + 6a= 0

Using the shift operator we get the characteristic eqn.,

E2(an) - 5E(an) + 6an = 0

an(E2 - 5E + 6) = 0

Finding the characteristic roots of above eqn. we will get roots as 3 and 2 [(t-3)(t-2) = 0]

As the roots are real and distinct, the complimentary function will be c1.(3)n + c2.(2)n

Hence, an = c1.(3)n + c2.(2)n

Put n = 0, a0 = c1 + c2 = 1

Put n = 1, a1 = 3c1 + 2c2 = 2

Solving both eqn, we get c1 = 0 and c2 = 1

Therefore, an = 0.(3)n + 1.(2)n = 2n

Hence the exact answer will be T(n) = 2n. Option (A) is correct.

8 8 votes

So, Roughly solving

T(n) = 5T(n-1) - 6T(n-2)

Considering values of n => {2, 3, 4, .....} (According to the given condition n>=2)

T(2) = 5T(1) - 6T(0) = 5*2 - 6*1 =  4 => 2^2

T(3) = 5T(2) - 6T(1) = 5*4 - 6*2 =  8 => 2^3

T(4) = 5T(3) - 6T(2) = 5*8 - 6*4 =  16 => 2^4

As, this follow pattern 2^n

Hence, Option (A) is correct.

Answer:
Position:
Show:

Related questions

33 33 votes
5 5 answers
28.3k
28.3k views
Arjun asked Feb 16, 2024
28,317 views
Let $\text{A}$ be an array containing integer values. The distance of $\text{A}$ is defined as the minimum number of elements in $\text{A}$ that must be replaced with ano...
48 48 votes
6 6 answers
18.4k
18.4k views
Arjun asked Feb 16, 2024
18,352 views
​​​​Consider an array $\mathrm{X}$ that contains $\mathrm{n}$ positive integers. A subarray of $\mathrm{X}$ is defined to be a sequence of array locations with consecutiv...
24 24 votes
4 4 answers
21.9k
21.9k views
Arjun asked Feb 16, 2024
21,934 views
The number of distinct minimum-weight spanning trees of the following graph is
16 16 votes
4 answers 4 answers
13.0k
13.0k views
Arjun asked Feb 16, 2024
12,962 views
​​​​​In the sequence $6,9,14, x, 30,41$, a possible value of $x$ is$25$$21$$18$$20$