Truth-tables
ICS-E5050 Advanced Course in
Boolean Satisfiability
Truth table for φ = (a ↔ b) ∨ (c → d):
Lecture 5: Proof Systems and Algorithms
Aalto University
School of Science
Department of Computer Science
Spring 2016
v(a) v(b) v(c) v(d) v(φ)
0
0
0
0
1
0
0
0
1
1
1
0
0
1
0
0
0
1
1
1
0
1
0
0
1
0
1
0
1
1
0
1
1
0
0
1
0
1
1
1
1
0
0
0
1
1
0
0
1
1
1
0
1
0
0
1
0
1
1
1
1
1
0
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
ACBS / Proof Systems
SCI CS
2/26
Truth-tables vs binary search trees
The Resolution Rule
Binary search tree for φ = (a ↔ b) ∨ (c → d):
¬c
b
¬d
c
d ¬d
¬c
d ¬d
l∨φ
l ∨ φ0
φ ∨ φ0
a
¬a
¬b
Resolution
b
¬b
c
d ¬d
¬c
d ¬d
c
d ¬d
Here φ ∨ φ0 is the resolvent of l ∨ φ and l ∨ φ0 .
¬c
d ¬d
Special case: The resolvent of l and l is the empty clause ⊥.
Theorem
Let φ∨φ0 be the resolvent of l∨φ and l∨φ0 . Then {l∨φ, l∨φ0 } |= φ∨φ0 .
c
d ¬d
Proof
Let v be any valuation. Assume v |= l ∨ φ and v |= l ∨ φ0 .
Since either v 6|= l or v 6|= l, at least one of v |= φ and v |= φ0 must hold.
Hence v |= φ ∨ φ0 .
d
ACBS / Proof Systems
ACBS / Proof Systems
SCI CS
SCI CS
3/26
4/26
Refutation Completeness of Resolution
Unit Resolution
Resolution Cannot Derive All Consequences
Consider the logical consequence a |= a ∨ b. Clearly, we cannot derive
a ∨ b from a with resolution. Resolution is implicationally incomplete.
Unit Resolution
l
Theorem
Assume the clause set Σ is unsatisfiable. Then we can derive ⊥ from
Σ with the resolution rule.
Unrestricted application of the resolution rule is expensive.
Proof
Induction hypothesis: For any clause set C with N variables, C is unsatisfiable if and only if ⊥ is derivable from C by resolution.
Base case 0: The only unsatisfiable clause set with 0 variables is {⊥},
and ⊥ is trivially derivable from it.
Inductive case N ≥ 1: Let C be a clause set with N variables. Let x
be any variable occurring in C. Construct clause sets C0 = {c\{x}|c ∈
C, ¬x 6∈ c} C1 = {c\{¬x}|c ∈ C, x 6∈ c}.
Both of these sets must be unsatisfiable.
By the induction hypothesis, ⊥ is derivable from both.
...
l ∨ l1 ∨ · · · ∨ ln
l1 ∨ · · · ∨ ln
Unit resolution restricts one of the clauses to be a unit clause
consisting of only one literal.
Performing all possible unit resolution steps on a clause set can
be done in linear time [DG84], and there are very efficient
implementations [MMZ+ 01].
ACBS / Proof Systems
ACBS / Proof Systems
SCI CS
SCI CS
5/26
6/26
Unit Propagation
Binary Search with Unit Propagation
The Davis-Putnam-Logemann-Loveland procedure DPLL [DLL62]
Unit Propagation algorithm UNIT(v, C)
¬a
a
¬b
b
¬b
b
c
¬c
c
¬c
Inputs: clause set C, partial valuation v : X → {0, 1}
1. Q := 0/
2. For all c ∈ C with one unassigned literal l ∈ c and v(l0 ) for all
l0 ∈ c\{l}, do Q := Q ∪ {l}
3. if Q = 0/ then return (TRUE,v)
a∨d
b∨c
4. Choose any l ∈ Q and let Q := Q\{l}
5. If v(l) = 0, then return (FALSE,v)
¬c
c
¬c
c
6. If l = x then v := v ∪ {(x, 1)}, if l = ¬x then v := v ∪ {(x, 0)}
7. Go to step 3
¬d d ¬d d ¬d d ¬d d ¬d d ¬d d ¬d d ¬d d
(By v(¬x) = i we mean v(x) = 1 − i.)
ACBS / Proof Systems
ACBS / Proof Systems
SCI CS
SCI CS
7/26
8/26
Davis-Putnam-Logemann-Loveland Procedure
Heuristics for Branching Variable Selection
[DLL62]
Davis-Putnam-Logemann-Loveland procedure
1:
2:
3:
4:
5:
6:
7:
P ROCEDURE DPLL(v,C)
(sat, v) := UNIT(v, C);
I F sat = FALSE T HEN R ETURN false;
x := any variable such that v(x) is undefined;
I F no such variable exists T HEN R ETURN true;
I F DPLL(v ∪ {(x, 1)},C) = true T HEN R ETURN true;
R ETURN DPLL(v ∪ {(x, 0)},C);
1. MOMS Maximum Occurrences in clauses with Minimum Size
[CA96]: score(x) = 1024w(x)w(¬x) + w(x) + w(¬x) + 1 where
w(l) is the number of occurrences of l in 2-literal clauses
2. UP lookahead heuristics [LA97]: same, but define w(l) as the
number of new clauses 2-literal clauses (2 unassigned literals, no
true literals) obtained by UP after setting l true.
To test satisfiability of C, make call DPLL(v,C) where v = 0/ is the
empty valuation.
ACBS / Proof Systems
ACBS / Proof Systems
SCI CS
SCI CS
9/26
10/26
Classification of Problems by Complexity
DPLL for Model-Counting
#SAT - Model-Counting
problem
SAT
minimal models
#SAT
SSAT
QBF
find a solution
find best solution
how many solutions?
∃ − ∀ − R alternation
∃ − ∀ alternation
class
NP
FPNP
#P, PP
PSPACE
PSPACE
search space
trees
#SAT is the problem of counting the number of satisfying assignments
of a propositional formula.
Main approaches:
and-or trees
I
I
All solvable by variants of the Davis-Putnam procedure
I
DPLL with Component Analysis [BP00], Component Caching
[BDP03, SBB+ 04]
model-counts from Deterministic Decomposable Negation Normal
Form d-DNNF [Dar02]
approximate methods (sampling) [KSS11]
ACBS / Proof Systems
ACBS / Proof Systems
SCI CS
SCI CS
11/26
12/26
DPLL for Model-Counting
DPLL for Quantified Boolean Formulas
#SAT by the Davis-Putnam-Logemann-Loveland procedure
1:
2:
3:
4:
5:
6:
7:
8:
P ROCEDURE #SAT-DPLL(v,C)
(sat, v) := UNIT(v, C);
I F sat = FALSE T HEN R ETURN 0;
x := any variable such that v(x) is undefined and x occurs in
some c ∈ C without l ∈ c such that v(l) = 1;
I F no such x exists T HEN R ETURN 2|U|
where U = {x ∈ X|v(x) is undefined};
R ETURN #SAT-DPLL(v ∪ {(x, 0)},C) + #SAT-DPLL(v ∪ {(x, 1)},C);
To count the models of C, make call DPLL(v,C) where v = 0/ is the
empty valuation.
Quantified Boolean Formulas [Sto76]
∀a∃b∀c(a ∨ b ∨ c)
Generalization of the SAT problem, with SAT corresponding to
pure ∃ QBF
Prefix ∃x1 x2 · · · xn ∀y1 y2 · · · ym ∃ · · · induces an AND-OR tree of
valuations
Applications: problems outside NP in Polynomial Hierarchy PH:
I ∃ plan ∀ contingencies ∃ action sequence reaching goals [Rin07]
(2-agent games)
ACBS / Proof Systems
ACBS / Proof Systems
SCI CS
SCI CS
13/26
14/26
DPLL for Quantified Boolean Formulas
DPLL for Minimal Models
QBF by Davis-Putnam-Logemann-Loveland procedure
INPUTS: q : X → {∃, ∀} and a strict partial order x1 < x2 on variables
1: P ROCEDURE QBF-DPLL(v,C)
2: (sat, v0 ) := UNIT(v, C);
3: I F sat = FALSE T HEN R ETURN false;
4: I F v(x) undefined and v0 (x) defined for some x such that q(x) = ∀
5:
T HEN R ETURN false;
6: x := such that v0 (x) undefined and v0 (x0 ) defined for all x0 < x;
7: I F no such variable exists T HEN R ETURN true;
8: I F q(x) = ∃ T HEN
9:
I F QBF-DPLL(v0 ∪ {(x, 1)},C) = true T HEN R ETURN true;
10: E LSE
11:
I F QBF-DPLL(v0 ∪ {(x, 1)},C) = false T HEN R ETURN false;
12: R ETURN QBF-DPLL(v0 ∪ {(x, 0)},C);
Minimal Models
For a formula φ, find the satisfying valuation with the smallest
cardinality {x ∈ X|v(x) = 1}.
Special case of the MAXSAT problem.
Main approaches
I
DPLL and CDCL
ACBS / Proof Systems
ACBS / Proof Systems
SCI CS
SCI CS
15/26
16/26
DPLL for Minimal Models
Extended Resolution
Minimal models by the Davis-Putnam-Logemann-Loveland
procedure
1: P ROCEDURE MIN-DPLL(v,C)
2: (sat, v) := UNIT(v, C);
3: I F sat = FALSE T HEN R ETURN (∞,v);
4: x := any variable such that v(x) is undefined and x occurs in
5:
some c ∈ C without l ∈ c such that v(l) = 1;
6: I F no such x exists T HEN R ETURN (|{x ∈ X|v(x) = 1}|, v);
7: (m1 , v1 ) = MIN-DPLL(v ∪ {(x, 0)},C);
8: (m2 , v2 ) = MIN-DPLL(v ∪ {(x, 1)},C));
9: I F m1 < m2 T HEN R ETURN (m1 , v1 ) E LSE R ETURN (m2 , v2 );
Add w ↔ φ (in clausal form) where w is a new atomic proposition
Pigeon Hole formulas (fit N + 1 pigeons in N holes)
WN
i=1 vi,j for all j ∈ {1, . . . , N + 1} and
¬vi,j ∨ ¬vi,k for all {j, k} ⊂ {1, . . . , N + 1}, i ∈ {1, . . . , N}, j 6= k
have exponential size resolution proofs only [Hak85]
Polynomial size Extended Resolution proofs exist: add clauses
wn−1
i,j ≡ vi,j ∨ (vn,j ∧ vi,n+1 ) for all i ∈ {1, . . . , n − 1}, j ∈ {1, . . . , n}
ACBS / Proof Systems
ACBS / Proof Systems
SCI CS
SCI CS
17/26
18/26
Frege Systems
Relative Power of Proof Systems
Collection of inference rules of the form
φ1 , . . . , φn
φ
Frege Systems
Extended Resolution
Frege’s original system
A → (B → A)
(A → B) → (¬B → ¬A)
(A → (B → C)) → ((A → B) → (A → C)) ¬¬A → A
(A → (B → C)) → (B → (A → C))
A → ¬¬A
Inference rule Modus Ponens:
P
Resolution
CDCL w/o restarts
P→Q
Q
Resolution is more powerful
than DPLL (proofs by DPLL
can be exponentially bigger)
CDCL exponentially more
powerful than DPLL [BKS04]
CDCL with restarts is as
powerful as resolution [PD09]
Tree Resolution (DPLL)
φ
resolution rule + Weakening φ∨φ0 is implicationally complete
There are Frege systems with poly-size proofs for Pigeon Hole
formulas
ACBS / Proof Systems
ACBS / Proof Systems
SCI CS
SCI CS
19/26
20/26
Gilles Audemard, George Katsirelos, and Laurent Simon.
A restriction of extended resolution for clause learning SAT solvers.
In Proceedings of the 24th AAAI Conference on Artificial Intelligence (AAAI-10), pages
15–20. AAAI Press, 2010.
Challenges to Algorithms for SAT
Fahiem Bacchus, Shannon Dalmao, and Toniann Pitassi.
Algorithms and complexity results for #SAT and Bayesian inference.
In Foundations of Computer Science, 2003. Proceedings. 44th Annual IEEE Symposium
on, pages 340–351. IEEE, 2003.
Paul Beame, Henry Kautz, and Ashish Sabharwal.
Towards understanding and harnessing the potential of clause learning.
Journal of Artificial Intelligence Research, 22:319–351, 2004.
Although it is not clear how important Extended Resolution is in
practice, many researchers believe that proof systems stronger
than Resolution would help achieving better algorithms for SAT
SAT solvers extended with ER [Hua10, AKS10] not effective so far
Robert J Bayardo and Joseph Daniel Pehoushek.
Counting models using connected components.
In Proceedings of the 17th National Conference on Artificial Intelligence (AAAI-2000) and
the 12th Conference on Innovative Applications of Artificial Intelligence (IAAI-2000), pages
157–162. AAAI Press / The MIT Press, 2000.
J. M. Crawford and L. D. Auton.
Experimental results on the crossover point in random 3-SAT.
Artificial Intelligence, 81:31–57, 1996.
Adnan Darwiche.
A compiler for deterministic, decomposable negation normal form.
ACBS / Proof Systems
SCI CS
22/26
ACBS / Proof Systems
SCI CS
21/26
In Proceedings of the 18th National Conference on Artificial Intelligence (AAAI-2002) and
the 14th Conference on Innovative Applications of Artificial Intelligence (IAAI-2002), pages
627–634, 2002.
William F. Dowling and Jean H. Gallier.
Linear-time algorithms for testing the satisfiability of propositional Horn formulae.
Journal of Logic Programming, 1(3):267–284, 1984.
M. Davis, G. Logemann, and D. Loveland.
A machine program for theorem proving.
Communications of the ACM, 5:394–397, 1962.
Armin Haken.
The intractability of resolution.
Theoretical Computer Science, 39:297–308, 1985.
Jinbo Huang.
Extended clause learning.
Artificial Intelligence, 174(15):1277–1284, 2010.
Lukas Kroc, Ashish Sabharwal, and Bart Selman.
Leveraging belief propagation, backtrack search, and statistics for model counting.
Annals of Operations Research, 184(1):209–231, 2011.
Chu Min Li and Anbulagan.
Heuristics based on unit propagation for satisfiability problems.
ACBS / Proof Systems
In Martha Pollack, editor, Proceedings of the 15th International Joint Conference on
SCI CS
23/26
Artificial Intelligence, pages 366–371. Morgan Kaufmann Publishers, August 1997.
Matthew W. Moskewicz, Conor F. Madigan, Ying Zhao, Lintao Zhang, and Sharad Malik.
Chaff: engineering an efficient SAT solver.
In Proceedings of the 38th ACM/IEEE Design Automation Conference (DAC’01), pages
530–535. ACM Press, 2001.
K. Pipatsrisawat and A. Darwiche.
On the power of clause-learning SAT solvers with restarts.
In I. P. Gent, editor, Proceedings of the 15th International Conference on Principles and
Practice of Constraint Programming, CP 2009, number 5732 in Lecture Notes in Computer
Science, pages 654–668. Springer-Verlag, 2009.
Jussi Rintanen.
Asymptotically optimal encodings of conformant planning in QBF.
In Proceedings of the 22nd AAAI Conference on Artificial Intelligence (AAAI-07), pages
1045–1050. AAAI Press, 2007.
Tian Sang, Fahiem Bacchus, Paul Beame, Henry Kautz, and Toniann Pitassi.
Combining component caching and clause learning for effective model counting.
In Holger H. Hoos and David G. Mitchell, editors, Theory and Applications of Satisfiability
Testing, 7th International Conference, SAT 2004, Vancouver, BC, Canada, May 10-13,
2004, Revised Selected Papers, volume 3542 of Lecture Notes in Computer Science.
Springer-Verlag, 2004.
L. J. Stockmeyer.
The polynomial-time hierarchy.
Theoretical Computer Science, 3(1):1–22, 1976.
ACBS / Proof Systems
SCI CS
24/26
© Copyright 2026 Paperzz