Sunteți pe pagina 1din 24

DCS5028: DISCRETE STRUCTURE

CHAPTER 1
(PART 3)
1
Introduction to Logic
DCS5028
LEARNING OBJECTIVES
Determining the validation of an arguments
by using truth table
Identify the Rules of Inference
Implement and use the rules of inference to
prove a statement.
2
DCS5028
ARGUMENTS AND RULES OF INFERENCE
An Argument is a sequence of propositions
called premises, plus a proposition called
conclusion.

Consider the following:

1. If you have MMUs student ID, then you can enter
into MMUs library.
2. You have MMU student ID.

Therefore,
3. You can enter into MMUs library

Hypothesis or
Premises
Conclusion
ARGUMENTS
An argument is valid if the conclusion follows
from the premises (or hypotheses); that is,if
p
1
,and p
2
,and and p
n
are all true, then q must
be true.

DCS5028
4
P
1
P
2
.
.
.
P
n
--------
q
VALIDATION OF AN ARGUMENT
We can determine whether an argument is
valid or not by examining the truth table.
Example:
Formulate the arguments below symbolically and
determine whether it is valid:

p : Today is a school holiday
q : We go to the mall

Today is a school holiday if and only if we go to the mall
We go to the mall

Today is a school holiday

5
DCS5028
Premises
Conclusion
SOLUTION
p q
q
p






The argument is valid (the final value is all true)
6

p q p q ( p q ) q (( p q ) q ) p
T T T T T
T F F F T
F T F F T
F F T F T

DCS5028
((p q) q) p

Tautology
PROOF TECHNIQUES
If a statement is said to be true, then figure out
why it is true.

Technique 1: truth table is used to prove a
statement.

Technique 2: Laws of basic algebra and rules of
inference and theorems are used in the proof
techniques to prove a statement.

7
DCS5028
Rules of Inference:
Rules that provide the justification of the steps
used to show that a conclusion follow logically
from a set of premises (hypothesis).

8
DCS5028
Abbreviations Name
P Premise
Con Impl Conversion of Implication
ADD Addition
SIMP Simplification
Conj Conjunction
MP Modus Ponens
MT Modus Tollens
HS Hypothetical Syllogism
DS Disjunctive Syllogism
Res Resolution
9
DCS5028
Rules of Inference:
Rules that provide the justification of the steps used to show that a conclusion
follows logically from a set of premises (hypothesis).
1. Modus ponens
p
p q
q

[p (p q) ] q is a tautology:
[p (p q) ] q (p (p q) ) q
(p (p q)) q
(p q) (p q)
(p q) (p q)
T
Example:
Suppose that the premise if it is sunny today, then we will go to the beach and the
premise it is sunny today are true, then the conclusion we will go to the beach is true.
This can also be written as
p, p q or p, p q q or p (p q) q
q
10
DCS5028
p q is equivalent to p q
pq p q
(p q) p q
2. Addition
p
p q

p p q is a tautology:
p p q p (p q)
(p p) q
T q
T
Example:
Suppose that the statement it is sunny now is true, then the statement
it is either sunny or cloudy now is true.
3. Simplification
p q
p
Show that (p q) p is a tautology
Example:
Suppose that the statement it is cloudy and raining now is true, then the
statement it is cloudy now is true.
11
DCS5028
p q is equivalent to p q
4. Conjunction
p
q
p q

[(p) (q)] p q is a tautology!
Example:
Suppose that the statement it is cloudy now and the statement it is raining now
are both true, then the statement it is cloudy and raining now is true.
5. Modus Tollens
q
p q
p
Show that [q (p q)] p is a tautology
Example:
Suppose that the implication if I finish my homework before six, then I will go to watch
the movie is true, but I do not go to watch movie, i.e. the conclusion I go to watch the
movie is not true, then the premise I finish my homework before six is not true.
How is this related to Modus ponens?
12
DCS5028
6. Hypothetical Syllogism

p q
q r
p r

[(p q) (q r)] (p r) is a tautology:
[(p q) (q r)] (p r)
[(p q) (q r)] (p r)
(p q) (q r) ( p r)
(p q) (q r) p r
[(p q) p] [(q r) r]
[(p p) (q p)] [(q r) (r r)]
[T (q p)] [(q r) T]
(q p) (q r)
(q q) p r
T
Example:
Suppose that the implication if it is raining today, then we will stay at home
and the implication if we stay at home, we will watch TV are both true, then
the implication if it is raining today, then we will watch TV is true.
13
DCS5028
7. Disjunctive Syllogism
p q
p
q

Show that [(p q) p] q is a
tautology.
Example:
If the statement 2 is either an odd number or an even number is true and the
statement 2 is an odd number is false, then the statement 2 is an even number
must be true.

8. Resolution
p q
p r
q r
How is this related to Modus ponens?
Show that [(p q) (p r)] (q r) is a tautology.
Example:
Suppose that the statement I am at home or it is sunny and the statement I am
not at home or I am watching TV are both true, then the statement it is sunny or
I am watching TV must be true.
How is this related to Hypothetical Syllogism?
14
DCS5028
Rules of Inference:
Rules of Inference Corresponding Tautology Name
p p (p q) Addition
p q

p q (p q) p Simplification
p

p [(p) (q)] (p q) Conjunction
q
p q

p [p (p q)] q Modus Ponens
p q
q

q [q (p q)] p Modus Tollens
p q
p
15
DCS5028
Rules of Inference (cont.)
Rules of Inference Corresponding Tautology Name
p q [(p q) (q r)] (p r) Hypothetical Syllogism
q r
p r

p q [(p q) p] q Disjunctive Syllogism
p
q

p q [(p q) (p r)] (q r) Resolution
p r
q r
16
DCS5028
To see that whether a conclusion follows from some given premises, we
need a formal proof, where a proof line is either
a) a given premise
b) an application of an inference rule
c) a transformation using equivalence laws.
Inference Rules are just some tautologies that are obvious
in our common sense!
Imagine how tedious it is to write down
a proof without using inference rules!
Step Reason
1. .. Hypothesis / Premise
2. ..
3. ..

17
DCS5028
Example:
(p q) (p r) p q r valid
Formal Proof:
1. p q P
2. p r P
3. p P

4. q 1, 3, DS
5. r 2, 3, DS
6. q r 4, 5, Conj
Lets do something else: Find assignments
for p, q, r that make sense to build such
an argument.
argument
premises
conclusion
18
DCS5028
Example:
Show that the following argument is valid by using rules of inference:

If Susan gets the supervisors position and works hard, then she will get a
raise.
If she gets the raise, she will buy a new car. She has not purchased a new car.
Therefore
either Susan did not get the supervisors position or she did not work hard.
Solution:
Let p : Susan gets the supervisors position.
q : Susan works hard.
r : Susan gets a raise.
n : Susan buys a new car.
Premises: a) p q r, b) r n, c) n
Conclusion: p q

Proof:
1. p q r P
2. r n P
3. n P

4. r 2, 3, MT
5. (p q) 1, 4, MT
6. p q 5, De
Morgans law
19
DCS5028
Example:
Write formal proof for the following argument:
If Mary can sing or John can play, then I will buy the CD. Mary can sing. I will
buy the CD player. So I will buy the CD and the CD player.
Solution:
Let p : Mary can sing.
q : John can play.
r : I will buy the CD.
n : I will buy the CD player.
Premises: a) p q r, b) p, c) n
Conclusion: r n

Proof:
1. p q r P
2. p P
3. n P

4. p q 2, ADD
5. r 4, 1, MP
6. r n 5, 3, Conj
20
DCS5028
QUESTION
Prove by using rules of inference that [(p (q r)) (p s)
q s] r is valid.

21
Solution:

We prove [(p (q r)) (p s) q s] r.

1. p (q r) P
2. p s P
3. q P
4. s P

5. p 2, 4, DS
6. q r 5, 1, MP
7. r 3, 6, MP
DCS5028
SUMMARY
Proof of Techniques

22
Abbreviations
P Premise
Con Impl Conversion of Implication
ADD Addition
SIMP Simplification
Conj Conjunction
MP Modus Ponens
MT Modus Tollens
HS Hypothetical Syllogism
DS Disjunctive Syllogism
Res Resolution
DCS5028
REVIEW QUESTIONS
1. Formulate the arguments below symbolically and determine
whether each is valid.
Let p: The weather is hot , q: Its going to rain, r: Ill bring an
umbrella

(a) If the weather is hot, then its going to rain
The weather is hot
Its going to rain

(b) If the weather is hot or Ill bring an umbrella, then its
going to rain
Its going to rain

If the weather is not hot, then Ill bring an umbrella
23
DCS5028
REVIEW QUESTIONS
2. Give an argument using rules of inference to show that the
conclusion follow from the hypothesis:

Hypothesis: If the sun is shining or tomorrow is Saturday, then
we will go to the beach. The sun is shining. We will buy ice-
cream. Therefore we will go to the beach and buy ice-cream.
24
DCS5028

S-ar putea să vă placă și