Simulating unbounded fan-in with fan-in two #
A disjunction of k ≥ 1 arguments is a balanced tree of k - 1 disjunctions of fan-in two, of
depth ⌈log₂ k⌉ (Formula.size_orList_add_one, Formula.depthWith_orList_le), and so is a
conjunction. Replacing every gate of a circuit over the unbounded fan-in basis by such a tree
gives a De Morgan circuit for the same function. A gate may read one wire many times, so its
fan-in is not bounded by the size of the circuit; but a conjunction or a disjunction keeps its
value when it reads each of its wires once, so every circuit with n inputs and s gates has an
equivalent circuit of the same size and no larger depth whose gates have fan-in at most n + s
(Unbounded.dedup). Replacing its gates gives a De Morgan circuit with at most s (n + s) gates
and depth at most max 1 ⌈log₂ (n + s)⌉ · d (Unbounded.exists_deMorgan_simulation).
For circuits of polynomial size log (n + s) is O(log n), so polynomial-size circuits of depth
O((log n) ^ i) and unbounded fan-in become polynomial-size circuits of fan-in two and depth
O((log n) ^ (i + 1)): ACⁱ ⊆ NCⁱ⁺¹ (AC_subset_NC_succ)
Arora and Barak, Section 6.7, Vollmer, Chapter 4. With
NCⁱ ⊆ ACⁱ, the two hierarchies have the same union (iUnion_NC_eq_iUnion_AC).
Main definitions #
Cslib.Circuits.Boolean.Unbounded.dedup: the circuit whose gates read their distinct wires.Cslib.Circuits.Boolean.Unbounded.Op.deMorganFormula: a De Morgan formula for each operation of the unbounded fan-in basis.
Main results #
Cslib.Circuits.Boolean.Unbounded.eval_dedup,Cslib.Circuits.Boolean.Unbounded.depth_dedup_le,Cslib.Circuits.Boolean.Unbounded.fanInAtMost_dedup: reading every wire once keeps the function and the size, makes no gate deeper, and bounds the fan-in by the number of inputs and gates.Cslib.Circuits.Boolean.Unbounded.exists_deMorgan_simulation: a circuit of unbounded fan-in withninputs,sgates and depthdhas an equivalent De Morgan circuit with at mosts (n + s)gates and depth at mostmax 1 ⌈log₂ (n + s)⌉ · d.Cslib.Circuits.Boolean.AC_subset_NC_succ: ACⁱ ⊆ NCⁱ⁺¹.Cslib.Circuits.Boolean.AC0_subset_NC_one: AC⁰ ⊆ NC¹.Cslib.Circuits.Boolean.iUnion_NC_eq_iUnion_AC: NC = AC.Cslib.Circuits.Boolean.AC_subset_PPoly: ACⁱ ⊆ P/poly.
References #
Reading every wire once #
The circuit whose gates read their distinct wires, each once. It computes the same function
(eval_dedup) with the same size and no larger depth (depth_dedup_le), and its gates have
fan-in at most the number of inputs and gates (fanInAtMost_dedup).
Instances For
Reading every wire once keeps the function computed.
Fan-in reduction: the gates of dedup C have fan-in at most the number of inputs and
gates of C.
Balanced trees for the gates #
A De Morgan formula for each operation of the unbounded fan-in basis: the negation of the input, and the balanced conjunction and disjunction of the inputs.
Instances For
The De Morgan formula of an operation computes it.
The De Morgan formula of an operation of k arguments has at most max 1 k nodes: one
negation, a constant for no arguments, and k - 1 binary gates for k ≥ 1 arguments.
The De Morgan formula of an operation of k arguments has depth at most max 1 ⌈log₂ k⌉:
one for a negation or a constant, and ⌈log₂ k⌉ for a balanced tree of k ≥ 1 arguments.
Simulation #
Fan-in two simulates unbounded fan-in Arora and Barak, Section 6.7: a
circuit of unbounded fan-in with n inputs, s gates and depth d has an equivalent De Morgan
circuit with at most s (n + s) gates and depth at most max 1 ⌈log₂ (n + s)⌉ · d. Its gates are
first made to read every wire once (dedup), and then replaced by balanced trees.
ACⁱ ⊆ NCⁱ⁺¹ #
ACⁱ ⊆ NCⁱ⁺¹ Arora and Barak, Section 6.7, Vollmer, Chapter 4:
polynomial-size circuits of depth O((log n) ^ i) and unbounded fan-in are simulated by
polynomial-size circuits of depth O((log n) ^ (i + 1)) and fan-in two.