Circuit Complexity Circuit Model Aims to Offer Unconditional Lower Bound Results
Total Page:16
File Type:pdf, Size:1020Kb
Circuit Complexity Circuit model aims to offer unconditional lower bound results. Computational Complexity, by Fu Yuxi Circuit Complexity 1 / 58 Synopsis 1. Boolean Circuit Model 2. Uniform Circuit 3. P=poly 4. Karp-Lipton Theorem 5. NC and AC 6. P-Completeness Computational Complexity, by Fu Yuxi Circuit Complexity 2 / 58 Boolean Circuit Model Computational Complexity, by Fu Yuxi Circuit Complexity 3 / 58 Boolean circuit is a nonuniform computation model that allows a different algorithm to be used for each input size. Boolean circuit model appears mathematically simpler, with which one can talk about combinatorial structure of computation. Computational Complexity, by Fu Yuxi Circuit Complexity 4 / 58 Boolean Circuit An n-input, single-output boolean circuit is a dag with I n sources (vertex with fan-in 0), and I one sink (vertex with fan-out 0). All non-source vertices are called gates and are labeled with I _; ^ (vertex with fan-in 2), and I : (vertex with fan-in 1). A Boolean circuit is monotone if it contains no :-gate. If C is a boolean circuit and x 2 f0; 1gn is some input, then the output of C on x, denoted by C(x), is defined in the natural way. Computational Complexity, by Fu Yuxi Circuit Complexity 5 / 58 Example 1. f1n j n 2 Ng. 2. fhm; n; m+ni j m; n 2 Ng. Computational Complexity, by Fu Yuxi Circuit Complexity 6 / 58 Boolean Circuit Family The size of a circuit C, notation jCj, is the number of gates in it. Let S : N ! N be a function. An S(n)-size boolean circuit family is a sequence fCngn2N of boolean circuits, where Cn has n inputs and a single output, and jCnj ≤ S(n) for every n. Computational Complexity, by Fu Yuxi Circuit Complexity 7 / 58 Circuit Model Accepts Undecidable Language A unary language L ⊆ f1n j n 2 Ng is accepted by a linear size circuit family. Fact. Not every unary language is decidable. Computational Complexity, by Fu Yuxi Circuit Complexity 8 / 58 Nonuniform Complexity Class A problem L is in SIZE(S(n)) if there exists an S(n)-size circuit family fCngn2N such n that for each x 2 f0; 1g , x 2 L iff Cn(x) = 1. Unlike in a uniform model, SIZE(cS(n)) 6= SIZE(S(n)) generally. This follows from Circuit Hierarchy Theorem. Computational Complexity, by Fu Yuxi Circuit Complexity 9 / 58 Boolean Functions are Hard 2n 2n Shannon. Most n-ary boolean functions have circuit complexity > n − o( n ). 2n 2n Lupanov. The size complexity of the hardest n-ary boolean function is < n + o( n ). 2n log n Lutz. The size complexity of the hardest n-ary boolean function is > n (1 + c n ) for some c < 1 and all large n. 1. C. Shannon. The Synthesis of Two-Terminal Switching Circuits. Bell System Technical Journal. 28:59-98, 1949. 2. O. Lupanov. The Synthesis of Contact Circuits. Dokl. Akad. Nauk SSSR (N.S.) 119:23-26, 1958. 3. J. Lutz. Almost Everywhere High Nonuniform Complexity. JCSS, 1992. Computational Complexity, by Fu Yuxi Circuit Complexity 10 / 58 Shannon's Counting Argument Fixing an output gate, the number of functions defined by S-size circuits is bounded by (S + n + 2)2S 3S (S + n + 2)2S (3e)S < S (S − 1)! S S n + 2 = (1 + )S (3e(S + n + 2))S S S n+2 S < (e S 3e(S + n + 2)) S < (3e2(S + n + 2))S S < (6e2S)S S: To define an -fraction of the functions, (7e2S)S ≥ 22n must be valid. It follows that S(log(7e2) + log S) ≥ 2n − log −1: (1) 2n 1 It is easy to see that S ≤ n − log( ) would contradict (1). Computational Complexity, by Fu Yuxi Circuit Complexity 11 / 58 By Shannon Theorem and Lupanov Theorem, the circuit Cf for the hardest n-ary boolean function f has the following bounds: 2n 2n jC j = ± o : f n n Frandsen and Miltersen have provided a proof of the following. 2n log n 1 2n log n 1 1 + − O ≤ jC j ≤ 1 + 3 + O : n n n f n n n 1. G. Frandsen and P. Miltersen. Reviewing Bounds on the Circuit Size of the Hardest Functions. Information Processing Letters, 2005. Computational Complexity, by Fu Yuxi Circuit Complexity 12 / 58 Lower Bound Frandsen and Miltersen translate a circuit into a stack machine, and bound the length of the machine by a combinatorial argument. I Inputs are numbered 1;:::; n. I Boolean operations are numbered n + 1;:::; n + s. I A program is a finite sequence of push and Boolean operation. I Push i, where i is a number for an input or an early Boolean operation. I A Boolean operation pops two elements and pushes one element. I After the execution of a program, there is exactly one element left in the stack. continued on the next two slides. Computational Complexity, by Fu Yuxi Circuit Complexity 13 / 58 Sn+s Input: A circuit C = f1;:::; ng [ i=n+1fgi = gi1 op gi2 g, where g1;:::; gn are inputs. Output: A program P that computes the same boolean function as C. Procedure: begin P is initially empty; SM(n + s) end SM(i). 1. If gi is an input, add \Push i" to P. 2. If gi has been computed by the j-th Boolean operation in P, add \Push n + j" to P. 3. If gi = gi1 op gi2 has not been computed yet, then 3.1 SM(i1). 3.2 SM(i2). 3.3 Add \op" to P. Each push increases stack size by one, and each operation decreases stack size by at most one. Since the machine stops with one value in the stack, P has precisely s + 1 push operations. Computational Complexity, by Fu Yuxi Circuit Complexity 14 / 58 jPj < (s + 1)(c + log(n + s)) for some c since the size of the argument of Push is log(n + s). n There are 22 Boolean functions. So for some function the optimal circuit has size s such that (s + 1)(c + log(n + s)) ≥ 2n: (2) 2n log(n) c We show that (2) implies the lower bound inequality s > n (1 + n − n ) for large n. 2n log(n) c 2n log(n) c n2 If s ≤ n (1 + n − n ), then n + s ≤ n (1 + n − n + 2n ). By log(1+x) < x log(e), 2n ≤ (s + 1)(c + log(n + s)) 2n log(n) c n log n c n2 ≤ (1 + − + )(n − log n + c + ( − + ) log e) n n n 2n n n 2n 2n n2 log n c n2 ≤ (n + log(n) − c + )(n − log n + c + ( − + ) log e) n2 2n n n 2n ≤ (2n=n2)(n2 − log2(n) + O(log n)) < 2n: Computational Complexity, by Fu Yuxi Circuit Complexity 15 / 58 Upper Bound (k; s)-Lupanov representation of n-ary boolean function f . _ _ r c f (x) = fi;v (a) ^ fi;v (b): i2[p] v2f0;1gs k n−k k I x = ab where a 2 f0; 1g and b 2 f0; 1g ; and p = 2 =s. k I A1; A2;:::; Ap are a partition of f0; 1g , s = jA1j = ::: = jAp−1j ≥ jApj > 0. c I fi;v (b) = 1 if v is the function table of f ( ; b) on Ai . r I fi;v (a) = 1 if a = Ai (j) for j 2 [s], necessarily unique, and v(j) = 1. Computational Complexity, by Fu Yuxi Circuit Complexity 16 / 58 Upper Bound A Circuit for f can be constructed in three steps. 1. Use 2(2k + 2n−k ) gates to compute all minterms over a and b. n−k s (c) (r) 2. Use p2 , respectively p2 , or-gates to compute fi;v , respectively fi;v , for all i; v. 3. Use 2p2n−k gates to compute f . So we may use at most 2(2k + 2n−k ) + p2n−k + 3p2n−k gates to compute f . k n k n−k s k+s I Using p ≤ 1 + 2 =s, we get the upper bound 2 =s + 2 · 2 + 3(2 + 2 + 2 =s). n I Set k = 2 log n and s = n − 3 log n. The upper bound is dominated by 2 =s. Now !! 2n 2n 2n 3 log n 2n log n log2 n ≤ = 1 + = 1 + 3 + O : s n − 3 log n n n − 3 log n n n n2 Computational Complexity, by Fu Yuxi Circuit Complexity 17 / 58 Circuit Hierarchy Theorem Theorem. If n < (2 + )S(n) < S 0(n) 2n=n for > 0, then SIZE(S(n)) ( SIZE(S 0(n)). Let 2m m = max m: S 0(n) ≥ 1 + : 4 m It follows from the assumption that 2m S(n) < 1 − : 4 + 2 m Consider the set Bn of all n-ary Boolean functions that depend on the first m inputs. 0 I By Lupanov Theorem, Bn ⊆ SIZE(S (n)) for large n. I By Shannon Theorem, Bn 6⊆ SIZE(S(n)) for large n. Computational Complexity, by Fu Yuxi Circuit Complexity 18 / 58 Uniform Circuit Computational Complexity, by Fu Yuxi Circuit Complexity 19 / 58 A boolean circuit family fCngn2N is uniform if there is an implicitly logspace n computable function mapping 1 to Cn. Computational Complexity, by Fu Yuxi Circuit Complexity 20 / 58 Uniform Circuit Family and P Theorem. A language is accepted by a uniform circuit family if and only if it is in P. `)': Trivial. `(': A detailed proof is given next. Computational Complexity, by Fu Yuxi Circuit Complexity 21 / 58 From P to Uniform Circuit Family c Suppose M is a one tape TM bounded in time by T (n) = cn .