Assignment 6
Compare the performance of several fast sorting algorithms.
This assignment is worth 30 points.
Modify your program from homework four to test three fast sorting algorithms.
By doing this assignment you should
- Developed a testbed for examining the empirical efficiency of sorting algorithms.
- Implemented several sorting algorithms.
- Experienced collecting and interpreting data related to the empirical performance of algorithms.
Develop and implement a framework for testing a number of fast sorting algorithms. This framework should:
- Generate a randomized array of a given size.
- Call each sorting algorithm on the array, and record the system time consumed.
- Check the results of the sort algorithm to assure
- The final array is sorted.
- The elements in the sorted array match those of the original array.
- IE check to see that your sort was correct and did not lose data.
Once your framework is established, you should test each sorting routine multiple times various sizes of input. I would suggest powers of two for the input size, from a range where the time is relatively close to far enough out that the time becomes noticeably different, or you can establish that the performance is essentially the same. Furthermore you should have the ability to "drop" a relatively poor performing sort to continue to test the others.
You should implement and test the following sorts:
- Quicksort
- Heapsort
- Either Counting Sort or Radix Sort.
Produce a report which
- Describes the testing environment you have created
- How the test data is generated
- How the tests are performed
- How timing data is collected manipulated
- Describes each of the sorts tested.
- This should include an English description of the algorithm.
- The algorithm
- An analysis of the time the algorithm will take, beginning with a formula related to the code and ending with the asymptotic class.
- Describes the conditions of the test.
- The platform where the tests were performed.
- Os
- Hardware
- Compiler
- Compiler flags
- The state of the machine.
- Describes the relative performance of the given sorts.
- Explains the difference in performance of the given sorts.
- Explain the performance difference between these sorts and the sorts from homework 4.
You should use other tools, if necessary in your analysis.
Your final report should contain at least one graph which demonstrates the relative performance of each of these sorts. Use an average of the multiple test runs for each sort as a single data point, and plot input size vs time. Additional graphs are encouraged especially if they provide further insight into the relative performance of the sorts.
You should submit your code via email to danbennett360@gmail.com on the due date. Submit your report in class. Both the code and the report are required for this assignment to be graded.