1

I have the following two functions

  • $f(n) = n\sqrt n + n \log n$
  • $\log_{100} n$

And I need to classify them into the followings:

  • $O(n)$, and/or
  • $O(n^2)$, and/or
  • $O(n^3)$, and/or
  • $O(n^{1.5})$, and/or
  • $\omega(n)$, and/or
  • $o(n\log n)$ (small o)
  • $\theta(n^{1.5})$,

Regarding the $\theta(n^{1.5})$, I am grasping it's idea newly, where do these functions set in. Also, does the function $f(n) =n^{0.9999}$ belong to $\theta(n^{1.5})$.

I would appreciate your feedback, as from your answers I am building up the knowledge for these.

tony9099
  • 151
  • 1
  • 6

1 Answers1

1
  • $\log_{100}n \in \mathcal{O}(log(n))$ since base change is a constant.
    • $\log n \in \mathcal{O}(n) $
    • $\log n \in \mathcal{O}(n^2) $
    • $\log n \in \mathcal{O}(n^3) $
    • $\log n \in \mathcal{O}(n^{3/2}) $
    • $\log n \not\in \mathcal{\omega}(n) $
    • $\log n \in \mathcal{o}(n \log n) $

This table gives the order;

First of all;

$$\lim_{n \rightarrow \infty} \frac{n \sqrt n}{n \log n} = \infty$$ by using this;

  • $f(n)= n\sqrt n + n\log n \in \mathcal{O}(n\sqrt n )$.
    • $ n\sqrt n \not\in \mathcal{O}(n)$
    • $n\sqrt n \in \mathcal{O}(n^2) $
    • $n\sqrt n \in \mathcal{O}(n^3) $
    • $n\sqrt n \in \mathcal{O}(n^{3/2}) $
    • $n\sqrt n \in \mathcal{\omega}(n) $
    • $n\sqrt n \not\in \mathcal{o}(n \log n) $,
kelalaka
  • 1,171
  • 1
  • 10
  • 19