3
Summary of techniques and ideas Probabilistic method : to show that a combinatorial object exists: choose a random one and show that it satisfies desired properties with Prob>0 –Constructive vs. non-constructive methods Union bound: define a collection of bad events A 1, A 2, … A n Pr[ [ i A i ] ·  i Pr[A i ] · n Pr[A i ] Simulating large sample spaces by small ones Reversing roles via Minimax Theorem

10
Space Complexity: deterministic and non-deterministic Non deterministic TM: transition function  X Q   X Q  X {left,right} may be non-deterministic. The TM is considered to `accept’ if any combination of decisions leads to an accepts state can think of computation as tree and need one accepting leaf Space : L 2 SPACE(f(n)) if there is a TM which recognizes L and –uses no more than f(|x|) cells of its work tapes during the computation on input x Cell is used if it scanned by the tape head Non deterministic Space : L 2 N SPACE(f(n)) if there is a non deterministic TM which recognizes L and –Halts on all branches –Uses no more than f(|x|) cells of its work tapes on any of the branches during the computation on input x Cell is used if it scanned by the tape head

11
NSPACE and Paths in Graphs NSPACE(f(n) models naturally search in ``implicit” graphs on 2 f(n) nodes Example : the Rush Hour™ Game: given a configuration is it possible to get the red car out Can be solved in NSPACE(n) n=configuration size

12
Space and Time take I Theorem : if a NTM N always halts and uses space f(n) ¸ log n, then it runs in time 2 O(f(n)) consider C, a configuration of N –Heads positions –Working tape content –Output tape content Except for the input tape– there are 2 O(f(n)) x f(n) o(1) x n possible configurations For any input, in a computation cannot have two equal configurations occurring – –might lead to an infinite branch

18
Reductions and Completeness Want to convert the problem of deciding A into deciding B Oracle for A – can ask whether x 2 A Oracle Machine with oracle for A: M A Cook-Turing reducible : a language A is Cook-Turing reducible to B ( A · T B ) if there exists a polynomial time M such that M B recognizes A Many-One (Karp Levin) reducible : a language A is Many-One reducible to B ( A · M B ) if there exists a function F computable in polynomial time such that x 2 A iff F(x) 2 B Log space reducible : a language A is Many-One reducible to B ( A · L B ) if there exists a function F 2 FSPACE(log n) such that x 2 A iff F(x) 2 B Property : for all A and B: A · L B ) A · M B ) A · T B Property : all reducibility notions are transitive

19
Log-space reductions Input Tape Output Tape Work Tape Read only Write only Log Space for read and write This is what we count Closed under composition! Do not write the output explicitly. Instead consider G’(x,i)= ith bit of G(X)

20
PSPACE Completeness Definition : Language L is PSPACE-complete iff: 1. L is in PSPACE 2. Every language L’ in PSPACE is reducible to L via a polynomial time reduction (Cook Turing) Complete problems are the `hardest’ problems in a complexity class They represent it Reduction must be easy relative to the complexity class Property : If L is PSPACE-complete and L is in P, then P = PSPACE

23
TQBF is PSPACE Complete Every language L in PSPACE is reducible to TQBF via a polynomial time reduction Suppose NTM N decides L is space n k Goal: Given (N,w), construct a Boolean formula  such that:  is in TQBF, N has an accepting path on w size of  should be n k’

27
PSPACE Completeness Many problems proved to be PSPACE Complete –In particular games Games closely related to quantifiers: The formula game Let  = 9 x 1 8 x 2 9 x 3 … 8 x n [  ] be a prenex formula Player A and Player E take turns in selecting values for the variables –A for the 8 bound variables and –E for the 9 bound variables –At the end Player E wins if  is TRUE and A wins if  is FALSE Formula-game= {  : Player E has a winning strategy in the formula game played on  } Theorem : Formula-game is PSPACE Complete

28
Game of Go To players alternate placing black and white pebbles Objective: create large safe groups of your color –Monochromatic connected subgraph of the grid and capture as many pebbles of the other color by surrounding them Theorem : deciding whether a given configuration is a win for white is PSPACE-Complete

29
Pebbling a DAG Rules Inputs: a pebble can be place on input (source) vertex at any time Computation : a pebble can be placed on any non-input vertex if all its immediate predecessor have pebbles A pebble can be removed at any time Goal : find a strategy to pebble all the outputs while using a few pebbles and a few steps Theorem : Minimizing pebbles is PSPACE-complete Gilbert, Lengaur, Tarjan, Sicomp 1980 Sources Outputs Models computation with registers

30
Homework on Pebbling Depth of a DAG : distance of the input node and output node that are furthest apart (if they are connected). Let d be the maximum indegree Show that any DAG of depth c and can be pebbled using O(c d ) pebbles. Show that any tree can be pebbled using O(d log n) pebbles.

31
Generalized Rush Hour Given a rush hour configuration can you get the special car out? Recently proved theorem: Rush Hour is PSPACE-Complete (Baum and Flake) Implications: Hard to solve Even if you invested/wasted time and solved it, how do you convince your friend that it is possible ? How do you demonstrate that there is no solution? Homework : suggest a probabilistic protocol for verifying that a solution exists. –The prover may be willing to work hard, but not the verifier. –the probability of catching a cheating prover is non-zero (but might be very small) for any cheater –If the prover is not cheating then the verifier is always convinced by the proof.

33
Log-space reductions Input Tape Output Tape Work Tape Read only Write only Log Space for read and write This is what we count Closed under composition! Do not write the output explicitly. Instead consider G’(x,i)= ith bit of G(X)

34
NL-completeness Language L is NL-complete iff 1.L is in NL 2.Every language L’ in NL is log-space reducible to L PATH = {(G,s,t)| G is a directed graph with a path that starts at vertex s and ends at vertex t } –How is the graph given (adjacency matrix, list of outgoing edges…? Theorem : PATH is NL-complete What about undirected connectivity?

35
Sublogarithmic Space Are there interesting languages requiring less than logarithmic space? –Regular languages –Other? A  (log log n) language: {x=b 0 $ b 2 $ … $ b k | b i =binary representation of i} Algorithm: –Check the first and last blocks –Check that each block is +1 from previous To avoid using too much space on bogus strings: check for i=1.. that the last i bits cycle through all possibilities

36
No languages between regular and O(log log n) Theorem : For any f(n) 2 o(log log n) Space(f(n)) = Space(O(1)) Proof : Configuration is –i position on tape –c content of working tapes heads and direction No configuration can repeat itself Ow. Machine does not stop For word x let C(x,i) = c 1, c 2, … c r sequence of configurations machine passes through on position i Number of different C(x,i) ~ 2 f(n)2 f(n) < n for sufficiently large n Let x S be shortest word requiring more than S space Idea: if there is 1 · i
{
"@context": "http://schema.org",
"@type": "ImageObject",
"contentUrl": "http://images.slideplayer.com/12/3376720/slides/slide_36.jpg",
"name": "No languages between regular and O(log log n) Theorem : For any f(n) 2 o(log log n) Space(f(n)) = Space(O(1)) Proof : Configuration is –i position on tape –c content of working tapes heads and direction No configuration can repeat itself Ow.",
"description": "Machine does not stop For word x let C(x,i) = c 1, c 2, … c r sequence of configurations machine passes through on position i Number of different C(x,i) ~ 2 f(n)2 f(n) < n for sufficiently large n Let x S be shortest word requiring more than S space Idea: if there is 1 · i

38
Non-deterministic space is closed under complementation The Immerman-Szelepcsenyi Theorem For simplicity start with NL=Co-NL States of NTM correspond to directed graph –Problem: how to prove non-reachability Idea: to prove that a room is empty show the whereabouts of all potential occupiers Show how to count in NL –Sufficient for non-reachability: can make sure graph is acyclic For directed graph G=(V,E) let R(G,s,i) = {u| reachable(s,u,i) } Main Lemma : there exists a log space non deterministic machine for computing |R(G,s,i)| –The machine never outputs a wrong answer but may output `fail’ u is reachable from s in i moves in G