Smallest sorting network $S(13)$

Sorting network on 13 inputs with 45 comparators in 10 steps, drawn as 13 horizontal wires joined by vertical comparators

The smallest number of comparators in a sorting network on $13$ inputs.

Lower bound: $44$ Literature
Upper bound: $45$ Checked construction

History

Each bound that improved on the earlier ones, with the record of its discovery and its best evidence. A bound is discovered in the literature, or by a certificate submitted here. Its best evidence is a certificate checked here, if there is one at least as strong: a formal proof in Lean (Lean proof) or an explicit construction checked by a program (Checked construction). Otherwise it's an Attested certificate, which someone else checked with a published checker, or the Literature. Submit a certificate.

Date Bound Discovery Best evidence
1962-04 $\le 50$ R.C. Bose, R.J. Nelson, A sorting problem, Journal of the ACM 9 (1962) 282-296.
[via R.W. Floyd, D.E. Knuth, The Bose-Nelson sorting problem, Stanford report STAN-CS-70-177, November 1970. Also in A Survey of Combinatorial Theory, North-Holland (1973) 163-172.]
Checked construction
via $\le 45$, sorting-network-size-13-upper-45
1964-09 $\le 48$ K.E. Batcher, A new internal sorting method, Goodyear Aerospace report GER-11759, September 1964.
[via R.W. Floyd, D.E. Knuth, The Bose-Nelson sorting problem, Stanford report STAN-CS-70-177, November 1970. Also in A Survey of Combinatorial Theory, North-Holland (1973) 163-172.]
Checked construction
via $\le 45$, sorting-network-size-13-upper-45
1970-11 $\ge 34$ R.W. Floyd, D.E. Knuth, The Bose-Nelson sorting problem, Stanford report STAN-CS-70-177, November 1970. Also in A Survey of Combinatorial Theory, North-Holland (1973) 163-172. Literature
1970-11 $\le 46$ R.W. Floyd, D.E. Knuth, The Bose-Nelson sorting problem, Stanford report STAN-CS-70-177, November 1970. Also in A Survey of Combinatorial Theory, North-Holland (1973) 163-172. Checked construction
via $\le 45$, sorting-network-size-13-upper-45
1972-06 $\ge 39$ D.C. Van Voorhis, An improved lower bound for sorting networks, IEEE Transactions on Computers C-21 (1972) 612-613.
[via M. Codish, L. Cruz-Filipe, M. Frank, P. Schneider-Kamp, Twenty-five comparators is optimal when sorting nine inputs (and twenty-nine for ten), ICTAI 2014, arXiv:1405.5754. Also Journal of Computer and System Sciences 82 (2016) 551-563.]
Literature
1995-07 $\le 45$ H. Juillé, Evolution of non-deterministic incremental algorithms as a new approach for search in state spaces, Proceedings of the 6th International Conference on Genetic Algorithms (1995) 351-358.
[via V.K. Valsalam, R. Miikkulainen, Using symmetry and evolutionary search to minimize sorting networks, Journal of Machine Learning Research 14 (2013) 303-331.]
Checked construction
Certificate sorting-network-size-13-upper-45, submitted by daniel-munro, 2026-11-11
[construction from B. Dobbelaere, Smallest and fastest sorting networks for a given number of inputs, https://bertdobbelaere.github.io/sorting_networks.html (page updated 2026-10-10, retrieved 2026-11-11).]
2014-05-22 $\ge 41$ M. Codish, L. Cruz-Filipe, M. Frank, P. Schneider-Kamp, Twenty-five comparators is optimal when sorting nine inputs (and twenty-nine for ten), ICTAI 2014, arXiv:1405.5754. Also Journal of Computer and System Sciences 82 (2016) 551-563. Literature
2020-05-30 $\ge 43$ B. Dobbelaere, Smallest and fastest sorting networks for a given number of inputs, SorterHunter repository, sorting_networks.html, 2020-05-30. Literature
2026-10-18 $\ge 44$ T.S. Tomar, Sorting networks on 13 inputs need at least 44 comparators, Zenodo, 2026, https://doi.org/10.5281/zenodo.23453293.
[via B. Dobbelaere, Smallest and fastest sorting networks for a given number of inputs, SorterHunter repository, sorting_networks.html, 2025-04-21.]
Literature

Other certificates

Certificates that aren't the best evidence for any bound above: other certificates are stronger evidence for the same bounds, or they prove only bounds weaker than any recorded.