## Algorithm Analysis Report on sorting algorithms

Analyze the following five sorting algorithms using an experimental method: selection sort, bubble sort, insertion sort, quick sort, and merge sort.  You may select C/C++ or Java as the implementation language, but your choice of language should be consistent for all algorithms.  Regarding the experimental method, you should write your own implementation of each algorithm and record the time required by the algorithm to sort a set of integers.  As input to your algorithms you should use sets of random integers, sorted integer sets, and reverse sorted integer sets. Make copies of your data sets so that all algorithms get the same data.

Write a report analyzing the results of the tests.  In terms of results you should include a set of graphs plotting the number of items to sort versus running time.  You should include the following sections in your report:  Title/name/date/etc., “Method”, “Results”, and “Conclusions and Analysis”. Your method section can be brief since some of the details are included in these instructions and the sorting algorithms are well known.  In your method section include implementation details such as coding language, details of the algorithm used (such as using a flag in bubble sort), underlying data structure used (array or linked list), and details of the computer used to perform the timing tests (use a machine with the same specifications for all tests).  Also include the experimental details, such as the number of tests averaged to get a

data point on your graph (between five and ten should be sufficient for this assignment).  Your analysis should mention which sort(s) is/are best and conditions when the sort is most suitable. In your analysis include any errors or complications in the results (you may find something odd with a small number of items to sort).  Suggest a cause for this error or complication.  Your report need not be long. One or two pages of text plus approximately three graphs should suffice. You may want to include additional graphs to emphasis details that are difficult to see in an overall results graph.  Remember a proper graph has a title, legend, and labelled axes.

Note that, while you may use external sources (text books or Internet) to help you form conclusions, you may not simply copy code or analysis from external sources.  Your analysis and conclusions should come from your experiments (a.k.a. timing tests).  During the marking process your code may be examined by a third party program / service.