11.07.2015 Views

CS151 Complexity Theory

CS151 Complexity Theory

CS151 Complexity Theory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Time and Space ClassesP : CVAL, linearprogramming, maxflow…∧∨∧∧∨ ¬ EXP : SAT, all of NP and much more…Relationships between classes• How are these four classes related to eachother?• Time Hierarchy Theorem impliesP EXP– P TIME(2 n ) TIME(2 (2n)3 ) EXP• Space Hierarchy Theorem impliesL PSPACE– L=SPACE(log n) SPACE(log 2 n) PSPACEApril 1, 2004 <strong>CS151</strong> Lecture 2 25April 1, 2004 <strong>CS151</strong> Lecture 2 26Relationships between classes• Easy: P PSPACE• L vs. P, PSPACE vs. EXP ?Relationships between classes• Useful convention: Turing Machineconfigurations. Any point in computation represented by string:C = 1 2 … i q i+1 i+2 … m• start configuration for single-tape TM oninput x: q start x 1 x 2 …x nApril 1, 2004 <strong>CS151</strong> Lecture 2 27April 1, 2004 <strong>CS151</strong> Lecture 2 28Relationships between classes• easy to tell if C yields C’ in 1 step• configuration graph: nodes are configurations,edge (C, C’) iff C yields C’ in one step• # configurations for a 2-tape TM (work tape +read-only input) that runs in space t(n)n x t(n) x |Q| x | ¡ | f(n)Relationships between classes• if t(n) = c log n, at mostn x (c log n) x c 0 x cc log n ¢1 n kconfigurations.• can determine if reach q accept or q reject fromstart configuration by exploring config.graph of size n k (e.g. by DFS)• Conclude: L PApril 1, 2004 <strong>CS151</strong> Lecture 2 29April 1, 2004 <strong>CS151</strong> Lecture 2 305


A P-complete problem• Important observation: contents of cell intableau determined by 3 others above it: April 1, 2004 <strong>CS151</strong> Lecture 2 37A P-complete problem• Can build Boolean circuit STEP– input (binary encoding of) 3 cells– output (binary encoding of) 1 cell ! "#• each output bit is somefunction of inputs• can build circuit for each• size is independent ofsize of tableauApril 1, 2004 <strong>CS151</strong> Lecture 2 38Tableau forM on inputwA P-complete problem • |w| c copies of STEP compute row i from i-1! "# ! "# ! "# ! "# ! "#April 1, 2004 <strong>CS151</strong> Lecture 2 39A P-complete problem ! "# ! "# ! "# ! "# ! "#! "# ! "# ! "# ! "# ! "#! "# ! "# ! "# ! "# ! "#&$$ %% This circuitC M, w hasinputsw 1 w 2 …w n andC(w) = 1 iff Maccepts inputw.logspacereductionSize = O(|w| 2c )April 1, 2004 <strong>CS151</strong> Lecture 2 40Answer to question• Can we evaluate an n node Booleancircuit using O(log n) space?• NO! (probably)• CVAL in P ifand only if L = P∧∨∧∧∨ ¬ Padding and succinctnessTwo consequences of measuring runningtime as function of input length:• “padding”– suppose L ∈ EXP, definePAD L = { x# N : x ∈ L, N = 2 |x|k }– same TM decides L (ignore #s)– running time now polynomial !April 1, 2004 <strong>CS151</strong> Lecture 2 41April 1, 2004 <strong>CS151</strong> Lecture 2 427


Padding and succinctness• converse: “succinctness”– suppose L is P-complete– intuitively, some inputs are “hard” -- requirefull power of P– SUCCINCT L = input encoded in exponentiallyshorter form than L– if “hard” inputs encodable this way, thencandidate to be EXP-completeApril 1, 2004 <strong>CS151</strong> Lecture 2 43An EXP-complete problem• succinct encoding for a directedgraph G= (V = {1,2,3,…}, E):• a succinct encoding for avariable-free Boolean circuit:$$ $&&''+$&'April 1, 2004 <strong>CS151</strong> Lecture 2 44$$ ()'*∈ "+$&'An EXP-complete problem• Succinct Circuit Value: given a succinctlyencoded variable-free Boolean circuit(gates ∧, ∨, ¬, 0, 1), does it output 1?Theorem: Succinct Circuit Value is EXPcomplete.• Proof:– in EXP (why?)– L arbitrary language in EXP, TM M decides Lin 2 nk stepsApril 1, 2004 <strong>CS151</strong> Lecture 2 45An EXP-complete problem– tableau for input x = x 1 x 2 x 3 …x n :,– Circuit C from CVAL reduction has sizeO(2 2nk ).&) – TM M accepts input x iff circuit outputs 1April 1, 2004 <strong>CS151</strong> Lecture 2 46An EXP-complete problem– Can encode C succinctly:$$ $&&'+$&+$&'• if i, j within single STEP circuit, easy to computeoutput• if i, j between two STEP circuits, easy to computeoutput• if one of i, j refers to input gates, consult x tocompute outputApril 1, 2004 <strong>CS151</strong> Lecture 2 47'Summary• Remaining TM details: big-oh necessary.• First complexity classes:L, P, PSPACE, EXP• First separations (via simulation anddiagonalization):P ¡ EXP, L ¡ PSPACE• First major open questions:L = P P = PSPACE• First complete problems:– CVAL is P-complete– Succinct CVAL is EXP-completeApril 1, 2004 <strong>CS151</strong> Lecture 2 488


Summary April 1, 2004 <strong>CS151</strong> Lecture 2 499

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!