DS Lecture 5-2
DS Lecture 5-2
Lahore Campus
Lecture Outline
• Rules of Inference
• What is an argument and argument form?
• Rules of inference
• Proof using rules of Inference
• Fallacy
10/13/2022 CSC102 - Discrete Structures 3
Rules of Inference
• Rules of inference are templates for constructing valid
arguments.
• Rules of inference are basic tools for establishing the truth
of statements.
• Valid means that the conclusion of the argument must
follow from the truth of the preceding statements of the
argument.
10/13/2022 CSC102 - Discrete Structures 4
Argument
• An Argument is a sequence of propositions.
Therefore,
3. “You can log onto the network.” Conclusion
Valid Arguments
Valid Arguments
Valid Arguments
1. If you have the current password, then you can log onto
the network.”
2. “You have a current password.”
Therefore,
3. “You can log onto the network.”
10/13/2022 CSC102 - Discrete Structures 9
Modus Ponens
p
p→q
q
10/13/2022 CSC102 - Discrete Structures 11
Modus Ponens
Modus Tollens
• Assume that we know: ¬q and p → q
• Recall that p → q ¬q → ¬p
• Thus, we know ¬q and ¬q → ¬p
• We can conclude ¬p
q
p→q
p
10/13/2022 CSC102 - Discrete Structures 17
Addition Example
• Assume you are given the following statements:
• “ It is below freezing now. Therefore, it is either below
freezing or raining now”
Simplification Example
• Assume you are given the following statements:
• “ It is below freezing and raining now. Therefore, it is
below freezing now”
Hypothetical Syllogism
• If p → q is true, and q → r is true, then p → r must be true
p→q
q→r
∴p→r
10/13/2022 CSC102 - Discrete Structures 23
Exercise
• What rule of inference is used in each of these
arguments?
a) Alice is a mathematics major. Therefore, Alice is either
a mathematics major or a computer science major.
Addition
b) Jerry is a mathematics major and a computer science
major. Therefore, Jerry is a mathematics major.
Simplification
c) If it is rainy, then the pool will be closed. It is rainy.
Therefore, the pool is closed.
Modus Ponens
10/13/2022 CSC102 - Discrete Structures 27
Exercise
Example Proof
• We have the hypotheses:
• “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”
• Can it lead to the conclusion that “we will be home by
sunset”?
• (( s c) (m → s) ( m → t) (t → h)) → h ???
• Where
• s = “It is sunny this afternoon”; c = “it is colder than yesterday”
• m = “We will go swimming”; t = “we will take a canoe trip”
• h = “we will be home by sunset”
10/13/2022 CSC102 - Discrete Structures 30
H1: s c
Example of Proof H2: m→s
H3: m → t
1. ¬s c 1st hypothesis H4 t →h
Example Proof
• “If it does not rain or it is not foggy, then the sailing race
will be held and the lifesaving demonstration will go on”
• ( r f) → (s d)
• “If the sailing race is held, then the trophy will be
awarded”
• s→t
• “The trophy was not awarded”
• t
H1: (r f ) → ( s d )
• Can you conclude: “It rained”?
H2: s → t
H3: t
C: r
10/13/2022 CSC102 - Discrete Structures 32
H1: (r f ) → ( s d )
Example of Proof H2: s → t
H3: t
1. ¬t 3rd hypothesis
2. s→t 2nd hypothesisC: r
3. ¬s Modus tollens using steps 1 & 2
4. (¬r¬f)→(sd) 1st hypothesis
5. ¬(sd)→¬(¬r¬f) Contrapositive of step 4
6. (¬s¬d)→(rf) DeMorgan’s law and double
negation law
7. ¬s¬d Addition from step 3
8. rf Modus ponens using steps 6 & 7
9. r Simplification using step 8
10/13/2022 CSC102 - Discrete Structures 33
Fallacies
• Several common fallacies arise in incorrect arguments.
Example
• Consider the following argument
• If you do the every problem in this book, then you will
learn discrete mathematics. You learned discrete
mathematics
Therefore
You did every problem in this book
Let p = “you do the every problem in this book”
q = “you learned discrete mathematics”
p→q
q
p
10/13/2022 CSC102 - Discrete Structures 35
Example Proof
• We have hypotheses
“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”
The conclusion “If I do not finish writing the program, then I will wake
up feeling refreshed.”
H1: p → q
• Let p = “You send me an e-mail message,”
• q = “I will finish writing the program,”
H2: p → r
• r = “I will go to sleep early,” H3: r → s
• s = “I will wake up feeling refreshed.”
C: q → s
10/13/2022 CSC102 - Discrete Structures 38
H1: p → q
Example Proof H2: p → r
H3: r→s
C: q → s
1. p → q 1st Hypothesis
2. ¬q →¬p Contrapositive of 1
3. ¬p → r 2nd Hypothesis
4. ¬q → r Hypothetical syllogism using 2 and 3
5. r → s 3rd Hypothesis
6. ¬q → s Hypothetical syllogism using 4 and 5