retagged by
266 views

1 Answer

Best answer
5 votes
5 votes

$\tt T(n) = 9T(\frac{n}{2}) + n$

Here $a = 9$, $b = 2$, $k = 1$. and $a \gt b^k$

Thus, $\color{navy}{ T(n) = \theta(n^{log_2(9)})}$, only $3^n$ upper bounds answer, but it isn't average bound. So, it's wrong to say $T(n) = \theta(n^{log_2(9)}) = \theta(3^n)$


If recurrence was $\tt T(n) = 9T(\frac{n}{3}) + n$, Then correct answer would be $\theta(n^2)$

selected by

Related questions

2 votes
2 votes
1 answer
1
1 votes
1 votes
2 answers
2
1 votes
1 votes
0 answers
4
syncronizing asked Mar 15, 2019
1,325 views
Is this the correct way to solve ?Q) int algorithm(int n){ int sum =0;k,j; for (k=0;k<n/2;k++) for(j=0;j<10;j++) sum++; return 4*algorithm(n/2)*algorit...