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.
Can't find a solution anywhere?
NEED A FAST ANSWER TO ANY QUESTION OR ASSIGNMENT?
Get the Answers Now!You will get a detailed answer to your question or assignment in the shortest time possible.
Here's the Solution to this Question
A.i.
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.