Machine-translated by Google. Questions are authored in English.
Top

Discussion

The correct ordering of the growth rates \(3^{n}\), \(n^{3}\), \(3^{3}\), \(\log_{3} n\) is :

  • A.\(\log_{3} n,\ n^{3},\ 3^{3},\ 3^{n}\)
  • B.\(\log_{3} n,\ 3^{3},\ n^{3},\ 3^{n}\)
  • C.\(3^{3},\ \log_{3} n,\ 3^{n},\ n^{3}\)
  • D.\(3^{3},\ \log_{3} n,\ n^{3},\ 3^{n}\)

Answer: D

The correct order is \(3^{3},\ \log_{3} n,\ n^{3},\ 3^{n}\).

\(3^{3} = 27\) is a constant, which does not grow at all. A logarithm grows, but more slowly than any power of n. A polynomial \(n^{3}\) grows more slowly than any exponential function, so \(3^{n}\) is the fastest:

\[ O(1) \lt O(\log n) \lt O(n^{3}) \lt O(3^{n}) \]

Options (A) and (B) put \(\log_{3} n\) below a constant, which is wrong for large n, and (A) also puts the constant after \(n^{3}\). Option (C) puts \(3^{n}\) before \(n^{3}\), but the exponential eventually outgrows any polynomial.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.