You are on page 1of 33

PROPOSITIONAL LOGIC

CSE 2213 – Discrete Mathematics


Course teacher: Muntaka Ibnath

25/6/2022 MUNTAKA@CSE.UIU.AC.BD
CONDITIONAL
PROPOSITIONS

25/6/2022 MUNTAKA@CSE.UIU.AC.BD
If today is Friday, then elephants fly in the sky.
Is this statement true?

It is true
everyday
I don’t know. Is it? except Friday.

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 3
CONSIDER THIS SENTENCE
If it rains, I will stay home.

WHEN IS THIS SENTENCE TRUE?

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 4
IF IT RAINS, I WILL STAY HOME

The sentence is true if it is raining, and you are staying home.

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 5
WHAT IF IT DOESN’T
RAIN?

25/6/2022 MUNTAKA@CSE.UIU.AC.BD
IF IT RAINS, I WILL STAY HOME
If it does not rain, you might still stay home
(probably because you are sick)

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 7
IF IT RAINS, I WILL STAY HOME
The sentence does not say anything about what if it does not rain
So if it does not rain, we can say you have not broken any condition
So if it does not rain, the sentence is true whether you stay home or not

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 8
SO WHEN IS THIS
SENTENCE FALSE?

25/6/2022 MUNTAKA@CSE.UIU.AC.BD
IF IT RAINS, I WILL STAY HOME

The sentence is false if it rains,


and you go out anyway

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 10
CONDITIONAL STATEMENTS
 
p q p →q
T T T
T F F
F T T
F F T

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 11
SUFFICIENT CONDITION
 

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 12
NOW TELL ME AGAIN …
If today is Friday, elephants fly in the sky.
Is this statement true?

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 13
NOW CONSIDER THIS
SENTENCE
You will pass only if you study.

WHEN IS THIS SENTENCE TRUE?

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 14
YOU WILL PASS ONLY IF YOU
STUDY

The sentence is true if you study, and you pass

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 15
WHAT IF YOU DON’T STUDY?

YOU FAIL
25/6/2022 MUNTAKA@CSE.UIU.AC.BD 16
WHAT IF YOU DON’T
PASS?

25/6/2022 MUNTAKA@CSE.UIU.AC.BD
YOU WILL PASS ONLY IF YOU
STUDY

You may not pass even if you have studied


(probably because you became sick)
25/6/2022 MUNTAKA@CSE.UIU.AC.BD 18
YOU WILL PASS ONLY IF YOU
STUDY
Even though you have studied, you may not pass for a variety of reasons
So if you do not pass, that does not violate any condition
So if you do not pass, the sentence is true whether you have studied or not

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 19
NECESSARY CONDITION
Note that while you may fail for any possible reason, you must study in order to pass
In another word, in order to pass, it is necessary that you study

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 20
NECESSARY CONDITION

p q
T T T
T F F
F T T
F F T

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 21
NECESSARY CONDITION AND
SUFFICIENT CONDITION
 

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 22
দুইটা জিনিস মনে রাখবেন

If clause is the sufficient condition.


Only if clause is the necessary condition.
25/6/2022 MUNTAKA@CSE.UIU.AC.BD 23
OKAY, NOW CONSIDER THIS
SENTENCE
You can take the train if and only if you buy ticket.

WHEN IS THIS SENTENCE TRUE?

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 24
YOU CAN TAKE THE TRAIN IF
AND ONLY IF YOU BUY TICKET
If you have a ticket, and you take the train

OR
If you don’t have a ticket, and the TTE throws you
out

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 25
WHEN IS THIS SENTENCE
FALSE?

25/6/2022 MUNTAKA@CSE.UIU.AC.BD
YOU CAN TAKE THE TRAIN IF
AND ONLY IF YOU BUY TICKET
If you have a ticket, and the TTE still refuses to
take you

OR
If you don’t have a ticket, and you take the train
anyway

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 27
BICONDITIONAL STATEMENT
 
p q p↔q
T T T
T F F
F T F
F F T

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 28
CONVERSE, CONTRAPOSITIVE
AND INVERSE
If it rains, I will stay home.  
Converse: If I stay home, it is raining.
Contrapositive: If I do not stay home, it is not raining.
Inverse: If it does not rain, I will not stay home.
Which of these are equivalent?

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 29
Practice
1. If two angles are congruent, then they have the same measure.

2. If a quadrilateral is a rectangle, then it has two pairs of parallel sides.

30
Solution
Example 1 Example 2

31
PROBLEM
  You get an A in this class, but you do
not do every exercise in this book.

You get an A on the final, you do every


exercise in this book, and you get an A
in this class.

To get an A in this class, it is necessary


for you to get an A on the final.

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 32
PROBLEM
  You get an A on the final, but you don’t
do every exercise in this book;
nevertheless, you get an A in this class.

Getting an A on the final and doing


every exercise in this book is sufficient
for getting an A in this class.

You will get an A in this class if and


only if you either do every exercise in
this book or you get an A on the final.

25/6/2022 MUNTAKA@CSE.UIU.AC.BD 33

You might also like