Question: Imagine that you wrote a program and measured its execution time as a function of N. The results of your execution are shown in the

Imagine that you wrote a program and measured its execution time as a function of N. The results of your execution are shown in the table below. You can assume that the program's running time follows a power law T(N) ~ a middot N^b. We have packaged the four algorithms TwoSumFast, TwoSum, ThreeSumFast and ThreeSum in a jar file that you can download from (https: //github.com/idl020/lab2-runningtimes/blob/master/runningtimes.jar? raw=true). Also, a simple program has been added to measure the execution time of each of the algorithms for some given input. For example, if you want to measure the time taken by TwoSum for a file of 1000 numbers, you should run > java -jar runningtimes.jar 2sum 1000 1000 0.006 The program prints back the input size which is 1000 and the time taken which is 0.006 seconds. Estimate the amount of time it would take to run TwoSumFast, TwoSum, ThreeSumFast and ThreeSum on your computer to solve the problems for a file of 1048576 numbers. Notice that measuring the execution time is not feasible for all points, so you have to think about predicting time for those point you can't measure. Please answer if the time it would take for each algorithms (TwoSumFast, TwoSum, ThreeSumFast and ThreeSum) to solve the problems for a file of 1048576 numbers: a) Milliseconds or seconds b) Minutes or hours c) Hours or days d) Months e) Years
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
