The multiplicative complexity of sorting n bits

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.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-25
DOI
https://doi.org/10.5281/zenodo.24540861
Primary Topic
Complexity and Algorithms in Graphs
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

The multiplicative complexity of sorting n bits

Shuheng Ma
Zenodo (CERN European Organization for Nuclear Research)
Complexity and Algorithms in Graphs
preprint

The multiplicative complexity of sorting n bits

Shuheng Ma
preprint en

Abstract

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.

Zenodo (CERN European Organization for Nuclear Research)
Complexity and Algorithms in Graphs
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
The multiplicative complexity of sorting n bits — Shuheng Ma · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS