Stanford University CS254: Computational Complexity Notes 7 Luca Trevisan January 29, Notes for Lecture 7

Similar documents
Lecture 4: Universal Hash Functions/Streaming Cont d

18.1 Introduction and Recap

U.C. Berkeley CS294: Spectral Methods and Expanders Handout 8 Luca Trevisan February 17, 2016

Stanford University CS359G: Graph Partitioning and Expanders Handout 4 Luca Trevisan January 13, 2011

Matrix Approximation via Sampling, Subspace Embedding. 1 Solving Linear Systems Using SVD

Notes on Frequency Estimation in Data Streams

Lecture 10: May 6, 2013

The Finite Element Method: A Short Introduction

Finding Primitive Roots Pseudo-Deterministically

Lecture Space-Bounded Derandomization

Finding Dense Subgraphs in G(n, 1/2)

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan 2/21/2008. Notes for Lecture 8

On Pfaff s solution of the Pfaff problem

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 3: Large deviations bounds and applications Lecturer: Sanjeev Arora

U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 6 Luca Trevisan September 12, 2017

6.842 Randomness and Computation February 18, Lecture 4

11 Tail Inequalities Markov s Inequality. Lecture 11: Tail Inequalities [Fa 13]

Lectures - Week 4 Matrix norms, Conditioning, Vector Spaces, Linear Independence, Spanning sets and Basis, Null space and Range of a Matrix

Expected Value and Variance

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.265/15.070J Fall 2013 Lecture 12 10/21/2013. Martingale Concentration Inequalities and Applications

E Tail Inequalities. E.1 Markov s Inequality. Non-Lecture E: Tail Inequalities

The Multiple Classical Linear Regression Model (CLRM): Specification and Assumptions. 1. Introduction

Adaptive Kernel Estimation of the Conditional Quantiles

TR/95 February Splines G. H. BEHFOROOZ* & N. PAPAMICHAEL

COMP4630: λ-calculus

Multivariate Ratio Estimator of the Population Total under Stratified Random Sampling

Problem Set 4: Sketch of Solutions

j) = 1 (note sigma notation) ii. Continuous random variable (e.g. Normal distribution) 1. density function: f ( x) 0 and f ( x) dx = 1

Eigenvalues of Random Graphs

Stanford University CS254: Computational Complexity Handout 8 Luca Trevisan 4/21/2010

APPENDIX A Some Linear Algebra

Maximizing the number of nonnegative subsets

Part (a) (Number of collisions) Recall we showed that if we throw m balls in n bins, the average number of. Use Chebyshev s inequality to show that:

Lecture 3: Probability Distributions

Math 426: Probability MWF 1pm, Gasson 310 Homework 4 Selected Solutions

NP-Completeness : Proofs

U.C. Berkeley CS294: Beyond Worst-Case Analysis Luca Trevisan September 5, 2017

First Year Examination Department of Statistics, University of Florida

Convergence of random processes

Introduction to Algorithms

3.1 Expectation of Functions of Several Random Variables. )' be a k-dimensional discrete or continuous random vector, with joint PMF p (, E X E X1 E X

Estimation: Part 2. Chapter GREG estimation

arxiv: v1 [math.co] 1 Mar 2014

Case A. P k = Ni ( 2L i k 1 ) + (# big cells) 10d 2 P k.

ECE 534: Elements of Information Theory. Solutions to Midterm Exam (Spring 2006)

PubH 7405: REGRESSION ANALYSIS. SLR: INFERENCES, Part II

Lecture Randomized Load Balancing strategies and their analysis. Probability concepts include, counting, the union bound, and Chernoff bounds.

n α j x j = 0 j=1 has a nontrivial solution. Here A is the n k matrix whose jth column is the vector for all t j=0

Lecture 4: Constant Time SVD Approximation

Errors for Linear Systems

Competitive Experimentation and Private Information

Stanford University Graph Partitioning and Expanders Handout 3 Luca Trevisan May 8, 2013

Lecture 5 September 17, 2015

Lecture 14 (03/27/18). Channels. Decoding. Preview of the Capacity Theorem.

Min Cut, Fast Cut, Polynomial Identities

Economics 130. Lecture 4 Simple Linear Regression Continued

Homework Assignment 3 Due in class, Thursday October 15

Lecture 5 Decoding Binary BCH Codes

Econ107 Applied Econometrics Topic 3: Classical Model (Studenmund, Chapter 4)

MATH 5707 HOMEWORK 4 SOLUTIONS 2. 2 i 2p i E(X i ) + E(Xi 2 ) ä i=1. i=1

Randomness and Computation

Singular Value Decomposition: Theory and Applications

Hardness of Learning Halfspaces with Noise

LECTURE 5: FIBRATIONS AND HOMOTOPY FIBERS

Exercises of Chapter 2

The Order Relation and Trace Inequalities for. Hermitian Operators

NUMERICAL DIFFERENTIATION

A Discrete Approach to Continuous Second-Order Boundary Value Problems via Monotone Iterative Techniques

Math 217 Fall 2013 Homework 2 Solutions

Note on quantum counting classes

Problem Set 9 Solutions

FINITELY-GENERATED MODULES OVER A PRINCIPAL IDEAL DOMAIN

TAIL BOUNDS FOR SUMS OF GEOMETRIC AND EXPONENTIAL VARIABLES

10-701/ Machine Learning, Fall 2005 Homework 3

5 The Laplace Equation in a convex polygon

Appendix B. Criterion of Riemann-Stieltjes Integrability

On a nonlinear compactness lemma in L p (0, T ; B).

Calculation of time complexity (3%)

Linear Regression Analysis: Terminology and Notation

8.4 COMPLEX VECTOR SPACES AND INNER PRODUCTS

Feature Selection: Part 1

Introduction to Algorithms

Lecture 3 January 31, 2017

Tornado and Luby Transform Codes. Ashish Khisti Presentation October 22, 2003

ANSWERS. Problem 1. and the moment generating function (mgf) by. defined for any real t. Use this to show that E( U) var( U)

College of Computer & Information Science Fall 2009 Northeastern University 20 October 2009

Low correlation tensor decomposition via entropy maximization

The Second Anti-Mathima on Game Theory

A note on almost sure behavior of randomly weighted sums of φ-mixing random variables with φ-mixing weights

find (x): given element x, return the canonical element of the set containing x;

A new construction of 3-separable matrices via an improved decoding of Macula s construction

Lecture 3. Ax x i a i. i i

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems

Econ Statistical Properties of the OLS estimator. Sanjaya DeSilva

Transfer Functions. Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: ( ) system

LOW BIAS INTEGRATED PATH ESTIMATORS. James M. Calvin

Computing Correlated Equilibria in Multi-Player Games

Solution for singularly perturbed problems via cubic spline in tension

CS 2750 Machine Learning. Lecture 5. Density estimation. CS 2750 Machine Learning. Announcements

THE CHINESE REMAINDER THEOREM. We should thank the Chinese for their wonderful remainder theorem. Glenn Stevens

Transcription:

Stanford Unversty CS54: Computatonal Complexty Notes 7 Luca Trevsan January 9, 014 Notes for Lecture 7 1 Approxmate Countng wt an N oracle We complete te proof of te followng result: Teorem 1 For every countng problem #A n #, tere s a probablstc algortm C tat on nput x, computes wt g probablty a value v suc tat (1 ɛ)#a(x) v (1 + ɛ)#a(x) (1) n tme polynomal n x and n 1 ɛ, usng an oracle for N. Gven wat we proved n te prevous lecture, t only remans to develop an approxmate comparson algortm for #CSAT, tat s, an algortm a comp suc tat for every crcut C: If #CSAT (C) k+1 ten a comp(c, k) = YES wt g probablty; If #CSAT (C) < k ten a comp(c, k) = NO wt g probablty. Te dea of te proof s to pck a random functon : {0, 1} n {0, 1} k, and ten consder te number of satsfyng assgnments for te crcut C (x) := C(x) ((x) = 0). If #CSAT (C) k+1 ten, on average over te coce of, C (x) as at least two satsfyng assgnments, but f #CSAT (C) k+1 ten, on average over te coce of, C (x) as less tan one satsfyng assgnments. Ceckng f C s satsfable s a test tat we would expect to dstngus te two cases. To make ts argument rgorous, we cannot pck te functon unformly at random among all functons, because ten would be an object requrng an exponental sze descrpton, and a descrpton of (n te form of an evaluaton algortm) as to be part of te crcut C. Instead we wll pck from a parwse ndependent dstrbuton of functons. To mprove te dstngusng probablty and smplfy te analyss, we wll work wt functons : {0, 1} n {0, 1} k 5, and we wll treat te case k 5 separately. 1.1 arwse ndependent as functons Defnton Let H be a dstrbuton over functons of te form : {0, 1} n {0, 1} m. We say tat H s a parwse ndependent dstrbuton of as functons f for every two dfferent nputs x, y {0, 1} n and for every two possble outputs s, t {0, 1} m we ave [(x) = s (y) = t] = 1 H m 1

Anoter way to look at te defnton s tat for every x y, wen we pck at random ten te random varables (x) and (y) are ndependent and unformly dstrbuted. In partcular, for every x y and for every s, t we ave [(x) = s (y) = t] = [(x) = s] A smple constructon of parwse ndependent as functons s as follows: pck a matrx A {0, 1} m n and a vector b {0, 1} m unformly at random, and ten defne te functon A,b (x) := Ax + b were te matrx product and vector addton operatons are performed over te feld F. (Tat s, tey are performed modulo.) To see tat te parwse ndependence property s satsfed, consder any two dstnct nputs x, y {0, 1} n and any two outputs s, t {0, 1} m. If we call a 1,..., a m te rows of A ten we ave [Ax + b = s Ay + b = t] = A,b m [a T x + b = s a T y + b = t ] =1 because te events (a T x + b = s a T y + b = t ) are all mutually ndependent. Te condton (a T x + b = s a T y + b = t ) can be equvalently rewrtten as and as a T x s = a T y t b = a T x s and ts probablty s a T (x y) = s t b = a T x s [a T (x y) = s t b = a T x s ] = [a T (x y) = s t ] [b = a T x s a T (x y) = s t ] = 1 1 = 1 4 Because x y s a non-zero vector, and so a T (x y) s a vector bt, and because b s a random bt ndependent of x, y. In concluson, we ave ( ) 1 m [Ax + b = s Ay + b = t] = A,b 4 as desred. We wll use te followng fact about parwse ndependent as functons.

Lemma 3 Let H be a dstrbuton of parwse ndependent as functons {0, 1} n {0, 1} m, and Let S {0, 1} n. Ten, for every t [ {a S : (a) = 0} S ] m t S t m. () H roof: We wll use Cebysev s Inequalty to bound te falure probablty. Let S = {a 1,..., a k }, and pck a random H. We defne random varables X 1,..., X k as X = { 1 f (a ) = 0 0 oterwse. (3) Clearly, {a S : (a) = 0} = X. We now calculate te expectatons. For eac, [X = 1] = 1 and E[X m ] = 1. Hence, m [ ] E X = S m. (4) Also we calculate te varance Var[X ] = E[X ] E[X ] E[X ] Because X 1,..., X k are parwse ndependent, [ ] Var X = = E[X ] = 1 m. Var[X ] S m. (5) Usng Cebysev s Inequalty, we get [ {a S : (a) = 0} S ] [ m t = X E[ Var[ X ] t = S t m ] X ] t] 1. Te algortm a-comp We defne te algortm a-comp as follows. nput: C, k f k 5 ten ceck exactly weter #CSAT (C) k. 3

f k 6 pck from a set of parwse ndependent as functons : {0, 1} n {0, 1} m, were m = k 5 answer YES ff tere are more ten 48 nputs x to C suc tat C(x) = 1 and (x) = 0. Notce tat te test at te last step can be done wt one access to an oracle to N and tat te overall algortm runs n probablstc polynomal tme gven an N oracle. We now analyze te correctness of te algortm. Let S {0, 1} n be te set of nputs x suc tat C(x) = 1. Tere are cases. If S k+1, let S S be an arbtrary subset of S of sze exactly k+1. S / m = 64 and we can use Lemma 3 to estmate te error probablty as: Ten [ {x S : (x) = 0} 48] H [ {x S : (x) = 0} 48] H [ S ] = {x S : (x) = 0} 16 H m 1 16 S m = 1 4 If S < k, ten S / m < 3, and te probablty of error can be estmated as [ {x S : (x) = 0} > 48] H [ ] {x S : (x) = 0} S 16 m H 1 16 S m 1 8 Terefore, te algortm wll gve te correct answer wt probablty at least 3/4, wc can ten be amplfed to, say, 1 1/4n (so tat all n nvocatons of a-comp are lkely to be correct) by repeatng te procedure O(log n) tmes and takng te majorty answer. Te Valant-Vazran Reducton We say tat an nstance C of crcut-sat s unquely satsfable f t as exactly one satsfyng assgnment. Valant and Vazran proved tat f tere s a polynomal tme randomzed algortm tat, gven a unquely satsfable crcut, fnds ts satsfyng assgnment, ten crcut-sat (and, ence, all oter problems n N) can be solved n randomzed polynomal tme. Te dea s related to te argument n te prevous secton. Gven a satsfable crcut C, we guess a number k suc tat k s approxmately te number of satsfyng assgnments 4

of C, we pck at random a parwse ndependent as functon : {0, 1} n {0, 1} k, and we construct te crcut C suc tat C (x) := C(x) ((x) = 0). Wt constant probablty, C as exactly one satsfyng assgnment, and ten te ypotetcal algortm tat solves unquely satsfable nstances wll fnd a satsfyng assgnment for C, and ence for C. It remans to prove tat f we ave a set S {0, 1} n, and we pck a parwse ndependent as functon : {0, 1} n {0, 1} k, were k log S, ten tere s a constant tat (x) = 0 for exactly one element of S. It wll not be possble to make ts argument work by usng Cebysev s nequalty, because wen te expected number of elements tat as to 0 s around 1, te standard devaton wll be too g. Instead, we use parwse ndependence to argue tat eac element of S as probablty Ω(1/ S ) of beng te unque element of S asng to 0; tese events are dsjont, and so ter probablty can be added up. Lemma 4 (Valant-Vazran) Let S {0, 1} n, let k be suc tat k S k+1, and let H be a famly of parwse ndependent as functons of te form : {0, 1} n {0, 1} k+. Ten f we pck at random from H, tere s probablty at least 1/8 tat tere s a unque element x S suc tat (x) = 0. recsely, r H [ {x S : (x) = 0} = 1] 1 8 (6) roof: For eac element x S, te probablty tat x s te unque element of S asng to 0 s [(x) = 0 ( y S {x}.(y) 0] Were = [(x) = 0] [(x) = 0 ( y S {x}.(y) = 0)] [(x) = 0] = 1 k+ and, usng a unon bound and parwse ndependence, [(x) = 0 ( y S {x}.(y) = 0)] y S {x} [(x) = (y) = 0] = S 1 k+4 1 k+3 Te probablty tat x s te unque element of S tat ases to 0 s tus [(x) = 0 ( y S {x}.(y) 0] 1 k+3 and te probablty tat a unque element of S ases to 0 s te sum of te above probabltes over all elements of S, and so t s at least S / k+3, wc s at least 1/8. We ave proved te followng result. Teorem 5 Suppose tat tere s a randomzed polynomal tme algortm A suc tat, gven a unquely satsfable crcut C, A fnds te satsfyng assgnment of C. Ten every problem n N s solvable n randomzed polynomal tme. 5

roof: It s enoug to sow tat, under te assumpton of te teorem, gven a (not necessarly unquely) satsfable crcut C, we can fnd a satsfyng assgnment for t n randomzed polynomal tme wt constant probablty. To do so, f n s te number of nputs of te gven crcut C, we try all k = 0,..., n, and for eac k we pck a parwse ndependent as functon k : {0, 1} n {0, 1} k+, and we run algortm A on te crcut C k (x) := C(x) ((x) = 0). For te coce of k suc tat te number of satsfyng assgnments of C s between k and k+1, we ave a constant probablty tat C k s unquely satsfable and tat A wll fnd a satsfyng assgnment. 3 Approxmate Samplng So far we ave consdered te followng queston: for an N-relaton R, gven an nput x, wat s te sze of te set R x = {y : (x, y) R}? A related queston s to be able to sample from te unform dstrbuton over R x. Wenever te relaton R s downward self reducble (a tecncal condton tat we won t defne formally), t s possble to prove tat tere s a probablstc algortm runnng n tme polynomal n x and 1/ɛ to approxmate wtn 1 + ɛ te value R x f and only f tere s a probablstc algortm runnng n tme polynomal n x and 1/ɛ tat samples a dstrbuton ɛ-close to te unform dstrbuton over R x. We sow ow te above result apples to 3SAT (te general result uses te same proof dea). For a formula φ, a varable x and a bt b, let us defne by φ x b te formula obtaned by substtutng te value b n place of x. 1 If φ s defned over varables x 1,..., x n, t s easy to see tat #φ = #φ x 0 + #φ x 1 Also, f S s te unform dstrbuton over satsfyng assgnments for φ, we note tat [x 1 = b] = #φ x b (x 1,...,x n) S #φ Suppose ten tat we ave an effcent samplng algortm tat gven φ and ɛ generates a dstrbuton ɛ-close to unform over te satsfyng assgnments of φ. Let us ten ran te samplng algortm wt approxmaton parameter ɛ/n and use t to sample about Õ(n /ɛ ) assgnments. By computng te fracton of suc assgnments avng x 1 = 0 and x 1 = 1, we get approxmate values p 0, p 1, suc tat p b (x1,...,x n) S[x 1 = b] ɛ/n. Let b be suc tat p b 1/, ten #φ x b /p b s a good approxmaton, to wtn a multplcatve factor (1 + ɛ/n) to #φ, and we can recurse to compute #φ x b to wtn a (1 + ɛ/n) n 1 factor. Conversely, suppose we ave an approxmate countng procedure. Ten we can approxmately compute p b = #φ x b #φ, generate a value b for x 1 wt probablty approxmately p b, and ten recurse to generate a random assgnment for #φ x b. Te same equvalence olds, clearly, for SAT and, among oter problems, for te problem of countng te number of perfect matcngs n a bpartte grap. It s known 1 Specfcally, φ x 1 s obtaned by removng eac occurrence of x from te clauses were t occurs, and removng all te clauses tat contan an occurrence of x; te formula φ x 0 s smlarly obtaned. 6

tat t s N-ard to perform approxmate countng for SAT and ts result, wt te above reducton, mples tat approxmate samplng s also ard for SAT. Te problem of approxmately samplng a perfect matcng as a probablstc polynomal soluton, and te reducton mples tat approxmately countng te number of perfect matcngs n a grap can also be done n probablstc polynomal tme. Te reducton and te results from last secton also mply tat 3SAT (and any oter N relaton) as an approxmate samplng algortm tat runs n probablstc polynomal tme wt an N oracle. Wt a careful use of te tecnques from last week t s ndeed possble to get an exact samplng algortm for 3SAT (and any oter N relaton) runnng n probablstc polynomal tme wt an N oracle. Ts s essentally best possble, because te approxmate samplng requres randomness by ts very defnton, and generatng satsfyng assgnments for a 3SAT formula requres at least an N oracle. 7