Lune

SODA2022Top-tier venue

Optimal Sorting Circuits for Short Keys

Wei-Kai Lin, Elaine Shi

Abstract

A long-standing open question in the algorithms and complexity literature is whether there exist sorting circuits of size o(n log n). A recent work by Asharov, Lin, and Shi (SODA'21) showed that if the elements to be sorted have short keys whose length k = o(log n), then one can indeed overcome the n log n barrier for sorting circuits, by leveraging non-comparison-based techniques. More specifically, Asharov et al. showed that there exist O(n) • min(k, log n)-sized sorting circuits for k-bit keys, ignoring poly log * factors. Interestingly, the recent works by Farhadi et al. (STOC'19) and Asharov et al. (SODA'21) also showed that the above result is essentially optimal for every key length k, assuming that the famous Li-Li network coding conjecture holds. Note also that proving any unconditional super-linear circuit lower bound for a wide class of problems is beyond the reach of current techniques.

Unfortunately, the approach taken by previous works to achieve optimality in size somewhat crucially relies on sacrificing the depth: specifically, their circuit is super-polylogarithmic in depth even for 1-bit keys. Asharov et al. phrase it as an open question how to achieve optimality both in size and depth. In this paper, we close this important gap in our understanding. We construct a sorting circuit of size O(n) • min(k, log n) (ignoring poly log * terms) and depth O(log n). To achieve this, our approach departs significantly from the prior works. Our result can be viewed as a generalization of the landmark result by Ajtai, Komlós, and Szemerédi (STOC'83), simultaneously in terms of size and depth. Specifically, for k = o(log n), we achieve asymptotical improvements in size over the AKS sorting circuit, while preserving optimality in depth.

  • Author ordering is randomly generated.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Waks-On/Waks-Off: Fast Oblivious Offline/Online Shuffling and Sorting with Waksman NetworksSajin Sasy, Aaron Johnson, Ian GoldbergCCS 2023 · 6 citations

Builds on1

  1. OptORAMa: Optimal Oblivious RAMGilad Asharov, Ilan Komargodski, Wei-Kai Lin, Kartik Nayak et al.EUROCRYPT 2020 · 92 citations

Related papers

  1. Sorting Short Keys in Circuits of Size o(n log n)Gilad Asharov, Wei-Kai Lin, Elaine ShiSODA 2021 · 1 citation
  2. SAT Reduces to the Minimum Circuit Size Problem with a Random OracleRahul IlangoFOCS 2023 · 7 citations
  3. Smaller Low-Depth Circuits for Kronecker PowersJosh Alman, Yunfeng Guan, Ashwin PadakiSODA 2023 · 1 citation
  4. Nearly Tight Bounds for the Online Sorting ProblemYossi Azar, Debmalya Panigrahi, Or VardiSODA 2026
  5. NP-hardness of the Minimum Circuit Size Problem from Well-Studied AssumptionsShuichi Hirahara, Rahul IlangoFOCS 2025 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines