Strategies for Stable Merge Sorting

01/15/2018
by   Sam Buss, et al.
0

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 m and c · n n for inputs of length n comprising m runs. For Timsort, we prove a lower bound of (1.5 - o(1)) n n . For 2-merge sort, we prove optimal upper and lower bounds of approximately (1.089 ± o(1))n m . We prove similar asymptotically matching upper and lower bounds for α-merge sort, when φ < α < 2, where φ is the golden ratio. These 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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/22/2021

The Universal ℓ^p-Metric on Merge Trees

Adapting a definition given by Bjerkevik and Lesnick for multiparameter ...
research
12/07/2020

Galloping in natural merge sorts

We study the algorithm TimSort and the sub-routine it uses to merge mono...
research
06/29/2023

A Formal Perspective on Byte-Pair Encoding

Byte-Pair Encoding (BPE) is a popular algorithm used for tokenizing data...
research
05/29/2023

Mathematical Structure of Syntactic Merge

The syntactic Merge operation of the Minimalist Program in linguistics c...
research
11/07/2018

How Many Subpopulations is Too Many? Exponential Lower Bounds for Inferring Population Histories

Reconstruction of population histories is a central problem in populatio...
research
03/23/2021

Mono-monostatic polyhedra with uniform point masses have at least 8 vertices

The monostatic property of convex polyhedra (i.e. the property of having...
research
06/28/2022

On the Axiomatisation of Branching Bisimulation Congruence over CCS

In this paper we investigate the equational theory of (the restriction, ...

Please sign up or login with your details

Forgot password? Click here to reset