Documentation

Complexity.Computability.Circuit.Boolean.KhrapchenkoDepth

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 #

References #

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.

For r > 0, the parity of 2 ^ k + r bits has formula depth at least 2 k + 1.

For r ≤ 2 ^ k, the parity of 2 ^ k + r bits has formula depth at most 2 k + 2.

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.