Question: Objectives of this assignment: to explore time complexity and real time What you need to do: I. Implement the Merge-Sort algorithm to sort an array.

 Objectives of this assignment: to explore time complexity and "real time
What you need to do: I. Implement the Merge-Sort algorithm to sort

Objectives of this assignment: to explore time complexity and "real time What you need to do: I. Implement the Merge-Sort algorithm to sort an array. (See Appendix for the Merge-Sort algorithm) 2. Collect the execution time T(n) as a function of n 3. Graph/plot the function T(n).log(n). 4. In Module 4 (next module), we will establish that the running time T(n) of Merge-Sort is e(n.log(n). Discuss T(n) in light of the graph you plotted above. Objective presented in th complexity and the "real time". For this exploration, you will collect the execution time T(n) as a function of n and plot The objective of this programming assignment is to design and implement in Java the Merge-Sort algorithm e lecture to sort a list of numbers. We are interested in exploring the relationship between the time T(n).log:(n). Finally, discuss your results. Program to implement collectData () Generate an array G of HUGE length L (as huge as your language allows) with random values capped at oxfffffffe for n 10 to L (with step 1,000) copy in Array A n first values from Array G start timing // We time the sorting of Array A of length n Merge-Sort (a,o,n-1) Store the value n and the value T(n).1og2 (n)in a file F where T(n) is the execution time Data Analysis Use any plotting software (eg, Excel) to plot the values T(n).log-(n) in File F as a function of n. File F is the file produced by the program you implemented. Discuss your results based on the plot Report Write a report that will contain, explain, and discuss the plot. The report should not exceed one page In addition, your report must contain the following information: whether the program works or not (this must be just ONE sentence) the directions to compile and execute your program o o . Good writing is expected Recall that answers must be well written, documented, justified, and presented to get full credit. Appendix: Merge-Sort Algorithm. At this stage, you do NOT need to understand Merge-Sort (lt will be presented and explained in Module 4). Implement Merge-Sort exactly the way it is described below. Replace the infinity value () wich Oxffif. MERGE-SORT(A, p,r) I ifp

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!