SE 212 Fall 2016 Module 2 Problem Set on CNF and DNF

advertisement
SE 212 Fall 2016
Module 2
Problem Set on CNF and DNF
Converting Formulas to DNF
In Module 2, conjunctive normal form (CNF) and disjunctive normal form (DNF)
are presented. Here is a method for converting a propositional logic formula to
DNF. It is very similar to the method for converting to CNF except that different
distributive laws are used:
1. Remove all ⇒ and ⇔ using impland equivlaws.
2. If the formula in question contains any negated compound subformulas, either
remove the negation by using the neglaw or use dmto reduce the scope of the
negation.
3. Once a formula with no negated compound subformulas is found, use the
following distributivity laws to reduce the scope of ∧:
• a ∧ (b ∨ c) ↔ (a ∧ b) ∨ (a ∧ c)
• (a ∨ b) ∧ c ↔ (a ∧ c) ∨ (b ∧ c)
4. Simplify until there are no repeated literals and no clause contains true or
false and no two clauses contain the same literals.
1
Extra Exercises on CNF and DNF
1. Determine whether the following formulas are in CNF, DNF, both, or neither.
(a) a ⇒ (¬b ∨ c)
(b) (a ∨ ¬b ∨ c) ∧ ¬b
(c) a ∧ ¬b ∧ c
(d) a ∨ ¬b ∨ true
(e) false
(f) a ∧ ¬(b ∨ c)
(g) (¬b ∧ d) ∨ (b ∧ ¬d)
2. Use transformational proof to convert the following formulas to both CNF and
DNF.
(a) q ⇔ r
(b) a ∧ ¬(y ⇒ x)
(c) ¬(q ⇒ (r ∧ z))
2
Download