Professional Documents
Culture Documents
18CS36 DMS Module 1 Notes of VTU 3rd Semester CSE/ISE Discrete Mathematics
18CS36 DMS Module 1 Notes of VTU 3rd Semester CSE/ISE Discrete Mathematics
18CS36 DMS Module 1 Notes of VTU 3rd Semester CSE/ISE Discrete Mathematics
ru
lu
ga
an
Lecture Notes
M
Prepared By
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
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.
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
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
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
AJ
Solution :
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)
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
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
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.
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.
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)
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)}
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:
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
Example 1.8.1. Construct the truth table for (p → q) ∧ (q → p) and show that it is logically equivalent to
p↔q
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,
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)
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.
(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
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.
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
(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
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
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
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.
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
(b) p → (q → r)
(c) (p → q) → r
(d) (p → q) → (q → p)
(e) [p ∧ (p → q)] → q
ru
(f) (p ∧ q) → p
Solution :
,M
(a) The Truth table for the compound proposition ¬(p ∨ ¬q) → ¬p is :
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
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
Since all Truth Values are not T, the statement is not a Tautology.
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.
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
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
p q p∧q (p ∧ q) → p
T T T T
T F F T
F T F T
F F F T
(g) The Truth table for the compound proposition q ↔ (¬p ∨ ¬q) is :
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
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
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
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.
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
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
Example 1.10.6. Prove that for any propositions p,q,r the compound proposition
ET
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)
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)
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)}
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.
(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.
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.
Solution :
Since the truth values of (p ↔ q) and (p → q) ∧ (q → p) are the same, they 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.
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)
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
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
9. Associative Laws :
p ∨ (q ∨ r) ⇔ (p ∨ q) ∨ r
p ∧ (q ∧ r) ⇔ (p ∧ q) ∧ r
p ∧ (q ∨ r) ⇔ (p ∧ q) ∨ (p ∧ r) (p → q) ⇔ (¬p ∨ q)
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) (∵ u ∨ F0 ⇔ u)
⇔ ¬(q ∨ p)(De Morgan’s law)
ET
A J Institute of Engineering and Technology, Mangaluru,
I
AJ
Solution:
Solution :
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
Solution :
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
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
Example 1.11.9. Prove that [(¬p ∨ ¬q) −→ (p ∧ q ∧ r) ⇐⇒ p ∧ q (VTU June 2019, Jan 2014, June
2013)
Solution :
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)
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
ru
Solution:
⇔ {[¬(p ∨ q)] ∧ r} ∨ [(r ∧ (p ∨ q)] (De Morgans law and distributive law)
⇔ {r ∧ [¬(p ∨ q)]} ∨ [(r ∧ (p ∨ q)] (commutative law)
,M
I
AJ
Example 1.11.12. Without using truth table Prove that [(¬p ∨ ¬q) ∧ (F0 ∨ p) ∧ p] ⇔ (p ∧ ¬q)
(VTU Jan 2019)
Solution:
Solution:
Solution :
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
Exercise 2
3. Show that [(p ∨ q) ∧ ¬(¬p ∧ (¬q ∨ ¬r))] ∨ (¬p ∧ ¬q) ∨ (¬p ∧ ¬r) is a tautology using laws.
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
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,
(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)
Exercise 3
A J Institute of Engineering and Technology, Mangaluru
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
IE
AJ
Hint :
[p ∨ (p ∧ q) ∨ (p ∧ q ∧ r)] ∧ [(p ∧ r ∧ t) ∨ t] ⇐⇒ p ∧ t by the Absorption Law.
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.”
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
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
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
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
(v) (p ∧ ¬q) ∨ (r ∧ T0 )
(vi) p → (q → r)
u
(vii) [(p ∨ T0 ) ∧ (q ∨ F0 )] ∨ [ (r ∧ s) ∧ T0 ]
Solution :
l ur
ga
an
(ii) S : (p ∧ q) ∨ T0 . Then S d : (p ∨ q) ∧ F0
M
IE
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
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).
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
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)
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
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)
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
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
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.
p→q
ru
p
∴q lu
ga
The argument will be valid if [(p → q) ∧ p] → q is a Tautology.
an
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
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.
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
Conjunctive Simplification P ∧Q ∴P
I
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
we can introduce an additional premise p in the problem ( i.e. assume that p is true) and arrive at the
conclusion q
p→q
p
∴q
ru
p→q
p∧r
lu
ga
∴q
an
Solution :
,M
p→q
p
∴q
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 :
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
1. p →∼ q (premise)
2. q∨r (premise)
T,
IE
Solution :
Example 5. Give a formal proof for the following argument: Premises : p ∧ (q ∨ r); ∼ p∨ ∼ q Conclusion
:r∨q
Solution :
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
p→q
q→r
∴p→r
A J Institute of Engineering and Technology, Mangaluru
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.
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
Solution : Let p : there is strike by student, q : the examination will be postponed. This argument is in the
form:
p→q
∼q
∴∼ p
Example 1.18.7. I will become famous or I will not become a musician. I will become a musician. ∴ I will
become famous.
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,
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
ru
Step No. Statement Reason
(1) p∨ ∼ q Premise
(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
(¬p ∨ ¬q) → (r ∧ s)
r→t
¬t ]] ∴ p
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
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
Solution:
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
(∼ p∨ ∼ q) → (r ∧ s)
r→t
ET
∼t
A J Institute of Engineering and Technology, Mangaluru,
Solution :
Solution :
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
Solution :
IE
AJ
Example 1.18.17. Establish the validity of the following Argument. ( VTU June 2018)
(¬p ∨ q) → r
r → (s ∨ t)
¬s ∧ ¬u
¬u → ¬t
∴p
A J Institute of Engineering and Technology, Mangaluru
Solution :
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
Exercise 5
A J Institute of Engineering and Technology, Mangaluru,
I
AJ
2. Determine all truth value assignments for the primitive statements for the valid argument p ∧ (q ∧ r) →
(s ∨ t)
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.
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)
ru
h
(p∨ ∼ q) ∧( p → (q → r)] →∼ r
∼r
,M
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)
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
¬t
p→t
¬p ∧ r → ¬s
∴ ¬q
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
There are two types of quantifiers in predicate logic namely Universal Quantifier and 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.
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
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)
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.
(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
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)
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)
(iii) ∀x, [p(x)∨q(x)] ( VTU Dec 2014, 2012, 2011, June 2014, 2010)
A J Institute of Engineering and Technology, Mangaluru
Solution :
(i)
u
(ii)
(iii)
T,
A J Institute of Engineering and Technology, Mangaluru,
IE
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”.
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
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
(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.
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
or ∀x, x2 + 4x − 21 ≤ 0 → (−7 ≤ x ≤ 3)
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
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
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)
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
4. Write down the converse, inverse and contrapositive of the following. Also write their truth values.
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
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.
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.
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)
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)
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)
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
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) .
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 :
∴ q(a)
Solution:
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:
ru
∴ q(a)
lu
ga
Step No. Statement Reason
(1) ∀x, p(x) → q(x) Premise
an
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:
∴ p(a)
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 :
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
12. p(c) ( (∵ p ∨ F0 ⇔ p)
AJ
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.
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
r(a)
ET
A J Institute of Engineering and Technology, Mangaluru,
∴ ¬q(a)
I
AJ
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 :
∴ ¬p(a)
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
Example 1.27.9. Show that ∀x, [(P (x) → Q(x)) ∧ ∀x, (Q(x) → R(x)] ⇒ ∀x, (P (x) → R(x)).
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,
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)
Recall that
• 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
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.
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
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)
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