Informatics 1
Computation and Logic
CNF DNF and quantifiers Michael Fourman
1
Informatics 1 Computation and Logic CNF DNF and quantifiers - - PowerPoint PPT Presentation
Informatics 1 Computation and Logic CNF DNF and quantifiers Michael Fourman 1 Boolean Algebra x ( y z ) = ( x y ) z x ( y z ) = ( x y ) z associative x ( y z ) = ( x y ) ( x z ) x ( y
CNF DNF and quantifiers Michael Fourman
1
x ∨ (y ∨ z) = (x ∨ y) ∨ z x ∧ (y ∧ z) = (x ∧ y) ∧ z associative x ∨ (y ∧ z) = (x ∨ y) ∧ (x ∨ z) x ∧ (y ∨ z) = (x ∧ y) ∨ (x ∧ z) distributive x ∨ y = y ∨ x x ∧ y = y ∧ x commutative x ∨ 0 = x x ∧ 1 = x identity x ∨ 1 = 1 x ∧ 0 = 0 annihilation x ∨ x = x x ∧ x = x idempotent x ∨ ¬x = 1 ¬x ∧ x = 0 complements x ∨ (x ∧ y) = x x ∧ (x ∨ y) = x absorbtion ¬(x ∨ y) = ¬x ∧ ¬y ¬(x ∧ y) = ¬x ∨ ¬y de Morgan ¬¬x = x x → y = ¬x ← ¬y
2
3
✔ ✔ ✔ ✔
The meaning of an expression is the set of states in which it is true.
4
✔ ✔ ✔ ✔
R(x) ∧ A(x) ∧ G(x) ∨ R(x) ∧ ¬A(x) ∧ ¬G(x) ∨ ¬R(x) ∧ ¬A(x) ∧ G(x) ∨ ¬R(x) ∧ A(x) ∧ ¬G(x)
5
¬ ✓ R(x) ∧ ¬A(x) ∧ G(x) ∨ ¬R(x) ∧ A(x) ∧ G(x) ∨ ¬R(x) ∧ ¬A(x) ∧ ¬G(x) ∨ R(x) ∧ A(x) ∧ ¬G(x) ◆
✔ ✔ ✔ ✔
6
✔ ✔ ✔ ✔
¬
¬
¬
¬
✔ ✔ ✔ ✔
8
If I am clever then I will pass If I will pass then I am clever, Either I am clever or I will pass
I am clever and I will pass
9
If the races are fixed or the gambling houses are crooked, then the tourist trade will decline. If the tourist trade declines then the police force will be happy. The police force is never happy.
The races are not fixed
10
11
A Syllogism worked out. That story of yours, about your
always sets me off yawning; I never yawn, unless when I’m listening to something totally devoid of interest. http://www.gutenberg.org/ebooks/28696
12
No crowded shops are comfortable.
Imprudent travelers lose their luggage.
All these flowers are red.
All judges are just.
13
Crowded(s) → ¬Comfortable(s)
14
The expression Crowded(s) → ¬Comfortable(s) means
To make the universal statement that all crowded shops are uncomfortable, we write, ∀s. Crowded(s) → ¬Comfortable(s) which means,
= S, where S is the set of all shops.
15
To make the existential statement that some crowded shops are comfortab we introduce a third expression: we write, 9s.
which means,
6= ; , where ; is the empty set.
16
Exercise 2.5
17