English

Lower Bounds for Sorting 16, 17, and 18 Elements

Data Structures and Algorithms 2022-11-21 v2

Abstract

It is a long-standing open question to determine the minimum number of comparisons S(n)S(n) that suffice to sort an array of nn elements. Indeed, before this work S(n)S(n) has been known only for n22n\leq 22 with the exception for n=16n=16, 1717, and 1818. In this work, we fill that gap by proving that sorting n=16n=16, 1717, and 1818 elements requires 4646, 5050, and 5454 comparisons respectively. This fully determines S(n)S(n) for these values and disproves a conjecture by Knuth that S(16)=45S(16) = 45. Moreover, we show that for sorting 2828 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.

Cite

@article{arxiv.2206.05597,
  title  = {Lower Bounds for Sorting 16, 17, and 18 Elements},
  author = {Florian Stober and Armin Weiß},
  journal= {arXiv preprint arXiv:2206.05597},
  year   = {2022}
}
R2 v1 2026-06-24T11:47:40.928Z