For parameters a and b, both of which are ω(1), T(n) = T(n1/a) + 1, and T(b) = 1.

Then T(n) is

A.

Θ(logalogbn)

B.

Θ(logabn)

C.

Θ(logblogan)

D.

Θ(log2log2n)

Solution:

Tn=Tn =T(n1/a)    if n  bTn=1               if n = b

Given: T(n) = T(n1/a) + 1

T(n1/a) = T(n1/a2) + 1

T(n1/a2) = T(n1/a3) + 1

From Above Equations,
T(n) = T(n1/a3) + 3

After k iteration,

T(n) = T(n1/ak) + k

When, n1/ak = b  ---- (1)

Apply log both sides on equation (1)

1aklogn=logb

1ak=logblogn

ak=lognlogb

Apply log again on both sides with base a,

k = logalogbn

a and b are some functions of n and are not constant. So a and b can’t be replaced with 2. So Option D is rejected and the correct answer is Option A.