Question: Objectives of this assignment: to explore time complexity and real time of a well-known algorithm What you need to do: 1. Implement the Merge-Sort algorithm

Objectives of this assignment: to explore time complexity and real time of a well-known algorithm

What you need to do:

1. 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. Plot the functions T(n)/log2(n), T(n)/n.log2(n), and T(n)/n on the same graph. If you cannot see clearly the shape of the plots, feel free to separate plots.

4. Discuss T(n) in light of the graph you plotted above.

Objective: The objective of this programming assignment is to design and implement in Java the Merge-Sort algorithm presented in the lecture to sort a list of numbers. We are interested in exploring the relationship between the time complexity and the real time. For this exploration, you will collect the execution time T(n) as a function of n and plot the functions T(n)/log2(n), T(n)/n.log2(n), and T(n)/n on the same graph (If you cannot see clearly the shape of the plots, feel free to separate plots.). Finally, discuss your results.

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!