Content deleted Content added
→Analysis: same |
|||
Line 33:
==Relation to other comparison sorts==
The algorithm is called merge-insertion sort because the initial comparisons that it performs before its recursive call (pairing up arbitrary items and comparing each pair) are the same as the initial comparisons of [[merge sort]],
while the comparisons that it performs after the recursive call (using binary search to insert elements one by one into a sorted list) follow the same
For small inputs (up to <math>n=11</math>) its numbers of comparisons equal the [[lower bound]] on comparison sorting of <math>\lceil\log_2 n!\rceil\approx n\log_2 n - 1.443n</math>. However, for larger inputs the number of comparisons made by the merge-insertion algorithm is bigger than this lower bound.
|