Document Open Access Logo

Constant-Depth Sorting Networks

Authors Natalia Dobrokhotova-Maikova, Alexander Kozachinskiy , Vladimir Podolskii

Thumbnail PDF


  • Filesize: 0.79 MB
  • 19 pages

Document Identifiers

Author Details

Natalia Dobrokhotova-Maikova
  • Yandex, Moscow, Russia
Alexander Kozachinskiy
  • Institute for Mathematical and Computational Engineering, Universidad Católica de Chile, Santiago, Chile
  • IMFD & CENIA Chile, Santiago, Chile
Vladimir Podolskii
  • Courant Institute of Mathematical Sciences, New York University, NY, USA
  • Steklov Mathematical Institute of Russian Academy of Sciences, Moscow, Russia

Cite AsGet BibTex

Natalia Dobrokhotova-Maikova, Alexander Kozachinskiy, and Vladimir Podolskii. Constant-Depth Sorting Networks. In 14th Innovations in Theoretical Computer Science Conference (ITCS 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 251, pp. 43:1-43:19, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2023)


In this paper, we address sorting networks that are constructed from comparators of arity k > 2. I.e., in our setting the arity of the comparators - or, in other words, the number of inputs that can be sorted at the unit cost - is a parameter. We study its relationship with two other parameters - n, the number of inputs, and d, the depth. This model received considerable attention. Partly, its motivation is to better understand the structure of sorting networks. In particular, sorting networks with large arity are related to recursive constructions of ordinary sorting networks. Additionally, studies of this model have natural correspondence with a recent line of work on constructing circuits for majority functions from majority gates of lower fan-in. Motivated by these questions, we initiate the studies of lower bounds for constant-depth sorting networks. More precisely, we consider sorting networks of constant depth d and estimate the minimal k for which there is such a network with comparators of arity k. We prove tight lower bounds for d ≤ 4. More precisely, for depths d = 1,2 we observe that k = n. For d = 3 we show that k = ⌈n/2⌉. As our main result, we show that for d = 4 the minimal arity becomes sublinear: k = Θ(n^{2/3}). This contrasts with the case of majority circuits, in which k = O(n^{2/3}) is achievable already for depth d = 3. To prove these results, we develop a new combinatorial technique based on the notion of access to cells of a sorting network.

Subject Classification

ACM Subject Classification
  • Theory of computation → Models of computation
  • Sorting networks
  • constant depth
  • lower bounds
  • threshold 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 sets. Comb., 3(1):1-19, 1983. URL:
  2. Kazuyuki Amano and Masafumi Yoshida. Depth two (n-2)-majority circuits for n-majority. Preprint, 2017. URL:, URL:
  3. S.W.A.H. Baddar and K.E. Batcher. Designing Sorting Networks: A New Paradigm. SpringerLink : Bücher. Springer New York, 2012. URL:, URL:
  4. Kenneth E. Batcher. Sorting networks and their applications. In American Federation of Information Processing Societies: AFIPS Conference Proceedings: 1968 Spring Joint Computer Conference, Atlantic City, NJ, USA, 30 April - 2 May 1968, volume 32 of AFIPS Conference Proceedings, pages 307-314. Thomson Book Company, Washington D.C., 1968. URL:
  5. Richard Beigel and John Gill. Sorting n objects with a k-sorter. IEEE Trans. Computers, 39(5):714-716, 1990. URL:
  6. Bauwens Bruno. Personal communication, 2017. Google Scholar
  7. Daniel Bundala and Jakub Zavodny. Optimal sorting networks. In Adrian-Horia Dediu, Carlos Martín-Vide, José Luis Sierra-Rodríguez, and Bianca Truthe, editors, Language and Automata Theory and Applications - 8th International Conference, LATA 2014, Madrid, Spain, March 10-14, 2014. Proceedings, volume 8370 of Lecture Notes in Computer Science, pages 236-247. Springer, 2014. URL:
  8. V. Chvátal. Lecture notes on the new aks sorting network. Technical report, Rutgers University, 1992. Google Scholar
  9. Robert Cypher and Jorge L. C. Sanz. Cubesort: A parallel algorithm for sorting N data items with s-sorters. J. Algorithms, 13(2):211-234, 1992. URL:
  10. Christian Engels, Mohit Garg, Kazuhisa Makino, and Anup Rao. On expressing majority as a majority of majorities. SIAM J. Discret. Math., 34(1):730-741, 2020. URL:
  11. Qingshi Gao and Zhiyong Liu. Sloping-and-shaking. Science in China Series E: Technological Sciences, 40(3):225-234, 1997. URL:
  12. Wassily Hoeffding. Probability inequalities for sums of bounded random variables. Journal of the American Statistical Association, 58(301):13-30, 1963. URL:
  13. Shlomo Hoory, Avner Magen, and Toniann Pitassi. Monotone circuits for the majority function. In Proceedings of the 9th international conference on Approximation Algorithms for Combinatorial Optimization Problems, and 10th international conference on Randomization and Computation, pages 410-425, 2006. URL:
  14. Pavel Hrubes, Sivaramakrishnan Natarajan Ramamoorthy, Anup Rao, and Amir Yehudayoff. Lower bounds on balancing sets and depth-2 threshold circuits. In Christel Baier, Ioannis Chatzigiannakis, Paola Flocchini, and Stefano Leonardi, editors, 46th International Colloquium on Automata, Languages, and Programming, ICALP 2019, July 9-12, 2019, Patras, Greece, volume 132 of LIPIcs, pages 72:1-72:14. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2019. URL:
  15. Pavel Hrubes and Anup Rao. Circuits with medium fan-in. In David Zuckerman, editor, 30th Conference on Computational Complexity, CCC 2015, June 17-19, 2015, Portland, Oregon, USA, volume 33 of LIPIcs, pages 381-391. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2015. URL:
  16. Nabil Kahalé, Frank Thomson Leighton, Yuan Ma, C. Greg Plaxton, Torsten Suel, and Endre Szemerédi. Lower bounds for sorting networks. In Frank Thomson Leighton and Allan Borodin, editors, Proceedings of the Twenty-Seventh Annual ACM Symposium on Theory of Computing, 29 May-1 June 1995, Las Vegas, Nevada, USA, pages 437-446. ACM, 1995. URL:
  17. Donald Ervin Knuth. The art of computer programming, , Volume III, 2nd Edition. Addison-Wesley, 1998. URL:
  18. Yu. A. Kombarov. On depth two circuits for the majority function. In Proceedings of Problems in theoretical cybernetics, pages 129-132. Max Press, 2017. Google Scholar
  19. Alexander S. Kulikov and Vladimir V. Podolskii. Computing majority by constant depth majority circuits with low fan-in gates. Theory Comput. Syst., 63(5):956-986, 2019. URL:
  20. Victor Lecomte, Prasanna Ramakrishnan, and Li-Yang Tan. The composition complexity of majority. In Shachar Lovett, editor, 37th Computational Complexity Conference, CCC 2022, July 20-23, 2022, Philadelphia, PA, USA, volume 234 of LIPIcs, pages 19:1-19:26. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022. URL:
  21. De-Lei Lee and Kenneth E. Batcher. A multiway merge sorting network. IEEE Trans. Parallel Distributed Syst., 6(2):211-215, 1995. URL:
  22. Frank Thomson Leighton. Tight bounds on the complexity of parallel sorting. IEEE Trans. Computers, 34(4):344-354, 1985. URL:
  23. Toshio Nakatani, Shing-Tsaan Huang, Bruce W. Arden, and Satish K. Tripathi. K-way bitonic sort. IEEE Trans. Computers, 38(2):283-288, 1989. URL:
  24. Ian Parberry. The pairwise sorting network. Parallel Process. Lett., 2:205-211, 1992. URL:
  25. Bruce Parker and Ian Parberry. Constructing sorting networks from k-sorters. Inf. Process. Lett., 33(3):157-162, 1989. URL:
  26. Michael S Paterson. Improved sorting networks with O(log N) depth. Algorithmica, 5(1):75-92, 1990. URL:
  27. Gleb Posobin. Computing majority with low-fan-in majority queries. CoRR, abs/1711.10176, 2017., URL:
  28. Joel Seiferas. Sorting networks of logarithmic depth, further simplified. Algorithmica, 53(3):374-384, 2009. URL:
  29. Feng Shi, Zhiyuan Yan, and Meghanad D. Wagh. An enhanced multiway sorting network based on n-sorters. In 2014 IEEE Global Conference on Signal and Information Processing, GlobalSIP 2014, Atlanta, GA, USA, December 3-5, 2014, pages 60-64. IEEE, 2014. URL:
  30. S. S. Tseng and Richard C. T. Lee. A parallel sorting scheme whose basic operation sortsN elements. Int. J. Parallel Program., 14(6):455-467, 1985. URL:
  31. Leslie G. Valiant. Short monotone formulae for the majority function. J. Algorithms, 5(3):363-366, 1984. URL:
  32. Andrew Chi-Chih Yao. Bounds on selection networks. SIAM J. Comput., 9(3):566-582, 1980. URL:
  33. Lijun Zhao, Zhiyong Liu, and Qingshi Gao. An efficient multiway merging algorithm. Science in China Series E: Technological Sciences, 41(5):543-551, 1998. URL:
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail