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,161
  • 1
  • 10
  • 19
  • Please remember that we're not a homework answering service. Answers that don't teach people how to solve the problem aren't very valuable at all. – David Richerby Oct 17 '18 at 19:51
  • Most questions of the for "Is this function big-O of this other function" can be flagged as duplicates of the one I marked. That question covers the general techniques and there's usually not much more to say, since the same functions tend to be used as examples each time. – David Richerby Oct 17 '18 at 20:13
  • @kelalaka Thanks a lot for your input :) I have edited the question and added a new bound as well as a new function. I would appreciate if you can have a look :) (PS: this is not a homework) – tony9099 Oct 18 '18 at 16:36
  • Take the limit at WolframAlpha. That easy. – kelalaka Oct 18 '18 at 16:39