
Lecture 12: Circuit Complexity Real computers are built from gates. Circuit complexity is a low-level model of computation. Circuits are directed acyclic graphs. Inputs are placed at the leaves. Signals proceed up toward the root, r. Straight-line code: gates are not reused. Let S ⊆ f0; 1g? be a decision problem. Let, C1;C2;C3;::: be a circuit family. Cn has n input bits and one output bit r. n Def: fCigi2N computes S iff for all n and for all w 2 f0; 1g , w 2 S , Cjwj(w) = 1 : 1 r or and or and or t(n) not b b b 1 b bb2 n 1 2 n “not” gates are pushed down to bottom Depth = parallel time Number of gates = computational work = sequential time Width = max number of gates at any level = amount of hardware in corresponding parallel machine 2 Circuit Complexity Classes ? S ⊆ f0; 1g is in NC[t(n)], AC[t(n)], ThCt(n), iff exists uniform circuit family, C1;C2;:::, s.t. ? 1. For all w 2 f0; 1g ; w 2 S , Cjwj(w) = 1 O(1) 2. depth(Cn) = O(t(n)); jCnj ≤ n 3. The gates of Cn consist of, NC AC ThC bounded fan−in unbounded fan−in unbounded fan−in and, or gates and, or gates threshold gates ^ ^ k 3 Notation: for i = 0; 1;:::, NCi = NC[(log n)i]; ACi = AC[(log n)i]; ThCi = ThC(log n)i We will see that the following inclusions hold: AC0 ⊆ ThC0 ⊆ NC1 ⊆ L ⊆ NL ⊆ AC1 AC1 ⊆ ThC1 ⊆ NC2 ⊆ AC2 AC2 ⊆ ThC2 ⊆ NC3 ⊆ AC3 : : : : : ⊆ : ⊆ : ⊆ : Thus: 1 1 1 [ [ [ NC = NCi = ACi = ThCi i=0 i=0 i=0 4 n Uniform means that the map, f : 1 7! Cn is veryr easy. f 2 F (L); f 2 F (FO) or and or and or t(n) not b b b 1 b bb2 n 1 2 n Each Ci is an instance of the same program. 5 Prop: Every regular language is in NC1. Proof: DFA D = hΣ; Q; δ; s; F i. Build circuits: C1;C2;:::, f(s) in F ? 1n f1 n f f1 n/2 n/2+1 n f1 2 fn−1 n f1 f f f n−1 f 2 3 fn−2 n δδδ δ δ δ w w w w w w 1 2 3 n−2 n−1 n fi(q) = δ(q; wi); w 2 L(D) , f1n(s) 2 F 6 Thm: FO = AC0 Example: ' ≡ 9x 8y 9z (M(x; y; z)) or x=0 x=1 x=n-1 and and and or or or or or or y=0y= n-1 y=0 y=n-1 y=0 y=n-1 M M M M M M M x=0 x=0 x=0 x=n-1 x=n-1 x=n-1 x=n-1 y=0 y=0 y=n-1 y=0 y=0 y=n-1 y=n-1 z=0 z=n-1 z=0 z=0 z=n-1 z=0 z=n-1 7 Prop: For i = 0; 1;:::; NCi ⊆ ACi ⊆ ThCi ⊆ NCi+1 Proof: All inclusions except ThCi ⊆ NCi+1 are clear. ? 0 MAJ = w 2 f0; 1g w has more than jwj=2 “1”s 2 ThC Lemma: MAJ 2 NC1 (and the same for any other threshold gate). 8 Try to build an NC1 circuit for majority by adding the n input bits via a full binary tree of height log n. Problem: the sums being added have more and more bits; still want to add them in constant depth. > n/2 + + + + + + + log n + + + + + + + + + + + + + + + + + + + + + + + + x x x x x x x x x x 1 2 3 4 5 6 7 8 31 32 9 Solution: Ambiguous Notation Binary representation; but with digits: 0; 1; 2; 3 3213 = 3 · 23 + 2 · 22 + 1 · 21 + 3 · 20 = 37 3221 = 3 · 23 + 2 · 22 + 2 · 21 + 1 · 20 = 37 Lemma: Ambiguous Notation Addition is in NC0 Example: carries:3223 3 2 1 3 + 3 2 1 3 3 2 2 1 0 The carry from column i is determined by columns i and i + 1: use the largest carry we are sure to get. 10 Translating from ambiguous to binary, is just addition, thus first-order, thus AC0, and thus NC1. > n/2 back to unambiguous log n + + + + + + + log n + + + + + + + + + + + + + + + + + + + + + + + + x x x x x x x x x x 1 2 3 4 5 6 7 8 31 32 11 co-r.e. complete Arithmetic Hierarchy FO(N) r.e. complete K K co-r.e. FO8(N) r.e. FO9(N) Recursive Primitive Recursive EXPTIME SO(LFP) SO[2nO(1) ] QSAT PSPACE complete PSPACE FO[2nO(1) ] FO(PFP) SO(TC) SO[nO(1)] co-NP complete PTIME Hierarchy SO NP complete SAT SAT co-NP SO8 NP SO9 NP \ co-NP FO[nO(1)] P complete Horn- P FO(LFP) SO(Horn) SAT FO[(log n)O(1)] “truly NC FO[log n] feasible” AC1 FO(CFL) sAC1 FO(TC) SO(Krom) 2SAT NL comp. NL FO(DTC) 2COLOR L comp. L FO(REGULAR) NC1 FO(COUNT) ThC0 FO LOGTIME Hierarchy AC0 12.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages12 Page
-
File Size-