Question: For the next few questions, consider defining a time function with respect to n . That is , if the algorithm is linear, we could

For the next few questions, consider defining a time function with respect to n. That is, if
the algorithm is linear, we could write the time that it takes as a function of n:
t = f(n)= cn
If it is quadratic, we could write it as a quadratic function:
t = f(n)= cn2
Both of these instances ignore lower order terms. If we know the time it takes for a particular
value of n then we can compute the constant c and consequently predict the time t it takes
for other values of n or vice versa.
3.5 points An algorithm takes 4.5 ms for an input size 100. How long will it take for
input size 2000(assuming that low-order terms are negligible) if the running time is
(a) linear
(b) O(n log n)
(c) quadratic
(d) cubic
(e) exponential

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!