Search code examples
algorithmbig-oasymptotic-complexitylogarithm

Prove that logn is O(2^ sqrt(logn))


I started with log n <= c.2^sqrt(log n) but could not arrive at the desired solution.


Solution

  • lg(x) < sqrt(x) for large x. Therefore, lg(log n) < sqrt(log n) for large n (substituting log n for x).

    Raising 2 to the power of both sides yield the result: log n < 2^sqrt(log n) for large n.