Discrete Structures (w3)
Discrete Structures (w3)
Discrete Structures (w3)
Week 03
BSCS 3rd Semester (7A + 7B + 7C)
Text Book:
Discrete Mathematics and its Applications by KENNET
H.ROSEN , 7th Edition.
Reference Material
Applied Discrete Structures by Alan Doerr and Kenneth
Levasseur , 2.0 Edition, Published by University of
Massachusetts Lowell (Year: 2013)
Week 03 Contents
Conditional Statements and its negation.
Converse, inverse and contrapositive
Translation from and to informal language.
Checking system specification statements
Solving riddles and statement analysis
problems
Negation of Conditional Statements ~(P→Q)
p q p→q ~(p → q)
T T T F
T F F T
F T T F
F F T F
Converse, inverse and
contrapositive
Hypothesis and Conclusion
A conditional statement consists of two parts,
Example
1. "It rains" is the hypothesis.
"They cancel school" is the conclusion.
Hypothes Conclusio
is n
Hypothes Conclusio
is n
Hypothes Conclusio
is n
Converse
To form the converse of the conditional statement, interchange
the hypothesis and the conclusion.
p q p→q (q → p)
T T T T
T F F T
F T T F
F F T T
Inverse
To form the inverse of the conditional statement, take the
negation of both the hypothesis and the conclusion..
~p
p q p→q ~p ~q
~q
T T T F F T
T F F F T T
F T T T F F
F F T T T T
Contrapositive
To form the contrapositive of the conditional statement,
interchange the hypothesis and the conclusion of the inverse
statement.
T T T F F T
T F F F T F
F T T T F T
F F T T T T
Converse, Inverse and
Contrapositive
Statement If p , then q . pq
Inverse
(if not p, then not q)
Converse
(if q, then p)
Contrapositive
(if not q, then not p)
Class Practice
Conditional
If a Polygon is a Rectangle,
Statement Then it has four sides
(if p then q)
Inverse
(if not p, then not q)
Converse
(if q, then p)
Contrapositive
(if not q, then not p)
SOLUTION..!
Class Practice (Solution)
Conditional
If an Object is a Triangle,
Statement Then it is a Polygon
(if p then q)
Example 1:
Informal: "If it rains, then the ground will be wet."
Formal: P→Q where
P: "It rains," and Q: "The ground will be wet."
Example 2:
Informal: "I will go to the party if and only if my
friend goes."
Formal: P↔Q where
P: "I will go to the party," and Q: "My friend goes."
Translation from Informal to Formal Language
Example 1:
Formal: P∧Q
Informal: “I will study and complete my homework.”
Here, P: “I will study," and Q: "I will complete my
homework.”
Example 2:
Formal: P∨¬Q
Informal: "I will go to the park or I will not stay home."
Here, P: "I will go to the park," and Q: "I will stay
home."
Translation from Formal to Informal Language
P↔(Q∧R)
1. p ∨ q, 2. ¬p, 3. p → q
Determine whether these system
specifications are consistent (Cont..)
p q ~p pVq pq
F T T T T
1. p ∨ q, 2. ¬p, 3. p → q 4. ~q
Determine whether these system
specifications are consistent:
1. “The diagnostic message is stored in the buffer or it is
retransmitted.”
2. “If users can access the file system, then they can save new
files.”
3. “If users cannot save new files, then the system software is not
being upgraded.”
System specifications consistent (Solution)
2. “If users can access the file system, then they can save new files.”
3. “If users cannot save new files, then the system software is not
being upgraded.”
1. P ~Q, 2. Q R, 3. ~R → ~P
System specifications Consistent (Solution)
~R
P Q R P ~Q QR
~P
F T T T T T