Iterative Logarithm in Recurrence Relation?

911 Views Asked by At

Anyone Could describe me How we can solve this recurrence relation?

$T(n) = T(\log n) + O(1)$

$T(1) = 1$

a) $O(\log n)$

b) $ O (\log^* n) $

c) $ O (\log^2 n) $

d) $ O (n / \log n) $

Our TA Solution: she say, this is iterative logarithm and the answer would be (1)

1

There are 1 best solutions below

7
On BEST ANSWER

The notation $\log^* n$ is defined by:

$$ \log^* n = \begin{cases} 0 & \text{if }n\le 1 \\ 1+\log^* (\log n) & \text{otherwise} \end{cases} $$

That looks very much like your recurrence, modulo a constant term (except your recurrence looks like it needs some implicit rounding somewhere in order to make sure you reach the base case).

The TA is right that your $T$ is also $O(\log n)$, but that is not the best bound among the options. In fact $T$ is in each of the 4 possible complexity classes, but $O(\log^* n)$ is the tightest one.