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

Discussion

Big - O estimate for \(f(x) = (x + 1)\log(x^{2} + 1) + 3x^{2}\) is given as

  • A.\(O(x \log x)\)
  • B.\(O(x^{2})\)
  • C.\(O(x^{3})\)
  • D.\(O(x^{2} \log x)\)

Answer: B

The estimate is O(x^2). For large x, log(x^2 + 1) is about 2 log x, so the first term (x + 1) log(x^2 + 1) grows like x log x, which is smaller than x^2. The second term, 3x^2, grows as x^2.

\[ f(x) = O(x \log x) + O(x^2) = O(x^2) \]

The dominant term decides, so O(x log x) is too small and O(x^3) and O(x^2 log x) are valid upper bounds but not the tightest. The standard estimate is O(x^2).

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

Post your comment

Please log in or register to post a comment.