2 SAT of On Variants SAT Problems 1
2 SAT of On Variants SAT Problems 1
Goal: Plan: • Discuss the complexity of variants of SAT • General • 2 SAT • Max 2 SAT 2
Special cases of SAT 4 SAT 3 SAT 2 SAT 1 SAT 2 SAT In P? ? e t e l p m o c L N Variants? EXP PSPACE NP P NL L 3
PAP 184 -185 • a 2 -CNF formula EG 2 SAT Instance: 2 SAT ) z x ( ) z y ( ) y ( x Decision Problem: • is satisfiable? Theorem: • 2 SAT P Proof: • Reduce 2 SAT to a graph problem in P: construct G -- then specify problem 4
V Implication graph G =(V , E ) E note • 1 vertex for every literal of edges: ( , ) E ( , ) E paths: � � Theorem: note • edge ( , ) contains clause ( ) � • is unsatisfiable x s. t. x � x and x �x in G 5
Implication graph : Example ( x y) ( y z) (x z) (z y) x y x y z z 6
Correctness Completeness: • x � x can’t assign TRUE to x • x �x can’t assign FALSE to x Soundness: note • Repeat Pick an x; if x � x, = x o/w =x – no � , hence assign TRUE to ; Then, literal s. t. � : assign TRUE to and FALSE to • No inconsistencies! � � � 7
Graph Connectivity (CONN) CONN Instance: • a directed graph G=(V, E) and 2 vertices s, t V Decision Problem: • Is there is a path from s to t in G? Theorem: /BFS) S F ( D m h it r o lg a h • CONN P Apply some searc Corollary: • “ x s. t. x � x and x �x in G ” P 8
An Assignment: example �Construct an assignment as follows: x x y x z z y y z 9
Max-2 -SAT Instance: • a 2 -CNF formula Maximization Problem: • Find the maximum # of clauses satisfied by an assignment to Instance (decis. ver. ): • a 2 -CNF formula and a threshold K Decision Problem: • Is there an assign. satisfying K clauses of ? 10
• Max 2 SAT is NP-hard note PAP 186 -187 Theorem: Max 2 SAT NPC clearly Max 2 SAT NP Proof: 3 SAT p. Max 2 SAT note • Replace each C=( ) of w/ 10 clauses in ’: ( ) ( ) (w. C) ( ) ( ) ( w. C). UE? ” R T = = = “ w • Set K=7| |. C maximizes satisfiab. Completeness: • C=( ) satisfied 7/10 clauses satisfied Soundness: • C=( ) unsatisfied 6/10 clauses satisfied 11
Synopsis Discussed variants of SAT Also: Maximization Problems Special cases of NPC problems may be in P: SAT vs. 2 SAT Optimization versions of problems in P may be hard: 2 SAT vs. Max-2 SAT 12
SAT Max-2 -SAT NPC 2 SAT Max-2 -SAT NPC NL Complete NP-Hard Complexity Classes NP NL P L co-NP EXPTIME PSPACE WWindex Papadimitriou, Christos 13
- Slides: 13