edited by
47,294 views
14 votes
14 votes
Please tell me the complete steps how to solve this problem.

$ T(n) = T ( \sqrt n )+ 1$
edited by

5 Answers

0 votes
0 votes
By backward substitution, We may finally get like this,

k T(n^(1/2^k))+k-1

and given that T(2)=1

So, n^(1/2^k)=2

1/2^k . logn = 1

2^k = logn

K.log2 = log(log n)

So, our equation will be,

log(logn)[1]+log(log n) -1

O(log log n)

I followed this same procedure even in GATE, but I did very minor mistake and I wrote equation like this, "k T(n^(1/k))+k-1 and my whole answer changed to log(n) only which is technically right for me, but question wise not! Such a big mistake!!!!

Related questions

0 votes
0 votes
1 answer
1
3 votes
3 votes
2 answers
2
Tony Bayan asked Jun 4, 2016
12,588 views
0 votes
0 votes
1 answer
3
lucasbbs asked Feb 28, 2022
6,856 views
How do I apply the master theorem in the above recurrence? Please give details about which case and on hiow to solve the asymptotic analysis...
4 votes
4 votes
2 answers
4
gmrishikumar asked Nov 22, 2018
11,615 views
T(n) = sqrt(n) * T(sqrt(n)) + n Given solution is O(log log n). But my solution is O(n log log n).'wolframalpha'' shows the answer same as mine. You can find the solution...