Computer Science 501
Data Stuctures and Algorithm Analysis
Fall 2013, The College of Saint Rose
For your second programming project, you will perform an empirical analysis of several sorting algorithms that you can compare with the theoretical expectations, and to write up a formal reports of your results.
You may work individually or in groups of 2 or 3 on this project.
Software Development
Develop one or more Java programs that will help us to perform an empirical comparison of the following sorting algorithms:
Your program should operate on arrays of int values. It should have options to set the array size, the number of trials (to improve timing accuracy), the ability to generate initial data that is sorted, nearly sorted, completely random, and reverse sorted. Design your program to make it easy to implement a variety of sorting algorithms. Include the ability to count basic operations (number of comparisons and/or number of swaps) as well as to generate timings. You will need the ability to generate and report tabular data to show how your sorting algorithms perform on different sizes and distributions of data.
Timings and Analysis
Use your program(s) to generate basic operation counts and timing data for each sorting algorithm on an appropriate range of data sizes and distributions. Compare your results with your expectations based on our efficiency analysis of these algorithms. If you find discrepencies, how might they be explained? Please include as many of the details of your test environment as you can: the type of processor or processors in the computer including clock speed, cache sizes, memory sizes, the operating system and version running on the computer, and the Java version you are using.
Tips, Tricks, Precautions, and Suggestions
10000 bubble random .034693
might indicate for an input size of 10,000, using a bubble sort on random input took .034693 seconds.
Submission
Before 6:00 PM, Wednesday, November 6, 2013, submit your Java program(s) and writeup for grading. Do this through Submission Box under assignment "Sorting". Since SubmissionBox can only accept one file per assignment, please package up your files in a "zip" or similar archival format first.
Grading
This assignment is graded out of 50 points, broken down as follows:
Grading Breakdown | |
General empirical analysis framework | 5 points |
Java code for specific sorting algorithms | 15 points |
Java code style, documentation, and formatting | 5 points |
Theoretical expectations | 5 points |
Presentation and analysis of timing results | 20 points |