Discrete Mathematics
Discrete Mathematics
Book
Discrete Mathematics and Its Applications
Seventh Edition
By K. H. Rosen
Discrete Mathematics
Chapter 1
The Foundations: Logics, Sets, and Functions
Discrete Mathematics
Implication (if – then)
Let p and q be propositions. the conditional statement p →
q, is the proposition "if p, then q" which is false when p is
true, and q is false, and true otherwise.
Remarks
p is called hypothesis
q is called the conclusion
p q p→q
T T T
T F F
F T T
F F T
Discrete Mathematics
Implication (if – then)
What is Conditional Statement / Implication
Examples
If you work hard, you will succeed.
If I elected, then I will lower taxes.
Elected, lower taxes
Not elected, lower taxes
Not elected, not lower taxes
Elected, not lower taxes
Discrete Mathematics
Conditional
If you are working hard, then you are a toper.
p→q
Convers
If you are a toper, then you working hard.
p→ q : q → p
Inverse
If you are not working hard, then you are not a toper.
p → q : ~p → ~q
Contrapositive
If you are not toper, then you are not working hard.
p→q:~q→~p
Discrete Mathematics
Biconditional Statements (if and only if)
let p and q be propositions. The biconditional statement
p q is the proposition "p if and only if q" which is true
when p and q have the same truth values and is false
otherwise.
Remarks
p → has the same truth value as (p q) ^ (q → p)
p q p→q
T T T
T F F
F T F
F F T
Discrete Mathematics
Biconditional (if and only if)
Let p be the statement "Shape is a triangle" and let q be
the statement "it has exactly three sides".
p q
Examples
“Shape is a triangle if and only if it has exactly three sides.“
(p → q) ^ (q → p)
Discrete Mathematics
Compound Proposition with Implication
Connectives can be used to build up compound
propositions with implication.
(p v ~q) → (p ^ q)
Remarks
Construct the truth table of the compound proposition
p q ~q p v ~q p^q (p v ~q) → (p ^ q)
T T F T T T
T F T T F F
F T F F F T
F F T T F F
Discrete Mathematics
1. 2
Applications of Propositional Logic
Discrete Mathematics
English Sentence into a Logical Expression
How can this English sentence be translated into a logical
expression?
If you work hard, then you will succeed.
Logical Expression
p: If you work hard
q: You will succeed
p→q
Discrete Mathematics
English Sentence into a Logical Expression
If it is raining, then the event will be canceled.
Logical Expression
p: it is raining,
q: the event will be canceled
p→q
Discrete Mathematics
English Sentence into a Logical Expression
If you save money, you can buy a new car.
Logical Expression
p: If you save money,
q: you can buy a new car
p→q
Discrete Mathematics
English Sentence into a Logical Expression
you can access the internet from campus only if you are a
computer science major or you are not a freshman.
Logical Expression
p: You can access the internet from campus.
q: You are a computer science major.
r: You are a freshman.
p → ( q v ~r )
Discrete Mathematics
English Sentence into a Logical Expression
You can play in the tournament if and only if you are a chess
club member and you have attended the training sessions.
Logical Expression
p: You can play in the tournament.
q: You are a chess club member.
r: You have attended the training sessions.
p (q∧r)
Discrete Mathematics
English Sentence into a Logical Expression
You cannot ride the roller coaster if you are under 4 feet tall
unless you are older than 16 years old. write the expressions
Logical Expression
p: You can ride the roller coaster.
q: You are under 4 feet tall.
r: You are older than 16 years old.
¬( p ( ~q ∨ r ) )
Discrete Mathematics
Chapter 1 Exercise