Download presentation
Presentation is loading. Please wait.
1
Propositional Equivalences
CS/APMA 202, Spring 2005 Rosen, section 1.2 Aaron Bloomfield
2
Tautology and Contradiction
A tautology is a statement that is always true p ¬p will always be true (Negation Law) A contradiction is a statement that is always false p ¬p will always be false (Negation Law) p p ¬p p ¬p T F
3
Logical Equivalence A logical equivalence means that the two sides always have the same truth values Symbol is ≡or (we’ll use ≡)
4
Logical Equivalences of And
p T ≡ p Identity law p F ≡ F Domination law p T pT F p F pF T
5
Logical Equivalences of And
p p ≡ p Idempotent law p q ≡ q p Commutative law p pp T F p q pq qp T F
6
Logical Equivalences of And
(p q) r ≡ p (q r) Associative law p q r pq (pq)r qr p(qr) T F
7
Logical Equivalences of Or
p T ≡ T Identity law p F ≡ p Domination law p p ≡ p Idempotent law p q ≡ q p Commutative law (p q) r ≡ p (q r) Associative law
8
Corollary of the Associative Law
(p q) r ≡ p q r (p q) r ≡ p q r Similar to (3+4)+5 = 3+4+5 Only works if ALL the operators are the same!
9
Logical Equivalences of Not
¬(¬p) ≡ p Double negation law p ¬p ≡ T Negation law p ¬p ≡ F Negation law
10
Sidewalk chalk guy Source:
11
DeMorgan’s Law Probably the most important logical equivalence
To negate pq (or pq), you “flip” the sign, and negate BOTH p and q Thus, ¬(p q) ≡ ¬p ¬q Thus, ¬(p q) ≡ ¬p ¬q p q p q pq (pq) pq pq (pq) pq T F
12
Yet more equivalences Distributive: Absorption
p (q r) ≡ (p q) (p r) p (q r) ≡ (p q) (p r) Absorption p (p q) ≡ p p (p q) ≡ p
13
How to prove two propositions are equivalent?
Two methods: Using truth tables Not good for long formula In this course, only allowed if specifically stated! Using the logical equivalences The preferred method Example: Rosen question 23, page 27 Show that:
14
Using Truth Tables (pq) →r pq (p→r)(q →r) q →r p→r r q p p q r p→r
F
15
Using Logical Equivalences
Original statement Definition of implication DeMorgan’s Law Associativity of Or Re-arranging Idempotent Law
16
Quick survey I understood the logical equivalences on the last slide
Very well Okay Not really Not at all
17
Logical Thinking At a trial:
Bill says: “Sue is guilty and Fred is innocent.” Sue says: “If Bill is guilty, then so is Fred.” Fred says: “I am innocent, but at least one of the others is guilty.” Let b = Bill is innocent, f = Fred is innocent, and s = Sue is innocent Statements are: ¬s f ¬b → ¬f f (¬b ¬s)
18
Can all of their statements be true?
Show: (¬s f) (¬b → ¬f) (f (¬b ¬s)) ¬b ¬f ¬s ¬b→¬f f(¬b¬s) ¬b¬s ¬sf s f b b f s ¬b ¬f ¬s ¬sf ¬b→¬f ¬b¬s f(¬b¬s) T F
19
Are all of their statements true
Are all of their statements true? Show values for s, b, and f such that the equation is true Original statement Definition of implication Associativity of AND Re-arranging Idempotent law Absorption law Distributive law Negation law Domination law
20
What if it weren’t possible to assign such values to s, b, and f?
Original statement Definition of implication ... (same as previous slide) Domination law Re-arranging Negation law Contradiction!
21
Quick survey I feel I can prove a logical equivalence myself
Absolutely With a bit more practice Not really Not at all
22
Logic Puzzles Rosen, page 20, questions 51-55
Knights always tell the truth, knaves always lie A says “At least one of us is a knave” and B says nothing A says “The two of us are both knights” and B says “A is a knave” A says “I am a knave or B is a knight” and B says nothing Both A and B say “I am a knight” A says “We are both knaves” and B says nothing
23
Sand Castles
24
Functional completeness
Functional completeness is discussed on page 27 (questions 37-39) of the text All the “extended” operators have equivalences using only the 3 basic operators (and, or, not) The extended operators: nand, nor, xor, conditional, bi-conditional Given a limited set of operators, can you write an equivalence of the 3 basic operators? If so, then that group of operators is functionally complete
25
Rosen, § 1.2 question 46 Show that | (NAND) is functionally complete
Equivalence of NOT: p | p ≡ p (p p) ≡ p Equivalence of NAND (p) ≡ p Idempotent law
26
Rosen, § 1.2 question 46 Equivalence of AND: Equivalence of OR:
p q ≡ (p | q) Definition of nand p | p How to do a not using nands (p | q) | (p | q) Negation of (p | q) Equivalence of OR: p q ≡ (p q) DeMorgan’s equivalence of OR As we can do AND and OR with NANDs, we can thus do ORs with NANDs Thus, NAND is functionally complete
27
Quick survey I felt I understood the material in this slide set…
Very well With some review, I’ll be good Not really Not at all
28
Quick survey The pace of the lecture for this slide set was… Fast
About right A little slow Too slow
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.