SlideShare a Scribd company logo
The SAT Problem
Structure through Visualization
Stephen Dunn
November 13, 2013
Some Terminology
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 2 / 12
■ A variable is a Boolean variable which can be assigned
either T or F
■ A literal is a variable which may be negated (¬x vs x)
Some Terminology
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 2 / 12
■ A variable is a Boolean variable which can be assigned
either T or F
■ A literal is a variable which may be negated (¬x vs x)
■ We write OR as ∨, AND as ∧
■ Example:
If we let x = T, then ¬x = F
■ Example:
(A ∨ ¬B ∨ C) ∧ (A ∨ B ∨ ¬C) ∧ (¬A ∨ ¬B ∨ C)
The SAT Problem
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 3 / 12
■ Can we satisfy k literals in c clauses (CNF)?
The SAT Problem
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 3 / 12
■ Can we satisfy k literals in c clauses (CNF)?
▲ If yes, what are the assignments?
▲ If no, exhaustive search needed? (P = NP)
■ Problem is NP-complete (Cook ’71)[1]
■ Example:
(¬A ∨ B ∨ ¬C)∧
(¬A ∨ ¬B ∨ D) ∧ (¬D)
The SAT Problem
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 3 / 12
■ Can we satisfy k literals in c clauses (CNF)?
▲ If yes, what are the assignments?
▲ If no, exhaustive search needed? (P = NP)
■ Problem is NP-complete (Cook ’71)[1]
■ Example:
(¬A ∨ B ∨ ¬C)∧
(¬A ∨ ¬B ∨ D) ∧ (¬D)
Some solutions:
A=F, B=T, C=F, D=F
A=F, B=T, C=T, D=F
A=T, B=F, C=F, D=F
Satisfiable?
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 4 / 12
(A ∨ B ∨ C)∧
(¬A ∨ B ∨ C)∧
(A ∨ ¬B ∨ C)∧
(¬A ∨ ¬B ∨ C)∧
(A ∨ B ∨ ¬C)∧
(¬A ∨ B ∨ ¬C)∧
(A ∨ ¬B ∨ ¬C)∧
(¬A ∨ B ∨ D)∧
(¬A ∨ ¬B ∨ ¬D)
Satisfiable?
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 4 / 12
(A ∨ B ∨ C)∧
(¬A ∨ B ∨ C)∧
(A ∨ ¬B ∨ C)∧
(¬A ∨ ¬B ∨ C)∧
(A ∨ B ∨ ¬C)∧
(¬A ∨ B ∨ ¬C)∧
(A ∨ ¬B ∨ ¬C)∧
(¬A ∨ B ∨ D)∧
(¬A ∨ ¬B ∨ ¬D)
Yes! A = T, B = T, C = T, D = F
More Difficult?
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 5 / 12
(A ∨ B ∨ C)∧
(¬A ∨ B ∨ C)∧
(A ∨ ¬B ∨ C)∧
(¬A ∨ ¬B ∨ C)∧
(A ∨ B ∨ ¬C)∧
(¬A ∨ B ∨ ¬C)∧
(A ∨ ¬B ∨ ¬C)∧
(¬A ∨ ¬B ∨ D)∧ ← B is now negated
(¬A ∨ ¬B ∨ ¬D)
More Difficult?
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 5 / 12
(A ∨ B ∨ C)∧
(¬A ∨ B ∨ C)∧
(A ∨ ¬B ∨ C)∧
(¬A ∨ ¬B ∨ C)∧
(A ∨ B ∨ ¬C)∧
(¬A ∨ B ∨ ¬C)∧
(A ∨ ¬B ∨ ¬C)∧
(¬A ∨ ¬B ∨ D)∧ ← B is now negated
(¬A ∨ ¬B ∨ ¬D)
No solution!
DP (DLL)
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 6 / 12
Algorithm 1 DP Algorithm[2] [3]
1: procedure DP(c) ⊲ Derive ∅ or F from CNF(c)
2: while c = {F} and c = ∅ do
3: δ ← SetAtomicLiterals(c)
4: if |δ| ≤ 1 return c
5: δ ← SetPureLiterals(c)
6: if δ = c then loop ⊲ Propagate pure literals
7: c ← SetV ar(x ∈ δ, δ)
8: end while
9: return c
10: end procedure
Stochastic Search
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 7 / 12
■ Randomly assign variables
■ Improve working solution
▲ Escape local minima
▲ Avoid full state space
▲ Determine unsat. without exhaustive search
∅
x1
x2
x3 ¬x3
¬x2
. . .
¬x1
. . .
State Space
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 8 / 12
Visualizations
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 9 / 12
Figure 1: Literal-Based Renderings[4]
Visualizations (2)
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 10 / 12
Figure 2: Literal-Based Renderings[4]
Visualizations (3)
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 11 / 12
Figure 3: Clause-Based Renderings[5]
References
Some Terminology
The SAT Problem
Satisfiable?
More Difficult?
DP (DLL)
Stochastic Search
State Space
Visualizations
Visualizations (2)
Visualizations (3)
References
Visualization November 13, 2013 Dunn – 12 / 12
[1] Cook, S. A. (1971). “The complexity of theorem-proving
procedures”. Proceedings of the 3rd Annual ACM
Symposium on Theory of Computing: 151-158.
[2] Davis, Martin and Putnam, Hilary (1960). “A Computing
Procedure for Quantification Theory”. Journal of the
ACM 7 (3): 201-215.
[3] Davis, M.; Logemann, G.; Loveland, D. (1962). “A machine
program for theorem-proving”. Communications of the
ACM 5 (7): 394-397.
[4] Sinz, Carsten. “Visualizing the internal structure of SAT
instances (preliminary report)”. SAT. Citeseer, 2004.
[5] Sinz, Carsten. “Visualizing SAT instances and runs of the
DPLL algorithm”. Journal of Automated Reasoning (Vol.
39 Num. 2): 219-243. Springer, 2007.

More Related Content

PPT
5 csp
PPT
PPT
4 informed-search
PDF
Presentation on Bayesian Structure from Motion
PPTX
3.4 deterministic pda
PDF
Geographic Information System (April – 2013) [Revised Syllabus | Question Paper]
PPT
6 games
PDF
Skiena algorithm 2007 lecture21 other reduction
5 csp
4 informed-search
Presentation on Bayesian Structure from Motion
3.4 deterministic pda
Geographic Information System (April – 2013) [Revised Syllabus | Question Paper]
6 games
Skiena algorithm 2007 lecture21 other reduction

Similar to SAT Visualization (20)

PPT
Propostional logic and model checking.ppt
PPTX
Theorem proving 2018 2019
PDF
Introduction to Max-SAT and Max-SAT Evaluation
PDF
Theorem proving 2018 2019
PPT
Satisfiability
PDF
PDF
Cerutti -- TAFA2013
PDF
PPT
Np cooks theorem
PDF
smtlecture.3
PDF
Backdoors to Satisfiability
PDF
Novel analysis of transition probabilities in randomized k sat algorithm
PDF
satandsmt.stpetersburg
PDF
20100822 satandsmt bruttomesso
PPT
pnp2.ppt
PDF
Writing a SAT solver as a hobby project
PPTX
Discrete Math IP4 - Automata Theory
PDF
28 Dealing with the NP Poblems: Exponential Search and Approximation Algorithms
PDF
Comparing human solving time with SAT-solving for Sudoku problems
PDF
P versus NP
Propostional logic and model checking.ppt
Theorem proving 2018 2019
Introduction to Max-SAT and Max-SAT Evaluation
Theorem proving 2018 2019
Satisfiability
Cerutti -- TAFA2013
Np cooks theorem
smtlecture.3
Backdoors to Satisfiability
Novel analysis of transition probabilities in randomized k sat algorithm
satandsmt.stpetersburg
20100822 satandsmt bruttomesso
pnp2.ppt
Writing a SAT solver as a hobby project
Discrete Math IP4 - Automata Theory
28 Dealing with the NP Poblems: Exponential Search and Approximation Algorithms
Comparing human solving time with SAT-solving for Sudoku problems
P versus NP
Ad

Recently uploaded (20)

PPTX
Protein & Amino Acid Structures Levels of protein structure (primary, seconda...
PPTX
Science Quipper for lesson in grade 8 Matatag Curriculum
PPTX
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
PDF
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
PPTX
2Systematics of Living Organisms t-.pptx
DOCX
Q1_LE_Mathematics 8_Lesson 5_Week 5.docx
PPT
protein biochemistry.ppt for university classes
PPT
6.1 High Risk New Born. Padetric health ppt
PDF
CHAPTER 3 Cell Structures and Their Functions Lecture Outline.pdf
PPT
POSITIONING IN OPERATION THEATRE ROOM.ppt
PPTX
Classification Systems_TAXONOMY_SCIENCE8.pptx
PDF
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
PPTX
neck nodes and dissection types and lymph nodes levels
PPTX
7. General Toxicologyfor clinical phrmacy.pptx
PPTX
2. Earth - The Living Planet Module 2ELS
PPTX
ECG_Course_Presentation د.محمد صقران ppt
PDF
. Radiology Case Scenariosssssssssssssss
PDF
SEHH2274 Organic Chemistry Notes 1 Structure and Bonding.pdf
PPTX
EPIDURAL ANESTHESIA ANATOMY AND PHYSIOLOGY.pptx
PDF
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
Protein & Amino Acid Structures Levels of protein structure (primary, seconda...
Science Quipper for lesson in grade 8 Matatag Curriculum
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
2Systematics of Living Organisms t-.pptx
Q1_LE_Mathematics 8_Lesson 5_Week 5.docx
protein biochemistry.ppt for university classes
6.1 High Risk New Born. Padetric health ppt
CHAPTER 3 Cell Structures and Their Functions Lecture Outline.pdf
POSITIONING IN OPERATION THEATRE ROOM.ppt
Classification Systems_TAXONOMY_SCIENCE8.pptx
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
neck nodes and dissection types and lymph nodes levels
7. General Toxicologyfor clinical phrmacy.pptx
2. Earth - The Living Planet Module 2ELS
ECG_Course_Presentation د.محمد صقران ppt
. Radiology Case Scenariosssssssssssssss
SEHH2274 Organic Chemistry Notes 1 Structure and Bonding.pdf
EPIDURAL ANESTHESIA ANATOMY AND PHYSIOLOGY.pptx
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
Ad

SAT Visualization

  • 1. The SAT Problem Structure through Visualization Stephen Dunn November 13, 2013
  • 2. Some Terminology Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 2 / 12 ■ A variable is a Boolean variable which can be assigned either T or F ■ A literal is a variable which may be negated (¬x vs x)
  • 3. Some Terminology Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 2 / 12 ■ A variable is a Boolean variable which can be assigned either T or F ■ A literal is a variable which may be negated (¬x vs x) ■ We write OR as ∨, AND as ∧ ■ Example: If we let x = T, then ¬x = F ■ Example: (A ∨ ¬B ∨ C) ∧ (A ∨ B ∨ ¬C) ∧ (¬A ∨ ¬B ∨ C)
  • 4. The SAT Problem Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 3 / 12 ■ Can we satisfy k literals in c clauses (CNF)?
  • 5. The SAT Problem Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 3 / 12 ■ Can we satisfy k literals in c clauses (CNF)? ▲ If yes, what are the assignments? ▲ If no, exhaustive search needed? (P = NP) ■ Problem is NP-complete (Cook ’71)[1] ■ Example: (¬A ∨ B ∨ ¬C)∧ (¬A ∨ ¬B ∨ D) ∧ (¬D)
  • 6. The SAT Problem Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 3 / 12 ■ Can we satisfy k literals in c clauses (CNF)? ▲ If yes, what are the assignments? ▲ If no, exhaustive search needed? (P = NP) ■ Problem is NP-complete (Cook ’71)[1] ■ Example: (¬A ∨ B ∨ ¬C)∧ (¬A ∨ ¬B ∨ D) ∧ (¬D) Some solutions: A=F, B=T, C=F, D=F A=F, B=T, C=T, D=F A=T, B=F, C=F, D=F
  • 7. Satisfiable? Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 4 / 12 (A ∨ B ∨ C)∧ (¬A ∨ B ∨ C)∧ (A ∨ ¬B ∨ C)∧ (¬A ∨ ¬B ∨ C)∧ (A ∨ B ∨ ¬C)∧ (¬A ∨ B ∨ ¬C)∧ (A ∨ ¬B ∨ ¬C)∧ (¬A ∨ B ∨ D)∧ (¬A ∨ ¬B ∨ ¬D)
  • 8. Satisfiable? Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 4 / 12 (A ∨ B ∨ C)∧ (¬A ∨ B ∨ C)∧ (A ∨ ¬B ∨ C)∧ (¬A ∨ ¬B ∨ C)∧ (A ∨ B ∨ ¬C)∧ (¬A ∨ B ∨ ¬C)∧ (A ∨ ¬B ∨ ¬C)∧ (¬A ∨ B ∨ D)∧ (¬A ∨ ¬B ∨ ¬D) Yes! A = T, B = T, C = T, D = F
  • 9. More Difficult? Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 5 / 12 (A ∨ B ∨ C)∧ (¬A ∨ B ∨ C)∧ (A ∨ ¬B ∨ C)∧ (¬A ∨ ¬B ∨ C)∧ (A ∨ B ∨ ¬C)∧ (¬A ∨ B ∨ ¬C)∧ (A ∨ ¬B ∨ ¬C)∧ (¬A ∨ ¬B ∨ D)∧ ← B is now negated (¬A ∨ ¬B ∨ ¬D)
  • 10. More Difficult? Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 5 / 12 (A ∨ B ∨ C)∧ (¬A ∨ B ∨ C)∧ (A ∨ ¬B ∨ C)∧ (¬A ∨ ¬B ∨ C)∧ (A ∨ B ∨ ¬C)∧ (¬A ∨ B ∨ ¬C)∧ (A ∨ ¬B ∨ ¬C)∧ (¬A ∨ ¬B ∨ D)∧ ← B is now negated (¬A ∨ ¬B ∨ ¬D) No solution!
  • 11. DP (DLL) Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 6 / 12 Algorithm 1 DP Algorithm[2] [3] 1: procedure DP(c) ⊲ Derive ∅ or F from CNF(c) 2: while c = {F} and c = ∅ do 3: δ ← SetAtomicLiterals(c) 4: if |δ| ≤ 1 return c 5: δ ← SetPureLiterals(c) 6: if δ = c then loop ⊲ Propagate pure literals 7: c ← SetV ar(x ∈ δ, δ) 8: end while 9: return c 10: end procedure
  • 12. Stochastic Search Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 7 / 12 ■ Randomly assign variables ■ Improve working solution ▲ Escape local minima ▲ Avoid full state space ▲ Determine unsat. without exhaustive search ∅ x1 x2 x3 ¬x3 ¬x2 . . . ¬x1 . . .
  • 13. State Space Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 8 / 12
  • 14. Visualizations Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 9 / 12 Figure 1: Literal-Based Renderings[4]
  • 15. Visualizations (2) Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 10 / 12 Figure 2: Literal-Based Renderings[4]
  • 16. Visualizations (3) Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 11 / 12 Figure 3: Clause-Based Renderings[5]
  • 17. References Some Terminology The SAT Problem Satisfiable? More Difficult? DP (DLL) Stochastic Search State Space Visualizations Visualizations (2) Visualizations (3) References Visualization November 13, 2013 Dunn – 12 / 12 [1] Cook, S. A. (1971). “The complexity of theorem-proving procedures”. Proceedings of the 3rd Annual ACM Symposium on Theory of Computing: 151-158. [2] Davis, Martin and Putnam, Hilary (1960). “A Computing Procedure for Quantification Theory”. Journal of the ACM 7 (3): 201-215. [3] Davis, M.; Logemann, G.; Loveland, D. (1962). “A machine program for theorem-proving”. Communications of the ACM 5 (7): 394-397. [4] Sinz, Carsten. “Visualizing the internal structure of SAT instances (preliminary report)”. SAT. Citeseer, 2004. [5] Sinz, Carsten. “Visualizing SAT instances and runs of the DPLL algorithm”. Journal of Automated Reasoning (Vol. 39 Num. 2): 219-243. Springer, 2007.