Sorting Short Integers

Authors Michal Koucký , Karel Král

Thumbnail PDF


  • Filesize: 0.74 MB
  • 17 pages

Document Identifiers

Author Details

Michal Koucký
  • Computer Science Institute, Charles University, Prague, Czech Republic
Karel Král
  • Computer Science Institute, Charles University, Prague, Czech Republic


The authors are grateful for insightful discussions with Mike Saks on sorting and to Veronika Slívová for her insights and comments regarding the first versions of this paper. The authors thank Igor Sergeev for pointing us to the paper of Kospanov [Kospanov, 1994].

Cite AsGet BibTex

Michal Koucký and Karel Král. Sorting Short Integers. In 48th International Colloquium on Automata, Languages, and Programming (ICALP 2021). Leibniz International Proceedings in Informatics (LIPIcs), Volume 198, pp. 88:1-88:17, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2021)


We build boolean circuits of size 𝒪(nm²) and depth 𝒪(log(n) + m log(m)) for sorting n integers each of m-bits. We build also circuits that sort n integers each of m-bits according to their first k bits that are of size 𝒪(nmk (1 + log^*(n) - log^*(m))) and depth 𝒪(log³(n)). This improves on the results of Asharov et al. [Asharov et al., 2021] and resolves some of their open questions.

Subject Classification

ACM Subject Classification
  • Theory of computation → Sorting and searching
  • sorting
  • small integers
  • boolean circuits


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Miklós Ajtai, János Komlós, and Endre Szemerédi. Sorting in c log(n) parallel steps. Combinatorica, 3(1):1-19, 1983. Google Scholar
  2. Arne Andersson, Torben Hagerup, Stefan Nilsson, and Rajeev Raman. Sorting in linear time? Journal of Computer and System Sciences, 57(1):74-93, 1998. Google Scholar
  3. Gilad Asharov, Wei-Kai Lin, and Elaine Shi. Sorting short keys in circuits of size o(n log n). In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2249-2268. SIAM, 2021. Google Scholar
  4. Yijie Han and Mikkel Thorup. Sorting integers in O(n √log log n) expected time and linear space. In IEEE Symposium on Foundations of Computer Science (FOCS’02), 2002. Google Scholar
  5. Stasys Jukna. Boolean function complexity: advances and frontiers, volume 27. Springer Science & Business Media, 2012. Google Scholar
  6. E. S. Kospanov. Scheme realization of the sorting problem. Diskretnyi Analiz i Issledovanie Operatsii, 1(1):13-19, 1994. Google Scholar
  7. Wei-Kai Lin and Elaine Shi. Optimal sorting circuits for short keys. arXiv preprint, 2021. URL:
  8. Nicholas Pippenger. Self-routing superconcentrators. Journal of Computer and System Sciences, 52(1):53-60, 1996. Google Scholar
  9. Christopher S. Wallace. A suggestion for a fast multiplier. IEEE Transactions on electronic Computers, (1):14-17, 1964. Google Scholar