0% found this document useful (0 votes)
11 views25 pages

Slide 2

Uploaded by

saidihosen0
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)
11 views25 pages

Slide 2

Uploaded by

saidihosen0
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/ 25

CSE181

Discrete Mathematics
Lecture: 2

Md. Asiful Islam Miah


Objectives and Outcomes

• Objectives: To understand how to construct a truth table for a


compound proposition, to understand the conditional
statement p → q and different equivalent expressions of p → q
, to understand bit operations.

• Outcomes: Students are expected to be able construct a truth


table for a given compound proposition, be able to explain the
conditional statement p → q and it’s equivalent expressions, be
able to perform Bit Operations.
Conditional Statements
• Let p and q be propositions.
• The conditional statement p → q is the proposition “if p, then
q.”
• The conditional statement p → q is false only when p is true but
q is false. p → q is true for other cases.
• In the conditional statement p → q, p is called hypothesis and
q is called conclusion.
• This one is the English usage of “if, then” or “implies”.
• The connective → is called the ‘conditional connective’.
• A conditional statement is also called an implication.
Truth Table for
Conditional Statement
Equivalent Expression of p → q
In terms of words, the proposition p → q also reads:
(a) if p, then q, or
if p, q
(The word “then” is sometimes omitted in English
sentences)
(b) p implies q
(c) p is a sufficient condition for q , or
a sufficient condition for q is p
(d) q is a necessary condition for p, or
a necessary condition for p is q
Equivalent Expression of p → q

(e) p only if q
(f) q if p , or
q, if p
(g) q whenever p
(h) q when p
(i) q unless ¬p
Remember!
• The hypothesis expresses a sufficient condition
• The conclusion expresses a necessary condition
• “but” is a logical synonym for “and”
• “when” / “whenever” means the same as “if”
• The hypothesis is the clause following “if”
• The conclusion is the clause following “then”

• If hypothesis, then conclusion


Example 7 (page 7)
Let p : "Maria learns discrete mathematics" and
q : "Maria will find a good job."
Express the statement p → q as a statement in English.
Solution:
• "If Maria learns discrete mathematics, then she will find a good
job.“
There are many other ways to express this conditional statement in
English.
•"Maria will find a good job when she learns discrete mathematics”
•"For Maria to get a good job, it is sufficient for her to learn discrete
mathematics”.
•"Maria will find a good job unless she does not learn discrete
mathematics.”
Exercise 19
• Write each of these statements in the form “if p, then
q” in English.
a) It snows whenever the wind blows from the northeast.
Ans. If the wind blows from the northeast, then it snows

b) The apple trees will bloom if it stays warm for a week.


Ans. If it stays warm for a week, then the apple trees will
bloom
Exercise 19

c) That the Pistons win the championship implies that


they beat the Lakers.
Ans. If the Pistons win the championship, then they beat
the Lakers.
d) It is necessary to walk 8 miles to get to the top of
Long’s Peak.
Ans. If you get to the top of Long’s Peak, then you must
have walked eight miles.
Exercise 19

e) To get tenure as a professor, it is sufficient to be world-


famous.
Ans. If you are world-famous, then you will get tenure as a
professor.
f) If you drive more than 400 miles, you will need to buy
gasoline.
Ans. If you drive more than 400 miles, then you will need
to buy gasoline.
Exercise 19

g) Your guarantee is good only if you bought your CD


player less than 90 days ago.
Ans. If your guarantee is good, then you must have bought
your CD player less than 90 days ago.

h) Jan will go swimming unless the water is too cold.


Ans. If the water is not too cold, then Jan will go swimming.
Converse, Contrapositive, and Inverse

• We can form some new conditional statements starting


with a conditional statement p → q

• The Converse of p → q is the proposition q → p


• The Contrapositive of p → q is the proposition ¬ q → ¬ p
• The Inverse of p → q is the proposition ¬ p → ¬ q
Converse, Contrapositive, and Inverse Contd.
• The Converse of p → q is the proposition q → p
• The Contrapositive of p → q is the proposition ¬ q → ¬ p
• The Inverse of p → q is the proposition ¬ p → ¬ q

From the truth table,


-> Contrapositive is equivalent to the conditional statement
(¬ q → ¬ p ≡ p → q )
-> Converse isn’t .
-> Also isn’t.
-> But the converse and inverse of a conditional statement are
equivalent to each other. (¬ p → ¬ q ≡ q → p).
Examples of Converse,
Contrapositive and Inverse
▪ Converse: p → q ==> q → p
Example: “If it is noon, then I am hungry.”
Converse: “If I am hungry, then it is noon.”
▪ Contrapositive: p → q ==> ¬q → ¬p
Example: “If it is noon, then I am hungry.”
Contrapositive: “If I am not hungry, then it is not noon.”
▪ Inverse: p → q ==> ¬p → ¬q
Example: “If it is noon, then I am hungry.”
Inverse: “If it is not noon, then I am not hungry.”
Prove using Truth Table
Bi-Conditional
• Let p and q be propositions.
• The bi-conditional statement p ↔ q is the proposition “p if
and only if q.”
• The bi-conditional statement p ↔ q is true when p and q
have the same truth values, and is false otherwise.
• Bi-conditional statements are also called “bi-implications”

• Question : Which operator is the opposite of ↔?


• Answer: ↔ has exactly the opposite truth table as ⊕.
Truth Table for Bi-conditional p ↔ q
Example of Bi-conditional statement

• Example 10 ( Page 9): Let p be the statement “ You


can take the flight” and q be the statement “ You buy
a ticket”. What is the statement for p ↔ q ?

▪ Solution:
“You can take the flight if and only if you have a ticket”
Example of Bi-conditional statement
• Example 11:

p: The angles of a triangle are equal to each other.


q: The triangle is equilateral.
p↔q?
▪ Solution:
“The angles of a triangle are equal to each other if and
only if the triangle is equilateral.”
Prove Using Truth Table:
How to Construct a Truth Table for a
Compound Proposition?

• At first look at the number of propositions (e.g. p, q, r )


in the given compound proposition.
• There will be 2n number of rows in the truth table,
where n is the number of propositions in the
compound proposition.
• Draw the table. In the first row, write down the name
of propositions (e.g. p, q, r ) starting from left/first
column.
• Construct the truth table step by step.
Example: Construct a truth table for
(p ⊕ q) ⊕ r
Precedence of Logical Operators

• Negation operator is applied before all other logical


operators
• Conjunction operator takes precedence over disjunction
operator
• Conditional and bi-conditional operators have lower
precedence
• Parentheses are used whenever necessary
Precedence of Logical Operators

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy