boolean circuit

the Boolean circuit is a model of computation which is a generalization of boolean formulas and a simplified model of the silicon chips used to make modern computers. it is a natural model for nonuniform computation.
[cite:;taken2 from @computability_arora_2009 chapter 6 boolean circuits]
a basis is a finite set consisting of boolean functions and families of boolean functions.
[cite:;taken from @complexity_vollmer_2016 chapter 1.2 circuit size and depth; definition 1.5]
  • is the standard bounded fan-in basis.
  • is the standard unbounded fan-in basis.
  • is the basis of constants and boolean functions of 1 or 2 variables.
[cite:;taken from @complexity_vollmer_1999 definition 1.12]
let be a basis. a boolean circuit over with inputs and outputs is a tuple
where is a finite directed acyclic graph, is an injective function, , and , such that the following conditions hold:
  1. if has in-degree 0, then or is a 0-ary boolean function (i.e. a boolean constant) from .
  2. if has in-degree , then is a -ary boolean function from or a family of boolean functions from .
  3. for every , , there is at most one node such that .
  4. for every , , there is exactly one node such that .
if has in-degree and out-degree , then we say: is a gate in with fan-in and fan-out . if is a gate in then we also write instead of . if then we say: is a wire in ; more specifically we say that is an input wire of and an output wire of ; and that is a predecessor gate of . if for some then is an input gate or input node. if then is an output gate or output node.
[cite:;taken from @complexity_vollmer_2016 chapter 1.2 circuit size and depth; definition 1.6]
arora's gives a somewhat different definition:
for every , an -input, single-output boolean circuit is a directed acyclic graph with sources (vertices with no incoming edges) and one sink (vertex with no outgoing edges). all nonsource vertices are called gates and are labeled with one of or . the vertices labeled with and have fan-in (i.e., the number of incoming edges) equal to 2 and the vertices labeled with have fan-in 1. the size of , denoted by , is the number of vertices in it.
if is a boolean circuit, and is some input, then the output of on , denoted by , is defined in the natural way. more formally, for every vertex of , we give it a value as follows: if is the th input vertex then and otherwise is defined recursively by applying 's logical operation on the values of the vertices connected to . the output is the value of the output vertex.
[cite:;taken from @computability_arora_2009 definition 6.1]
though this definition restricts fan-in to 2, this is essentially without loss of generality since a or gate with fan-in can be easily repaced with a subcircuit consisting of gates of fan-in 2.
[cite:;taken from @computability_arora_2009 chapter 6.1 boolean circuits and ]
a circuit with inputs and outputs computes a function
this is formalized in the following definition.
[cite:;refer to @complexity_vollmer_2016 chapter 1.2 circuit size and depth; definition 1.7]
complexity theorists usually pay special attention to 0-1-valued functions, because they can be interpreted as characteristic functions of some set of words.
if is a circuit with one output gate, i.e., computes the characteristic function of some broken link: blk:def-lang , then we say: accepts . if such that then we also say: accepts .
[cite:;taken from @complexity_vollmer_2016 definition 1.9]
a single circuit computes only a finite function, i.e., a function with finite domain and range. as an example, for every the function from [cite:;in @complexity_vollmer_2016 chapter 1.1 an example: addition] is finite. if a circuit accepts a language , then must be finite ( for some ). however, generally we are interested in infinite functions; e.g., we want to add numbers of arbitrary length or we want to build acceptors for arbitrary, possibly infinite sets. a circuit however by definition has a fixed finite number of inputs and outputs. thus we will have to consider different circuits for different input lengths. therefore we consider circuit families.
let be a basis. a circuit family over is a sequence , where for every , is a boolean circuit over with inputs. let be the function computed by . then we say that computes the function , defined for every by
we write and . we say that accepts if and only if computes . in this context we also use the notation (where ) and . if is a circuit family then we use the notation for the function computed by .
[cite:;taken from @complexity_vollmer_2016 definition 1.10]
let be a boolean circuit over . the size of is defined to be the number of non-input gates in , i.e., , and the depth of is defined to be the length of a longest directed path in the graph .
let be a circuit family, and let . has size and depth if for every , has size and depth .
[cite:;taken from @complexity_vollmer_2016 definition 1.11]
let be a basis, and let . we define the following complexity classes:
  • is the class of all sets for which there is a circuit family over basis of size that accepts .
  • is the class of all sets for which there is a circuit family over basis of depth that accepts .
  • is the class of all sets for which there is a circuit family over basis of size and depth that accepts .
  • is the class of all functions for which there is a circuit family over basis of size that computes .
  • is the class of all functions for which there is a circuit family over basis of depth that computes .
  • is the class of all functions for which there is a circuit family over basis of size and depth that computes .
in the case where we have the basis we simply omit the index, that is , etc. in the case where the basis is we omit the index but we prefix the class with "Unb", e.g., we write for .
[cite:;taken from @complexity_vollmer_2016 definition 1.13]
[cite:;taken from @complexity_vollmer_2016 chapter 1.2 circuit size and depth]
given any circuit with NOT gates, we can use demorgan to "push back" all NOTs to the inputs so that there are no NOT gates in the circuit anymore beside those that are applied to the input gates. this property is sometimes exploited and NOT gates are ignored and our circuits would only consist of OR and AND gates.
for every broken link: blk:def-str there is some boolean circuit of size with inputs such that given a string it returns 1 if and 0 otherwise.
let for some , for every from 1 to , we define a literal
in other words we have iff . now consider the trivial circuit that computes .
this can be used to show a trivial but weak bound on the size complexity of circuits of variables:
for every for some we have .
given an input , consider the circuit defined by
where the equality is checked by the circuit from boolean_circuit.html. since we have possible permutations of we can have an equality circuit for each which would give us a boolean circuit of total size .
a better (but not the best) upper bound of can be achieved:
function decomposition: . observe that
where and . thus
apply the decomposition recursively to and . generally at step ,
where . since is a constant at the step, is an upper bound on the circuit size of .
BROKEN
a stronger upper bound is found in BROKEN. the following lemma proposes a worst-case complexity upper bound for any sufficiently complex boolean functions, as some boolean simpler functions can have size complexity that is as low as .
let , we have for sufficiently large .
the following lemma is equivalent:
let , and let , then there is atleast functions whose circuit size complexity is atleast .
[cite:;found in @complexity_jukna_2012 theorem 1.14]
[cite:;found in @complexity_vollmer_1999 theorem 1.47]
BROKEN
for every , the number of circuits of size with inputs is at most .
we show that every such circuit can be described by a string of bits. this would show that the number of those circuits is at most the total number of the possible strings. given some circuit we describe it by blocks of strings each block of length at most.
for every gate in the circuit we use a block with:
  1. which vertex is the first with an edge to the gate . the circuit contains vertices: gates, input gates of the form and input gates of the form . hence to represent the vertex we need bits.
  2. we apply the same thing to the second vertex ( more bits).
  3. which function does compute (1 bit).
  4. whether is at all present in the circuit, as there can be less than gates (1 bit).
in total we need bits.
if we substitute in this claim we get that the number of circuits of this size is at most
and so the number of functions with size complexity greater than is atleast .
every can be computed by circuits with gates over the basis .
[cite:;taken2 from @complexity_vollmer_1999 theorem 1.51]
for a circuit , denotes the size of .
let be a basis. for a boolean function , we define:
we may simply write if the basis is known from context or is simply a standard basis.
[cite:;taken from @complexity_vollmer_1999 definition 3.1]
for a circuit , denotes the depth of .
let be a basis. for a boolean function , we define:
we may simply write if the basis is known from context or is simply a standard basis.
a boolean circuit of depth with one output gate has a most intermediary gates and input gates. to receive we need . for every we have
the following remains an open question:
is there a function that is computable by a boolean formula in polynomial size? the best known until today: such that , i.e. .
for every functions with ,
[cite:;taken2 from @computability_arora_2009 theorem 6.22]
diagonalization methods do not seem to apply in this setting; nevertheless, we are able to prove the theorem using shannon's counting argument. to show the idea, we prove that .
by boolean_circuit.html, for every , there is a function that is not computable by -sized circuits. on the other hand, by boolean_circuit.html, every function from to is computable by a -sized circuit.
therefore, if we set and let be the function that applies on the first bits of its input, then
[cite:;taken2 from @computability_arora_2009 theorem 6.22]