CSE200: Computability and complexity Homework set 3

2 downloads 82 Views 142KB Size Report
1 Schöning algorithm for 3SAT. We will analyze Schöning's randomized algorithm for 3SAT [Sch99]. Let us recall the .... [Sch99] Uwe Schöning. A probabilistic ...
CSE200: Computability and complexity Homework set 3 Shachar Lovett Due by May 29 (hand in class)

1

Sch¨ oning algorithm for 3SAT

We will analyze Sch¨oning’s randomized algorithm for 3SAT [Sch99]. Let us recall the algorithm. Let φ(x1 , . . . , xn ) = C1 (x) ∧ . . . ∧ Cm (x) be a 3SAT formula. 3SAT-RandomWalk: 1. Choose a ∈ {0, 1}n randomly. 2. Repeat for at most 3n steps: (a) If φ(a) = 1 return ”SATISFIABLE”. (b) Otherwise, let Ci be a clause on which a is unsatisfiable. Let j be a uniformly random variable in Ci . Flip the j-th bit of a. We will prove that if φ is satisfiable, then with probability at least ≈ (3/4)n the RandomWalk algorithm finds a satisfiable solution. Hence, repeating it ≈ (4/3)n times finds with high probability a satisfying assignment, if such exists. We would use the following definition: for two strings a, b ∈ {0, 1}n let ka − bk denote their hamming distance, that is is the number of coordinates on which they differ. Let us assume from now on that φ is satisfiable, and let a∗ denote a satisfying assignment to φ (if more than one exists, choose one arbitrarily). Recall that a ∈ {0, 1}n is a random assignment. Let ai denote the assignment generated by the algorithm after i steps, with a0 = a, and set di = kai − a∗ k. Note that ai , di are random variables. 1. Assume that ai is not a satisfying assignment. Prove that either di+1 = di − 1 or di+1 = di + 1, and moreover that Pr[di+1 = di − 1] ≥ 1/3. 2. Let us call a step i with di+1 = di − 1 a ”good step”, and a step with di+1 = di + 1 a ”bad step”. Assume that initially ka − a∗ k = d. The random walk will hit a∗ if, for

1

some value k, in the first 2k + d steps the random walk makes k + d good steps and k bad steps. Argue that this implies that   2k + d ∗ ∗ Pr[random walk hits a | ka − a k = d] ≥ max (1/3)k+d (2/3)k . 1≤k≤n k 3. Setting k = d in the above formula and using Stirling’s approximation, show that c Pr[random walk hits a∗ | ka − a∗ k = d] ≥ √ · 2−d , d where c > 0 is an absolute constant. 4. Show that for any value 0 ≤ d ≤ n,   n −n Pr[ka − a k = d] = 2 . a d ∗

5. Conclude that the probability, over the choice of a and the random walk, that the algorithm will hit a∗ is at least c Pr[random walk hits a∗ ] ≥ √ · (3/4)n . n 6. Finally, show that by repetition we can find (with high probability) a satisfying assignment if one exists in time nO(1) · (4/3)n .

2

Polynomial identity testing

We will prove the Schwartz-Zippel lemma. Let p(x1 , . . . , xn ) be a nonzero real polynomial of degree d. Let S ⊂ R be any set. Let a1 , . . . , an ∈ S be uniformly and independently chosen. Then d . Pr [p(a1 , . . . , an ) = 0] ≤ a1 ,...,an ∈S |S| Prove the lemma. Use induction on n. For n = 1 prove the lemma directly. For n > 1 Pk i decompose p(x) as p(x) = i=0 x1 pi (x2 , . . . , xn ) where pk (x2 , . . . , xn ) is a nonzero polynomial and apply the inductive hypothesis to pk .

3

Markov inequality

Let X ≥ 0 be a random variable which is not identically zero (e.g. E[X] > 0). Prove that for any a > 1, Pr[X ≥ a · E[X]] ≤ 1/a. 2

4

Chernoff bound

Let X1 , . . . , Xn ∈ {0, 1} be independent random variables with E[Xi ] = p. We will prove that for some absolute constant c > 0, n X 2 Pr[ Xi ≥ (p + ε)n] ≤ e−cε n . i=1

A similar bound can be proved for the event that

P

Xi ≤ (p − ε)n.

The proof follows the following 1 be a parameter to be optimized later. P steps. Let 0 < λ < Q Set Yi = eλ(Xi −p) . Note that ni=1 Xi ≥ (p + ε)n iff ni=1 Yi ≥ eλεn . n Q 1. Show that E[ ni=1 Yi ] = (1 − p)e−λp + peλ(1−p) . 2. Use the Taylor decomposition of ex to show that (1 − p)e−λp + peλ(1−p) = 1 + O(λ2 ). In particular, show that for a suitable constant a > 0, 2

(1 − p)e−λp + peλ(1−p) ≤ eaλ . 3. By Markov inequality, argue that hX i 2 Pr Xi ≥ (p + ε)n ≤ e(aλ −λε)n . 4. Conclude the proof by setting λ appropriately.

References [Sch99] Uwe Sch¨oning. A probabilistic algorithm for k-sat and constraint satisfaction problems. In FOCS, pages 410–414. IEEE Computer Society, 1999.

3