Threshold and majority circuits in NC¹ #
Combining the logarithmic-depth carry-save Hamming weight circuit (weightCircuit) with the
comparator (leCircuit) yields a fan-in-two De Morgan circuit thresholdDeMorganCircuit k j
computing the k-bit threshold function threshold k j in size O(k log k) and depth
O(log k) (computes_thresholdDeMorganCircuit, size_thresholdDeMorganCircuit_le,
depth_thresholdDeMorganCircuit_le) Chandra et al.,
Vollmer, Chapter 4. Specializing to cutoff ⌈k / 2⌉ gives a De Morgan circuit
majorityDeMorganCircuit k for majority k.
Consequently, any threshold slice family fun n => threshold n (t n) lies in NC¹
(threshold_mem_NC_one), and in particular MAJ ∈ NC¹ (majority_mem_NC_one) and
strictMajority ∈ NC¹ (strictMajority_mem_NC_one). Replacing each gate of a fan-in-bounded
threshold or majority circuit by thresholdDeMorganCircuit simulates depth d and fan-in F
in De Morgan depth O(d log F) and size O(s F log F)
(Threshold.exists_deMorgan_simulation_of_fanInAtMost,
Unbounded.exists_deMorgan_simulation_majority_of_fanInAtMost).
Main definitions #
Cslib.Circuits.Boolean.wordConstCircuit: a constantw-bit word circuit of size2and depth at most1.Cslib.Circuits.Boolean.thresholdDeMorganCircuit: a De Morgan circuit of sizeO(k log k)and depthO(log k)computingthreshold k j.Cslib.Circuits.Boolean.majorityDeMorganCircuit: a De Morgan circuit of sizeO(k log k)and depthO(log k)computingmajority k.Cslib.Circuits.Boolean.Threshold.Op.deMorganCircuit: a De Morgan circuit for each operation of the threshold basis.
Main results #
Cslib.Circuits.Boolean.computes_thresholdDeMorganCircuit,size_thresholdDeMorganCircuit_le,depth_thresholdDeMorganCircuit_le.Cslib.Circuits.Boolean.computes_majorityDeMorganCircuit,size_majorityDeMorganCircuit_le,depth_majorityDeMorganCircuit_le.Cslib.Circuits.Boolean.threshold_mem_NC_one,majority_mem_NC_one,strictMajority_mem_NC_one.Cslib.Circuits.Boolean.Threshold.exists_deMorgan_simulation_of_fanInAtMost,Cslib.Circuits.Boolean.Unbounded.exists_deMorgan_simulation_majority_of_fanInAtMost.Cslib.Circuits.Boolean.mem_NC_succ_of_threshold_fanInAtMost,Cslib.Circuits.Boolean.mem_NC_succ_of_majority_fanInAtMost.
References #
- [A. K. Chandra, L. Stockmeyer, U. Vishkin, Constant depth reducibility] [CSV84]
- S. Arora, B. Barak, Computational Complexity: A Modern Approach
- H. Vollmer, Introduction to Circuit Complexity
Constant word circuit #
Threshold and majority circuits in NC¹ #
Logarithmic-depth threshold circuit: computes threshold k j over the De Morgan basis of
fan-in two by computing the ⌈log₂ (k + 1)⌉-bit binary numeral of the input's Hamming weight
(weightCircuit k) and comparing it against j (leCircuit). When k < j, the threshold cannot
be met and a single false gate is used.
Instances For
thresholdDeMorganCircuit k j computes threshold k j.
thresholdDeMorganCircuit k j has depth at most 2 + 23 ⌈log₂ (k + 1)⌉.
Logarithmic-depth majority circuit: computes majority k over the De Morgan basis of
fan-in two in size O(k log k) and depth O(log k).
Instances For
majorityDeMorganCircuit k computes majority k.
Quadratic upper bound on the size of majorityDeMorganCircuit k.
majorityDeMorganCircuit k has depth at most 2 + 23 ⌈log₂ (k + 1)⌉.
Every family of threshold functions fun n => threshold n (t n) belongs to NC¹.
Majority is in NC¹.
Strict majority is in NC¹.
Simulating fan-in-bounded threshold and majority circuits #
A De Morgan circuit of fan-in two for each operation of the threshold basis: one negation gate
for .not, and thresholdDeMorganCircuit m j for .threshold m j.
Instances For
The De Morgan circuit of a threshold operation computes it.
The De Morgan circuit of a threshold operation of arity k uses O(k log k) gates.
De Morgan circuits simulate fan-in-bounded threshold circuits: a circuit over the threshold
basis of n inputs, s gates, depth d, and fan-in at most F has an equivalent De Morgan
circuit of fan-in two with at most
s (4 + F + 40 F ⌈log₂ (F + 1)⌉ + ⌈log₂ (F + 1)⌉ (20 ⌈log₂ (F + 1)⌉ + 6)) gates and depth at most
(2 + 23 ⌈log₂ (F + 1)⌉) d.
A De Morgan circuit of fan-in two for each operation of the TC basis: balanced trees for the
unbounded fan-in operations, and majorityDeMorganCircuit m for .gate m.
Instances For
The De Morgan circuit of a TC operation computes it.
The De Morgan circuit of a TC operation of arity k uses O(k log k) gates.
De Morgan circuits simulate fan-in-bounded majority circuits: a circuit over the TC basis
(unbounded AND, OR, NOT, and MAJ gates) of n inputs, s gates, depth d, and fan-in at
most F has an equivalent De Morgan circuit of fan-in two of size O(s F log F) and depth
O(d log F).
Any language decided by polynomial-size, polynomially fan-in-bounded threshold circuits of
depth O((log n) ^ i) belongs to NCⁱ⁺¹ Vollmer, Theorem 4.22.
Any language decided by polynomial-size, polynomially fan-in-bounded TC circuits of depth
O((log n) ^ i) belongs to NCⁱ⁺¹ Vollmer, Theorem 4.22.