0

I am trying to rank $\log n $, $\log_{10} n $, $n \log n $, $n \log n^2 $, $n^{0.8}$, $\sqrt{n}$ in increasing asymptotic complexity. $\log n $ has base 2 unless specified otherwise.

The answer I have is $\log_{10} n $, $\log n $, $\sqrt{n}$, $n^{0.8}$, $n \log n$, $n \log n^2$,

Is this right? And possibly explain the reason behind it? thank you!

A.Schulz
  • 12,252
  • 1
  • 42
  • 64
shycat
  • 1
  • 1
  • 1

1 Answers1

0

The answer is correct. Let's verify it

$\log_{10}n $ and $\log{n}$ belong to the complexity class $O(\log{n})$, because they differ by a constant factor, hence $\log_{10}n \asymp \log{n}$.

$n^{0.8} \succ \sqrt{n}$, because $0.8 > \frac{1}{2}$. The last pair $n\log{n}$ and $n\log{n}^2$ belong to the complexity class $O(n\log{n})$ because they also differ by a constant factor ($n\log{n^2} = 2n\log{n}$), hence $n\log{n} \asymp n\log{n^2}$. Finally we'll show that $\sqrt{n} \succ \log{n}$ and $n\log{n} \succ n^{0.8}$. The last one is obvious and I'll leave to you to prove that $\sqrt{n} \succ \log{n}$ (I claim that is true, if you face problems with it I'll expand the answer with proof).

0xdeadcode
  • 128
  • 1
  • 6