Question: Project: CS / CE / SE 3 3 4 5 : Data Structures and Algorithm Analysis table [ [ Experimental Results,ArraySize, 5 0 K
Project: CSCESE : Data Structures and Algorithm Analysis tableExperimental Results,ArraySize,KInput List: Random,Comparisons,Movements,Total TimeInsertion Sort,,,Quick Sort,,,Merge Sort,,,Heap Sort,,,Experimental Results,ArraySize, KInput List: Ascending Order,Comparisons,Movements,Total TimeInsertion Sort,,,Quick Sort,,,Merge Sort,,,Heap Sort,,,
Purpose: Analysis of Sorting Techniques
Overview: One of the most important ADTs is the Dictionary and one of the most studied problem is
sorting. In this assignment, you will analyze multiple implementations of sorting algorithms.
Write a program to perform analysis on various sorting algorithms utilizing different data types.
insertionSort.java, quicksort.java, HeapSort.java, and MergeSort.java files are provided with this
assignment.
Create and submit a report discussing the analysis at each iteration. Clearly define your approach,
challenges, and assessment.
Questions:
Student : The quick sort that is provided will run into an infinite loop around k
elements. So can we just rewrite the quick sort?
Student : Did you get Stack Overflow? If you did, then it's because the default mb of
memory storage isn't enough to process more than k elements. I had the same
problem, and I fixed it by changing the memory storage in my IDE to mb under VM
argument using the command Xssm
Student : it only has issues during In Order and Reverse Order. I would imagine this is
because the pivot selection for this implementation is resulting in there being one side
that is very small and one that is very large when the list is sorted.
Student : I changed the pivot to front back instead of front. This is the best for our
project in my opinion because it is easy to calculate and solves the issues we are
having.
Student : Are you sure it's the sorting algorithm? Me and my buddy found that it was
the limits of our printing functions preventing us from checking sort. Once I switched to
making my check a for loop of println's, it was able to sort and print at least a billion
elements.
Primitive vs Generic Type: Box primitive int to Integer object for algorithms requiring
generic
T A S K L IST
You are required to complete the following activities by the deadlines specified and submit the
appropriate deliverables through eLearning.
ACTIVITY
Implement all sorting algorithms to produce the output for each data type applied to
each sorting algorithm. The data types InOrder and ReverseOrder will be used as
input to each algorithm capturing the experimental results.
For each data type, determine the best and the worst algorithm based on comparisons,
movements, and the time it took to sort the list or any additional criteria you can come
up with.
Prepare a report discussing how each sorting algorithm works, the best, average and
worstcase times for each algorithm. all experimental results and how each data type
determined the best and the worst algorithm for that data type
Zip all the Java Files, not the class files, and submit on eLearning under Assignment Section.
G U I D E L I N E S
You will be graded according to the following guidelines:
You are required to submit files through eLearning by the specified deadline. You can earn a
maximum of points.
If the files do not compile, you will receive a for the program.
You are graded primarily on the design of your class and the adequate testing of your class.
Poor design or inadequate testing will result in loss of points.
Your files should be adequately commented. Up to points will be deducted for poor
indentation and documentation.
Please follow these steps for Project :
Implement all four provided pseudocodes in either Java or C
Test each implementation with a small list of numbers to verify that the sorting works correctly.
Generate a list of random numbers and store them in an array.
Test your implementations using this element list to confirm that the sorting is accurate.
Ensure that you use the same randomly generated list for each algorithm.
Add probing code to count the number of comparisons and movements:
Comparison refers to comparing two elements in the list.
Movement refers to swapping two elements using a temporary variable.
Note that loop counters in for or while loops do not count as comparisons or movements.
In your report:
Include the number of comparisons made by each algorithm, ranked from best to worst.
Include the number of movements made by each algorithm, ranked from best to worst.
Include the time taken by each algorithm in nanoseconds ranked from best to worst.
After completing the above steps, repeat the process with the same algorithms, but this time use a presorted ReverseOrder list in ascending order as the input.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
