Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS...
Transcript of Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS...
![Page 1: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/1.jpg)
Discrete Mathematics CS 2610August 24, 2006
![Page 2: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/2.jpg)
2
Agenda Last class
Introduction to predicates and quantifiersThis class
Nested quantifiersProofs
![Page 3: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/3.jpg)
3
Overview of last classA predicate P, or propositional function, is a
function that maps objects in the universe of discourse to propositionsPredicates can be quantified using the universal quantifier (“for all”) ∀ or the existential quantifier (“there exists”) ∃Quantified predicates can be negated as follows
¬∀x P(x) ≡ ∃x ¬P(x)¬∃x P(x) ≡ ∀x ¬P(x)
Quantified variables are called “bound”Variables that are not quantified are called “free”
![Page 4: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/4.jpg)
4
Predicate Logic and PropositionsAn expression with zero free variables is an actual proposition
Ex. Q(x) : x > 0, R(y): y < 10
∃ x Q(x) ∧ ∃y R(y)
![Page 5: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/5.jpg)
5
Nested QuantifiersWhen dealing with polyadic predicates, each argument may be quantified with its own quantifier.Each nested quantifier occurs in the scope of another quantifier.
Examples: (L=likes, UoD(x)=kids, UoD(y)=cars)∀x∀y L(x,y) reads ∀x(∀y L(x,y)) ∀x∃y L(x,y) reads ∀x(∃y L(x,y)) ∃x∀y L(x,y) reads ∃x(∀y L(x,y)) ∃x∃y L(x,y) reads ∃x(∃y L(x,y))
Another example ∀x (P(x) ∨ ∃y R(x,y))
![Page 6: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/6.jpg)
6
Examples
If L(x,y) means x likes y, how do you read the following quantified predicates?
∃y L(Alice,y)∃y∀x L(x,y) ∀x∃y L(x,y) ∀x LUV(x, Raymond)
Alice likes some carThere is a car that is liked by everyoneEveryone likes some carEveryone loves Raymond
Order matters!!!
![Page 7: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/7.jpg)
7
Negation of Nested QuantifiersTo negate a quantifier, move negation to the right, changing quantifiers as you go.
Example:
¬∀x∃y∀z P(x,y,z) ≡ ∃x ∀y ∃z ¬P(x,y,z).
![Page 8: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/8.jpg)
8
Proofs (or Fun & Games Time)Assume that the following statements are true:
I have a total score over 96.If I have a total score over 96, then I get an A in the class.
What can we claim?I get an A in the class.
How do we know the claim is true?Elementary my dear Watson!Logical Deduction.
![Page 9: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/9.jpg)
9
Proofs• A theorem is a statement that can be proved to be
true.
• A proof is a sequence of statements that form an argument.
![Page 10: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/10.jpg)
10
Proofs: Inference RulesAn Inference Rule:
“∴” means “therefore”
premise 1premise 2 … ∴ conclusion
![Page 11: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/11.jpg)
11
Proofs: Modus Ponens
•I have a total score over 96.
•If I have a total score over 96, then I get an A for the class.
∴ I get an A for this class
p
p → q
∴ q
Tautology:
(p ∧ (p → q)) → q
![Page 12: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/12.jpg)
12
Proofs: Modus Tollens
•If the power supply fails then the lights go out.
•The lights are on.
∴ The power supply has not failed.
Tautology:
(¬q ∧ (p → q)) → ¬p
¬q
p → q
∴ ¬p
![Page 13: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/13.jpg)
13
Proofs: Addition
•I am a student.
∴ I am a student or I am a visitor.
p
∴ p ∨ q
Tautology:
p → (p ∨ q)
![Page 14: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/14.jpg)
14
Proofs: Simplification
•I am a student and I am a soccer player.
∴ I am a student.
p ∧ q
∴ p
Tautology:
(p ∧ q) → p
![Page 15: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/15.jpg)
15
Proofs: Conjunction
•I am a student.•I am a soccer player.
∴ I am a student and I am a soccer player.
p
q
∴ p ∧ q
Tautology:
((p) ∧ (q)) → p ∧ q
![Page 16: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/16.jpg)
16
Proofs: Disjunctive Syllogism
I am a student or I am a soccer player.I am a not soccer player.
∴ I am a student.
p ∨ q
¬q
∴ p
Tautology:
((p ∨ q) ∧ ¬q) → p
![Page 17: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/17.jpg)
17
Proofs: Hypothetical Syllogism
If I get a total score over 96, I will get an A in the course.If I get an A in the course, I will have a 4.0 semester average.
∴ ∴ If I get a total score over 96 then∴ I will have a 4.0 semester average.
p → q
q → r
∴ p → r
Tautology:
((p → q) ∧ (q → r)) → (p → r)
![Page 18: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/18.jpg)
18
Proofs: Resolution
I am taking CS1301 or I am taking CS2610.I am not taking CS1301 or I am taking CS 1302.
∴ I am taking CS2610 or I am taking CS 1302.
p ∨ q
¬ p ∨ r
∴ q ∨ r
Tautology:
((p ∨ q ) ∧ (¬ p ∨ r)) → (q ∨ r)
![Page 19: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/19.jpg)
19
Proofs: Proof by Cases
I have taken CS2610 or I have taken CS1301.If I have taken CS2610 then I can register for CS2720If I have taken CS1301 then I can register for CS2720
∴ I can register for CS2720
p ∨ q
p → r
q → r
∴ r
Tautology:
((p ∨ q ) ∧ (p → r) ∧ (q → r)) → r
![Page 20: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/20.jpg)
20
Fallacy of Affirming the Conclusion
•If you have the flu then you’ll have a sore throat.
•You have a sore throat.
∴ You must have the flu.
Fallacy:
(q ∧ (p → q)) → p
q
p → q
∴ p
Abductive reasoning
![Page 21: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/21.jpg)
21
Fallacy of Denying the Hypothesis
•If you have the flu then you’ll have a sore throat.
•You do not have the flu.
∴ You do not have a sore throat.
Fallacy:
(¬p ∧ (p → q)) → ¬q
¬p
p → q
∴ ¬q
![Page 22: Discrete Mathematics CS 2610cobweb.cs.uga.edu/~potter/dismath/Aug24.pdf · Discrete Mathematics CS 2610 August 24, 2006. 2 Agenda Last class Introduction to predicates and quantifiers](https://reader036.fdocuments.net/reader036/viewer/2022071015/5fcdb78a41799933e73cb7c9/html5/thumbnails/22.jpg)
22
Inference Rules for Quantified Statements
∀x P(x)∴ P(c)
∃x P(x)∴ P(c)
P(c)___∴ ∀x P(x)
Universal Instantiation(for an arbitrary object c from UoD)
Universal Generalization(for any arbitrary element c from UoD)
Existential Instantiation(for some specific object c from UoD)
P(c)__∴ ∃x P(x)
Existential Generalization(for some object c from UoD)