Download presentation
Presentation is loading. Please wait.
1
Discussion #10 Logical Equivalences
Chapter 1, Section 5 Discussion #10
2
Topics Laws Duals Manipulations / simplifications Normal forms
Definitions Algebraic manipulation Converting truth functions to logic expressions Chapter 1, Section 5 Discussion #10
3
Laws of , , and Name Law Excluded middle law Contradiction law
P P T P P F Identity laws P F P P T P Domination laws P T T P F F Idempotent laws P P P P P P Double-negation law (P) P Chapter 1, Section 5 Discussion #10
4
Law Name Commutative laws P Q Q P P Q Q P Associative laws
(P Q) R P (Q R) (P Q) R P (Q R) Distributive laws (P Q) (P R) P (Q R) (P Q) (P R) P (Q R) De Morgan’s laws (P Q) P Q (P Q) P Q Absorption laws P (P Q) P P (P Q) P Chapter 1, Section 5 Discussion #10
5
Can prove all laws by truth tables…
F T Q P (P Q) Q P T F F T T T F T F T F De Morgan’s law holds. Chapter 1, Section 5 Discussion #10
6
Absorption Laws P (P Q) P P (P Q) P Prove algebraically …
Venn diagram proof … P (P Q) P P Q Prove algebraically … P (P Q) (P T) (P Q) identity P (T Q) distributive (factor) P T domination P identity Chapter 1, Section 5 Discussion #10
7
Duals To create the dual of a logical expression
1) swap propositional constants T and F, and 2) swap connective operators and . P P T Excluded Middle P P F Contradiction The dual of a law is always a law! Thus, most laws come in pairs pairs of duals. Chapter 1, Section 5 Discussion #10
8
Why Duals of Laws are Always Laws
We can always do the following: Start with law P P T Negate both sides (P P) T Apply De Morgan’s law P P T Remove double negatives P P F Since a law is a tautology, (P ) (P ) F substitute X for X Remove double negatives P P F Chapter 1, Section 5 Discussion #10
9
Normal Forms Normal forms are standard forms, sometimes called canonical or accepted forms. A logical expression is said to be in disjunctive normal form (DNF) if it is written as a disjunction, in which all terms are conjunctions of literals. Similarly, a logical expression is said to be in conjunctive normal form (CNF) if it is written as a conjunction of disjunctions of literals. Chapter 1, Section 5 Discussion #10
10
DNF and CNF Conjunctive Normal Form (CNF)
Disjunctive Normal Form (DNF) ( .. .. .. ) ( .. .. .. ) … ( .. .. ) Term Literal, i.e. P or P Examples: (P Q) (P Q) P (Q R) Conjunctive Normal Form (CNF) ( .. .. .. ) ( .. .. .. ) … ( .. .. ) Examples: (P Q) (P Q) P (Q R) Chapter 1, Section 5 Discussion #10
11
Converting Expressions to DNF or CNF
The following procedure converts an expression to DNF or CNF: Remove all and . Move inside. (Use De Morgan’s law.) Use distributive laws to get proper form. Simplify as you go. (e.g. double-neg., idemp., comm., assoc.) Chapter 1, Section 5 Discussion #10
12
CNF Conversion Example ( .. .. .. ) ( .. .. .. ) … ( .. .. )
((P Q) R (P Q)) ((P Q) R (P Q)) impl. (P Q) R (P Q) deM. (P Q) R (P Q) deM. (P Q) R (P Q) double neg. ((P R) (Q R)) (P Q) distr. ((P R) (P Q)) distr. ((Q R) (P Q)) (((P R) P) ((P R) Q)) distr. (((Q R) P) ((Q R) Q)) (P R) (P R Q) (Q R) assoc. comm. idemp. (DNF) Chapter 1, Section 5 Discussion #10
13
CNF Conversion Example ( .. .. .. ) ( .. .. .. ) … ( .. .. )
((P Q) R (P Q)) ((P Q) R (P Q)) impl. (P Q) R (P Q) deM. (P Q) R (P Q) deM. (P Q) R (P Q) double neg. ((P R) (Q R)) (P Q) distr. ((P R) (P Q)) distr. ((Q R) (P Q)) (((P R) P) ((P R) Q)) distr. (((Q R) P) ((Q R) Q)) (P R) (P R Q) (Q R) assoc. comm. idemp. (DNF) CNF Using the commutative and idempotent laws on the previous step and then the distributive law, we obtain this formula as the conjunctive normal form. Chapter 1, Section 5 Discussion #10
14
CNF Conversion Example ( .. .. .. ) ( .. .. .. ) … ( .. .. )
(P R) (P R Q) (Q R) (F Q R) - ident. (P R) ((P F) (Q R)) - comm., distr. (P R) (F (Q R)) - dominat. (P R) (Q R) - ident. ((P Q) R (P Q)) ((P Q) R (P Q)) impl. (P Q) R (P Q) deM. (P Q) R (P Q) deM. (P Q) R (P Q) double neg. ((P R) (Q R)) (P Q) distr. ((P R) (P Q)) distr. ((Q R) (P Q)) (((P R) P) ((P R) Q)) distr. (((Q R) P) ((Q R) Q)) (P R) (P R Q) (Q R) assoc. comm. idemp. (DNF) Chapter 1, Section 5 Discussion #10
15
DNF Expression Generation
The only definition of is the truth table F T R Q P F T (P Q R) minterms (P Q R) (P Q R) (P Q R) (P Q R) (P Q R) Chapter 1, Section 5 Discussion #10
16
CNF Expression Generation
} Find . Find the DNF of . Then, use De Morgan’s law to get the CNF of (i.e. () ) Form a conjunction of max terms F T Q P max terms T F (P Q) (P Q) (P Q) (P Q) (P Q) (P Q) DNF of f ((P Q) (P Q)) (P Q) (P Q) De Morgan’s (P Q) (P Q) De Morgan’s, double neg. Chapter 1, Section 5 Discussion #10
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.