Question: An algorithm requires C ( n ) = 3 0 * n 3 n 2 basic operations to solve a problem with an input array
An algorithm requires basic operations to solve a problem with an input array of size
You first run the algorithm for an array of size and then for an array of size on the same
computer.
a How many times longer will it run? Calculate
Hint: Since we use the same computer, cop will simplify out!
b You are considering using a supercomputer that runs times faster than the current one. How much
larger is the array that can be solved on the supercomputer in the same amount of time as on the old
computer?
Hints:
If the supercomputer is times faster than the old, we have
For the old computer we have For the new computer, denote by the new array
size. We have and
Since the times are equal, the ratio should equal What does this say about the ratio
Algebra required!
Work:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
