0% found this document useful (0 votes)
47 views38 pages

Ex 1.6 Rules of Inference Final

Questions offif k

Uploaded by

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

Ex 1.6 Rules of Inference Final

Questions offif k

Uploaded by

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

CC1041

Discrete Mathematics
course mentor
Seher Ansar Khawaja
[email protected]

National College of Business Administration and Economics main campus,


Lahore, Pakistan
Ex 1.6 Rules of Inference
Motivation

 Proofs in mathematics are valid arguments that establish the truth of


mathematical statements.
 Mathematical proofs are necessary in CS
 You must always (try to) prove that your algorithm
 terminates
 is complete, optimal

 You may also want to show that it is more efficient than another method
 Proving certain properties may lead to new, more efficient or simpler algorithms
Argument
An Argument in propositional logic is a sequence of propositions.

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.”
Premises and conclusion
 Argument:
1. “If you have the current password,
then you can log onto the network.” premises
2. “You have a current password.”
Therefore,
3. “You can log onto the network.” conclusion

All but the final proposition are called premises.


The final proposition is called the conclusion.
Premises and conclusion
 Argument:
1. “If you have the current password, premises
then you can log onto the network.” true
2. “You have a current password.”
Therefore,
3. “You can log onto the network.” conclusion
true

An argument is valid if the truth of all premises implies that conclusion is true.
Argument for

 An argument form in propositional logic is a sequence of compound


propositions involving propositional variables.
 An argument form is valid, if the conclusion is true if the premises are all
true.
Argument: Valid?
Given an argument, where
 p1 , p2 , …, pn be the premises
 q be the conclusion
The argument is valid when
(p1 ∧ p2 ∧ … ∧ pn ) → q is a tautology
 Argument is valid when form is valid.
Valid argument
1. “If you have the current password, then you can log onto the network.”
p q
2. “You have a current password.”
Therefore,
3. “You can log onto the network.”
Rules of Inference for Propositional Logic
Rules of inference are templates for constructing valid arguments.
 How to show an argument is valid?
Truth Table
 May be tedious when the number of variables is large
Rules of Inference
 Firstly establish the validity of some relatively simple argument forms, called rules of
inference
 These rules of inference can be used as building blocks to construct more complicated
valid argument forms
Valid and Invalid Argument

 An argument is valid if the conclusion is true when all the premises are true.

 That is (P1∧ P2 ∧ P3 ∧ . . . ∧ Pn) → C is a tautology.

 An argument is invalid if the conclusion is false when all the premises are
true.
Valid and Invalid Argument Testing using
Critical Row.
Example 1: Show that the following argument form is valid:

Valid
Argument
Valid and Invalid Argument Testing using
Critical Row.
Example 2: Show that the following argument form is valid:
Valid and Invalid Argument Testing using
Critical Row.
Example 2: Show that the following argument form is valid:

Invalid
Argument
Valid and Invalid Argument Testing using
Critical Row.
Example 3: Use truth table to determine the argument form
Valid and Invalid Argument Testing using
Critical Row.
Example 3: Use truth table to determine the argument form
Valid and Invalid Argument Testing using
Critical Row.
Example 3: Use truth table to determine the argument form
Valid and Invalid Argument Testing using
Critical Row.
Example 3: Use truth table to determine the argument form

Invalid
Argument
Valid and Invalid Argument Testing using
Critical Row: Word Problem
Example : Use truth table to determine the argument form

If I got an Eid bonus, I’ll buy a Xbox.


If I sell my motorcycle, I’ll buy a Xbox.
∴ If I get an Eid bonus or I sell my motorcycle, then I’ll buy a Xbox.

Let
e = I got an Eid bonus
s = I’ll buy a Xbox
m = I sell my motorcycle
Valid and Invalid Argument Testing using
Critical Row: Word Problem
Example : Use truth table to determine the argument form
If I got an Eid bonus, I’ll buy a Xbox.
If I sell my motorcycle, I’ll buy a Xbox.
∴ If I get an Eid bonus or
I sell my motorcycle,
then I’ll buy a Xbox.
Valid and Invalid Argument Testing using
Critical Row: Word Problem valid
Example : Use truth table to determine the argument form
If I got an Eid bonus, I’ll buy a Xbox.
If I sell my motorcycle, I’ll buy a Xbox. Argument
∴ If I get an Eid bonus or
I sell my motorcycle,
then I’ll buy a Xbox.
Valid and Invalid Argument Testing using
Critical Row: Word Problem
Example : Use truth table to determine the argument form

If Tariq is not on team A, then Hameed is on team B.


If Hameed is not on team B, then Tariq is on team A.
∴ Tariq is not on team A or Hameed is not on team B.

Let
t = Tariq is on team A
h = Hameed is on team B
Valid and Invalid Argument Testing using
Critical Row: Word Problem
Example : Use truth table to determine the argument form

If Tariq is not on team A, then Hameed is on team B.


If Hameed is not on team B, then Tariq is on team A.
∴ Tariq is not on team A or Hameed is not on team B.
Let
t = Tariq is on team A
h = Hameed is on team B
Valid and Invalid Argument Testing using
Critical Row: Word Problem
Example : Use truth table to determine the argument form

If Tariq is not on team A, then Hameed is on team B.


If Hameed is not on team B, then Tariq is on team A.
∴ Tariq is not on team A or Hameed is not on team B.
Invalid
Let
t = Tariq is on team A
Argument
h = Hameed is on team B
Rules of Inference for Propositional Logic
Rules of inference are templates for constructing valid arguments.
 How to show an argument is valid?
Truth Table
 May be tedious when the number of variables is large
Rules of Inference
 Firstly establish the validity of some relatively simple argument forms, called rules of
inference
 These rules of inference can be used as building blocks to construct more complicated
valid argument forms
Rules of Inference
Identify Rule of Inference

1. “If you have a pen, then you can write”


2. “you cannot write,”
There fore,
3 “you don’t have a pen ”

Let
p: you have a pen.
q: you can write
Identify Rule of Inference

1. “If you have a pen, then you can write”


2. “you have a pen,”
There fore,
3 “you can write”

Let
p: you have a pen.
q: you can write
Identify Rule of Inference

1. I am a student of BS, or I like discrete math.


2. I am not a student of BS, or I like programming.
Therefore,
3. I like discrete math or I like programming.

Let
p =“I am a student of BS ,”
q= “I like discrete math,”
r= “I like programming”
Identify Rule of Inference

1. If it rains today, then we will not have a BBQ today.


2. If we do not have a barbecue today, then we will have a BBQ tomorrow.
Therefore,
3. if it rains today, then we will have a BBQ tomorrow.

Let
p =“It rains today,”
q= “We will not have a barbecue today,”
r= “We will have a barbecue tomorrow.”
Identify Rule of Inference

¬p ∧ q 1. S→ ¬E
2. T ∧ S
Identify Rule of Inference

1. ¬p ∧ q 1. S→ ¬E

2.¬p by simplification of 2. T ∧ S
13. q by simplification of 3. T by simplification of 2
1 4. S by simplification of 2
5. ¬E by Modus Ponens on 1 and 4
Identify Rules

1. P → (𝑄 → 𝑅) Premise
2. 𝑃⋀𝑄 Premise
3. 𝑃 Simplification on 2
4. 𝑄 Simplification on 2
5. 𝑄→𝑅 Modus Ponens on 1 and 3
6. 𝑅 Modus Ponens on 4 and 5
APPLYING RULE OF INFERENCE - SHOW THAT THE
ARGUMENT IS VALID.
If Ali is a lawyer, then he is ambitious. If Ali is an early riser, then he
does not like idles. If Ali is ambitious, then he is an early riser. Then if
Ali is a lawyer, then he does not like idles.

Solution: 1.L →A
2.E→¬I
L= Ali is a lawyer
A= he is ambitious 3.A →E
E= Ali is an early riser ∴ L→¬I
I= he like idles
Solution discussed in class
APPLYING RULE OF INFERENCE - SHOW THAT THE
ARGUMENT IS VALID.
Show that the premises “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,” and “If I go to sleep early, then I will wake
up feeling refreshed” lead to the conclusion “If I do not finish writing
the program, then I will wake up feeling refreshed.”

Solution:
1. p →q
p =“you send me an e mail message,” 2. ¬p →r
q =“I will finish writing the program,” 3. r →s
r =“I will go to sleep early,” ∴ ¬q →s.
S=“I will wake up feeling

Solution discussed in class


APPLYING RULE OF INFERENCE - SHOW THAT THE
ARGUMENT IS VALID.
Show that 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 ,” and “If we
take a canoe trip, then we will be home by sunset” lead to the
conclusion “We will be home by sunset.”
Solution:
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.”
APPLYING RULE OF INFERENCE - SHOW THAT
THE ARGUMENT IS VALID.
premises: Solution using rule of inferences
1. ¬p ⋀ q 1. ¬p Simplification of p1
2. r → p 2. r → p p2
3. ¬r → s 3. ¬r Modus Tollens on 1 and 2
4. s → t 4. ¬r → s p3
5. s Modus Ponens on 3 and 4
∴ t
6. s → t p4
7. t Modus Ponens on 5 and 6
APPLYING RULE OF INFERENCE - SHOW THAT THE
ARGUMENT IS VALID.
“If today is Tuesday, then I have a test in Mathematics or
Economics. If my Economics Professor is sick, I will not have a
test in Economics. Today is Tuesday and my Economics
Professor is sick. Therefore, I have a test in Mathematics.”

Solution:
1.T→(M V E)
t= today is Tuesday 2.S→¬E
m= I have a test in Mathematics 3.T & S
e= I have a test in Economics
∴M
s= my Economics Professor is sick
Solution discussed in class

You might also like