CSE2320-001                                          Fall2001                                        J.C.M.Tiernan

 

Lab Assignment #2

 

Due date: Monday, September 24, 2001, 12:30pm

 

1.   Create an algorithm to generate narbitrary integers |x| ≤ 10,000 and store them in some data structure ofsize n.  (Use the built-in randomnumber generator in your algorithm.) {Make n easy to modifiy.}

 

2.   Code and run the above algorithm asa function in your choice of language as long as that language can also be runon the UTA computers.

 

3.   Code and run a program that callsyour arbitrary integer generator and creates n random integers, then use theradix sort algorithm to sort them. (n ≥ 200)

 

4.   Do 3 again but use merge sort tosort the numbers (use the same seed to generate the integers.)

 

5.   Write [prose] a comparison of theperformance of the radix sort and the merge sort.

 

 

 

This assignment will be graded on the following:

 

10%     Use of random numbergenerator to produce n values as specified.

                 

20%     Correctness of radixsort

                 

10%     Correctness of mergesort

                 

30%     Program structure,comments, readability

                 

30%     Correctness ofdiscussion of performance comparison