Lower Bounds for Sorting 16, 17, and 18 Elements

Florian Stober, Armin Weiß
6/11/2022
cs.DS

Official code: CodeCrafter47/sortinglowerbounds (2 stars, C++, last commit 2024-02-13).

Abstract

It is a long-standing open question to determine the minimum number of comparisons $S(n)$ that suffice to sort an array of $n$ elements. Indeed, before this work $S(n)$ has been known only for $n\leq 22$ with the exception for $n=16$, $17$, and $18$.

Show full abstract

In this work, we fill that gap by proving that sorting $n=16$, $17$, and $18$ elements requires $46$, $50$, and $54$ comparisons respectively. This fully determines $S(n)$ for these values and disproves a conjecture by Knuth that $S(16) = 45$. Moreover, we show that for sorting $28$ elements at least 99 comparisons are needed. We obtain our result via an exhaustive computer search which extends previous work by Wells (1965) and Peczarski (2002, 2004, 2007, 2012). Our progress is both based on advances in hardware and on novel algorithmic ideas such as applying a bidirectional search to this problem.

View on arXivView PDF

Code Implementations(1)

Find the minimum number of comparisons required to sort N elements using computer search.

21C++, CMakeJun 10, 20222 years ago

Similar Papers

Cite this paper

@article{stober2022lower,
  title  = {Lower Bounds for Sorting 16, 17, and 18 Elements},
  author = {Florian Stober and Armin Weiß},
  year   = {2022},
  eprint = {2206.05597},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.05597}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2206.05597.svg)](https://codeofpaper.com/paper/2206.05597)

Discussion