Umans Complexity Theory Lectures Lecture 8: Introduction to Randomized Complexity: - Randomized complexity classes, - Error reduction, - in P/poly - Reingold s Undirected Graph Reachability in RL Randomized complexity classes model: probabilistic Turing Machine deterministic TM with additional read-only tape containing coin flips p.p.t = probabilistic polynomial time (Bounded-error Probabilistic Poly-time) L if there is a p.p.t. TM M: x L Pr y [M(x,y) accepts] 2/3 x L Pr y [M(x,y) rejects] 2/3 2 Randomized complexity classes RP (Random Polynomial-time) L RP if there is a p.p.t. TM M: x L Pr y [M(x,y) accepts] ½ corp (complement of Random Polynomial-time) L corp if there is a p.p.t. TM M: x L Pr y [M(x,y) accepts] = 1 x L Pr y [M(x,y) rejects] ½ Randomized complexity classes One more important class: ZPP (Zero-error Probabilistic Poly-time) ZPP = RP corp Pr y [M(x,y) outputs fail ] ½ otherwise outputs correct answer 3 4
Randomized complexity classes These classes may capture efficiently computable better than P. 1/2 in ZPP, RP, corp definition unimportant can replace by 1/poly(n) 2/3 in definition unimportant can replace by ½ + 1/poly(n) Why? error reduction we will see simple error reduction by repetition more sophisticated error reduction later Relationship to other classes all these classes contain P they can simply ignore the tape with coin flips all are in PSPACE can exhaustively try all strings y count accepts/rejects; compute probability RP NP (and corp conp) multitude of accepting computations NP requires only one 5 6 Relationship to other classes Error reduction for RP PSPACE NP conp RP corp P given L and p.p.t TM M: x L Pr y [M(x,y) accepts] ε new p.p.t TM M : simulate M k/ε times, each time with independent coin flips accept if any simulation accepts otherwise reject 7 8
Error reduction for RP Error reduction for x L Pr y [M(x,y) accepts] ε if x L: probability a given simulation bad (1 ε) Since (1 ε) (1/ε) e -1 we have: probability all simulations bad (1 ε) (k/ε) e -k if x L: Pr y [M (x, y ) accepts] 1 e -k Pr y [M (x,y ) rejects] = 1 9 given L, and p.p.t. TM M: x L Pr y [M(x,y) accepts] ½ + ε x L Pr y [M(x,y) rejects] ½ + ε new p.p.t. TM M : simulate M k/ε 2 times, each time with independent coin flips accept if majority of simulations accept otherwise reject 10 Error reduction for Error reduction for X i random variable indicating correct outcome in i-th simulation (out of m = k/ε 2 ) Pr[X i = 1] ½ + ε Pr[X i = 0] ½ - ε x L Pr y [M(x,y) accepts] ½ + ε x L Pr y [M(x,y) rejects] ½ + ε if x L E[X i ] ½+ε Pr y [M (x, y ) accepts] 1 (½) ck X = Σ i X i if x L µ = E[X] (½ + ε)m Pr y [M (x,y ) rejects] 1 (½) ck Chernoff Tail Bound: Pr[X m/2] 2 -cε 2µ for some c>0 12 11
Randomized complexity classes We have shown: polynomial identity testing is in corp a poly-time algorithm for detecting unique solutions to SAT implies NP = RP How powerful is? We have seen an example of a problem in that we only know how to solve in EXP. Is randomness a panacea for intractability? 13 14 It is not known if = EXP (or even NEXP!) but there are strong hints that it does not Is there a deterministic simulation of that does better than brute-force search? yes, if allow non-uniformity and Boolean circuits Proof: language L error reduction gives TM M such that if x L of length n Pr y [M(x, y) accepts] 1 (½) n2 if x L of length n Pr y [M(x, y) rejects] 1 (½) n2 Theorem (Adleman): P/poly 15 16
and Boolean circuits say y is bad for x if M(x,y) gives incorrect answer for fixed x: Pr y [y is bad for x] (½) n2 Pr y [y is bad for some x] 2 n (½) n2 < 1 Conclude: there exists some y on which M(x, y) is always correct build circuit for M, hardwire this y and Boolean circuits Does = EXP? Adleman s Theorem shows: = EXP implies EXP P/poly If you believe that randomness is all-powerful, you must also believe that non-uniformity gives an exponential advantage. 17 18 RL Recall: probabilistic Turing Machine deterministic TM with extra tape for coin flips RL (Random Logspace) L RL if there is a probabilistic logspace TM M: x L Pr y [M(x,y) accepts] ½ RL L RL NL SPACE(log 2 n) Theorem (SZ) : RL SPACE(log 3/2 n) Belief: L = RL (open problem) important detail #1: only allow one-way access to coin-flip tape important detail #2: explicitly require to run in polynomial time 19 20
RL Undirected STCONN L RL NL Natural problem: Undirected STCONN: given an undirected graph G = (V, E), nodes s, t, is there a path from s t? Theorem: USTCONN RL. (Recall: STCONN is NL-complete) 21 Test in RL if path from s to t in graph G=(V, E) Proof sketch: (in Papadimitriou) add self-loop to each vertex (technical reasons) start at s, random walk 2 V E steps, accept if see t Lemma: expected return time for any node i (of degree d i ) is 2 E /d i suppose s=v 1, v 2,, v n =t is a path expected time from v i to v i+1 is (d i /2)(2 E /d i ) = E expected time to reach v n V E Pr[fail reach t in 2 V E steps] ½ (Note: Reingold 2005: USTCONN L) 22