U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 3 Luca Trevisan August 31, 2017

Similar documents
U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 2 Luca Trevisan August 29, 2017

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

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan 1/29/2002. Notes for Lecture 3

U.C. Berkeley Better-than-Worst-Case Analysis Handout 3 Luca Trevisan May 24, 2018

1 Computational Problems

Notes for Lecture 15

Notes for Lecture Notes 2

Notes on Space-Bounded Complexity

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan August 30, Notes for Lecture 1

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan 9/6/2004. Notes for Lecture 3

Notes on Space-Bounded Complexity

CMPUT 675: Approximation Algorithms Fall 2014

Random Variable. Pr(X = a) = Pr(s)

Randomized Algorithms

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

CS 350 Algorithms and Complexity

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

Notes for Lecture 14 v0.9

Lecture 5: The Principle of Deferred Decisions. Chernoff Bounds

Lecture 4. 1 Estimating the number of connected components and minimum spanning tree

Lecture 2: From Classical to Quantum Model of Computation

K-center Hardness and Max-Coverage (Greedy)

Theorem 1.7 [Bayes' Law]: Assume that,,, are mutually disjoint events in the sample space s.t.. Then Pr( )

CS 350 Algorithms and Complexity

Lecture 20: LP Relaxation and Approximation Algorithms. 1 Introduction. 2 Vertex Cover problem. CSCI-B609: A Theorist s Toolkit, Fall 2016 Nov 8

CS294: Pseudorandomness and Combinatorial Constructions September 13, Notes for Lecture 5

CS155: Probability and Computing: Randomized Algorithms and Probabilistic Analysis

CS6840: Advanced Complexity Theory Mar 29, Lecturer: Jayalal Sarma M.N. Scribe: Dinesh K.

Notes for Lecture 3... x 4

Notes for Lecture 27

Lecture Examples of problems which have randomized algorithms

NATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: Time Allowed 2 Hours

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

Lecture 20: PSPACE. November 15, 2016 CS 1010 Theory of Computation

Notes for Lecture 25

CPSC 320 Sample Final Examination December 2013

Sublinear-Time Algorithms

Balanced Allocation Through Random Walk

Randomized Complexity Classes; RP

Chapter 1: Introduction to Probability Theory

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

Sublinear Algorithms Lecture 3. Sofya Raskhodnikova Penn State University

Lecture 5: Loop Invariants and Insertion-sort

Lecture 27: Theory of Computation. Marvin Zhang 08/08/2016

More Approximation Algorithms

Lecture 5. Shearer s Lemma

20.1 2SAT. CS125 Lecture 20 Fall 2016

Notes for Lecture 14

Lower Bounds for Testing Bipartiteness in Dense Graphs

11.1 Set Cover ILP formulation of set cover Deterministic rounding

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

CS483 Design and Analysis of Algorithms

UC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 22 Lecturer: David Wagner April 24, Notes 22 for CS 170

Overview. 1 Introduction. 2 Preliminary Background. 3 Unique Game. 4 Unique Games Conjecture. 5 Inapproximability Results. 6 Unique Game Algorithms

Lecture Learning infinite hypothesis class via VC-dimension and Rademacher complexity;

Notes for Lecture 21

Lecture 4: NP and computational intractability

Solutions. Problem 1: Suppose a polynomial in n of degree d has the form

Lecture 4: LMN Learning (Part 2)

Lecture notes on OPP algorithms [Preliminary Draft]

Algorithms and Theory of Computation. Lecture 2: Big-O Notation Graph Algorithms

Umans Complexity Theory Lectures

Math 391: Midterm 1.0 Spring 2016

Algorithms Reading Group Notes: Provable Bounds for Learning Deep Representations

Notes for Lecture 2. Statement of the PCP Theorem and Constraint Satisfaction

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015

CS261: Problem Set #3

Notes on Zero Knowledge

The expansion of random regular graphs

Independence numbers of locally sparse graphs and a Ramsey type problem

Lecture 59 : Instance Compression and Succinct PCP s for NP

Coloring Simple Hypergraphs

1 Adjacency matrix and eigenvalues

Lecture 22: Oct 29, Interactive proof for graph non-isomorphism

Lecture 5 Polynomial Identity Testing

Handout 7. and Pr [M(x) = χ L (x) M(x) =? ] = 1.

Lecture 11: Non-Interactive Zero-Knowledge II. 1 Non-Interactive Zero-Knowledge in the Hidden-Bits Model for the Graph Hamiltonian problem

CS Communication Complexity: Applications and New Directions

PCPs and Inapproximability Gap-producing and Gap-Preserving Reductions. My T. Thai

FIRST ORDER SENTENCES ON G(n, p), ZERO-ONE LAWS, ALMOST SURE AND COMPLETE THEORIES ON SPARSE RANDOM GRAPHS

Coloring Simple Hypergraphs

Approximation algorithm for Max Cut with unit weights

9. Submodular function optimization

College of Computer & Information Science Fall 2009 Northeastern University 22 September 2009

Lecture 3: AC 0, the switching lemma

IITM-CS6845: Theory Toolkit February 3, 2012

P, NP, NP-Complete, and NPhard

Testing Graph Isomorphism

Notes on Discrete Probability

Coupling. 2/3/2010 and 2/5/2010

CSE 312 Final Review: Section AA

Aditya Bhaskara CS 5968/6968, Lecture 1: Introduction and Review 12 January 2016

Minimax risk bounds for linear threshold functions

Efficient Approximation for Restricted Biclique Cover Problems

Dynamic Programming on Trees. Example: Independent Set on T = (V, E) rooted at r V.

Dominating Set. Chapter 7

Notes for Lecture 7. 1 Increasing the Stretch of Pseudorandom Generators

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar

CSE 548: Analysis of Algorithms. Lectures 18, 19, 20 & 21 ( Randomized Algorithms & High Probability Bounds )

Lecture 5: Probabilistic tools and Applications II

Transcription:

U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 3 Luca Trevisan August 3, 207 Scribed by Keyhan Vakil Lecture 3 In which we complete the study of Independent Set and Max Cut in G n,p random graphs. Maximum Independent Set ( ) Last time we proved an upper bound of O p log np to the probable value of the maximum independent set in a G n,p random graph. This bound also holds if p is a function of n. There is a simple greedy algorithm which can be shown to achieve an independent set of size Ω(n/d) where d is the average degree of the graph. For a G n,p random graph, this gives us an independent of size Ω(/p). However we will see how to specialize this analysis to sparse G n,p random graphs, and close the remaining gap between the probable value and the greedy algorithm. Consider the greedy algorithm below. S := for each v V if v has no neighbors in S then S := S {v} return S. First attempt We might try to model our analysis of this algorithm based on our discussion from Lecture 2. To wit, let R be the set of vertices not in S which have no neighbors in S. Let R i be the size of R when S contains i vertices. If R k = 0, then our algorithm outputs an independent set of size k. Therefore we can determine the expected size of the algorithm s output (up to a constant factor) by determining k such that E[R k ] = O(). Now we determine E[R i+ R i ]. A proportion of p vertices are connected to the (i + )th vertex in expectation. Of the R i vertices, we expect that p of them will remain unconnected to all the vertices in S. This gives us that E[R i+ R i ] = ( p)r i, and by induction E[R k ] = ( p) k n.

Let k be such that E[R k ] =. Then: E[R k ] = ( p) k n = = k = log n p p ln n We conclude that our independent set has expected size Θ( p log n). However if we take p = Θ(/n), that would lead us to believe that we could get an independent set of size Θ(n log n) in a graph with only n vertices, which is impossible. The error is that E[R i+ R i ] should be ( p)(r i ), not ( p)r i. Note that once we add the (i + )th vertex to S, it can no longer be in R by definition. When p is a constant, the difference is negligible, but when p is small then the difference becomes more significant. It is possible to salvage this analysis, but the result is less elegant. Instead we will now present a different analysis, which will also let us conclude more about higher moments as well..2 Analysis of the greedy algorithm To analyze the algorithm, consider the following random variables: let t i be the number of for-loop iterations between the time the i-th element is added to S and the time the (i + )-th element is added to S. We leave t i undefined if the algorithm terminates with a set S of size less than i +. Thus the size of the independent set found by the algorithm is the largest i such that t i is defined. Consider the following slightly different probabilistic process: in addition to our graph over n vertices {,..., n}, we also consider a countably infinite number of other vertices n +, n + 2,.... We sample an infinite super-graph of our graph over this larger vertex set, so that each possible edge has probability p of being generated. We continue to run the greedy algorithm for every vertex of this infinite graph, and we call t i the (now, always defined) number of for-loop iterations between the i-th and the (i+)-th time that we add a node to S. In this revised definition, the size of the independent set found by algorithm in our actual graph is the largest k such that t 0 + t + + t k n. Now we will reason about the distribution of t i. Say that we have i vertices in S and we are trying to determine if we should add some vertex v to S. Note that the probability of v being disconnected from all of S is ( p) i. So we add a vertex at each iteration with probability ( p) i, which shows that t i is geometrically distributed with success probability ( p) i. Based on this, we can find the expected value and variance of our sum from before E [t 0 + t + t k ] = ( p) k p ( p) k p = p ( p) k 2

and likewise Var[t 0 + t + t k ] = k i=0 ( p) 2i ( p) 2k ( p) 2 ( ( p) 2 ) ( p) 2k 2 p ( p) 2k 2 = p (E[t 0 + + t k ]) 2. We want to choose k so that the sum is at most n with high probability. Let k = log p pn 2 ln pn. p This makes the expected value of the sum n/2 and the standard deviation pn/2. Thus, if p(n) 0 sufficiently fast, the greedy algorithm has a o() probability of finding an independent set of size Ω(p log pn) = Ω ( n d log d), where d := np is a measure of the average degree..3 Certifiable upper bound We now derive a polynomial time computable upper bound certificate for maximum independent set in G n,p. We use the following lemma without proof. Note its similarity to Lemma 2 from Lecture. Lemma If p = p(n) log n n, G is sampled from G n,p, A is the adjacency matrix of G, and J is the matrix of all ones, then there is a o() probability that A pj O( pn) Since A pj is a real symmetric matrix its spectral norm can be computed as: A pj = max x 0 x T (A pj)x x T x. If S is an independent set of size k, then T S A S = 0, T S J S = k 2, and T S S = k, so that A pj T S (A pj) S T S S = pk. 3

This bound holds for any independent set, so it also holds for the largest one. If we denote by α(g) the size of the largest independent set in G, we have that α(g) A pj. p For a G n,p random graph, the above upper bound is O( n/p) = O(n/ d) with high probability. 2 Max Cut We will now reconsider Max Cut for the general case G n,p. In Lecture 2, we dealt with the special case of p = 2. Unlike maximum independent set, our arguments for the case p = 2 apply to Max Cut without much modification. 2. High probability upper bound Let G be a random graph from G n,p, and define d := pn as a measure of its average degree. We will prove that the size of a maximum cut of G is at most /4 + O( ) with high probability. The proof of this statement is nearly identical to the version in Lecture 2, where it was presented for the case p = 2. We know that the expected value of a cut S is S V S /4. By a Chernoff bound, the probability that any particular cut exceeds expectation by an additive factor of O(ɛn) is exponentially decreasing by a factor of ɛ 2. By taking ɛ = / d and taking a union bound over all 2 n possible cuts S, we have that our expected cut has value at most /4 + O( ) with probability 2 Ω(n). 2.2 Greedy algorithm Consider the greedy algorithm A := B := for each v V if v has more neighbors in B than in A then A := A {v} else B := B {v} return (A, B). Label V = {,..., n}. Let A i and B i be the sets A and B when vertex i is considered in the for-loop. For the purpose of analysis, we delay the random decisions in G until a vertex is considered. In particular, we delay the choice of which of, 2,..., i is a neighbor until 4

i is vertex i is considered. Note that no edge needs to be considered twice, and so we can treat each one as an independent biased coin flip. Let a i and b i be the neighbors of i in A i and B i respectively. We can show that a i b i = max(a i, b i ) 2 (a i + b i ), and so i a i b i is the gain our algorithm achieves over cutting half the edges. Now a i b i has expectation Ω( pi) and variance O(pi). Adding over all i, the sum of the differences has mean Ω(n pn) and variance O(pn 2 ). This gives us an expected gain of Ω(n pn) = Ω(n d) with o() probability. The value of cutting half the edges is approximately /4. This gives a final value of /4 + Ω(n d) w.h.p. as stated. 2.3 Certifiable upper bound Again, we will derive a certifiable upper bound by looking at the spectral norm. If (S, V S) is a cut with value 4 + C, then we have so T S A V S = 4 + C T S pj V S = p S V S p n2 4 = 4 S V S = n 2 S V S 4 C 2n S V S. This means that, in every graph, the maximum cut is upper bounded by 4 + n 2 A d n J which if d log n is with high probability at most 4 + O(n d) (by Lemma ). 3 Conclusion We conclude with the following table, which summarizes our results for a random graph sampled from G n,d/n. Problem Expected Value Greedy Algorithm Certifiable Upper Bound Independent Set O ( n d log d) Ω ( ) n d log d) w.h.p. O w.h.p.* Max Cut ( n d 4 + O(n d) 4 + Ω(n d) w.h.p. 4 + O(n d) w.h.p.* * Note that both certifiable upper bounds require d log n. Both greedy algorithms perform very well in comparison to the probable value. In Max Cut, our greedy algorithm is particularly strong, matching our certifiable upper bound up to a 5

lower order term. This supports one of our major theses: while greedy algorithms exhibit poor worst-case performance, they tend to do well over our given distribution. 6