Complexitylib circuits and CSLib circuits #
CSLib's circuit model counts every gate of its De Morgan basis (constants,
negation, binary conjunction and disjunction) toward size. Our fan-in-two
AND/OR circuits (Basis.andOr2) make negation free and count their output
gates. The two sizes agree up to a factor of two and an additive N:
Circuit.ofCslibturns a CSLib circuit of sizegwithMoutputs into one of ours of sizeg + M(Circuit.eval_ofCslib,Circuit.size_ofCslib);Circuit.exists_cslibturns one of ours withGinternal gates into a CSLib circuit of size at mostN + 2G + M.
CSLib proves the sharp counting bounds for its model, and they transfer here
with different losses. Lupanov's upper bound, previously missing from this
library, transfers sharply: Circuit.sizeComplexity is at most
(1 + ε) 2ⁿ / n for large n. Shannon's lower bound pays the factor of two of
Circuit.exists_cslib: some function has 2ⁿ / n < n + 2 · sizeComplexity,
that is, size complexity above (2ⁿ / n - n) / 2, about half the sharp bound
2ⁿ / n.
Main results #
Complexity.Circuit.sizeComplexity_le_of_cslib,Complexity.Circuit.exists_cslib_of_sizeComplexity— size complexity versus CSLib gate countsComplexity.lupanov_sizeComplexity— every function onnbits has size complexity at most(1 + ε) 2ⁿ / nfor largenComplexity.exists_sizeComplexity_gt_cslib— some function onnbits has size complexity above(2ⁿ / n - n) / 2for largenComplexity.mem_PPoly_iff_cslib—P/polyis exactly the class of languages with polynomial-size CSLib De Morgan circuits at every input length; seeComplexity.PPoly_eq_cslib_PPolyfor the equality with CSLib's own class
A single-output CSLib circuit computes f exactly when its only output
agrees with f on every input.
CSLib circuits run as ours. The translation computes what the CSLib circuit computes.
The translation of a CSLib circuit of size g with M outputs has size
g + M.
Our circuits run as CSLib's. A fan-in-two AND/OR circuit with G
internal gates and M outputs has a CSLib De Morgan circuit of size at most
N + 2G + M computing the same outputs.
A CSLib De Morgan circuit computing f bounds its fan-in-two AND/OR size
complexity by its size plus one.
Every function has a CSLib De Morgan circuit of size at most
N + 2 · sizeComplexity f.
Lupanov's upper bound. For every ε > 0 and all sufficiently large n,
every Boolean function on n bits has fan-in-two AND/OR size complexity at
most (1 + ε) 2ⁿ / n. Transferred from CSLib's De Morgan bound.
Shannon's lower bound, transferred from CSLib. For all sufficiently
large n, some Boolean function on n bits has fan-in-two AND/OR size
complexity above (2ⁿ / n - n) / 2.
P/poly in CSLib's circuit model. A language is in P/poly exactly
when, for some polynomial p and every input length n, a CSLib De Morgan
circuit of size at most p(n) decides its length-n slice.