UGC-NET Jun 2015 · Divide & Conquer: Mergesort

MCQ · 2 marks · Problem PROG-DIVC-0013

Which of the following is asymptotically smaller?
  1. A
    lg(lg*n)
  2. B
    lg*(lgn)
  3. C
    lg(n!)
  4. D
    lg*(n!)

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionCompare the four functions.\[\lg^*(\lg n)=\lg^* n-1,\qquad \lg^*(n!)\approx\lg^* n,\qquad \lg(n!)=\Theta(n\lg n).\]So B and D grow like \(\lg^* n\), and C grows like \(n\lg n\). For A, put \(k=\lg^* n\): then \(\lg(\lg^* n)=\lg k\), which is exponentially smaller than \(k\). Hence \(\lg(\lg^* n)\) is asymptotically the smallest.Answer: A

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com