This paper settles the optimality of sorting networks given in The Art of Computer Programming vol. 3 more than 40 years ago. The book lists efficient sorting networks with n ≤ 16 inputs. In this paper we give general combinatorial arguments showing that if a sorting network with a given depth exists then there exists one with a special form. We then construct propositional formulas whose satisfiability is necessary for the existence of such a network. Using a SAT solver we conclude that the listed networks have optimal depth. For n ≤ 10 inputs where optimality was known previously, our algorithm is four orders of magnitude faster than those in prior work.


Propositional Formula Maximal Layer Optimal Depth Candidate Network Sorting Network 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Ajtai, M., Komlós, J., Szemerédi, E.: An O(n log n) sorting network. In: Proceedings of the Fifteenth Annual ACM Symposium on Theory of Computing, STOC 1983, pp. 1–9 (1983),
  2. 2.
    Batcher, K.E.: Sorting networks and their applications. In: Proceedings of the Spring Joint Computer Conference, AFIPS 1968, pp. 307–314. ACM (1968) (Spring)Google Scholar
  3. 3.
    Floyd, R.W., Knuth, D.E.: The Bose-Nelson sorting problem. J. ACM 9, 282–296 (1962)CrossRefGoogle Scholar
  4. 4.
    Knuth, D.E.: The art of computer programming, volume 3: sorting and searching. Addison Wesley, Reading (1973)Google Scholar
  5. 5.
    Morgenstern, A., Schneider, K.: Synthesis of parallel sorting networks using SAT solvers. In: MBMV, OFFIS-Institut für Informatik, pp. 71–80 (2011)Google Scholar
  6. 6.
    Parberry, I.: Parallel complexity theory. Research notes in theoretical computer science. Pitman (1987)Google Scholar
  7. 7.
    Parberry, I.: A computer-assisted optimal depth lower bound for nine-inputs sorting networks. In: Proceedings of the 1989 ACM/IEEE Conference on Supercomputing (1989)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Daniel Bundala
    • 1
  • Jakub Závodný
    • 1
  1. 1.Department of Computer ScienceUniversity of OxfordOxfordUK

Personalised recommendations