Question: You have been given the following algorithm: for i=1 to n for j=1 to n/2 a=a+ij for i=1 to 2n for j=1 to 17n z=z+ij

 You have been given the following algorithm: for i=1 to n

You have been given the following algorithm: for i=1 to n for j=1 to n/2 a=a+ij for i=1 to 2n for j=1 to 17n z=z+ij (i) Derive and justify its time complexity using 'Big-O' notation (ii) You have been given the following execution times for a program which implements this algorithm. The program has two parts. The first is constant and independent of n - a fixed overhead, the second implements the algorithm above. Estimate and justify how long it would take to execute for n=2000

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!