Strategies for stable merge sorting

13Citations
Citations of this article
35Readers
Mendeley users who have this article in their library.

Abstract

We introduce new stable natural merge sort algorithms, called 2-merge sort and α-merge sort. We prove upper and lower bounds for several merge sort algorithms, including Timsort, Shiver’s sort, α-stack sorts, and our new 2-merge and α-merge sorts. The upper and lower bounds have the forms c · n log m and c · n log n for inputs of length n comprising m runs. For Timsort, we prove a lower bound of (1.5−o(1))n log n. For 2-merge sort, we prove optimal upper and lower bounds of approximately (1.089 ± o(1))n log m. We state similar asymptotically matching upper and lower bounds for α-merge sort, when ϕ < α < 2, where ϕ is the golden ratio. Our bounds are in terms of merge cost; this upper bounds the number of comparisons and accurately models runtime. The merge strategies can be used for any stable merge sort, not just natural merge sorts. The new 2-merge and α-merge sorts have better worst-case merge cost upper bounds and are slightly simpler to implement than the widely-used Timsort; they also perform better in experiments.

Cite

CITATION STYLE

APA

Buss, S., & Knop, A. (2019). Strategies for stable merge sorting. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (pp. 1272–1290). Association for Computing Machinery. https://doi.org/10.1137/1.9781611975482.78

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free