Sorting Short Keys in Circuits of Size o(n log n)

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) \cdot o(n \log n)$-sized boolean circuits for sorting. 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) \cdot O(n k) \cdot \poly(\log^*n - \log^* (w + k))$ 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 AKS sorting network (ignoring $\poly\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 $\Omega(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 non-trivial results for sorting circuits using non-comparison-based techniques. We also show that if the Li-Li network coding conjecture is true, our upper bound is optimal, barring $\poly\log^*$ terms, for every $k$ as long as $k = O(\log n)$.

[1]  Mike Paterson,et al.  Improved sorting networks withO(logN) depth , 1990, Algorithmica.

[2]  M. Wegman,et al.  Global value numbers and redundant computations , 1988, POPL '88.

[3]  Elaine Shi,et al.  Oblivious Parallel Tight Compaction , 2020, IACR Cryptol. ePrint Arch..

[4]  Elaine Shi,et al.  Lower bounds for external memory integer sorting via network coding , 2019, STOC.

[5]  Torben Hagerup,et al.  Fast and reliable parallel hashing , 1991, SPAA '91.

[6]  Mikkel Thorup Randomized sorting in O(n log log n) time and linear space using addition, shift, and bit-wise boolean operations , 1997, SODA '97.

[7]  David Thomas,et al.  The Art in Computer Programming , 2001 .

[8]  Kasper Green Larsen,et al.  Lower Bounds for Multiplication via Network Coding , 2019, ICALP.

[9]  Kenneth E. Batcher,et al.  Sorting networks and their applications , 1968, AFIPS Spring Joint Computing Conference.

[10]  Mark Braverman,et al.  Network coding in undirected graphs is either very helpful or not helpful at all , 2017, ITCS.

[11]  Rafail Ostrovsky,et al.  Oblivious tight compaction in O(n) time with smaller constant , 2020, IACR Cryptol. ePrint Arch..

[12]  Bruce M. Maggs,et al.  On-Line Algorithms for Path Selection in a Nonblocking Network , 1996, SIAM J. Comput..

[13]  Donald E. Knuth,et al.  The Art of Computer Programming: Volume 3: Sorting and Searching , 1998 .

[14]  丸岡 章,et al.  Selection Networks with $8n$ log$_2$ $n$ Size and $O$(log $n$) Depth , 1991 .

[15]  Nicholas Pippenger,et al.  Selection Networks , 1990, SIAM J. Comput..

[16]  Manuel Blum,et al.  Linear time bounds for median computations , 1972, STOC.

[17]  John E. Savage,et al.  Models of computation - exploring the power of computing , 1998 .

[18]  Akira Maruoka,et al.  Selection Networks with 8n log2n Size and O(log n) Depth , 1992, ISAAC.

[19]  V. E. Alekseev Sorting algorithms with minimum memory , 1969 .

[20]  Yijie Han Optimal parallel selection , 2003, SODA '03.

[21]  Baochun Li,et al.  Network Coding : The Case of Multiple Unicast Sessions , 2004 .

[22]  Yijie Han,et al.  Integer sorting in O(n/spl radic/(log log n)) expected time and linear space , 2002, The 43rd Annual IEEE Symposium on Foundations of Computer Science, 2002. Proceedings..

[23]  Manuel Blum,et al.  Time Bounds for Selection , 1973, J. Comput. Syst. Sci..

[24]  David G. Kirkpatrick,et al.  Upper Bounds for Sorting Integers on Random Access Machines , 1984, Theor. Comput. Sci..

[25]  Elaine Shi,et al.  Can We Overcome the n log n Barrier for Oblivious Sorting? , 2019, IACR Cryptol. ePrint Arch..

[26]  Michael T. Goodrich,et al.  Zig-zag sort: a simple deterministic data-oblivious sorting algorithm running in O(n log n) time , 2014, STOC.

[27]  John C. Mitchell,et al.  Data-Oblivious Data Structures , 2014, STACS.

[28]  Torben Hagerup,et al.  Fast Parallel Space Allocation, Estimation and Integer Sorting , 1995, Inf. Comput..

[29]  E. Szemerédi,et al.  O(n LOG n) SORTING NETWORK. , 1983 .

[30]  Shyamkishor Kumar NETWORK CODING THE CASE OF MULTIPLE UNICAST SESSIONS , 2015 .

[31]  Avi Wigderson,et al.  Expanders That Beat the Eigenvalue Bound: Explicit Construction and Applications , 1993, Comb..

[32]  Michael T. Goodrich,et al.  Sorting on a parallel pointer machine with applications to set expression evaluation , 1996, JACM.

[33]  Sarvar Patel,et al.  PanORAMa: Oblivious RAM with Logarithmic Overhead , 2018, 2018 IEEE 59th Annual Symposium on Foundations of Computer Science (FOCS).

[34]  Leslie G. Valiant,et al.  Parallelism in Comparison Problems , 1975, SIAM J. Comput..

[35]  János Komlós,et al.  An 0(n log n) sorting network , 1983, STOC.

[36]  Andrew Chi-Chih Yao Bounds on Selection Networks , 1974, SWAT.

[37]  Robert D. Kleinberg,et al.  On the capacity of information networks , 2006, IEEE Transactions on Information Theory.

[38]  Rajeev Raman,et al.  Sorting in linear time? , 1995, STOC '95.

[39]  Moni Naor,et al.  Is There an Oblivious RAM Lower Bound? , 2016, ITCS.

[40]  Torsten Suel,et al.  On Probabilistic Networks for Selection, Merging, and Sorting , 1995, SPAA '95.

[41]  Nicholas Pippenger Self-Routing Superconcentrators , 1996, J. Comput. Syst. Sci..

[42]  Kartik Nayak,et al.  OptORAMa: Optimal Oblivious RAM , 2020, IACR Cryptol. ePrint Arch..

[43]  Joel I. Seiferas,et al.  Sorting Networks of Logarithmic Depth, Further Simplified , 2009, Algorithmica.

[44]  Yijie Han,et al.  Deterministic sorting in O(nloglogn) time and linear space , 2004, J. Algorithms.

[45]  Stephen A. Cook,et al.  Upper and Lower Time Bounds for Parallel Random Access Machines without Simultaneous Writes , 1986, SIAM J. Comput..