retagged by
12,608 views

2 Answers

12 votes
12 votes

Given, $T(n) = T(\sqrt[2]{n}) + log n$

Let consider $ n = 2^k $ then recurrence equation will be 

$T(2^k) = T(n^{\frac{k}{2}}) + log (2^k)$

Now lets consider $T(2^k) = S(k)$ then the recurrence relation will be 

$S(k) = S(\frac{k}{2}) + k $

Now this can be solved easily by Master theorem (3rd Case),

$S(k) = k $

so, $T(n) = log n $

3 votes
3 votes

T(n)=T(√n)+logn

n=2m

T(2m)=T(n)=S(m)

 T(√n) =S(m/2) 

logn=log 2m =m

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

By masters Theorem 

a=1 b=2 k=1 p=0

case : a<bk

Therefore T(n) =O(nklogpn)

S(m)=O(m)

T(2m)=O(m)

since 2=n =>m=logn

T(n)=O(m)=O(logn)

Therefore T(n)=O(logn)

Related questions

4 votes
4 votes
1 answer
1
Sanjay Sharma asked May 26, 2016
18,784 views
the solution of recurrence relationT(n)=2T(floor(sqrt(n))+log n
0 votes
0 votes
1 answer
2
14 votes
14 votes
5 answers
3
Jonathan Decosta asked Jun 10, 2015
47,329 views
Please tell me the complete steps how to solve this problem.$ T(n) = T ( \sqrt n )+ 1$
0 votes
0 votes
1 answer
4
lucasbbs asked Feb 28, 2022
6,880 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...