



















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




















































Paul G. Allen School of Computer Science & Engineering University of Washington
- Spring Lecture notes MAX-3SAT. Let’s consider a 3-CNF formula over the variables x 1 , x 2 ,... , xn. Such a formula has the form ϕ C 1 ∧ C 2 ∧ · · · ∧ Cm where each clause is an OR of three literals involving distinct variables: Ci zi 1 ∨ zi 2 ∨ zi 3. A literal is a variable or its negation. For instance, (x 2 ∨ x¯ 3 ∨ x¯ 4 ) ∧ (x 3 ∨ x¯ 5 ∨ x¯ 1 ) ∧ (x 1 ∨ x 5 ∨ x 4 ) is a 3-CNF formula.
Claim 1.4. If ϕ is a 3-CNF formula with m clauses, then there exists an assignment that makes at least^78 m clauses evaluate to true.
Proof. We will prove this using the probabilistic method. For every variable independently, we choose a uniformly random truth assignment: true or false each with probability 1 / 2. Let Ai equal 1 if clause Ci is satisfied by our random assignment, and equal 0 otherwise. Then P(Ai 1 ) 7 / 8 because there are 7 ways to satisfy a clause out of the 8 possible truth values for its literals. Let A A 1 + · · · + Am denote the total number of satisfied clauses. By linearity of expectation, we have
E[A]
∑^ m
i 1
E[Ai ] 7 8
m. (1.1)
Since a random assignment satisfies 78 m clauses in expectation, there must exist at least one assignment that satisfies this many clauses.
MAX-CUT. Consider an undirected graph G (V, E). A cut is a subset S ⊆ V, and we use E(S, S¯) to denote the set of edges crossing the cut S. This is the set of edges with one endpoint in S and one not in S.
Claim 1.5. In any graph G (V, E) , there exists a cut S ⊆ V that cuts at least half the edges, i.e., |E(S, S¯)| > |E 2 |.
Proof. We construct a random set S ⊆ V by including every vertex in S independently with probability 1 / 2. For an edge e ∈ E, let Ae 1 if e crosses the cut S, and 0 otherwise. First, it should be apparent that P(Ae 1 ) 1 / 2. Therefore by linearity of expectation,
E
e∈E
E[Ae ] |E| 2
Thus there must exist at least one cut S that has at least half the edges crossing it.
Claim 1.4 asserts that there exists an assignment satisfying at least 78 m clauses, but what if we wish to actually find one? One way is to randomly sample from the underlying distribution and then check the resulting assignment. Analyzing the probability of success will require our first tail bound ; we’ll get there in the next section. Let’s examine another way that actually results in a deterministic algorithm. Let S(x 1 , x 2 ,... , xn ) denote the expected number of satisfied clauses given a partial truth assignment to the input variables, where we choose the unassigned variables uniformly at random. We will use T to denote true, F to denote false, and? to denote that no assignment has been chosen for that variable. For instance, S(?, ?,... , ?) denotes the expected number of satisfied clauses in a random assignment, and we have already seen (cf. (1.1)) that
S(?, ?,... , ?) 78 m.
Note that a simple linear-time algorithm can estimate S(x 1 , x 2 ,... , xn ) for any partial assignment x 1 ,... , xn ∈ {T, F, ?} by simply going through the clauses one by one. As an example, consider the clause x 1 ∨ x¯ 2 ∨ x¯ 4. The probability that a random assignment satisfies this is 7 / 8. If we assign x 1 F, then the probability becomes 3 / 4 , and if we set x 1 T, then the probability becomes 1. Observe that S(?, ?,... , ?)
Since S(?, ?,... , ?) > 78 m, it must hold that S(F, ?,... , ?) > 78 m or S(T, ?,... , ?) > 78 m. As we have just argued, it’s possible to compute both these quantities and figure out which is larger. We can then set x 1 to the corresponding value and keep assigning truth values recursively. Eventually, this process ends at a full assignment to the variables that satisfies at least 78 m clauses. The key property we employed here is the ability to efficiently compute the conditional expectation of the underlying random variable under a partial assignment.
The probabilistic method shows the existence of an object, but it doesn’t necessarily give us a randomized algorithm to construct it. If we just know that the probability of an event is non-zero, it could still be very tiny; we might need to do an arbitrarily large number of random experiments before we get a positive outcome. Sometimes we can say more.
Tool 1.6 (Markov’s inequality). Let X be a non-negative random variable. Then for any α > 0 , we have P[X > α] 6
α. The proof of this lemma is easy; we leave it as an exercise.
Consider now our MAX-3SAT example above. Let X denote the number of unsatisfied clauses in a random truth assignment. We know from the preceding analysis that E[X] 6 18 m. Markov’s inequality tells us that for any ε > 0 ,
P
8 +^ ε
m
(^6) ( 1 / 8 m +/^8 ε)m (^1) +^1 8 ε 6 1 − ε.
The last inequality is only true if we assume ε 6 7 / 8 , but for any value ε > 7 / 8 , the probability is clearly zero. This means that, with probability at least ε, we will get an assignment that satisfies at least ( 7 / 8 − ε)-fraction of clauses. So in expectation, after 1 /ε samples, we will get an assignment that is very close to the one guaranteed to exist. The same kind of reasoning applies to our MAX-CUT analysis.
Let’s look at one more application of the linearity of expectation. It is almost as elementary as the examples above, but has some powerful consequences in incidence geometry and sum-product estimates. If G (V, E) is an undirected graph, we use the notation cr(G) to denote the crossing number of G_._ This is the minimum number of edge crossings required to draw G in the plane. A drawing of
2 Second moments
Consider a positive integer n and value p ∈ [ 0 , 1 ]. Perhaps the simplest model of random (undirected) graphs is Gn,p. To sample a graph from Gn,p , we add every edge {i, j} (for i , j and i, j ∈ { 1 ,... , n}) independently with probability p. For example, if X denotes the number of edges in a Gn,p graph, then E X p