<<

Remainder of lecture

• nondeterminism applied to space CS151 • reachability

Complexity Theory • two surprises:

Lecture 5 – Savitch’s Theorem

April 13, 2021 – Immerman/Szelepcsényi Theorem

April 13, 2021 CS151 Lecture 5

Nondeterministic space Nondeterministic space

• NSPACE(f(n)) = languages decidable by a • Robust nondeterministic space classes: multi-tape NTM that touches at most f(n) squares of its work tapes along any NL = NSPACE(log n) computation path, where n is the input length, and f :N → N k NPSPACE = ∪k NSPACE(n )

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

Reachability Reachability

• Recall: at most nk configurations of given • Conclude: NL ⊆ P NTM M running in NSPACE(log n). – and NPSPACE ⊆ EXP

• easy to qstartx1x2x3…xn determine if C x∈ x∉L • S-T-Connectivity (STCONN): given yields C’ in one directed graph G = (V, E) and nodes s, t, is step there a path from s to t ? • configuration graph for M on Theorem: STCONN is NL-complete under input x: logspace reductions. qaccept qreject qaccept qreject

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

1 Reachability Two startling theorems

• Proof: • Strongly believe P ≠ NP – in NL: guess path from s to t one node at a • nondeterminism seems to add enormous time power – given L ∈ NL decided by NTM M construct • for space: Savitch ‘70: configuration graph for M on input x (can be done in logspace) NPSPACE = PSPACE

– s = starting configuration; t = qaccept and NL ⊆ SPACE(log2n)

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

Two startling theorems Savitch’s Theorem

• Strongly believe NP ≠ coNP Theorem: STCONN ⊆ SPACE(log2 n) • seems impossible to convert existential into universal • Corollary: NL ⊆ SPACE(log2n)

• for space: Immerman/Szelepscényi ’87/’88: • Corollary: NPSPACE = PSPACE

NL = coNL

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

Proof of Theorem Proof of Theorem

– input: G = (V, E), two nodes s and t – answer to STCONN: PATH(s, t, log n) – recursive algorithm: – space used: • (depth of recursion) x (size of “stack record”) /* return true iff path from x to y of length at most 2i */ – depth = log n PATH(x, y, i) – claim stack record: “(x, y, i)” sufficient if i = 0 return ( x = y or (x, y) ∈ E ) /* base case */ • size O(log n) for z in V if PATH(x, z, i-1) and PATH(z, y, i-1) return(true); – when return from PATH(a, b, i) can figure out return(false); what to do next from record (a, b, i) and end previous record

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

2 Nondeterministic space Second startling theorem

• Robust nondeterministic space classes: • Strongly believe NP ≠ coNP • seems impossible to convert existential NL = NSPACE(log n) into universal

k • for space: Immerman/Szelepscényi ’87/’88: NPSPACE = ∪k NSPACE(n )

NL = coNL

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

I-S Theorem I-S Theorem

Theorem: ST-NON-CONN ∈ NL – want nondeterministic procedure using only • Proof: slightly tricky setup: O(log n) space with behavior: s s – input: G = (V, E), two nodes s, t s s “yes” “no” input input “yes” “no” t t

t t qaccept qreject qaccept qreject

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

I-S Theorem I-S Theorem

– observation: given count of # nodes – every computation path has sequence of reachable from s, can solve problem guesses… • for each v ∈ V, guess if it is reachable – only way computation path can lead to accept: • if yes, guess path from s to v • correctly guessed reachable/unreachable – if guess doesn’t lead to v, reject. for each node v – if v = t, reject. • correctly guessed path from s to v for each – else counter++ reachable node v • if counter = count accept • saw reachable nodes • t not among reachable nodes

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

3 I-S Theorem I-S Theorem

(i) = # nodes reachable from s in at most i – Outline: in n phases, compute steps R(1), R(2), R(3), … R(n) – R(0) = 1: node s – only O(log n) bits of storage between phases – in end, lots of computation paths that lead to – we will compute R(i+1) from R(i) using reject O(log n) space and nondeterminism – only computation paths that survive have computed correct value of R(n) – computation paths with “bad guesses” all lead – apply observation. to reject

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

I-S Theorem I-S Theorem

– computing R(i+1) from R(i): – if “yes”, guess path from s to v of at most i+1 steps. Increment R(i+1) – if “no”, visit R(i) nodes reachable in at most i R(i) = R(2) = 6 steps, check that none is v or adjacent to v • for u ∈ V guess if reachable in ≤ i steps; guess path to u; counter++ – Initialize R(i+1) = 0 • KEY: if counter ≠ R(i), reject – For each v ∈ V, guess if v reachable from s in • at this point: can be sure v not reachable at most i+1 steps

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

I-S Theorem I-S Theorem • (2) might guess v is not reachable in at • correctness of procedure: most i+1 steps when it is • two types of errors we can make – then must not see v or neighbor of v while • (1) might guess v is reachable in at most visiting nodes reachable in i steps. i+1 steps when it is not – but forced to visit R(i) distinct nodes – won’t be able to guess path from s to v of – therefore must try to visit node v that is not correct length, so we will reject. reachable in ≤ i steps – won’t be able to guess path from s to v of “easy” type of error correct length, so we will reject. “easy” type of error April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

4 Summary Summary

• nondeterministic space classes • Savitch: NPSPACE = PSPACE NL and NPSPACE – Proof: ST-CONN ∈ SPACE(log2 n) – open question: • ST-CONN NL-complete NL = L?

• Immerman/Szelepcsényi : NL = coNL – Proof: ST-NON-CONN ∈ NL

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

Introduction Outline

Power from an unexpected source? • Boolean circuits and formulas • we know P ≠ EXP, which implies no poly- • uniformity and advice time algorithm for Succinct CVAL • poly-size Boolean circuits for Succinct • the NC hierarchy and parallel computation CVAL ?? • the quest for circuit lower bounds

Does NP have linear-size, log-depth • a lower bound for formulas Boolean circuits ??

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

Boolean circuits Boolean circuits

∧ • circuit C • size = # gates – directed acyclic graph ∨ ∧ • depth = longest path from input to output – nodes: AND (∧); OR (∨); • formula (or expression): graph is a tree ∧ ∨ ¬ NOT (¬); variables xi x1 x2 x3 … xn • every function f:{0,1}n → {0,1} computable • C computes function f:{0,1}n → {0,1} in by a circuit of size at most O(n2n) natural way – AND of n literals for each x such that f(x) = 1 – identify C with function f it computes – OR of to 2n such terms

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

5 Circuit families Connection to TMs

• circuit works for specific input length • given TM M running in time t(n) decides • we’ used to f:∑*→ {0,1} language L • circuit family : a circuit for each input • can build circuit family {Cn} that decides L – size of C = O(t(n)2) length C1, C2, C3, … = “{Cn}” n – Proof: CVAL construction • “{Cn} computes f” iff for all x

C|x|(x) = f(x) • Conclude: L ∈ P implies family of • “{C } decides L”, where L is the language n polynomial-size circuits that decides L associated with f

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

Connection to TMs Uniformity

• other direction? • Strange aspect of circuit family: – can “encode” (potentially uncomputable) • A poly-size circuit family: information in family specification – C = (x ∨ ¬ x ) if M halts • solution: uniformity – require specification n 1 1 n is simple to compute – Cn = (x1 ∧ ¬ x1) if Mn loops Definition: circuit family {Cn} is logspace n uniform iff TM M outputs Cn on input 1 and • decides (unary version of) HALT! runs in O(log n) space • oops…

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

Uniformity TMs that take advice

Theorem: P = languages decidable by • family {Cn} without uniformity constraint is logspace uniform, polynomial-size circuit called “non-uniform” families {Cn}. • regard “non-uniformity” as a limited resource just like time, space, as follows: • Proof: – add read-only “advice” tape to TM M – already saw (⇒) – M “decides L with advice A(n)” iff M(x, A(|x|)) accepts ⇔ x ∈ L – (⇐) on input x, generate C|x|, evaluate it and accept iff output = 1 – note: A(n) depends only on |x|

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

6 TMs that take advice TMs that take advice

• Definition: TIME(t(n))/f(n) = the set of Theorem: L ∈ P/poly iff L decided by family those languages L for which: of (non-uniform) polynomial size circuits. – there exists A(n) s.t. |A(n)| ≤ f(n) – TM M decides L with advice A(n) in time • Proof:

t(n) – (⇒) Cn from CVAL construction; hardwire • most important such class: advice A(n) – (⇐) define A(n) = description of C ; on input x, k k n P/poly = ∪k TIME(n )/n TM simulates C|x|(x)

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

Approach to P/NP Parallelism

• Believe NP ≠ P • uniform circuits allow refinement of – equivalent: “NP does not have uniform, polynomial time: polynomial-size circuits” • Even believe NP ⊂ P/poly – equivalent: “NP (or, e.g. SAT) does not have depth ≡ parallel time circuit polynomial-size circuits” C – implies P ≠ NP size ≡ parallel – many believe: best hope for P ≠ NP work

April 13, 2021 CS151 Lecture 5 April 13, 2021 CS151 Lecture 5

Parallelism

• the NC (“Nick’s Class”) Hierarchy (of logspace uniform circuits): k NCk = O(log n) depth, poly(n) size

NC = ∪k NCk • captures “efficiently parallelizable problems” • not realistic? overly generous • OK for proving non-parallelizable

April 13, 2021 CS151 Lecture 5

7