Formula depth from Khrapchenko's bound #
A De Morgan formula with at most d AND and OR gates on every path has at most 2 ^ d leaves
(leafSize_le_two_pow_depthWith_binaryCost), so a function all of whose formulas have at least L
leaves has formula depth at least ⌈log₂ L⌉, with negations free
(clog_le_formulaDepth_of_le_leafSize). With Khrapchenko's bounds
Jukna, Section 6.8, the parity of n bits has formula depth at least ⌈log₂ n ^ 2⌉
(clog_sq_le_formulaDepth_parity) [Khr71a], and the threshold function Th^n_k at least
⌈log₂ k (n + 1 - k)⌉ (clog_mul_le_formulaDepth_threshold) [Khr71b].
For parity this is tight up to one: Yablonskii's balanced formulas
(Complexity/Computability/Circuit/Boolean/Yablonskii.lean) give the upper bound 2 ⌈log₂ n⌉. In
particular the parity of
2 ^ k bits has formula depth exactly 2 k (formulaDepth_parity_two_pow), and for
0 < r ≤ 2 ^ k the parity of 2 ^ k + r bits has formula depth 2 k + 1 or 2 k + 2.
Main results #
Cslib.Circuits.Boolean.clog_le_formulaDepth_of_le_leafSize: a leaf-size lower boundLgives the formula depth lower bound⌈log₂ L⌉.Cslib.Circuits.Boolean.clog_sq_le_formulaDepth_parity,Cslib.Circuits.Boolean.two_mul_log_le_formulaDepth_parity: the formula depth of the parity ofnbits is at least⌈log₂ n ^ 2⌉ ≥ 2 ⌊log₂ n⌋.Cslib.Circuits.Boolean.formulaDepth_parity_two_pow: the formula depth of the parity of2 ^ kbits is2 k.Cslib.Circuits.Boolean.two_mul_add_one_le_formulaDepth_parity,Cslib.Circuits.Boolean.formulaDepth_parity_two_pow_add_le: for0 < r ≤ 2 ^ k, the formula depth of the parity of2 ^ k + rbits is between2 k + 1and2 k + 2.Cslib.Circuits.Boolean.clog_mul_le_formulaDepth_threshold,Cslib.Circuits.Boolean.clog_sq_div_four_le_formulaDepth_majority: formula depth lower bounds for threshold functions and majority.
References #
- V. M. Khrapchenko, Method of determining lower bounds for the complexity of Π-schemes
- V. M. Khrapchenko, Complexity of the realization of a linear function in the class of Π-circuits
- S. V. Yablonskii, Realization of a linear function in the class of π-schemes
- S. Jukna, Boolean Function Complexity: Advances and Frontiers
If every De Morgan formula for f has at least L leaves, the formula depth of f, with
negations free, is at least ⌈log₂ L⌉.
Parity #
The formula depth of the parity of n bits, with negations free, is at least
⌈log₂ n ^ 2⌉.
The formula depth of the parity of n bits, with negations free, is at least 2 log₂ n.
The formula depth of parity. The parity of 2 ^ k bits has formula depth 2 k, with
negations free.
Threshold functions #
The threshold function Th^n_k has formula depth at least ⌈log₂ k (n + 1 - k)⌉, with
negations free.
The majority of n bits has formula depth at least ⌈log₂ ⌊(n + 1) ^ 2 / 4⌋⌉, with negations
free.