Randomized and LP based Approximation Algorithms




CS255

Chris Pollett

May 6, 2019

Outline

Introduction

Random Walks for SAT

Random Walks for 2SAT

Theorem. Suppose that the random walk algorithm with `r=2n^2` is applied to any satisfiable instance of 2SAT with `n` variables. Then the probability that a satisfying truth assignment will be discovered is at least `1/2`.

Proof. Let `T` be a truth assignment which satisfies the given 2SAT instance `I`. Let `t(i)` denote the number of expected repetitions of the flip step until a satisfying assignment is found starting from an assignment `T'` which differs in at most `i` positions from `T`. Notice:

  1. `t(0) = 0`
  2. If we find some other satisfying assignment, we do not need to continue.
  3. Otherwise, we flip at least once, and we have a 50% chance of moving closer to the solution; 50% farther. So `t(i) le 1/2(t(i-1) + t(i+1)) + 1`
  4. We also have `t(n) le t(n-1) + 1` (If every literal is wrong, we can only move closer).

The worst case is the when relation `t` of (3) and (4) hold as equations. `x(0)=0`; `x(n)=x(n-1)+1`; `x(i) = 1/2(x(i-1)+x(i+1))+1`

Proof Cont'd

Adding the equations of the last slide

Quiz

Which of the following statements is true?

  1. Our 2-approximation algorithm for VERTEX COVER made use of minimal spanning trees.
  2. We showed if `P ne NP` then there is no p-time approximation algorithm for TSP.
  3. We gave an 8/7 approximation algorithm for set cover based on an amortized analysis.

Randomized Approximation Algorithms

Algorithm for MAX-3SAT

Theorem. Given an instance of MAX-3SAT with n variables and `m` clauses, the randomized algorithm that independently sets each variable to `1` with probability `1/2` and to `0` with probability `1/2` is an randomized `8/7`-approximation algorithm.

Proof. Define the indicator random variable `Y_i = I{`clause `i` is satisfied`}`. Since no literal appears more than once in the same clause, and since we assume that no variable and its negation appear in the same clause, the settings of the three literals are independent. A clause is not satisfied only if all three of its literals are set to `0`. We thus have:

  1. `Pr{ mbox{clause } i mbox( is not satisfied ) } = 1/8`
  2. `Pr{ mbox{clause } i mbox( is satisfied ) } = 7/8`.
  3. `E[Y_i] = 7/8`.

Let `Y = sum_i Y_i`. Then
`E[Y] = E[sum_i Y_i] = sum_iE[Y_i] = sum_i 7/8 = (7m)/8`.
As `m` is an upper bound on the number of possible clauses that could be satisfied, this gives the result.

Weighted Vertex Cover

0-1 Program for Minimum Weight Vertex Cover

Using Relaxation to Approximately Solve Problems

Approximation Algorithm For Minimum Weight Vertex Cover

APPROX-MIN-WEIGHT-VC(G, w)
1 C = ∅
2 Compute x, an optimal solution to the 
  linear program of the previous slide
3 for each v ∈ V
4     if x(v) ≥ 1/2
5         C = C ∪ {v}
6 return C

APPROX-MIN-WEIGHT-VC is a 2-approximation algorithm

Theorem. APPROX-MIN-WEIGHT-VC is a polynomial time 2-approximation algorithm for the minimum-weight vertex-cover problem.

Proof. As we have already mentioned, line 2 in the algorithm can be done in p-time using the ellipsoid method. Lines 3-5 are linear time in the number of vertices, so the whole algorithm is p-time.

Let `C^star` be an optimal solution to a minimum-weight vertex-cover problem. Let `z^{\star}` be an optimal solution to the linear program described on the previous slides. Since an optimal cover is a feasible solution to the linear program, we have
`z^{\star} le w(C^star)`.
The Theorem follows from the following claim which we prove on the next slide:

Claim. The rounding of variables `x(v)` in APPROX-MIN-WEIGHT-VC produces a set `C` that is a vertex cover and satisfies `w(C) le 2z^{\star}`.

Proof of Claim

As one of our constraints is `x(u) + x(v) ge 1`, at least one `x(u)` or `x(v)` must be at least 1/2. Therefore, at least one of `u` or `v` is included in the vertex cover, and so every edge is covered.

Consider the weight of the cover. We have
`z^{\star} = sum_(v in V) w(v) x(v)`
`ge sum_(v in V; x(v) ge 1/2)w(v) x(v)`
`ge sum_(v in V; x(v) ge 1/2)w(v) 1/2`
`= sum_(v in C)w(v) 1/2`
`= 1/2 sum_(v in C)w(v)`
`= 1/2 w(C)`
So this gives:
`w(C) le 2z^{\star} le 2w( C^star)`
completing the proof.

The Optimization Version of Subset Sum

An Exponential-time Exact Algorithm

Improving the Exponential Time Algorithm

Example of Exponential Time Algorithm