0% found this document useful (0 votes)
108 views34 pages

Mehreen Khan: BS (UET, Lahore) MS (NUST, Islamabad) Mehreen - Khan@cust - Edu.pk

jnkjbkb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views34 pages

Mehreen Khan: BS (UET, Lahore) MS (NUST, Islamabad) Mehreen - Khan@cust - Edu.pk

jnkjbkb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

Introduction

Mehreen Khan
 BS(UET, Lahore)
MS(NUST, Islamabad)
[email protected]
RULES OF INFERENCE
RULES OF INFERENCE
• Arguments  Sequence of propositions
Premises conclusion

• Valid
• The premises imply the conclusion
• When ever premises are true, conclusion must be true
• Invalid
• Leads to incorrect reasoning
• Also called fallacies
For example Represents implication

1. “If you have a password, then you can log onto system”  ( PQ)
2. “you have a password”  P
• “therefore, you can log on to system”  Q (conclusion)
• (PQ) Λ P if this a tautology then it is a valid argument ( always true)
• Invalid argument if you have a password and you cant log on to a
system
Another example
P Q

1. “If it is raining then I will need an umbrella” ( PQ)


2. “It is raining” P
3. “Therefore, I will need an umbrella” Q conclusion
Determining Validity or Invalidity
1. Identify the premises and conclusion of the argument form.
2. Construct a truth table showing the truth values of all the premises and the
conclusion.
3. A row of the truth table in which all the premises are true is called a critical row.
 If there is a critical row in which the conclusion is false
 the argument form is invalid.
 If the conclusion in every critical row is true
 the argument form is valid.
p  q  ~r
qpr Invalid argument
pr premises
conclusion
p q r ~r q  ~r pr p  q  ~r qpr pr
Critical
T T T F T T T T T rows
T T F T T F T F
T F T F F T F T
T F F T T F T T F
F T T F T F T F
F T F T T F T F
F F T F F F T T T
F F F T T F T T T

7
a

Today is Tuesday.
If today is Tuesday, then John will go to work.
Therefore, John will go to work.

• Law of detachment
Rules
• MODUS TOLLENS

It does not have wheels.


If it is a car, then it has wheels.
Therefore, it is not a car

Let q= it does not have wheels


Let p= it is a car
Conclusion: negation P (NOT CAR)
Rules
Addition
“It is below freezing now.
Therefore, it is either below freezing or raining now.”
Let p = below freezing now
Let q= raining now
Conclusion = p or q

Simplification
“It is below freezing and raining now .
Therefore, it is below freezing now.”

Conclusion = p
Hypothetical Syllogism
• Basically taking out a middle man

If sana attends then sara attends


If sara attends then zara attends
Conclusion‘
If sana attends zara attends
Let p =sana attends
Let q= sara attends
Let r = zara attends
Conjunction
Let p = Sana attends
Let q = Sara attends
Therefore, Sana and Sara attends the class
Conclusion P and Q
Examples
State which rules of inference are used in the following argument:
1. 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.
2. Linda is an excellent swimmer. If Linda is an excellent swimmer,
then she can work as a lifeguard. Therefore, Linda can work as a
lifeguard.
3. Steve will work at a computer company this summer. Therefore, this
summer Steve will work at a computer company or he will be a
beach bum.
Solution:
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.
Let p be “It is raining today”,
Let q be “We will not have a barbecue today”
and r be “We will not have a barbecue tomorrow.”
Then the argument is of the form
Solution 2
• Linda is an excellent swimmer. If Linda is an excellent swimmer, then
she can work as a lifeguard. Therefore, Linda can work as a lifeguard.
Let p = Linda is an excellent swimmer.
Let q= she can work as a life guard
solution 3
Steve will work at a computer company this summer. Therefore, this
summer Steve will work at a computer company or he will be a beach
bum.
Let p = Steve will work at a computer company this summer.
Let q= he will be a beach bum.
Example
Show that the premises “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 agra trip,” and “If we take a agra trip, then we
will be home by sunset” lead to the conclusion “We will be home by sunset.”
Let p =“It is sunny this afternoon,”
q = “It is colder than yesterday,”
r = “We will go swimming,”
s =“We will take a agra trip,”
t = “We will be home by sunset.” Then the premises become
¬p ∧ q, r → p,¬r → s, and s → t . The conclusion is simply t . We need to
give a valid argument.
Constructing a valid argument using rules
Step Reason
1. ¬p ∧ q (Premise)
2. ¬p (Simplification using (1))
3. r → p (Premise)
4. ¬r Modus tollens using (2) and (3)
5. ¬r → s (Premise)
6. s Modus ponens using (4) and (5)
7. s → t (Premise)
8. t Modus ponens using (6) and (7)
Resolution rule
• Computer programs have been developed to automate the task of
reasoning and proving theorems. Many of these programs make use
of a rule of inference known as resolution. This rule of inference is
based on the tautology
• ((p ∨ q) ∧ (¬p ∨ r)) → (q ∨ r).
• P = i am sick
• q= it is raining
• r= it is Tuesday
• We are given two statements
1. (p ∨ q) i am sick or it is raining
2. (¬p ∨ r) i am not sick or it is tuesday
(q ∨ r)
• There are two cases either I am sick or not
• Lets consider the sickness case
T 1. (p ∨ q) i am sick or it is raining
F 2. (¬p ∨ r) i am not sick or it is Tuesday
(q ∨ r)
• Lets consider the wellness case
F 1. (p ∨ q) i am sick or it is raining
T 2. (¬p ∨ r) i am not sick or it is Tuesday
(q ∨ r)

• So we ensure that both in sickness and wellness resolution is working


Fallacies
• Valid  an argument which arrives at a conclusion which is always
true
• Invalid an argument which arrives at a conclusion which is not
always true
• Is the following argument valid?
1. If you do every problem in this book, then you will learn discrete
mathematics.
2. You learned discrete mathematics.
Conclusion: Therefore, you did every problem in this book.
• No, because You may learn discrete mathematics by reading, listening
to lectures, doing some, but not all, the problems in this book
Modus ponem valid argument

Converse Error
 Example: p q

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q qp
q q
p p

Converse error is also known as the


fallacy of affirming the consequence.24
Inverse error
p

• If you did every problem in the book then you learned discrete
mathematics
• ¬p You did not do every problem in the book.
• ∴ ¬q Therefore, you did not learn discrete mathematics
• fallacy of denying the hypothesis.

pq ~p  ~q
~p ~p
 ~q  ~q
Rules of Interference for Quantified Statement
• Universal Instantiation
All birds are animals
Therefore, any bird is an animal

• Universal generalization ( is the above rule backwards)


• Arbitrary c = any value from domain

Any piano is an instrument


Therefore, all piano are instruments
Rules of Interference for Quantified Statement
• Existential Instantiation
There exists something that is both square and blue
Therefore, one specific element “©”is both square and blue

• Existential Generalization
If we know that a P(x) is true for at least one element, c, in the
universe, then can we say that there-exists x[P(x)]? Yes.
Combining the rules of inference for propositions &
quantified statements
• Universal modus ponens
∀x(P(x) → Q(x))
P(a), where a is a particular element in the domain
∴ Q(a)
if ∀x(P(x) → Q(x)) is true, and if P(a) is true for a particular element a in
the domain of the universal quantifier, then Q(a) must also be true.
Example
Show that the premises “Everyone in this discrete mathematics class has taken a course in
computer science” and “Marla is a student in this class” imply the conclusion “Marla has taken
a course in computer science.”
Solution: Let D(x) denote “x is in this discrete mathematics class,” and
let C(x) denote “x has taken a course in computer science.”
Then the premises are ∀x(D(x) → C(x)) and D(Marla).
The conclusion is C(Marla).
The following steps can be used to establish the conclusion from the premises.
Step Reason
1. ∀x(D(x) → C(x)) Premise (Everyone in this discrete mathematics class has taken a course incomputer science)
2. D(Marla)→C(Marla) Universal instantiation from (1)
3. D(Marla) Premise (Marla is a student in this class)
4. C(Marla) Modus ponens from (2) and (3)
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.”
Solution: Let C(x) be “x is in this class,”
B(x) be “x has read the book,”
and P(x) be “x passed the first exam.”
A student in this class has not read the book ∃x(C(x)∧¬B(x))
Everyone in this class passed the first exam ∀x(C(x) → P(x)).
Someone who passed the first exam has not read the book ∃x(P(x)∧¬B(x)).
These steps can be used to establish the conclusion from the premises.
solution
Step Reason
1. ∃x(C(x)∧¬B(x)) Premise A student in this class has not read the book
2. C(a)∧¬B(a) Existential instantiation from (1)
3. C(a) Simplification from (2)
4. ∀x(C(x) → P(x)) Premise Everyone in this class passed the first exam
5. C(a) → P(a) Universal instantiation from (4)
6. P(a) Modus ponens from (3) and (5)
7. ¬B(a) Simplification from (2)
8. P(a)∧¬B(a) Conjunction from (6) and (7)
9. ∃x(P(x)∧¬B(x)) Existential generalization from (8)
Someone who passed the first exam has not read the book
Quiz
• Construct a valid argument to show that “Oliver has 4 legs” is a
consequence of the premises “Every dog has 4 legs and Oliver is a
dog”
D(x) denote x is a dog
F(x) denote x has four legs
Construct an argument
1. ∀(D(x) → F(x)) (premise)
2. D(O) F(O) (Universal Instantiation from 1)
3. D(O) (Premise)
4. F(O) (Modus ponen using 2 & 3)
Predicates?
• Take a real life example
• “he goes to school” wrt to English literature 2 parts
• 1st part  subject 2nd part  predicate (depends on the first part)
• Mathematical example
• X>5 (predicate with variable)
• Why do we study in DM?
• X>5 is this a proposition? (true or false)
• No because we don't know the value of x
• 7>5 is proposition
• Convert x>5 into P(x) [making a function here] what is the truth value of P(9) and
P(2)?
• 9>5 T , 2<5 F
• Predicate is also called propositional function
Quantifiers?
• With out propositional function there is another way to convert the
statement into proposition which is called quantifiers.
• Two types
• Universal
• Predicate true for every element under consideration
• Existential
• One or more than one element (not for all)
• Area of logic that deals with predicates and quantifiers is called
predicate calculus.

You might also like