Documentation

CslibFrontier.Computability.Circuit.Boolean.CountingBound

A power-of-two bound on the number of small De Morgan circuits #

At most 2 ^ M functions on n inputs have De Morgan circuit complexity at most s, where M = computableFunctionsLogBound n s = (s + 1) (2 ⌈log₂ (n + s + 1)⌉ + 3). This is the factorial bound Cslib.Circuits.Boolean.card_computableFunctions_mul_factorial_le with the factorial dropped and every factor rounded up to a power of two. The resulting exponent is O(s log (n + s)), which union bounds over small circuits need.

Main definitions #

Main results #

References #

An explicit s log(n + s) upper bound on log₂ (computableFunctions n s).ncard, derived from card_computableFunctions_mul_factorial_le.

The number of n-input Boolean functions of De Morgan circuit complexity at most s is at most 2 ^ computableFunctionsLogBound n s.

Elementary polynomial upper bound on computableFunctionsLogBound n s: since Nat.clog 2 (n + s + 1) ≤ n + s + 1, we have computableFunctionsLogBound n s ≤ (s + 1) * (2 * (n + s + 1) + 3).

Almost all functions need about 2 ^ n / n gates [AroraBarak07, Theorem 6.15], [Sha49]. For n ≥ 16, at most 2 ^ (2 ^ n / 4) of the 2 ^ 2 ^ n Boolean functions on n inputs have a circuit with at most 2 ^ n / (5 n) gates, so all but a 2 ^ (-3 · 2 ^ n / 4) fraction need more.

This is stronger than the draft's Theorem 6.15 ("for n ≥ 100, almost all Boolean functions on n variables require circuits of size at least 2 ^ n / (10 n)"). The draft counts all vertices of a circuit, its n inputs included, and has no constant gates, so a draft circuit with fewer than 2 ^ n / (10 n) vertices is a De Morgan circuit with fewer than 2 ^ n / (5 n) gates. The draft's proof claims s ^ (3 s) ≤ 2 ^ (2 ^ n / 10) at s = 2 ^ n / (10 n). That inequality fails (at n = 100, 3 s log₂ s ≈ 0.27 · 2 ^ n), but any bound 2 ^ (c · 2 ^ n) with c < 1 proves the theorem. Here the factorial count card_computableFunctions_mul_factorial_le gives c = 1 / 4.