1. A. (20p) Give a Big-O estimate that is as good as possible for each of the following functions. i. (n^3 + n)(logn + n) ii. (n + 1000)(logn + 1) B. (15p) If these are complexities of algorithms that solve the same problem, which one would you prefer? Why? C. (15p) Considering the Big-O complexity, how many times is your choice faster with respect to the other solution for an input size of 2^16? Note: The base of logarithm is 2
The Answer to the Question
is below this banner.
Here's the Solution to this Question
ii. B. The second estimate of the complexity is preferable, as its growth is much more slower.
C. If n=216 then
and the second estimate of the complexity is 244 times better.