Skip to main navigation Skip to search Skip to main content

SORTING SHORT KEYS IN CIRCUITS OF SIZE (o(n log n)

Gilad Asharov, Wei Kai Lin, Elaine Shi

Research output: Contribution to journalArticlepeer-review

Abstract

We consider the classical problem of sorting an input array containing n elements, where each element is described with a k-bit comparison key and a w-bit payload. A long-standing open problem is whether there exist (k+w) o(n log n)-sized Boolean circuits for sorting. A landmark result in this area is the work by Ajtai, Komlos, and Szemeredi (An O(n log n) sorting network, STOC'83), where they showed how to achieve sorting circuits with (k+w) O(n log n) Boolean gates. The recent work of Farhadi et al. (Lower bounds for external memory integer sorting via network coding, STOC'19) showed that if the famous Li-Li network coding conjecture is true, then sorting circuits of size w o(n log n) do not exist for general k; however, no unconditional lower bound is known (in fact proving superlinear circuit lower bounds in general is out of the reach of existing techniques). In this paper, we show that one can overcome the n log n barrier when the keys to be sorted are short. Specifically, we prove that there is a circuit with (k + w) O(nk) (log* n log* (w + k))2+ϵ Boolean gates capable of sorting any input array containing n elements, each described with a k-bit key and a w-bit payload. Therefore, if the keys to be sorted are short, say, k < o(log n), our result is asymptotically better than the classical Ajtai, Komlos, and Szemeredi sorting network (ignoring log* terms); and we also overcome the n log n barrier in such cases. Such a result might be surprising initially because it is long known that comparator-based techniques must incur Ω (n log n) comparator gates even when the keys to be sorted are only 1-bit long (e.g., see Knuth's "Art of Programming" textbook). To the best of our knowledge, we are the first to achieve nontrivial results for sorting circuits using non-comparison-based techniques.

Original languageEnglish
Pages (from-to)424-466
Number of pages43
JournalSIAM Journal on Computing
Volume51
Issue number3
DOIs
StatePublished - 2022

Keywords

  • compaction
  • selection
  • sorting circuit

All Science Journal Classification (ASJC) codes

  • General Computer Science
  • General Mathematics

Fingerprint

Dive into the research topics of 'SORTING SHORT KEYS IN CIRCUITS OF SIZE (o(n log n)'. Together they form a unique fingerprint.

Cite this