3

I have the following functions that I need to rank in increasing order of Big-O complexity:

$$(\log n)^3, 10\sqrt n, n\log n, n\sqrt n, n^4 + n^3, (2.1)^n \cdot n^2, 3^n, 2^n \cdot n^3, n! + n, n^n. $$

My current ranking is as follows:

$$(\log n)^3 < 10\sqrt n < n\log n < n\sqrt n < n^4 + n^3 < (2.1)^n \cdot n^2 < 2^n \cdot n^3 < 3^n < n! + n < n^n. $$

Is my ranking of the functions in increasing order of complexity correct?

Yuval Filmus
  • 276,994
  • 27
  • 311
  • 503
Broadsword93
  • 147
  • 1
  • 3
  • This question would probably be much more useful to others if you focus on the specific comparison you're not sure about (even if this means splitting it into multiple questions if there are a few you're not sure about). That could probably also help with your overall understanding, as you may think things are in a certain order, but you're not sure why or you believe so for the wrong reason. Focusing on one comparison allows for an in-depth explanation of why one is bigger than the other. Also, if this is homework, can't you just hand it in to be marked and see if it's correct? – Bernhard Barker Oct 06 '20 at 18:05
  • https://cs.stackexchange.com/q/824/755 – D.W. Oct 06 '20 at 19:13
  • We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher. – D.W. Oct 06 '20 at 19:13

1 Answers1

13

You have mistake in $(2.1)^n \cdot n^2<2^n \cdot n^3$, because it is equivalent $\left(\frac{2.1}{2}\right)^n<n$

zkutch
  • 2,364
  • 1
  • 7
  • 14