Give as good a big-O estimate as possible for the following functions : \((n\log n+n^{2})(n^{3}+2)\) and \((n!+2^{n})(n^{3}+\log(n^{2}+1))\)
UGC NET - 2013,
Answer: C
The first function (n log n + n^2)(n^3 + 2) is dominated by n^2 x n^3 = n^5 since n log n is smaller than n^2 and 2 is smaller than n^3, so it is O(n^5). The second, (n! + 2^n)(n^3 + log(n^2 + 1)), has n! growing faster than 2^n and n^3 faster than the logarithm, so it is O(n^3 x n!). The pair is O(n^5) and O(n^3 x n!), option (C). Options (A) and (D) keep a lower order term, 2n^2, which a big-O estimate drops, and (B) and (D) give 2^n in place of n! in the second function, which understates its growth because n! is much larger than 2^n.
Please log in or register to report this question.