Uhlig's mass-production theorem #
Every Boolean function on n inputs can be evaluated on 2 ^ d(n) independent inputs with
(1 + o(1)) 2 ^ n / n gates, as long as d(n) log₂ n = o(n) [Uhl92]. This is Lupanov's
worst-case bound for a single copy: up to this many copies of any function fit within the
asymptotic single-copy ceiling 2 ^ n / n. The theorem does not compare them with the complexity
of the particular function.
d layers of Uhlig.complexity_directProduct_two_mul_le with prefixes of p bits turn single
copies on m inputs into 2 ^ d copies on d p + m inputs, multiplying the size by
(2 ^ p + 1) ^ d and adding at most (2 ^ p + 1) ^ d d 2 ^ d times the overhead of one pair
(complexity_directProduct_two_pow_le). With p = 2 log₂ n + 2 and Lupanov's synthesis on the
remaining m inputs, the leading term is (2 ^ p + 1) ^ d 2 ^ m / m = (1 + o(1)) 2 ^ n / n,
and every overhead is 2 ^ (o(n)).
The statements are denominator-free: for every precision P, eventually
P * n * cost ≤ (P + 1) * 2 ^ n. For P > 0 this is cost ≤ (1 + 1 / P) 2 ^ n / n; the
precision P = 0 is allowed but says nothing. The copy count may be any number up to
2 ^ d(n), including zero. Sizes count all gates; massComplexity charges NOT, AND and OR
once and constants never. These are bounds on circuit size, not on the running time of a circuit
constructor.
Main definitions #
Cslib.Circuits.Boolean.MassProduction.IsUhligDepth:d(n) log₂ n = o(n), discretely.
Main results #
Cslib.Circuits.Boolean.MassProduction.complexity_directProduct_two_pow_le: the finite recursion.Cslib.Circuits.Boolean.MassProduction.mul_complexity_directProduct_le: the finite theorem, with every parameter condition explicit.Cslib.Circuits.Boolean.MassProduction.eventually_mul_complexity_directProduct_le: Uhlig's theorem for circuit size.Cslib.Circuits.Boolean.MassProduction.eventually_mul_massComplexity_le: Uhlig's theorem for mass complexity.
References #
- D. Uhlig, Networks computing Boolean functions for multiple input values.
- I. Wegener, The Complexity of Boolean Functions, Theorem 10.2.3.
- O. B. Lupanov, On a Method of Circuit Synthesis, for single copies.
- Simplifies MassProduction/UhligRecursion.lean, MassProduction/UhligParameters.lean, MassProduction/UhligAsymptoticBounds.lean, MassProduction/UhligTheorem.lean and MassProduction/LupanovSynthesis.lean in S. Schlesinger, Boolean circuit mass production formalization.
The finite recursion #
Iterated Uhlig layers. If every function on m inputs has a single copy of size at
most L, then every function on d * p + m inputs has 2 ^ d copies of size at most
(2 ^ p + 1) ^ d * (L + d * 2 ^ d * H), where H bounds the overhead of each layer.
Arithmetic estimates #
Asymptotics #
Lupanov's bound for single copies, without denominators: for every precision Q,
eventually Q * m * size ≤ (Q + 1) * 2 ^ m for every function on m inputs.
The per-layer overhead with prefixes of 2 log₂ n + 2 bits is eventually below
2 ^ (n / 2), even after multiplication by 4 P n.
Discrete form of d(n) log₂ n = o(n): for every multiplier c, eventually
c * d n * log₂ n ≤ n.
Instances For
Finite form of Uhlig's theorem. Split n = d * p + m inputs into d prefixes of p
bits and m > 0 remaining inputs, and let X be a slack with
2 P (X + 1) ^ 3 ≤ (2 P + 1) X ^ 3. Suppose the prefixes use at most a 1 / (X + 1) fraction
of the input, the 2 ^ p assignments of one prefix number at least (X + 1) d, single copies
on m inputs have size at most (1 + 1 / X) 2 ^ m / m, and the overhead of all layers is
negligible. Then every function on n inputs has k ≤ 2 ^ d independent copies of size s
with P * n * s ≤ (P + 1) * 2 ^ n, that is, at most (1 + 1 / P) 2 ^ n / n when P > 0.
Uhlig's theorem for circuit size. If d(n) log₂ n = o(n), then for every precision P,
eventually every function on n inputs has k ≤ 2 ^ d(n) independent copies of size s with
P * n * s ≤ (P + 1) * 2 ^ n: for P > 0, at most (1 + 1 / P) 2 ^ n / n. The case P = 0
holds trivially. Prefixes have 2 log₂ n + 2 bits.
Uhlig's theorem for mass complexity, which charges NOT, AND and OR once and constants
never. If d(n) log₂ n = o(n), then for every precision P, eventually
P * n * massComplexity f k ≤ (P + 1) * 2 ^ n for every function f on n inputs and every
number of copies k ≤ 2 ^ d(n). For P > 0 the bound is (1 + 1 / P) 2 ^ n / n; the case
P = 0 holds trivially.