Question

For parameters aa and bb, both of which are ω(1)\omega(1), T(n)=T(n1/a)+1T(n) = T(n^{1/a}) + 1, and T(b)=1T(b) = 1. Then T(n)T(n) is

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2020 answer key

Solution

Use repeated substitution or change of variables via iterated logarithms to solve the recurrence.

We are given the recurrence T(n)=T(n1/a)+1T(n) = T(n^{1/a}) + 1 with base condition T(b)=1T(b) = 1, where a,b=ω(1)a, b = \omega(1).

Take the logarithm to base bb on both sides of the argument. Let n=bakn = b^{a^k}. Then:

log⁡bn=ak  ⟹  log⁡a(log⁡bn)=k\log_b n = a^k \implies \log_a(\log_b n) = k

In each step of the recurrence, nn is replaced by n1/an^{1/a}:

log⁡b(n1/a)=1alog⁡bn=aka=ak−1\log_b(n^{1/a}) = \frac{1}{a} \log_b n = \frac{a^k}{a} = a^{k-1}

Thus, the power kk decreases by 1 in each recursive step. The base case is reached when n=bn = b, which corresponds to log⁡bn=1=a0\log_b n = 1 = a^0, so k=0k = 0.

The number of steps required to reach the base case is kk. Since each step contributes +1+1, we have:

T(n)=k+1=Θ(k)=Θ(log⁡alog⁡bn)T(n) = k + 1 = \Theta(k) = \Theta(\log_a \log_b n)
Final answer

A

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2020 Computer Science and Information Technology (CS)
Question
12 of 65, printed as CS Q.2
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.