Consider the following recurrence relation:
Which one of the following options is CORRECT?
GATE CSE 2024Algorithms › Recursion & Recurrence RelationsVerified
(A) T ( n ) = Θ ( n log log n ) T(n)=\Theta(n \log \log n) T ( n ) = Θ ( n lo g lo g n )
The recurrence $T(n)=\sqrt{n}\,T(\sqrt{n})+n$ is not in standard constant-coefficient divide-and-conquer form, so normalize by dividing throughout by $n$. This converts the multiplicative factor $\sqrt{n}$ into an additive 1, yielding a simpler recurrence whose depth determines the cost.
Dividing the recurrence by $n$ gives $S(n)=S(\sqrt{n})+1$, and the substitution $n=2^{k}$ yields $Q(k)=Q(k/2)+1=\Theta(\log k)$. Hence $S(n)=\Theta(\log\log n)$ and $T(n)=\Theta(n\log\log n)$, i.e. option A.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.