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 C(n)=30*n3n2 basic operations to solve a problem with an input array of size n.
You first run the algorithm for an array of size 1000, and then for an array of size 10,000, on the same
computer.
(a) How many times longer will it run? Calculate T10,000T(1,000).
Hint: Since we use the same computer, cop will simplify out!
(b) You are considering using a supercomputer that runs 1000 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 1000 times faster than the old, we have cop1=1000cop2.
For the old computer we have T(n)=Cop1C(n). For the new computer, denote by N the new array
size. We have and T(N)=Cop2C(N).
Since the times are equal, the ratio TNT(n) should equal 1. What does this say about the ratio
Nn?(Algebra required!)
Work:
An algorithm requires C ( n ) = 3 0 * n 3 n 2

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 Programming Questions!