Topic: Propositional Logic
Related Reading: Ch. 2
Due:
Convert the following formula to an equivalent formula in Conjunctive Normal Form (CNF), without any redundant or trivial clauses.
¬( (A ∨ B ∨ ¬C) ∧ (¬B ∨ C) ∧ (¬A ∨ C) )
Solution:
With our derivation being as follows:
≡
≡
≡
(¬A ∨ B ∨ A) ∧
(¬A ∨ B ∨ ¬C) ∧
(¬A ∨ ¬C ∨ A) ∧
(¬A ∨ ¬C ∨ ¬C) ∧
(¬B ∨ B ∨ A) ∧
(¬B ∨ B ∨ ¬C) ∧
(¬B ∨ ¬C ∨ A) ∧
(¬B ∨ ¬C ∨ ¬C) ∧
(C ∨ B ∨ A) ∧
(C ∨ B ∨ ¬C) ∧
(C ∨ ¬C ∨ A) ∧
(C ∨ ¬C ∨ ¬C)
by taking trivial Cartesian products of the three
conjunctions
≡
(¬A ∨ B ∨ ¬C) ∧
(¬A ∨ ¬C) ∧
(¬B ∨ ¬C ∨ A) ∧
(¬B ∨ ¬C) ∧
(C ∨ B ∨ A)
by removing redundancies in above clauses
≡
(¬A ∨ ¬C) ∧
(¬B ∨ ¬C) ∧
(A ∨ B ∨ C)
by further removing redundancies
Demonstrate how to use resolution to prove the goal
CNF equivalences of premises are:
Writing each clause as separate fact, and resolving further, we get:
| Fact 1) | ¬B ∨ A ∨ D | ||
|---|---|---|---|
| Fact 2) | B ∨ ¬A | ||
| Fact 3) | B ∨ ¬D | ||
| Fact 4) | ¬D ∨ F | ||
| Fact 5) | ¬E ∨ ¬C ∨ ¬A | ||
| Fact 6) | ¬D ∨ A | ||
| Fact 7) | ¬A ∨ C | ||
| Fact 8) | ¬A ∨ E | ||
| Fact 9) | A ∨ B | (negated goal) | |
| Fact 10) | B | (resolution of 2 and 9) | |
| Fact 11) | A ∨ D | (resolution of 1 and 10) | |
| Fact 12) | A | (resolution of 6 and 11) | |
| Fact 13) | C | (resolution of 7 and 12) | |
| Fact 14) | E | (resolution of 8 and 12) | |
| Fact 15) | ¬C ∨ ¬A | (resolution of 5 and 14) | |
| Fact 16) | ¬A | (resolution of 13 and 16) | |
| Fact 17) | False | (resolution of 12 and 16) |
A propositional 2-CNF formula is a conjunction of clauses, each containing exactly 2 literals, such as the following:
(A ∨ B) ∧ (¬A ∨ C) ∧ (¬B ∨ D) ∧ (¬C ∨ G) ∧ (¬D ∨ G)
(A ∨ B) ∧ (¬A ∨ C) resolves to (B ∨ C)
(¬B ∨ D) ∧ (B ∨ C) resolves to (D ∨ C)
(D ∨ C) ∧ (¬C ∨ G) resolves to (D ∨ G)
(D ∨ G) ∧ (¬D ∨ G) resolves to G
Given the n symbols and their negations, there
are 2n possible literals. A 2-CNF formula can be
formed by choosing any 2 distinct literals of
those 2n, or by choosing the same one twice, if
we consider a formula such as
The key insight is that when two 2-CNF clauses are resolved, the resolvant will also be a 2-CNF clause. Resolution proceeds by taking two existing clauses that can be resolved, and adding the resultant as a new clause in the knowledge base (assuming it is not already there). Based on (b), at most O(n2) semantically distinct 2-CNF clauses can be added to the knowledge base. Each clause added requires a process that involves considering all possible pairs of existing clauses. Even without any special data structures, this suggest at most O(n2) steps, each of which requires at most O(n4) time. This leads to an upper bound of O(n6) on the time (although clearly much better is possible with more care).
The problem with 3-CNF is that resolving two different 3-CNF clauses will in general produce a resultant that has four literals. The continued resolution of those larger clauses may result in even larger clauses.
So although it is true that there are only polynomially many semantically distinct 3-CNF clauses, the process of resolution generates clauses with more literals.