Redirected
retagged by
902 views
0 votes
0 votes

retagged by

4 Answers

Best answer
2 votes
2 votes

Given $T(n)=2T(\sqrt n) + n$

Substitute $n=2{^m}$, we get

$T(2^{m})=2T(2^{m/2}) +2^{m}$

We can write a new recurrence relation as

$S(m)=2S(m/2) +2^{m}$

$S(m)=\Theta (2^{m})$

$T(n)=\Theta (n)$

Hence option c) is correct

selected by
0 votes
0 votes
put n=2^m

T(2^m)=T(2^(m/2))+2^m

T(2^m)=S(m)

S(m)=S(m/2)+2^m

use master theorem

m^(log2)=m

2^m=w(m)

so ,

S(m)=2^m

T(2^m)=2^m

T(n)=n
0 votes
0 votes

substitute n = 2m

Then apply master's theorem.

you'll get O(n).

Related questions

0 votes
0 votes
0 answers
2
pradeepchaudhary asked Aug 20, 2018
899 views
T (n) = T (n/2) + 2nUsing Master's Method What is the Complexity Of This Recurrence Relation?Or Using AnyOther Method?
0 votes
0 votes
2 answers
3
manvi_agarwal asked Aug 10, 2018
1,745 views
Solution using back substitution methodT(n) = 2T(n/2) + nlogn ?detailed solution please.ans is nlognlogn or n(logn)^2
0 votes
0 votes
1 answer
4
Rahul Ranjan 1 asked Aug 6, 2018
1,648 views
How can we apply Masters theorem to these equations : T(n) = 16*T(n/4) + n!and T(n) = 4*T(n/2) + cnPlease explain the process.