Solve the given recursive equation

49 Views Asked by At

Question

Solve the given recursive equation

$T(n)=4T(\sqrt n)+(\log n)^2 $

My Approach

$$T(n)=4T(n^\frac{1}{2})+(\log n)^2$$ $$=4(4T(n^\frac{1}{2^2})+(\log n^\frac{1}{2})^2)+(\log n)^2$$ $$=4^{2}T(n^\frac{1}{2^2})+(\log n)^2+(\log n)^2$$ $$=4^{k}T(n^\frac{1}{2^k})+.....(\log n)^2+(\log n)^2$$ $$=k \times (\log n)^2$$

We need to find the value of $k$,

Assuming base condition to be $T(2)=2$

$$n^\frac{1}{2^k}=2 \Rightarrow 2^k =\log n \Rightarrow k=\log \log n$$

hence solution to recursive equation is $\log \log n \times (\log n )^2$

Is it right?