ICS141: Discrete Mathematics For Computer Science I
ICS141: Discrete Mathematics For Computer Science I
ICS141:
Discrete Mathematics for
Computer Science I
Dept. Information & Computer Sci., University of Hawaii
Lecture 5
Chapter 1. The Foundations
1.4 Nested Quantifiers
1.5 Rules of Inference
Nesting of Quantifiers
University of Hawaii
n Example:
Let the domain of x and y be people.
Let L(x,y) = “x likes y” (A statement with 2 free
variables – not a proposition)
n Then ∃y L(x,y) = “There is someone whom
∀x ∃y P(x,y)
≡ ∃y P(1,y) ∧ ∃y P(2,y) ∧ ∃y P(3,y)
≡ [P(1,1) ∨ P(1,2) ∨ P(1,3)] ∧
[P(2,1) ∨ P(2,2) ∨ P(2,3)] ∧
[P(3,1) ∨ P(3,2) ∨ P(3,3)]
ICS 141: Discrete Mathematics I – Fall 2011 5-7
Topic #3 – Predicate Logic
Quantifier Exercise
University of Hawaii
Equivalence Laws
University of Hawaii
n Exercise:
See if you can prove these yourself.
Notational Conventions
University of Hawaii
premise 1
premise 2
··· .
∴ conclusion “∴” means “therefore”
ICS 141: Discrete Mathematics I – Fall 2011 5-15
Inference Rules & Implications
University of Hawaii
p q p→q p ∧ (p → q) (p ∧ (p → q)) → q
T T T T T
T F F F T
F T T F T
F F T F T
n Notice that the first row is the only one where
premises are all true
ICS 141: Discrete Mathematics I – Fall 2011 5-17
Modus Ponens: Example
University of Hawaii
p → q : “If n is divisible by 3
assumed
If then n is divisible by 3” TRUE
2
p . : “n is divisible by 3”
Then ∴q : “n2 is divisible by 3” is TRUE
n Example
p → q : “If this jewel is really a diamond
then it will scratch glass” assumed
If
TRUE
¬q . : “The jewel doesn’t scratch glass”
Then ∴ ¬p : “The jewel is not a diamond” is TRUE
n p
q Rule of Conjunction
∴p∧q Tautology: [(p) ∧ (q)] → p ∧ q
n Example
n Ed’s wallet is in his back pocket or it is on
his desk. (p ∨ q) p q
n Ed’s wallet is not in his back pocket. (¬p)