Mean execution time Task 2a: Mean Execution Time · Define all the classes in the new package: alg.analysis · implement and execute Time analysis in java files . t test values 1-30: 636.6, 31.60,...

1 answer below »
part of it done, the rest needs to be completed


Mean execution time Task 2a: Mean Execution Time · Define all the classes in the new package: alg.analysis · implement and execute Time analysis in java files . t test values 1-30: 636.6, 31.60, 12.92, 8.610, 6.869, 5.959, 5.408, 5.041, 4.781, 4.587, 4.437, 4.318, 4.221, 4.140, 4.073, 4.015, 3.965, 3.922, 3.883, 3.850, 3.819, 3.792, 3.768, 3.745, 3.725, 3.707, 3.690, 3.674, 3.659, 3.646). · Test and debug – PS: task is complete but will not debug and execute. task 2b: Modify number of trials and added numbers · Try to run the test method with 1001 trials (it may take some time). · Repeat all the tests for adding 100 million and 1 billion numbers (some tests may take some time). Task3 · Run the test method 4 times. · Analysis table for 100 million . Create a table for 100 millions increasing the number of executions 10 by 10 starting with 11 and ending with 101. · Run the test once. · ANSWERS?: Do we need more executions? When will you stop? Which is the best tradeoff between time needed to compute a better mean and the precision of the mean? Justify your selction.  Your processor may have different speeds, and you may see a sudden change in the executtion time. If your table shows one, why do you think it appeared? · Analysis table for 1 billion · Create a table for 1 billion increasing the number of executions 10 by 10 starting with 11 and ending with 101. · Run the test once. Task 1: Linear Growth - Sum of first N positive integers Define all the classes in the new package: alg.analysis.linear a. Initial implementation · As you watch the video, implement and execute all the described Java files (be sure your files are the same with this video). · Test and debug the program · ANSWERS  PDF: Compare your results with the results in the video and describe in a short paragraph why do you think they are or they are not different.  · Table from 100M  to 200M · Run the program again, from 100 millions to 200 millions with an increment of 10 millions. · If your execution takes too long, do you need to reduce the sample size, from 41 to a lower value? If yes, what value you will pick. · Test and debug the program · ANSWERS   Analyze the results. How they are different or similar with the results from the previous table.  · Table from 100M  to 1B · Run the program again, from 100 millions to 1 billion with an increment of 100 millions. · Do you need to reduce the sample size, from 41 to a lower value? If yes, what value you will pick. · ANSWERS  : Analyze the results. How they are different or similar with the results from the previous table. What conclusion you can make about checking the order of growth? Which test will be the easier to do? Which test will give more confidence in result? Task 2: Quadratic Growth - Two sum problem Define all the classes in the new package: alg.analysis.quadratic a. (similar with ttask 1a) Replace the sum of the first N integers with the two sum method brute force (https://algs4.cs.princeton.edu/14analysis/TwoSum.java.html). Be sure you generate randomly the array for each trial in a similar way like in: (https://algs4.cs.princeton.edu/14analysis/DoublingTest.java.html). Create a single test to check the order of growth.  · (similar with task 1b/c) Identify which are good initial values, increment and end value for your growth table. Analyze the data and explain how you validate tha the method has quadratic growth. Create another growth table, with different initial, increment and end values, and repeat the process. Which experiment is bettter? Why? Include the execution result, · Modify the method to run faster, in linearithmic growth, using https://algs4.cs.princeton.edu/14analysis/TwoSumFast.java.html. Perform the same type of analysis as in the point b above. Include the growth table and your answers in the corresponding PDF files Task 3: Cubic Growth - Three sum problem Define all the classes in the new package:alg.analysis.cubic a. Create a growth table for the three sum problem: https://algs4.cs.princeton.edu/14analysis/ThreeSum.java.html. Create a single test to check the order of growth. b. Similar with Task 2b but applied to three sum problem. c. Similar with Task 2c for: https://algs4.cs.princeton.edu/14analysis/ThreeSumFast.java.html with an expected theoretical time of N2logN
Answered Same DayFeb 16, 2022

Answer To: Mean execution time Task 2a: Mean Execution Time · Define all the classes in the new...

Arun Shankar answered on Feb 17 2022
104 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here