propositional logic resolution, dpll and tableau
TRANSCRIPT
Propositional LogicResolution, DPLL and tableau
Mario Alviano
University of Calabria, Italy
A.Y. 2014/2015
1 / 36
Outline
1 Propositional resolutionResolutionRefutationsRefinements and examples
2 DPLL
3 Propositional Tableau
4 Exercises
2 / 36
Outline
1 Propositional resolutionResolutionRefutationsRefinements and examples
2 DPLL
3 Propositional Tableau
4 Exercises
3 / 36
Outline
1 Propositional resolutionResolutionRefutationsRefinements and examples
2 DPLL
3 Propositional Tableau
4 Exercises
4 / 36
Propositional resolution (1)
Main observation
(a ∨ b) ∧ (¬a ∨ c) ≡ (a ∨ b) ∧ (¬a ∨ c) ∧ (b ∨ c)
(a ∨ b) ∧ (¬a ∨ c) |= (b ∨ c)
More general
C1 ∧ · · · ∧ Ck ∧ (a ∨ L11 ∨ . . . ∨ L1
n) ∧ (¬a ∨ L21 ∨ . . . ∨ L2
m)|= (L1
1 ∨ . . . ∨ L1n ∨ L2
1 ∨ . . . ∨ L2m)
This is known as resolution!
5 / 36
Propositional resolution (1)
Main observation
(a ∨ b) ∧ (¬a ∨ c) ≡ (a ∨ b) ∧ (¬a ∨ c) ∧ (b ∨ c)
(a ∨ b) ∧ (¬a ∨ c) |= (b ∨ c)
More general
C1 ∧ · · · ∧ Ck ∧ (a ∨ L11 ∨ . . . ∨ L1
n) ∧ (¬a ∨ L21 ∨ . . . ∨ L2
m)|= (L1
1 ∨ . . . ∨ L1n ∨ L2
1 ∨ . . . ∨ L2m)
This is known as resolution!
5 / 36
Propositional resolution (1)
Main observation
(a ∨ b) ∧ (¬a ∨ c) ≡ (a ∨ b) ∧ (¬a ∨ c) ∧ (b ∨ c)
(a ∨ b) ∧ (¬a ∨ c) |= (b ∨ c)
More general
C1 ∧ · · · ∧ Ck ∧ (a ∨ L11 ∨ . . . ∨ L1
n) ∧ (¬a ∨ L21 ∨ . . . ∨ L2
m)|= (L1
1 ∨ . . . ∨ L1n ∨ L2
1 ∨ . . . ∨ L2m)
This is known as resolution!
5 / 36
Propositional resolution (1)
Main observation
(a ∨ b) ∧ (¬a ∨ c) ≡ (a ∨ b) ∧ (¬a ∨ c) ∧ (b ∨ c)
(a ∨ b) ∧ (¬a ∨ c) |= (b ∨ c)
More general
C1 ∧ · · · ∧ Ck ∧ (a ∨ L11 ∨ . . . ∨ L1
n) ∧ (¬a ∨ L21 ∨ . . . ∨ L2
m)|= (L1
1 ∨ . . . ∨ L1n ∨ L2
1 ∨ . . . ∨ L2m)
This is known as resolution!
5 / 36
Propositional resolution (2)
Additional observation
(a ∨ a ∨ B) ≡ (a ∨ B)
Remove duplicated literals in clausesIt is known as factorization
Resolution (set notation)
C1, . . . ,Ck , {a ∨ L11, . . . ,L
1n}, {¬a,L2
1, . . . ,L2m}
|= {L11, . . . ,L
1n,L2
1, . . . ,L2m}
Factorization comes “for free”!
6 / 36
Propositional resolution (2)
Additional observation
(a ∨ a ∨ B) ≡ (a ∨ B)
Remove duplicated literals in clausesIt is known as factorization
Resolution (set notation)
C1, . . . ,Ck , {a ∨ L11, . . . ,L
1n}, {¬a,L2
1, . . . ,L2m}
|= {L11, . . . ,L
1n,L2
1, . . . ,L2m}
Factorization comes “for free”!
6 / 36
Propositional resolution (2)
Additional observation
(a ∨ a ∨ B) ≡ (a ∨ B)
Remove duplicated literals in clausesIt is known as factorization
Resolution (set notation)
C1, . . . ,Ck , {a ∨ L11, . . . ,L
1n}, {¬a,L2
1, . . . ,L2m}
|= {L11, . . . ,L
1n,L2
1, . . . ,L2m}
Factorization comes “for free”!
6 / 36
Derivation by resolution (1)
Resolvent
Given two clauses C1 and C2 such that a ∈ C1 and ¬a ∈ C2,(C1 \ {a}) ∪ (C2 \ {¬a}) is the resolvent of C1 and C2.
Derivation
Given a set Γ of clauses, a derivation by resolution of a clauseC from Γ, denoted Γ `R C, is a sequence C1, . . . ,Cn such thatCn = C and for each Ci (1 ≤ i ≤ n) we have
1 Ci ∈ Γ, or2 Ci is a resolvent of Cj and Ck , where j < i and k < i .
Lemma
If Γ `R C then Γ |= C.
Proof. By induction on the sequence C1, . . . ,Cn.
7 / 36
Derivation by resolution (1)
Resolvent
Given two clauses C1 and C2 such that a ∈ C1 and ¬a ∈ C2,(C1 \ {a}) ∪ (C2 \ {¬a}) is the resolvent of C1 and C2.
Derivation
Given a set Γ of clauses, a derivation by resolution of a clauseC from Γ, denoted Γ `R C, is a sequence C1, . . . ,Cn such thatCn = C and for each Ci (1 ≤ i ≤ n) we have
1 Ci ∈ Γ, or2 Ci is a resolvent of Cj and Ck , where j < i and k < i .
Lemma
If Γ `R C then Γ |= C.
Proof. By induction on the sequence C1, . . . ,Cn.
7 / 36
Derivation by resolution (1)
Resolvent
Given two clauses C1 and C2 such that a ∈ C1 and ¬a ∈ C2,(C1 \ {a}) ∪ (C2 \ {¬a}) is the resolvent of C1 and C2.
Derivation
Given a set Γ of clauses, a derivation by resolution of a clauseC from Γ, denoted Γ `R C, is a sequence C1, . . . ,Cn such thatCn = C and for each Ci (1 ≤ i ≤ n) we have
1 Ci ∈ Γ, or2 Ci is a resolvent of Cj and Ck , where j < i and k < i .
Lemma
If Γ `R C then Γ |= C.
Proof. By induction on the sequence C1, . . . ,Cn.7 / 36
Derivation by resolution (2)Consider
Γ = {rain→ streetwet , rain}
, or equivalentlyΓ = {¬rain ∨ streetwet , rain}, or equivalentlyΓ = {{¬rain, streetwet}, {rain}}
The following is a derivation by resolution:
C1 = {¬rain, streetwet}C2 = {rain}C3 = {streetwet}
{¬rain, streetwet} {rain}
{streetwet}
rain→ streetwet , rain `R streetwet
8 / 36
Derivation by resolution (2)Consider
Γ = {rain→ streetwet , rain}, or equivalentlyΓ = {¬rain ∨ streetwet , rain}
, or equivalentlyΓ = {{¬rain, streetwet}, {rain}}
The following is a derivation by resolution:
C1 = {¬rain, streetwet}C2 = {rain}C3 = {streetwet}
{¬rain, streetwet} {rain}
{streetwet}
rain→ streetwet , rain `R streetwet
8 / 36
Derivation by resolution (2)Consider
Γ = {rain→ streetwet , rain}, or equivalentlyΓ = {¬rain ∨ streetwet , rain}, or equivalentlyΓ = {{¬rain, streetwet}, {rain}}
The following is a derivation by resolution:
C1 = {¬rain, streetwet}C2 = {rain}C3 = {streetwet}
{¬rain, streetwet} {rain}
{streetwet}
rain→ streetwet , rain `R streetwet
8 / 36
Derivation by resolution (2)Consider
Γ = {rain→ streetwet , rain}, or equivalentlyΓ = {¬rain ∨ streetwet , rain}, or equivalentlyΓ = {{¬rain, streetwet}, {rain}}
The following is a derivation by resolution:
C1 = {¬rain, streetwet}C2 = {rain}C3 = {streetwet}
{¬rain, streetwet} {rain}
{streetwet}
rain→ streetwet , rain `R streetwet
8 / 36
Derivation by resolution (2)Consider
Γ = {rain→ streetwet , rain}, or equivalentlyΓ = {¬rain ∨ streetwet , rain}, or equivalentlyΓ = {{¬rain, streetwet}, {rain}}
The following is a derivation by resolution:C1 = {¬rain, streetwet}
C2 = {rain}C3 = {streetwet}
{¬rain, streetwet}
{rain}
{streetwet}
rain→ streetwet , rain `R streetwet
8 / 36
Derivation by resolution (2)Consider
Γ = {rain→ streetwet , rain}, or equivalentlyΓ = {¬rain ∨ streetwet , rain}, or equivalentlyΓ = {{¬rain, streetwet}, {rain}}
The following is a derivation by resolution:C1 = {¬rain, streetwet}C2 = {rain}
C3 = {streetwet}
{¬rain, streetwet} {rain}
{streetwet}
rain→ streetwet , rain `R streetwet
8 / 36
Derivation by resolution (2)Consider
Γ = {rain→ streetwet , rain}, or equivalentlyΓ = {¬rain ∨ streetwet , rain}, or equivalentlyΓ = {{¬rain, streetwet}, {rain}}
The following is a derivation by resolution:C1 = {¬rain, streetwet}C2 = {rain}C3 = {streetwet}
{¬rain, streetwet} {rain}
{streetwet}
rain→ streetwet , rain `R streetwet
8 / 36
Derivation by resolution (2)Consider
Γ = {rain→ streetwet , rain}, or equivalentlyΓ = {¬rain ∨ streetwet , rain}, or equivalentlyΓ = {{¬rain, streetwet}, {rain}}
The following is a derivation by resolution:C1 = {¬rain, streetwet}C2 = {rain}C3 = {streetwet}
{¬rain, streetwet} {rain}
{streetwet}
rain→ streetwet , rain `R streetwet8 / 36
Outline
1 Propositional resolutionResolutionRefutationsRefinements and examples
2 DPLL
3 Propositional Tableau
4 Exercises
9 / 36
Refutation (1)
Our goal is to model Γ |= ⊥
Let � be the empty clause
� is like ⊥� is different from an empty set of formulas!
Refutation
A derivation by resolution of � from Γ is called a refutation of Γ.
Resolution Theorem
Γ `R � if and only if Γ is unsatisfiable.
Proof. Soundness: Γ `R � implies Γ |= � (by the previousLemma).Completeness: by induction over the number of variables in Γ.
10 / 36
Refutation (1)
Our goal is to model Γ |= ⊥Let � be the empty clause
� is like ⊥� is different from an empty set of formulas!
Refutation
A derivation by resolution of � from Γ is called a refutation of Γ.
Resolution Theorem
Γ `R � if and only if Γ is unsatisfiable.
Proof. Soundness: Γ `R � implies Γ |= � (by the previousLemma).Completeness: by induction over the number of variables in Γ.
10 / 36
Refutation (1)
Our goal is to model Γ |= ⊥Let � be the empty clause
� is like ⊥
� is different from an empty set of formulas!
Refutation
A derivation by resolution of � from Γ is called a refutation of Γ.
Resolution Theorem
Γ `R � if and only if Γ is unsatisfiable.
Proof. Soundness: Γ `R � implies Γ |= � (by the previousLemma).Completeness: by induction over the number of variables in Γ.
10 / 36
Refutation (1)
Our goal is to model Γ |= ⊥Let � be the empty clause
� is like ⊥� is different from an empty set of formulas!
Refutation
A derivation by resolution of � from Γ is called a refutation of Γ.
Resolution Theorem
Γ `R � if and only if Γ is unsatisfiable.
Proof. Soundness: Γ `R � implies Γ |= � (by the previousLemma).Completeness: by induction over the number of variables in Γ.
10 / 36
Refutation (1)
Our goal is to model Γ |= ⊥Let � be the empty clause
� is like ⊥� is different from an empty set of formulas!
Refutation
A derivation by resolution of � from Γ is called a refutation of Γ.
Resolution Theorem
Γ `R � if and only if Γ is unsatisfiable.
Proof. Soundness: Γ `R � implies Γ |= � (by the previousLemma).Completeness: by induction over the number of variables in Γ.
10 / 36
Refutation (1)
Our goal is to model Γ |= ⊥Let � be the empty clause
� is like ⊥� is different from an empty set of formulas!
Refutation
A derivation by resolution of � from Γ is called a refutation of Γ.
Resolution Theorem
Γ `R � if and only if Γ is unsatisfiable.
Proof. Soundness: Γ `R � implies Γ |= � (by the previousLemma).Completeness: by induction over the number of variables in Γ.
10 / 36
Refutation (2)Goal: {rain→ streetwet , rain} |= streetwet
IFF: {rain→ streetwet , rain} ∪ {¬streetwet} |= ⊥
The following is a refutation of{rain→ streetwet , rain, ¬streetwet}:
C1 = {¬rain, streetwet}C2 = {rain}C3 = {¬streetwet}
C4 = {streetwet}C5 = {} = �
{¬rain, streetwet} {rain} {¬streetwet}
{streetwet}
�
rain→ streetwet , rain, ¬streetwet `R �
11 / 36
Refutation (2)Goal: {rain→ streetwet , rain} |= streetwetIFF: {rain→ streetwet , rain} ∪ {¬streetwet} |= ⊥
The following is a refutation of{rain→ streetwet , rain, ¬streetwet}:
C1 = {¬rain, streetwet}C2 = {rain}C3 = {¬streetwet}
C4 = {streetwet}C5 = {} = �
{¬rain, streetwet} {rain} {¬streetwet}
{streetwet}
�
rain→ streetwet , rain, ¬streetwet `R �
11 / 36
Refutation (2)Goal: {rain→ streetwet , rain} |= streetwetIFF: {rain→ streetwet , rain} ∪ {¬streetwet} |= ⊥
The following is a refutation of{rain→ streetwet , rain, ¬streetwet}:
C1 = {¬rain, streetwet}C2 = {rain}C3 = {¬streetwet}
C4 = {streetwet}C5 = {} = �
{¬rain, streetwet} {rain} {¬streetwet}
{streetwet}
�
rain→ streetwet , rain, ¬streetwet `R �
11 / 36
Refutation (2)Goal: {rain→ streetwet , rain} |= streetwetIFF: {rain→ streetwet , rain} ∪ {¬streetwet} |= ⊥
The following is a refutation of{rain→ streetwet , rain, ¬streetwet}:
C1 = {¬rain, streetwet}
C2 = {rain}C3 = {¬streetwet}
C4 = {streetwet}C5 = {} = �
{¬rain, streetwet}
{rain} {¬streetwet}
{streetwet}
�
rain→ streetwet , rain, ¬streetwet `R �
11 / 36
Refutation (2)Goal: {rain→ streetwet , rain} |= streetwetIFF: {rain→ streetwet , rain} ∪ {¬streetwet} |= ⊥
The following is a refutation of{rain→ streetwet , rain, ¬streetwet}:
C1 = {¬rain, streetwet}C2 = {rain}
C3 = {¬streetwet}
C4 = {streetwet}C5 = {} = �
{¬rain, streetwet} {rain}
{¬streetwet}
{streetwet}
�
rain→ streetwet , rain, ¬streetwet `R �
11 / 36
Refutation (2)Goal: {rain→ streetwet , rain} |= streetwetIFF: {rain→ streetwet , rain} ∪ {¬streetwet} |= ⊥
The following is a refutation of{rain→ streetwet , rain, ¬streetwet}:
C1 = {¬rain, streetwet}C2 = {rain}C3 = {¬streetwet}
C4 = {streetwet}C5 = {} = �
{¬rain, streetwet} {rain} {¬streetwet}
{streetwet}
�
rain→ streetwet , rain, ¬streetwet `R �
11 / 36
Refutation (2)Goal: {rain→ streetwet , rain} |= streetwetIFF: {rain→ streetwet , rain} ∪ {¬streetwet} |= ⊥
The following is a refutation of{rain→ streetwet , rain, ¬streetwet}:
C1 = {¬rain, streetwet}C2 = {rain}C3 = {¬streetwet}
C4 = {streetwet}
C5 = {} = �
{¬rain, streetwet} {rain} {¬streetwet}
{streetwet}
�
rain→ streetwet , rain, ¬streetwet `R �
11 / 36
Refutation (2)Goal: {rain→ streetwet , rain} |= streetwetIFF: {rain→ streetwet , rain} ∪ {¬streetwet} |= ⊥
The following is a refutation of{rain→ streetwet , rain, ¬streetwet}:
C1 = {¬rain, streetwet}C2 = {rain}C3 = {¬streetwet}
C4 = {streetwet}C5 = {} = �
{¬rain, streetwet} {rain} {¬streetwet}
{streetwet}
�
rain→ streetwet , rain, ¬streetwet `R �
11 / 36
Refutation (2)Goal: {rain→ streetwet , rain} |= streetwetIFF: {rain→ streetwet , rain} ∪ {¬streetwet} |= ⊥
The following is a refutation of{rain→ streetwet , rain, ¬streetwet}:
C1 = {¬rain, streetwet}C2 = {rain}C3 = {¬streetwet}
C4 = {streetwet}C5 = {} = �
{¬rain, streetwet} {rain} {¬streetwet}
{streetwet}
�
rain→ streetwet , rain, ¬streetwet `R �
11 / 36
Validity, equivalence, entailment, ...Validity
|= φ iff ¬φ |= ⊥Test whether ¬φ `R �
Equivalence
φ ≡ ψ iff ¬(φ↔ ψ) |= ⊥Test whether ¬(φ↔ ψ) `R �
Entailment
Γ |= φ iff Γ, ¬φ |= ⊥Test whether Γ, ¬φ `R �
Satisfiability
φ is satisfiable iff ¬φ is not validTest whether φ 6`R �
12 / 36
Validity, equivalence, entailment, ...Validity
|= φ iff ¬φ |= ⊥Test whether ¬φ `R �
Equivalence
φ ≡ ψ iff ¬(φ↔ ψ) |= ⊥Test whether ¬(φ↔ ψ) `R �
Entailment
Γ |= φ iff Γ, ¬φ |= ⊥Test whether Γ, ¬φ `R �
Satisfiability
φ is satisfiable iff ¬φ is not validTest whether φ 6`R �
12 / 36
Validity, equivalence, entailment, ...Validity
|= φ iff ¬φ |= ⊥Test whether ¬φ `R �
Equivalence
φ ≡ ψ iff ¬(φ↔ ψ) |= ⊥Test whether ¬(φ↔ ψ) `R �
Entailment
Γ |= φ iff Γ, ¬φ |= ⊥Test whether Γ, ¬φ `R �
Satisfiability
φ is satisfiable iff ¬φ is not validTest whether φ 6`R �
12 / 36
Validity, equivalence, entailment, ...Validity
|= φ iff ¬φ |= ⊥Test whether ¬φ `R �
Equivalence
φ ≡ ψ iff ¬(φ↔ ψ) |= ⊥Test whether ¬(φ↔ ψ) `R �
Entailment
Γ |= φ iff Γ, ¬φ |= ⊥Test whether Γ, ¬φ `R �
Satisfiability
φ is satisfiable iff ¬φ is not validTest whether φ 6`R �
12 / 36
Implementing resolution (1)Algorithm: SAT by resolutionInput : a set Γ of wffsOutput: true if Γ is SAT; false otherwise
1 begin2 ΓCNF := trasformToCNF (Γ);3 repeat4 if � ∈ ΓCNF then5 return false;
6 Γold := ΓCNF ;7 ΓCNF := ΓCNF ∪ resolveAll(ΓCNF );8 until Γold = ΓCNF ;9 return true;
Function resolveAll(ΓCNF : set of clauses)1 begin2 Γres := ∅;3 foreach C1 ∈ ΓCNF and foreach atom a ∈ C1 do4 foreach C2 ∈ ΓCNF such that ¬a ∈ C2 do5 Γres := Γres ∪ {C1 \ {a} ∪ C2 \ {¬a}};
6 return Γres
13 / 36
Implementing resolution (2)
Complexity
Deciding Γ `R � requires up to an exponential number of steps(with respect to the size of the formula)
Since unsatisfiability of a formula is coNP-complete,this is “reasonable”
Example
Is the following formula satisfiable?(A ∨ B) ∧ (A↔ B) ∧ (¬A ∨ ¬B)
14 / 36
Implementing resolution (2)
Complexity
Deciding Γ `R � requires up to an exponential number of steps(with respect to the size of the formula)
Since unsatisfiability of a formula is coNP-complete,this is “reasonable”
Example
Is the following formula satisfiable?(A ∨ B) ∧ (A↔ B) ∧ (¬A ∨ ¬B)
14 / 36
Implementing resolution (2)
Complexity
Deciding Γ `R � requires up to an exponential number of steps(with respect to the size of the formula)
Since unsatisfiability of a formula is coNP-complete,this is “reasonable”
Example
Is the following formula satisfiable?(A ∨ B) ∧ (A↔ B) ∧ (¬A ∨ ¬B)
14 / 36
Outline
1 Propositional resolutionResolutionRefutationsRefinements and examples
2 DPLL
3 Propositional Tableau
4 Exercises
15 / 36
Refinements (1)
Drop tautological clauses
A clause C is a tautology if there is a ∈ V such thata ∈ C and ¬a ∈ C
Drop subsumed clauses
A clause C1 subsumes a clause C2 if C1 ⊆ C2
Linear Resolution
Any intermediate derivation uses the clause obtained in theprevious step.
Theorem
Linear resolution is refutation complete: If a set of wffs isunsatisfiable then a refutation by linear resolution exists.
{{A,B}, {A,¬B}, {¬A,B}, {¬A,¬B}}
16 / 36
Refinements (1)
Drop tautological clauses
A clause C is a tautology if there is a ∈ V such thata ∈ C and ¬a ∈ C
Drop subsumed clauses
A clause C1 subsumes a clause C2 if C1 ⊆ C2
Linear Resolution
Any intermediate derivation uses the clause obtained in theprevious step.
Theorem
Linear resolution is refutation complete: If a set of wffs isunsatisfiable then a refutation by linear resolution exists.
{{A,B}, {A,¬B}, {¬A,B}, {¬A,¬B}}
16 / 36
Refinements (1)
Drop tautological clauses
A clause C is a tautology if there is a ∈ V such thata ∈ C and ¬a ∈ C
Drop subsumed clauses
A clause C1 subsumes a clause C2 if C1 ⊆ C2
Linear Resolution
Any intermediate derivation uses the clause obtained in theprevious step.
Theorem
Linear resolution is refutation complete: If a set of wffs isunsatisfiable then a refutation by linear resolution exists.
{{A,B}, {A,¬B}, {¬A,B}, {¬A,¬B}}
16 / 36
Refinements (1)
Drop tautological clauses
A clause C is a tautology if there is a ∈ V such thata ∈ C and ¬a ∈ C
Drop subsumed clauses
A clause C1 subsumes a clause C2 if C1 ⊆ C2
Linear Resolution
Any intermediate derivation uses the clause obtained in theprevious step.
Theorem
Linear resolution is refutation complete: If a set of wffs isunsatisfiable then a refutation by linear resolution exists.
{{A,B}, {A,¬B}, {¬A,B}, {¬A,¬B}}
16 / 36
Refinements (1)
Drop tautological clauses
A clause C is a tautology if there is a ∈ V such thata ∈ C and ¬a ∈ C
Drop subsumed clauses
A clause C1 subsumes a clause C2 if C1 ⊆ C2
Linear Resolution
Any intermediate derivation uses the clause obtained in theprevious step.
Theorem
Linear resolution is refutation complete: If a set of wffs isunsatisfiable then a refutation by linear resolution exists.
{{A,B}, {A,¬B}, {¬A,B}, {¬A,¬B}}16 / 36
Refinements (2)
Linear Input Resolution
Any intermediate derivation uses the clause obtained in theprevious step and a clause of the original formula.
Theorem
Linear input resolution is refutation complete for (sets of) Hornclauses, where a Horn clause is a clause containing at mostone positive atom.
Example
1 {{A,B}, {A,¬B}, {¬A,B}, {¬A,¬B}}2 {{A}, {B}, {A,¬B}, {¬A,B}, {¬A,¬B}}
17 / 36
Refinements (2)
Linear Input Resolution
Any intermediate derivation uses the clause obtained in theprevious step and a clause of the original formula.
Theorem
Linear input resolution is refutation complete for (sets of) Hornclauses, where a Horn clause is a clause containing at mostone positive atom.
Example
1 {{A,B}, {A,¬B}, {¬A,B}, {¬A,¬B}}2 {{A}, {B}, {A,¬B}, {¬A,B}, {¬A,¬B}}
17 / 36
Refinements (2)
Linear Input Resolution
Any intermediate derivation uses the clause obtained in theprevious step and a clause of the original formula.
Theorem
Linear input resolution is refutation complete for (sets of) Hornclauses, where a Horn clause is a clause containing at mostone positive atom.
Example
1 {{A,B}, {A,¬B}, {¬A,B}, {¬A,¬B}}
2 {{A}, {B}, {A,¬B}, {¬A,B}, {¬A,¬B}}
17 / 36
Refinements (2)
Linear Input Resolution
Any intermediate derivation uses the clause obtained in theprevious step and a clause of the original formula.
Theorem
Linear input resolution is refutation complete for (sets of) Hornclauses, where a Horn clause is a clause containing at mostone positive atom.
Example
1 {{A,B}, {A,¬B}, {¬A,B}, {¬A,¬B}}2 {{A}, {B}, {A,¬B}, {¬A,B}, {¬A,¬B}}
17 / 36
Examples
1 Is (A1 ∨ A2) ∧ (¬A2 ∨ ¬A3) ∧ (A3 ∨ A4) ∧ (¬A4 ∨ ¬A1)satisfiable?
2 Does A follow from (A ∨ B ∨ C) ∧ (¬C ∨ B) ∧ (A ∨ ¬B)?3 Does ¬A follow from (A ∨ B ∨ C) ∧ (¬C ∨ B) ∧ (A ∨ ¬B)?4 Does A∧B follow from (¬A→ B)∧ (A→ B)∧ (¬A→ ¬B)?
18 / 36
Outline
1 Propositional resolutionResolutionRefutationsRefinements and examples
2 DPLL
3 Propositional Tableau
4 Exercises
19 / 36
DPLL algorithm
By ¬` we denote the opposite literal of `if ` = ¬a then ¬` = a
Simplify is often called Unit PropagationCall-by-name parameters (references)
Algorithm: DPLLInput : a set Γ of clausesOutput: true if Γ is SAT; false otherwise
1 begin2 Simplify(Γ);3 if Γ = ∅ then return true ;4 if � ∈ Γ then return false ;5 ` := ChooseLiteral(Γ);6 return DPLL(Γ ∪ {`}) or DPLL(Γ ∪ {¬`});
Procedure Simplify(Γ)1 begin2 while {`} ∈ Γ do3 foreach c ∈ Γ do4 if ` ∈ c then Γ := Γ \ {c} ;5 else if ¬` ∈ c then Γ := (Γ \ {c}) ∪ (c \ {¬`}) ;
20 / 36
Properties
DPLL(Γ) returns true if Γ is satisfiable, and false otherwise
DPLL(Γ) can be (easily) modified in order to compute one(or all) models of Γ
DPLL is sound and complete
DPLL(Γ) works in polynomial-space
21 / 36
Properties
DPLL(Γ) returns true if Γ is satisfiable, and false otherwiseDPLL(Γ) can be (easily) modified in order to compute one(or all) models of Γ
DPLL is sound and complete
DPLL(Γ) works in polynomial-space
21 / 36
Properties
DPLL(Γ) returns true if Γ is satisfiable, and false otherwiseDPLL(Γ) can be (easily) modified in order to compute one(or all) models of Γ
DPLL is sound and complete
DPLL(Γ) works in polynomial-space
21 / 36
Properties
DPLL(Γ) returns true if Γ is satisfiable, and false otherwiseDPLL(Γ) can be (easily) modified in order to compute one(or all) models of Γ
DPLL is sound and complete
DPLL(Γ) works in polynomial-space
21 / 36
Features
Simplification
The input set of clauses is simplified at each branch using (atleast) unit clause propagation
Branching
When no further simplification is possible, a literal is selectedusing some heuristic criterion (ChooseLiteral) and assumed asa unit clause in the current set of clauses
Backtracking
When a contradiction (empty clause) arises, the searchresumes from some previous assumption ` by assuming ¬`instead
22 / 36
Features
Simplification
The input set of clauses is simplified at each branch using (atleast) unit clause propagation
Branching
When no further simplification is possible, a literal is selectedusing some heuristic criterion (ChooseLiteral) and assumed asa unit clause in the current set of clauses
Backtracking
When a contradiction (empty clause) arises, the searchresumes from some previous assumption ` by assuming ¬`instead
22 / 36
Features
Simplification
The input set of clauses is simplified at each branch using (atleast) unit clause propagation
Branching
When no further simplification is possible, a literal is selectedusing some heuristic criterion (ChooseLiteral) and assumed asa unit clause in the current set of clauses
Backtracking
When a contradiction (empty clause) arises, the searchresumes from some previous assumption ` by assuming ¬`instead
22 / 36
Examples (1)
Example
Γ = {{x1, x2,¬x3}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}:
Γ = {{x1,¬x3}, {x4,¬x3}}ChooseLiteral returns ¬x3: Γ = ∅, i.e., the formula is SAT!
Example
Γ = {{x1, x2,¬x3,¬x4}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3,¬x4}, {x4,¬x3}}If ChooseLiteral returns ¬x3, the process is the same asbefore; otherwise, if x1 is returned, another choice has tobe made
Branching order (ChooseLiteral) can make big differences!
23 / 36
Examples (1)
Example
Γ = {{x1, x2,¬x3}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3}, {x4,¬x3}}
ChooseLiteral returns ¬x3: Γ = ∅, i.e., the formula is SAT!
Example
Γ = {{x1, x2,¬x3,¬x4}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3,¬x4}, {x4,¬x3}}If ChooseLiteral returns ¬x3, the process is the same asbefore; otherwise, if x1 is returned, another choice has tobe made
Branching order (ChooseLiteral) can make big differences!
23 / 36
Examples (1)
Example
Γ = {{x1, x2,¬x3}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3}, {x4,¬x3}}ChooseLiteral returns ¬x3:
Γ = ∅, i.e., the formula is SAT!
Example
Γ = {{x1, x2,¬x3,¬x4}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3,¬x4}, {x4,¬x3}}If ChooseLiteral returns ¬x3, the process is the same asbefore; otherwise, if x1 is returned, another choice has tobe made
Branching order (ChooseLiteral) can make big differences!
23 / 36
Examples (1)
Example
Γ = {{x1, x2,¬x3}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3}, {x4,¬x3}}ChooseLiteral returns ¬x3: Γ = ∅, i.e., the formula is SAT!
Example
Γ = {{x1, x2,¬x3,¬x4}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3,¬x4}, {x4,¬x3}}If ChooseLiteral returns ¬x3, the process is the same asbefore; otherwise, if x1 is returned, another choice has tobe made
Branching order (ChooseLiteral) can make big differences!
23 / 36
Examples (1)
Example
Γ = {{x1, x2,¬x3}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3}, {x4,¬x3}}ChooseLiteral returns ¬x3: Γ = ∅, i.e., the formula is SAT!
Example
Γ = {{x1, x2,¬x3,¬x4}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}:
Γ = {{x1,¬x3,¬x4}, {x4,¬x3}}If ChooseLiteral returns ¬x3, the process is the same asbefore; otherwise, if x1 is returned, another choice has tobe made
Branching order (ChooseLiteral) can make big differences!
23 / 36
Examples (1)
Example
Γ = {{x1, x2,¬x3}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3}, {x4,¬x3}}ChooseLiteral returns ¬x3: Γ = ∅, i.e., the formula is SAT!
Example
Γ = {{x1, x2,¬x3,¬x4}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3,¬x4}, {x4,¬x3}}
If ChooseLiteral returns ¬x3, the process is the same asbefore; otherwise, if x1 is returned, another choice has tobe made
Branching order (ChooseLiteral) can make big differences!
23 / 36
Examples (1)
Example
Γ = {{x1, x2,¬x3}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3}, {x4,¬x3}}ChooseLiteral returns ¬x3: Γ = ∅, i.e., the formula is SAT!
Example
Γ = {{x1, x2,¬x3,¬x4}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3,¬x4}, {x4,¬x3}}If ChooseLiteral returns ¬x3,
the process is the same asbefore; otherwise, if x1 is returned, another choice has tobe made
Branching order (ChooseLiteral) can make big differences!
23 / 36
Examples (1)
Example
Γ = {{x1, x2,¬x3}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3}, {x4,¬x3}}ChooseLiteral returns ¬x3: Γ = ∅, i.e., the formula is SAT!
Example
Γ = {{x1, x2,¬x3,¬x4}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3,¬x4}, {x4,¬x3}}If ChooseLiteral returns ¬x3, the process is the same asbefore;
otherwise, if x1 is returned, another choice has tobe made
Branching order (ChooseLiteral) can make big differences!
23 / 36
Examples (1)
Example
Γ = {{x1, x2,¬x3}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3}, {x4,¬x3}}ChooseLiteral returns ¬x3: Γ = ∅, i.e., the formula is SAT!
Example
Γ = {{x1, x2,¬x3,¬x4}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3,¬x4}, {x4,¬x3}}If ChooseLiteral returns ¬x3, the process is the same asbefore; otherwise, if x1 is returned,
another choice has tobe made
Branching order (ChooseLiteral) can make big differences!
23 / 36
Examples (1)
Example
Γ = {{x1, x2,¬x3}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3}, {x4,¬x3}}ChooseLiteral returns ¬x3: Γ = ∅, i.e., the formula is SAT!
Example
Γ = {{x1, x2,¬x3,¬x4}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3,¬x4}, {x4,¬x3}}If ChooseLiteral returns ¬x3, the process is the same asbefore; otherwise, if x1 is returned, another choice has tobe made
Branching order (ChooseLiteral) can make big differences!
23 / 36
Examples (1)
Example
Γ = {{x1, x2,¬x3}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3}, {x4,¬x3}}ChooseLiteral returns ¬x3: Γ = ∅, i.e., the formula is SAT!
Example
Γ = {{x1, x2,¬x3,¬x4}, {¬x2}, {x4,¬x3}}
Simplify using {¬x2}: Γ = {{x1,¬x3,¬x4}, {x4,¬x3}}If ChooseLiteral returns ¬x3, the process is the same asbefore; otherwise, if x1 is returned, another choice has tobe made
Branching order (ChooseLiteral) can make big differences!
23 / 36
Examples (2)
1 {{x1, x2, x3}, {x1, x2,¬x3}, {x1,¬x2, x3},{x1,¬x2,¬x3}, {¬x1, x4}, {x1,¬x4,¬x5, x6}, {¬x1, x7}}
2 {{x1, x2}, {x1,¬x2}, {¬x1, x2}, {¬x1,¬x2}}
24 / 36
Examples (2)
1 {{x1, x2, x3}, {x1, x2,¬x3}, {x1,¬x2, x3},{x1,¬x2,¬x3}, {¬x1, x4}, {x1,¬x4,¬x5, x6}, {¬x1, x7}}
2 {{x1, x2}, {x1,¬x2}, {¬x1, x2}, {¬x1,¬x2}}
24 / 36
Refinements
How to efficiently detect unit clauses?
2-watched literalsHow to implement ChooseLiteral?
Look-ahead heuristicsLook-back heuristics
How to take advantage from conflicts?
LearningBackjumping
Can we reuse something from a previous computation?
Progressive SAT
25 / 36
Refinements
How to efficiently detect unit clauses?2-watched literals
How to implement ChooseLiteral?
Look-ahead heuristicsLook-back heuristics
How to take advantage from conflicts?
LearningBackjumping
Can we reuse something from a previous computation?
Progressive SAT
25 / 36
Refinements
How to efficiently detect unit clauses?2-watched literals
How to implement ChooseLiteral?
Look-ahead heuristicsLook-back heuristics
How to take advantage from conflicts?
LearningBackjumping
Can we reuse something from a previous computation?
Progressive SAT
25 / 36
Refinements
How to efficiently detect unit clauses?2-watched literals
How to implement ChooseLiteral?Look-ahead heuristics
Look-back heuristicsHow to take advantage from conflicts?
LearningBackjumping
Can we reuse something from a previous computation?
Progressive SAT
25 / 36
Refinements
How to efficiently detect unit clauses?2-watched literals
How to implement ChooseLiteral?Look-ahead heuristicsLook-back heuristics
How to take advantage from conflicts?
LearningBackjumping
Can we reuse something from a previous computation?
Progressive SAT
25 / 36
Refinements
How to efficiently detect unit clauses?2-watched literals
How to implement ChooseLiteral?Look-ahead heuristicsLook-back heuristics
How to take advantage from conflicts?
LearningBackjumping
Can we reuse something from a previous computation?
Progressive SAT
25 / 36
Refinements
How to efficiently detect unit clauses?2-watched literals
How to implement ChooseLiteral?Look-ahead heuristicsLook-back heuristics
How to take advantage from conflicts?Learning
BackjumpingCan we reuse something from a previous computation?
Progressive SAT
25 / 36
Refinements
How to efficiently detect unit clauses?2-watched literals
How to implement ChooseLiteral?Look-ahead heuristicsLook-back heuristics
How to take advantage from conflicts?LearningBackjumping
Can we reuse something from a previous computation?
Progressive SAT
25 / 36
Refinements
How to efficiently detect unit clauses?2-watched literals
How to implement ChooseLiteral?Look-ahead heuristicsLook-back heuristics
How to take advantage from conflicts?LearningBackjumping
Can we reuse something from a previous computation?
Progressive SAT
25 / 36
Refinements
How to efficiently detect unit clauses?2-watched literals
How to implement ChooseLiteral?Look-ahead heuristicsLook-back heuristics
How to take advantage from conflicts?LearningBackjumping
Can we reuse something from a previous computation?Progressive SAT
25 / 36
Outline
1 Propositional resolutionResolutionRefutationsRefinements and examples
2 DPLL
3 Propositional Tableau
4 Exercises
26 / 36
Propositional Tableau (1)
Yet another decision procedure for unsatisfiability
The idea is to break down logical connectives into theirconstituent partsWe consider the tableau for formulas in Negation NormalForm (NNF)
Negation Normal Form
1 Eliminate >, ⊥,→,↔2 Apply double negation equivalences:
¬¬φ ≡ φ3 Apply De Morgan equivalences:
¬(φ ∨ ψ) ≡ ¬ψ ∧ ¬φ¬(φ ∧ ψ) ≡ ¬ψ ∨ ¬φ
27 / 36
Propositional Tableau (1)
Yet another decision procedure for unsatisfiabilityThe idea is to break down logical connectives into theirconstituent parts
We consider the tableau for formulas in Negation NormalForm (NNF)
Negation Normal Form
1 Eliminate >, ⊥,→,↔2 Apply double negation equivalences:
¬¬φ ≡ φ3 Apply De Morgan equivalences:
¬(φ ∨ ψ) ≡ ¬ψ ∧ ¬φ¬(φ ∧ ψ) ≡ ¬ψ ∨ ¬φ
27 / 36
Propositional Tableau (1)
Yet another decision procedure for unsatisfiabilityThe idea is to break down logical connectives into theirconstituent partsWe consider the tableau for formulas in Negation NormalForm (NNF)
Negation Normal Form
1 Eliminate >, ⊥,→,↔2 Apply double negation equivalences:
¬¬φ ≡ φ3 Apply De Morgan equivalences:
¬(φ ∨ ψ) ≡ ¬ψ ∧ ¬φ¬(φ ∧ ψ) ≡ ¬ψ ∨ ¬φ
27 / 36
Propositional Tableau (1)
Yet another decision procedure for unsatisfiabilityThe idea is to break down logical connectives into theirconstituent partsWe consider the tableau for formulas in Negation NormalForm (NNF)
Negation Normal Form
1 Eliminate >, ⊥,→,↔2 Apply double negation equivalences:
¬¬φ ≡ φ3 Apply De Morgan equivalences:
¬(φ ∨ ψ) ≡ ¬ψ ∧ ¬φ¬(φ ∧ ψ) ≡ ¬ψ ∨ ¬φ
27 / 36
Propositional Tableau (2)Let Γ be a set of wffs in NNF.
1 Start with a chain made of the formulas in Γ
2 If a branch contains a formula φ ∧ ψ then add to its leaf thechain φ — ψ
3 If a branch contains a formula φ ∨ ψ then add to its leaf twochildren φ and ψ
4 If a branch contains a formula and its negation then closethe branch
5 If all branches are closed then Γ is unsatisfiable
Notation
φ ∧ ψφψ
(∧)φ ∨ ψφ | ψ
(∨)
28 / 36
Propositional Tableau (2)Let Γ be a set of wffs in NNF.
1 Start with a chain made of the formulas in Γ
2 If a branch contains a formula φ ∧ ψ then add to its leaf thechain φ — ψ
3 If a branch contains a formula φ ∨ ψ then add to its leaf twochildren φ and ψ
4 If a branch contains a formula and its negation then closethe branch
5 If all branches are closed then Γ is unsatisfiable
Notation
φ ∧ ψφψ
(∧)φ ∨ ψφ | ψ
(∨)
28 / 36
Propositional Tableau (2)Let Γ be a set of wffs in NNF.
1 Start with a chain made of the formulas in Γ
2 If a branch contains a formula φ ∧ ψ then add to its leaf thechain φ — ψ
3 If a branch contains a formula φ ∨ ψ then add to its leaf twochildren φ and ψ
4 If a branch contains a formula and its negation then closethe branch
5 If all branches are closed then Γ is unsatisfiable
Notation
φ ∧ ψφψ
(∧)φ ∨ ψφ | ψ
(∨)
28 / 36
Propositional Tableau (2)Let Γ be a set of wffs in NNF.
1 Start with a chain made of the formulas in Γ
2 If a branch contains a formula φ ∧ ψ then add to its leaf thechain φ — ψ
3 If a branch contains a formula φ ∨ ψ then add to its leaf twochildren φ and ψ
4 If a branch contains a formula and its negation then closethe branch
5 If all branches are closed then Γ is unsatisfiable
Notation
φ ∧ ψφψ
(∧)φ ∨ ψφ | ψ
(∨)
28 / 36
Propositional Tableau (2)Let Γ be a set of wffs in NNF.
1 Start with a chain made of the formulas in Γ
2 If a branch contains a formula φ ∧ ψ then add to its leaf thechain φ — ψ
3 If a branch contains a formula φ ∨ ψ then add to its leaf twochildren φ and ψ
4 If a branch contains a formula and its negation then closethe branch
5 If all branches are closed then Γ is unsatisfiable
Notation
φ ∧ ψφψ
(∧)φ ∨ ψφ | ψ
(∨)
28 / 36
Propositional Tableau (2)Let Γ be a set of wffs in NNF.
1 Start with a chain made of the formulas in Γ
2 If a branch contains a formula φ ∧ ψ then add to its leaf thechain φ — ψ
3 If a branch contains a formula φ ∨ ψ then add to its leaf twochildren φ and ψ
4 If a branch contains a formula and its negation then closethe branch
5 If all branches are closed then Γ is unsatisfiable
Notation
φ ∧ ψφψ
(∧)φ ∨ ψφ | ψ
(∨)
28 / 36
Propositional Tableau (3)
Example: Γ := {(A ∨ ¬B) ∧ B,¬A}
(A ∨ ¬B) ∧ B
¬A
A ∨ ¬B
B
A ¬B
Γ is unsatisfiable!
We can simplifythe notation usedfor a closure byputting a markeron the leaf of theclosed path!
On the blackboard
A ∧ C,¬A ∨ B
Theorem
Propositional tableau is sound and complete, i.e.,if the tableau for Γ is closed then Γ |= ⊥, andif Γ |= ⊥ then the tableau for Γ is closed.
29 / 36
Propositional Tableau (3)
Example: Γ := {(A ∨ ¬B) ∧ B,¬A}
(A ∨ ¬B) ∧ B
¬A
A ∨ ¬B
B
A ¬B
Γ is unsatisfiable!
We can simplifythe notation usedfor a closure byputting a markeron the leaf of theclosed path!
On the blackboard
A ∧ C,¬A ∨ B
Theorem
Propositional tableau is sound and complete, i.e.,if the tableau for Γ is closed then Γ |= ⊥, andif Γ |= ⊥ then the tableau for Γ is closed.
29 / 36
Propositional Tableau (3)
Example: Γ := {(A ∨ ¬B) ∧ B,¬A}
(A ∨ ¬B) ∧ B
¬A
A ∨ ¬B
B
A ¬B
Γ is unsatisfiable!
We can simplifythe notation usedfor a closure byputting a markeron the leaf of theclosed path!
On the blackboard
A ∧ C,¬A ∨ B
Theorem
Propositional tableau is sound and complete, i.e.,if the tableau for Γ is closed then Γ |= ⊥, andif Γ |= ⊥ then the tableau for Γ is closed.
29 / 36
Propositional Tableau (3)
Example: Γ := {(A ∨ ¬B) ∧ B,¬A}
(A ∨ ¬B) ∧ B
¬A
A ∨ ¬B
B
A ¬B
Γ is unsatisfiable!
We can simplifythe notation usedfor a closure byputting a markeron the leaf of theclosed path!
On the blackboard
A ∧ C,¬A ∨ B
Theorem
Propositional tableau is sound and complete, i.e.,if the tableau for Γ is closed then Γ |= ⊥, andif Γ |= ⊥ then the tableau for Γ is closed.
29 / 36
Propositional Tableau (3)
Example: Γ := {(A ∨ ¬B) ∧ B,¬A}
(A ∨ ¬B) ∧ B
¬A
A ∨ ¬B
B
A ¬B
Γ is unsatisfiable!
We can simplifythe notation usedfor a closure byputting a markeron the leaf of theclosed path!
On the blackboard
A ∧ C,¬A ∨ B
Theorem
Propositional tableau is sound and complete, i.e.,if the tableau for Γ is closed then Γ |= ⊥, andif Γ |= ⊥ then the tableau for Γ is closed.
29 / 36
Propositional Tableau (3)
Example: Γ := {(A ∨ ¬B) ∧ B,¬A}
(A ∨ ¬B) ∧ B
¬A
A ∨ ¬B
B
A ¬B
Γ is unsatisfiable!
We can simplifythe notation usedfor a closure byputting a markeron the leaf of theclosed path!
On the blackboard
A ∧ C,¬A ∨ B
Theorem
Propositional tableau is sound and complete, i.e.,if the tableau for Γ is closed then Γ |= ⊥, andif Γ |= ⊥ then the tableau for Γ is closed.
29 / 36
Propositional Tableau (3)
Example: Γ := {(A ∨ ¬B) ∧ B,¬A}
(A ∨ ¬B) ∧ B
¬A
A ∨ ¬B
B
A ¬B
Γ is unsatisfiable!
We can simplifythe notation usedfor a closure byputting a markeron the leaf of theclosed path!
On the blackboard
A ∧ C,¬A ∨ B
Theorem
Propositional tableau is sound and complete, i.e.,if the tableau for Γ is closed then Γ |= ⊥, andif Γ |= ⊥ then the tableau for Γ is closed.
29 / 36
Propositional Tableau (3)
Example: Γ := {(A ∨ ¬B) ∧ B,¬A}
(A ∨ ¬B) ∧ B
¬A
A ∨ ¬B
B
A ¬B
Γ is unsatisfiable!
We can simplifythe notation usedfor a closure byputting a markeron the leaf of theclosed path!
On the blackboard
A ∧ C,¬A ∨ B
Theorem
Propositional tableau is sound and complete, i.e.,if the tableau for Γ is closed then Γ |= ⊥, andif Γ |= ⊥ then the tableau for Γ is closed.
29 / 36
Propositional Tableau (3)
Example: Γ := {(A ∨ ¬B) ∧ B,¬A}
(A ∨ ¬B) ∧ B
¬A
A ∨ ¬B
B
A ¬B
Γ is unsatisfiable!
We can simplifythe notation usedfor a closure byputting a markeron the leaf of theclosed path!
On the blackboard
A ∧ C,¬A ∨ B
Theorem
Propositional tableau is sound and complete, i.e.,if the tableau for Γ is closed then Γ |= ⊥, andif Γ |= ⊥ then the tableau for Γ is closed. 29 / 36
Outline
1 Propositional resolutionResolutionRefutationsRefinements and examples
2 DPLL
3 Propositional Tableau
4 Exercises
30 / 36
Exercises (1)(From Logic for Computer Science: Foundations of AutomaticTheorem Proving)
1 Show that the following set of clauses are unsatisfiableusing the resolution method:
1 {{A,B,¬C}, {A,B,C}, {A,¬B}, {¬A}}2 {{A,¬B,C}, {B,C}, {¬A,C}, {B,¬C}, {¬B}}3 {{A,¬B}, {A,C}, {¬B,C}, {¬A,B}, {B,¬C}, {¬A,¬C}}4 {{A,B}, {¬A,B}, {A,¬B}, {¬A,¬B}, }
2 Find all resolvents of the following pairs of clauses:1 {A,B}, {¬A,¬B}2 {A,¬B}, {B,C,D}3 {¬A,B,¬C}, {B,C}4 {A,¬A}, {A,¬A}
3 Find all resolvents of the following sets of clauses:1 {{A,¬B}, {A,B}, {¬A}}2 {{A,B,C}, {¬B,¬C}, {¬A,¬C}}3 {{¬A,¬B}, {B,C}, {¬C,A}}4 {{A,B,C}, {A}, {B}}
31 / 36
Exercises (2)
1 Show using resolution whether the following statementshold:
1 x ∨ y ∨ ¬z |= (x ∨ z)↔ (¬y → x)2 ((¬X ∨ ¬Y )→ ¬(¬Y ∨ X )) is satisfiable
32 / 36
Exercises (3)
(From Logic for Computer Science: Foundations of AutomaticTheorem Proving)
1 Show that the following set of clauses are unsatisfiableusing the DPLL algorithm:
1 {{A,B,¬C}, {A,B,C}, {A,¬B}, {¬A}}2 {{A,¬B,C}, {B,C}, {¬A,C}, {B,¬C}, {¬B}}3 {{A,¬B}, {A,C}, {¬B,C}, {¬A,B}, {B,¬C}, {¬A,¬C}}4 {{A,B}, {¬A,B}, {A,¬B}, {¬A,¬B}, }
2 Show using DPLL whether the following statements hold:1 x ∨ y ∨ ¬z |= (x ∨ z)↔ (¬y → x)2 ((¬X ∨ ¬Y )→ ¬(¬Y ∨ X )) is satisfiable
33 / 36
Exercises (4)
(From Logic for Computer Science: Foundations of AutomaticTheorem Proving)
Give proof trees (by means of tableau) for the followingtautologies:
1 A→ (B → A)
2 (A→ B)→ ((A→ (B → C))→ (A→ C))
3 A→ (B → A ∧ B)
4 A→ A ∨ B5 B → A ∨ B6 (A→ B)→ ((A→ ¬B)→ ¬A)
7 A ∧ B → A8 A ∧ B → B9 (A→ C)→ ((B → C)→ (A ∨ B → C))
10 ¬¬A→ A
34 / 36
Exercises (5)(From Logic for Computer Science: Foundations of AutomaticTheorem Proving)
Give proof trees (by means of tableau) for the followingequivalences:
1 (A ∨ B) ∨ C ≡ A ∨ (B ∨ C) (associativity)2 (A ∧ B) ∧ C ≡ A ∧ (B ∧ C) (associativity)3 A ∨ B ≡ B ∨ A (commutativity)4 A ∧ B ≡ B ∧ A (commutativity)5 A ∨ (B ∧ C) ≡ (A ∨ B) ∧ (A ∨ C) (distributivity)6 A ∧ (B ∨ C) ≡ (A ∧ B) ∨ (A ∧ C) (distributivity)7 ¬(A ∨ B) ≡ ¬A ∧ ¬B (De Morgan)8 ¬(A ∧ B) ≡ ¬A ∨ ¬B (De Morgan)9 A ∨ A ≡ A (idempotency)
10 A ∧ A ≡ A (idempotency)11 ¬¬A ≡ A (double negation)12 (A ∨ B) ∧ (¬A ∨ C) ≡ (A ∨ B) ∧ (¬A ∨ C) ∧ (B ∨ C)
(resolution)35 / 36
END OF THELECTURE
36 / 36