edited by
512 views
0 votes
0 votes

T(n) = T(sqrt(n)) + n

Taking 2m = n we can convert this as 

S(m/2) + 2m

after this how to solve by masters?

edited by

1 Answer

–1 votes
–1 votes

T (n)=T (n^1/2) + n

Divide by n

T (n) / n = T (n1/2)/n + 1

Consider n=2m

S (m) = T (n)/n

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

S (m) = log

Now, logm= T (n)/n

T (n) = n×logm 

Since, n=2m or m=logn

T (n) = n log(log n)

Related questions

1 votes
1 votes
0 answers
1
syncronizing asked Mar 15, 2019
1,298 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...
1 votes
1 votes
1 answer
2
VikramRB asked Jan 20, 2019
1,042 views
What is the time complexity of the following recurrence relation and step to derive the same$T(n) = T(\sqrt{n}) + log(logn)$
0 votes
0 votes
1 answer
3
0 votes
0 votes
2 answers
4