Approximations for MAX-SAT Problem

Similar documents
Approximations for MAX-SAT Problem

Lecture 6,7 (Sept 27 and 29, 2011 ): Bin Packing, MAX-SAT

Asymptotic Polynomial-Time Approximation (APTAS) and Randomized Approximation Algorithms

Lecture 4. 1 FPTAS - Fully Polynomial Time Approximation Scheme

CSCI 1590 Intro to Computational Complexity

Lecture 21 (Oct. 24): Max Cut SDP Gap and Max 2-SAT

Approximation Algorithms

Lecture Notes CS:5360 Randomized Algorithms Lecture 20 and 21: Nov 6th and 8th, 2018 Scribe: Qianhang Sun

Approximation algorithms based on LP relaxation

Provable Approximation via Linear Programming

Finding Satisfying Assignments by Random Walk

An Improved Upper Bound for SAT

Lecture 18: PCP Theorem and Hardness of Approximation I

20.1 2SAT. CS125 Lecture 20 Fall 2016

NP Complete Problems. COMP 215 Lecture 20

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

CS261: A Second Course in Algorithms Lecture #18: Five Essential Tools for the Analysis of Randomized Algorithms

SAT) is defined by a collection of boolean clauses, where each clause is a disjunction

CSE 3500 Algorithms and Complexity Fall 2016 Lecture 25: November 29, 2016

Discrete Optimization 2010 Lecture 12 TSP, SAT & Outlook

Increasing the Span of Stars

SAT, Coloring, Hamiltonian Cycle, TSP

An Approximation Algorithm for MAX-2-SAT with Cardinality Constraint

CS21 Decidability and Tractability

Near-Optimal Algorithms for Maximum Constraint Satisfaction Problems

Comp487/587 - Boolean Formulas

princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming

Nondeterministic Turing Machines

Correctness of Dijkstra s algorithm

Solving SAT for CNF formulas with a one-sided restriction on variable occurrences

Solutions to Exercises

More Completeness, conp, FNP,etc. CS254 Chris Pollett Oct 30, 2006.

Exact Max 2-SAT: Easier and Faster. Martin Fürer Shiva Prasad Kasiviswanathan Pennsylvania State University, U.S.A

Closest String and Closest Substring Problems

NP-problems continued

Essential facts about NP-completeness:

The Cook-Levin Theorem

9.1 HW (3+3+8 points) (Knapsack decision problem NP-complete)

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

Intro to Theory of Computation

Formal definition of P

Lecture 13, Fall 04/05

A note on unsatisfiable k-cnf formulas with few occurrences per variable

On Variable-Weighted 2-SAT and Dual Problems

NP-problems continued

NP-Hardness reductions

How hard is it to find a good solution?

Lecture 17 (Nov 3, 2011 ): Approximation via rounding SDP: Max-Cut

Homework 4 Solutions

6.854J / J Advanced Algorithms Fall 2008

Graduate Algorithms CS F-21 NP & Approximation Algorithms

NP-Complete Reductions 1

Approximation Preserving Reductions

Discrete Optimization 2010 Lecture 12 TSP, SAT & Outlook

A Collection of Problems in Propositional Logic

The Complexity of Optimization Problems

Approximation Algorithms for Maximum. Coverage and Max Cut with Given Sizes of. Parts? A. A. Ageev and M. I. Sviridenko

NP-completeness. Chapter 34. Sergey Bereg

Maximum 3-SAT as QUBO

Lecture 24 : Even more reductions

NP and Computational Intractability

1 More finite deterministic automata

X = X X n, + X 2

Algorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University

Lecture 23: More PSPACE-Complete, Randomized Complexity

Vol. 2(1997): nr 4. Tight Lower Bounds on the. Approximability of Some. Peter Jonsson. Linkoping University

CSE 135: Introduction to Theory of Computation NP-completeness

Computing and Communications 2. Information Theory -Entropy

An algorithm for the satisfiability problem of formulas in conjunctive normal form

Keywords. Approximation Complexity Theory: historical remarks. What s PCP?

Approximation Basics

CSCI3390-Second Test with Solutions

Solutions to Sample Problems for Midterm

Integer vs. constraint programming. IP vs. CP: Language

A An Overview of Complexity Theory for the Algorithm Designer

CS 5114: Theory of Algorithms

Lecture 13 March 7, 2017

Normal Forms of Propositional Logic

CSC 2429 Approaches to the P vs. NP Question and Related Complexity Questions Lecture 2: Switching Lemma, AC 0 Circuit Lower Bounds

PCP Theorem and Hardness of Approximation

The Class NP. NP is the problems that can be solved in polynomial time by a nondeterministic machine.

Critical Reading of Optimization Methods for Logical Inference [1]

Umans Complexity Theory Lectures

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

1 Agenda. 2 History. 3 Probabilistically Checkable Proofs (PCPs). Lecture Notes Definitions. PCPs. Approximation Algorithms.

NP-Completeness Part II

Integer Linear Programs

Hardness of Approximation of Graph Partitioning into Balanced Complete Bipartite Subgraphs

Ch 3.2: Direct proofs

11.1 Set Cover ILP formulation of set cover Deterministic rounding

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

Lecture 15 (Oct 6): LP Duality

Splitting the Computational Universe

Admin NP-COMPLETE PROBLEMS. Run-time analysis. Tractable vs. intractable problems 5/2/13. What is a tractable problem?

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

Approximation Algorithms

CS6999 Probabilistic Methods in Integer Programming Randomized Rounding Andrew D. Smith April 2003

Shortest reconfiguration paths in the solution space of Boolean formulas

Transcription:

Approximations for MAX-SAT Problem Chihao Zhang BASICS, Shanghai Jiao Tong University Oct. 23, 2012 Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 1 / 16

The Weighted MAX-SAT Problem Input: n Boolean variables x 1,...,x n, a CNF ϕ = m j=1 C j and a nonnegative weight w j for each C j. Problem: Find an assignment to x i -s that maximizes the weight of satisfied clauses. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 2 / 16

The Weighted MAX-SAT Problem Input: n Boolean variables x 1,...,x n, a CNF ϕ = m j=1 C j and a nonnegative weight w j for each C j. Problem: Find an assignment to x i -s that maximizes the weight of satisfied clauses. Obviously NP-hard. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 2 / 16

Flipping a Coin A very straightforawrd randomized approximation algorithm is to set each x i to true independently with probability 1/2. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 3 / 16

Flipping a Coin A very straightforawrd randomized approximation algorithm is to set each x i to true independently with probability 1/2. Theorem Setting each x i to true with probability 1/2 independently gives a randomized 1 2-approximation algorithm for weighted MAX-SAT. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 3 / 16

Proof Proof. Let W be a random variable that is equal to the total weight of the satisfied clauses. Define an indicator random variable Y j for each clause C j such that Y j = 1 if and only if C j is satisfied. Then W = m w j Y j j=1 We use OPT to denote value of optimum solution, then E[W] = m w j E[Y j ] = j=1 m w j Pr[clause C j satisfied] j=1 Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 4 / 16

Proof (cont d) Since each variable is set to true independently, we have ( ( ) ) 1 lj Pr[clause C j satisfied] = 1 1 2 2 where l j is the number of literals in clause C j. Hence, E[W] 1 2 m w j 1 2 OPT. j=1 Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 5 / 16

Proof (cont d) Since each variable is set to true independently, we have ( ( ) ) 1 lj Pr[clause C j satisfied] = 1 1 2 2 where l j is the number of literals in clause C j. Hence, E[W] 1 2 m w j 1 2 OPT. j=1 From the analysis, we can see that the performance of the algorithm is better on instances consisting of long clauses. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 5 / 16

Derandomization by Conditional Expectation The previous randomized algorithm can be derandomized. Note that E[W] = E[W x 1 true] Pr[x 1 true] +E[W x 1 false] Pr[x 1 false] = 1 2 (E[W x 1 true]+e[w x 1 false]) Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 6 / 16

Derandomization by Conditional Expectation The previous randomized algorithm can be derandomized. Note that E[W] = E[W x 1 true] Pr[x 1 true] +E[W x 1 false] Pr[x 1 false] = 1 2 (E[W x 1 true]+e[w x 1 false]) We set b 1 true if E[W x 1 true] E[W x 1 false] and set b 1 false otherwise. Let the value of x 1 be b 1. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 6 / 16

Derandomization by Conditional Expectation The previous randomized algorithm can be derandomized. Note that E[W] = E[W x 1 true] Pr[x 1 true] +E[W x 1 false] Pr[x 1 false] = 1 2 (E[W x 1 true]+e[w x 1 false]) We set b 1 true if E[W x 1 true] E[W x 1 false] and set b 1 false otherwise. Let the value of x 1 be b 1. Continue this process until all b i are found, i.e., all n variables have been set. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 6 / 16

Derandomization by Conditional Expectation This is a deterministic 1 2-approximation algorithm because of the following two facts: 1. E[W x 1 b 1,...,x i b i ] can be computed in polynomial time for fixed b 1,...,b i. 2. E[W x 1 b 1,...,x i b i,x i+1 b i+1 ] E[W x 1 b 1,...,x i b i ] for all i. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 7 / 16

Flipping biased coins Previously, we set each x i true or false with probability 1 2 1 independently. 2 is nothing special here. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 8 / 16

Flipping biased coins Previously, we set each x i true or false with probability 1 2 1 independently. 2 is nothing special here. In the following, we set each x i true with probability p 1 2. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 8 / 16

Flipping biased coins Previously, we set each x i true or false with probability 1 2 1 independently. 2 is nothing special here. In the following, we set each x i true with probability p 1 2. We first consider the case that no clause is of the form C j = x i. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 8 / 16

Flipping biased coins Previously, we set each x i true or false with probability 1 2 1 independently. 2 is nothing special here. In the following, we set each x i true with probability p 1 2. We first consider the case that no clause is of the form C j = x i. Lemma If each x i is set to true with probability p 1/2 independently, then the probability that any given clause is satisfied is at least min(p,1 p 2 ) for instances with no negated unit clauses. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 8 / 16

Flipping biased coins (cont d) Armed with previous lemma, we then maximize min(p,1 p 2 ), which is achieved when p = 1 p 2, namely p = 1 2 ( 5 1) 0.618. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 9 / 16

Flipping biased coins (cont d) Armed with previous lemma, we then maximize min(p,1 p 2 ), which is achieved when p = 1 p 2, namely p = 1 2 ( 5 1) 0.618. We need more effort to deal with negated unite clauses, i.e., C j = x i for some j. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 9 / 16

Flipping biased coins (cont d) Armed with previous lemma, we then maximize min(p,1 p 2 ), which is achieved when p = 1 p 2, namely p = 1 2 ( 5 1) 0.618. We need more effort to deal with negated unite clauses, i.e., C j = x i for some j. We distinguish between two cases: Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 9 / 16

Flipping biased coins (cont d) Armed with previous lemma, we then maximize min(p,1 p 2 ), which is achieved when p = 1 p 2, namely p = 1 2 ( 5 1) 0.618. We need more effort to deal with negated unite clauses, i.e., C j = x i for some j. We distinguish between two cases: 1. Assume C j = x i and there is no clause such that C = x i. In this case, we can introduce a new variable y and replace the appearance of x i in ϕ by y and the appearance of x i by ȳ. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 9 / 16

Flipping biased coins (cont d) 2. C j = x i and some clause C k = x i. W.L.O.G we assume w(c j ) w(c k ). Note that for any assignment, C j and C k cannot be satisfied simultaneously. Let v i be the weight of the unit clause x i if it exists in the instance, and let v i be zero otherwise, we have m n OPT w j j=1 i=1 v i Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 10 / 16

Flipping biased coins (cont d) 2. C j = x i and some clause C k = x i. W.L.O.G we assume w(c j ) w(c k ). Note that for any assignment, C j and C k cannot be satisfied simultaneously. Let v i be the weight of the unit clause x i if it exists in the instance, and let v i be zero otherwise, we have m n OPT w j j=1 i=1 We set each x i true with probability p = 1 2 ( 5 1), then m E[W] = w je[y j] j=1 ( m p w j j=1 p OPT v i ) n v i i=1 Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 10 / 16

The Use of Linear Program Integer Program Characterization: maximize subject to m j=1 wjzj i P j y i + i N j (1 y i) z j, C j = i P j x i i N j x i, y i {0,1}, z j {0,1}, i = 1,...,n, j = 1,...,m. where y i indicate the assignment of variable x i and z j indicates whether clause C j is satisfied. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 11 / 16

The Use of Linear Program Linear Program Relaxation: maximize subject to m j=1 wjzj i P j y i + i N j (1 y i) z j, C j = i P j x i i N j x i, 0 y i 1, i = 1,...,n, 0 z j 1, j = 1,...,m. where y i indicate the assignment of variable x i and z j indicates whether clause C j is satisfied. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 11 / 16

Flipping Different Coins Let (y,z ) be an optimal solution of the linear program. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 12 / 16

Flipping Different Coins Let (y,z ) be an optimal solution of the linear program. We set x i to true with probability y i. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 12 / 16

Flipping Different Coins Let (y,z ) be an optimal solution of the linear program. We set x i to true with probability y i. This can be viewed as flipping different coins for every variable. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 12 / 16

Flipping Different Coins Let (y,z ) be an optimal solution of the linear program. We set x i to true with probability y i. This can be viewed as flipping different coins for every variable. Theorem Randomized rounding gives a randomized (1 1 e )-approximation algorithm for MAX SAT. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 12 / 16

Analysis Pr[clause C j not satisfied] = (1 yi ) i i P j i N j y [ ( 1 )] l j i P j (1 yi )+ i N j yi lj = 1 1 yi + (1 y l j i Pj i N j i ) l j ( 1 z j l j l j ) Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 13 / 16

Analysis Pr[clause C j not satisfied] = (1 yi ) i i P j i N j y [ ( 1 )] Arithmeticl j i P j (1 yi )+ i N j yi lj Geometric Mean Inequality = 1 1 yi + (1 y l j i Pj i N j i ) l j ( 1 z j l j l j ) Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 13 / 16

Analysis (cont d) Pr[clause C j satisfied] ( ) lj 1 1 z j l j [ ) ] lj 1 (1 1lj zj Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 14 / 16

Analysis (cont d) Pr[clause C j satisfied] ( ) lj 1 1 z j l j [ ) ] lj 1 (1 1lj zj Jensen s Inequality Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 14 / 16

Analysis (cont d) Pr[clause C j satisfied] ( ) lj 1 1 z j l j [ ) ] lj 1 (1 1lj zj Jensen s Inequality Therefore, we have E[W] = m w j Pr[clause C j satisfied] j=1 [ m ) ] lj w jzj 1 (1 1lj j=1 ( 1 1 ) OPT e Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 14 / 16

Choosing the better of two The randomized rounding algorithm performs better when l j -s are small.( ( 1 1 k) k is nondecreasing). Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 15 / 16

Choosing the better of two The randomized rounding algorithm performs better when l j -s are small.( ( 1 1 k) k is nondecreasing) The unbiased randomized algorithm performs better when l j -s are large.. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 15 / 16

Choosing the better of two The randomized rounding algorithm performs better when l j -s are small.( ( 1 1 k) k is nondecreasing) The unbiased randomized algorithm performs better when l j -s are large. We will combine them together. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 15 / 16

Choosing the better of two The randomized rounding algorithm performs better when l j -s are small.( ( 1 1 k) k is nondecreasing) The unbiased randomized algorithm performs better when l j -s are large. We will combine them together. Theorem Choosing the better of the two solutions given by the two algorithms yields a randomized 3 4-approximation algorithm for MAX SAT. Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 15 / 16

Analysis Let W 1 and W 2 be the r.v. of value of solution of randomize rounding algorithm and unbiased randomized algorithm respectively. Then E[max(W 1,W 2 )] E[ 1 2 W 1 + 1 2 W 2] [ 1 m ) ] w j zj 1 (1 1lj lj + 1 2 2 j=1 [ ( m ) ) w j zj 1 1 (1 1lj lj + 1 2 2 j=1 3 4 OPT m j=1 ) w j (1 2 l j ( 1 2 l j ) ] Chihao Zhang (BASICS@SJTU) Approximations for MAX-SAT Problem Oct. 23, 2012 16 / 16