• edited by
2,481 views
13 13 votes

Consider the following recurrence relations:

For all $n>1$,
\[
\begin{array}{c}
T_{1}(n)=4 T_{1}\left(\frac{n}{2}\right)+T_{2}(n) \\
T_{2}(n)=5 T_{2}\left(\frac{n}{4}\right)+\Theta\left(\log _{2} n\right)
\end{array}
\]
Assume that for all $n \leq 1, T_{1}(n)=1$ and $T_{2}(n)=1$.

Which one of the following options is correct?

  1. $T_{1}(n)=\Theta\left(n^{2}\right)$
  2. $T_{1}(n)=\Theta\left(n^{2} \log _{2} n\right)$
  3. $T_{1}(n)=\Theta\left(n^{\log _{4} 5}\right)$
  4. $T_{1}(n)=\Theta\left(n^{\log _{4} 5} \log _{2} n\right)$

7 Answers

13 13 votes

We can see that equation of T1 has T2 in it.

 

 so first lets calculate T2.

 

(you will understand only if you know basics to use masters theorem).

 

• moved by
Answer:
Position:
Show:

Related questions

6 6 votes
3 3 answers
2.2k
2.2k views
gatecse asked Feb 23
2,151 views
Let $n$ be an odd number greater than $100$. Consider a binary minheap with $n$ elements stored in an array $P$ whose index starts from $1$.Which of the following indices...
10 10 votes
2 answers 2 answers
1.8k
1.8k views
gatecse asked Feb 23
1,754 views
Consider a hash table $P[0,1, \ldots, 10]$ that is initially empty. The hash table is maintained using open addressing with linear probing. The hash function used is $h(x...
8 8 votes
5 5 answers
3.6k
3.6k views
gatecse asked Feb 23
3,606 views
The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree. The maximum possible height of a full binary tree with $23$ no...
9 9 votes
4 4 answers
3.1k
3.1k views
gatecse asked Feb 23
3,101 views
Let $P$ be the set of all integers from $1$ to $15$. Consider any order of insertion of the elements of $P$ into a binary search tree that creates a complete binary tree....