Symmetric functions in logarithmic depth #
A Boolean function of k bits is symmetric when it depends only on the number of true bits,
that is, it is x ↦ g (weight x) for some g : ℕ → Bool. Such a function has a De Morgan circuit
of fan-in two with O(k²) gates and depth O(log k) (symmetricDeMorganCircuit): the carry-save
circuit weightCircuit k writes the weight in binary with w = ⌈log₂ (k + 1)⌉ bits in depth
O(log k), and the disjunction of the minterms of the accepted weights j ≤ k reads it, in depth
1 + ⌈log₂ w⌉ + ⌈log₂ (k + 1)⌉ Vollmer, Chapter 4.
MOD_q gates are symmetric, so this simulates them in logarithmic depth
(Cslib.Circuits.Boolean.Unbounded.modMultDeMorganCircuit), the step from ACC⁰ to NC¹.
Main definitions #
Cslib.Circuits.Boolean.symmetricDeMorganCircuit: a De Morgan circuit forx ↦ g (weight x).
Main results #
Cslib.Circuits.Boolean.computes_symmetricDeMorganCircuit: it computesx ↦ g (weight x).Cslib.Circuits.Boolean.size_symmetricDeMorganCircuit_le: at most70 (k + 1)²gates.Cslib.Circuits.Boolean.depth_symmetricDeMorganCircuit_le: depth at most2 + 21 ⌈log₂ (k + 1)⌉.
References #
Symmetric functions in logarithmic depth: a De Morgan circuit of fan-in two computing
x ↦ g (weight x) on k bits. It writes the weight in binary (weightCircuit k) and tests it
against the accepted weights j ≤ k by a balanced disjunction of minterms.
symmetricDeMorganCircuit k g computes g of the number of true bits.
symmetricDeMorganCircuit k g has at most 70 (k + 1)² gates.
symmetricDeMorganCircuit k g has depth at most 2 + 21 ⌈log₂ (k + 1)⌉.