CS151 Complexity Theory Lecture 7 April 20, 2015.

Slides:



Advertisements
Similar presentations
Complexity Theory Lecture 6
Advertisements

Foundations of Cryptography Lecture 10 Lecturer: Moni Naor.
CS151 Complexity Theory Lecture 3 April 6, CS151 Lecture 32 Introduction A motivating question: Can computers replace mathematicians? L = { (x,
CS151 Complexity Theory Lecture 8 April 22, 2004.
Having Proofs for Incorrectness
Probabilistic algorithms Section 10.2 Giorgi Japaridze Theory of Computability.
Randomized Algorithms Kyomin Jung KAIST Applied Algorithm Lab Jan 12, WSAC
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 · L 2 means: For some polynomial time computable map r : 8 x: x 2 L 1 iff.
Complexity 18-1 Complexity Andrei Bulatov Probabilistic Algorithms.
CS151 Complexity Theory Lecture 3 April 6, Nondeterminism: introduction A motivating question: Can computers replace mathematicians? L = { (x,
CS151 Complexity Theory Lecture 6 April 15, 2015.
CS151 Complexity Theory Lecture 5 April 13, 2015.
CS21 Decidability and Tractability
CS151 Complexity Theory Lecture 7 April 20, 2004.
CS151 Complexity Theory Lecture 5 April 13, 2004.
Perfect and Statistical Secrecy, probabilistic algorithms, Definitions of Easy and Hard, 1-Way FN -- formal definition.
Randomized Computation Roni Parshani Orly Margalit Eran Mantzur Avi Mintz
1 Slides by Iddo Tzameret and Gil Shklarski. Adapted from Oded Goldreich’s course lecture notes by Erez Waisbard and Gera Weiss.
Arithmetic Hardness vs. Randomness Valentine Kabanets SFU.
Submitted by : Estrella Eisenberg Yair Kaufman Ohad Lipsky Riva Gonen Shalom.
Complexity 19-1 Complexity Andrei Bulatov More Probabilistic Algorithms.
–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|),
CS151 Complexity Theory Lecture 11 May 4, CS151 Lecture 112 Outline Extractors Trevisan’s extractor RL and undirected STCONN.
Derandomizing LOGSPACE Based on a paper by Russell Impagliazo, Noam Nissan and Avi Wigderson Presented by Amir Rosenfeld.
CS151 Complexity Theory Lecture 8 April 22, 2015.
CS151 Complexity Theory Lecture 10 April 29, 2004.
CS151 Complexity Theory Lecture 13 May 11, CS151 Lecture 132 Outline Natural complete problems for PH and PSPACE proof systems interactive proofs.
Chapter 11: Limitations of Algorithmic Power
CS151 Complexity Theory Lecture 6 April 15, 2004.
Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.
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.
CS151 Complexity Theory Lecture 9 April 27, 2004.
Foundations of Cryptography Lecture 2 Lecturer: Moni Naor.
The Complexity of Primality Testing. What is Primality Testing? Testing whether an integer is prime or not. – An integer p is prime if the only integers.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
CS151 Complexity Theory Lecture 13 May 11, Outline proof systems interactive proofs and their power Arthur-Merlin games.
1 Interactive Proofs proof systems interactive proofs and their power Arthur-Merlin games.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
1 2 Probabilistic Computations  Extend the notion of “efficient computation” beyond polynomial-time- Turing machines.  We will still consider only.
Computation Model and Complexity Class. 2 An algorithmic process that uses the result of a random draw to make an approximated decision has the ability.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
. CLASSES RP AND ZPP By: SARIKA PAMMI. CONTENTS:  INTRODUCTION  RP  FACTS ABOUT RP  MONTE CARLO ALGORITHM  CO-RP  ZPP  FACTS ABOUT ZPP  RELATION.
CS151 Complexity Theory Lecture 12 May 6, QSAT is PSPACE-complete Theorem: QSAT is PSPACE-complete. Proof: 8 x 1 9 x 2 8 x 3 … Qx n φ(x 1, x 2,
Umans Complexity Theory Lectures Lecture 1a: Problems and Languages.
Fall 2013 CMU CS Computational Complexity Lecture 7 Alternating Quantifiers, PH, PSPACE. These slides are mostly a resequencing of Chris Umans’
Fall 2013 CMU CS Computational Complexity Lectures 8-9 Randomness, communication, complexity of unique solutions These slides are mostly a resequencing.
Umans Complexity Theory Lectures Lecture 17: Natural Proofs.
Computability & Complexity II Chris Umans Caltech.
CS151 Complexity Theory Lecture 16 May 20, The outer verifier Theorem: NP  PCP[log n, polylog n] Proof (first steps): –define: Polynomial Constraint.
Pseudo-random generators Talk for Amnon ’ s seminar.
Complexity 24-1 Complexity Andrei Bulatov Interactive Proofs.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
Umans Complexity Theory Lecturess Lecture 11: Randomness Extractors.
1 Introduction to Quantum Information Processing QIC 710 / CS 667 / PH 767 / CO 681 / AM 871 Richard Cleve DC 2117 Lectures
Umans Complexity Theory Lectures Lecture 9b: Pseudo-Random Generators (PRGs) for BPP: - Hardness vs. randomness - Nisan-Wigderson (NW) Pseudo- Random Generator.
Pseudo-randomness. Randomized complexity classes model: probabilistic Turing Machine –deterministic TM with additional read-only tape containing “coin.
Complexity Theory and Explicit Constructions of Ramsey Graphs Rahul Santhanam University of Edinburgh.
Umans Complexity Theory Lectures
Probabilistic Algorithms
Umans Complexity Theory Lectures
Umans Complexity Theory Lectures
Umans Complexity Theory Lectures
CS21 Decidability and Tractability
Umans Complexity Theory Lectures
CS151 Complexity Theory Lecture 8 April 26, 2019.
CS151 Complexity Theory Lecture 7 April 23, 2019.
Presentation transcript:

CS151 Complexity Theory Lecture 7 April 20, 2015

2 Randomness 3 examples of the power of randomness –communication complexity –polynomial identity testing –complexity of finding unique solutions randomized complexity classes

April 20, Polynomial identity testing Given: polynomial p(x 1, x 2, …, x n ) as arithmetic formula (fan-out 1): - * x1x1 x2x2 * +- x3x3 …xnxn * multiplication (fan-in 2) addition (fan-in 2) negation (fan-in 1)

April 20, Polynomial identity testing Question: Is p identically zero? –i.e., is p(x) = 0 for all x  F n –(assume |F| larger than degree…) “polynomial identity testing” because given two polynomials p, q, we can check the identity p  q by checking if (p – q)  0

April 20, Polynomial identity testing try all |F| n inputs? –may be exponentially many multiply out symbolically, check that all coefficients are zero? –may be exponentially many coefficients can randomness help? –i.e., flip coins, allow small probability of wrong answer

April 20, Polynomial identity testing Lemma (Schwartz-Zippel): Let p(x 1, x 2, …, x n ) be a total degree d polynomial over a field F and let S be any subset of F. Then if p is not identically 0, Pr r 1, r 2,…, r n  S [ p(r 1, r 2, …, r n ) = 0] ≤ d/|S|.

April 20, Polynomial identity testing Proof: –induction on number of variables n –base case: n = 1, p is univariate polynomial of degree at most d –at most d roots, so Pr [ p(r 1 ) = 0] ≤ d/|S|

April 20, Polynomial identity testing –write p(x 1, x 2, …, x n ) as p(x 1, x 2, …, x n ) = Σ i (x 1 ) i p i (x 2, …, x n ) –k = max. i for which p i (x 2, …, x n ) not id. zero –by induction hypothesis: Pr [ p k (r 2, …, r n ) = 0] ≤ (d-k)/|S| –whenever p k (r 2, …, r n ) ≠ 0, p(x 1, r 2, …, r n ) is a univariate polynomial of degree k Pr[p(r 1,r 2,…,r n )=0 | p k (r 2,…,r n ) ≠ 0] ≤ k/|S|

April 20, Polynomial identity testing Pr [ p k (r 2, …, r n ) = 0] ≤ (d-k)/|S| Pr[p(r 1,r 2,…,r n )=0 | p k (r 2,…,r n ) ≠ 0] ≤ k/|S| –conclude: Pr[ p(r 1, …, r n ) = 0] ≤ (d-k)/|S| + k/|S| = d/|S| –Note: can add these probabilities because Pr[E 1 ] = Pr[E 1 |E 2 ]Pr[E 2 ] + Pr[E 1 |  E 2 ]Pr[  E 2 ] ≤ Pr[E 2 ] + Pr[E 1 |  E 2 ]

April 20, Polynomial identity testing Given: polynomial p(x 1, x 2, …, x n ) Is p identically zero? Note: degree d is at most the size of input - * x1x1 x2x2 * +- x3x3 …xnxn *

April 20, Polynomial identity testing randomized algorithm: field F, pick a subset S  F of size 2d –pick r 1, r 2, …, r n from S uniformly at random –if p(r 1, r 2, …, r n ) = 0, answer “yes” –if p(r 1, r 2, …, r n ) ≠ 0, answer “no” if p identically zero, never wrong if not, Schwartz-Zippel ensures probability of error at most ½

April 20, Polynomial identity testing Given: polynomial p(x 1, x 2, …, x n ) Is p identically zero? - * x1x1 x2x2 * +- x3x3 …xnxn * What if polynomial is given as arithmetic circuit? max degree? does the same strategy work?

April 20, Unique solutions a positive instance of SAT may have many satisfying assignments maybe the difficulty comes from not knowing which to “work on” if we knew # satisfying assignments was 1 or 0, could we zoom in on the 1 efficiently?

April 20, Unique solutions Question: given polynomial-time algorithm that works on SAT instances with at most 1 satisfying assignment, can we solve general SAT instances efficiently? Answer: yes –but (currently) only if “efficiently” allows randomness

April 20, Unique solutions Theorem (Valiant-Vazirani): there is a randomized poly-time procedure that given a 3-CNF formula φ(x 1, x 2, …, x n ) outputs a 3-CNF formula φ’ such that –if φ is not satisfiable then φ’ is not satisfiable –if φ is satisfiable then with probability at least 1/(8n) φ’ has exactly one satisfying assignment

April 20, Unique solutions Proof: –given subset S  {1, 2, …, n}, there exists a 3-CNF formula θ S on x 1, x 2, …, x n and additional variables such that: θ S is satisfiable iff an even number of variables in {x i } i  S are true for each such setting of the x i variables, this satisfying assignment is unique |θ S | = O(n) not difficult; details omitted

April 20, Unique solutions –set φ 0 = φ –for i = 1, 2, …, n pick random subset S i set φ i = φ i-1  θ S i –output random one of the φ i –T = set of satisfying assignments for φ –Claim: if |T| > 0, then Pr k  {0,1,2,…,n-1} [2 k ≤ |T| ≤ 2 k+1 ] ≥ 1/n

April 20, Unique solutions Claim: if 2 k ≤ |T| ≤ 2 k+1, then the probability φ k+2 has exactly one satisfying assignment is ≥ 1/8 –fix t, t’  T –Pr[t “agrees with” t’ on S i ] = ½ –Pr[t agrees with t’ on S 1, S 2, …, S k+2 ] = (½) k+2 t = t’ = SiSi S i contains even # of positions i where t i ≠ t i ’

April 20, Unique solutions –Pr[t agrees with some t’ on S 1,…, S k+2 ] ≤ (|T|-1)(½) k+2 < ½ –Pr[t satisfies S 1, S 2, …, S k+2 ] = (½) k+2 –Pr[t unique satisfying assignment of φ k+2 ] > (½) k+3 –sum over at least 2 k different t  T (disjoint events); claim follows.

April 20, Randomized complexity classes model: probabilistic Turing Machine –deterministic TM with additional read-only tape containing “coin flips” BPP (Bounded-error Probabilistic Poly-time) –L  BPP 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 –“p.p.t” = probabilistic polynomial time

April 20, 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] ≥ ½ x  L  Pr y [M(x,y) rejects] = 1 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] ≥ ½

April 20, 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

April 20, Randomized complexity classes “1/2” in ZPP, RP, coRP definition unimportant –can replace by 1/poly(n) “2/3” in BPP definition unimportant –can replace by ½ + 1/poly(n) Why? error reduction –we will see simple error reduction by repetition –more sophisticated error reduction later These classes may capture “efficiently computable” better than P.

April 20, Error reduction for RP given L and p.p.t TM M: x  L  Pr y [M(x,y) accepts] ≥ ε x  L  Pr y [M(x,y) rejects] = 1 new p.p.t TM M’: –simulate M k/ε times, each time with independent coin flips –accept if any simulation accepts –otherwise reject

April 20, Error reduction x  L  Pr y [M(x,y) accepts] ≥ ε x  L  Pr y [M(x,y) rejects] = 1 if x  L: –probability a given simulation “bad” ≤ (1 – ε) –probability all simulations “bad” ≤ (1–ε) (k/ε) ≤ e -k Pr y’ [M’(x, y’) accepts] ≥ 1 – e -k if x  L: Pr y’ [M’(x,y’) rejects] = 1

April 20, Error reduction for BPP 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

April 20, Error reduction for BPP –X i random variable indicating “correct” outcome in i-th simulation (out of m = k/ε 2 ) Pr[X i = 1] ≥ ½ + ε Pr[X i = 0] ≤ ½ - ε –E[X i ] ≥ ½+ε –X = Σ i X i –μ = E[X] ≥ (½ + ε)m –Chernoff: Pr[X ≤ m/2] ≤ 2 -  (ε 2 μ)

April 20, Error reduction for BPP x  L  Pr y [M(x,y) accepts] ≥ ½ + ε x  L  Pr y [M(x,y) rejects] ≥ ½ + ε –if x  L Pr y’ [M’(x, y’) accepts] ≥ 1 – (½)  (k) –if x  L Pr y’ [M’(x,y’) rejects] ≥ 1 – (½)  (k)

April 20, 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

April 20, Relationship to other classes ZPP, RP, coRP, BPP, 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

April 20, Relationship to other classes P RPcoRP NPcoNP PSPACE BPP

April 20, BPP How powerful is BPP? We have seen an example of a problem in BPP that we only know how to solve in EXP. Is randomness a panacea for intractability?

April 20, BPP It is not known if BPP = EXP (or even NEXP!) –but there are strong hints that it does not Is there a deterministic simulation of BPP that does better than brute-force search? –yes, if allow non-uniformity Theorem (Adleman): BPP  P/poly

April 20, BPP and Boolean circuits Proof: –language L  BPP –error reduction gives TM M such that if x  L of length n Pr y [M(x, y) accepts] ≥ 1 – (½) n 2 if x  L of length n Pr y [M(x, y) rejects] ≥ 1 – (½) n 2

April 20, BPP 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] ≤ (½) n 2 –Pr y [y is bad for some x] ≤ 2 n (½) n 2 < 1 –Conclude: there exists some y on which M(x, y) is always correct –build circuit for M, hardwire this y

April 20, BPP and Boolean circuits Does BPP = EXP ? Adleman’s Theorem shows: BPP = EXP implies EXP  P/poly If you believe that randomness is all-powerful, you must also believe that non-uniformity gives an exponential advantage.

April 20, BPP Next: further explore the relationship between randomness and nonuniformity Main tool: pseudo-random generators

April 20, Derandomization Goal: try to simulate BPP in subexponential time (or better) use Pseudo-Random Generator (PRG): often: PRG “good” if it passes (ad-hoc) statistical tests seedoutput string G t bitsm bits

April 20, Derandomization ad-hoc tests not good enough to prove BPP has non-trivial simulations Our requirements: –G is efficiently computable –“stretches” t bits into m bits –“fools” small circuits: for all circuits C of size at most s : |Pr y [C(y) = 1] – Pr z [C(G(z)) = 1]| ≤ ε

April 20, Simulating BPP using PRGs Recall: L  BPP implies exists 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 given an input x: –convert M into circuit C(x, y) –simplification: pad y so that |C| = |y| = m hardwire input x to get circuit C x Pr y [C x (y) = 1] ≥ 2/3 (“yes”) Pr y [C x (y) = 1] ≤ 1/3 (“no”)

April 20, Simulating BPP using PRGs Use a PRG G with –output length m –seed length t « m –error ε < 1/6 –fooling size s = m Compute Pr z [C x (G(z)) = 1] exactly –evaluate C x (G(z)) on every seed z  {0,1} t running time (O(m)+(time for G)) 2 t

April 20, Simulating BPP using PRGs knowing Pr z [C x (G(z)) = 1], can distinguish between two cases: 01/31/22/31 “yes”: ε 01/31/22/31 “no”: ε

April 20, Blum-Micali-Yao PRG Initial goal: for all 1 > δ > 0, we will build a family of PRGs {G m } with: output length m fooling size s = m seed length t = m δ running time m c error ε < 1/6 implies: BPP   δ>0 TIME(2 n δ ) ( EXP Why? simulation runs in time O(m+m c )(2 m δ ) = O(2 m 2δ ) = O(2 n 2kδ )

April 20, Blum-Micali-Yao PRG PRGs of this type imply existence of one-way- functions –we’ll use widely believed cryptographic assumptions Definition: One Way Function (OWF): function family f = {f n }, f n :{0,1} n  {0,1} n –f n computable in poly(n) time –for every family of poly-size circuits {C n } Pr x [C n (f n (x))  f n -1 (f n (x))] ≤ ε(n) –ε(n) = o(n -c ) for all c

April 20, Blum-Micali-Yao PRG believe one-way functions exist –e.g. integer multiplication, discrete log, RSA (w/ minor modifications) Definition: One Way Permutation: OWF in which f n is 1-1 –can simplify “Pr x [C n (f n (x))  f n -1 (f n (x))] ≤ ε(n)” to Pr y [C n (y) = f n -1 (y)] ≤ ε(n)

April 20, First attempt attempt at PRG from OWF f: –t = m δ –y 0  {0,1} t –y i = f t (y i-1 ) –G(y 0 ) = y k-1 y k-2 y k-3 …y 0 –k = m/t computable in time at most kt c < mt c-1 = m c

April 20, First attempt output is “unpredictable”: –no poly-size circuit C can output y i-1 given y k-1 y k-2 y k-3 …y i with non-negl. success prob. –if C could, then given y i can compute y k-1, y k-2, …, y i+2, y i+1 and feed to C –result is poly-size circuit to compute y i-1 = f t -1 (y i ) from y i –note: we’re using that f t is 1-1

April 20, First attempt attempt: y 0  {0,1} t y i = f t (y i-1 ) G(y 0 ) = y k-1 y k-2 y k-3 …y 0 y0y0 y1y1 y2y2 y3y3 y4y4 y5y5 ftft ftft ftft ftft ftft G(y 0 ): y0y0 y1y1 y2y2 y3y3 y4y4 y5y5 f t -1 ftft ftft G’(y 3 ): f t -1 same distribution!