Professional Documents
Culture Documents
Dms 1
Dms 1
Dms 1
LBSITW
Sajith P
Module 1
Statements or Proposition
Statements -Examples
Example
1 4+7=9
2 Thiruvananthapuram is the capital of Kerala.
3 The integer 5 is a prime number.
4 The sun rises in the East
The truth value of (1) is false and the truth values of (2), (3) and (4) are
true.
Statements -Examples
Statements -Examples
Statement variable
Compound Statements
Conjuction
Conjuction-Truth Table
p q p∧q
T T T
T F F
F T F
F F F
Table: Table for (p ∧ q)
Conjuction-Examples
Example
1 p : I am rich.
q : I am happy.
p ∧ q : I am rich and happy.
2 p : I will drive my car.
q : I will be late.
p ∧ q : I will drive my car and I will be late.
3 p: 2 is an even integer.
q: 4 is an even integer.
p ∧ q : 2 is an even integer and 4 is an even integer.
Disjuction
Disjuction-Truth Table
p q p∨q
T T T
T F T
F T T
F F F
Table: Table for (p ∨ q)
Disjunction-Example
Example
1 p : I am rich.
q : I am happy.
p ∨ q : I am rich or happy.
2 p : I will drive my car.
q : I will be late.
p ∨ q : I will drive my car or I will be late.
3 p: 2 is an even integer.
q: 4 is an even integer.
p ∨ q: 2 is an even integer or 4 is an even integer.
Negation
p ¬p
T F
F T
Table: Table for (¬p)
Negation -Example
Example
1 p : I am rich.
¬p : I am not rich.
Or
¬p : It is not the case that I am rich.
2 p : I will drive my car.
¬p : I will not drive my car.
Or
¬p : It is not the case that I will drive my car.
3 p : 2+7>7
¬p :2 + 7 ≤ 7.
Implication
p q p→q
T T T
T F F
F T T
F F T
Table: Table for (p → q)
Implication-examples
Example
1 p : I am rich.
q : I am happy.
p → q : If I am rich then I am happy.
2 p : I will drive my car.
q : I will be late.
p → q :If I drive my car then I will be late.
3 p: 2 is an even integer.
q: 4 is an even integer.
p → q: If 2 is an even integer then 4 is an even integer.
Implication
Bicondtional
Two propositions p and q can be combined using the connective ‘if and
only if’. The statement thus formed is called biconditional statement. It is
writern as p ↔ q
The statement p ↔ q is true if both p and q have the same truth value.
In all other cases it has a truth value F.
Statements
p q p↔q
T T T
T F F
F T F
F F T
Table: The truth table for p ↔ q
Bicondtional
Example
1 p : I am happy.
q : I am rich.
p ↔ q :I am happy if and only if I am rich.
2 p : I will drive my car.
q : I will be late.
p ↔ q : I will drive my car if and only if I will be late.
3 p: 2 is an even integer.
q: 4 is an even integer.
p ↔ q: 2 is an even integer if and only if 4 is an even integer.
Problem
Example
Determine whether each of the following sentences is a statement.
1 In 2003 George W. Bush was the president of the United States.
2 x+3 is a positive integer.
3 Fifteen is an even integer.
4 If Jennifer is late for the party, then her cousin Zachary will be quite
angry.
5 What time is it?
Solution
Solution:
1 This sentence is a statement.
2 This sentence is not a statement.
3 This sentence is a statement.
4 This sentence is a statement.
5 This sentence is not a statement.
Problem
Example
If p, q be premitive statementsfor which the implications p → q is false.
Determine the truth values for each of the following.
(a) p ∧ q (b) ¬p ∨ q (c) q → p (d) ¬p → ¬q
Solution
p → q has a truth value F when p has a truth value T and q has a truth
value F.
1 p ∧ q has a truth value F.
2 ¬p ∨ q has a truth value F.
3 q→p has a truth value T.
4 ¬p → ¬q has a truth value F.
Solution
Example
Let p, q, r , s denote the following statements
Solution
Solution
1 r → q
2 q→p
3 (s ∧ r ) → q
Tautology
p ¬p p ∨ ¬p
T F T
F T T
Table: Truth table for p ∨ ¬p
Problem
Example
Let p, q, r , s denote the following statements
Solution
Solution
(a) If traingle ABC is equilateral then it is isosceles.
(b) If traingle ABC is not isosceles then it is not equilateral.
(c) The traingle ABC is equilateral if and only if it is equiangular.
(d) If traingle ABC is isosceles and it is not equilateral.
(e) If traingle ABC is equiangular then it is isosceles.
Problem
Example
Rewrite each of the following statements in an implication in the if-then
form.
1 Practicing her serve daily is a sufficient condtion for Darci to have a
good chance of winning the tennis tournament.
2 Mary will be allowed on Larry’s motorcycle only if she wears her
helmet.
Solution
Solution
1 If Darci Practices her serve daily then she will have a good chance of
Problem
Example
Assuming p is true, q is false and r is true, find the truth value of each of
the following
1 (p ∧ q) → r
2 (p ∨ q) → r
3 p ∧ (q → r )
4 p → (q → r )
Solution
Solution
p = T, q = F, r = T
1 (p ∧ q) → r
Since p is true and q is false p ∧ q is false, r is true. Therefore
(p ∧ q) → r is true.
2 (p ∨ q) has a truth value T, r has a truth value F. So (p ∨ q) → r is
false.
3 q → r has a truth value T and p has a truth value T. So p ∧ (q → r )
is true.
4 q → r has a truth value T. So p → (q → r ) has a truth value .
Problem
Example
Assuming p and r are false and that of q and s are true, find the truth
value of the each of the following propositions:
1 (s → (p ∧ ¬r )) ∧ (p → (r ∨ q)) ∧ s
2 ((p ∧ ¬q) → (q ∧ r )) → (s ∨ ¬q)
Solution
Solution
p = F, r = F, q = T, s = t
1 ¬r is true.
(p ∧ ¬r ) has a truth value F.
s → (p ∧ ¬r ) has a truth value F. Therefore the given expression
(s → (p ∧ ¬r )) ∧ (p → (r ∨ q)) ∧ s has the truth value F.
2 (p ∧ ¬q) has a truth value F.
q ∧ r has a truth value F.
(p ∧ ¬q) → (q ∧ r ) is True.
s ∨ ¬q) has a truth value F.
So the expression ((p ∧ ¬q) → (q ∧ r )) → (s ∨ ¬q) has the truth
value T.
Problem
Example
p: It is below freezing point,
q: It is snowing.
What are the following statements in symbolic form?
(a) It is below freezing point and snowing.
(b) It is not below freezing point and it is not snowing.
(c) It is either snowing or below freezing point.
(d) ‘It is below freezing point’ is the necessary and sufficient condition for
it to be snowing.
Solution
Solution
(a) p∧q
(b) ¬p ∧ ¬q
(c) p∨q
(d) p→q
Problem
Example
Formulate the following symbolic expressions in words using
p: Today is Monday.
q: It is raining.
r : It is hot.
(a) p∨q
(b) ¬p ∧ (q ∨ r )
(c) ¬(p ∨ q) ∧ r
Solution
Solution
(a) Today is Monday or it is raining.
(b) Today is not Monday and either it is raining or it is hot.
(c) It is hot and it is not the case that today is Monday or it is raining.
Problem
Example
p: It is below freezing point.
q: It is snowing.
What ate the following statements in symbolic form?
label=((a) It is below freezing point and snowing.
lbbel=((b) It is not below freezing point and it is not snowing.
lcbel=((c) It is either snowing or below freezing point.
ldbel=((d) ‘It is below freezing point’ is the necessary and sufficient condition for
it to be snowing.
Solution
Solution
(a) p∧q
(b) ¬p ∧ ¬q
(c) p∨q
(d) p→q
Solution
Example
Formulate the following symbolic expressions in words using
p: Today is Monday.
q: It is raining.
r : It is hot.
(a) p∨q
(b) ¬p ∧ (q ∨ r )
(c) ¬(p ∨ q) ∧ r
Solution
Solution
(a) Today is Monday or it is raining.
(b) Today is not Monday and either it is raining or it is hot.
(c) It is hot and it is not the case that today is Monday or it is raining.
Tautology-Problem
Example
Indicate which ones are tautologies or contradiction:
(a) (p → ¬q) → ¬p
(b) p → (p ∨ q)
(c) p → (q → p)
Contradiction
p ¬p p ∧ ¬p
T F F
F T F
Table: The truth table for p ∧ ¬p
Tautology
Example
(¬q ∧ p) ∧ q is a contradiction
p q ¬q ¬q ∧ p (¬q ∧ p) ∧ q
T T F F F
T F T T F
F T F F F
F F T F F
Table: The truth table for (¬q ∧ p) ∧ q
Exclusive OR
p q pYq
T T F
T F T
F T T
F F F
Table: The truth table for p Y q
NAND
The connective NAND is a combination of NOT and AND. Here NOT is
for negation and AND is for conjunction. It is denoted by ↑.
p ↑ q = ¬(p ∧ q)
NOR
NOR is the combination of NOT and OR. It is denoted by ↓
p ↓ q = ¬(p ∨ q)
Problems
Example
If statement q has a truth value 1, determine all truth value assignment
for the premitive statements p, r and s for which the truth value of the
statement
(q → [(¬p ∨ r ) ∧ ¬s]) ∧ [¬s → (¬r ∧ q)]
is 1.
Solution
Solution
Given
Truth value of q is 1 and
(q → [(¬p ∨ r ) ∧ ¬s]) ∧ [¬s → (¬r ∧ q)] is 1.
So the truth value of (q → [(¬p ∨ r ) ∧ ¬s]) is 1 and
[¬s → (¬r ∧ q)] is 1.
So the truth value of (q → [(¬p ∨ r ) ∧ ¬s] is 1 implies [(¬p ∨ r ) ∧ ¬s] has
a truth value 1
[(¬p ∨ r ) ∧ ¬s] has a truth value 1 implies
(¬p ∨ r ) has a truth value 1 and ¬s have a truth value 1.
¬s have a truth value 1 implies s has a truth value 0.
Solution
[¬s → (¬r ∧ q)] has a truth value 1 implies
((¬r ∧ q) has a truth value 1
Therefore ¬r has a truth value 1.
so the truth value of r is 0.
(¬p ∨ r ) has a truth value 1 and r has a truth value 0 implies
¬p has a truth value 1.
So the truth value pf p is 0.
So the truth value of primitive variables p is 0, r is 0 and s is 0.
Problem
Example
Construct truth tables for each of the following compound statements and
check which of the compound statements are tautologies, where p, q, r
denote primitive variables.
1 ¬(p ∨ ¬q) → ¬p
2 p → (q → r )
3 (p → q) → r
4 (p → q) → (q → p)
5 [p ∧ (p → q)] → q
6 (p ∧ q) → p
7 q ↔ (¬p ∨ ¬q)
8 [(p → q) ∧ (q → r )] → [(p → r )
Problems
Example
Determine all truth value assignments if any for the primitive statements
p, q, r , s, t that makes each ofthe following component statement false.
1 [(p ∧ q) ∧ r ] → (s ∨ t)
2 [p ∧ (q ∨ r )] → (s Y t).
Solution
1 [(p ∧ q) ∧ r ] → (s ∨ t) has a truth value F.
Problems
Solution
1 [p ∧ (q ∧ r )] → (s Y t) has a truth value F.
Logical Equivalance
Logical Equivalance
Example
¬(p ∨ q) ⇔ ¬p ∧ ¬q
¬(p ∨ q) and ¬p ∧ ¬q have the same truth value.
so ¬(p ∨ q) ⇔ ¬p ∧ ¬q
p q ¬p ¬q p∨q ¬(p ∨ q) ¬p ∧ ¬q
T T F F T F F
T F F T T F F
F T T F T F F
F F T T F T T
Table: Truth table for ¬(p ∨ q) ⇔ ¬p ∧ ¬q
Logical Equivalance
Equivalent formulas:
1 Idempotent Laws
p∨p ⇔p
p∧p ⇔p
2 Associate laws
(p ∨ q) ∨ r ⇔ p ∨ (q ∨ r )
(p ∧ q) ∧ r ⇔ p ∧ (q ∧ r )
3 Commutative laws
p∨q ⇔q∨p
p∧q ⇔q∧p
4 Distributive laws
p ∨ (q ∧ r ) ⇔ (p ∨ q) ∧ (p ∨ r )
p ∧ (q ∨ r ) ⇔ (p ∧ q) ∨ (p ∧ r )
5 Absorption laws
p ∨ F ⇔ p, p ∧ F ⇔ F
p ∨ T ⇔ T, p ∧ T ⇔ p
6 Demorgan’s laws
¬(p ∨ q) ⇔ ¬p ∧ ¬q
¬(p ∧ q) ⇔ ¬p ∨MAT
Sajith P ¬q203 Discrete Mathematical Structures September 30, 2020 61 / 92
Tautology
Logical Equivalance
Example
Show that p ∧ (¬q ∨ r ) and p ∨ (q ∧ ¬r ) are logically not equivalent.
Logical Equivalance
Logical Equivalance
p q r ¬p (¬q ∨ r ) s1 ¬r (q ∧ ¬r ) s2
0 0 0 1 1 0 1 0 0
0 0 1 1 1 0 0 0 0
0 1 0 0 0 0 1 1 1
0 1 1 0 1 0 0 0 0
1 0 0 1 1 1 1 1 1
1 0 1 1 1 1 0 0 1
1 1 0 0 0 0 1 1 1
1 1 1 0 1 1 0 0 1
Fom the table it is clear that s1 and s2 donot have the same truth value.
s1 and s2 are not logically equivalent.
Logical Equivalance
Example
Prove p → q ⇔ ¬p ∨ q
Logical Equivalance
Solution
p q ¬p p→q (¬p ∨ q)
0 0 1 1 1
0 1 1 1 1
1 0 0 0 0
1 1 0 1 1
Fom the table it is clear that p → q and ¬p ∨ r have the same truth value.
p → q and ¬p ∨ r are logically equivalent.
Logical Equivalance
Conclusion
The negation of the conjuction of two premitive statement p, q is
equivalent to the disjunction of their negations ¬p, ¬q.
Logical Equivalance
Conclusion
The negation of the disjunction of two premitive statement p, q is
equivalent to the conjuction of their negations ¬p, ¬q.
Logical Equivalance
Duality
Duality
Duality
Let p, q denote primitive statement. Use truth table to verify the following
logical equivalence
1 p → (q ∧ r ) ⇔ (p → q) ∧ (p → r )
2 (p ∨ q) → r ⇔ (→ r ) ∧ (q → r )
3 (p → (q ∨ r ) ⇔ [¬r → (p → q]
Logical Equivalance
Problem
Negate the following statement.
If John goes to Lake George then Marry pays for John’s shopping spree
Logical Equivalance
p ↔ q ⇔ ¬p ∨ q
¬(p ↔ q) ⇔ ¬(¬p ∨ q)
⇔ ¬(¬p) ∧ ¬q
⇔ p ∧ ¬q
Logical Equivalance
Example
Use subtitution rule to verify that each of the following is a tautology.
(Here p, q, r are premitive statements.
1 [p ∨ (q ∨ r )] ∨ ¬[p ∨ (q ∨ r )]
2 [(p ∨ q) → r )] ↔ [¬r → ¬(p ∨ q)]
Logical Equivalance
Solution
1 we know that p ∨ ¬p ⇔ T
0
Replace P by [p ∨ (q ∨ r )]
[p ∨ (q ∨ r )] ∨ ¬[p ∨ (q ∨ r )] isa tautology.
2 we know that p → q ⇔ ¬q → ¬p
p → q ↔ ¬q → ¬p ⇔ T0
In p → q ⇔ ¬q → ¬p
replace p by p ∨ q and occurrence q by r we get
[(p ∨ q) → r ] ⇔ [¬r → (p ∨ q)]
[(p ∨ q) → r )] ↔ [¬r → ¬(p ∨ q)] ⇔ T0
Logical Equivalance
Example
For primitive statement p, q, r and s, simplify the compound statement
[[[(p ∧ q) ∧ r ] ∨ [(p ∧ q) ∧ ¬r ]] ∨ ¬q] → s
Logical Equivalance
Solution
[[(p ∧ q) ∧ r ] ∨ [(p ∧ q) ∧ ¬r ]] ⇔
[(p ∧ q) ∧ (r ∨ ¬r )]
[(p ∧ q) ∧ T0 ]
(p ∧ q)
[(p ∧ q) ∨ ¬q]
⇔ [(p ∨ ¬q) ∧ (q ∨ ¬q)]
⇔ [(p ∨ ¬q) ∨ T0 ]
(p ∨ ¬q)
Negation- Problems
Example
Negate and express in each of the following statement in English.
1 Kelsey will get a good education if she put her studies before her
interest in cheerleading.
2 Norma is doing her home work and Karen is practicing her piano
lessons.
3 If Harold passes his C++ course and finishes his data structure
project then he will graduate at the end of the semester.
Problems
Solution
1 p : Kelsey put her studies before her interest in cheerleading. q :
p → q ⇔ ¬p ∨ q
¬(p → q) ⇔ ¬(¬p ∨ q)
⇔ ¬(¬p) ∧ ¬q
⇔ p ∧ ¬q
Problems
1 p : Norma is doing her home work
q : Karen is practicing her piano lessons
The given statement is p ∧ q ¬(p ∧ q) ⇔ ¬p ∨ ¬q
So the negation of the given statement is
Norma is not doing her home work or Karen is not practicing her
piano lessons.
2 p Harold passes his C++ course q : Harold finishes hir data structure
project
r : Harold will graduate at the end of the semester. The given
statement is (p ∧ q) → r
(p ∧ q) → r ⇔ ¬(p ∧ q) ∨ r
¬[(p ∧ q) → r ] ⇔ ¬[¬(p ∧ q) ∨ r ]
¬¬(p ∧ q) ∧ ¬r
⇔ (p ∧ q) ∧ ¬r
Problems
Problem
Example
Negate each of the following and simplify the resulting statement
1 p ∧ (q ∨ r ) ∧ (¬p ∨ ¬q ∨ r )
2 (p ∧ q) → r
3 p → (¬q ∧ r )
4 p ∨ q ∨ (¬p ∧ ¬q ∧ r )
Inverse, Converse
1 p: 4ABC is equilateral
q: 4ABC is isosceles
p → q: If 4ABC is equilateral, then it is isosceles.
Converse: q → p: If 4ABC is isosceles, then it is equilateral.
Inverse: ¬p → ¬q: If 4ABC is not equilateral, then it is not isosceles.
Contrapositive: ¬q → ¬p: If 4ABC is not isosceles, then it is not
equilateral.
Inverse Converse,Contrapositive
1 p: 2 is an even integer
q: 4 is an even integer
p → q: If 2 is an even integer then 4 is an even integer.
Converse: q → p: If 4 is an even integer then 2 is an even integer.
Inverse: ¬p → ¬q: If 2 is not an even integer then 4 is not an even
integer.
Contrapositive: ¬q → ¬p: If 4 is not an even integer, then 2 is not
an even integer.
Example
Write the converse, inverse, and contrapositive of each of the following
implications. For each implications determine its truth value of the
corresponding converse, inverse and contrapositive.
1 If 0 + 0 = 0 then 1 + 1 = 1
2 If − 1 < 3 and 3 + 7 = 10 then Sin( 3π
2 ) = −1
Converse,Inverse
Solution
1 If 0 + 0 = 0 then 1 + 1 = 1
p : 0+0=0
q :1+1=1
Implication :( p → q) : If 0 + 0 = 0 then 1 + 1 = 1
Truth valiue ; F
Converse ( q → p) : If 1 + 1 = 1 then 0 + 0 = 0
Truth valiue : T
Inverse ( ¬p → ¬q) : If 0 + 0 6= 0 then 1 + 1 6= 1
Truth valiue : T
Contrapositive ( ¬q → ¬p) : If 1 + 1 6= then 0 + 0 6= 0
Truth valiue : T
Inverse, Converse
Solution
1 If − 1 < 3 and 3 + 7 = 10 then Sin( 3π
2 ) = −1
p : −1<3
q : 3 + 7 = 10
r : Sin( 3π
2 ) = −1
Implication: (p ∧ q) → r
If − 1 < 3 and 3 + 7 = 10 then Sin( 3π
2 ) = −1
Truth value : True
Converse : r → (p ∧ q)
If Sin( 3π2 ) = −1 then − 1 < 3 and 3 + 7 = 10
Truth value : True
Inverse, Converse
Solution
1 Inverse: ¬(p ∧ q) → ¬r ⇔ (¬p ∨ ¬q) → ¬r
Inverse Converse
Example
Let p, q, r denotes primitive statements. Find the form of contrapositive
of p → (q → r ) with (a) only one occurrence of the connective → (b)
no occurrence of the connective →
Inverse Converse
Solution
Contrapositive of p → (q → r ) is ¬(q → r ) → ¬p
(a) Only one occurrence of the connective →
(q → r ) ∨ ¬p
(b) No occurrence of the connective (¬q ∨ r ) ∨ ¬p