Problem Set 2. Assigned: Mon. November. 23, 2015

Similar documents
1 Randomized Computation

CSC 5170: Theory of Computational Complexity Lecture 5 The Chinese University of Hong Kong 8 February 2010

Pr[X = s Y = t] = Pr[X = s] Pr[Y = t]

Lecture Examples of problems which have randomized algorithms

Lecture 7: Schwartz-Zippel Lemma, Perfect Matching. 1.1 Polynomial Identity Testing and Schwartz-Zippel Lemma

20.1 2SAT. CS125 Lecture 20 Fall 2016

1 Adjacency matrix and eigenvalues

Lecture 2: January 18

1 Randomized complexity

compare to comparison and pointer based sorting, binary trees

6.842 Randomness and Computation Lecture 5

CPSC 536N: Randomized Algorithms Term 2. Lecture 9

ACO Comprehensive Exam March 17 and 18, Computability, Complexity and Algorithms

A polytime proof of correctness of the Rabin-Miller algorithm from Fermat s Little Theorem

CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010

Out-colourings of Digraphs

A Polynomial-Time Algorithm for Pliable Index Coding

ACO Comprehensive Exam March 20 and 21, Computability, Complexity and Algorithms

CS 6820 Fall 2014 Lectures, October 3-20, 2014

Lecture 6: Random Walks versus Independent Sampling

CS 151 Complexity Theory Spring Solution Set 5

Lecture 5: Random Walks and Markov Chain

Chapter 7 Randomization Algorithm Theory WS 2017/18 Fabian Kuhn

15-251: Great Theoretical Ideas In Computer Science Recitation 9 : Randomized Algorithms and Communication Complexity Solutions

U.C. Berkeley CS174: Randomized Algorithms Lecture Note 12 Professor Luca Trevisan April 29, 2003

Fast Polynomial Multiplication

Randomized Complexity Classes; RP

Lecture 20: Goemans-Williamson MAXCUT Approximation Algorithm. 2 Goemans-Williamson Approximation Algorithm for MAXCUT

1 Reductions from Maximum Matchings to Perfect Matchings

Chapter 5 : Randomized computation

Lecture 15: Expanders

Lecture 24: Randomized Complexity, Course Summary

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Randomness and Computation March 13, Lecture 3

18.10 Addendum: Arbitrary number of pigeons

CS6999 Probabilistic Methods in Integer Programming Randomized Rounding Andrew D. Smith April 2003

Chapter 6 Randomization Algorithm Theory WS 2012/13 Fabian Kuhn

Lecture 5: Two-point Sampling

IITM-CS6845: Theory Toolkit February 3, 2012

fsat We next show that if sat P, then fsat has a polynomial-time algorithm. c 2010 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 425

Error Correcting Codes Questions Pool

CS Communication Complexity: Applications and New Directions

Lecture 22: Derandomization Implies Circuit Lower Bounds

Theory of Computer Science to Msc Students, Spring Lecture 2

(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ).

10.4 The Kruskal Katona theorem

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Lecture 5. 1 Review (Pairwise Independence and Derandomization)

The running time of Euclid s algorithm

Lecture 22: Counting

Coding Theory and Applications. Solved Exercises and Problems of Cyclic Codes. Enes Pasalic University of Primorska Koper, 2013

Pseudorandomness. Contents

Last time, we described a pseudorandom generator that stretched its truly random input by one. If f is ( 1 2

Approximation Algorithms and Hardness of Approximation. IPM, Jan Mohammad R. Salavatipour Department of Computing Science University of Alberta

Lower Bounds for Testing Bipartiteness in Dense Graphs

MATH 363: Discrete Mathematics

Notes for Lecture 3... x 4

* 8 Groups, with Appendix containing Rings and Fields.

Mathematics Masters Examination

Formalizing Randomized Matching Algorithms

Graph fundamentals. Matrices associated with a graph

Algebraic structures I

Lecture 5 Polynomial Identity Testing

Lecture 6: Finite Fields

Lecture Notes 20: Zero-Knowledge Proofs

6.842 Randomness and Computation March 3, Lecture 8

2 Evidence that Graph Isomorphism is not NP-complete

A Linear Round Lower Bound for Lovasz-Schrijver SDP Relaxations of Vertex Cover

Higher-Dimensional Analogues of the Combinatorial Nullstellensatz

1 The Low-Degree Testing Assumption

Finite fields, randomness and complexity. Swastik Kopparty Rutgers University

Lecture 17. In this lecture, we will continue our discussion on randomization.

ACO Comprehensive Exam October 14 and 15, 2013

Error Correcting Codes: Combinatorics, Algorithms and Applications Spring Homework Due Monday March 23, 2009 in class

Reading group: proof of the PCP theorem

Lecture 10 Oct. 3, 2017

Lecture 4: Two-point Sampling, Coupon Collector s problem

Model Counting for Logical Theories

PRGs for space-bounded computation: INW, Nisan

Lecture 12: Interactive Proofs

1 Last time: least-squares problems

Randomized Algorithms

Lecture 6 Positive Definite Matrices

Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6

Solutions 2017 AB Exam

The knapsack Problem

Randomness and non-uniformity

Introduction Long transparent proofs The real PCP theorem. Real Number PCPs. Klaus Meer. Brandenburg University of Technology, Cottbus, Germany

6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch

Laplacian Integral Graphs with Maximum Degree 3

: Error Correcting Codes. October 2017 Lecture 1

Approximation Algorithms

Course 2316 Sample Paper 1

0.1 Rational Canonical Forms

Random Lifts of Graphs

Finite Fields. Mike Reiter

A Lower Bound for the Size of Syntactically Multilinear Arithmetic Circuits

Rings. EE 387, Notes 7, Handout #10

arxiv: v1 [math.co] 3 Nov 2014

Transcription:

Pseudorandomness Prof. Salil Vadhan Problem Set 2 Assigned: Mon. November. 23, 2015 Chi-Ning Chou Index Problem Progress 1 SchwartzZippel lemma 1/1 2 Robustness of the model 1/1 3 Zero error versus 1-sided error 1/1 4 Polynomial Identity Testing for integer circuits 2/2 5 Polynomial Identity Testing via Modular Reduction 2/2 6 Primality Testing 2/2 7 Chernoff Bound 3/3 8 Necessity of Randomness for Identity Testing* 0/1 9 Spectral Graph Theory 6/6 10 Hitting Time and Eigenvalues for Directed Graphs 2/3 11 Consequences of Derandomizing prbpp 0/4 Total 20/26 Table 1: Problem Set 2: Progress Problem 1. (Schwartz-Zippel lemma.) over a field F and S F,then If f(x 1,..., x n ) is a nonzero polynomial of degree d Pr α 1,..., α n S [f(α 1,..., α n ) = 0] d S Prove by the induction on the number of the variables k. The induction hypothesis is Pr α 1,..., α k S [f(α 1,..., α k ) = 0] d S. For the base case k = 1, f reduce to an univariate polynomial which has at most d roots. Thus, the probability to take a root from set S is at most d S since S contains no more than d roots of f. Suppose the induction hypothesis stands for k n, consider k = n + 1. For any multivariate polynomial f with n + 1 variables and an n + 1th input α n+1. We can regard them as: f(,...,, α n+1 ) = f αn+1 (,..., ). Now, we can factorize f αn+1 with the degree of x n+1 in order to use Schwartz-Zippel lemma. Suppose the maximum degree of x n+1 in f is l, then we can write f αn+1 = l q i (x 1,..., x n )αn+1 i i=0 1

, where q i are polynomials in x 1,..., x n. Note that the degree of f αn+1 is l. Thus, by induction hypothesis, we have Pr α 1,..., α n S [f α n+1 (α 1,..., α n ) = 0] d l S And if f αn+1 (α 1,..., α n ) 0, since we take α n+1 arbitrary, we have To sum up, Pr α n+1 S [f α n+1 (α 1,..., α n ) = 0] = Pr α n+1 S [f(α 1,..., α n+1 ) = 0] l S Pr α 1,..., α n+1 S [f(α 1,..., α n+1 ) = 0] Pr α n+1 S Intuition (Schwartz-Zippel Lemma) ( + Pr α 1,..., α n S d l S Pr α1,..., α n S [f α n+1 (α 1,..., α n ) = 0] ( ) + l S = d S The statement is for ANY subset of the field or domain. Pr α n+1 S [f α n+1 (α 1,..., α n ) = 0] Utilize the structure of polynomial. For instance, the ratio of zeros can be upper bounded by the degreed. When d = 1, we can upper bound the exact number of zeros. When d > 1, the bound is for ratio. ) Problem 2. (Robustness of the model) Suppose we modify our model of randomized computation to allow the algorithm to obtain a random element of {1,..., m} for any number m whose binary representation it has already computed (as opposed to just allowing to random bits). Show that this would not change the classes BPP and RP. Suppose 2 k + 1 < m 2 k+1 + 1 for some integer k. Thus, the binary representation of m will be b 1 b 2...b k+1, b i {0, 1}. Let X be the random sample from {1,..., m}, take X = X 1 and consider the binary representation of X : b 1 b 2...b k+1. If b 1, which is the most significant bit, equals to 1, then throw away this number and sample another random number again. Once b 1 = 0, return b 2,..., b k+1 as the random bits to the algorithm. Since we condition on the case that the random number X being less than 2 k, the distribution of X will be uniform in {0,..., 2 k } which means that each b i is uniform in {0, 1}. As a result, X provides k random bits. Note that for a single sample, the algorithm generates at most k random bits. Moreover, the probability to generate a valid random sequence per sample is 2k m 1 2. Namely, the expected random bits generated per sample is greater than k 2. Thus, using this randomization model 2

is even more efficient than the binary version. In conclusion, when implementing the algorithm in BPP or RP, allowing the randomized algorithm sample in {1, m} will let the computation problem stay in BPP or RP. Intuition (support size of random element) The number of samples needed from a randomized algorithm is inverse-linear in the support size of the random element. That is, Once m = o(2 n ), it won t affect the polynomial complexity classes. Problem 3. (Zero error versus 1-sided error) Prove that ZPP = RP co-rp. 1. (ZP P RP co-rp) Suppose language L ZPP, probabilistic algorithm A s.t. A decides L in polynomial time. Since A decides L with neither false negative error nor false positive error, L RP and L co-rp. Thus, L RP co-rp. 2. (ZP P RP co-rp) Suppose language L RP co-rp, probabilistic algorithms B and C s.t. B decides L in polynomial time with false negative error less than 1 3 and C decides L in polynomial time with false positive error less than 1 3. Construct a new probabilistic algorithm D as follow: (a) x {0, 1} n, if B(x) = 0, then output 0. If not, go to 2. (b) If C(x) = 1, then output 1. Otherwise, output 0. To check the correctness of algorithm D, if x L, B has some probability fails to recognize it. However, in the second step, C will successfully recognize x. If x / L, B will successfully recognize x. Also, while B and C are both probabilistic polynomial time algorithm, D is a probabilistic polynomial time algorithm that correctly decides L. Thus, L ZPP. Problem 4. (Polynomial Identity Testing for integer circuits) (1) Show that if N is a nonzero integer and M R {1,..., log 2 N}, then P r[n 0(modM)] = Ω(1/ log log N) (2) Show that Arithmetic Circuit Identity Testing over Z is in co-rp. (1) The idea to show this lower bound is simple: show that there must be a large amount of prime numbers in {1,..., log 2 N} such that they can not divide N by counting argument. Observe that we have the following facts: 3

Number of primes in {1,..., log 2 N} = Θ( log2 N log log 2 N ) = Θ( log2 N 2 log log N ). Number of prime divisors of N = O(log N) = o( log2 N 2 log log N ). As the order of the number of primes in {1,..., log 2 N} is asymptotically greater than the number of prime divisors of N, we can see that there must be a large portion of primes in {1,..., log 2 N}, say half of them. As a result, as N becomes large enough, we have at least Θ( log2 N 4 log log N ) numbers in {1,..., log2 N} that cannot divide N. This completes the lower bound: P r[n 0(mod M)] = Ω(1/ log log N), where M R {1,..., log 2 N}. (2) The main difficulty here is that the arithmetic circuit is over Z, which means that as there are polynomially many operations, the value of the output might becomes exponentially large and takes exponential time to compute. To be clear, a single arithmetic operation in arithmetic circuit takes O(log A) time, where A is the largest number in the whole evaluation. Moreover, if the circuit size is m = poly(n), where n is the input size, the output might be as large as n 2m. As a result, we may want to modulo the result of each operation in order to bound single operation time. However, after using modulo to save time, we can see that some nonzero results might be detected as a zero after modulation once the divisor we chose is not good enough. As a result, we also need to show that this false alarm probability can be controlled. Consider the following scenario: There are n input and the size of circuit is m = poly(n), thus the maximum degree of the function is less than 2 m. Randomly choose each input from {1,..., 3 2 m }, which consumes O(nm) random bits. By Schwartz-Zippel lemma the probability of false alarm is less than 2m 3 2 m = 1 3. The largest value of output might be N = O((3 2 m ) 2m ). To make sure the value in the whole evaluation process is small, we do modulation after every operation. The divisor is randomly chosen from {1,..., log 2 N}. We can compute the probability of false alarm by the result in part (1), which shows that it is less than 1 O(1 log log N ) = O(1 1 m log m ) = 1 O(e m log m ). If we do the whole process m 2 times, the false alarm probability will be upper bounded by O(e m log m ), which is negligible in n. To sum up, we can see that all of the steps in the above process take polynomial time, which means that is is indeed a probabilistic polynomial time algorithm. Also, by Schwartz-Zippel lemma and the argument in the last two steps, we can upper bound the false alarm probability. As miss detection cannot happen, we reach a co-rp algorithm. Thus, Arithmetic Circuit Identity Testing over Z is in co-rp. 4

Problem 5. (Polynomial Identity Testing via Modular Reduction) (1) Let f(x) be a univariate polynomial of degree D over a field F. Prove that there are constants c, c such that if f(x) is nonzero and g(x) is a randomly selected polynomial with degree at most d = c log D, then the probability that f(x) mod g(x) is nonzero is at least 1/c log D. Deduce a randomized polynomial-time identity testing for univariate polynomial in the above form. (2) Obtain a randomized polynomial-time identity test for multivariate polynomial by giving a (deterministic) reduction to the univariate case. (1) Assume the size of field F is p, then we know that The number of irreducible factors for f(x) with degree d is D d. The number of irreducible polynomials with degree at most d is at least pd+1 2d. The number of polynomials with degree at most d is p d d i=1 pi p d+1. Thus, we can infer that The probability for g(x) to have degree d is 1 p. The probability for g(x) to be irreducible given g(x) has degree d is at least 1 2pd. The probability for g(x) to be factor of f(x) given g(x) has degree d is at most 1 d. Finally, we have P[f(x) 0(mod g(x))] P[f(x) 0(mod g(x)), deg(g) = d, g is irreducible] = P[deg(g) = d] P[g is irreducible deg(g) = d] P[f(x) 0(mod g(x)) deg(g) = d, g is irreducible] 1 p 1 2pd (1 1 d ) = Ω(1 d ) 1 = Ω( log D ) That is, P[f(x) 0(mod g(x))] = 1 c log D for some constant c. To achieve a randomized identity testing with false alarm error less than ɛ, we can run the above process k = O(log D log 1 ɛ ) times. Note that each round we use O(log p log D) random bits. Thus, the total randomness required to achieve ɛ error is O(log p log 2 D log 1 ɛ ). (2) Before stating our reduction, let s first have some observation about multivariate polynomial. A multivariate polynomial f(x 1,..., x k ) with k variables can be written as a polynomial in one of its variable x i. Suppose the largest degree of x i in f is d i, then we have d i f(x 1,..., x k ) = C il (x 1,..., x i 1, x i+1,..., x k )x l i l=0 5

Note that C il is also a polynomial. If there s a coefficient of f is nonzero, then f must be nonzero. With these two observations, our goal now is to present a reduction from multivariate polynomial f to a univariate polynomial g such that f is nonzero iff g is nonzero. The difficulty here is that the domain of f is much larger than the domain of g, so there might be the case where f is nonzero but g is zero. As a result, we will utilize the second observation to mapped nonzero terms in f to coefficient of g uniquely so that the nonzeroness will still hold. g 0 (x 1,..., x k ) = f(x 1,..., x k ) g 1 (y, x 2,..., x k ) = g 0 (y, y e 1, x 2,..., x k ) g 2 (y, x 3,..., x k ) = g 1 (y, y e 2, x 3,..., x k ). g k (y) = g k 1 (y, y e k ) That is, we replace the assignment of each variable x i with y e i for some e i. Clearly that, for any assignment e 1,..., e k, the zeroness will pass down from g 0 to g k. Thus, our goal here is to find a certain assignment e 1,..., e k such that the nonzeroness can also pass down from g 0 to g k. This can be done with induction. First, assume g i (y, x i+1,..., x k ) is nonzero for some 0 i < k, we have d i+1 g i+1 (y, x i+1,..., x k ) = C l (y, x i+2,..., x k )x l i+1 l=0 = g i (y, y e i, x i+1,..., x k ) d i = C il (y, x i+1,..., x k )y e il l=0 Now, since we assume g i (y, x i+1,..., x k ) is nonzero, we can take the largest l such that C il (y, x i+1,..., x k ) is nonzero. If l = 0, then we have g i+1 (y, x i+1,..., x k ) is also nonzero. If l 0, then we have a nonzero coefficient for y e il. As 0 < l d i, if we deliberately let the possible exponent of each x i be disjoint, then we can make sure the nonzeroness will be propagated from g i to g i+1, and thus if g 0 = f is nonzero, then g k is also nonzero. We have a reduction from multivariate polynomial to univariate polynomial for a polynomial identity testing. Explicit construction for the reduction Take e 1 = 1 and e i = i 1 j=1 (d j + 1) for i = 1,..., k, where d i is the largest degree of x i in f. We can verify that for any i = 1,..., k, e i d i < e i+1 = e i (d i + 1). Thus, the above reduction is working. 6

Problem 6. (Primality Testing) (1) Show that for every positive integer n, the polynomial identity (x + 1) n x n + 1 (mod n) holds iff n is prime. (2) Obtain a co-rp algorithm for the language Primality Testing = {n : n is prime} using part 1 together with Problem 2.5. (1) ( ) By Fermat s little law, we have (x + 1) n (x + 1) (mod n) when n is a prime. Also x x n (mod n) when n is a prime. Combine them together we have (x + 1) n x n + 1 (mod n) if n is a prime. ( ) Let P n (x) = (x + 1) n (x n + 1) = (x + 1) n x n. Note that P n (x) = n 1 ( n ) i=1 i x i. Assume P n (x) 0 (mod n). If n is a composite, consider p to be one of n s prime factor and p a is the largest power of p that divides n. Now, observe the pth coefficient of P n (x). As ( ) n p = n (n p+1) p! cannot be divided by p a, clearly that ( n p) 0 (mod n). Thus, we know that P n (x) is not an identity polynomial in Z n and there exists x Z n such that (x + 1) n x n + 1 (mod n). (2) The following is a co-rp algorithm for Primality Testing. Algorithm 1: Primality Testing Input: n Z + Output: If n is prime, output Yes; Otherwise, No. 1 if n is divided by small prime then 2 output No 3 Let P n (x) = (x + 1) n x n ; 4 Randomly pick a polynomial g(x) in Z n with degree less than log n ; 5 if P n (x) is divided by g(x) then 6 output Yes 7 else 8 output No We show the correctness of the algorithm in two steps. (Completeness) If n is a prime, then P n (x) is identically zero. Thus, every polynomial g(x) can divide P n (x) and thus the algorithm will output Yes. (Soundness) If n is a composite, we claim that there s non-negligible probability for the algorithm to output No. Thus, we can repeating the algorithm to decrease the false alarm error and achieve a co-rp algorithm. To show that our claim for the soundness of the algorithm is correct, we show the following two propositions: Suppose n is a composite with a prime factor p, then (a) P n (x) is nonzero in Z n. Moreover, P n (x) is nonzero in Z p. 7

(b) For a polynomial g(x). If g(x) divides P n (x) in Z, then g(x) also divides P n (x) in Z p. (a) is obviously true as we know that if P n (x) is zero in Z p, then P n (x) is also zero in Z n. As to (b), the same reasoning holds. With these two propositions, we can now think of as doing polynomial identity testing via modulo reduction in Z p as by (b) the correct probability in Z n is no less than that in Z p. Finally, from Problem 2.5 we know that the probability of g(x) not dividing P n (x) is at least 1 c log n. Thus, after repeating the algorithm for k = O(log n log 1 ɛ ) times, we can achieve a co-rp algorithm with false alarm probability less than ɛ. Problem 7. (Chernoff Bound) and X = t i=1 X i. Let X 1,..., X t be independent [0, 1]-valued random variables, (1) Show that for every r [0, 1/2], E[e rx ] e re[x]+r2t. (2) Deduce the Chernoff Bound of Theorem 2.21: Pr[X E[X]+ɛt] e ɛ2 t/4 and Pr[X E[X] ɛt] e ɛ2 t/4. (3) Where did you use the independence of the X i s? (1) Consider X i E[e rx i ] = e rx i df Xi (x i ) x i 1 + rx i + r 2 x 2 i df Xi (x i ) x i 1 + re[x i ] + r 2 e re[x i]+r 2 Combine all together, E[e rx ] = t E[e rx i ] i=1 = e re[x]+r2 t (2) First, observe the moment generating function of X. E[e sx ] = t 0 e sx f(x)dx t a t i=1 e re[x i]+r 2 P [X a] E[esX ] e sa, where f is the pdf of X. Now take a = E[X] + ɛt, we get e sx f(x)dx e sa P [X a] P [X E[X] + ɛt] E[esX ] e s(e[x]+ɛt) 8

Take s = ɛ 2, by Item 1, we get On the other direction, P [X E[X] + ɛt] e ɛ 2 E[X]+ ɛ 2 4 t e ɛ 2 (E[X]+ɛt) = e ɛ 2 ( ɛt 2 ɛt) = e ɛ2 t 4 (1) E[e sx ] = t 0 e sx f(x)dx a P [X a] E[e sx ] e sa Take a = E[X] ɛt and s = ɛ 2, by Item 1, we get P [X E[X] ɛt] E[e ɛ 2 X ] e ɛ 2 0 e sx f(x)dx e sa P [X a] ɛ e (E[X] ɛt) e ɛ 2 2 E[X] ɛ2 4 t ɛ 2 e 4 (2) (E[X] ɛt) (3) In Item 1, I use the independence of X i s to divide E[e rx ] into i=1 te[erx i ]. Give an upper bound for each E[e rx i ] respectively, then integrate and get the final upper bound for E[e rx ]. Problem 8. Necessity of Randomness for Identity Testing Problem 9. Spectral Graph Theory (1) All eigenvalues of M have absolute value a most 1. (2) G is connected 1 is an eigenvalue of multiplicity at least 2. (3) Suppose G is connected. Then G is bipartite -1 is an eigenvalue of M. (4) G is connected all eigenvalues of M other than λ 1 are at most 1 1/poly(n, d). (5) G connected and bipartite all eigenvalues of M other that λ 1 have absolute value at most 1 1/poly(n, d) and thus Γ(G) 1/poly(n, d). (1) Let x be its eigenvector, and assume the ith entry of x has the largest absolute value. Consider the ith row of Mx, denote the ith row of M as M i, we have (Mx) i = M i x = = x i n M ij x j j=1 n M ij x j x i j=1 n M ij As a result, we can see that absolute value of the eigenvalue of M can not exceed 1. (2) Here, we show the two directions: j=1 9

( ) Suppose G is disconnected, then M can be written as ( ) M1 0 M = 0 M 2, where M 1 and M 2 are two disjoint vertices set. Suppose M 1 is n 1 n 1 and M 2 is n 2 n 2, we have two linearly independent eigenvectors with eigenvalue 1., where v 1 has n 1 1 and v 2 has n 2 1. v 1 = (1, 1,, 1, 0,, 0) T v 2 = (0, 0,, 0, 1,, 1) T ( ) Observe that we can represent an eigenvalue in another way. λ = xt Mx x T x = i,j M ijx i x j = i,j M ij 1 2 [x2 i + x2 j (x i x j ) 2 ] (a) = 1 1 2 (i,j) E 2(x i x j ) 2 = 1 i,j M ij(x i x j ) 2 = 1 1 2 (i,j) E (x i x j ) 2 The 2 factor in (a) is because we are using undirected graph, each edge will appear in the summations two times. Now, suppose 1 is an eigenvalue of multiplicity more than 2, then there exist an eigenvector x that are orthogonal to (1, 1,, 1) T and has eigenvalue 1, which means that i x i = 0. Consider the above representation, to have eigenvalue 1, x must satisfy (x i x j ) 2 = 0 (i,j) E Since i x i = 0 and x cannot be zero vector, we know that x has both positive and negative entries. However, the above constraint told us that once there an edge between two vertices, their corresponding value in x must be the same. From these two messages, we can infer that there must be at least two disjoint vertices sets in G which can be found by categorizing the vertices w.r.t. the sign of the corresponding x value. (3) Here, we show the two directions: ( ) Suppose G is bipartite, then M can be written as ( 0 ) M1 M 2 0, where M 1 and M 2 are of size n 2 n 2. (Note that here n must be even) Immediately, we have an eigenvector with eigenvalue -1 as follow, where the number of 1 and -1 are n 2. v = (1, 1,, 1, 1, 1) T 10

( ) Observe that an eigenvalue can be written into another representation as follow. λ = xt Mx x T x = i,j M ijx i x j = i,j M ij 1 2 [(x i + x j ) 2 x 2 i x2 j ] = 1 + (i,j) E (x i + x j ) 2 = 1 + 1 2 i,j M ij(x i + x j ) 2 Suppose there is an eigenvalue with value -1, then according to the above new representation, the corresponding eigenvector, say x, will satisfy (x i + x j ) 2 = 0 (i,j) E Namely, when there s an edge between two vertices, their corresponding value in x must be both 0 or having the opposite signs. However, there must be some entries of x not being 0 since x is a non-zero vector. Thus, we can start from a non-zero entry and observe that all of its neighbors have the opposite sign to it. Moreover, as we assume G is connected, every vertex will have non-zero value. Finally, once we categorize the vertices with their signs, we can see that those who have the same sign cannot connect to each other, which infers that G is a bipartite graph. (4) Note that for eigenvalues other than λ, their corresponding unit eigenvectors x 2,..., x n should satisfy j x ij = 0 and j x ij 2 = 1. Consider arbitrary x i, we can immediately see that there must be an entry of x i has absolute value greater than 1/ n, say x ik1. And another entry has an opposite sign, say x ik2. That is, their difference is greater than 1/ n: x ik1 x ik2 1/ n. Since we know G is connected, there must be a path from x ik1 to x ik2 whose length is no greater than n. As a result, there must be an edge in this path that have two vertices difference greater than 1/ n n by the pigeonhole principle. As we can write λ 2 = 1 1 d (i,j) E(G) We have λ 2 1 1 d ( 1/ n n )2 = 1 1/poly(n, d). (x i x j ) 2 (5) First, let s recall a basic fact in graph theory. If a graph with transition matrix M is connected, then the graph with transition matrix M 2 is connected iff M is nonbipartite. From this basic fact and part (4) in this problem, we can infer that the second largest absolute eigenvalue of M 2 is at most 1 1poly(n, d). That is, λ n 1 1/poly(n, d). (6) From our proof in part (4), we can see that we use the maximal length of path in the graph to lower bound the difference of two vertices. Now, assume the diameter of the graph is D, then we can sharpen the bound to 1 1/Ω(d n D 2 ). To further improve the bound, we can apply Cauchy-Schwartz. Consider the path we mentioned in (4). Denote the corresponding 11

vertices as x 1, x 2,..., x D+1. Let y i = x i+1 x i for i = 1,..., D denote the difference of two consecutive vertices. Now, we have one constraint: D i=1 y i 1 n. Apply Cauchy-Schwartz, D D D ( yi 2 ) ( )1 2 ( y i ) 2 1/n i=1 i=1 We have, D i=1 y2 i 1/(n D). Go back to the definition of the second largest eigenvalue, we have max{ λ 2, λ n } 1 1/Ω(d n D). Namely, Γ(G) Ω(d n D). Problem 10. Hitting Time and Eigenvalues for Directed Graph (1) Show that for every n there is a digraph G with n vertices, outdegree 2, and hit(g) = 2 Ω(n). (2) Let G be a regular digraph with random-walk matrix M. Show that λ(g) = λ(g ), where G is the undirected graph whose random-walk matrix is MM T. (1) For every n, construct the digraph G n as follow: V (G n ) = {1, 2,..., n}. E(G n ) = ( n 1 i=1 (i, i + 1)) ( n i=1 (i, 1)). That is, every vertex i has one edge connecting to the next vertex i + 1 (except vertex n) and another edge connecting to the first vertex 1. For each vertex with outdegree 2, the probability for them to moving forward and returning back to the first vertex is both 1 2. Now, we want to find an exponential lower bound for hit time of G n. Instead of doing so directly, we can upper bound the probability of going from one vertex to another within 2 Ω(n) steps. Concretely, we will upper bound the probability of going from vertex 1 to vertex n within 2 n 3 steps. Assume n > 3. i=1 P [going from vertex 1 to vertex n within 2 n 3 steps] = = = 2 n 3 k=n 1 2 n 3 k=n 1 2 n 3 k=n 1 2 n 3 k=n 1 P [going from vertex 1 to vertex n with exactly k steps] P [goint to vertex 1 after k n + 1 steps and go to vertex n afterward] P [goint to vertex 1 after k n + 1 steps] P [go to vertex n from vertex 1 in n 1 steps] P [go to vertex n from vertex 1 in n 1 steps] = 2 n 1 2 n 3 = 1 4 As a result, hit(g n ) 2 n 3 and thus hit(g n ) = 2 Ω(n). 2 n 2 k=n 1 2 n 1 12

(2) From Definition 2.50, we know that λ(g) = λ(g ) = xm max i x i=0 x ymm T max i y i=0 y xmm T x T = max i x i=0 xx T ymm T MM T y T = max i y i=0 yy T Note that MM T is a positive semidefinite matrix, namely, we can decompose it into MM T = UΣU T, where U is an unitary matrix and Σ is a diagonal matrix. As we restrict x = y = 1, let ˆx = arg max x =1, i x i=0 xmmt x T = arg max x =1, xuσu T x T i x i=0 ŷ = arg max y =1, i y i=0 ymmt MM T y T = arg max y =1, i y i=0 yuσ2 U T y T Since MM T and MM T MM T are both positive semidefinite matrices, the maximizers ˆx and ŷ are eigenvectors of them respectively. Consider Thus, we have λ(g) = λ(g ). ˆxMM T MM T ˆx = λ(g)ˆxmm T ˆx = λ 2 (G) λ(g ) ŷmm T ŷ = λ(g ) λ(g) Problem 11. Consequences of Derandomizing prbpp (1) Suppose there s a PPT algorithm A for approximating function f : {0, 1} N with multiplicative error ɛ : N R 0 such that P r[a(x) f(x) (1 + ɛ( x ))A(x)] for all x. Show that if prbpp = prp, there is a deterministic polynomial time algorithm B such that B(x) f(x) (1 + ɛ( x ))B(x) for all x. (1) We show this with three steps: (a) Reduce a BPP problem Π prbp P to the PPT algorithm A. (b) As we assume prbpp = prp, we have a deterministic version polynomial time decision problem Π prp. (c) Using binary search to construct the desired deterministic polynomial time algorithm B. The problem Π BP P is actually quite simple, the inputs are (f, x, N). And the yes and no instances are defined as below: Π prbp P Y = {f(x) N} Π prbp P N = {f(x) < N} 13

Similarly, the problem Π prp is also has inputs (f, x, N) and the yes instance Π prp Y = {f(x) N} and the no instance Π prp N = {f(x) < N}. With ΠprP, it s clearly that we can construct a polynomial time deterministic algorithm B such that B(x) f(x) (1 + ɛ( x ))B(x) for all x. As a result, here we only need to argue about the reduction in step (a). And we show this simply by the following algorithm: On inputs (f, x, N). Run A(x) in polynomial time. If A(x) N, output Yes. If A(x) N/(1 + ɛ( x )), output No. If N/(1 + ɛ( x )) < A(x) < N, output Yes and No with probability 1/2 respectively. Now, we check the completeness and soundness of this prbpp algorithm. (Completeness) If (f, x, N) Π prbp P Y, then f(x) N. Consider (Soundness) P [C(f, x, N) = P [A(x) N]] + 1 P [N > A(x) > N/(1 + ɛ)] 2 1 2 P [A(x) N/(1 + ɛ)] 1 2 2 3 14