Redirected
edited by
798 views
1 votes
1 votes

iterated logarithmic function is defined as

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

Which of the following is true?

  1. $\log^*n = O(\log(\log n ))$
  2. $(\log^*n)!= O(\log n)$
  3. $\log^* n = \Theta(\log n)$
  4. $(\log^*n)^n= O((\log n)!)$
edited by

2 Answers

Best answer
4 votes
4 votes

This is better done by taking larger values of  'n' ..

Let  $n  =  2^{65536}$

So evaluating the iterated logarithmic function as defined in the question for $n  =  2^{65536,$  we get :

$\log ^* (2^{65535})   =  1 + \log ^* (65536)$  

$\qquad =  1 + 1 + \log ^* (16)$

$\qquad =  1 + 1 + 1 + \log ^* (4)$

$\qquad =  1 + 1 + 1 + 1 + \log ^* (2)$

$\qquad =  1 + 1 + 1 + 1 + 1 + \log ^* (1)$

$\qquad  =  5$

Hence  $\log ^* (2^{65536})    =   5$

Now $\log(\log(2^{65536})     =   16$

And this distance between log * (n) and log(logn) will further increase with increase of 'n'..

Hence  log * n   =   O(log(logn))  is true

Now (log * n)!    for the taken value of 'n'   =   5!  =  120

       $ \log n     =    \log 2^{65536}      =    65536$

And this distance will further increase with higher value of 'n'

Hence    (log * n)!  =   O(logn) should be true as well.

Option C is clearly false as $\log^* n = o(\log n)$ as shown for option A.

Now

$(\log ^* n)^n      =   5^{2^{65536}}$

$(\log n)!         =   (65536)!$

Now clearly  the first one in this case is greater than the second one. One can verify this by comparing $5^{2^n}  = (n!)$ ..So taking log both sides , we get :  $2^n$  in LHS and  $\log(n!) = n\log n$ in RHS so LHS  > RHS .

Hence $(\log^* n)^n   =   \omega ((\log n)!)$ and not $O((\log n)!)$

Hence A,B) should be the correct option .

edited by
2 votes
2 votes
For this we have to consider a large number .Let us take $n = 2^{1000}$ for our calculation.

So using the above definition ,

A) $\log^*(2^{1000}) = 4$   and   $\log(\log 2^{1000}) = 9$

With higher numbers this difference will further increase.

So , $\log^* n = O(\log(\log n))$

So statement A should be true.

B) $(\log^*2^{1000}) !  =   4!   = 24$   and  $\log 2^{1000} =  1000$

So LHS is already much smaller than RHS.

Hence statement B is also true.

Now let us come to the trickiest claim

C) False, as option A is true

D)  $(\log6 * 2^{1000})2^{1000}   =     4^{2^1000}$        and

RHS  =   $((\log2^{1000} )!)   =   (1000)!$

 Now here let $x = 1000$  and let $a = 4$..Hence LHS can be rewritten as:

  $a^{2^x}$   and   RHS can be written as $x !$

 Now to compare these , applying logarithm both sides , we have :

 $2^x \log a$   and RHS is $\log(x)!$ which can be approximated as $x\log x$ [By Stirling's approximation]

 So obviously,  $2^x \log a > x\log x$

    (or)            $2^x\log a = \omega(x\log x)$

    (or)            LHS    =  $\omega$(RHS)

Hence the claim D) is false.

Hence , in the given question , statements A) and B) only should be true.
edited by
Answer:

Related questions

1 votes
1 votes
1 answer
2
Hira Thakur asked Aug 14, 2016
981 views
Big oh estimate forf(x)=(x+1)log($x^2 +1$)+3$x^2$ is given as1.O(xlogx)2.O($x^2$)3.O($x^3$)4O($x^2$logx)
0 votes
0 votes
1 answer
3
deepti asked Jul 31, 2016
490 views
It is given in CLRS book chapter 3, page no. 56 that lg^k(n) = (lg n)^k. Can somebody please give me an example or check if my example is correct? Shoudn't lg^k(n) be { l...