Sie sind auf Seite 1von 63

A J Institute of Engineer

A J Institute of Engineering and Technology, Mangaluru,

ru
lu
ga
an

Lecture Notes
M

Discrete Mathematical Structures (18CS36)


T,
IE
AJ

Prepared By

Dr. Shantha Kumari. K.


Department of Mathematics

AJIET, Mangaluru
Module 1
A J Institute of Engineering and Technology, Mangaluru

Fundamentals of Logic

1.1 Proposition

Propositions (or Statements), are declarative sentences that are either true or false - but not both. For example,

ru
the following are statements, and we use the lowercase letters of the alphabet (such as p, q, and r ) to represent
these statements.
Examples :
lu
ga
p : Combinatorics is a required course for Computer Science Engineering.
an

q : Margaret Mitchell wrote Gone with the Wind.


r :2+3=5
,M

We do not regard sentences such as the exclamation “What a beautiful evening!” or the command “Get up
and do your exercises.” or the question “Where are you going?” as statements since they do not have truth
ET

values (true or false). Also, “The number x is an integer.” is not a statement because its truth value (true or
A J Institute of Engineering and Technology, Mangaluru,

false) cannot be determined until a numerical value is assigned for x. If x were assigned the value 7, the result
I
AJ

1
would be a true statement. Assigning x a value such as 2
however, would make the resulting statement false.

1.2 Primitive and Compound statements

A proposition which can not be broken down into simpler statements is called a Primitive Statement. Also a
primitive statement doesn’t contain any logical Conectives. The proposition which is obtained by combining
two or more primitive statements using logical connectives is called a Compound statement.

Example 1.2.1. Determine whether each of the following sentences is a statement. Which of these are primitive
statements?
a) In 2003 George W. Bush was the president of the United States. b) x + 3 is a positive integer. c) Fifteen is
an even number. d) If Jennifer is late for the party, then her cousin Zachary will be quite angry. e) What time is
it?

Answer : The sentences in parts (a), (c)and(d), are statements. (b) is not a statement as its truth value

1
Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 2

cannot be determined until a numerical value is assigned for x. (e) is not a statement as it s a question. The
statements in parts (a), (c), and (f ) are primitive statements.

1.3 Negation

The negation of a statement is generally formed by writing the word ‘not’ at a proper place in the statement
A J Institute of Engineering and Technology, Mangaluru

(proposition) or by prefixing the statement with the phrase ‘It is not the case that’. If p denotes a statement then
the negation of p is written as ¬p or ∼ p and read as ‘not p’. If the truth value of p is T then the truth value
of ¬p is F. Also if the truth value of p is F then the truth value of ¬p is T.
Truth table for negation is :

p ∼p
T F
F T

ru
1.4 Conjuction
lu
The conjunction of the statements p, q is denoted by p ∧ q, which is read ”p and q· The statement p ∧ q has
ga
the truth value T whenever both p and q have the truth value T Otherwise it has truth value F .
an

Truth table for conjunction is given by


p q p∧q
,M

T T T
T F F
ET

F T F
A J Institute of Engineering and Technology, Mangaluru,

F F F
I
AJ

1.5 Disjunction

The disjunction of two statements p and q is the statement p ∨ q which is read as ‘p or q’. The statement p ∨ q
has the truth value F only when both p and q have the truth value F. Otherwise it has truth value T.
Truth table for disjunction is :
p q p∨q
T T T
T F T
F T T
F F F

Example 1.5.1. Construct the truth table for p ∨ (¬q ∧ r)

Solution : Truth table for p ∨ (¬q ∧ r) is :

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 3

p q r (¬q) (¬q ∧ r) p ∨ (¬q ∧ r)


F F F T F F
F F T T T T
F T F F F F
F T T F F F
T F F T F T
T F T T T T
T T F F F T
T T T F F T
A J Institute of Engineering and Technology, Mangaluru

1.6 Logical Equivalence

Two compound statements s1 , s2 are said to be logically equivalent, and we write s1 ⇔ s2 or s1 ≡ s2 if


they have the same truth values for all choices of truth values for their primitive components.

Example 1.6.1. Prove that ∼ (p ∧ q) ⇔ (∼ p∨ ∼ q)

ru
lu
Solution : Let us denote s1 :∼ (p ∧ q) and s2 : (∼ p∨ ∼ q) and construct the Truth tables for both s1 and
s2 .
ga
p q (p ∧ q) s1 :∼ (p ∧ q) ∼p ∼q s2 : (∼ p∨ ∼ q)
an

T T T F F F F
M

T F F T F T T
F T F T T F T
T,

F F F T T T T
IE

Since truth values of s1 and s2 are same, we have s1 ⇔ s2 .


A J Institute of Engineering and Technology, Mangaluru,

AJ

Example 1.6.2. Show that ¬(p ∨ q) ⇔ ¬p ∧ ¬q

Solution :

p q (p ∨ q) ¬(p ∨ q) (¬p) (¬q) (¬p ∧ ¬q)


F F F T T T T
F T T F T F F
T F T F F T F
T T T F F F F

Since the truth values of ¬(p ∨ q) and ¬p ∧ ¬q agree, these two statements are logically equivalent.

Example 1.6.3. By constructing the truth table, show that the compound propositions p ∧ (¬q ∨ r) and
p ∨ (q ∧ ¬r) are not logically equivalent. (VTU Dec 2014)

Solution: The truth table for the given statements is :

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 4

p q r ∼q ∼q∨r s1 : p ∧ (∼ q ∨ r) ∼r (q∧ ∼ r) s2 : p ∨ (q∧ ∼ r)


T T T F T T F F T
T T F F F F T T T
T F T T T T F F F
T F F T T T T F F
F T T F T F F F F
F T F F F F T T F
F F T T T F F F F
A J Institute of Engineering and Technology, Mangaluru

F F F T T F T F F

The truth values of the statements corresponding to the columns s1 andd s2 are not same. Hence the given
statements are not logically equivalent.

1.7 Conditional

If p and q are any two statements (or propositions) then the statement p → q which is read as, ‘If p, then q’ is

u
called a conditional statement or implication and the connective is the conditional connective.
The conditional is defined by the following table:
l ur
ga
p q p→q
T T T
an

T F F
F T T
M

F F T
T,

In this conditional statement, p is called the hypothesis and q is called the consequence or conclusion.
A J Institute of Engineering and Technology, Mangaluru,

IE

Note : We also read the statement p → q in any one of the form equivalent forms :
AJ

(i) “p implies q” (ii) ”If p, then q” (iii) ”p is sufficient for q”


(iv) ”p is a sufficient condition for q”
(v) ”q is necessary for p
(vi) ”q is a necessary condition for p” (vi)”p only if q”

Example 1.7.1. Prove that


p → q ⇔∼ p ∨ q

Proof :Let us construct the truth table for both statements s1 : p → q and s2 : ∼ p ∨ q.

p q s1 : p → q ∼p s2 : ∼ p ∨ q
T T T F T
T F F F F
F T T T T
F F T T T

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 5

Since the truth values of s2 : ¬p ∨ q and s1 : p → q agree, they are logically equivalent.

Example 1.7.2. Rewrite each of the following statements as an implication in the if-then form.

a) Practicing her serve daily is a sufficient condition for Darci to have a good chance of winning the tennis
tournament.

b) Fix my air conditioner or I won’t pay the rent.


A J Institute of Engineering and Technology, Mangaluru

c) Mary will be allowed on Larry’s motorcycle only if she wears her helmet.

Solution :

a) “p is a sufficient condition for q” is the statement p → q. Hence given statement can be written as : “If
Darci practices her serve daily then she will have a good chance of winning the tennis tournament”.

b) The statement is in the form ∼ p ∨ q which is equvivalent to p → q. Hence given statement can be written
as : “I you don’t fix my air conditioner then I won’t pay the rent.”

ru
c) “p only if q” is the statement p → q. Hence given statement can be written as : “If Mary is to be allowed
on Larry’s motorcycle, then she must wear her helmet.
lu
ga
Example 1.7.3. Determine the truth value of each of the following.
an

i) If 3 + 4 = 12 then 3 + 2 = 6
ii) if 4 + 4 = 8 then 5 + 4 = 10
,M

iii) If Dr. Radhakrishnan was the first president of India then 3 + 4 = 7. ( VTU Dec 2007)
ET

Solution :
A J Institute of Engineering and Technology, Mangaluru,

(i) The statement is in the form p → q where p:3 + 4 = 12 and q:3 + 2 = 6. Since both p and q are false the
I
AJ

statement p → q is True.
(ii) The statement is in the form p → q where p:4 + 4 = 8 and q:5 + 4 = 10. Since p is True and q is False the
statement p → q is False.
(iii) The statement is in the form p → q where p: Dr. Radhakrishnan was the first president of India and q:3
+ 4 = 7. Since p is False and q is True the statement p → q is True.

Example 1.7.4. Let p, q be primitive statements for which the implication p → q is false. Determine the truth
values for each of the following : i) p ∧ q ii) ¬p ∨ q iii) q → p iv) ¬q → ¬p (VTU Dec 2014, Dec
2013, June 2008)

Solution: Given that p → q is false. i.e. p is True and q is False. Hence i) p ∧ q is False. ii) ¬p ∨ q is
False. iii) q → p is True. iv) ¬q → ¬p is False.

Example 1.7.5. Find the possible truth values of p, q and r if


i) p → (q ∨ r) is FALSE ii) p ∧ (q → r) is TRUE. ( VTU June 2017, Dec 2007)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 6

Solution : (i) Given that p → (q ∨ r) is FALSE. This implies that p is True and (q ∨ r) is False. Now (q ∨ r)
is False implies that q is False and r is False. Hence the possible truth values of p, q and r are respectively
True, False and False.
(ii) Given that p ∧ (q → r) is TRUE. Then p is True and q → r is True.
Now, q → r is True when q is True and r is True or when q is False and r is True or q is False and r is False.
Hence the possible Truth Values of p, q and r are respectively T, T, T or T, F, T or T, F, F
A J Institute of Engineering and Technology, Mangaluru

Example 1.7.6. Construct the truth table for, [p ∧ (p → q)] → q (Jan 2015, June 2014)

Solution : The Truth Table for the Given Compound Statement is

p q p→q p ∧ (p → q) [p ∧ (p → q)] → q
T T T T T
T F F F T
F T T F T
F F T F T

ru
Example 1.7.7. Construct the truth table for, {(p → q) ∧ (q → r)} → {(p → r)}

lu (Jan 2015, June 2014)


ga
Solution : The Truth Table for the Given Compound Statement S : {(p → q)∧(q → r)} → {(p → r)}is
an

p q r (p → q) (q → r) (p → r) {(p → q) ∧ (q → r)} S
,M

T T T T T T T T
T T F T F F F T
ET

T F T F T T F T
A J Institute of Engineering and Technology, Mangaluru,

T F F F T F F T
I

F T T T T T T T
AJ

F T F T F T F T
F F T T T T T T
F F F T T T T T

1.8 Biconditional

If p and q are any two statements (propositions), then the statement p ↔ q which is read as ‘p if and only
if q’ and abbreviated as ‘p iff q’ is called a biconditional statement and the connective ↔ is the biconditional
connective.
The truth values of p ↔ q is given by the following table:

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 7

p q p↔q
T T T
T F F
F T F
F F T
p ↔ q can also be stated as “p is a necessary and sufficient condition for q”.
A J Institute of Engineering and Technology, Mangaluru

the biconditional of two statements p, q, is denoted by p ↔ q which is read ”p if and only if q” or ”p is


necessary and sufficient for q”

Example 1.8.1. Construct the truth table for (p → q) ∧ (q → p) and show that it is logically equivalent to
p↔q

Solution : The Truth table for the given statement is

p q p → q q → p s1 : (p → q) ∧ (q → p) s2 : p ↔ q
T T T T T T

u
T F F T F F
F
F
T
F
T
T
F
T
F
T
lur F
T
ga
Since Truth values of both s1 and S2 are same, they are logically equivalent.
an

Example 1.8.2. Let p, q, r, s denote the following statements: p: I finish writing my computer program
M

before lunch. q: I shall play tennis in the afternoon. r : The sun is shining. s: The humidity is low.
Write the following in symbolic form.
T,

a) If the sun is shining, I shall play tennis this afternoon.


A J Institute of Engineering and Technology, Mangaluru,

IE

b) Finishing the writing of my computer program before lunch is necessary for my playing tennis this afternoon.
c) Low humidity and sunshine are sufficient for me to play tennis this afternoon.
AJ

Solution : The symbolic forms of given statements are : (a) r → q (b) q → p (c)(s ∧ r) → q

Example 1.8.3. Let p, q be primitives statements for which implication p → q is false. Determine the truth
values of the following. (p ∨ q) ↔ (q ∨ p) (VTU - Jun 2015, Jan 2014)

Solution : The truth value of (p ∨ q) ↔ (q ∨ p) is given by the following table :

p q p ∨ q q ∨ p (p ∨ q) ↔ (q ∨ p)
T T T T T
T F T T T
F T T T T
F F F F T
Example 1.8.4. Let p, q be primitive statements for which the implication p → q is false. Determine the truth
values for each of the following.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 8

(a) p ∧ q

(b) ¬p ∨ q

(c) q → p

(d) ¬q → ¬p

Solution : Since p → q is false the truth value for p is T and that of q is F. Consequently,
A J Institute of Engineering and Technology, Mangaluru

(a) p ∧ q has the truth value F

(b) ¬p ∨ q has the truth value F.

(c) q → p has the truth value T

(d) ¬q → ¬p has the truth value F.

Example 1.8.5. Let p, q, r denote the following statements about a particular triangle ABC. p: Triangle

u
ABC is isosceles. q : Triangle ABC is equilateral. r: Triangle ABC is equiangular. Translate each of

ur
the following into an English sentence.

(a) q → p
l
ga
(b) ¬p → ¬q
an

(c) q ↔ r
M

(d) p ∧ ¬q
T,

(e) r → p
A J Institute of Engineering and Technology, Mangaluru,

IE
AJ

Solution : The English sentences corresponding to the given statements are given below.

(a) q → p : If triangle ABC is equilateral, then it is isosceles.

(b) ¬p → ¬q : If triangle ABC is not isosceles, then it is not equilateral.

(c) q ↔ r : Triangle ABC is equilateral if and only if it is equiangular.

(d) p ∧ ¬q : Triangle ABC is isosceles but it is not equilateral.

(e) r → p : If triangle ABC is equiangular, then it is isosceles.

Example 1.8.6.

Let p, q and r be propositions having truth values 0, 0 and 1 respectively. Find the truth values of the
following compound propositions. (VTU Jan 2017)

(i) (p ∧ q) → r

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 9

(ii) p → (q ∧ r)

(iii) p ∧ (r → q)

(iv) p → (q → (¬r))

Solution: Given that truth values of p, q and r are 0,0 and 1 respectively. Using these we can write the truth
values of given statements as follows.
A J Institute of Engineering and Technology, Mangaluru

(i) Truth value of (p ∧ q) → r is 1

(ii) Truth value of p → (q ∧ r) is 1

(iii) Truth value of p ∧ (r → q) is 0

(iv) Truth value of p → (q → ¬r) is 1

Example 1.8.7. If the statement q has the truth value 1, determine all truth value assignments for the

ru
primitive statements p, r and s for which the truth value of the statement:
(q → [(¬p ∨ r) ∧ ¬s]) ∧ [¬s → (¬r ∧ q)] is 1. (VTU June 2019, Jan 2018, Dec 2007)
lu
ga
Solution : Given statement is conjunction of two statements u and v where u : (q → [(¬p ∨ r) ∧ ¬s])
and v : [¬s → (¬r ∧ q)]. Since the truth value of this conjunction is 1, we have the truth value of u is 1.
an

and truth value of v is 1.


since q is True and u is True, we have (¬p ∨ r) ∧ ¬s is True.
,M

This implies (¬p ∨ r) is True (*)


and ¬s is True.
ET

Clearly s is False.
A J Institute of Engineering and Technology, Mangaluru,

Now ¬s is True and v is True. Hence we have (¬r ∧ q) is True. This implies that each of ¬r and q are True.
I
AJ

Hence r is False. (**)


From (*) we have ¬p ∨ r is True. But from (**) we have r is False. Hence ¬p is True.
This implies that p is False.
Thus truth values of p, r and s are respectively 0, 0 and 0.

1.9 Tautology

A compound statement is called a tautology if it is true for all possible truth values of its component statements.
we shall use the symbol T0 to denote any tautology.
Note : Two statement formulas s1 and s2 are equivalent provided s1 ↔ s2 is a tautology. Conversely, if
s1 ↔ s2 is a tautology then s1 and s2 are equivalent.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 10

1.10 Contradiction

If a compound statement is false for all possible truth values of its component statements, then it is called a
contradiction. We shall use symbol F0 to denote any contradiction.
Note: A statement formula which is neither a tautology nor a contradiction is known as a contingency.

Example 1.10.1. Construct a truth table for each of the following compound statements, where p, q, r denote
primitive statements. Which of these statements are tautologies?
A J Institute of Engineering and Technology, Mangaluru

(a) ¬(p ∨ ¬q) → ¬p

(b) p → (q → r)

(c) (p → q) → r

(d) (p → q) → (q → p)

(e) [p ∧ (p → q)] → q

ru
(f) (p ∧ q) → p

(g) q ↔ (¬p ∨ ¬q) lu


ga
(h) [(p → q) ∧ (q → r)] → (p → r)
an

Solution :
,M

(a) The Truth table for the compound proposition ¬(p ∨ ¬q) → ¬p is :

p q ¬q p ∨ ¬q ¬(p ∨ ¬q) ¬p ¬(p ∨ ¬q) → ¬p


ET
A J Institute of Engineering and Technology, Mangaluru,

T T F T F F T
T F T T F F T
I
AJ

F T F F T T T
F F T T F T T

Since the Statement has all truth values as T, it is a Tautology.

(b) The Truth table for the compound proposition p → (q → r) is :

p q r q→r p → (q → r)
T T T T T
T T F F F
T F T T T
T F F T T
F T T T T
F T F F T
F F T T T
F F F T T

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 11

Since all Truth Values are not T, the statement is not a Tautology.

(c) The Truth table for the compound proposition (p → q) → r is :

p q r p→q (p → q) → r
T T F T F
T F T F T
T F F F T
A J Institute of Engineering and Technology, Mangaluru

F T T T T
F T F T F
F F T T T
F F F T F

Since all Truth Values are not T, the statement is not a Tautology.

(d) The Truth table for the compound proposition (p → q) → (q → p) is :

p q (p → q) (q → p) (p → q) → (q → p)

ru
T T T T T
T F F T lu T
ga
F T T F F
F F T T T
an

Since all Truth Values are not T, the statement is not a Tautology.
,M

(e) The Truth table for the compound proposition [p ∧ (p → q)] → q is :


ET

p q p→q p ∧ (p → q) [p ∧ (p → q)] → q
A J Institute of Engineering and Technology, Mangaluru,

T T T T T
I
AJ

T F F F T
F T T F T
F F T F T

Since the Statement has all truth values as T, it is a Tautology.

(f) The Truth table for the compound proposition (p ∧ q) → p is :

p q p∧q (p ∧ q) → p
T T T T
T F F T
F T F T
F F F T

Since the Statement has all truth values as T, it is a Tautology.

(g) The Truth table for the compound proposition q ↔ (¬p ∨ ¬q) is :

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 12

p q ∼p ∼q (∼ p∨ ∼ q) q ↔ (∼ p∨ ∼ q)
T T F F F F
T F F T T F
F T T F T T
F F T T T F

Since all Truth Values are not T, the statement is not a Tautology.
A J Institute of Engineering and Technology, Mangaluru

(h) The Truth table for the compound proposition [(p → q) ∧ (q → r)] → (p → r) is :

p q r s1 : (p → q) s2 : (q → r) s3 : (p → r) {s1 ∧ s2 } {(s1 ∧ s2 ) → s3 }
T T T T T T T T
T T F T F F F T
T F T F T T F T
T F F F T F F T
F T T T T T T T

ru
F T F T F T F T
F F T T T T T T
F F F T T T lu T T
ga
Since the Statement [(p → q) ∧ (q → r)] → (p → r) has all truth values as T, it is a Tautology.
an

Example 1.10.2. Show that the statement (p ∧ q) → p is a tautology.


,M

Solution :
ET

p q p∧q (p ∧ q) → p
A J Institute of Engineering and Technology, Mangaluru,

T T T T
I
AJ

T F F T
F T F T
F F F T

Since the Statement has all truth values as T, it is a Tautology.

Example 1.10.3. Show that (p∧ ∼ q) ∧ (∼ p ∨ q) is a contradiction.

Solution: Let us prepare the truth table for (p∧ ∼ q) ∧ (∼ p ∨ q)

p q ∼q (p∧ ∼ q) ∼p (∼ p ∨ q) (p∧ ∼ q) ∧ (∼ p ∨ q)
T T F F F T F
T F T T F F F
F T F F T T F
F F T F T T F

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 13

The last column shows that (p∧ ∼ q) ∧ (∼ p ∨ q) is always false, no matter what the truth values of p and
q. Hence (p∧ ∼ q) ∧ (∼ p ∨ q) is a contradiction.

Example 1.10.4. Prove that p → (p ∨ q) is a Tautology.

Solution : Let us construct the truth table for the given statement.

p q p ∨ q p → (p ∨ q)
A J Institute of Engineering and Technology, Mangaluru

T T T T
T F T T
F T T T
F F F T

Since the Statement has all truth values as T, it is a Tautology.

Example 1.10.5. Determine whether p ∧ (¬p ∧ q) is a Tautology?

Solution :

ru
p q ¬p ¬p ∧ q p ∧ (¬p ∧ q)
0 0 1 0 0
0 1 1 1 0
lu
ga
1 0 0 0 0
1 1 0 0 0
an

Since the Statement is not always True, it can not be a Tautology. On the other hand, its all Truth Values are 0
,M

(i.e. False). Hence it is a contradiction.

Example 1.10.6. Prove that for any propositions p,q,r the compound proposition
ET

[(p ∨ q) ∧ {(p → r) ∧ (q → r)}] → r is tautology.


A J Institute of Engineering and Technology, Mangaluru,

I
AJ

Solution : Let us construct the Truth table for the given proposition.

p q r s1 : p ∨ q s2 : p → r s3 : q → r s2 ∧ s 3 s4 : s1 ∧ (s2 ∧ s3 ) s4 → r
T T T T T T T T T
T T F T F F F F T
T F T T T T T T T
T F F T F T F F T
F T T T T T T T T
F T F T T F F F T
F F T F T T T F T
F F F F T T T F T

Since the Statement (in the last column) has all truth values as T, it is a Tautology.

Example 1.10.7. Show that (p ∧ (p → q)) → q is independent of its components. (VTU June 2017)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 14

Solution : Let us construct the Truth table for the given proposition.

p q p→q s : p ∧ (p → q) s→q
T T T T T
T F F F T
F T T F T
A J Institute of Engineering and Technology, Mangaluru

F F T F T

Since the Statement (in the last column) has all truth values as T, it is independent of its components (i.e. it is a
Tautology).

Example 1.10.8. Prove that, for any propositions p, q, r the compound propositions, the following propositions
are tautologies.

(i) {(p → q) ∧ (q → r)} → {(p → r)} (VTU June 2015, 2010, Dec 2012)

ru
(ii) {p → (q → r)} → {(p → q) → (p → r)} (VTU June 2019,June 2018, June 2012)

(iii) (p → (q ∨ r)) ↔ ((p ∧ ¬q) → r) lu ( VTU June 2016)


ga
(iv) Determine whether the following compound statement is a tautology or not.
[(p ∨ q) → r]↔[¬r → ¬(p ∨ q)]
an

( VTU Jan 2019, Jan 2016)

(v) [(p → r) ∧ (q → r)] → [ (p ∨ q) → r]


,M

(vi) [(p ∨ q) ∧ (p → r) ∧ (q → r)] → r ( VTU Dec 2016, 2011, 2009, 2007)


ET
A J Institute of Engineering and Technology, Mangaluru,

Solution :
I
AJ

(i) Let us construct the Truth table for the proposition {(p → q) ∧ (q → r)} → {(p → r)}

p q r p→q q→r s1 : (p → q) ∧ (q → r) s2 : p → r s 1 → s2
T T T T T T T T
T T F T F F F T
T F T F T F T T
T F F F T F F T
F T T T T T T T
F T F T F F T T
F F T T T T T T
F F F T T T T T

Since the Statement (in the last column) has all truth values as T, it is a Tautology.

(ii) Let us construct the Truth table for the proposition, {p → (q → r)} → {(p → q) → (p → r)}

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 15

p q r q→r s1 : p → (q → r) (p → q) (p → r) s2 : (p → q) → (p → r) s1 → s2
T T T T T T T T T
T T F F F T F F T
T F T T T F T T T
T F F T T F F T T
F T T T T T T T T
A J Institute of Engineering and Technology, Mangaluru

F T F F T T T T T
F F T T T T T T T
F F F T T T T T T

Since the Statement (in the last column) has all truth values as T, it is a Tautology.

(iii) Let us construct the Truth table for the given proposition. (p → (q ∨ r)) ↔ ((p ∧ ¬q) → r)

p q r (q ∨ r) s1 : p → (q ∨ r) ∼q (p∧ ∼ q) s2 : (p∧ ∼ q) → r s1 ↔ s2

ru
T T T T T F F T T
T T F T T F F T T
T F T T T T lu
T T T
ga
T F F F F T T F T
F T T T T F F T T
an

F T F T T F F T T
,M

F F T T T T F T T
F F F F T T F T T
ET

Since the Statement (in the last column) has all truth values as T, it is a Tautology.
A J Institute of Engineering and Technology, Mangaluru,

(iv) Let us construct the Truth table for the given proposition. [(p ∨ q) → r]↔[¬r → ¬(p ∨ q)]
I
AJ

p q r (p ∨ q) s1 : (p ∨ q) → r ∼r ∼ (p ∨ q) s2 :∼ r →∼ (p ∨ q) s 1 ↔ s2
T T T T T F F T T
T T F T F T F F T
T F T T T F F T T
T F F T F T F F T
F T T T T F F T T
F T F T F T F F T
F F T F T F T T T
F F F F T T T T T

Since the Statement (in the last column) has all truth values as T, it is a Tautology.

(v) Let us construct the Truth table for the given proposition. [(p → r) ∧ (q → r)] → [ (p ∨ q) → r]
Hint : Try it yourself. It is a Tautology.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 16

(vi) Let us construct the Truth table for the proposition [(p ∨ q) ∧ (p → r) ∧ (q → r)] → r
Let us denote S : (p ∨ q) ∧ (p → r) ∧ (q → r)

p q r (p ∨ q) (p → r) (p → q) ∧ (p → r) (q → r) S S→r
T T T T T T T T T
T T F T F F F F T
T F T T T T T T T
A J Institute of Engineering and Technology, Mangaluru

T F F T F F T F T
F T T T T T T T T
F T F T T T F F T
F F T F T F T F T
F F F F T F T F T

Since the Statement (in the last column) has all truth values as T, it is a Tautology.

Example 1.10.9. Examine whether the compound proposition (p ∨ (q ∧ r)∨ ∼ (p ∨ (q ∧ r)) is a


Tautology. (VTU Jan 2017)

ru
Solution: The Truth table for the given statement is : lu
ga
p q r (q ∧ r) s1 : p ∨ (q ∧ r) s2 :∼ (p ∨ (q ∧ r)) s 1 ∨ s2
an

T T T T T F T
T T F F T F T
,M

T F F F T F T
T F T F T F T
ET

F T T T T F T
A J Institute of Engineering and Technology, Mangaluru,

F T F F F T T
I
AJ

F F T F F T T
F F F F F T T

Since the Statement (in the last column) has all truth values as T, it is a Tautology.

Example 1.10.10. Prove that (p ↔ q) ⇔ (p → q) ∧ (q → p)

Solution :

p q p→q q→p (p → q) ∧ (q → p) p↔q


0 0 1 1 1 1
0 1 1 0 0 0
1 0 0 1 0 0
1 1 1 1 1 1

Since the truth values of (p ↔ q) and (p → q) ∧ (q → p) are the same, they are logically equvivalent.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 17

Example 1.10.11. Prove that p → (q → r) and (p ∧ q) → r are logically equvivalent.

Solution:

p q r q→r p → (q → r) p∧q (p ∧ q) → r
T T T T T T T
T T F F F T F
A J Institute of Engineering and Technology, Mangaluru

T F T T T F T
T F F T T F T
F T T T T F T
F T F F T F T
F F T T T F T
F F F T T F T

Since the truth values of p → (q → r) and (p ∧ q) → r are the same for each set of truth values of p; q and
r, we can conclude that p → (q → r) and (p ∧ q) → r are logically equvivalent.

ru
Example 1.10.12. Let s, t, and u denote the following primitive statements:
s: Phyllis goes out for a walk. t: The moon is out. lu
u : It is snowing. The possible translations for the given
(symbolic) compound statements. (i) (t ∧ ¬u) → s (ii) t → (¬u → s) (iii) ¬(s ↔ (u ∨ t))
ga
Also, give the symbolic notation for the following English sentences:
an

(iv) ”Phyllis will go out walking if and only if the moon is out.” (v) ”If it is snowing and the moon is not out,
then Phyllis will not go out for a walk.” (vi) ”It is snowing but Phyllis will still go out for a walk.”
,M

Solution : (i) (t ∧ ¬u) → s : If the moon is out and it is not snowing, then Phyllis goes out for a walk.
ET

(ii) t → (¬u → s) : If the moon is out, then if it is not snowing Phyllis goes out for a walk. (iii) ¬(s ↔
A J Institute of Engineering and Technology, Mangaluru,

(u ∨ t)) : It is not the case that Phyllis goes out for a walk if and only if it is snowing or the moon is out.
I
AJ

Now the logical (or symbolic) notation for three given English sentences:
(iv) ”Phyllis will go out walking if and only if the moon is out.” s ↔ t
(v) ”If it is snowing and the moon is not out, then Phyllis will not go out for a walk.” The symbolic form is :
(u ∧ ¬t) → ¬s
vi)”It is snowing but Phyllis will still go out for a walk.” u ∧ s

Example 1.10.13. Use truth tables to verify, [p → (q ∧ r)] ⇐⇒ [(p → q) ∧ (p → r)] (VTU Jan
2018)

Solution: The Truth table for both s1 : [p → (q ∧ r)] and s2 : [(p → q) ∧ (p → r)] can be constructed
as follows.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 18

p q r (q ∧ r) s1 : p → (q ∧ r) (p → q) (p → r) s2 : (p → q) ∧ (p → r)
T T T T T T T T
T T F F F T F F
T F T F F F T F
T F F F F F F F
F T T T T T T T
F T F F T T T T
A J Institute of Engineering and Technology, Mangaluru

F F T F T T T T
F F F F T T T T

Since the truth values of both s1 and s2 agree, they are logically equivalent.

Example 1.10.14. Using Truth table prove that [¬p ∧ (¬q ∧ r)] ∨ [(q ∧ r) ∨ (p ∧ r)] ⇐⇒ r (VTU
Jan 2016, Dec 2009)

Solution: Let us construct the Truth table for s : [¬p ∧ (¬q ∧ r)] ∨ [(q ∧ r) ∨ (p ∧ r)] and compare it

ru
with the column r

p q r ∼q ∼q∧r ∼p A :∼ p ∧ (∼ q ∧ r) q∧r
lu (p ∧ r) B : (q ∧ r) ∨ (p ∧ r) s:A∨B
ga
T T T F F F F T T T T
T T F F F F F F F F F
an

T F T T T F F F T T T
T F F T F F F F F F F
,M

F T T F F T F T F T T
F T F F F T F F F F F
ET

F F T T T T T F F F T
A J Institute of Engineering and Technology, Mangaluru,

F F F T F T F F F F F
I
AJ

Since the truth values of both s and r agree, they are logically equivalent.

Exercise 1

1. Use truth tables to verify, [(p ∨ q) ⇒ r] ⇐⇒ [(p → r) ∧ (q → r)] ( VTU Dec 2009)

2. Use truth table establish the following:


[(p↔q) ∧ (q ↔ r) ∧ (r ↔ p)] ⇔ [(p → q) ∧ (q → r) ∧ (r → p)] (VTU June 2008)

3. Prove that ¬[p ∧ q] ⇔ [¬p ∨ ¬q]

4. Prove that (p ↔ q) ∧ [¬q ∧ (r ∨ ¬q)] ⇔ ¬[q ∨ p] (VTU Jan 2016)

5. Prove that (¬p ∨ q) ∧ (p ∧ (p ∧ q)) ⇔ p ∧ q ( VTU Dec 2013)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 19

1.11 The Laws of Logic

A logical equivalence can be proved by using either a truth table or by using a chain of known logical equiva-
lences(laws of logic). Also a tautology can be proved by using either a truth table or by using logical equiva-
lences. The following list gives some laws of logic that can be used to simplify or to prove logical equivalence
of compound statements.
A J Institute of Engineering and Technology, Mangaluru

1. Law of Double negation :


(¬¬p) ⇔ p

2. Idempotent laws :
(p ∨ p) ⇔ p (p ∧ p) ⇔ p

3. Identity Laws:
(p ∨ F0 ) ⇔ p
(p ∧ T0 ) ⇔ p

ru
4. Inverse Laws:
lu
ga
(p ∨ ¬p) ⇔ T0
an

(p ∧ ¬p) ⇔ F0
,M

5. Domination Laws :
(p ∨ T0 ) ⇔ T0
ET
A J Institute of Engineering and Technology, Mangaluru,

(p ∧ F0 ) ⇔ F0
I
AJ

6. Commutative Laws :
(p ∨ q) ⇔ (q ∨ p)
(p ∧ q) ⇔ (q ∧ p)

7. Absorption Laws :
[p ∨ (p ∧ q)] ⇔ p
[p ∧ (p ∨ q)] ⇔ p

8. De Morgans Laws :
¬(p ∨ q) ⇔ ¬p ∧ ¬q
¬(p ∧ q) ⇔ ¬p ∨ ¬q

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 20

9. Associative Laws :
p ∨ (q ∨ r) ⇔ (p ∨ q) ∨ r
p ∧ (q ∧ r) ⇔ (p ∧ q) ∧ r

10. Distributive Laws :


p ∨ (q ∧ r) ⇔ (p ∨ q) ∧ (p ∨ r)
A J Institute of Engineering and Technology, Mangaluru

p ∧ (q ∨ r) ⇔ (p ∧ q) ∨ (p ∧ r) (p → q) ⇔ (¬p ∨ q)

11. Equivalence of conditional :


(p → q) ⇔ (¬q → ¬p)
(p → q) ⇔ (p ∨ q) (p ↔ q) ⇔ (p → q) ∧ (q → p)

Example 1.11.1. Prove by using laws of logic. (p → q) ∧ [¬q ∧ (r ∨ ¬q)] ⇔ ¬(q ∨ p) (VTU June
2018)

Solution:

ru
(p → q) ∧ [¬q ∧ (r ∨ ¬q)] ⇔ (p → q) ∧ [¬q ∧ (¬q ∨ r) (Commutative law)
⇔ (¬p ∨ q) ∧ ¬q
lu ( Absorption law)
ga
⇔ ¬q ∧ (¬p ∨ q) (Commutative law)
an

⇔ (¬q ∧ ¬p) ∨ (¬q ∧ q) (Distributive law)


⇔ (¬q ∧ ¬p) ∨ F0 (∵ u ∧ ¬u ⇔ F0 )
,M

⇔ (¬q ∧ ¬p) (∵ u ∨ F0 ⇔ u)
⇔ ¬(q ∨ p)(De Morgan’s law)
ET
A J Institute of Engineering and Technology, Mangaluru,

I
AJ

Example 1.11.2. Prove without using Truth table.


[∼ p ∧ (∼ q ∧ r)] ∨ [(q ∧ r) ∨ (p ∧ r)] ⇔ r

Solution:

[∼ p ∧ (∼ q ∧ r)] ∨ [(q ∧ r) ∨ (p ∧ r)]


⇔ [(∼ p∧ ∼ q) ∧ r)] ∨ [(r ∧ q) ∨ (r ∧ p)] (commutative)
⇔ [(∼ p∧ ∼ q) ∧ r)] ∨ [(r ∧ (q ∨ p)] (Distributive)
⇔ [(∼ (p ∨ q) ∧ r)] ∨ [(r ∧ (p ∨ q)] (De Morgans and commutative)
⇔ [r∧ ∼ (p ∨ q)] ∨ [r ∧ (p ∨ q)] (commutative)
⇔ [r ∧ {∼ (p ∨ q) ∨ (p ∨ q)}] (Distributive)
⇔ r ∧ T0 (∵∼ u ∨ u ⇔ T0 .Here u : (p ∨ q)
⇔r (∵ v ∧ T0 ⇔ v)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 21

Example 1.11.3. Prove that (p ∨ q) ∧ (p ∧ (p ∧ q)) ⇔ (p ∧ q), by using rules of Logic.

Solution :

LHS ⇔ (p ∨ q) ∧ ((p ∧ p) ∧ q) (Associative rule)


⇔ (p ∨ q) ∧ (p ∧ q) (Idempotent law)
⇔ (p ∧ q) ∧ (p ∨ q) (commutative law)
A J Institute of Engineering and Technology, Mangaluru

⇔ p ∧ [q ∧ (p ∨ q)] (Associaive law)


⇔ p ∧ [q ∧ (q ∨ p)] (commutative law)
⇔p∧q (Absorption law)

Example 1.11.4. Prove that (¬p ∧ q) ∨ (p ∨ q) ⇔ ¬p.

Solution :

ru
(¬p ∧ q) ∨ ¬(p ∨ q) ⇔ (¬p ∧ q) ∨ (¬p ∧ ¬q) (DeM organ0 slaw)
⇔ ¬p ∧ (q ∨ ¬q) lu (Distributivelaw)
ga
⇔ ¬p ∧ T0 (Inverselaw)
⇔ ¬p (Identitylaw)
an
,M

Example 1.11.5. Prove the following using laws of logic : p → (q → r) ⇔ (p ∧ q) → r ( VTU Jan
2017, Dec 2009)
ET
A J Institute of Engineering and Technology, Mangaluru,

Solution :
I
AJ

p → (q → r) ⇔ p → (¬q ∨ r) (Equvivalence of Conditional)


⇔ ¬p ∨ (¬q ∨ r) (Equvivalence of Conditional)
⇔ (¬p ∨ ¬q) ∨ r (Associative law)
⇔ ¬(p ∧ q) ∨ r (De Morgans law)
⇔ (p ∧ q) → r (Equvivalence of Conditional)

Example 1.11.6. Simplify ¬ [¬{(p ∨ q) ∧ r} ∨ ¬q]

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 22

Solution :

¬ [¬{(p ∨ q) ∧ r} ∨ ¬q] ≡ [¬¬{(p ∨ q) ∧ r} ∨ ¬¬q] using Demorgan Law


≡ {(p ∨ q) ∧ r)} ∧ q, using the Law of double negation
≡ {q ∧ (p ∨ q)} ∧ r, using Associative law
≡ {q ∧ (q ∨ p)} ∧ r, Commutative law
≡ q ∧ r, using Absorption law
A J Institute of Engineering and Technology, Mangaluru

Example 1.11.7. Write the negation of the statement: “If x is not a real number, then it is not a rational number
and not an irrational number”.

Solution : The given statement is in the form, p → (q ∧ r) where p : x is not a real number, q : x is not a
rational number, r: is not an irrational number.
It Negation is :

ru
¬[p → (q ∧ r)] ⇔ ¬[¬p ∨ (q ∧ r)] (Equivalene of conditional)
⇔ [¬¬p ∧ ¬(q ∧ r)]
⇔ [p ∧ (¬q ∨ ¬r)]
lu (De Morgans law)
( Double negation and De Morgans law)
ga
⇔ [(p ∧ ¬q) ∨ (p ∧ ¬r)] ( Distributive)
an

Hence the negation of the given statement is : ” ”x is not a real number but a rational number or x is not a real
,M

number but it is an irrational number”

Example 1.11.8. Prove the following logical equivalences without using the truth tables: p∨[p∧(p∨q)] ⇔ p
ET
A J Institute of Engineering and Technology, Mangaluru,

Solution :
I
AJ

p ∨ [p ∧ (p ∨ q)] ⇔ p ∨ p, by Absorption Law


⇔ p, by Idempotent Law.

Example 1.11.9. Prove that [(¬p ∨ ¬q) −→ (p ∧ q ∧ r) ⇐⇒ p ∧ q (VTU June 2019, Jan 2014, June
2013)

Solution :

(¬p ∨ ¬q) → (p ∧ q ∧ r) ⇔ ¬(¬p ∨ ¬q) ∨ (p ∧ q ∧ r), (Equvivalence of conditional)


⇔ (¬¬p ∨ ¬¬q) ∨ (p ∧ q ∧ r), (De Morgans law)
⇔ (p ∧ q) ∨ [(p ∧ q) ∧ r], Double Negation and Associative Law
⇔ p ∧ q, by Absorption Law

Example 1.11.10. Using the laws of logic, show that (p → q) ∧ (¬q ∧ (r ∨ ¬q)) ⇔ ¬[q ∨ p] (VTU
Jan 2019, June 2015, Dec 2012)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 23

Solution:

(p → q) ∧ [¬q ∧ (r ∨ ¬q)]
⇔ (p → q) ∧ [¬q ∧ (¬q ∨ r)], ( by commutative law)
⇔ (p → q) ∧ ¬q, (by absorption law)
⇔ (¬p ∨ q) ∧ ¬q, because¬(u → v) ⇔ u ∧ ¬v
⇔ ¬q ∧ (¬p ∨ q) Commutative law)
A J Institute of Engineering and Technology, Mangaluru

⇔ (¬q ∧ ¬p) ∨ (¬q ∧ q) (Distributive law)


⇔ (¬q ∧ ¬p) ∨ F0
⇔ (¬q ∧ ¬p)
⇔ ¬[(q ∨ p)

Example 1.11.11. Prove by using laws of Logic:


[¬p ∧ (¬q ∧ r)] ∨ [(q ∧ r) ∨ (p ∧ r)] ⇐⇒ r (VTU June 2018, Jan 2017)

ru
Solution:

[¬p ∧ (¬q ∧ r)] ∨ [(q ∧ r) ∨ (p ∧ r)]


lu
ga
⇔ (¬p ∧ ¬q) ∧ r ∨ [(r ∧ q) ∨ (r ∧ p)] (Associative law and commutative law)
an

⇔ {[¬(p ∨ q)] ∧ r} ∨ [(r ∧ (p ∨ q)] (De Morgans law and distributive law)
⇔ {r ∧ [¬(p ∨ q)]} ∨ [(r ∧ (p ∨ q)] (commutative law)
,M

⇔ r ∧ [¬(p ∨ q) ∨ (p ∨ q)] ( distributive)


⇔ r ∧ T0 (∵ u ∨ ¬u ⇔ T0 ) ⇔ r
ET
A J Institute of Engineering and Technology, Mangaluru,

I
AJ

Example 1.11.12. Without using truth table Prove that [(¬p ∨ ¬q) ∧ (F0 ∨ p) ∧ p] ⇔ (p ∧ ¬q)
(VTU Jan 2019)

Solution:

[(¬p ∨ ¬q) ∧ (F0 ∨ p) ∧ p] ⇔ [(¬p ∨ ¬q) ∧ p ∧ p] (∵ F0 ∨ p ⇔ p)


⇔ [(¬p ∨ ¬q) ∧ p] (∵ p ∧ p ⇔ p)
⇔ p ∧ (¬p ∨ ¬q) (Commutative)
⇔ (p ∧ ¬p) ∨ (p ∧ ¬q) (Distributive)
⇔ F0 ∨ (p ∧ ¬q) (∵ p ∧ ¬p ⇔ F0 )
⇔ (p ∧ ¬q) (∵ F0 ∨ u ⇔ u, Hereu : (p ∧ ¬q))

Example 1.11.13. Establish the following logical eqvivalence.


(p ∨ q) ∨ (¬p ∧ ¬q ∧ r) ⇔ (p ∨ q ∨ r) (VTU June 2019, June 2017)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 24

Solution:

(p ∨ q) ∨ (¬p ∧ ¬q ∧ r) ⇔ (p ∨ q) ∨ (¬p ∧ ¬q) ∧ r, by Associative Law


⇔ (p ∨ q) ∨ [¬(p ∨ q) ∧ r] by DeMorgan Law.
⇔ [(p ∨ q) ∨ ¬(p ∨ q)] ∧ [(p ∨ q) ∨ r] (Distributive)
⇔ T0 ∧ [(p ∨ q) ∨ r] (∵ u ∨ ¬u ⇔ T0 , Here, u : (p ∨ q))
⇔ (p ∨ q) ∨ r (∵ T0 ∧ v ⇔ v, Herev : (p ∨ q) ∨ r)
A J Institute of Engineering and Technology, Mangaluru

Example 1.11.14. Prove that (p → r) ∨ (q → r) ≡ (p ∧ q) → r

Solution :

(p → r) ∨ (q → r) ⇔ (¬p ∨ r) ∨ (¬q ∨ r) (Equivalence of conditional)


⇔ (¬p ∨ ¬q) ∨ (r ∨ r) (Associative )
⇔ (¬p ∨ ¬q) ∨ r (∵ r ∨ r ⇔ r)

ru
⇔ ¬(p ∧ q) ∨ r ( De Morgan’s law )
⇔ (p ∧ q) → r(Equivalence of conditional)
lu
ga
Example 1.11.15. Using Laws of Logic Prove that ¬(p ∨ (¬p ∧ q)) and ¬p ∧ ¬q are logically equivalent.
an

Solution :
,M

¬(p ∨ (¬p ∧ q)) ⇔ ¬p ∧ ¬(¬p ∧ q), (by the De Morgan law)


ET

⇔ ¬p ∧ [¬(¬p) ∨ ¬q] ( De Morgan law)


A J Institute of Engineering and Technology, Mangaluru,

⇔ ¬p ∧ (p ∨ ¬q) (double negation law)


I
AJ

⇔ (¬p ∧ p) ∨ (¬p ∧ ¬q) (distributive law )


⇔ F0 ∨ (¬p ∧ ¬q) (∵ ¬pp ∧ p ⇔ F0 )
⇔ (¬p ∧ ¬q) (∵ F0 ∨ u ⇔ u)

Consequently, ¬(p ∨ (¬p ∧ q)) and ¬p ∧ ¬q are logically equivalent.

Exercise 2

1. Without constructing the truth table show that p → (q → r) ⇔ (p ∧ q) → r

2. Without constructing the truth table show that p → (q → p) ≡ ¬p ∨ (p → q)

3. Show that [(p ∨ q) ∧ ¬(¬p ∧ (¬q ∨ ¬r))] ∨ (¬p ∧ ¬q) ∨ (¬p ∧ ¬r) is a tautology using laws.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 25

1.12 Switching Networks

A switching network is an arrangement of wires and switches that connects two terminals. A closed switch
permits the flow of current, whereas an open switch prevents the flow.
Consider a Network with one switch p as shown in the figure.
A J Institute of Engineering and Technology, Mangaluru

Current flows from T1 to T2 if the switch p is closed.


Consider a Network with two switches p & q as shown in the figure.

In the first network, current flows from T1 to T2 if either of the switches p, q is closed. Hence network can

ru
be denoted by p ∨ q. In the second network, current flows from T1 to T2 if both switches are closed. Hence
network can be denoted by p ∧ q. lu
ga
Example 1.12.1. Simplify the following network. (VTU July 2015)
an
,M
ET
A J Institute of Engineering and Technology, Mangaluru,

Solution : The given network can be written as (p ∨ q ∨ r) ∧ (p ∨ t ∨ q) ∧ (p ∨ t ∨ r)


AJ

(p ∨ q ∨ r) ∧ (p ∨ t ∨ ¬q) ∧ (p ∨ ¬t ∨ r)
⇔ p ∨ [(q ∨ r) ∧ (t ∨ ¬q) ∧ (¬t ∨ r)] ( Distributive law applied to all three terms)
⇔ p ∨ [(t ∨ ¬q) ∧ {(q ∨ r) ∧ (¬t ∨ r)}] (Associative)
⇔ p ∨ [(t ∨ ¬q) ∧ {(r ∨ q) ∧ (r ∨ ¬t)}] (commutative)
⇔ p ∨ [(t ∨ ¬q) ∧ {r ∨ (q ∧ ¬t)}] (Distributive)
⇔ p ∨ [{(t ∨ ¬q) ∧ r} ∨ {(t ∨ ¬q) ∧ (q ∧ ¬t)}] (Distributive)
⇔ p ∨ [{(t ∨ ¬q) ∧ r} ∨ {(t ∨ ¬q) ∧ ¬(t ∨ ¬q)}] (De Morgans law)
⇔ p ∨ [{(t ∨ ¬q) ∧ r} ∨ F0 ] (∵ u ∧ ¬u ⇔ F0 )
⇔ p ∨ {(t ∨ ¬q) ∧ r} (∵ v ∨ F0 ⇔ v)

Hence the simplified network is

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 26

Exercise 3
A J Institute of Engineering and Technology, Mangaluru

1. Simplify the follwing network.

Hint :

u
ur
[p ∧ (¬r ∨ q ∨ q)] ∨ [(r ∨ t ∨ ¬r) ∧ ¬q]
⇐⇒ [p ∧ (¬r ∨ T0 )] ∨ [(T0 ∨ t) ∧ ¬q]
l
ga
⇐⇒ (p ∧ T0 ) ∨ (T0 ∧ ¬q) ⇔ p ∨ ¬q
an

2. Simplify the follwing network.


M
T,
A J Institute of Engineering and Technology, Mangaluru,

IE
AJ

Hint :
[p ∨ (p ∧ q) ∨ (p ∧ q ∧ r)] ∧ [(p ∧ r ∧ t) ∨ t] ⇐⇒ p ∧ t by the Absorption Law.

1.13 Inverse, Converse, and Contra-positive

The conditional proposition q → p is called the converse proposition of p → q


The conditional proposition ¬q → ¬p is called the contrapositive proposition of p → q.
The conditional preposition ¬p → ¬q is called the inverse proposition of p → q.

Example 1.13.1. Write inverse, converse and contrapositive of “If you do your homework, you will not be
punished”

Solution : The inverse of the given statement is “If you do not do your homework, you will be punished.”

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 27

Converse : ”If you will not be punished, then you do not do your homework”.
contrapositive is : If you will be punished, then you do your homework”

Example 1.13.2. Write converse, inverse and contrapositive of (1) If a quadrilateral is a parallelogram, then
its diagonals bisect each other.
(2) If a real number x2 is greater than zero, then x is not equal to zero.
(3) If a triangle is not isosceles, then it is not equilateral.
(4) If two lines are parallel, then they are equidistant. (VTU Jan 2017)
A J Institute of Engineering and Technology, Mangaluru

Solution :
(1) converse: If the diagonals of a quadrilateral bisect each other, then it is a parallelogram.
inverse: If a quadrilateral is not a parallelogram, then its diagonals do not bisect each other.
contrapositive: If the diagonals of a quadrilateral do not bisect each other, then it is not a parallelogram.
(2) converse: If a real number x is not equal to zero, then x2 is greater than zero.
inverse: If a real number x2 is not greater than zero, then x is equal to zero.
contrapositive: If a real number x is equal to zero, then x2 is not greater than zero.

ru
(3) converse : If a triangle is not equilateral, then it is not isosceles.
inverse: If a triangle is isosceles, then it is equilateral.
contrapositive: If a triangle is equilateral, then it is isosceles. lu
ga
Example 1.13.3. Write the converse, inverse, contra positive of ’If you work hard then you will be rewarded”
an

Solution:
Let p: you will work hard.
,M

q: you will be rewarded.


The given statement is in the form : p → q
ET

Converse is q → p,. i.e. If you will be rewarded then you will work hard
A J Institute of Engineering and Technology, Mangaluru,

Contrapositive is ¬q → p. i.e. , if you will not be rewarded then You will not work hard
I
AJ

Inverse: ¬p → ¬q. i.e. if you will not work hard then You will not be rewarded

Example 1.13.4. Replace the following statement with its contrapositive:


”If x and y are rational, then x + y is rational.”

Solution : This statement is in the form (p ∧ q) → r. where p : x is rational, q : y is rational, and r: x + y is


rational.
Its contrpositive statement is ∼ r →∼ (p ∧ q)
Using De Morgans law, this can be written as ∼ r → (∼ p∨ ∼ q)
Hence contrapositive is the statement ” If x + y is irrational, then either x is irrational or y is irrational

1.14 Dual of logical statement

Given any compound proposition s involving only the connectives denoted by ∧, ∨, the dual of s denoted as
sd is obtained by replacing ∧, ∨, T0 , F0 respectively with ∨, ∧, F0 and T0

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 28

Examples:
(i)If s: p ∨ q then sd : p ∧ q
(ii)The dual of (p ∧ q)∨ ∼ pis(p ∨ q)∧ ∼ p.
(iii) The dual of (p ∨ F0 ) ∧ qis(p ∧ T0 ) ∨ q.

Example 1.14.1. Write the dual of the following logical statements: ( VTU Jan 2019, Dec 2012)
A J Institute of Engineering and Technology, Mangaluru

(i) (p ∨ T )0 ) ∧ (q ∨ r) ∨ (r ∧ s ∧ T0 )

(ii) (p ∧ q) ∨ T0

(iii) [¬(p ∨ q) ∧ {p ∨ ¬(q ∧ ¬s)}]

(iv) (p ∧ q) ∨ [(¬p ∨ q) ∧ (¬r ∨ s)] ∨ (r ∧ s)

(v) (p ∧ ¬q) ∨ (r ∧ T0 )

(vi) p → (q → r)

u
(vii) [(p ∨ T0 ) ∧ (q ∨ F0 )] ∨ [ (r ∧ s) ∧ T0 ]

Solution :
l ur
ga
an

(i) Given S : (p ∨ T0 ) ∧ (q ∨ r) ∨ (r ∧ s ∧ T0 ). Then S d : (p ∧ F0 )) ∨ (q ∧ r) ∧ (r ∨ s ∨ F0 )

(ii) S : (p ∧ q) ∨ T0 . Then S d : (p ∨ q) ∧ F0
M

(iii) The dual of s : ¬(p ∨ q) ∧ [p ∨ ¬(q ∧ ¬s)] is


T,

S d : ¬(p ∧ q) ∨ [p ∧ ¬(q ∨ ¬s)]


A J Institute of Engineering and Technology, Mangaluru,

IE

(iv) The dual of s : (p∧q)∨[(¬p∨q)∧(¬r∨s)]∨(r∧s) is sd : (p∨q)∧[(¬p∧q)∨(¬r∧s)]∧(r∨s)


AJ

(v) The dual of s : (p ∧ ¬q) ∨ (r ∧ T0 ) is sd : (p ∨ ¬q) ∧ (r ∨ F0 )]

(vi) Given statement is S : p → (q → r) Then

s : [p → (q → r)] ⇔ [¬p ∨ (q → r)]


⇔ [¬p ∨ (¬q ∨ r)]
∴ S d ≡ ¬p ∧ (¬q ∧ r)

(vii) Given s : [(p ∨ T0 ) ∧ (q ∨ F0 )] ∨ [(r ∧ s) ∧ T0 ]


Then sd : [(p ∧ F0 ) ∨ (q ∧ T0 )] ∧ [(r ∨ s) ∨ F0 ]

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 29

1.14.1 The Principle of Duality

Consider two statements s1 and s2 . Principle of duality states that, if two propositions are logically equivalent,
then so are their duals. i.e. if s1 ⇔ s2 then sd ⇔ sd2 .

Example 1.14.2. Verify the principle of duality for the logical equivalence:
∼ (p ∧ q) →∼ p ∨ (∼ p ∨ q) ⇐⇒∼ p ∨ q (VTU Dec 2016, June 2014, Dec 2009)
A J Institute of Engineering and Technology, Mangaluru

Solution : Let s1 : ∼ (p ∧ q) →∼ p ∨ (∼ p ∨ q) and s2 :∼ p ∨ q Given that s1 ⇔ s2 . Let us find sd1


and sd2
Now

s1 :∼ (p ∧ q) →∼ p ∨ (∼ p ∨ q)
⇔∼∼ (p ∧ q)∨ ∼ p ∨ (∼ p ∨ q)
⇔ (p ∧ q) ∨ [(∼ p∨ ∼ p) ∨ q]
⇔ (p ∧ q) ∨ [∼ p ∨ q]

ru
Now sd1 :⇔ (p ∨ q) ∧ [∼ p ∧ q]
⇔ [∼ p ∧ q] ∧ (p ∨ q) lu
ga
⇔ {[∼ p ∧ q] ∧ p} ∨ {[∼ p ∧ q] ∧ q}
⇔ (p∧ ∼ p ∧ q) ∨ [∼ p ∧ (q ∧ q]
an

⇔ F0 ∨ (∼ p ∧ q)
,M

⇔ (∼ p ∧ q)
⇔ S2d
ET
A J Institute of Engineering and Technology, Mangaluru,

========================
I
AJ

Example 1.14.3. Verify the principle of duality for the following logical equivalence [∼ (p ∧ q) →∼ p ∨ (∼
p ∨ q)] ⇔ (∼ p ∨ q).

Solution : Let u = ¬(p ∧ q) → (¬p ∨ (¬p ∨ q)) and v = ¬p ∨ q


u ⇔ ¬¬(p ∧ q) ∨ (¬p ∨ (¬p ∨ q))
Note that
⇔ (p ∧ q) ∨ (¬p ∨ (¬p ∨ q))
Therefore
ud ⇔ (p ∨ q) ∧ (¬p ∧ (¬p ∧ q)) ⇔ (p ∨ q) ∧ (¬p ∧ q) ⇔ [p ∧ (¬p ∧ q)] ∨ [q ∧ (¬p ∧ q)]
⇔ (F0 ∧ q) ∨ (q ∧ ¬p) ⇔ F0 ∨ (q ∧ ¬p) ⇔ q ∧ ¬p
Also
v d ⇔ ¬p ∧ q ⇔ q ∧ ¬p
We can observe that
ud ⇔ v d
Exercise 4

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 30

Write dual, negation, converse, inverse and contra positive of the statements given below :

(i) If Kabir wears brown pant then he will wear white shirt. (VTU June 2012)

(ii) If a triangle is not isosceles then it is not equilateral. ( VTU June 2013)

(iii) If Ram can solve the puzzle then Ram can solve the problem. ( VTU June 2016)
A J Institute of Engineering and Technology, Mangaluru

1.15 The connectives Exclusive-OR, NOR and NAND

If p and q are two primitive statements then the connective Exclusive-OR between p and q denoted by p Y q is
true only when either p or q is true, but not when both are true. Its Truth table is in the form :

p q pYq
T T F
T F T

ru
F T T
F F F lu
ga
The connective NOR between p and q denoted by p ↓ q is the statement “∼ (p ∨ q)”. Its Truth table is in the
form :
an
,M

p q p↓q
T T F
ET
A J Institute of Engineering and Technology, Mangaluru,

T F F
I

F T F
AJ

F F T

The connective NOR between p and q denoted by p ↑ q is the statement “ ∼ (p ∧ q)”. Its Truth table is in
the form :

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

1. Define (p ↑ q) ⇐⇒∼ (p ∧ q). Represent p ∨ q and p → q using NAND only. (VTU June 2012)

Ans: p ∨ q ⇔ ¬¬p ∨ ¬¬q ⇔ (¬p) ↑ (¬q) ⇔ (p ↑ p) ↑ (q ↑ q)


p ∨ q ⇔ ¬¬(p ∨ q) ⇔ ¬(¬p ∧ ¬q) ⇔ ¬(p ↓ q) ⇔ (p ↓ q) ↓ (p ↓ q)
p → q ⇔ ¬(p ∧ ¬q) ⇔ p ↑ (¬q) ⇔ p ↑ (q ↑ q)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 31

p → q ⇔ (¬p ∨ q) ⇔ (¬p ↓ q) ↓ (¬p ↓ q), using above expression


⇔ {(p ↓ p) ↓ q} ↓ {(p ↓ p) ↓ q}

2. For any statements p, q, prove that i) ¬(p ↓ q) ⇔ (¬p ↑ ¬q) ii) ¬(p ↑ q) ⇔ (¬p ↓ ¬q)
Soln :
¬(p ↓ q) ⇔ ¬{¬(p ∨ q)}
⇔ ¬(¬p ∧ ¬q) ⇔ (¬p) ↑ (¬q)
A J Institute of Engineering and Technology, Mangaluru

¬(p ↑ q) ⇔ ¬{¬(p ∧ q)}


⇔ ¬(¬p ∨ ¬q), ⇔ (¬p) ↓ (¬q)

3. Write down the contrapositive of [p → (q → r)] with i) only one occurrence of the connective →
ii)no occurrence of the connective → (VTU June 2014)

Solution: the contrapositive of [p → (q → r)] is [¬(q → r) → (¬p)]


⇔ ¬{¬(q → r)} ∨ ¬p
⇔ (q → r) ∨ ¬ponly one occurence of of the connective →) only one occurence of of the connective →)
⇔ (¬q ∨ r) ∨ ¬p no occurence of of the connective →)

ru
1.16 Logical Implication lu
ga
If s1 and s2 are two propositions, we say that s1 logically implies s2 ( or s2 is logically implied by s1 ) if
an

s1 → s2 is a Tautology. We denote this by s1 ⇒ s2 .


,M

Example 1.16.1. Show that [p ∧ (p → q) ∧ r] ⇒ (p ∨ q) → r ( VTU Dec 2009)


ET

Solution : Let s1 : [p ∧ (p → q) ∧ r] and s2 : (p ∨ q) → r.


A J Institute of Engineering and Technology, Mangaluru,

s1 ⇒ s2 if s1 → s2 is a Tautology. Let us check this by using a truth table.


I
AJ

p q r (p → q) p ∧ (p → q) s1 : [p ∧ (p → q) ∧ r] (p ∨ q) s2 : (p ∨ q) → r s1 → s2
T T T T T T T T T
T T F T T F T F T
T F T F F F T T T
T F F F F F T F T
F T T T F F T T T
F T F T F F T F T
F F T T F F F T T
F F F T F F F T T

Here, s1 → s2 is a Tautology. Hence s1 ⇒ s2

Example 1.16.2. Prove that (P → Q) ∧ (Q → R) ⇒ (P → R) [ Try it yourself)]

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 32

1.17 Validity of Arguments

We can use the ideas of tautology and implication to describe what we mean by a valid argument. In general, an
argument starts with a list of given statements called premises(or hypothesis) and a statement called the con-
clusion of the argument. Thus if we have premises p1 , p2 , p3 , . . . , pn , and a conclusion q, then the argument
is valid if (p1 ∧ p2 ∧ p3 ∧ · · · ∧ pn ) → q is a tautology. ( or (p1 ∧ p2 ∧ p3 ∧ · · · ∧ pn ) ⇒ q) It means
that “whenever p1 , p2 , p3 , . . . , pn are all true, then the statement q is also true”. Here the hypothesis is the
A J Institute of Engineering and Technology, Mangaluru

conjunction of the n premises. The symbol “∴ ”, (read therefore) is placed before the conclusion.

Example 1.17.1. Test whether the following is a valid argument:


If Sachin Tendulkar hits a century, then he gets a free car. Sachin Tendulkar hits a century. ∴ Sachin Tendulkar
gets a free car.

Solution : This argument is in the form:

p→q

ru
p

∴q lu
ga
The argument will be valid if [(p → q) ∧ p] → q is a Tautology.
an

Let us verify this by the following truth table.


,M

p q (p → q) (p → q) ∧ p [(p → q) ∧ p] → q
T T T T T
ET

T F F F T
A J Institute of Engineering and Technology, Mangaluru,

F T T F T
I

F F T F T
AJ

Since the statement [(p → q) ∧ p] → q is a Tautology, the given argument is valid.

Example 1.17.2. Test the validity of the following argument:


If you are an Engineer, then you are clever.
You are clever and rich.
Therefore if you are rich then you are an Engineer.

Solution: Define: p: You are an Engineer.


q: You are clever.
r: You are rich.
The premises are: p → q and q ∧ r
The conclusion is: r → p.
We must test whether or not [(p → q) ∧ (q ∧ r)] → (r → p) is a tautology.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 33

p q r p→q q∧r (p → q) ∧ (q ∧ r) r→p [(p → q) ∧ (q ∧ r)] → (r → p)]


T T T T T T T T
T T F T F F T T
T F T F F F T T
T F F F F F T T
F T T T T T F F
F T F T F F T T
A J Institute of Engineering and Technology, Mangaluru

F F T T F F F T
F F F T F F T T

From the last column we see that [(p → q) ∧ (q ∧ r)] → (r → p) is not a tautology and hence the argument
is not valid.

1.18 Rules of Inference

ru
In validating an argument using truth table, if there are more number of premises, then we need more number

lu
of columns in the truth table. In such cases this method becomes tedious and lengthy. An alternative method of
validating an argument consists of constructing a sequence of propositions starting with the premises. Proposi-
ga
tions may then be added to the sequence, but only if their truth is guaranteed by the truth of propositions already
an

included in the list.


The following is a list of useful valid arguments which can be used for addition of propositions and construction
,M

of valid arguments. These are often referred to as ‘rules of inference’


ET

Name of rule Premises Conclusion


A J Institute of Engineering and Technology, Mangaluru,

Conjunctive Simplification P ∧Q ∴P
I

Rule of Disjuctive amplification) P ∴P ∨Q


AJ

Rule of Conjunction P, Q ∴P ∧Q
Rule of Disjunctive syllogism (DS) P ∨ Q, ∼P ∴Q
Modus ponens (MP) P, P → Q ∴Q
Modus tollens (MT) P → Q, ¬Q ∴ ¬P
Rule of Hypothetical syllogism (HS) P → Q, Q → R ∴P →R

Note : With the above rules, we can also use the following rules.

• A given premise (i.e. a statement which is given to be true in the problem can be used at any stage during
the argument.

• An statement can be replaced by means of an equivalent statement. For example the statement p → q
can be replaced as either by ¬p ∨ q or by ¬q → ¬p.

• If the conclusion is a conditional, in the form p → q and if nothing is given about the nature of p , then

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 34

we can introduce an additional premise p in the problem ( i.e. assume that p is true) and arrive at the
conclusion q

Example 1.18.1. Test whether the following is a valid argument:


If Sachin Tendulkar hits a century, then he gets a free car. Sachin Tendulkar hits a century. ∴ Sachin Tendulkar
gets a free car.

Solution : This argument is in the form:


A J Institute of Engineering and Technology, Mangaluru

p→q
p

∴q

This is in the form of Modus Ponens Rule. Hence it is valid.

Example 1.18.2. Establish the validity of the following argument.

ru
p→q
p∧r
lu
ga
∴q
an

Solution :
,M

Step No. Statement Reason


ET

(1) p→q (premise)


A J Institute of Engineering and Technology, Mangaluru,

(2) p∧r (premise)


I
AJ

(3) p ((2), conjunctive Simplification)


(4) ∴q (Step (1) and (3), Modus ponens)

Example 1. Test the validity of


”If you have a password, then you can log on to the network”
”You have a password”
Therefore ”You can log on to the network”

Solution : This argument is in the form:

p→q
p

∴q

Let us use the Rules of Inferences step by step.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 35

Step No. Statement Reason


1. p→q (premise)
2. p (premise)
3. ∴q (Step 1. and 2., Modus ponens)

This is Modus Ponens and hence valid.

Example 2. Test the validity of the argument :


A J Institute of Engineering and Technology, Mangaluru

You can’t log into the network.If you have a password, then you can log into the network. Therefore you don’t
have a password.

Solution :

Step No. Statement Reason


1. ∼q (premise)
2. p→q (premise)
3. ∴∼ p (Step 1. and 2., Modus Tollens)

u
Example 3. Provide a formal proof of the validity of the following argument:
Premises : p →∼ q; q → r
Conclusion : p → r
l ur
ga
Solution :
an

Step No. Statement Reason


M

1. p →∼ q (premise)
2. q∨r (premise)
T,

3. p (Assumed Premise, hypothesis of conclusion)


A J Institute of Engineering and Technology, Mangaluru,

IE

4. ∴∼ q Steps 1 and 3, Modus Ponens


AJ

5, ∴r Steps 2 and 4, rule of disjunctive syllogism


Example 4. Construct a formal proof of the following argument. Premises : p → q; r → s; ∼ q; r Conclu-
sion : ∼ p ∧ s

Solution :

Step No. Statement Reason


1. p→q (premise)
2. r→s (premise)
3. ∼q (premise)
4. r (premise)
5. ∼p (1; 3. MT)
6. s (2; 4. MP)
7. ∼p∧s (5; 6. Conj)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 36

Example 5. Give a formal proof for the following argument: Premises : p ∧ (q ∨ r); ∼ p∨ ∼ q Conclusion
:r∨q

Solution :

Step No. Statement Reason


1. p ∧ (q ∨ r)q (premise)
A J Institute of Engineering and Technology, Mangaluru

2. ∼ p∨ ∼ q (premise)
3. (p ∧ q) ∨ (p ∧ r) (1. Dist)
4. p∧q (2. De M)
5. p∧r (3. Simp)
6. r∧p (5. Comm)
7. r (6. Simp)
8. r∨s (8. Add)
Example 1.18.3. Determine whether the following argument is logically valid? If I try hard and I have talent,

ru
then I will become a musician. If I become a musician then I will be happy. I have not become happy. Therefore,
I did not try hard or I do not have talent.
lu
ga
Solution : First we shall set up the following simple statements, namely, p : I try hard , q : I have talent , r : I
become a musician and s : I became happy . Then given premises may be written in symbolical form as
an

(p ∧ q) → r
r→s
,M

¬s
ET
A J Institute of Engineering and Technology, Mangaluru,

∴ (¬p ∨ ¬q)
We can establish the validity as follows.
I
AJ

Step No. Statement Reason


(1) (p ∧ q) → r Premise
(2) r→s Premise
(3) ¬s Premise
(4) ∴ ¬r (2) and (3), Modus Tollens
(5) ∴ ¬(p ∧ q) (1) and (4), Modus Tollens
(6) ∴ ¬p ∨ ¬q (5), De Morgans Rule.
Example 1.18.4. Determine whether the following argument is logically valid?
“If you invest in stock market, then you will get rich. If you get rich, then you will be happy. Therefore, If you
invest in stock market, then you will be happy.”

Solution: We shall set up: p : You invest in stock market,


q : You will become rich

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 37

r : You will be happy.


Then, problem may be formulated symbolically as

p→q
q→r

∴p→r
A J Institute of Engineering and Technology, Mangaluru

This is in the form of Rule of syllogism. Hence this argument is valid.

Example 1.18.5. Determine whether the following argument is logically valid? “If I try hard and I have talent,
then I will become a musician.
If I become a musician then I will be happy.
I have not become happy.

Therefore, I did not try hard or I do not have talent.

ru
Solution : let us denote the simple statements as :

lu
p : I try hard, q : I have talent, r : I become a musician and s : I became happy. Then given premises may be
written in symbolical form as
ga
an

(p ∧ q) → r
,M

r→s
¬s
ET
A J Institute of Engineering and Technology, Mangaluru,

∴ (¬p ∨ ¬q)
I
AJ

we can establish the validity as follows.

Step No. Statement Reason


(1) (p ∧ q) → r Premise
(2) r→s Premise
(3) ¬s Premise
(4) ∴ ¬r (2) and (3), Modus Tollens
(5) ∴ ¬(p ∧ q) (1) and (4), Modus Tollens
(6) ∴ (¬p ∨ ¬q) (5), De Morgans law
Example 1.18.6. Test the validity of the following statements: i) If there is strike by student, the examination
will be postponed. The exam was not postponed.
∴ There was no strike by student. (VTU Jan 2019)

Solution : Let p : there is strike by student, q : the examination will be postponed. This argument is in the
form:

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 38

p→q
∼q

∴∼ p

The validity can be established as follows.


A J Institute of Engineering and Technology, Mangaluru

Step No. Statement Reason


1. p→q (premise)
2. ∼q (premise)
3. ∴∼ p (Step 1. and 2., Modus Tollens)

Example 1.18.7. I will become famous or I will not become a musician. I will become a musician. ∴ I will
become famous.

Solution : Let p : I will become famous. q : I will become a musician.


Then the given argument is in the form :

ru
p ∨ ¬q
lu
ga
q
an

∴ p
,M

This argument is in the form of Rule of Disjunctive syllogism. Hence the argument is valid.
ET
A J Institute of Engineering and Technology, Mangaluru,

Example 1.18.8. Test the validity of :


I

If I study, then I will not fail in the examination.


AJ

If I do not watch T.V. in the evening, then I will study.


I failed in the examination.

∴ I must have watched T.V. in the evening. (VTU Jan 2019)

Solution : Let us denote p : I study. q : I fail in the examination. r : I watch TV in the evenings.
Then the given argument is in the form :

p → ¬q
¬r → p
q“
∴ r

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 39

Step No. Statement Reason


(1) p → ¬q premise
(2) ¬r → p premise
(3) q premise
(4) ∴ ¬r → ¬q Steps (1), (2) Rule of syllogism
(5) ∴r Steps (4) , (3) Modus Tollens Rule
A J Institute of Engineering and Technology, Mangaluru

Example 1.18.9. Consider the following argument:


I will get grade A in this course or I will not graduate. If I do not graduate, I will join army. I got grade A.
∴ I will not join the army.
Is this a valid argument? Prove using rules of inference.

Solution : Let p : I will get grade A.


Q : I will graduate.
R : I will join army
The given premises are, p∨ ∼ q, ∼ q → r, p and the conclusion is ∼ r.

ru
Step No. Statement Reason
(1) p∨ ∼ q Premise

We can establish the validity as follows. begincenter


(2) ∼q→r
lu Premise
From step (3), Truth
ga
(3) p Premise
(4) ∼ p →∼ q
an

(5) ∴∼ p → r
value of p is T. Hence truth value of ∼ p is F. From step (5), ∼ p → r is True. From this it is clear that r
,M

may take the Truth Value T or F . Hence the given argument is not valid.
ET

Example 1.18.10. Show that r ∨ s follows from c ∨ d, c ∨ d → ¬h, ¬h → (a ∧ ¬b), a ∧ ¬b → r ∨ s


A J Institute of Engineering and Technology, Mangaluru,

( VTU Dec 2014, Dec 2013, June 2009)


I
AJ

Solution : We can establish the validity as follows.

Step No. Statement Reason


(1) c∨d Premise
(2) c ∨ d → ¬h Premise
(3) ¬h → (a ∧ ¬b) Premise
(4) (a ∧ ¬b) → (r ∨ s) Premise
(5) ∴ ¬h (1) and (2), Modus Ponens
(6) ∴ (a ∧ ¬b) (3) and (5), Modus Ponens
(7) ∴ (r ∨ s) (4) and (6), Modus Ponens
Example 1.18.11. Establish the validity of the following argument using rules of inference. If the band could
not play rock music or the refreshments were not served on time, then the new year party would have been
cancelled and Alica would have been angry. If the party were cancelled, then refunds would have been made.
No refunds were made. ∴ The band could play rock music. ( VTU June 2017)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 40

Solution : Denote p: The band could play rock music.


q : The refreshments were delivered on time.
r : The New Year’s party was canceled.
s: Alicia was angry.
t: Refunds had to be made.
The argument in symbolic form is :
A J Institute of Engineering and Technology, Mangaluru

(¬p ∨ ¬q) → (r ∧ s)
r→t
¬t ]] ∴ p

We can establish the validity as follows.

Steps Staements Reasons


(1) r→t Premise
(2) ¬t Premise

ru
(3) ¬r step (1) and (2), Modus Tollens)
(4)
(5)
¬r ∨ ¬s
(¬p ∨ ¬q) → (r ∧ s)
lu
Step (3) and the Rule of Disiunctive Amplification
Premise
ga
(6) ¬(r ∧ s) Step(4) and DeMorgan’s Laws
an

( 7) ¬(¬p ∨ ¬q) Steps (5) and (6) and Modus Tollens


( 8) ¬¬p ∧ ¬¬q Step (7) De Morgan’s Laws
,M

(9) p∧q step (8), the Law of Double negation


(10) ∴p Step (9) and the Rule of Conjunctive Simplification
ET

Example 1.18.12. Write the following in symbolic form and establish if the argument is valid: If A gets the
A J Institute of Engineering and Technology, Mangaluru,

supervisors position and works hard, then he will get a raise. If he gets a raise, then he will buy a new car. He
I
AJ

didn’t buy a new car. ∴ A did not get supervisors position or he did not work hard. ( VTU Dec 2011, Dec
2007)

Solution : Let us denote p: A gets the supervisor’s position. q: A works hard. r: A gets a raise. s: A buys
a new car.
Hence the given argument is in the form :

(p ∧ q) → r
r→s
∼s
∴∼ p∨ ∼ q

We can establish the validity as follows.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 41

Steps Staements Reasons


1. (p ∧ q) → r Premise
2. r→s Premise
3. (p ∧ q) → s Steps 1 and 2, Rule of syllogism
4. ∼s Premise
5. ∴∼ (p ∧ q) Steps 3 and 4, Modus Tollens
6. ∴∼ p∨ ∼ q Step 5, De Morgans law
A J Institute of Engineering and Technology, Mangaluru

Example 1.18.13. Establish the validity of the following Argument.


i) p, p → q, s ∨ r, r →∼ q ∴ s ∨ t (VTU Jan 2017, June 2011, 2010, 2008)

Solution:

Step No. Statement Reason


(1) p premise
(2) p→q premise
(3) ∴q (1) & (2), Modus Ponens Rule

ru
(4) r →∼ q premise
(5)
(6)
∴ ¬r
s∨r
lu
(4) & (3), Modus Tollens Rule
premise
ga
(7) ∴s (6) & (5), Rule of Disjunctive Syllogism
an

(8) ∴s∨t Rule of Disjunctive Amplification


Example 1.18.14. Establish the validity of the following Argument.
,M

(∼ p∨ ∼ q) → (r ∧ s)
r→t
ET

∼t
A J Institute of Engineering and Technology, Mangaluru,

∴p (VTU June 2019, June 2018)


I
AJ

Solution :

Step No. Statement Reason


(1) r→t premise
(2) ∼t premise
(3) ∴∼ r (1) & (2), Modus Tollens Rule
(4) ∴∼ r∨ ∼ s Rule of disjunctive amplification
(5) ∴∼ (r ∧ s) (4) De Morgans rule
(6) (∼ p∨ ∼ q) → (r ∧ s) premise
(5) ∴∼ (∼ p∨ ∼ q) (6) & (5), Modus Tollens Rule
(6) (p ∧ q) (5) De Morgans rule
(7) ∴p Rule of Conjuctive simplification
Example 1.18.15. Establish the validity of the following Argument.
p → q, q → (r ∧ s), ¬r ∨ (¬t ∨ u), p ∧ t, ∴u ( VTU Jan 2018)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 42

Solution :

Step No. Statement Reason


(1) p→q Premise
(2) q → (r ∧ s) Premise
(3) ∴ p → (r ∧ s) (1) and (2), Law of syllogism
(4) p∧t Premise
A J Institute of Engineering and Technology, Mangaluru

(5) ∴p Step (4), Conjunctive simplification


(6) ∴ (r ∧ s) Steps (3) and (5), Modus Ponens
(7) r Step (6), Conjunctive simplification
(8) ¬r ∨ (¬t ∨ u) Premise
(9) r → (¬t ∨ u) (8), Equivalence of conditional
(10) (¬t ∨ u) (9) and (7), Modus ponens
(11) t Step (4), Conjunctive simplification
(12) ∴u Step (10) and (11), Disjunctive syllogism

u
Example 1.18.16. Establish the validity of the following Argument.

ur
u→r
(r ∧ s) → (p ∨ t) l
ga
q → (u ∧ s)
∼t
an

q
M

∴p (VTU June 2019)


T,
A J Institute of Engineering and Technology, Mangaluru,

Solution :
IE
AJ

Step No. Statement Reason


(1) u→r premise
(2) ∼t premise
(3) (r ∧ s) → (p ∨ t) premise
(4) q → (u ∧ s) Premise
(5) q Premise
(6) ∴ (u ∧ s) Steps (4) and (5), Modus Ponens
(7) ∴u Step (6), Conjunctive simplification
(8) ∴r Steps (1) and (7), Modus Ponens
(9) ∴s Step (6), Conjunctive simplification
(10) ∴ (r ∧ s) Steps (8) and (9), Rule of conjunction
(11) (p ∨ t) Steps (3) and (10), Modus Ponens
(12) ∴p Steps (11) and (2), Disjunctive syllogism

Example 1.18.17. Establish the validity of the following Argument. ( VTU June 2018)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 43

(¬p ∨ q) → r
r → (s ∨ t)
¬s ∧ ¬u
¬u → ¬t

∴p
A J Institute of Engineering and Technology, Mangaluru

Solution :

Steps Statement Reason


1) ¬s ∧ ¬u Premise
2) ¬u step (1), conjunctive simplification
3) ¬u → ¬t premise
4) ¬t step (2) and (3), Modus Ponens
5) ¬s step (1), conjunctive simplification
6) ¬s ∧ ¬t (4) and (5), Rule of conjunction

ru
7) ¬(s ∨ t) step (6), De Morgans law
8)
9)
r → (s ∨ t)
∴ ¬r
Premise lu
Steps (8) and (7), Modus Tollens
ga
10) (¬p ∨ q) → r Premise
an

11) ∴ ¬(¬p ∨ q) steps (10) and (9), Modus Tollens


12) p ∧ ¬q Step (11), De Morgans law
,M

13) ∴p Step (13), conjunctive simplification


ET

Exercise 5
A J Institute of Engineering and Technology, Mangaluru,

I
AJ

1. Show that s ∨ r is tautology implied by p ∨ q, p → r and q → s

2. Determine all truth value assignments for the primitive statements for the valid argument p ∧ (q ∧ r) →
(s ∨ t)

3. Prove that r ∧ (p ∨ q) is valid conclusion from the premises p ∨ q, q → r, p → m and ¬m

4. Translate into symbolic form and test the validity of the argument If I work, then I cannot study. Either I
study or I pass my Mathematics class. I work. ∴ I pass my mathematics class.

5. Test the validity of the argument :


If Ravi studies, then he will pass DMS.
If Ravi does not play cricket, then he will study. Ravi failed in DMS.

∴ Ravi played cricket. (VTU Jan 2019)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 44

6. Test whether the following argument is valid : If interest rates fall then stock market will rise. The stock
market will not rise. ∴ The interest rates will not fall.

7. Show that the hypothesis “If you send me an email message, then I will finish writing the program,” “If
you do not send me an email message, then I will go to sleep early,” and “If I go to sleep early, then I
will wake up feeling refreshed” lead to the conclusion “If I do not finish writing the program, then I will
wake up feeling refreshed.” ( VTU June-2015)
A J Institute of Engineering and Technology, Mangaluru

8. When a conclusion q is said to follow from the premises H1, H2, H3, . . . . . . , Hn ? Let p, q, r be
the primitive statements, p: Raghu studies q: Raghu plays tennis r: Raghu passes in discrete
mathematics. Let H1 , H2 , H3 be the premises.
H1 : If Raghu studies then he will pass in discrete mathematics.
H2 : If Raghu does not play tennis then he will study.
H3 : Raghu failed in discrete mathematics show that q follows from H1 , H2 and H3 . ( VTU Dec
2009)

9. Show that the following argument is invalid by giving a counter example :

ru
h
(p∨ ∼ q) ∧( p → (q → r)] →∼ r

10. Establish the validity of the following Argument. lu


ga
p∨q
∼ (p ∨ r)
an

∼r
,M

∴q ( VTU June 2012)

11. Establish the validity of the following Argument.


ET

(q∨ ∼ r)∨s, ∼ q ∨ (r∧ ∼ q), ∴ r→S ( VTU June-2016)


A J Institute of Engineering and Technology, Mangaluru,

12. Establish the validity of the following Argument.


AJ

p, p → r, p → (q∨ ∼ r), ∼ q∨ ∼ s ∴ s ( VTU June 2012)

13. Show that each of the following arguments is invalid by providing a counter example – that is an
assignment of truth values for the given primitive statements such that all premises are true while the
conclusion is false. i) p∧ ∼ q ( VTU Dec 2011, June 2011)

ii) p↔q ( VTU June 2011)

p → (q → r) q→r ∴∼ r, r ∨ ¬s, ∼ s → q ∴ S

14. Test the validity of “If I like mathematics, then I will study. I will not study. Either I like mathematics
or I like football. Therefore I like football.”

15. Deduce the conclusion of the argument from the hypothesis explaining each step.

¬p ∨ q → r
s ∨ ¬q

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 45

¬t
p→t
¬p ∧ r → ¬s
∴ ¬q

1.19 Open statement


A J Institute of Engineering and Technology, Mangaluru

An Open statement or predicate is an expression with one or more variables defined on some specific domain
whose Truth value depends on the value of the variables present in it. A predicate with variables can be made
a proposition by either assigning a value to the variable or by quantifying the variable.
The following are some examples of Open statement-
p(x, y) : “x = y”
q(x, y) : “x is brother of y”

ru
1.20 Universe of Discourse
lu
If p(x) is an open statement containing the variable x, then the domain of the variable x (i.e. scope of the
ga
variable x) is called as the Universe of discourse or universe. It can be the set of real numbers, the set of
an

integers, the set of all cars on a parking lot, the set of all students in a classroom etc.
,M

1.21 Quntifiers :
ET
A J Institute of Engineering and Technology, Mangaluru,

Quntifier is an expression, such as “for all” , “for any” or “for some,” that indicates the quantity of a
I

proposition. Predicate Logic deals with predicates(open statements), which are propositions containing
AJ

variables. The variable of predicates is quantified by quantifiers. (VTU Jan 2018)

There are two types of quantifiers in predicate logic namely Universal Quantifier and Existential Quantifier.

1.22 Existential Quantifier

Given an open statement P (x), the statement “for some x, P (x)” (or “there is some x such that p(x)”),
represented by “∃xP (x)”, has a definite truth value, so it is a proposition in the usual sense. The symbol ∃ is
called the existential quantifier.
Example 1 : Let P (x) : “x + 2 = 7” with the integers as universe of discourse, then ∃xP (x) is true, since
there is indeed an integer, namely 5, such that P (5) is a true statement.
Example 2 : Let Q(x) : “2x = 7” with the integers as universe of discourse, then ∃xQ(x) is false. But
∃xQ(x) is true if we extend the universe of discourse to the rational numbers.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 46

1.23 Universal quantifier

Universal quantifier states that the statements within its scope are true for every value of the specific variable.
It is denoted by the symbol ∀xp(x) is read as for every value of x, P(x) is true.
Analogously, the sentence “for all x, P (x)”, “for any x, P (x)”, “for every x, P (x)”, “for each x, P (x)”,
represented “∀xP (x)”, has a definite truth value. Example 1 : Let P (x) : “x + 2 = 7” and the universe of
discourse is the integers, then ∀xP (x) is false. However if Q(x) represents “(x + 1)2 = x2 + 2x + 1”
A J Institute of Engineering and Technology, Mangaluru

then ∀xQ(x) is true. The symbol ∀ is called the universal quantifier.

Problem 6.

Let p(x) : x ≥ 0, q(x) : x2 ≥ 0 and r(x) : x2 − 3x − 4 = 0, s(x) : x2 − 3 > 0. Then for the
universe comprising of all real numbers, find the truth values of, (i)∃x, [p(x) ∧ q(x)] (VTU Jan 2019)

(ii) ∀x, [p(x) → q(x)] (VTU Jan 2019)

(iii) ∃x, [p(x) ∧ r(x)] (VTU Jan 2019)

ru
(iv)∀x, [q(x) → s(x)] (v) ∀x, [r(x) → p(x)] (vi)∀x, [r(x)∨q(x)] ( VTU Dec 2012, June 2009)

Solution : lu
ga
(i) We note that there exists a real number x for which both of p(x) and q(x) are true; for instance x = 1.
Therefore, ∃x, p(x) ∧ q(x) is a true statement; its truth value is 1.
an

(ii) We note that, for every real number x , the statement g(x) is true; that is q(x) cannot be false for any real
x. Hence p(x) → q(x) cannot be false for any real x. Therefore, ∀x, p(x) → q(x) is true; its truth value
,M

is 1.
(iii)We note that, for x = 4, both of p(x) and r(x) are true. Therefore, ∃x, p(x) ∧ r(x) is true; its truth
ET
A J Institute of Engineering and Technology, Mangaluru,

value is 1.
(iv) We note that s(x) is false and q(x) is true for x = 1. Thus, q(x) → s(x) is False for x = 1. That is,
I
AJ

the statement q(x) → s(x) is not always true. Hence ∀x, [q(x) → s(x)] is False and its truth value is F.
(v)

Problem 7. Let p(x), q(x) and r(x) denote the following open statements: p(x) : x2 − 7x + 10 = 0,
q(x) : x2 –2x–3 = 0, r(x) : x < 0. Determine the truth or falsity of the following statements when the
universe contains only the integers 2 and 5. If a statement is false, provide a counter example or explanations.
i) ∀x, [p(x) →∼ r(x)] ii) ∀x, [q(x) → r(x)] iii)∃x, [q(x) → r(x)] iv)∃x, [p(x) → r(x)] (VTU
June 2019, Jan 2016)

Solution :
(i) The given statement can be read as “For every integer x ∈ 2, 5,if x2 − 7x + 10 = 0 then x ≥ 0 ( By
solving x2 − 7x + 10 = 0 we get x = 2, 5.) i.e. p(x) is True. Also ∼ r(x) is True. Hence
∀x, [p(x) →∼ r(x)] is True.
(ii)The given statement can be read as “For every integer x ∈ 2, 5, if x2 –2x–3 = 0 then x < 0. (Solving
x2 –2x–3 = 0 we get x = 3, −1). i.e. p(x) is False and q(x) is False. Hence ∀x, [q(x) → r(x)] is True.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 47

(iii) The given statement can be read as “There is some integer x ∈ 2, 5 such that if x2 –2x–3 = 0 then
x < 0. Here both p(x) and r(x) are False. Hence the Statement∃x, [q(x) → r(x)] is True.
(iv) The given statement can be read as “There is some integer x ∈ 2, 5 such that “if x2 − 7x + 10 = 0
then x < 0. For x ∈ 2, 5 we have p(x) is True. But r(x) is False. ∃x, [p(x) → r(x)]

Problem 8. Consider the following open statements with the set of all real numbers as the universe,
p(x) : x ≥ 0, q(x) : x2 ≥ 0, r(x) : x2 − 3x − 4 = 0 and s(x) : x2 − 3 > 0 then find the truth
A J Institute of Engineering and Technology, Mangaluru

values of the following : ( VTU Jan 2019, Dec 2007)

(i) ∃x, [p(x) ∧ r(x)]


(ii) ∃x, [p(x) ∧ q(x)]
(iii) ∀x, [p(x) → q(x)]
(iv) ∀x, [q(x) → s(x)]
(v) ∀x, [r(x) → p(x)]

Solution : (i) The given statement can be read as “There is some real number x such that x ≥ 0 and
x2 − 3x − 4 = 0. (Solving x2 − 3x − 4 = 0 we get x = 4, −1. Since x = 4 is a member of universe,

ru
where both p(x) and r(x) are True, the statement ∃x, [p(x) ∧ q(x)] is True.
lu
(ii) The given statement can be read as “There is some real number x such that x ≥ 0 and x2 ≥ 0. Since
x = 2 is a member of universe, where both p(x) and q(x) are True, the statement ∃x, [p(x) ∧ q(x)] is
ga
True.
an

(iii) The given statement can be read as “For all real numbers x if x ≥ 0 then x2 ≥ 0. The Statement is True.
(iv) The given statement can be read as “ For every real number x, if x2 ≥ 0 then x2 − 3 > 0. When
,M

x = 1, p(x) is True But s(x) is False. Hence ∀x, [q(x) → s(x)] is False.
(v) “For all real numbers x if x2 − 3x − 4 = 0, then x ≥ 0. The Statement is False. Counter Example :
ET

When x = −1, r(x) is True and p(x) is False. Hence ∀x, [r(x) → p(x)] is False.
A J Institute of Engineering and Technology, Mangaluru,

Problem 9. For the universe of all integers, let p(x), q(x), r(x), s(x) and t(x) denote the following open
AJ

statements:
p(x) : x > 0, q(x): x is even,
r(x): x is a perfect square,
s(x) : x is divisible by 3,
t(x) : x is divisible by 7.
Write the following statements in symbolic form:
i) At least one integer is even.
ii) There exists a positive integer that is even.
iii) If x is even, then x is not divisible by 3.
iv) No even integer is divisible by 7.
v) There exists even integer divisible by 3. ( VTU Dec 2009)

Solution : (i) ∃x, q(x)


(ii) ∃x, [p(x) ∧ q(x)]

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 48

(iii) ∀x, q(x) →∼ s(x)


(iv) This proposition is logically equivalent to ”For any x, if x is an even integer then x is not divisible by 7. In
symbolic form, this reads ∀x, q(x) → ¬t(x)
(v)∃x[q(x) ∧ s(x)]

Exercise 6
A J Institute of Engineering and Technology, Mangaluru

1. For the universe of all integers, define the following open statements:
p(x) : x > 0Z,
q(x) : x is even,
r(x) : x is a perfect square,
s(x) : x is divisible by 4 and
t(x) : x is divisible by 5.
Write the following statements in symbolic form and determine whether each of the statements is true or
false. For each false statement, provide a counter example.
i) At least one integer is even.

u
ur
ii) There exists a positive integer that is even.
iii) If x is even, then x is not divisible by 5. l
ga
iv) If x is even and a perfect square, then x is divisible by 4. ( VTU Dec 2008)

2. Let p(x) be the open statement “x2 = 2x”, where the universe consists of all integers. Determine
an

whether each of the following statements is true or false: i) p(0) ii) p(−2) iii) ∃x, p(x) ( VTU June
M

2008)

3. For the following statement state the converse, inverse and contra positive. Determine the truth values of
T,

the given statement and the truth values of its converse, inverse and contra positive. The universe
A J Institute of Engineering and Technology, Mangaluru,

IE

consists of all integers: “if m divides n and n divides p then n divides p ” ( VTU Dec 2007)
AJ

4. For the universe of all polygons with 3 or 4 sides defined by the following open statements: i(x) : all
interior angles of x are equal h(x): all sides of x are equal s(x) : x is a square t(x) : x is a triangle,
translate each of the following into an English sentence and determine its truth value: i)
∀x, [s(x) ↔ (i(x) ∧ h(x))] ii) ∃x, [t(x) → (i(x) ↔ h(x))] Write the following statements
symbolically and determine their truth values. iii) Any polygon with three or four sides is either a
triangle or a square iv) For any triangle if all the interior angles are not equal, then all its sides are not
equal. ( VTU June 2012)

1.24 Negating Quantifiers

∼ ∀xP (x) ⇔ ∃x ∼ P (x)


and ∼ ∃xQ(x) ⇔ ∀x ∼ Q(x)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 49

Example 1.24.1. Negate and simplify:

(i) ∀x, [p(x) ∧ ¬q(x)]

(ii) ∃x, [(p(x)∨q(x)) → r(x)]

(iii) ∀x, [p(x)∨q(x)] ( VTU Dec 2014, 2012, 2011, June 2014, 2010)
A J Institute of Engineering and Technology, Mangaluru

Solution :

(i)

¬{∀x, [p(x) ∧ ¬q(x)]} ⇔ ∃x, ¬[p(x) ∧ ¬q(x)]


⇔ ∃x, [¬p(x) ∨ ¬¬q(x)]
⇔ ∃x, [¬p(x) ∨ q(x)]

u
(ii)

¬{∃x, [(p(x)∨q(x)) → r(x)]} ⇔ ∀x, ¬[(p(x)∨q(x)) → r(x)]


l ur
ga
⇔ ∀x, ¬[¬ (p(x)∨q(x)) ∨ r(x)]
an

⇔ ∀x, ¬[¬ (p(x)∨q(x))] ∧ ¬r(x)


⇔ ∀x, [¬¬ (p(x) ∧ ¬q(x))] ∧ ¬r(x)
M

(iii)
T,
A J Institute of Engineering and Technology, Mangaluru,

IE

¬ [∀x, [p(x)∨q(x)]] ⇔ ∃x, ¬(px)∨q(x)


⇔ ∃x, (¬p(x) ∧ ¬q(x))
AJ

Example 1.24.2. Negate the following :


All equilateral triangles are isosceles

Solution : In symbolic form we can write ∀x ∈ T, p(x) where p(x): x is isoceles. and T : Set of all
Equilateral triangles. Its negation is ∃x ∈ T, ¬p(x). which reads as “For some equilateral triangle x, x is
not isosceles” or “Some equilateral triangles are not isosceles”.

Example 1.24.3. Negate the following :


Some integers are even.

Solution : In symbolic form, this statement reads ∃x ∈ Z, p(x)”


i.e. “All integers are noneven” or “No integer is even”.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 50

Problem 10. Let the universe comprise of all integers i) Given p(x) : x is odd, q(x) : x2 − 1 is even.
Express the statement “If x is odd then x2 − 1 is even” in symbolic form using quantifiers and negate it. (
VTU Dec 2013)

Solution : (i) The given statement can be written in symbolic form as “∀x ∈ Z, [p(x) → q(x)]” where Z
is the set of all integers.
Its negation is ∃x ∈ Z, [p(x) ∧ ¬q(x)]. i.e. For some integer x, x is odd and x2 − 1 is not even.
A J Institute of Engineering and Technology, Mangaluru

Problem 11. Write the following sentences in symbolic form, and find its negation:
(i) If all triangles are right angled, then no triangle is equiangular.
(ii) All integers are rational numbers and some rational numbers are not integers. (VTU June 2019, Jan
2019, June 2013)

Solution : (i) Let T denote the set of all triangles. Also, let
p(x) : x is right-angled, q(x) : x is equiangular.
Then the given proposition can be written in symbolic form as {∀x ∈ T, p(x)} → {∀x ∈ T, ¬q(x)}
whose negation is {∀x ∈ T, p(x)} ∧ {∃x ∈ T, q(x)}

ru
This reads as “All triangles are right-angled and some triangles are equiangular”
(ii)Let p(x) : x is a rational number. lu
q(x) : x is an integer. Z : Set of all integers. Q : Set of all
ga
rational numbers.
Then the given proposition can be written in symbolic form as {∀x ∈ Z, p(x)} ∧ {∃x ∈ Q, ¬q(x)}. The
an

negation of this is : ¬{∀x ∈ Z, p(x)} ∨ ¬{∃x ∈ Q, ¬q(x)} which is logically equvivalent to


{∃x ∈ Z, ¬p(x)} ∨ {∀x ∈ Q, q(x)}
,M

i.e. “Some integers are not rational numbers or every rational number is an integer”.
ET

Problem 12. Write the negation of each of the following statements for (i) and (ii) the universe consists of all
A J Institute of Engineering and Technology, Mangaluru,

integers and for (iii) the universe consists of all real numbers.
I

(i) For all integers n, if n is not divisible by 2, then n is odd.


AJ

(ii) If k, m, n are any integers where k–m and m − n are odd, then k − n is even. ( VTU Dec 2007)

(iii) For all real numbers x, if |x − 3| < 7, then −4 < x < 10.

Solution :
(Let Z denote the set of all integers and R denote the set of all real numbers.
(i) The given statement can be written as ∀n ∈ Z, ¬p(n) → q(n) where where p(n) : n is divisible by
2, q(n) : n is odd.
Its negation is : ∃n ∈ Z, ¬p(n) ∧ ¬q(n)
i.e. For some integer n, n is not divisible by 2 and n is not odd.
(ii)The given statement can be written as : ∀k, m, n ∈ Z, [p(x) ∧ q(x)] → r(x)
Its negation is : ∃k, m, n ∈ Z, [p(x) ∧ q(x)] ∧ ¬r(x)
i.e. There exist integers k, m, n such that k − m, m − n are odd and k − n is not even.
(iii)The given statement can be written as : ∀x ∈ R, p(x) → q(x) where p(x) : |x − 3| < 7 and
q(x) : −4 < x < 10.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 51

Its negation is : ∃x ∈ R, ¬[p(x) → q(x)]


i.e. ∃x, [p(x)∧ ∼ q(x)]
i.e. For some real number x, |x − 3| < 7 and x ∈
/ (−4, 10)

1.25 Converse inverse and contrapositive of Open statements


A J Institute of Engineering and Technology, Mangaluru

For a quantified statement ∀x, p(x) → q(x) we define converse, inverse and contrapositive in the following
form.
1) The contrapositive of ∀x[p(x) → q(x)} is ∀x[¬q(x) → ¬p(x)] .
2) The converse of ∀x[p(x) → q(x)] is ∀x[q(x) → p(x)] .
3) The inverse of ∀x[p(x) → q(x)] is ∀x[¬p(x) → ¬q(x)] .

Example 1.25.1. Write down the converse, inverse and contrapositive of:
∀x, [x2 + 4x − 21 > 0] → (x > 3) ∨ (x < −7)] (VTU Jan 2016)

ru
Solution : Given statement is in the form ∀x, p(x) → q(x) where p(x) : x2 + 4x − 21 > 0 and


q(x) : [(x > 3) ∨ (x < −7)]


Converse: ∀x, q(x) → p(x) lu
ga
i.e. ∀x, [(x > 3) ∨ (x < −7)] → x2 + 4x − 21 > 0


Inverse: ∀x, x2 + 4x − 21 ≤ 0 → [(x ≤ 3) ∧ (x ≥ −7)]



an

or ∀x, x2 + 4x − 21 ≤ 0 → (−7 ≤ x ≤ 3)


Contrapositive: ∀x [(x ≤ 3) ∧ (x ≥ −7)] → x2 + 4x − 21 ≤ 0 , or ∀x[(−7 ≤ x ≤ 3) →


 
,M

x2 + 4x − 21 ≤ 0

ET

Example 1.25.2. Write down the converse, inverse and contrapositive of:
A J Institute of Engineering and Technology, Mangaluru,

∀x, [(x > 3) → (x2 > 9)] where universal set is R. and also write their truth values. VTU Jan 2019,
I
AJ

Dec 2014, Dec 2013)

Solution : Statement: ∀x, (x > 3) → x2 > 9 . This Statement is TRUE.


 

Converse: ∀x, x2 > 9 → (x > 3) This Statement is FALSE. Counter example is : x = −5


  

Inverse: ∀x, (x ≤ 3) → x2 ≤ 9 This Statement is FALSE. Counter example is : x = −5


 

Contrapositive: ∀x, x2 > 9 → (x > 3) . This Statement is TRUE.


  

Example 1.25.3. Write down the converse, inverse and contrapositive of “∀m, n, [m > n → (m2 > n2 )]
” where universal set is set all positive integers. Also write their truth values.

Solution :
Given Statement: For all positive integers m, n, if m > n then m2 > n2 . This Statement is TRUE
Converse: For all positive integers m, n, if m2 > n2 then m > n This Statement is TRUE
Inverse: For all positive integers m, n, if m ≤ n then m2 ≤ n2 This Statement is TRUE
Contrapositive: For all positive integers m, n, if m2 ≤ n2 then m ≤ n. This Statement is TRUE

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 52

Exercise 7

1. If r(x) : 2x + 1 = 5, s(x) : x2 = 9 are open sentences, obtain the negation of the quantified
statement ∃x, [r(x) ∧ s(x)] ( VTU June 2015, Dec 2011)

2. Negate and simplify ∀x, [p(x) → q(x)]

3. Write the following open statement in symbolic form and find its negation. “Some straight lines are
A J Institute of Engineering and Technology, Mangaluru

parallel or all straight lines intersect”. ( VTU June 2016)

4. Write down the converse, inverse and contrapositive of the following. Also write their truth values.

(i) For all integers a, b, if a > b then a2 > b2


(ii) For all integers m, n, and p , if m divides n and n divides p then m divides p.

5. Let p(x) denotes the sentence “x + 2 > 5”. State whether or not p(x) is a proposition on each of the
following sets: i) N, the set of positive integers ii) C, the set of complex numbers. ( VTU Dec 2011)

ru
6. Negate the following statements. i) ∀x, p(x) ∧ ∃y, q(y) ii) ∃x, p(x) ∨ ∀y, q(y)
lu
7. Let p(x, y) denote the open statement x divides y where the universe consists of all integers.
ga
Determine the truth value of the following statements. Justify your answer. ( VTU June 2012)
an

i) ∀x, ∀y[p(x, y) ∧ p(y, x) → (x = y)]


ii) ∀x, ∀y[p(x, y) ∨ p(y, x)]
,M
ET

1.26 Free and Bound Variables


A J Institute of Engineering and Technology, Mangaluru,

I
AJ

Given a formula containing a part of the form (x)P (x) or (∃x)P (x), such a part is called an x-bound part
of the formula and in this case, variable x is called the bound variable and any variable, that is not bound is
called a free variable. i.e. If an appearance of a variable is not bound, it is called a free variable.
examples : 1. (x)P (x, y).
2. (x)(P (x) → Q(x)).
3. (x)(P (x) → (∃y)R(x, y)).
4. (x)(P (x) → R(x)) ∨ (x)(P (x) → Q(x)).
5. (∃x)(P (x) ∧ Q(x)).
6. (∃x)P (x) ∧ Q(x).
In (1), P (x, y) is the scope of the quantifiers, and both occurrences of x are bound occurrences, while the
occurrence of y is a free occurrence.
In (2), the scope of the universal quantifier is P (x) → Q(x), and all occurrences of x are bound.
In (3), the scope of (x) is P (x) → (∃y)R(x, y), while the scope of (∃y) is R(x, y). All occurrences of
both x and y are bound occurrences.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 53

In (4), the scope of the first quantifier is P (x) → R(x), and the scope of the second is P (x) → Q(x). All
occurrences of x are bound occurrences.
In (5), the scope of (∃x) is P (x) ∧ Q(x). In (6), the scope of (∃x) is P (x), and the last occurrence of x in
Q(x) is free.
We may write (x)P (x, y) as (z)P (z, y). The bound occurrence of a variable can not be substituted by a
constant. Only a free occurrence of a variable can be substituted by a constant. For example,
(x)P (x) ∧ Q(a) is a substitution instance of (x)P (x) ∧ Q(y). (x)P (x) ∧ Q(a) can be expressed in
A J Institute of Engineering and Technology, Mangaluru

English as ”Every x has the property P, and ‘a’ has the property Q”. A change of variables in the bound
occurrence is not a substitution instance. In (6), it is better to write (y)P (y) ∧ Q(x) instead of
(x)P (x) ∧ Q(x), so as to separate the free and bound occurrences of variables. It may be mentioned that in
a statement every occurrence of a variable must be bound, and no variable should have a free occurrence.

1.27 Open Statements with more than one varible

In predicates with more than one variable it is possible to use several quantifiers at the same time, for instance

ru
∀x∀y∃zP (x, y, z), meaning “for all x and all y there is some z such that P (x, y, z)”.
∀a∃bP (x, y)P (a, b)a + b = 0
∀a∀b∀cP (a, b, c)P (a, b)a + (b + c) = (a + b) + c
lu
ga
∀a∃bP (x, y) 6= ∃a∀bP (x, y)
an

Exercise 8
,M

1. Define: (i) Open sentences (ii) Quantifiers (iii) Free variables (iv) Bound variables. (VTU Jan 2017,
ET

June 2015)
A J Institute of Engineering and Technology, Mangaluru,

2. What are the bound variables and free variables? Identify the same in each of the following expressions:
AJ

(i)∀y, ∃z, [cos(x + y) = sin(z − x)] (ii) ∃x, ∃y, [x2 − y 2 = z] (VTU Jan 2019)

3. For the following statements, the universe comprises all non-zero integers. Determine the truth values of
each statement: (VTU Jan 2018, Jan 2017, 2016, June 2010))

i) ∃x, ∃y(xy = 1)
ii) ∃x, ∀y(xy = 1)
iii) ∀x, ∃y(xy = 1)
(iv) ∃x∃y[(2x + y = 5) ∧ (x − 3y = −8)]
(v) ∃x∃y[(3x − y = 17) ∧ (2x + 4y = 3)]

4. Determine the truth value of each of the following quantified statements for the set of all non-zero
integers: i) ∃x, ∃y, [xy = 2] ii) ∃∀x, ∃y, [xy = 2] iii) ∃x, ∀y, [xy = 2] iv)
∃x, ∃y, [(3x + y = 8) ∧ (2x − y = 7)] v)∃x, ∃y, [(4x + 2y = 3) ∧ (x − y = 1)] ( VTU
June 2017)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 54

5. Given R(x, y) : x + y is even and the variables x and y represent integers. Write an English sentence
corresponding to each of the following (i) ∀x, ∃y, R(x, y) (ii) ∃x, ∀y, R(x, y). ( VTU Dec 2012)

1.27.1 Rule US (Universal Specification):

If an open statement p(x) is known to be true for all x in a universe S and if a ∈ S, then p(a) is true.
A J Institute of Engineering and Technology, Mangaluru

∀x ∈ S, p(x)
a∈S

Therefore p(a)

1.27.2 Rule UG (Universal Generalization) :

If an open statement p(x) is proved to be true for any (arbitrary) x chosen from a set S, then the quantified
statement ∀x ∈ S, p(x) is true.

u
1.27.3 Rule ES (Existential Specification) : l ur
ga
From ( ∃x)A(x) we conclude A(y) provided that y is not free in any given premise and also not free in any
an

prior step of the derivation.


These requirements can easily be meant by choosing new variable each time is used.
M
T,

1.27.4 Rule EG (Existential Generalization):


A J Institute of Engineering and Technology, Mangaluru,

IE

From A(x) we can conclude (y)A(y) provided that x is not free in any of given premises and provided that if
AJ

x is free in a prior step which resulted from the use of ES. Then no variables introduced by that use of ES
appear free in A(x) .

Example 1.27.1. Test the validity of


All men are Indian Tagore is a man Therefore Tagore is an Indian.

Solution : If we denote p(x) : x is a man, q(x) : x is an Indian. a : Tagore, then the given argument is in the
form :

∀x, p(x) → q(x)


p(a)

∴ q(a)

Solution:

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 55

Step No. Statement Reason


(1) ∀x, p(x) → q(x) Premise
(2) p(a) Premise
(3) p(a) → q(a) Step (1) Rule of Universal Specification
(4) q(a) Steps (3) and (2), Modus Ponens

Example 1.27.2. For the universe of all people, find whether the following is a valid argument: All
A J Institute of Engineering and Technology, Mangaluru

mathematics professors have studied calculus. Ramanujan is a mathematics professor. Therefore Ramanujan
has studied calculus.

Solution : For the universe of all people, consider the open statements p(x) : x is a mathematics professor
q(x) : x has studied calculus.
a : Ramanujan Then given Argument is in the form:

∀x, p(x) → q(x)


p(a)

ru
∴ q(a)
lu
ga
Step No. Statement Reason
(1) ∀x, p(x) → q(x) Premise
an

(2) p(a) Premise


,M

(3) p(a) → q(a) Step (1) Rule of Universal Specification


(4) q(a) Steps (3) and (2), Modus Ponens
ET

Example 1.27.3. Find whether the following argument is a valid argument for which the universe is the set of
A J Institute of Engineering and Technology, Mangaluru,

all students:
I
AJ

No engineering student is bad in studies. Ram is not bad in studies. Therefore, Ram is an engineering student.

Solution : For the universe of all students, consider the open statements
p(x) : x is an Engineering student
q(x) : x is bad in studies
a : Ram
Then given Argument is in the form:

∀x, p(x) →∼ q(x)


∼ q(a)

∴ p(a)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 56

Step No. Statement Reason


(1) ∀x, p(x) →∼ q(x) Premise
(2) p(a) →∼ q(a) Step (1) Rule of Universal Specification Here, we can not arrive at the
(3) ∼ q(a) Premise
(4) ? ?
conclusion (i.e. p(a) ) from the available premises. From Steps (2) and (3), both p(a) →∼ q(a) and
∼ q(a) are True. This is possible even when p(a) is False. Hence the argument is not valid.
A J Institute of Engineering and Technology, Mangaluru

Example 1.27.4. Establish the validity of the following argument: ∀x, [p(x) ∨ q(x)]
∀x, [(¬p(x) ∧ q(x)) → r(x)]
∴ ∀x, [¬r(x) → p(x)] ( VTU June 2014, 2011, Dec 2012)

Solution :

Steps Statements Reason


1. ∀x[p(x) ∨ q(x)] Premise

ru
2. p(c) ∨ q(c) Step (1) and the Rule of Universal Specification
3. ∀x[(¬p(x) ∧ q(x)) → r(x)] Premise
4. [¬p(c) ∧ q(c)] → r(c) lu
Step (3), and the Rule of Universal Specification
ga
5. ¬r(c) Assumed Premise (This is hypothesis part of the conclusion)
6. ∴ ¬[¬p(c) ∧ q(c)] 4. and 5., Modus Tollens Rule
an

7. ¬¬p(c) ∨ ¬q(c) 6. De Morgans Rule


8. p(c) ∨ ¬q(c) Rule of double negation
,M

9. [p(c) ∨ q(c)] ∧ [p(c) ∨ ¬q(c)] 2. and 8. Rule of Conjunction


10. p(c) ∨ (q(c) ∧ ¬q(c)] 9. Distributive law
ET
A J Institute of Engineering and Technology, Mangaluru,

11. p(c) ∨ F0 10. (∵ q ∧ ¬q ⇔ F0 )


I

12. p(c) ( (∵ p ∨ F0 ⇔ p)
AJ

13. ∴ ∀x, [¬r(x) → p(x)] 5. and 12. , Rule of Universal Generalization

Example 1.27.5. Establish the validity of the following argument ∀x, [p(x) ∨ q(x)]
∃x, ¬p(x) ∀x, [¬q(x) ∨ r(x)] ∀x, [s(x) → ¬r(x)]
∴ ∃x¬s(x) (VTU Jan 2019)

Solution : Take a particular element a (i.e. some element a) from the universe, for which ¬p(a) is True.
We establish the validity as follows.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 57

Steps Statement Reason


(1) ∀x, [p(x) ∨ q(x)] Premise
(2) p(a) ∨ q(a) Step (1), Rule of Universal Specification
(3) ∃x, ¬p(x) Premise
(4) ¬p(a) (3) is True for some a in the universe
(5) ∴ q(a) (2) and (4), Rule of disjunctive syllogism
(6) ∀x, [¬q(x) ∨ r(x)] Premise
A J Institute of Engineering and Technology, Mangaluru

(7) [¬q(a) ∨ r(a)] Step (6), Rule of Universal Specification


(8) ∀x, [s(x) → ¬r(x)] Premise
(9) s(a) → ¬r(a) Step (8), Rule of Universal Specification
(10) ∴ r(a) Steps (7) and (5), Disjunctive syllogism
(11) ¬s(a) Step (9) and (10), Modus Tollens
(12) ∴ ∃x¬s(x) ∵ Step (11) is True for some a in the universe

Example 1.27.6. Find whether the following argument is a valid argument: No engineering student of 1st or
2nd semester studies logic. Anil is an engineering student who studies logic. ∴ Anil is not in 2nd semester.

ru
(VTU June 2018, Jan 2015, June 2013)

lu
Solution : Let us denote p(x) : x is in first semester, q(x) : x is in second semester r(x): x studies logic.
ga
a : Anil and Universe is set of all students.
Then the argument is in the form :
an

∀x[(p(x) ∨ q(x)) → ¬r(x)]


,M

r(a)
ET
A J Institute of Engineering and Technology, Mangaluru,

∴ ¬q(a)
I
AJ

Now the following steps establish the validity of this argument.

Steps Statements Reasons


(1) ∀x[(p(x) ∨ q(x)) → ¬r(x)] Premise
(2) r(a) Premise
(3) (p(a) ∨ q(a)) → ¬r(a) Step (1), Universal Specification
(4) ∴ ¬(p(a) ∨ q(a)) Steps (3) and (2), Modus Tollens
(5) ¬p(a) ∧ ¬q(a) Step (4), De Morgans rule
(6) ∴ ¬q(a) Step (5), Conjunctive simplification
Example 1.27.7. Find whether following argument is valid. If a triangle has two equal sides, then it is
isosceles. If a triangle is isosceles, then it has two equal angles. The triangle ABC does not have two equal
angle. ∴ ABC does not have two equal sides. (VTU Jan 2019, Jan 2018)

Solution : Let us denote : p(x) : x has two equal sides. q(x) : x is isosceles. r(x) :x has two equal angles
and a: Trianle ABC and Universe is set of all Triangles. Then the argument is in the form :

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 58

∀x, [p(x) → q(x)]


∀x, [q(x) → r(x)]
¬r(a)

∴ ¬p(a)

Steps Statements Reasons


A J Institute of Engineering and Technology, Mangaluru

(1) ∀x, [p(x) → q(x)] Premise


(2) p(a) → q(a) Step (1) and the Rule of Universal Specification
(3) ∀x, [q(x) → r(x)] Premise
(4) q(a) → r(a) (3), Rule of Universal Specification
(5) ∴ p(a) → r(a) Steps (2) and (4) and the Law of the Syllogism
(6) ¬r(a) Premise
(7) ∴ ¬p(a) Steps (5) and (6), Modus Tollens

Example 1.27.8. Verify if the following argument is valid: ( VTU Dec 2016, 2015, 2011, June 2010)

ru
∀x, [p(x) ∨ q(x)]
∃x, ¬p(x) lu
ga
∀x, [¬q(x) ∨ r(x)]
∀x, [s(x) → ¬r(x)]
an

∴ ∃x, ¬s(x)
,M

Solution:
ET

Steps Staements Reason


A J Institute of Engineering and Technology, Mangaluru,

(1) ∀x, [p(x) ∨ q(x)] Premise


I

(2) [p(a) ∨ q(a)] Step (1), Rule of Universal Specification


AJ

(3) ∃x, ¬p(x) Premise


(4) ¬p(a) Step (3) is True for some a
(5) ∴ q(a) Steps (2) and (4), Disjunctive Syllogism
(6) ∀x, [¬q(x) ∨ r(x)] Premise
(7) ¬q(a) ∨ r(a) Step (6), Universal Specification
(8) ∀x, [s(x) → ¬r(x)] Premise
(9) s(a) → ¬r(a) Step (7), Universal Specification
(9) ∴ r(a) Steps (7) and (5), Disjunctive Syllogism
(10) ∴ ¬s(a) Steps (9) and (10), Modus Tollens
(11) ∴ ∃x, ¬s(x) (Since (9) is True for some a

Example 1.27.9. Show that ∀x, [(P (x) → Q(x)) ∧ ∀x, (Q(x) → R(x)] ⇒ ∀x, (P (x) → R(x)).

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 59

Step No. Statement Reason


(1) ∀x, [(P (x) → Q(x)) Rule P (i.e. Premise)
(2) P (a) → Q(a) Step (1), Rule Universal Specification
Solution : (3) ∀x, (Q(x) → R(x)) Rule P
(4) Q(a) → R(a) Rule Universal Specification in (3)
(5) P (a) → R(a) Steps (2), (4), Syllogism
(6) ∀x, (P (x) → R(x)) Step (5), Rule Universal Generalization
A J Institute of Engineering and Technology, Mangaluru

Exercise 9

1. Define the rule of universal specification and rule of universal generalization. Also write their symbolic
form. (VTU Dec 2011, 2007)

2. Determine if the argument is valid or not. All people who are concerned about the environment, recycle
their plastic containers. B is not concerned about the environment. Therefore B does not recycle his
plastic containers. ( VTU Dec 2011)

ru
3. Write in symbolic form and establish the validity of the argument. All men are mortal. Socrates is a
man. Therefore, Socrates is mortal. lu
ga
4. Over the universe of all quadrilaterals in plane geometry, verify the validity of the argument, “since
an

every square is a rectangle, and every rectangle is a parallelogram, it follows that every square is a
parallelogram”. ( VTU June 2015)
,M

5. Show that ∃x, M (x) follows logically from the premises ∀x, (H(x) → M (x)) and ∃x, H(x).
ET

6. Find whether the following argument is a valid argument: “All employers pay their employees. Anil is
A J Institute of Engineering and Technology, Mangaluru,

an Employer. Therefore Anil pays his employees. ( VTU June 2016)


I
AJ

7. Provide the steps and reasons to establish the validity of the argument:
∀x, [p(x) → (q(x) ∧ r(x))]
∀x, [p(x) ∧ s(x)]
∴ ∀x, [r(x) ∧ s(x)] ( VTU June 2008)

8. Check whether following argument is valid. ∀x, [p(x) → q(x)]


∀x, [q(x) → r(x)]
∴ ∀x, [p(x) → r(x)] ( VTU Dec 2014, 2013)

1.28 Definitions and the Proofs of Theorems

Recall that

• an even number is one of the form 2k, where k is an integer.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 60

• an odd integer is one of the form 2l + 1 where l is an integer.

• an integer a is divisible by an integer b if there exists an integer m such that a = mb.( i.e. a is a
multiple of b)

Direct Method : In the direct method of proving a conditional p → q we first assume that p is true. Then, by
employing the rules /laws of logic and other known facts, we infer that q is true.
Conclusion: p → q is true.
A J Institute of Engineering and Technology, Mangaluru

Indirect Method : The statement p → q and its contrapositive ¬q → ¬p are logically equivalent. An
indirect proof consists of proving the contrapositive of the desired implication, i.e., instead of proving p → q
we prove ∼ q →∼ p. For this we first assume that ∼ q is true. Then, by employing the rules/laws of logic
and other known facts, we infer that ∼ p is true.
Conclusion: ∼ q →∼ p ⇔ p → q is true.
Proof by Contradiction: In this method, we assume that p → q is False. i.e. we assume that p is True and q
is False. Starting with the result q is False using Rules and other known facts we infer that p is False. This
contradicts our assumption that p is True. ( ∵ p∧ ∼ q = F0 ) Conclusion: Because of the contradiction

ru
arrived in the analysis, we infer that p → q is True.

lu
Example 1.28.1. For all integers k and `, if k, ` both are odd, then k + ` is even and k` is odd. (VTU Jan
ga
2018)
an

Solution : Assume that both k and l are odd,Then we may write k = 2a + 1 and l = 2b + 1, for some
integers a, b ∈ Z
,M

Then k + l = (2a + 1) + (2b + 1) and kl = (2a + 1)(2b + 1)


=⇒ k + l = (2a + 2b + 2) and kl = 4ab + 2a + 2b + 1
ET

=⇒ k + l = 2(a + b + 1) and kl = 2(2ab + a + b) + 1


A J Institute of Engineering and Technology, Mangaluru,

=⇒ k + l = 2m and kl = 2n + 1 where m = 2(a + b + 1) and n = 2ab + a + b are integers.


I
AJ

=⇒ k + l is even and kl is odd.

Example 1.28.2. Give : (i) A direct proof (ii) An indirect proof and (iii) Proof by contradiction, for the
following statement: “If n is an even integer, then (n + 7) is an even integer”. (VTU Jan 2015)

Solution:
direct proof :Assume that n is an even integer.
Then we have n = 2a for some integer a. =⇒ n + 7 = 2a + 7 = 2a + 6 + 1 = 2(a + 3) + 1.
=⇒ n + 7 = 2c + 1 where c = a + 3 is an integer.
=⇒ n + 7 is odd.
Indirect Proof : Suppose that m + 7 is not odd, hence even.
Then m + 7 = 2b for some integer b
and m = 2b − 7 = 2b − 8 + 1 = 2(b − 4) + 1,
=⇒ m = 2c + 1 where c = b − 4 is an integer.
Hence m is not even.

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 61

Proof by Contradiction: Assume that m is even and that m + 7 is also even.


Since m + 7 even we have m + 7 = 2c for some integer c.
consequently, m = 2c − 7 = 2c − 8 + 1 = 2(c − 4) + 1
=⇒ m = 2k + 1 where k = (c − 4) is an integer.
so m is odd. This is a contradiction to our assumption that m is even. (since no integer can be both even and
odd)
Hence our assumption is False. i.e. m + 7 is not even. i.e. m+7 is odd.
A J Institute of Engineering and Technology, Mangaluru

Example 1.28.3. Give a direct proof of the statement “If n is an odd integer, then n2 is also an odd integer”
(VTU June 2019)

Solution : This statement is in the form p → q where p :n is an odd integer and q : n2 is an odd integer.
Let us assume that p is True. i.e. Let n be an odd integer.
By definition of odd, we know that there exists an integer k such that n = 2k + 1.
Squaring both sides of the equation, we get
n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1. i.e. n2 = 2` + 1, where ` = 2k2 + 2k is also

ru
an integer.
This implies that n2 is also odd.
lu
ga
Example 1.28.4. Prove by contradiction that if x + y > 5 then either x > 2 or y > 3.
an

Solution : We assume the hypothesis x + y > 5.


From here we must conclude that x > 2 or y > 3.
,M

Assume to the contrary that “x > 2 or y > 3” is false,


so x ≤ 2 and y ≤ 3.
ET

Adding those inequalities we get (x + y) ≤ (2 + 3)(= 5), which contradicts the hypothesis x + y > 5.
A J Institute of Engineering and Technology, Mangaluru,

From here we conclude that the assumption “x ≤ 2andy ≤ 3” cannot be right, so “x > 2 or y > 3” must
I
AJ

be true.

Exercise 10

1. Give i ) direct proof and ii) proof by contradiction for the following statement. ”If ’n’ is an odd integer,
then n + 9 is an even integer”.

2. Give a direct proof for each of the following. (i) For all integers k and `, if k, ` are both even, then
k + ` is even. (VTU June 2019, Jan 2019)

(ii) For all integers k and `, if k, ` are even, then k.` is even. (VTU June 2019, Jan 2019, June 2017,
2015)

3. For each of the following statements, provide an indirect proof by stating and proving the contra
positive: (i) For all integers k and `, if k` is odd, then both k and ` are odd. (ii) For all integers k and `,
if k + ` is even, then k and ` are both even or both odd. ( VTU June 2008)

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru


Lecture Notes - 18CS36 (Discrete Mathematical Structures) Page 62

4. Prove that for every integer n, n2 is even if and only if n is even. ( VTU June 2012)

5. Give a direct proof of the statement “the square of an odd integer is an odd integer”. ( VTU Dec 2013,
2009)

6. Provide proof by contradiction for “For every integer n, if n2 is odd, then n is odd”. ( VTU June
2016)
A J Institute of Engineering and Technology, Mangaluru

7. Prove that for all real numbers x and y, if x + y > 100, then x > 50 or y > 50. ( VTU June 2016,
Dec 2011)

8. Let n be an integer. Prove that n is odd if and only if 7n + 8 is odd. ( VTU June 2011)

9. Give i) direct proof ii) indirect proof iii) proof by contradiction for the following statement: “ if n is an
odd integer then n + 9 is an even integer”. ( VTU Dec 2016, 2008, June 2013)

ru
lu
ga
an
,M
ET
A J Institute of Engineering and Technology, Mangaluru,

I
AJ

Dr. Shantha Kumari.K., Department of Mathematics AJIET, Mangaluru

Das könnte Ihnen auch gefallen