Non-uniform model of computation: Boolean circuit model.

In contrast to uniform model like Turing machine.

Boolean circuit: Fixed number of inputs. To study computation of arbitrary inputs, we need a family of Boolean circuits.

Some Definitions

📖Definition of Boolean circuit. A Boolean circuit CC with nn inputs and mm outputs consists of:

  1. A directed acyclic graph D=(V,A)D=(V,A) where the in-degree of every node is at most 22.
  2. A labeling \ell of all nodes gVg\in V with \ell(g)\in\{0,1,x_1,\cdots,x_n,\overline{x_1},\cdots,\overline{x_n},\and,\or,\neg\}.
  3. A choice of mm output gates o1,,omVo_1,\cdots, o_m\in V.

The nodes of DD is the gates of CC, the arcs of DD is the wires of CC.

Nodes with in-degree 00 are input gates.

The size of CC is the number of gates.

Fanin of a gate is its in-degree, fanout is its out-degree.

Labeling function should satisfy: For all gates gg:

  1. If the fanin is 00, then \ell(g)\in\{0,1,x_1,\cdots,x_n,\overline{x_1},\cdots,\overline{x_n},\and,\or,\neg\}.
  2. If the fanin is 11, then (g)=¬\ell(g)=\neg.
  3. If the fanin is 22, then \ell(g)\in\{\and,\or\}.

A Boolean circuit CC with nn inputs and mm outputs computes a Boolean function f:{0,1}n{0,1}mf:\{0,1\}^n\to\{0,1\}^m.

Implicit negation such as xi\overline{x_i} can be made explicit by introducing a new gate, thereby at most doubling the size of the circuit.

📖Definition of family of Boolean circuits. A family (Cn)n=0(C_n)_{n=0}^\infty of Boolean circuits, where CnC_n is a circuit with nn inputs computes the Boolean function f:{0,1}{0,1}f:\{0,1\}^*\to\{0,1\} given by f(x)=Cx(x)f(x)=C_{|x|}(x). We say that (Cn)n=0(C_n)_{n=0}^\infty computes the language L{0,1}L\subseteq\{0,1\}^\star if (Cn)n=0(C_n)_{n=0}^\infty computes the characteristic function χL:{0,1}{0,1}\chi_L:\{0,1\}^\star\to\{0,1\} of LL given by χL(x)=1\chi_L(x)=1 iff xLx\in L.

直白一点:我们说一个布尔电路族 (Cn)n=0(C_n)_{n=0}^\infty 计算~~(接受?)~~语言 LL,当且仅当该布尔电路族的输入 xx 属于语言 LL时,输出结果为 11

If we want to apply non-Boolean alphabet, we just encode these letters into {0,1}k\{0,1\}^k for some fixed kk.

📖Definition of SIZESIZE. Let S:NNS:\mathbb N\to\mathbb N. SIZE(S(n))SIZE(S(n)) is the class of languages computed by family of Boolean circuit of size O(S(n))O(S(n)),

We interested in class of languages computed by a family of polynomial size.

P/poly=k>0SIZE(nk).P/poly=\bigcup_{k>0}SIZE(n^k).

📖Definition of log-space/polynomial-time uniform. Let (Cn)n=0(C_n)_{n=0}^\infty be a family of Boolean circuits of size O(S(n))O(S(n)). We say that the family is log-space uniform if the function 1nCn1^n\mapsto C_n is computable in space O(logS(n))O(\log S(n)). The family is polynomial-time uniform if the function is computable in time (S(n))O(1)(S(n))^{O(1)}.

📖Definition of complexity classes of languages computed by families of Boolean circuits. Let S:NNS:\mathbb N\to\mathbb N.

  • ULSIZE(S(n))U_L-SIZE(S(n)) is the class of languages computed by log-space uniform families of Boolean circuits of size O(S(n))O(S(n)).
  • UPSIZE(S(n))U_P-SIZE(S(n)) is the class of languages computed by polynomial-time uniform families of Boolean circuits of size O(S(n))O(S(n)).

Boolean Formulas

📖Definition of Boolean formulas. A Boolean formula (aka de Morgan formula) is a Boolean circuit where the underlying directed graph is a tree.

合取范式 conjunctive normal form CNF

析取范式 disjunctive normal form DNF

🎯Theorem 14. Any Boolean function f:{0,1}n{0,1}f:\{0,1\}^n\to\{0,1\} is computed by a CNF with ss clauses of length nn and a DNF with tt terms of length nn where

s={x{0,1}nf(x)=0},t={x{0,1}nf(x)=1}.s=|\{x\in\{0,1\}^n|f(x)=0\}|,\\ t=|\{x\in\{0,1\}^n|f(x)=1\}|.

The Shannon Function

The smallest size L(n)L(n) in which any Boolean function on nn variables can be computed by a Boolean circuit of size L(n)L(n).

The function L(n)L(n) is called the Shannon function.

By DNF/CNF formulas, we have trivial bound L(n)n2nL(n)\le n2^n.

Shannon proved that L(n)=Θ(2n/n)L(n)=\Theta(2^n/n).

🎯Theorem 15 (Lower Bound on Circuit Size). L(n)>2n4nL(n)>\frac{2^n}{4n} for n9n\ge9. In fact, the fraction of Boolean functions computed by Boolean circuits of size at most 2n4n\frac{2^n}{4n} is at most 22n12^{-2^{n-1}} for n9n\ge9.

For a given number of inputs n1n\ge1: first give an upper bound on number of Boolean circuits with nn inputs and 11 output, with at most s1s\ge1 gates. Consider an acyclic ordering of the gates of the circuit and assume the last gate is the output gate.

Different types of gate: input gates have 2n+22n+2 probabilities, negation with one input ss, and/or with two inputs (s2,s2)(s^2,s^2). Thus we have at most 2n+2+s+s2+s22n+2+s+s^2+s^2 options for every gate, meaning that we have at most (2n+2+s+2s2)s(2n+2+s+2s^2)^s many circuits with at most ss gates.

For sn+1s\ge n+1 we have

2n+2+s+2s24s2(2n+2+s+2s2)s(2s)2s.2n+2+s+2s^2\le4s^2\\ \Rarr(2n+2+s+2s^2)^s\le(2s)^{2s}.

Each of these at most (2s)2s(2s)^{2s} circuits computes precisely one Boolean function. There are exactly 22n2^{2^n} different Boolean functions on nn inputs.

Thus if 22n>(2s)2s2^{2^n}\gt(2s)^{2s}, there must be a Boolean function that is not computed by a Boolean circuit of size ss. (By pigeon hole theorem)

Let n9,s=2n4nn\ge9,s=\frac{2^n}{4n}, which satisfies sn+1s\ge n+1, we have

(2s)2s=22slog2(2s)=22n2n(n1logn)<22n1.(2s)^{2s}=2^{2s\log_2(2s)}=2^{\frac{2^n}{2n}(n-1-\log n)}\lt2^{2^{n-1}}.

It follows that less than 22n12^{2^{n-1}} Boolean functions on nn inputs are computed by Boolean circuits of size at most 2n4n\frac{2^n}{4n}.

Turing Machines versus Boolean Circuits

Oblivious Turing machine can efficiently be converted to a family of Boolean circuits.

🤔Proposition 1. Let T(n)nT(n)\ge n and suppose LL is computed by a O(T(n))O(T(n)) time-bounded oblivious Turing machine. Then LSIZE(T(n))L\in SIZE(T(n)).

Any configuration of oblivious Turing machine on input xx can be encoded by a binary string of length O(T(n))O(T(n)) s.t. every symbol of every work tape corresponds to a fixed number of positions of the encoding.

We can build the Boolean circuit for input length nn in O(T(n))O(T(n)) steps. Proof by induction.

Proposition 1 and Theorem 4 result in some inclusion relation.

🎯Theorem 16. DTIME(T(n))SIZE(T(n)logT(n))DTIME(T(n))\subseteq SIZE(T(n)\log T(n)) for T(n)nT(n)\ge n.

Turing machine is supplied with an advice string in addition to the input, where the advice string is specific to the input length.

📖Definition of Advice classes. Let C\mathcal C be a class of languages and f:NNf:\mathbb N\to\mathbb N a function. Define C/f(n)\mathcal C/f(n) to be the class of languages LL for which there exist LCL'\in\mathcal C satisfying that for all input lengths nn, there is an advice string yny_n of length f(n)f(n) s.t. for all xx of length nn, we have xLx\in L iff x,ynL\langle x,y_n\rangle\in L'. For a family F\mathcal F of functions F:NNF:\mathbb N\to\mathbb N, we let C/F=fFC/f(n)\mathcal C/\mathcal F=\bigcup_{f\in\mathcal F}\mathcal C/f(n).

🎯Theorem 17. Let S(n)nS(n)\ge n. Then SIZE(S(n))DTIME(S(n)2)/O(S(n)logS(n))SIZE(S(n))\subseteq DTIME(S(n)^2)/O(S(n)\log S(n)).

The advice string (length nn) is an encoding of the circuit CnC_n, which is a string of length O(S(n)logS(n))O(S(n)\log S(n)).

Assume that the gates of CnC_n are given in the encoding in acyclic order. On input xx of length nn and advice CnC_n, a Turing machine can evaluate CnC_n on input xx, evaluating the gates in the given acyclic ordering and storing all intermediate outputs.

To evaluate each gate we need to retrieve the computed value of its inputs, which will take O(S(n))O(S(n)) time. Doing this for all O(S(n))O(S(n)) gates leads to O(S(n)2)O(S(n)^2).

🎯Corollary 1. Let T(n)nT(n)\ge n. Then DTIME(T(n)O(1))/T(n)O(1)=SIZE(T(n)O(1))DTIME(T(n)^{O(1)})/T(n)^{O(1)}=SIZE(T(n)^{O(1)})

Proof by Definition of advice class and Theorem 17.

🎯Theorem 18. Let T(n)nT(n)\ge n and suppose the function 1nT(n)1^n\mapsto T(n) is computable in space O(logT(n))O(\log T(n)). Then DTIME(T(n))ULSIZE(T(n)logT(n))DTIME(T(n))\subseteq U_L-SIZE(T(n)\log T(n)).

🎯Theorem 19. Let (S(n))n(S(n))\ge n. Then ULSIZE(S(n))DTIME(S(n)O(1))U_L-SIZE(S(n))\subseteq DTIME(S(n)^{O(1)}).

🎯Corollary 2. Let T(n)nT(n)\ge n and suppose that function 1nT(n)1^n\mapsto T(n) is computable in space O(logT(n))O(\log T(n)). Then DTIME(T(n)O(1))=ULSIZE(T(n)O(1))DTIME(T(n)^{O(1)})=U_L-SIZE(T(n)^{O(1)}).

In particular, we have P=ULSIZE(nO(1))P=U_L-SIZE(n^{O(1)}).