Assignment #7:  Test some sorting algorithms

DUE 10/28/2009

 

Implement the following sorts: (For this assignment, you may either implement your own version of these sorts, or use one from the book or other source.  However, if you use code from somewhere other than your mind, you MUST cite your source).  You may work in pairs of this assignment if you wish, turning in one assignment as a team.

-          Bubblesort (optional)

-          Quick Sort

-          Heap Sort

-          Radix Sort

 

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.

 

After you have implemented these two 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   maniacal1000.txt

o   maniacal10000.txt

o   maniacal100000.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.