Mellin transforms and asymptotics: the mergesort
From the most efficient sorting algorithms MergeSort
, HeapSort and QuickSort, we selected the last one for the reason of its simple implementation.
Illustrate with an example how Mergesort
uses Divide- were answered and-Conquer method to sort an array easily 2.
In particular, mergesort
is O(n log n), which does not allow substantial improvements in the sequential algorithms.
Clearly the pipeline architectural specification of sort suggests that a mergesort is suitable for use with the pipeline architecture.
It can be easily verified that mergesort is equivalent to:
This is to illustrate that the transformation will not only work for mergesort but for any divide and conquer algorithm that can be partially evaluated to a tree algorithm in which the amount of work at each level of the tree is constant.
Since such algorithms are distributed throughout the book (like BinarySearch, Mergesort, Binsort, Radixsort, MinHeap sort, etc.
In other cases like, "Give the time complexity of Mergesort," some semantically related terms like "asymptotic" or "Big O notation" have to be identified.
The objective is to allow the user to submit exploratory, analytical, non-factual questions such as, "How does Mergesort sort an array?