Tight Bounds for Online Stable Sorting
Travis Gagie, Yakov Nekrich

TL;DR
This paper establishes tight bounds for online stable sorting, showing that the number of comparisons needed closely matches the entropy-based lower and upper bounds, thus advancing understanding of sorting efficiency.
Contribution
It provides the first bounds that are within o(n) of each other for online stable sorting, aligning with offline sorting bounds, especially for small sigma.
Findings
For sigma = o(n / log n), (H + 1) n + o(n) comparisons suffice.
A matching lower bound of (H + 1) n - o(n) comparisons is proven.
Bounds are close to offline sorting bounds, improving theoretical understanding.
Abstract
Although many authors have considered how many ternary comparisons it takes to sort a multiset of size , the best known upper and lower bounds still differ by a term linear in . In this paper we restrict our attention to online stable sorting and prove upper and lower bounds that are within (o (n)) not only of each other but also of the best known upper bound for offline sorting. Specifically, we first prove that if the number of distinct elements (\sigma = o (n / \log n)), then ((H + 1) n + o (n)) comparisons are sufficient, where is the entropy of the distribution of the elements in . We then give a simple proof that ((H + 1) n - o (n)) comparisons are necessary in the worst case.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Optimization and Search Problems · Machine Learning and Algorithms
