Question: This must be written in Java. You needed to submit a document where you discussed the time complexity of one of the two algorithms given
This must be written in Java.

You needed to submit a document where you discussed the time complexity of one of the two algorithms given to you here. One way to support you claim to benchmark it and plot the time your running algorithm spanned for multiple varying inputs(It is not the only way, but it is the easiest). You must discuss the complexity of the algorithm you benchmarked. For lab 2, you will need to write a document in LaTex. I personally would recommend overleaf.com for doing so. If you didn't get an invite to the site either ask one of your classmates to invite you, or simply sign up there. For writing equations, I would advise using an equation editor until you get used to the LaTex syntax. Link to equation editor: http://www.codecogs.com/latex/eqneditor.php Your Algorithm is numerical integration . However, you will need to convert the code presented in the Rosetta code link into a parallel stream and a sequential stream. Afterwards, you will need to benchmark the original implementation, the parallel stream implementation, and the sequential stream implementation and plot their time for varying inputs. [If you wish to be given an exact function to test, then use the following function) 0 Determine the time complexity and the space complexity of the function you are benchmarking and back up your claim with the data you collect. You will need to figure out the number of virtual processors you will be running on a given machine. You can find that using the runtime library int maxThreads Runtine getRuntime().availableProcessors Here is a template you can use to start your laTex document. https://www.overleaf.com/read/xmfxxfwwmkhw For this Lab you need to assign the appropriate time complexity for the algorithm you decide to benchmark. Like Galileo's scientific method, you want to satisfy your assumption with empirical data. What you need to do for this project is to generate a collection and populate it with random numbers You then have to benchmark the said algorithm on increasing input sizes and demonstrate that the rate of growth for your algorithm meets the asymptotic notation you use for the algorithm you decide to use. Provide a paragraph explaining your decision and how the algorithm work. Code analysis is also encouraged. Good luck. PS: IF YOU DO NOT WANT TO USE STREAMS, USE THE EXECUTOR FRAMEWORK TO RUN YOUR CODE IN PARALLEL! nt naxThreads Executorservice pool Executors.newFixedThreadPool (maxThreads); - Runtine.getRuntie(.availableProcessors(); You needed to submit a document where you discussed the time complexity of one of the two algorithms given to you here. One way to support you claim to benchmark it and plot the time your running algorithm spanned for multiple varying inputs(It is not the only way, but it is the easiest). You must discuss the complexity of the algorithm you benchmarked. For lab 2, you will need to write a document in LaTex. I personally would recommend overleaf.com for doing so. If you didn't get an invite to the site either ask one of your classmates to invite you, or simply sign up there. For writing equations, I would advise using an equation editor until you get used to the LaTex syntax. Link to equation editor: http://www.codecogs.com/latex/eqneditor.php Your Algorithm is numerical integration . However, you will need to convert the code presented in the Rosetta code link into a parallel stream and a sequential stream. Afterwards, you will need to benchmark the original implementation, the parallel stream implementation, and the sequential stream implementation and plot their time for varying inputs. [If you wish to be given an exact function to test, then use the following function) 0 Determine the time complexity and the space complexity of the function you are benchmarking and back up your claim with the data you collect. You will need to figure out the number of virtual processors you will be running on a given machine. You can find that using the runtime library int maxThreads Runtine getRuntime().availableProcessors Here is a template you can use to start your laTex document. https://www.overleaf.com/read/xmfxxfwwmkhw For this Lab you need to assign the appropriate time complexity for the algorithm you decide to benchmark. Like Galileo's scientific method, you want to satisfy your assumption with empirical data. What you need to do for this project is to generate a collection and populate it with random numbers You then have to benchmark the said algorithm on increasing input sizes and demonstrate that the rate of growth for your algorithm meets the asymptotic notation you use for the algorithm you decide to use. Provide a paragraph explaining your decision and how the algorithm work. Code analysis is also encouraged. Good luck. PS: IF YOU DO NOT WANT TO USE STREAMS, USE THE EXECUTOR FRAMEWORK TO RUN YOUR CODE IN PARALLEL! nt naxThreads Executorservice pool Executors.newFixedThreadPool (maxThreads); - Runtine.getRuntie(.availableProcessors()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
