1 Slides by Elery Pfeffer and Elad Hazan, Based on slides by Michael Lewin & Robert Sayegh. Adapted from Oded Goldreich’s course lecture notes by Eilon.

Slides:



Advertisements
Similar presentations
Computational Complexity
Advertisements

Boosting Textual Compression in Optimal Linear Time.
Models of Computation Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Analysis of Algorithms Week 1, Lecture 2.
Lecture 24 MAS 714 Hartmut Klauck
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
NL equals coNL Section 8.6 Giorgi Japaridze Theory of Computability.
Complexity ©D Moshkovitz 1 Approximation Algorithms Is Close Enough Good Enough?
Noga Alon Institute for Advanced Study and Tel Aviv University
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
Complexity 13-1 Complexity Andrei Bulatov Hierarchy Theorem.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
(Omer Reingold, 2005) Speaker: Roii Werner TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A AA A A A A AA A.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
The Counting Class #P Slides by Vera Asodi & Tomer Naveh
Data Structures, Spring 2006 © L. Joskowicz 1 Data Structures – LECTURE 4 Comparison-based sorting Why sorting? Formal analysis of Quick-Sort Comparison.
ACT1 Slides by Vera Asodi & Tomer Naveh. Updated by : Avi Ben-Aroya & Alon Brook Adapted from Oded Goldreich’s course lecture notes by Sergey Benditkis,
Topics: 1. Trees - properties 2. The master theorem 3. Decoders מבנה המחשב - אביב 2004 תרגול 4#
Undirected ST-Connectivity 2 DL Omer Reingold, STOC 2005: Presented by: Fenghui Zhang CPSC 637 – paper presentation.
Submitted by : Estrella Eisenberg Yair Kaufman Ohad Lipsky Riva Gonen Shalom.
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
–Def: A language L is in BPP c,s ( 0  s(n)  c(n)  1,  n  N) if there exists a probabilistic poly-time TM M s.t. : 1.  w  L, Pr[M accepts w]  c(|w|),
Undirected ST-Connectivity in Log-Space By Omer Reingold (Weizmann Institute) Year 2004 Presented by Maor Mishkin.
Derandomizing LOGSPACE Based on a paper by Russell Impagliazo, Noam Nissan and Avi Wigderson Presented by Amir Rosenfeld.
Non Deterministic Space Avi Ben Ari Lior Friedman Adapted from Dr. Eli Porat Lectures Bar-Ilan - University.
1 Separator Theorems for Planar Graphs Presented by Shira Zucker.
DAST 2005 Week 4 – Some Helpful Material Randomized Quick Sort & Lower bound & General remarks…
Undirected ST-Connectivity In Log Space
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
1 Slides by Asaf Shapira & Michael Lewin & Boaz Klartag & Oded Schwartz. Adapted from things beyond us.
Undirected ST-Connectivity In Log Space Omer Reingold Slides by Sharon Bruckner.
The Polynomial Hierarchy By Moti Meir And Yitzhak Sapir Based on notes from lectures by Oded Goldreich taken by Ronen Mizrahi, and lectures by Ely Porat.
Non-Deterministic Space is Closed Under Complementation Neil Immerman Richard Szelepcsenyi Presented By: Subhajit Dasgupta.
1 Slides by Michael Lewin & Robert Sayegh. Adapted from Oded Goldreich’s course lecture notes by Vered Rosen and Alon Rosen.
Graph Algorithms Using Depth First Search Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Analysis of Algorithms.
Ch. 8 & 9 – Linear Sorting and Order Statistics What do you trade for speed?
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
Machines with Memory Chapter 3 (Part B). Turing Machines  Introduced by Alan Turing in 1936 in his famous paper “On Computable Numbers with an Application.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
Complexity 20-1 Complexity Andrei Bulatov Parallel Arithmetic.
February 17, 2005Lecture 6: Point Location Point Location (most slides by Sergi Elizalde and David Pritchard)
Almost SL=L, and Near-Perfect Derandomization Oded Goldreich The Weizmann Institute Avi Wigderson IAS, Princeton Hebrew University.
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
Theory of Computational Complexity Probability and Computing Ryosuke Sasanuma Iwama and Ito lab M1.
1 Schnyder’s Method. 2 Motivation Given a planar graph, we want to embed it in a grid We want the grid to be relatively small And we want an efficient.
Space Complexity Guy Feigenblat Based on lecture by Dr. Ely Porat Complexity course Computer science department, Bar-Ilan university December 2008.
Theory of Computational Complexity Yusuke FURUKAWA Iwama Ito lab M1.
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
P & NP.
Probabilistic Algorithms
Umans Complexity Theory Lectures
Chapter 5. Optimal Matchings
Graph Algorithms Using Depth First Search
Enumerating Distances Using Spanners of Bounded Degree
Alternating tree Automata and Parity games
Graphs and Algorithms (2MMD30)
DSPACE Slides By: Alexander Eskin, Ilya Berdichevsky
Instructor: Aaron Roth
Switching Lemmas and Proof Complexity
CS151 Complexity Theory Lecture 5 April 16, 2019.
Locality In Distributed Graph Algorithms
Presentation transcript:

1 Slides by Elery Pfeffer and Elad Hazan, Based on slides by Michael Lewin & Robert Sayegh. Adapted from Oded Goldreich’s course lecture notes by Eilon Reshef.

2 Introduction In this lecture we will show our main result: BPSPACE(log n)  DSPACE(log 2 n) The result will be derived in the following order: Formal Definitions Execution Graph Representation A Pseudorandom Generator based on UHF. Analysis of the Execution Graph traversal by the Pseudorandom Generator.

3 Definition of BPSPACE(·) BPSPACE(·) is the family of bounded probability space-bounded complexity classes. Def: The complexity class BPSPACE(s(·)) is the set of all languages L s.t. there exists a randomized TM M that on input x: M uses at most s(|x|) space The running time of M is bounded by exp(s(|x|)) x  L  Pr [M(x) = 1]  2/3 x  L  Pr [M(x) = 1]  1/3 s(·) is any complexity function s.t. s(·)  log(·). We focus on BPL, namely, BPSPACE(log) 16.2 Without this condition: NSPACE(·) = RSPACE(·)  BPSPACE(·)

4 Execution Graphs We represent the execution of a BPSPACE machine M on input x as a layered directed graph G M,x The vertices in the i-th layer ( ) correspond to all the possible configurations of M after it has used i random bits. Each vertex has 2 outgoing edges corresponding to reading a “0” or “1” bit from the random tape. Note: Width of G M,x = | |  2 s(n) · s(n) · n  exp(s(n)) Depth of G M,x = # of layers  exp(s(n)) 16.3

5 Execution Graph Example Width Depth

6 Execution Graph Definitions The set of final vertices are partitioned into: Vacc - The set of accepting configurations. Vrej - The set of rejecting configurations. A random walk on G M,x is a sequence of steps emanating from the initial configuration and traversing randomly the directed edges of G M,x. A guided walk on G M,x (with guide R) is a sequence of steps emanating from the initial configuration and traversing the i-th edge in G M,x according to the i- th bit given by the guide R.

7 Execution Graph Definitions Denote by ACC(G M,x,R) the event that the R guided walk reaches a vertex in Vacc. Thus, Pr[M accepts x] = Pr[ACC(G M,x,R)] Summarizing, we learn that for a language L in BPL there exists a (D,W)-graph s.t. Width- W(n) = exp(s(n)) = poly(n). Depth- D(n) = exp(s(n)) = poly(n). For a random guide R: –x  L  Pr R [ACC(G M,x,R)]  2/3. –x  L  Pr R [ACC(G M,x,R)]  1/3.

8 Execution Graph Definitions We note that the following technical step preserves a random walk on G M,x pruning the layers of G M,x s.t. only every l-th layer remains, contracting edges when necessary. Denote the new pruned graph as G. This is done to ease the analysis of the pseudorandom generator further on.

9 0 l 2l 0101… …010 Execution Graph Definitions Clearly, a random walk on G M,x is equivalent to random walk on G.

10 Universal Hash Functions Def: A family of functions H = {h: A  B} is called a universal family of hash functions if for every x 1 and x 2 in A, x 1  x 2, Pr h  H [h(x 1 ) = y 1 and h(x 2 ) = y 2 ] = (1/|B| 2 ) We will use a linear universal family of hash functions seen previously: H l = {h: {0,1} l  {0,1} l } h a,b = ax + b This family has a succinct representation ( 2l space ) and can be computed in linear space. 16.4

11 Universal Hash Functions For every A  {0,1} l denote by m(A) the probability that a random element hits the set A: m(A) = |A| / 2 l Hash Proposition: For every universal family of hash functions, H l, and for every two sets A,B  {0,1} l, all but a 2 -l/5 fraction of functions h  H l satisfy |Pr x [x  A and h(x)  B] - m(A) · m(B)|  2 -l/5 That is, a large fraction of the hash functions extend well to the sets A and B.

12 Construction Overview Def: A function H: {0,1} k  {0,1} D is a (D,W)- pseudorandom generator if for every (D,W)- graph G: | Pr R  {0,1} D [ACC(G,R)] - Pr R’  {0,1} k [ACC(G,H(R’)] |  1/10 Prop: There exists a (D,W)-pseudorandom generator H(·) with k(n)=O(logD·logW). Futher, H(·) is computable in space linear on its input. 16.5

13 Construction Overview Corollary: There exists a (D,W)- pseudorandom generator H(·) with the following parameters: s(n) =  (log n) D(n)  poly(n) W(n)  poly(n) k(n) = O(log 2 n) By trying all seeds of H, it follows that: BPL  DSPACE(log 2 n) This is NOT surprising since: RL  NL  DSPACE(log 2 n)

14 The Pseudorandom Generator We will define a (D,W)-pseudorandom generator, H. Assume without loss of generality D  W. H extends strings of length O(l 2 ) to strings of length D  exp(l), for l =  (log W). The input to H is the tuple: I = (r,,,…,, ) Where |r|=l, and are representations of functions in H l and l’ = log(D/l). Obviously, |I| = O(l 2 ). 16.6

15 The Pseudorandom Generator The computation of the PRG can be represented as a complete binary tree of depth l’. The output of H is the concatenation of the binary values of the leaves. Formally: H(r,,…,, ) = H(r,,…,, )  H(h i (r),,…,, ) starting with H(z) = z r r r r h 1 (r) h 2 (r) h 2 (h 1 (r)) h 3 (h 2 (h 1 (r))) h 3 (h 2 (r))

16 intuition r r r r h 1 (r) h 2 (r) h 2 (h 1 (r)) h 3 (h 2 (h 1 (r))) h 3 (h 2 (r)) resulted pseudorandom sequence Execution graph ( using sequence ) 0L2L3L4L5L6L7L The output of the pseudorandom generator represents a path in The execution graph. The sequence is contructed using only L bits for r, and l’ hash functions.

17 Analysis Claim: H is indeed a (D,W)-pseudorandom generator We will show that a guided walk on G M,x using the guide H(I) behaves almost as a truly random walk. We will perform a sequence of coarsenings. At each coarsening we will use a new hash function from H and reduce the number of random bits by a factor of 2. After l’ such coarsenings, the only random bits remaining are l random bits of r and the l’ representations of the hash functions 16.7

18 At the first coarsening we replace the random guide R = (R 1, R 2,…, R D/l ) with the semi-random guide R’ = (R 1, h l’ (R 1 ), R 3, h l’ (R 3 ),…, R D/l-1, h l’ (R D/l-1 )). And we will show that this semi-random guide succeeds to “fool” G M,x. Analysis r1r1 h 3 (r 1 ) r1r1 r3r3 h 3 (r 3 ) r3r3 r5r5 h 3 (r 5 ) r5r5 r7r7 h 3 (r 7 ) r7r7

19 Intuition h 3 (r 1 ) r1r1 h 3 (r 3 ) r3r3 h 3 (r 5 ) r5r5 pseudorandom random seed <  P(Acc) - By summing over all l’ levels in the tree we will show that the total difference in probability to accept is less the 1/10

20 At the second coarsening we again replace half of the random bits by choosing a new hash function R’ = (R 1, h l’ (R 1 ), R 3, h l’ (R 3 ),…, R D/l-1, h l’ (R D/l-1 )) R’’ = (R 1, h l’ (R 1 ), h l’-1 (R 1 ), h l’-1 (h l’ (R 1 )),…) And again we show that this semi-random guide also succeeds to “fool” G M,x. Analysis r1r1 h 3 (r 1 ) r1r1 h 3 (h 2 (r 1 )) r1r1 h 2 (r 1 ) r5r5 h 3 (r 5 ) r5r5 h 3 (h 2 (r 5 )) r5r5 h 2 (r 5 )

21 Analysis And so on, until we perform l’ such coarsenings. Upon which we have proven the the generator H(I) is indeed a (D,W)-pseudorandom generator. We recall that the pruned execution graph was denoted G.

22 Analysis At the first coarsening we replace the random guide R = (R 1, R 2,…, R D/l ) with the semi-random guide R’ = (R 1, h l’ (R 1 ), R 3, h l’ (R 3 ),…, R D/l-1, h l’ (R D/l-1 )). We show that: |Pr R [ACC(G,R)] - Pr R’ [ACC(G,R’]| < 

23 Analysis We perform preprocessing by removing from G all edges (u,v) whose traversal probability is very small, that is, Pr R [u  v] < 1/W 2. Denote by G’ the new graph. Lemma 1:  1 = 2/W, 1.|Pr R [ACC(G’,R)] - Pr R [ACC(G,R)] | <  1 2.|Pr R’ [ACC(G’,R’)] - Pr R’ [ACC(G,R’)] | <  1 Proof: For the first part, the probability that a random walk uses a low probability edge is at most D·(1/W 2 ) < 1/W <  1. For the second part, we consider two consecutive steps. The first step is truly random and the traversal probability is 1/W 2. On the second step we use the hash proposition for the set {0,1} l and the set of low probability edges.

24 Analysis Proof(continued): For all but a 2 -l/5 fraction of hash functions the traversal probability is bounded by, 1/W l/5 < 2/W 2. On the whole, except for a total of (D/2)·2 -l/5 <  1 /2 hash functions the overall probability to traverse a low probability edge is bounded by D·(2/W 2 ) <  1 /2. Thus the total probability is bounded by  1. Thus removing low probability edges does not significantly affect the outcome of G.

25 Analysis We will show that on G’ the semi-random guide R’ performs similarly to the true random guide R. Lemma 2: |Pr R [ACC(G’,R)] - Pr R’ [ACC(G’,R’)] | <  2 Proof: Consider first 3 consecutive vertices u, v, w and the set of edges between them E u,v, E v,w. The probability that a random walk leaves u and reaches w through v is: Pr u-v-w = Pr R 1,R 2  {0,1} l [R 1  E u, v and R 2  E v, w ] Since we removed low probability edges: Pr u-v-w  1/W 4

26 Analysis Proof(continued): The probability that a semi-random walk, determined by hash function h, leaves u and reaches w through v is: Pr h u-v-w = Pr R  {0,1} l [R  E u, v and h(R)  E v, w ] Using the hash proposition with respect to sets E u,v, E v,w we learn that except for a fraction of 2 -l/5 h’s: | Pr h u-v-w - Pr u-v-w |  2 -l/5 Applying to all possible triplets we learn that except for a fraction of  3 =W 3 ·2 -l/5 hash functions:  u,v,w | Pr h u-v-w - Pr u-v-w |  2 -l/5

27 Analysis Proof(continued): Denote by Pr u-w (Pr h u-w ) the probability of reaching w from u for the random ( semi-random ) guide. Pr u-w =  v Pr u-v-w and Pr h u-w =  v Pr h u-v-w Consequently if we assume that h is a “good” hash function, |Pr u-w - Pr h u-w |  W·2 -l/5  W 4 ·2 -l/5 ·Pr u-w   4 ·Pr u-w For a large enough constant of l =  (log W).

28 Analysis Proof(continued): Since the probability of traversing any path P in G is the sum of the probabilities of traversing every two- hop u-v-w, we learn that: |Pr[R’ = P] - Pr[R = P]|   4 ·Pr[R = P] Summing over all accepting paths, |Pr R [ACC(G’,R)]-Pr R’ [ACC(G’,R’)] |   4 · Pr R [ACC(G’,R)]   4 The probability that h is indeed a good hash function is bounded by  3. Therefore, if we define  2 =  3 +  4 we prove the lemma: |Pr R [ACC(G’,R)]-Pr R’ [ACC(G’,R’)] |   2

29 Analysis Applying both lemmas, we prove that the semi-random guide R’ behaves well in the original graph G M,x : |Pr R [ACC(G M,x,R)]-Pr R’ [ACC(G M,x,R’)] |  . We have proved that the first coarsening succeeds. To proceed, we contract every two adjacent layers of G and create a single edge for every two-hop path taken by R’. Lemma 1 and 2 can be reapplied consecutively until after l’ iterations we are left with a bipartite graph with a truly random guide.

30 Analysis All in all, we have shown: |Pr R  {0,1} D [ACC(G,R)]-Pr I  {0,1} k [ACC(G,H(I)] |   ·l’  1/10 which concludes the proof that H is a (D,W)- pseudorandom generator.

31 Analysis Problem: h is a hash function dependent on O(logn) bits and M is a log-space machine. Why can’t M differentiate between a truly random guide and a pseudorandom guide by just looking at four consecutive blocks of the pseudo-random sequence z, h(z), z’, h(z’), and fully determining h by solving linear equations in log-space? Solution: During the analysis we required that l =  (log W) be large enough. In the underlying computation model this corresponds to the fact that M can not even retain a description of the hash function h.

32 Extensions and Related Results We have shown that BPL  DSPACE(log 2 n) but the running time of the straightforward derandomized algorithm is  (exp(log 2 n) ). Here we sketch the following result BPL  SC (“Steve’s Class”). Where SC is the class of all languages that can be recognized in poly(n) time and polylog(n) space. Thm: BPL  SC Proof Sketch: If we good guess a “good” set of hash functions h 1,h 2,…,h l’. Then all that would be left to do is to enumerate on r which take poly(n) time. We will show that we can efficiently find a good set of hash functions. 16.8

33 Extensions and Related Results Proof Sketch(continued): We will incrementally fix the hash functions one at a time from h l’ to h 1. The important point to notice is that due to the recursive nature of H, whether h is a good hash function or not depends only on the hash functions fixed before it. Therefore it is enough to incrementally find good hash functions. In order to check whether h is a good hash function we must test if lemma 1 and lemma 2 hold. This requires creating the proper pruned graph G and checking the probabilities on different subsets of edges. Both of these tasks can be performed in poly(n) time.

34 Extensions and Related Results Proof Sketch(continued): Hence, the total time required is l’·poly(n) = poly(n) time and the total space required, O(log 2 n), is dominated by storing the functions h 1,h 2,…,h l’. Further Results (without proof): 1. BPL  DSPACE(log 1.5 n) 2. Every random computation that can be carried out in polynomial time and in linear space can also be carried out in polynomial time and in linear space, but using only a linear amount of randomness