CKT-SAT is NP-Complete Reduce any NP language L to CKT-SAT Let’ s start from the TM for verifying membership in L, with time bound T Build a circuit which on input w outputs what the TM outputs on (x,w), within T steps This circuit is an instance of CKT-SAT Ensure reduction is poly-time 10
TM to Circuit (x,w) 11
TM to Circuit (x,w) Wires for configurations: a bundle for each tape cell, encoding (content,state), where state is encoded in the cell with the head 11
TM to Circuit (x,w) Wires for configurations: a bundle for each tape cell, encoding (content,state), where state is encoded in the cell with the head 11
TM to Circuit (x,w) Wires for configurations: a bundle for each tape cell, encoding (content,state), where state is encoded in the cell with the head Circuitry for evolution: each bundle depends (as specified by the TM) on 3 neighboring bundles at the previous level 11
TM to Circuit (x,w) Wires for configurations: a bundle for each tape cell, encoding (content,state), where state is encoded in the cell with the head Circuitry for evolution: each bundle depends (as specified by the TM) on 3 neighboring bundles at the previous level (Part of) initial configuration, namely w, to be plugged in as input 11
TM to Circuit x,q 0 (x,w) Wires for configurations: a bundle for each tape cell, encoding (content,state), where state is encoded in the cell with the head Circuitry for evolution: each bundle depends (as specified by the TM) on 3 neighboring bundles at the previous level (Part of) initial configuration, namely w, to be plugged in as input 11
TM to Circuit x,q 0 w (x,w) Wires for configurations: a bundle for each tape cell, encoding (content,state), where state is encoded in the cell with the head Circuitry for evolution: each bundle depends (as specified by the TM) on 3 neighboring bundles at the previous level (Part of) initial configuration, namely w, to be plugged in as input 11
TM to Circuit x,q 0 w (x,w) Wires for configurations: a bundle for each tape cell, encoding (content,state), where state is encoded in the cell with the head Circuitry for evolution: each bundle depends (as specified by the TM) on 3 neighboring bundles at the previous level (Part of) initial configuration, namely w, to be plugged in as input T configurations, T bundles each 11
TM to Circuit x,q 0 w (x,w) Wires for configurations: a bundle for each tape cell, encoding (content,state), where state is encoded in the cell with the head Circuitry for evolution: each bundle depends (as specified by the TM) on 3 neighboring bundles at the previous level (Part of) initial configuration, namely w, to be plugged in as input T configurations, T bundles each Circuit size = O(T 2 ) 11
TM to Circuit x,q 0 w (x,w) 12
TM to Circuit x,q 0 w (x,w) Reducing any NP language L to CKT-SAT 12
TM to Circuit x,q 0 w (x,w) Reducing any NP language L to CKT-SAT TM for verifying membership in L, time-bound T, and input x " A circuit which on input w outputs what the TM outputs on (x,w) within T steps 12
TM to Circuit x,q 0 w (x,w) Reducing any NP language L to CKT-SAT TM for verifying membership in L, time-bound T, and input x " A circuit which on input w outputs what the TM outputs on (x,w) within T steps Poly-time reduction 12
TM to Circuit x,q 0 w (x,w) Reducing any NP language L to CKT-SAT TM for verifying membership in L, time-bound T, and input x " A circuit which on input w outputs what the TM outputs on (x,w) within T steps Poly-time reduction CKT-SAT is NP-complete 12
Other NP-complete problems 13
Other NP-complete problems SAT and 3SAT 13
Other NP-complete problems SAT and 3SAT SAT: Are all given “clauses” simultaneously satisfiable? (Conjunctive Normal Form) 13
Other NP-complete problems SAT and 3SAT SAT: Are all given “clauses” simultaneously satisfiable? (Conjunctive Normal Form) 3SAT: Each clause has at most 3 literals 13
Other NP-complete problems SAT and 3SAT SAT: Are all given “clauses” simultaneously satisfiable? (Conjunctive Normal Form) 3SAT: Each clause has at most 3 literals CLIQUE, INDEP-SET, VERTEX-COVER 13
Other NP-complete problems SAT and 3SAT SAT: Are all given “clauses” simultaneously satisfiable? (Conjunctive Normal Form) 3SAT: Each clause has at most 3 literals CLIQUE, INDEP-SET, VERTEX-COVER Hundreds (thousands?) more known 13
Other NP-complete problems SAT and 3SAT SAT: Are all given “clauses” simultaneously satisfiable? (Conjunctive Normal Form) 3SAT: Each clause has at most 3 literals CLIQUE, INDEP-SET, VERTEX-COVER Hundreds (thousands?) more known Shown using already known ones: 13
Other NP-complete problems SAT and 3SAT SAT: Are all given “clauses” simultaneously satisfiable? (Conjunctive Normal Form) 3SAT: Each clause has at most 3 literals CLIQUE, INDEP-SET, VERTEX-COVER Hundreds (thousands?) more known Shown using already known ones: If L ! p L 1 and L 1 ! p L 2 , then L ! p L 2 13
CKT-SAT # p SAT 14
CKT-SAT # p SAT Converting a circuit to a collection of clauses: 14
CKT-SAT # p SAT Converting a circuit to a collection of clauses: For each wire (connected component), add a variable 14
CKT-SAT # p SAT Converting a circuit to a collection of clauses: For each wire (connected component), add a variable For each gate, add a clause involving variables for wires connected to the gate: 14
CKT-SAT # p SAT Converting a circuit to a collection of clauses: For each wire (connected component), add a variable For each gate, add a clause involving variables for wires connected to the gate: x z e.g. : (z ⇒ x), (z ⇒ y), (¬z ⇒ ¬x ∨ ¬y). y AND i.e., (¬z ∨ x), (¬z ∨ y), (z ∨ ¬x ∨ ¬y). 14
CKT-SAT # p SAT Converting a circuit to a collection of clauses: For each wire (connected component), add a variable For each gate, add a clause involving variables for wires connected to the gate: x z e.g. : (z ⇒ x), (z ⇒ y), (¬z ⇒ ¬x ∨ ¬y). y AND i.e., (¬z ∨ x), (¬z ∨ y), (z ∨ ¬x ∨ ¬y). x and : (z ⇒ x ∨ y), (¬z ⇒ ¬x), (¬z ⇒ ¬y). z y OR 14
SAT # p 3SAT 15
SAT # p 3SAT Previous reduction was to 3SAT, so 3SAT is NP-complete. And SAT is in NP. So SAT ! p 3SAT. 15
SAT # p 3SAT Previous reduction was to 3SAT, so 3SAT is NP-complete. And SAT is in NP. So SAT ! p 3SAT. More directly: 15
SAT # p 3SAT Previous reduction was to 3SAT, so 3SAT is NP-complete. And SAT is in NP. So SAT ! p 3SAT. More directly: (a ∨ b ∨ c ∨ d ∨ e) " (a ∨ b ∨ x), (¬x ∨ c ∨ d ∨ e) " (a ∨ b ∨ x), (¬x ∨ c ∨ y), (¬y ∨ d ∨ e) 15
SAT # p 3SAT Previous reduction was to 3SAT, so 3SAT is NP-complete. And SAT is in NP. So SAT ! p 3SAT. More directly: (a ∨ b ∨ c ∨ d ∨ e) " (a ∨ b ∨ x), (¬x ∨ c ∨ d ∨ e) " (a ∨ b ∨ x), (¬x ∨ c ∨ y), (¬y ∨ d ∨ e) Reduction needs 3SAT 15
SAT # p 3SAT Previous reduction was to 3SAT, so 3SAT is NP-complete. And SAT is in NP. So SAT ! p 3SAT. More directly: (a ∨ b ∨ c ∨ d ∨ e) " (a ∨ b ∨ x), (¬x ∨ c ∨ d ∨ e) " (a ∨ b ∨ x), (¬x ∨ c ∨ y), (¬y ∨ d ∨ e) Reduction needs 3SAT 2SAT is in fact in P! [Exercise] 15
SAT # p 3SAT Previous reduction was to 3SAT, so 3SAT is NP-complete. And SAT is in NP. So SAT ! p 3SAT. More directly: (a ∨ b ∨ c ∨ d ∨ e) " (a ∨ b ∨ x), (¬x ∨ c ∨ d ∨ e) " (a ∨ b ∨ x), (¬x ∨ c ∨ y), (¬y ∨ d ∨ e) Reduction needs 3SAT 2SAT is in fact in P! [Exercise] Reduction not parsimonious (can you make it? [Exercise]) 15
3SAT # p CLIQUE 16
3SAT # p CLIQUE Clauses " Graph 16
3SAT # p CLIQUE (x ∨ ¬y ∨ ¬z) Clauses " Graph (w ∨ y) (w ∨ x ∨ ¬z) 16
3SAT # p CLIQUE (x ∨ ¬y ∨ ¬z) Clauses " Graph vertices: each clause’ s (w ∨ y) satisfying assignments (for its variables) (w ∨ x ∨ ¬z) 16
3SAT # p CLIQUE (x ∨ ¬y ∨ ¬z) Clauses " Graph vertices: each clause’ s (w ∨ y) satisfying assignments (for its variables) 1*0* 1*1* 0*1* (w ∨ x ∨ ¬z) 16
3SAT # p CLIQUE (x ∨ ¬y ∨ ¬z) Clauses " Graph vertices: each clause’ s (w ∨ y) satisfying assignments (for its variables) 1*0* 1*1* 0*1* (w ∨ x ∨ ¬z) 16
3SAT # p CLIQUE *000 (x ∨ ¬y ∨ ¬z) *111 *100 Clauses " Graph *010 *101 *110 *001 vertices: each clause’ s (w ∨ y) satisfying assignments (for its variables) 1*0* 1*1* 0*1* (w ∨ x ∨ ¬z) 16
3SAT # p CLIQUE *000 (x ∨ ¬y ∨ ¬z) *111 *100 Clauses " Graph *010 *101 *110 *001 vertices: each clause’ s (w ∨ y) satisfying assignments (for its variables) 1*0* 1*1* 0*1* (w ∨ x ∨ ¬z) 16
3SAT # p CLIQUE *000 (x ∨ ¬y ∨ ¬z) *111 *100 Clauses " Graph *010 *101 *110 *001 vertices: each clause’ s (w ∨ y) satisfying assignments (for its variables) 1*0* 1*1* 0*1* 00*0 (w ∨ x ∨ ¬z) 10*0 11*1 01*1 01*0 10*1 11*0 16
3SAT # p CLIQUE *000 (x ∨ ¬y ∨ ¬z) *111 *100 Clauses " Graph *010 *101 *110 *001 vertices: each clause’ s (w ∨ y) satisfying assignments (for its variables) 1*0* 1*1* 0*1* edges between consistent assignments 00*0 (w ∨ x ∨ ¬z) 10*0 11*1 01*1 01*0 10*1 11*0 16
3SAT # p CLIQUE *000 (x ∨ ¬y ∨ ¬z) *111 *100 Clauses " Graph *010 *101 *110 *001 vertices: each clause’ s (w ∨ y) satisfying assignments (for its variables) 1*0* 1*1* 0*1* edges between consistent assignments 00*0 (w ∨ x ∨ ¬z) 10*0 11*1 01*1 01*0 10*1 11*0 16
Recommend
More recommend