Published November 25, 2026 | Version 1.0.0

The multiplicative complexity of sorting n bits

Authors/Creators

  • 1. Independent Researcher

Description

The multiplicative complexity MC(T) of a collection T of Boolean functions is the least number of AND gates in a circuit over the basis (AND, XOR, 1) that computes all functions in T. We study the space Sym_n of all symmetric functions of n bits, which has the same multiplicative complexity as sorting n bits. Boyar, Peralta, and Pochuev (2000) gave a construction achieving MC(Sym_n) < 2n - log_2 n, with exact gate count U(n) = 2n - s_2(n) - floor(log_2 n) - 1, where s_2(n) is the number of ones in the binary expansion of n. Later, Boyar and Peralta (2008) proved that its Hamming-weight stage is optimal. To our knowledge, no lower bound beyond the trivial n - 1 was previously known. Here we prove the lower bound MC(Sym_n) >= (7/4)n - O(sqrt(n log n)), and we show that U(n) is exact for all n <= 15: MC(Sym_n) = U(n). Our proofs track the number of AND gates in excess of the number of independent outputs as the inputs are restricted to affine subspaces. The main new ingredient is a structural lemma on binary linear codes: if a coset of a code has few distinct weights, then the code contains a doubly-even subcode (all weights divisible by 4) of small codimension.

The accompanying Lean 4 formalization (SortingMC, Lean v4.36.0) and independent C11/Python verification programs are archived on Zenodo at https://doi.org/10.5281/zenodo.24540797.

Files

sorting_mc_preprint.pdf

Files (594.9 kB)

Name Size
md5:5c68f4a6a5bae8c87ecec36ba5523773
594.9 kB Preview Download

Additional details

Related works

Is supplemented by
Software: 10.5281/zenodo.24540797 (DOI)