Algorithms and Theory of Computation Lecture 20: Reduction, SAT
Xiaohui Bei MAS 714 October 27, 2020
Nanyang Technological University MAS 714 October 27, 2020 1 / 28
Algorithms and Theory of Computation Lecture 20: Reduction, SAT - - PowerPoint PPT Presentation
Algorithms and Theory of Computation Lecture 20: Reduction, SAT Xiaohui Bei MAS 714 October 27, 2020 Nanyang Technological University MAS 714 October 27, 2020 1 / 28 Recap P: set of decision problems that have polynomial time algorithms.
Nanyang Technological University MAS 714 October 27, 2020 1 / 28
Nanyang Technological University MAS 714 October 27, 2020 2 / 28
Nanyang Technological University MAS 714 October 27, 2020 3 / 28
Nanyang Technological University MAS 714 October 27, 2020 4 / 28
Nanyang Technological University MAS 714 October 27, 2020 5 / 28
Nanyang Technological University MAS 714 October 27, 2020 6 / 28
Nanyang Technological University MAS 714 October 27, 2020 7 / 28
Nanyang Technological University MAS 714 October 27, 2020 8 / 28
Nanyang Technological University MAS 714 October 27, 2020 9 / 28
Nanyang Technological University MAS 714 October 27, 2020 10 / 28
Nanyang Technological University MAS 714 October 27, 2020 11 / 28
Nanyang Technological University MAS 714 October 27, 2020 12 / 28
◮ what does it mean?
Nanyang Technological University MAS 714 October 27, 2020 13 / 28
Nanyang Technological University MAS 714 October 27, 2020 14 / 28
Nanyang Technological University MAS 714 October 27, 2020 15 / 28
Nanyang Technological University MAS 714 October 27, 2020 16 / 28
Nanyang Technological University MAS 714 October 27, 2020 17 / 28
Nanyang Technological University MAS 714 October 27, 2020 18 / 28
◮ e.g. x1 ∨ x2 ∨ x4 is a clause
◮ (x1 ∨ x2 ∨ x4) ∧ (x2 ∨ x3) ∧ x5 is a CNF formula
◮ (x1 ∨x2 ∨x4)∧(x2 ∨x3 ∨x1) is a 3CNF formula, but (x1 ∨x2 ∨x4)∧(x2 ∨x3)∧x5 is not. Nanyang Technological University MAS 714 October 27, 2020 19 / 28
1 (x1 ∨ x2 ∨ x4) ∧ (x2 ∨ x3) is satisfiable; take x1, . . . , x4 to be all true. 2 (x1 ∨ x2) ∧ (x1 ∨ x2) ∧ (x1 ∨ x2) ∧ (x1 ∨ x2) is not satisfiable. Nanyang Technological University MAS 714 October 27, 2020 20 / 28
Nanyang Technological University MAS 714 October 27, 2020 21 / 28
Nanyang Technological University MAS 714 October 27, 2020 22 / 28
1 Pad short clauses so they have 3 literals. 2 Break long clauses into shorter clauses. 3 Repeat the above till we have a 3CNF. Nanyang Technological University MAS 714 October 27, 2020 23 / 28
Nanyang Technological University MAS 714 October 27, 2020 24 / 28
Nanyang Technological University MAS 714 October 27, 2020 25 / 28
Nanyang Technological University MAS 714 October 27, 2020 26 / 28
Nanyang Technological University MAS 714 October 27, 2020 27 / 28
Nanyang Technological University MAS 714 October 27, 2020 28 / 28