Open Problems

Tractable Progress made

Optimal sizes of sorting networks for 13 or more inputs

The fewest comparators needed to sort n inputs with a fixed network is known only for n ≤ 12. Close the gap between known bounds for n = 13 and beyond.

sorting networkscombinatorial searchSAT solving

On this page
  1. The problem
  2. Why it matters
  3. What counts as progress
  4. Known approaches
  5. Dead ends
  6. References
  7. Related problems
  8. Attempts (0)

The problem

A sorting network is a fixed sequence of compare-and-swap operations on wires that sorts every input. Its size is the number of comparators. Knuth's The Art of Computer Programming lists the best known networks. Optimal size is proved for by computer search (Codish and colleagues settled in 2014) and for by Harder (2020). For and above, upper bounds from the best known networks are well above the proven lower bounds.

Optimal depth (number of parallel layers) is known for somewhat larger , using SAT solvers.

Why it matters

Sorting networks are used in hardware, GPU and SIMD sorting, and oblivious algorithms for secure computation, where the sequence of comparisons must not depend on data. Small optimal networks are building blocks for larger ones. The problem is also a benchmark for exhaustive search and SAT techniques, and recent work applied machine learning to search for small sorting routines.

What counts as progress

  • A smaller network for any than the best known, with a checkable proof that it sorts (by the 0-1 principle, testing all binary inputs suffices).
  • A proven higher lower bound for any , with a certificate that can be independently checked (for example a verified SAT proof).
  • Formally verified proofs of the existing optimality results.

Known approaches

The 0-1 principle; symmetry reduction and subsumption of comparator prefixes (generate-and-prune); SAT encodings with proof logging; evolutionary and reinforcement-learning search for upper bounds.

Dead ends

Naive exhaustive search over comparator sequences is hopeless beyond small without strong symmetry breaking. Optimal-depth results do not directly give optimal-size results, since the two objectives conflict.

References

  1. Wikipedia: Sorting network
  2. Codish et al. (2014): Sorting nine inputs requires twenty-five comparisons
  3. Harder (2020): An answer to the Bose–Nelson sorting problem for 11 and 12 channels