Project #4:  Sorting - You may work in groups of size at most 2 for this project.

DUE 3/15/2010

 

Implement the following sorts:

-          Bubble Sort or Selection Sort or Insertion Sort or Shell Sort

-          Heap Sort

-          Merge Sort

-          Quick Sort

-          Radix Sort

 

*********

***(To save you time, this portion of the project has been changed to extra credit.  You still must implement radix sort, but you may choose a fixed version to do your experiments with.) In particular, radix sort should take as input 2 parameters, RANGE and BASE.  RANGE will be the highest value of integer that will be in the sorting data, and BASE will be an adjustable parameter that effects the efficiency of Radix sort.

*********

 

When implementing these sorting routines, you may research in books and online for different implementations.  However, if you use someone else's idea (an implementation from a book, web site), you MUST cite your source.  Failure to do so constitutes academic dishonesty as you are passing off someone else's work as your own.  Further, you must fully understand the implementations of the four sorts above.  I am reserving the right to grade your project based on either of your teammates ability to explain, in person, how your code works.

 

After you have implemented these sorting algorithms, test them on the following data sets:

 

-          A set of random numbers

o   random1000.txt

o   random10000.txt

o   random100000.txt

-          A set of not random numbers

o   notrandom1000.txt

o   notrandom10000.txt

o   notrandom100000.txt

 

Each data set contains 1000, 10000, and 100000 numbers respectively. Test and time each sort algorithm on each data set.

 

What to turn in:

-          The code you wrote to test the sorting algorithms

-          A report on the performance of the algorithms in the form of graphs comparing list size versus run time (hand drawn is fine), as well as the effect of the parameter BASE in the radix sort.