![Page 1: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/1.jpg)
Introduction to Automated Reasoningand Satisfiability
Marijn J.H. Heule
http://www.cs.cmu.edu/~mheule/15816-f20/
https://cmu.zoom.us/j/93095736668
Automated Reasoning and SatisfiabilitySeptember 2, 2020
[email protected] 1 / 41
![Page 2: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/2.jpg)
To Start...
Let’s start by shortly introducing ourselves
Please turn on you camera during the lectures
Let us know (email), if you are uncomfortable
Everyone is expect to attend the live lectures
Email us prior to a lecture if you can’t attend.
The lectures will be recorded and a link will added to thecourse website (only accessible with CMU credentials).
Office hours on Tuesdays at 10am
https://cmu.zoom.us/j/97510395440
Same password as zoom lectures
[email protected] 2 / 41
![Page 3: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/3.jpg)
To Start...
Let’s start by shortly introducing ourselves
Please turn on you camera during the lectures
Let us know (email), if you are uncomfortable
Everyone is expect to attend the live lectures
Email us prior to a lecture if you can’t attend.
The lectures will be recorded and a link will added to thecourse website (only accessible with CMU credentials).
Office hours on Tuesdays at 10am
https://cmu.zoom.us/j/97510395440
Same password as zoom lectures
[email protected] 2 / 41
![Page 4: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/4.jpg)
Automated Reasoning Has Many Applications
formal verification
train safety exploitgeneration
automatedtheorem proving
bioinformaticssecurity planning andscheduling
term rewriting
termination
encode decodeautomated reasoning
[email protected] 3 / 41
![Page 5: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/5.jpg)
Automated Reasoning Has Many Applications
formal verification
train safety exploitgeneration
automatedtheorem proving
bioinformaticssecurity planning andscheduling
term rewriting
termination
encode decodeautomated reasoning
[email protected] 3 / 41
![Page 6: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/6.jpg)
Breakthrough in SAT Solving in the Last 20 Years
Satisfiability (SAT) problem: Can a Boolean formula be satisfied?
mid ’90s: formulas solvable with thousands of variables and clausesnow: formulas solvable with millions of variables and clauses
Edmund Clarke: “a keytechnology of the 21st century”[Biere, Heule, vanMaaren, and Walsh ’09]
Donald Knuth: “evidently a killer app,because it is key to the solution of so
many other problems” [Knuth ’15]
[email protected] 4 / 41
![Page 7: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/7.jpg)
Satisfiability and Complexity
Complexity classes of decision problems:
P : efficiently computable answers.NP : efficiently checkable yes-answers.
co-NP : efficiently checkable no-answers. P
co-NPNP
Cook-Levin Theorem [1971]: SAT is NP-complete.
Solving the P?= NP question is worth $1,000,000 [Clay MI ’00].
The effectiveness of SAT solving: fast solutions in practice.
The beauty of NP: guaranteed short solutions.
“NP is the new P!”
[email protected] 5 / 41
![Page 8: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/8.jpg)
Satisfiability and Complexity
Complexity classes of decision problems:
P : efficiently computable answers.NP : efficiently checkable yes-answers.
co-NP : efficiently checkable no-answers. P
co-NPNP
Cook-Levin Theorem [1971]: SAT is NP-complete.
Solving the P?= NP question is worth $1,000,000 [Clay MI ’00].
The effectiveness of SAT solving: fast solutions in practice.
The beauty of NP: guaranteed short solutions.
“NP is the new P!”
[email protected] 5 / 41
![Page 10: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/10.jpg)
Course ReportsThe second half of the course consists of a project
A group of 1 to 3 students work on a research question
The results will be presented in a scientific report
Several have been published in journals and at conferences
Emre Yolcu, Xinyu Wu, and Marijn J. H. HeuleMycielski graphs and PR proofs (2020). In Theory andPractice of Satisfiability Testing - SAT 2020, LectureNotes in Computer Science 12178, pp. 201-217.Best student paper award
Peter Oostema, Ruben Martins, and Marijn J. H. Heule.Coloring Unit-Distance Strips using SAT (2020).In Logic for Programming, Artificial Intelligence andReasoning, EPiC Series in Computing 73, pp. 373-389.
[email protected] 7 / 41
![Page 13: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/13.jpg)
Diplomacy Problem
“You are chief of protocol for the embassy ball. Thecrown prince instructs you either to invite Peru or toexclude Qatar. The queen asks you to invite eitherQatar or Romania or both. The king, in a spitefulmood, wants to snub either Romania or Peru orboth. Is there a guest list that will satisfy the whimsof the entire royal family?”
(p∨ q)∧ (q∨ r)∧ (r∨ p)
[email protected] 10 / 41
![Page 14: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/14.jpg)
Diplomacy Problem
“You are chief of protocol for the embassy ball. Thecrown prince instructs you either to invite Peru or toexclude Qatar. The queen asks you to invite eitherQatar or Romania or both. The king, in a spitefulmood, wants to snub either Romania or Peru orboth. Is there a guest list that will satisfy the whimsof the entire royal family?”
(p∨ q)∧ (q∨ r)∧ (r∨ p)
[email protected] 10 / 41
![Page 15: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/15.jpg)
Truth Table
F := (p∨ q)∧ (q∨ r)∧ (r∨ p)
p q r falsifies eval(F)0 0 0 (q∨ r) 00 0 1 — 10 1 0 (p∨ q) 00 1 1 (p∨ q) 01 0 0 (q∨ r) 01 0 1 (r∨ p) 01 1 0 — 11 1 1 (r∨ p) 0
[email protected] 11 / 41
![Page 16: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/16.jpg)
Slightly Harder Example
Slightly Harder Example 1
What are the solutions for the following formula?
(a∨ b∨ c) ∧(a∨ b∨ c) ∧(b∨ c∨ d) ∧(b∨ c∨ d) ∧(a∨ c∨ d) ∧(a∨ c∨ d) ∧(a∨ b∨ d)
a b c d0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 1
a b c d1 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 01 1 1 1
[email protected] 12 / 41
![Page 17: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/17.jpg)
Slightly Harder Example
Slightly Harder Example 1
What are the solutions for the following formula?
(a∨ b∨ c) ∧(a∨ b∨ c) ∧(b∨ c∨ d) ∧(b∨ c∨ d) ∧(a∨ c∨ d) ∧(a∨ c∨ d) ∧(a∨ b∨ d)
a b c d0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 1
a b c d1 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 01 1 1 1
[email protected] 12 / 41
![Page 18: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/18.jpg)
Pythagorean Triples Problem (I) [Ronald Graham, early 80’s]
Will any coloring of the positive integers with red and blueresult in a monochromatic Pythagorean Triple a2 + b2 = c2?
32 + 42 = 52 62 + 82 = 102 52 + 122 = 132 92 + 122 = 152
82 + 152 = 172 122 + 162 = 202 152 + 202 = 252 72 + 242 = 252
102 + 242 = 262 202 + 212 = 292 182 + 242 = 302 162 + 302 = 342
212 + 282 = 352 122 + 352 = 372 152 + 362 = 392 242 + 322 = 402
Best lower bound: a bi-coloring of [1, 7664] s.t. there is nomonochromatic Pythagorean Triple [Cooper & Overstreet 2015].
Myers conjectures that the answer is No [PhD thesis, 2015].
[email protected] 13 / 41
![Page 19: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/19.jpg)
Pythagorean Triples Problem (I) [Ronald Graham, early 80’s]
Will any coloring of the positive integers with red and blueresult in a monochromatic Pythagorean Triple a2 + b2 = c2?
32 + 42 = 52 62 + 82 = 102 52 + 122 = 132 92 + 122 = 152
82 + 152 = 172 122 + 162 = 202 152 + 202 = 252 72 + 242 = 252
102 + 242 = 262 202 + 212 = 292 182 + 242 = 302 162 + 302 = 342
212 + 282 = 352 122 + 352 = 372 152 + 362 = 392 242 + 322 = 402
Best lower bound: a bi-coloring of [1, 7664] s.t. there is nomonochromatic Pythagorean Triple [Cooper & Overstreet 2015].
Myers conjectures that the answer is No [PhD thesis, 2015].
[email protected] 13 / 41
![Page 20: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/20.jpg)
Pythagorean Triples Problem (II) [Ronald Graham, early 80’s]
Will any coloring of the positive integers with red and blueresult in a monochromatic Pythagorean Triple a2 + b2 = c2?
A bi-coloring of [1, n] is encoded using Boolean variables xiwith i ∈ {1, 2, . . . , n} such that xi = 1 (= 0) means that i iscolored red (blue). For each Pythagorean Triple a2 + b2 = c2,two clauses are added: (xa ∨ xb ∨ xc) and (xa ∨ xb ∨ xc).
Theorem ([Heule, Kullmann, and Marek (2016)])
[1, 7824] can be bi-colored s.t. there is no monochromaticPythagorean Triple. This is impossible for [1, 7825].
4 CPU years computation, but 2 days on cluster (800 cores)
200 terabytes proof, but validated with verified checker
[email protected] 14 / 41
![Page 21: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/21.jpg)
Pythagorean Triples Problem (II) [Ronald Graham, early 80’s]
Will any coloring of the positive integers with red and blueresult in a monochromatic Pythagorean Triple a2 + b2 = c2?
A bi-coloring of [1, n] is encoded using Boolean variables xiwith i ∈ {1, 2, . . . , n} such that xi = 1 (= 0) means that i iscolored red (blue). For each Pythagorean Triple a2 + b2 = c2,two clauses are added: (xa ∨ xb ∨ xc) and (xa ∨ xb ∨ xc).
Theorem ([Heule, Kullmann, and Marek (2016)])
[1, 7824] can be bi-colored s.t. there is no monochromaticPythagorean Triple. This is impossible for [1, 7825].
4 CPU years computation, but 2 days on cluster (800 cores)
200 terabytes proof, but validated with verified checker
[email protected] 14 / 41
![Page 22: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/22.jpg)
Pythagorean Triples Problem (II) [Ronald Graham, early 80’s]
Will any coloring of the positive integers with red and blueresult in a monochromatic Pythagorean Triple a2 + b2 = c2?
A bi-coloring of [1, n] is encoded using Boolean variables xiwith i ∈ {1, 2, . . . , n} such that xi = 1 (= 0) means that i iscolored red (blue). For each Pythagorean Triple a2 + b2 = c2,two clauses are added: (xa ∨ xb ∨ xc) and (xa ∨ xb ∨ xc).
Theorem ([Heule, Kullmann, and Marek (2016)])
[1, 7824] can be bi-colored s.t. there is no monochromaticPythagorean Triple. This is impossible for [1, 7825].
4 CPU years computation, but 2 days on cluster (800 cores)
200 terabytes proof, but validated with verified checker
[email protected] 14 / 41
![Page 23: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/23.jpg)
Pythagorean Triples Problem (II) [Ronald Graham, early 80’s]
Will any coloring of the positive integers with red and blueresult in a monochromatic Pythagorean Triple a2 + b2 = c2?
A bi-coloring of [1, n] is encoded using Boolean variables xiwith i ∈ {1, 2, . . . , n} such that xi = 1 (= 0) means that i iscolored red (blue). For each Pythagorean Triple a2 + b2 = c2,two clauses are added: (xa ∨ xb ∨ xc) and (xa ∨ xb ∨ xc).
Theorem ([Heule, Kullmann, and Marek (2016)])
[1, 7824] can be bi-colored s.t. there is no monochromaticPythagorean Triple. This is impossible for [1, 7825].
4 CPU years computation, but 2 days on cluster (800 cores)
200 terabytes proof, but validated with verified checker
[email protected] 14 / 41
![Page 26: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/26.jpg)
Terminology: SAT question
Given a CNF formula,does there exist an assignmentto the Boolean variablesthat satisfies all clauses?
[email protected] 17 / 41
![Page 27: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/27.jpg)
Terminology: Variables and literals
Boolean variable xican be assigned the Boolean values 0 or 1
Literalrefers either to xi or its complement xi
literals xi are satisfied if variable xi is assigned to 1 (true)
literals xi are satisfied if variable xi is assigned to 0 (false)
[email protected] 18 / 41
![Page 28: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/28.jpg)
Terminology: Clauses
ClauseDisjunction of literals: E.g. Cj = (l1 ∨ l2 ∨ l3)
Can be falsified with only one assignment to its literals:All literals assigned to false
Can be satisfied with 2k − 1 assignment to its k literals
One special clause - the empty clause (denoted by ⊥) -which is always falsified
[email protected] 19 / 41
![Page 29: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/29.jpg)
Terminology: Formulae
FormulaConjunction of clauses: E.g. F = C1 ∧ C2 ∧ C3
Is satisfiable if there exists an assignment satisfying allclauses, otherwise unsatisfiable
Formulae are defined in Conjunction Normal Form (CNF)and generally also stored as such - also learned information
Any propositional formula can be efficiently transformedinto CNF [Tseitin ’70]
[email protected] 20 / 41
![Page 30: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/30.jpg)
Terminology: Assignments
AssignmentMapping of the values 0 and 1 to the variablesα ◦ F results in a reduced formula Freduced:• all satisfied clauses are removed• all falsified literals are removed
satisfying assignment ↔ Freduced is empty
falsifying assignment ↔ Freduced contains ⊥partial assignment versus full assignment
[email protected] 21 / 41
![Page 31: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/31.jpg)
Resolution
The most commonly used inference rule in propositional logicis the resolution rule (the operation is denoted by ./)
C∨ x x̄∨DC∨D
Examples for F := (p∨ q)∧ (q∨ r)∧ (r∨ p)
(q∨ p) ./ (p∨ r) = (q∨ r)
(p∨ q) ./ (q∨ r) = (p∨ r)
(q∨ r) ./ (r∨ p) = (q∨ p)
Adding (non-redundant) resolvents until fixpoint, is a completeproof procedure. It produces the empty clause if and only ifthe formula is unsatisfiable
[email protected] 22 / 41
![Page 32: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/32.jpg)
Resolution
The most commonly used inference rule in propositional logicis the resolution rule (the operation is denoted by ./)
C∨ x x̄∨DC∨D
Examples for F := (p∨ q)∧ (q∨ r)∧ (r∨ p)
(q∨ p) ./ (p∨ r) = (q∨ r)
(p∨ q) ./ (q∨ r) = (p∨ r)
(q∨ r) ./ (r∨ p) = (q∨ p)
Adding (non-redundant) resolvents until fixpoint, is a completeproof procedure. It produces the empty clause if and only ifthe formula is unsatisfiable
[email protected] 22 / 41
![Page 33: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/33.jpg)
Resolution
The most commonly used inference rule in propositional logicis the resolution rule (the operation is denoted by ./)
C∨ x x̄∨DC∨D
Examples for F := (p∨ q)∧ (q∨ r)∧ (r∨ p)
(q∨ p) ./ (p∨ r) = (q∨ r)
(p∨ q) ./ (q∨ r) = (p∨ r)
(q∨ r) ./ (r∨ p) = (q∨ p)
Adding (non-redundant) resolvents until fixpoint, is a completeproof procedure. It produces the empty clause if and only ifthe formula is unsatisfiable
[email protected] 22 / 41
![Page 34: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/34.jpg)
Tautology
A clause C is a tautology if it containsfor some variable x, both the literals x and x.
Slightly Harder Example 2
Compute all non-tautological resolvents for:
(a∨ b∨ c)∧ (a∨ b∨ c)∧(b∨ c∨ d)∧ (b∨ c∨ d)∧(a∨ c∨ d)∧ (a∨ c∨ d)∧(a∨ b∨ d)
Which resolvents remain after removing the supersets?
[email protected] 23 / 41
![Page 36: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/36.jpg)
SAT solving: Unit propagation
A unit clause is a clause of size 1
UnitPropagation (α,F):
1: while ⊥ /∈ F and unit clause y exists do2: expand α by adding y = 1 and simplify F3: end while4: return α,F
[email protected] 25 / 41
![Page 37: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/37.jpg)
Unit Propagation: Example
Funit := (x1 ∨ x3 ∨ x4)∧ (x1 ∨ x2 ∨ x3)∧
(x1 ∨ x2)∧ (x1 ∨ x3 ∨ x6)∧ (x1 ∨ x4 ∨ x5)∧
(x1 ∨ x6)∧ (x4 ∨ x5 ∨ x6)∧ (x5 ∨ x6)
[email protected] 26 / 41
![Page 38: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/38.jpg)
Unit Propagation: Example
Funit := (x1 ∨ x3 ∨ x4)∧ (x1 ∨ x2 ∨ x3)∧
(x1 ∨ x2)∧ (x1 ∨ x3 ∨ x6)∧ (x1 ∨ x4 ∨ x5)∧
(x1 ∨ x6)∧ (x4 ∨ x5 ∨ x6)∧ (x5 ∨ x6)
α = {x1=1}
[email protected] 26 / 41
![Page 39: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/39.jpg)
Unit Propagation: Example
Funit := (x1 ∨ x3 ∨ x4)∧ (x1 ∨ x2 ∨ x3)∧
(x1 ∨ x2)∧ (x1 ∨ x3 ∨ x6)∧ (x1 ∨ x4 ∨ x5)∧
(x1 ∨ x6)∧ (x4 ∨ x5 ∨ x6)∧ (x5 ∨ x6)
α = {x1=1, x2=1}
[email protected] 26 / 41
![Page 40: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/40.jpg)
Unit Propagation: Example
Funit := (x1 ∨ x3 ∨ x4)∧ (x1 ∨ x2 ∨ x3)∧
(x1 ∨ x2)∧ (x1 ∨ x3 ∨ x6)∧ (x1 ∨ x4 ∨ x5)∧
(x1 ∨ x6)∧ (x4 ∨ x5 ∨ x6)∧ (x5 ∨ x6)
α = {x1=1, x2=1, x3=1}
[email protected] 26 / 41
![Page 41: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/41.jpg)
Unit Propagation: Example
Funit := (x1 ∨ x3 ∨ x4)∧ (x1 ∨ x2 ∨ x3)∧
(x1 ∨ x2)∧ (x1 ∨ x3 ∨ x6)∧ (x1 ∨ x4 ∨ x5)∧
(x1 ∨ x6)∧ (x4 ∨ x5 ∨ x6)∧ (x5 ∨ x6)
α = {x1=1, x2=1, x3=1, x4=1}
[email protected] 26 / 41
![Page 42: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/42.jpg)
SAT Solving: DPLL
Davis Putnam Logemann Loveland [DP60,DLL62]
Recursive procedure that in each recursive call:Simplifies the formula (using unit propagation)
Splits the formula into two subformulas• Variable selection heuristics (which variable to split on)• Direction heuristics (which subformula to explore first)
[email protected] 27 / 41
![Page 43: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/43.jpg)
DPLL: Example
FDPLL := (x1 ∨ x2 ∨ x3)∧ (x1 ∨ x2 ∨ x3)∧
(x1 ∨ x2 ∨ x3)∧ (x1 ∨ x3)∧ (x1 ∨ x3)
x3
0 1
x2
x1 x3
0 1
0 1 1 0
[email protected] 28 / 41
![Page 44: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/44.jpg)
DPLL: Example
FDPLL := (x1 ∨ x2 ∨ x3)∧ (x1 ∨ x2 ∨ x3)∧
(x1 ∨ x2 ∨ x3)∧ (x1 ∨ x3)∧ (x1 ∨ x3)
x3
0 1
x2
x1 x3
0 1
0 1 1 0
[email protected] 28 / 41
![Page 45: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/45.jpg)
DPLL: Example
FDPLL := (x1 ∨ x2 ∨ x3)∧ (x1 ∨ x2 ∨ x3)∧
(x1 ∨ x2 ∨ x3)∧ (x1 ∨ x3)∧ (x1 ∨ x3)
x3
0 1
x2
x1 x3
0 1
0 1 1 0
[email protected] 28 / 41
![Page 46: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/46.jpg)
DPLL: Slightly Harder Example
Slightly Harder Example 3
Construct a DPLL tree for:
(a∨ b∨ c)∧ (a∨ b∨ c)∧(b∨ c∨ d)∧ (b∨ c∨ d)∧(a∨ c∨ d)∧ (a∨ c∨ d)∧(a∨ b∨ d)
[email protected] 29 / 41
![Page 47: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/47.jpg)
SAT Solving: Decision and Implications
Decision variablesVariable selection heuristics and direction heuristics
Play a crucial role in performance
Implied variablesAssigned by reasoning (e.g. unit propagation)
Maximizing the number of implied variables is animportant aspect of look-ahead SAT solvers
[email protected] 30 / 41
![Page 48: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/48.jpg)
SAT Solving: Clauses ↔ assignments
A clause C represents a set of falsified assignments, i.e.those assignments that falsify all literals in C
A falsifying assignment α for a given formula representsa set of clauses that follow from the formula• For instance with all decision variables• Important feature of conflict-driven SAT solvers
[email protected] 31 / 41
![Page 50: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/50.jpg)
SAT Solving Paradigms
Conflict-drivensearch for short refutation, complete
examples: lingeling, glucose, CaDiCaL
Look-aheadextensive inference, complete
examples: march, OKsolver, kcnfs
Local searchlocal optimizations, incomplete
examples: probSAT, UnitWalk, Dimetheus
[email protected] 33 / 41
![Page 51: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/51.jpg)
Progress of SAT Solvers
0 1,000 2,000 3,000 4,000 5,0000
50
100
150
200
250
CPU time
solved
instances
SAT Competition Winners on the SC2020 Benchmark Suite
kissat-2020maple-lcm-disc-cb-dl-v3-2019maple-lcm-dist-cb-2018maple-lcm-dist-2017maple-comsps-drup-2016lingeling-2014abcdsat-2015lingeling-2013glucose-2012glucose-2011cryptominisat-2010precosat-2009minisat-2008berkmin-2003minisat-2006rsat-2007satelite-gti-2005zchaff-2004limmat-2002
data produced by Armin Biere and Marijn Heule
[email protected] 34 / 41
![Page 52: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/52.jpg)
Applications: Industrial
Model checking• Turing award ’07 Clarke, Emerson, and Sifakis
Software verification
Hardware verification
Equivalence checking
Planning and scheduling
Cryptography
Car configuration
Railway interlocking
[email protected] 35 / 41
![Page 53: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/53.jpg)
Applications: Crafted
Combinatorial challenges and solver obstruction instances
Pigeon-hole problems
Tseitin problems
Mutilated chessboard problems
Sudoku
Factorization problems
Ramsey theory
Rubik’s cube puzzles
[email protected] 36 / 41
![Page 54: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/54.jpg)
Random k-SAT: Introduction
All clauses have length k
Variables have the same probability to occur
Each literal is negated with probability of 50%
Density is ratio Clauses to Variables
[email protected] 37 / 41
![Page 55: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/55.jpg)
Random 3-SAT: % satisfiable, the phase transition
1 2 3 4 5 6 7 80
25
50
75
100
5040302010
variables
clause-variable density
[email protected] 38 / 41
![Page 56: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/56.jpg)
Random 3-SAT: exponential runtime, the threshold
1 2 3 4 5 6 7 80
1,000
2,000
3,000
4,000
5,000
5040302010
variables
clause-variable density
[email protected] 39 / 41
![Page 57: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/57.jpg)
SAT Game
SAT Gameby Olivier Roussel
http://www.cs.utexas.edu/~marijn/game/
[email protected] 40 / 41
![Page 58: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f20/slides/introduction.pdfReasoning, EPiC Series in Computing 73, pp. 373-389. marijn@cmu.edu 7 / 41 Introduction](https://reader035.vdocuments.net/reader035/viewer/2022071610/6149ab2012c9616cbc68e927/html5/thumbnails/58.jpg)
Introduction to Automated Reasoningand Satisfiability
Marijn J.H. Heule
http://www.cs.cmu.edu/~mheule/15816-f20/
https://cmu.zoom.us/j/93095736668
Automated Reasoning and SatisfiabilitySeptember 2, 2020
[email protected] 41 / 41