Threshold functions by De Morgan circuits of quadratic size #
Given Boolean functions f 0, f 1, … that are already available, the functions "at least j of
f 0, …, f (i - 1) are true" satisfy the recursion
atLeast (i + 1) (j + 1) = atLeast i (j + 1) ∨ (f i ∧ atLeast i j),
so all of them for i, j ≤ k are synthesised with O(k ^ 2) gates over the De Morgan basis. In
particular every threshold function, and the majority, of k available functions has a circuit of
size O(k ^ 2) on top of them.
Main definitions #
Cslib.Circuits.Boolean.atLeast: the counting functions.
Main results #
Cslib.Circuits.Boolean.synthesis_atLeastUpTo: all counting functions fori ≤ k.Cslib.Circuits.Boolean.synthesis_atLeast: one threshold function, withinO(k ^ 2)gates.Cslib.Circuits.Boolean.complexity_threshold_le: the threshold functionsCslib.thresholdonmvariables have circuits withO(m ^ 2)gates.
atLeast f i j x: at least j of f 0 x, …, f (i - 1) x are true.
Instances For
The counting functions of levels 0, …, i.
Instances For
All counting functions of levels 0, …, i ≤ k, if f 0, …, f (k - 1) are available in s:
two constants, and two gates for each pair (i', j) with 0 < i' ≤ i and j ≤ k + 1.
The threshold function "at least j of f 0, …, f (k - 1) are true", for j ≤ k + 1, on
top of available functions, within O(k ^ 2) gates.
The threshold functions on m variables have circuits with O(m ^ 2) gates.