CHAPTER SIX T HE P ROBABILISTIC M ETHOD M1 Zhang Cong 2011/Nov/28.

Slides:



Advertisements
Similar presentations
Approximation Algorithms Chapter 14: Rounding Applied to Set Cover.
Advertisements

Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
Lecture 22: April 18 Probabilistic Method. Why Randomness? Probabilistic method: Proving the existence of an object satisfying certain properties without.
NP-Completeness: Reductions
NP and NP Complete. Definitions A problem is in the class P if there is a polynomial time solution to the problem A problem is in the class NP if there.
The Probabilistic Method Shmuel Wimer Engineering Faculty Bar-Ilan University.
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
NP-Complete Problems Problems in Computer Science are classified into
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Clique Cover Cook’s Theorem 3SAT and Independent Set
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Lecture 22 More NPC problems
NP-complete Problems SAT 3SAT Independent Set Hamiltonian Cycle
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Techniques for Proving NP-Completeness Show that a special case of the problem you are interested in is NP- complete. For example: The problem of finding.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Introduction to Graph Theory
CSC 413/513: Intro to Algorithms
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
Theory of Computational Complexity Probability and Computing Ryosuke Sasanuma Iwama and Ito lab M1.
Trees.
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
More NP-Complete and NP-hard Problems
Chapter 10 NP-Complete Problems.
Richard Anderson Lecture 26 NP-Completeness
Advanced Algorithms Analysis and Design
More NP-complete Problems
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
Richard Anderson Lecture 26 NP-Completeness
Hard Problems Introduction to NP
NP-Completeness (36.4-5) P: yes and no in pt NP: yes in pt NPH  NPC
Intro to Theory of Computation
Computability and Complexity
CS154, Lecture 16: More NP-Complete Problems; PCPs
ICS 353: Design and Analysis of Algorithms
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
The Art Gallery Problem
More NP-complete Problems
Depth Estimation via Sampling
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 NP-Completeness
NP-Complete Problems.
Richard Anderson Lecture 26 NP-Completeness
CSE 6408 Advanced Algorithms.
The Theory of NP-Completeness
CS154, Lecture 16: More NP-Complete Problems; PCPs
Switching Lemmas and Proof Complexity
Instructor: Aaron Roth
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
CHAPTER 7 Time complexity
Locality In Distributed Graph Algorithms
Presentation transcript:

CHAPTER SIX T HE P ROBABILISTIC M ETHOD M1 Zhang Cong 2011/Nov/28

6.1. T HE B ASIC C OUNTING A RGUMENT S : probability space K n : a complete graph on n vertices K k : a complete subgraph of K n with k vertices Theorem 6.1: If < 1, then it is possible to color the edges of K n with two colors so that it has no monochromatic K k subgraph. Proof: Define a sample space consisting of all possible colorings of the edges of K n using two colors. There are 2 possible colorings, and the

probability of choosing each coloring in our probability space is 2 -. let A i be the event that clique i is monochromatic. Once the first edge in clique i is colored, the remaining - 1 edges must all be given the same color. Pr( A i )= By using a union bound we can get Pr ≤ Pr( A i ) = < 1. Hence, Pr =1-Pr > 0. ■

Consider whether the edges of K 1000 can be 2-colored in such a way that there is no monochromatic K 20. To simplify the calculations, let n ≤ 2 k/2 and k ≥ ≤ 2 - (k ( k -1) /2 )+1 ≤ < 1. Since n=1000 ≤ 2 10 =2 k/2, by Theorem 6.1 there exists a 2-coloring of the edges of K 1000 with no monochromatic K 20.

6.2. T HE E XPECTATION A RGUMENT Lemma 6.2: Suppose we have a probability space S and a random variable X defined on S such that E[X] = μ. Then Pr(X ≥ μ) > 0 and Pr(X ≤ μ) > 0. Proof: We have μ = E [ X ] = x Pr( X = x ). If Pr( X ≥ μ ) =0, then μ = x Pr( X = x ) = x Pr( X = x ) < μ Pr( X = x ) = μ, giving a contradiction. Similarly, if Pr( X ≤ μ ) =0 then

μ = x Pr( X = x ) = x Pr( X = x ) > μ Pr( X = x ) = μ, again yielding a contradiction. ■ Application: Finding a Large Cut We consider the problem of finding a large cut in an undirected graph. All edges in the graph have the same weight 1. The problem of finding a maximum cut is NP-hard. Cut: a partition of the vertices into two disjoint sets. Value of a cut: the weight of all edges crossing from one side of the partition to the other.

Theorem 6.3: Given an undirected graph G with n vertices and m edges, there is a partition of V into two disjoint sets A and B such that at least m/2 edges connect a vertex in A to a vertex in B. That is, there is a cut with value at least m/2. Proof: Let e 1,…, e m be an arbitrary enumeration of the edges of G. For i = 1,..., m, define X i such that 1 if edge i connects A to B, X i = 0 otherwise. The probability that edge e i connects a vertex in A to a vertex in B is 1/2, and thus E [ X i ]=.

Let C ( A, B ) be a random variable denoting the value of the cut corresponding to the sets A and B. Then E [ C ( A, B )] = E X i = E [ X i ] = m =. Since the expectation of the random variable C ( A, B ) is m/2, there exists a partition A and B with at least m/2 edges connecting the set A to the set B. ■ The expectation argument does not give a lower bound on the probability that a random partition has a cut of value at least m/2. To derive such a bound, let p = Pr C ( A, B ) ≥.

and since C ( A, B ) ≤ m, = E [ C ( A, B )] = i Pr( C ( A, B )= i ) + i Pr( C ( A, B )= i ) ≤ (1– p )( –1) + pm. which implies that p ≥ Application: Maximum Satisfiability In a logical formula, a literal is either a Boolean variable or the negation of a Boolean variable. We use to denote the negation of the variable x.

A satisfiability (SAT) problem, or a SAT formula, is a logical expression that is the conjunction (AND) of a set of clauses, where each clause is the disjunction (OR) of literals. In general, determining if a SAT formula has a solution is NP-hard. Theorem 6.4: Given a set of m clauses, let k i be the number of literals in the i th clause for i = 1,…,m. Let k = k i. Then there is a truth assignment that sat- isfies at least (1 – 2 – k i ) ≥ m (1 – 2 – k ) clauses.

a SAT formula: (x 1 ∨ x 2 ∨ x 3 ) ∧ ( x 1 ∨ x 3 ) ∧ (x 1 ∨ x 2 ∨ x 4 ) ∧ (x 4 ∨ x 3 ) ∧ (x 4 ∨ x 1 ) In this case, m=5, k 1 =3, k 2 =2, k 3 =3, k 4 =2, k 5 =2. Let x 1 =1, x 2 =0, x 3 =0, and x 4 =1. It satisfies the SAT formula.

Proof: Assign values independently and uniformly at random to the variables. The probability that the i th clause with k i literals is satisfied is at least (1– 2 – k i ). The expected number of satisfied clauses is therefore at least (1 – 2 – k i ) ≥ m (1 – 2 – k ), and there must be an assignment that satisfies at least that many clauses. ■

6.3. D ERANDOMIZATION U SING C ONDITIONAL E XPECTATIONS Recall that we find a partition of the n vertices into sets A and B by placing each vertex independently and uniformly at random in one of the two sets. This gives a cut with expected value E [ C ( A, B )] ≥ m/2. Now consider placing the vertices deterministically, one at a time, in an arbitrary order v 1, v 2,…, v n. Let x i be the set where v i is placed (so x i is either A or B ). Suppose that we have placed the first k vertices, and consider the expected value of the cut if the remaining vertices are then placed independently and uniformly. We write this quantity as E [ C ( A, B )│ x 1, x 1,…, x k ].

We show inductively how to place the next vertex so that E [ C ( A, B )│ x 1, x 2,…, x k ]≤ E [ C ( A, B )│ x 1, x 2,…, x k+1 ]. It follows that E [ C ( A, B )] ≤ E [ C ( A, B )│ x 1, x 2,…, x n ]. The right-hand side is the value of the cut determined by our placement algorithm, since if x 1, x 2,…, x n are all determined then we have a cut of the graph. Hence our algorithm returns a cut whose value is at least E [ C ( A, B )] ≥ m/2. The base case in the induction is E [ C ( A, B )│ x 1 ]= E [ C ( A, B )]. We now prove the inductive step, that E [ C ( A, B )│ x 1, x 2,…, x k ]≤ E [ C ( A, B )│ x 1, x 2,…, x k+1 ].

Consider placing v k+1 randomly, and let Y k+1 be a random variable representing the set where it is placed. Then E [ C ( A, B )│ x 1, x 2,…, x k ]= E [ C ( A, B )│ x 1, x 2,…, x k,Y k+1 = A ] E [ C ( A, B )│ x 1, x 2,…, x k,Y k+1 = B ]. Since max( E [ C ( A, B )│ x 1, x 2,…, x k,Y k+1 = A ], E [ C ( A, B )│ x 1, x 2,…, x k,Y k+1 = B ]) ≥ E [ C ( A, B )│ x 1, x 2,…, x k ], we only need to compare E [ C ( A, B )│ x 1, x 2,…, x k,Y k+1 = A ] and E [ C ( A, B )│ x 1, x 2,…, x k,Y k+1 = B ] and put v k+1 in the set with big expectation. Once we do this, we will have a placement satisfying E [ C ( A, B )│ x 1, x 2,…, x k ]≤ E [ C ( A, B )│ x 1, x 2,…, x k+1 ].

6.4. S AMPLE AND M ODIFY Sample-and-modify technique: 1. Construct a random structure that does not have the required properties. 2. Modify the random structure so that it does have the required property Application: Independent Sets An independent set in a graph G is a set of vertices with no edges between them. Finding the largest independent set in a graph is an NP-hard problem.

Theorem 6.5: Let G = (V, E) be a graph on n vertices with m edges. Then G has an independent set with at least n 2 /4m vertices. Proof: Let d=2m/n be the average degree of the verti- ces in G. Consider the following randomized algorithm. 1. Delete each vertex of G independently with prob- ability 1 – 1/ d. 2. For each remaining edge, remove it and one of its adjacent vertices. Let X be the number of vertices that survive the first step of the algorithm. We have

E [ X ] =. Let Y be the number of edges that survive the first step. So E [ Y ] = 2 =. And E [ X-Y ]= - =. The expected size of the independent set generated by the algorithm is n/2d, so the graph has an indepen- dent set with at least n/2d = n 2 /4m vertices. ■ Application: Graphs with Large Girth The girth of a graph, is the length of its smallest cycle.

Theorem 6.6: For any integer k ≥ 3 there is a graph with n nodes, at least n 1+1/k edges, and girth at least k. Proof: Sample a random graph G ∈ G n,p with p = n 1/k-1. Let X be the number of edges in the graph. Then E [ X ]= p = 1– n 1/k+1. Let Y be the number of cycles in the graph of length at most k–1. Any specific possible cycle of length i, where 3 ≤ i ≤ k –1, occurs with probability p i. Also, there are possible cycles of length i. Hence, E [ Y ] = p i ≤ n i p i = n i/k < k n (k–1)k.

When n is sufficiently large, the expected number of edges in the resulting graph is E [ X – Y ] ≥ 1 – n 1/k+1 – k n (k-1)/k ≥ n 1/k+1. Hence there exists a graph with at least n 1+1/k edges and girth at least k. ■

6.5. T HE S ECOND M OMENT M ETHOD Theorem 6.7: If X is a nonnegative integer-valued ran- dom variable, then Pr( X =0) ≤. Proof: Pr( X =0) ≤ Pr(│ X – E [ X ]│≥ E [ X ]) ≤. ■ Application: Threshold Behavior in Random Graphs Theorem 6.8: In G n,p, suppose that p= f(n), where f(n)= o(n -2/3 ). Then, for any ε > 0 and for sufficiently large n,

the probability that a random graph chosen from G n,p has a clique of four or more vertices is less than ε. Similarly, if f(n) = ω(n -2/3 ) then, for sufficiently large n, the probability that a random graph chosen from G n,p does not have a clique with four or more vertices is less than ε. Proof: Case ①, p = f(n) and f(n) = o(n -2/3 ). Let C 1,…,C be an enumeration of all the subsets of four vertices in G. Let 1 if C i is a 4-clique, X i = 0 otherwise. Let X = X i,

so that E [ X ]= p 6. In this case E [ X ] = o( l ), which means that E [ X ]< ε for sufficiently large n. Since X is a nonnegative integer- valued random variable, it follows that Pr( X ≥ 1) ≤ E [ X ] < ε. Hence, the probability that a random graph chosen from G n,p has a clique of four or more vertices is less than ε. Case ②, p = f(n) and f(n) = ω(n -2/3 ). In this case, E [ X ] → ∞ as n grows large. We can use Theorem 6.7 to prove that Pr( X =0)=o(1) in this case.

Lemma 6.9: Let Y i, i = 1,…,m, be 0-1 random variables, and let Y = Y i. Then Var [Y] ≤ E [Y] + Cov ( Y i,Y j ). Proof: For any sequence of random variables Y 1,…,Y m, Var Y i = Var [ Y i ] + Cov ( Y i,Y j ). This is the generalization of Theorem 3.2 to m variables. When Y i is a 0-1 random variable, E [ Y i 2 ]= E [ Y i ], so Var [ Y i ]= E [ Y i 2 ]–( E [ Y i ]) 2 ≤ E [ Y i ], giving the lemma. □