Download - Discrete Structures Rules of inference
![Page 1: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/1.jpg)
1
Discrete StructuresRules of inference
Dr. Muhammad HumayounAssistant Professor
COMSATS Institute of Computer Science, [email protected]
https://sites.google.com/a/ciitlahore.edu.pk/dstruct/
![Page 2: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/2.jpg)
2
Rules of InferenceValid Arguments in Propositional Logic
Assume you are given the following two statements: “if you are in this class, then you will get a grade” “you are in this class”Therefore, “You will get a grade”
![Page 3: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/3.jpg)
3
Modus Ponens(Latin for “the way that affirms by affirming”
• If it snows today, then we will go skiing• Hypothesis: It is snowing today• By modus ponens, the conclusion is:• We will go skiing
![Page 4: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/4.jpg)
4
• If I smoke, then I cough• I Smoke_______________________• I cough
![Page 5: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/5.jpg)
5
Modus Tollens(Latin for "the way that denies by denying")
● Assume you are given the following two statements: “you will not get a grade” “if you are in this class, you will get a grade”
● Let p = “you are in this class”● Let q = “you will get a grade”
● By Modus Tollens, you can conclude that you are not in this class
![Page 6: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/6.jpg)
6
Addition
• If you know that p is true, then p q will ALWAYS be true i.e. p → p q
![Page 7: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/7.jpg)
7
Addition
• If you know that p is true, then p q will ALWAYS be true i.e. p → p q
• p : “It is below freezing now”• q : “It is raining now”• “It is below freezing or raining now”• “If it is below freezing now then it is below
freezing or raining now”
![Page 8: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/8.jpg)
8
Simplification
• If p q is true, then p will ALWAYS be true i.e. p q → p
![Page 9: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/9.jpg)
9
Simplification
• If p q is true, then p will ALWAYS be true i.e. p q → p
• p: “It is below freezing”• q: “It is raining now”
• p q : It is below freezing and raining now.
• p q → p: It is below freezing and raining now implies that it is below freezing
![Page 10: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/10.jpg)
10
Hypothetical syllogism
• If it rains today, then we will not have a barbecue today.
• If we do not have a barbecue today, then we will have a barbecue tomorrow.
• Therefore, if it rains today, then we will have a barbecue tomorrow.
![Page 11: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/11.jpg)
11
Disjunctive syllogism
![Page 12: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/12.jpg)
12
Resolution
• Computer programs have been developed to automate the task of reasoning and proving theorems.
• Many of these programs make use resolution
![Page 13: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/13.jpg)
13
Rules of Inference to Build Arguments• It is not sunny this afternoon and it is colder than yesterday• We will go swimming only if it is sunny• If we do not go swimming, then we will take a canoe trip• If we take a canoe trip, then we will be home by sunset_______________________________• We will be home by sunset (Conclusion)
![Page 14: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/14.jpg)
14
Rules of Inference to Build Arguments• It is not sunny this afternoon and it is colder than yesterday• We will go swimming only if it is sunny• If we do not go swimming, then we will take a canoe trip• If we take a canoe trip, then we will be home by sunset_______________________________• We will be home by sunset (Conclusion)• p: It is sunny this afternoon• q: It is colder than yesterday• r: We will go swimming• s: We will take a canoe trip• t: We will be home by sunset
![Page 15: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/15.jpg)
15
Rules of Inference to Build Arguments• It is not sunny this afternoon and it is colder than yesterday • We will go swimming only if it is sunny • If we do not go swimming, then we will take a canoe trip • If we take a canoe trip, then we will be home by sunset _______________________________• We will be home by sunset (Conclusion) • p: It is sunny this afternoon• q: It is colder than yesterday• r: We will go swimming• s: We will take a canoe trip• t: We will be home by sunset
![Page 16: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/16.jpg)
Definitions
● An Argument in propositional logic is a sequence of propositions that end with c conclusion.
● All except the final proposition are called premises.
● The final proposition is called conclusion.● An argument is valid if the truth of all
premises implies that the conclusion is true. i.e. is a tautology.
![Page 17: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/17.jpg)
17
Rules of Inference to Build Arguments
[ (¬𝒑∧𝒒 )∧ (𝒓→𝒑 )∧ (¬𝒓→𝒔 )∧(𝒔→𝒕)]→𝒕𝒑∧𝒒→𝒑
![Page 18: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/18.jpg)
18
Rules of Inference to Build Arguments
[ (¬𝒑∧𝒒 )∧ (𝒓→𝒑 )∧ (¬𝒓→𝒔 )∧(𝒔→𝒕)]→𝒕
![Page 19: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/19.jpg)
19
Rules of Inference to Build Arguments
[ (¬𝒑∧𝒒 )∧ (𝒓→𝒑 )∧ (¬𝒓→𝒔 )∧(𝒔→𝒕)]→𝒕
![Page 20: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/20.jpg)
20
Rules of Inference to Build Arguments
[ (¬𝒑∧𝒒 )∧ (𝒓→𝒑 )∧ (¬𝒓→𝒔 )∧(𝒔→𝒕)]→𝒕
![Page 21: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/21.jpg)
21
• If you send me an e-mail message, then I will finish writing the program
• If you do not send me an e-mail message, then I will go to sleep early
• If I go to sleep early, then I will wake up feeling refreshed
____________________________________• If I do not finish writing the program, then I
will wake up feeling refreshed
![Page 22: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/22.jpg)
22
• If you send me an e-mail message, then I will finish writing the program
• If you do not send me an e-mail message, then I will go to sleep early
• If I go to sleep early, then I will wake up feeling refreshed
____________________________________• If I do not finish writing the program, then I will
wake up feeling refreshed
• p = You send me an e-mail• q = I will finish writing program• r = I will go to sleep early• s = l will wake up feeling refreshed
![Page 23: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/23.jpg)
23
![Page 24: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/24.jpg)
24
![Page 25: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/25.jpg)
25
![Page 26: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/26.jpg)
26
![Page 27: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/27.jpg)
27
![Page 28: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/28.jpg)
28
• Hypotheses: and imply the conclusion:
• de Morgan’s law
• resolution
![Page 29: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/29.jpg)
29
Fallacies
• Several common fallacies arise in incorrect arguments.
• The proposition is not a tautology, because it is false when p is false and q is true
• There are many incorrect arguments that treat this as a tautology
• This type of incorrect reasoning is called the fallacy of affirming the conclusion
![Page 30: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/30.jpg)
30
Example
• If you do every problem in this book, then you will learn discrete mathematics.
• You learned discrete mathematics.• Therefore, you did every problem in this book.
• p: You did every problem in this book• q: You learned discrete mathematics
![Page 31: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/31.jpg)
31
• If you do every problem in this book, then you will learn discrete mathematics.
• You learned discrete mathematics.______________________________________• Therefore, you did every problem in this book.
• p: You did every problem in this book• q: You learned discrete mathematics
![Page 32: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/32.jpg)
32
• If you do every problem in this book, then you will learn discrete mathematics.
• You learned discrete mathematics.______________________________________• Therefore, you did every problem in this book.
• p: You did every problem in this book• q: You learned discrete mathematics
• If and then
![Page 33: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/33.jpg)
33
• If you do every problem in this book, then you will learn discrete mathematics.
• You learned discrete mathematics.______________________________________• Therefore, you did every problem in this book.
• p: You did every problem in this book• q: You learned discrete mathematics
• If and then • Fallacy• It is possible for you to learn discrete mathematics in
some way other than by doing every problem in this book (Reading, Listening Lectures, doing some but not all problems).
![Page 34: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/34.jpg)
34
Rules of Inference for
Quantified Statements
![Page 35: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/35.jpg)
35
![Page 36: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/36.jpg)
36
![Page 37: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/37.jpg)
37
Example• Show that the premises:• "Everyone in this discrete mathematics class has
taken a course in computer science" and “Aslam is a student in this class"
• Imply the conclusion “Aslam has taken a course in computer science.“
![Page 38: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/38.jpg)
38
• D(x): x is in this discrete mathematics class• C(x): x has taken a course in computer science• Premises: ∀x(D(x) → C(x)) and D(Aslam)• Conclusion: C(Aslam)
![Page 39: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/39.jpg)
39
• D(x): x is in this discrete mathematics class• C(x): x has taken a course in computer science• Premises: ∀x(D(x) → C(x)) and D(Aslam)• Conclusion: C(Aslam)
• Steps Reason• ∀x(D(x) → C(x)) Premise• D(Aslam) → C(Aslam) Universal instantiation
![Page 40: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/40.jpg)
40
• D(x): x is in this discrete mathematics class• C(x): x has taken a course in computer science• Premises: ∀x(D(x) → C(x)) and D(Aslam)• Conclusion: C(Aslam)
• Steps Reason• ∀x(D(x) → C(x)) Premise• D(Aslam) → C(Aslam) Universal instantiation• D(Aslam) Premise
![Page 41: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/41.jpg)
41
• D(x): x is in this discrete mathematics class• C(x): x has taken a course in computer science• Premises: ∀x(D(x) → C(x)) and D(Aslam)• Conclusion: C(Aslam)
• Steps Reason• ∀x(D(x) → C(x)) Premise• D(Aslam) → C(Aslam) Universal instantiation• D(Aslam) Premise• C(Aslam) Modus ponens•
![Page 42: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/42.jpg)
42
Example
• Show that the premises “A student in this class has not read the book,” and “Everyone in this class passed the first exam” imply the conclusion “Someone who passed the first exam has not read the book.”
![Page 43: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/43.jpg)
43
• Show that the premises “A student in this class has not read the book,” and “Everyone in this class passed the first exam” imply the conclusion “Someone who passed the first exam has not read the book.”
• C(x): “x is in this class” • B(x): “x has read the book” • P(x): “x passed the first exam”• Premises: ???
![Page 44: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/44.jpg)
44
• Show that the premises “A student in this class has not read the book,” and “Everyone in this class passed the first exam” imply the conclusion “Someone who passed the first exam has not read the book.”
• C(x): “x is in this class” • B(x): “x has read the book” • P(x): “x passed the first exam”• Premises: x(C(x)∃ ∧¬ B(x)) and x(C(x) → ∀
P(x)).• The conclusion???
![Page 45: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/45.jpg)
45
• Show that the premises “A student in this class has not read the book,” and “Everyone in this class passed the first exam” imply the conclusion “Someone who passed the first exam has not read the book.”
• C(x): “x is in this class” • B(x): “x has read the book” • P(x): “x passed the first exam”• Premises: x(C(x) ∃ ∧¬ B(x)) and x( C(x) → P(x) ∀
).• The conclusion: x( P(x) ∃ ∧¬ B(x) )
![Page 46: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/46.jpg)
46
• Premises: x(C(x) ∃ ∧¬ B(x)) and x( C(x) → ∀P(x) ).
• The conclusion: x( P(x) ∃ ∧¬ B(x) )
![Page 47: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/47.jpg)
47
• Premises: x(C(x) ∃ ∧¬ B(x)) and x( C(x) → ∀P(x) ).
• The conclusion: x( P(x) ∃ ∧¬ B(x) )
![Page 48: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/48.jpg)
48
• Premises: x(C(x) ∃ ∧¬ B(x)) and x( C(x) → ∀P(x) ).
• The conclusion: x( P(x) ∃ ∧¬ B(x) )
![Page 49: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/49.jpg)
49
• Premises: x(C(x) ∃ ∧¬ B(x)) and x( C(x) → ∀P(x) ).
• The conclusion: x( P(x) ∃ ∧¬ B(x) )
![Page 50: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/50.jpg)
50
• Premises: x(C(x) ∃ ∧¬ B(x)) and x( C(x) → ∀P(x) ).
• The conclusion: x( P(x) ∃ ∧¬ B(x) )
![Page 51: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/51.jpg)
51
• Premises: x(C(x) ∃ ∧¬ B(x)) and x( C(x) → ∀P(x) ).
• The conclusion: x( P(x) ∃ ∧¬ B(x) )
![Page 52: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/52.jpg)
52
• Premises: x(C(x) ∃ ∧¬ B(x)) and x( C(x) → ∀P(x) ).
• The conclusion: x( P(x) ∃ ∧¬ B(x) )
![Page 53: Discrete Structures Rules of inference](https://reader033.vdocuments.net/reader033/viewer/2022061614/56813e14550346895da7f53e/html5/thumbnails/53.jpg)
53
• Premises: x(C(x) ∃ ∧¬ B(x)) and x( C(x) → ∀P(x) ).
• The conclusion: x( P(x) ∃ ∧¬ B(x) )