Matching works

1 work

cs.DS — Data Structures and Algorithms

Sorting networks on 13 inputs need 45 comparators

Contributed by Tejasvi Singh Tomar

Let S(N)S(N) be the least number of comparators in a sorting network on NN inputs (the Bose--Nelson problem). The values are known for N≤12N\le12, and for 1313 inputs the smallest known sorting network, found by Juill\'e, has 4545 comparators. We prove S(13)≥45S(13)\ge45, so S(13)=45S(13)=45. Deleting the comparators met by the largest and the second largest input leaves a sorting network on N−2N-2 inputs, so S(N)≥S(N−2)+P(2,N)S(N)\ge S(N-2)+P(2,N), where P(2,N)P(2,N) is the least possible worst-case number of comparators met by these two values. Van Voorhis stated P(2,N)≥⌈lg⁡F(N)⌉P(2,N)\ge\lceil\lg F(N)\rceil for an explicit function FF, but Mericanii showed that his proof is invalid. We prove P(2,N)=⌈lg⁡F(N)⌉P(2,N)=\lceil\lg F(N)\rceil for 3≤N≤323\le N\le32 by a finite search, which rests on the structure of the tree of paths of the largest value, the comparators on these paths, and a forest of comparators that carries the second largest value. With S(11)=35S(11)=35 this bound gives only S(13)≥44S(13)\ge44. For 4545 we apply it to the suffix of a network: if a network with LL comparators sorts a set XX of 00-11 vectors, then for suitable pairs of inputs the two values meet at most L−cL-c comparators, where cc is the cost of sorting the residual set left when their paths are deleted. A breadth-first search over the sets produced by prefixes of a hypothetical sorting network with 4444 comparators discards each set for which no single network stays within all these budgets, and no set survives at depth 2525. A separate verifier checks the certificate written by the search. Two proofs in Lean 4 check the same certificate, and in one of them Lean's kernel checks every computation, with only the standard axioms. Juill\'e's network is checked in the kernel as well. As a consequence, each of the twenty lower bounds on S(N)S(N) for 13≤N≤3213\le N\le32 that rested on Van Voorhis's inequality is proved and raised by one.

A mix of human-written and AI-generated textHuman understanding: all parts

Advanced search

Text
Human understanding
Linked formalizations