Unit 3 PDF
Unit 3 PDF
MATHEMATICAL LOGIC
3.1 INTRODUCTION
Logic is the basis of all mathematical reasoning and it provides rules and methods
to check whether a given argument is valid or not. Logical reasoning is used in
developing algorithms needed for computer programs. Logic is applied to decide whether
one statement follows from, or is a logical consequence of one or more statements.
It has two parts – propositional calculus which deals with analysis of propositions
and predicate calculus which deals with the analysis of predicates which are the
propositions involving variables.
3.2 OBJECTIVES
• To enable students to identify the validity of statements or arguments.
• To make them understand the normal forms of statements which are used to
compare statements.
• To help them to use quantifiers and identify the truth sets of propositions (i.e.)
the set of values where the propositions are true.
• To highlight the usage of propositional calculus in predicate calculus which
deals with propositions involving variables.
3.3 PROPOSITIONS
A proposition is a statement that is either true or false but not both. These values - true or
false, are called truth values.
(i) True is denoted by T or 1.
(ii) False is denoted by F or 0.
The propositions are denoted using alphabets.(capitals or small)
115
Examples:
1. p: Chennai is the capital of Tamil Nadu (True)
2. q: 3 + 2 = 0 (False)
The following are not propositions.
1. Oh! How beautiful it is! (Exclamatory sentences are not propositions.)
2. Ring the bell. (Commands are not propositions.)
3. Where are you going? (Interrogative sentences are not propositions.)
4. This statement is false. (Self contradictory sentences are not propositions.)
They are not propositions because we cannot assign particular truth value – True or false
as their truth values.
Examples
1) Today is Friday. (If this sentence is said on a Friday its truth value is true otherwise it
is false. But is doesn’t take both values at the same time. Hence it is
a proposition.)
2) 101 + 1 = 110. (In decimal number system 101 + 1 = 102. Hence this will take truth
value false. But in binary number system 101 + 1 = 110 and hence
its value is true in binary number system. Anyway it takes only 1
value T or F & hence it is a proposition.)
3) Mrs. Christy is a teacher. (The truth value of this statement depends upon the
profession of Mrs. Christy. If she is a teacher then this sentence will
have truth value T or else it will take the truth value F. Since it
cannot have both values at the same time it is a proposition.)
Propositions can either be
1. Primitive propositions or
2. Compound propositions.
3.3.1 PRIMITIVE PROPOSITIONS:
A proposition is said to be primitive if it cannot be broken down into simpler
propositions. They are also called as atomic propositions.
Examples:
1. Sugar is sweet.
2. 6 + 4 = 10.
116
3.3.2 COMPOUND PROPOSITIONS:
A proposition which is composed of atomic propositions connected by ‘and’, ‘or’,
etc., are called compound propositions. They are composite.
Examples:
Sam studies well and also plays keyboard.
Here ‘Sam studies well’ and ‘Sam plays keyboard’ are atomic statements
connected by the connective ‘and’.
3.3.3 TRUTH TABLE:
Let P1, P2…Pn be atomic variables connected by the connecting word ‘and’, ‘or’
etc., Then the compound proposition consisting of these atomic statements P1, P2…Pn will
finally have a truth value which is either T or F. This final truth value depends upon the
connectives which connect the atomic variables. If the given statement has ‘n’ atomic
statements then the truth table will have 2n rows. The truth table will be as follows
P1 P2 P3……………………………..Pn Compound proposition
in terms of P1, P2…Pn
………… …………… ……………………………. ......Tor F ⎫
………… …………… ……………………………. ............... ⎪⎪
. . . . ⎪
⎪ n
. . .
. ⎬ 2 rows
. ⎪
. . . ⎪
⎪
……….. ………….. ……………………………. ⎪
............... ⎭
117
2. How many rows will be there in a truth table drawn to check the equivalence of a
statement containing 4 variables?
(a) 2 (b) 4 (c) 8 (d) 16 Ans: 16 = 24
3.4 LOGICAL OPERATORS:
The three basic logical operators are conjunction, disjunction and negation and
they correspond to the English words ‘and’, ‘or’ and ‘not’.
Conditional and biconditional operators are also logical operators. There are some
more connectives NAND , NOR and exclusive-or. We define all these logical operators.
3.4.1 NEGATION:
The negation of a statement is generally formed by introducing the word ‘not’ at a
proper place in the statement.
If ‘P’ denotes a statement then negation of P is denoted by ¬ P or P and is read
as ‘not P’.
Example: If P : Shyam is clever then its negation is
¬ P : Shyam is not clever.
Truth Table for negation:
P ¬P
T F
F T
3.4.2 CONJUNCTION:
Let p and q be two propositions. The proposition ‘ p and q ’ is called the
conjunction of p and q and is denoted by p ∧ q .
p ∧ q is true when both p and q are true and is false otherwise.
Examples:
1. If p : I will have idli for breakfast.
q : I will have curd rice for lunch.
Then the conjunction is p ∧ q : I will have idli for breakfast and I will have curd rice for
lunch.
118
Truth Table for Conjunction:
p q p∧q
T T T
T F F
F T F
F F F
3.4.3 DISJUNCTION:
Let p and q be two propositions. The proposition ‘ p or q ’ is called the
disjunction of p and q and is denoted by ‘ p ∨ q ’. p ∨ q is false when both p and q
are false and is otherwise true.
Example:
If p : I will become a doctor.
q : I will become a software engineer.
Then the conjunction is p ∨ q : I will become a doctor or a software engineer.
Truth Table for Disjunction:
p q p∨q
T T T
T F T
F T T
F F F
3.4.4 CONDITIONAL:
If p and q are two propositions then the compound proposition ‘if p then q ’
denoted by ‘ p → q ’ is called conditional proposition.
119
q : Today is Saturday.
Then the conditional p → q is
If tomorrow is Sunday then today is Saturday.
Truth Table for p → q :
p q p → q
T T T
T F F
F T T
F F T
3.4.5 BICONDITIONAl:
If p and q are two propositions then the proposition ‘ p if and only if q ’
denoted by p ↔ q is called biconditional proposition.
p ↔ q is true when both p and q are true or both p and q are false.
Example :
Let p : You will score well.
q : You work hard.
Then the biconditional p ↔ q is “You will score well if and only if you work hard”.
T T T
T F F
F T F
F F T
3.4.6 NAND:
‘NAND’ is the combination of ‘NOT’ and ‘AND’. (i.e.) it is the combination of
negation and conjunction. It is denoted by ↑. If p and q are two propositions then p
NAND q is denoted by ‘ p ↑ q ’.
120
p ↑ q is false only when both p and q are true.
Truth Table for NAND:
p q p ↑ q
T T F
T F T
F T T
F F T
3.4.7 NOR:
‘NOR’ is the combination of ‘NOT’ and ‘OR’. (i.e.) it is the combination of
negation and disjunction. It is denoted by ↓. If p and q are two variables then ‘ p NOR
q ’ is denoted by p ↓ q . It is also called as joint denial. It is true only when p and q are
false.
Truth Table for NOR:
p q p ↓ q
T T F
T F F
F T F
F F T
121
Truth table for exclusive – or :
p q p⊕q
T T F
T F T
F T T
F F F
T T F T T T T F F F
T F F F T F F T F T
F T T F T T F T F T
F F T F F T T T T F
I ¬
II ∧
III ∨
IV →, ↔
If the proposition does not have paranthesis then the order is selected according to the
precedence of operators.
For example ¬P ∨ Q means ( ¬P ) ∨ Q because negation comes before ∨ .
When more than one set of paranthesis are used we have a nesting of paranthesis. Any
proposition should contain even number of paranthesis.
i.e. Number of open brackets = number of close brackets.
122
Exercises:
1. If p is true and q is false then find the truth value of the following:
a) ¬ ( p → ¬q ) b) ( p ∧ q ) → ( p ∨ q )
c) ¬ ( p ∧ q ) ∨ ¬ ( q ↔ p ) d) ( p → q ) ∨ ¬ ( p ↔ ¬q )
(a) ¬ ( p → ¬q )
p q ¬q p → ¬q ¬ ( p → ¬q )
T F T T F
Ans: ¬ ( p → ¬q ) is false.
(b) ( p ∧ q ) → ( p ∨ q )
p q p∧q p∨q ( p ∧ q) → ( p ∨ q)
T F F T T
Ans: ( p ∧ q ) → ( p ∨ q ) is true.
(c) ¬ ( p ∧ q ) ∨ ¬ ( q ↔ p )
T F F T T F T
Ans: ¬ ( p ∧ q ) ∨ ¬ ( q ↔ p ) is true.
(d) ( p → q ) ∨ ¬ ( p ↔ ¬q )
p q p→q ¬q p ↔ ¬q ¬ ( p ↔ ¬q ) ( p → q ) ∨ ¬ ( p ↔ ¬q )
T F F T T F F
Ans: ( p → q ) ∨ ¬ ( p ↔ ¬q ) is false.
123
“If 30 ÷ 10 = 3 then 7 × 5 = 35 ”
Solution: Let p : 30 ÷ 10 = 3 which is true.
q : 7 × 5 = 35 which is true.
And it is a conditional statement p → q
Therefore we have
p q p→q
T T T
Solution:
a) ¬p : x is not even.
b) ¬p ∧ ¬q : x is neither even nor divisible by 2.
c) p ∨ q : x is even or divisible by 2.
d) p → q : If x is even then it is divisible by 2.
e) ¬p → ¬q : If x is not even then it is not divisible by 2.
f) p ↔ q : x is even if and only if it is divisible by 2.
124
Solution: (1) Either Anil or Kanchan is rich is p ∨ ¬q .
(2) Anil is poor and Kanchan is rich is ¬p ∧ ¬q .
(3) It is not true that Anil and Kanchan are both rich is ¬ ( p ∧ ¬q ) .
(i) (( A ∧ ( B ∨ C )) ∨ ( A ∧ (C ∨ D )))
(ii) ( ( ( ¬A ) ∧ ( ¬ B ) ) → ¬ ( A ∨ B ) )
Solution: (i) The first and last brackets can be removed and hence we will have
( A ∧ ( B ∨ C )) ∨ ( A ∧ (C ∨ D ))
(ii) Since negation has the highest order of precedence the paranthesis are not
needed there and hence ¬A ∧ ¬B → ¬ ( A ∨ B ) has the same meaning as the given
proposition.
p represents p ∧ q
q
p represents ¬p or p
Therefore for the given proposition we have the following block diagram.
a a∨b
125
b
a∨b ( a ∨ b) ∧ ( a ∨ b )
a ∨b
a a
b b a ∨b
p ¬p p ∨ ¬p
T F T
F T T
126
The last column is always true.
3.5.2 CONTRADICTION:
A proposition which is always false is called a contradiction. (i.e.) it contains only
‘FALSE’ in the last column of its truth table. A contradiction is denoted by F.
For example: p ∧ ¬p is a contradiction.
p ¬p p ∧ ¬p
T F F
F T F
Solution:
P Q ¬Q P ∧ ¬Q ¬P ¬ P ∧ ¬Q Q ∨ ( P ∧ ¬Q ) ∨ ( ¬P ∧ ¬Q )
T T F F F F T
T F T T F F T
F T F F T F T
F F T F T T T
Since the last column has only T irrespective of the value of P and Q the given
proposition is a tautology.
Solution:
P Q P∧Q P∨Q ¬( P ∨ Q) ( P ∧ Q) ∧ ¬( P ∨ Q)
T T T T F F
127
T F F T F F
F T F T F F
F F F F T F
Since the last column values are always false irrespective of the values of P and
Q the given proposition is a contradiction.
3.5.3 LOGICAL EQUIVALENCE:
Two propositions are said to be logically equivalent if they have identical truth
values.
If P ( p, q,...) and Q ( p, q,...) are two propositions then they are logically
P ( p, q,...) ≡ Q ( p, q,...)
Example: ¬ ( P ∧ Q ) ≡ ¬P ∨ ¬Q
P Q ( P ∧ Q) ¬( P ∧ Q) ¬P ¬Q ¬ P ∨ ¬Q
T T T F F F F
T F F T F T T
F T F T T F T
F F F T T T T
The columns of ¬ ( P ∧ Q ) and ¬P ∨ ¬Q have the same truth values F,T,T,T. ∴
Hence ¬ ( P ∧ Q ) is equivalent to ¬P ∨ ¬Q .
Exercise:
There are two restaurants next to each other. One has a sign that says ‘Good food
is not cheap’ and the other has a sign that says, “Cheap food is not good”. Are the signs
saying the same thing?
Solution:
Let c : denote the proposition that the food is cheap.
g : denote the proposition that the food is good.
128
‘Good food is not cheap’ – can be symbolically be written as g → c . (The meaning of
this statement is “if the food is good then it is not cheap” which is a conditional
proposition)
‘Cheap food is not good’ – can be symbolically be written as c → g . (The meaning of
this statement is “if the food is cheap then it is not good” which is a conditional
proposition).
g c g c g →c c→g
T T F F F F
T F F T T T
F T T F T T
F F T T T T
The columns of g → c and c → g are identical (i.e.) they have the same truth
values F,T,T,T. Hence they are equivalent.
∴g →c ≡ c→g
∴ the signs are saying the same thing.
3.5.4 DUALS AND DUALITY PRINCIPLE:
DUALS: Two statements A and B are duals of each other if either one can be obtained
from the other by replacing ∧ by ∨ and ∨ by ∧ .
The connectives ∧ and ∨ are called duals of each other.
Example: If X is ( p ∨ q ) ∧ r then the dual of X is ( p ∧ q ) ∨ r .
sd ≡ t d
t d - is the dual of t .
3.5.5 LAWS OF ALGEBRA OF PROPOSITIONS:
129
1. Idempotent Laws:
P ∨ P ≡ P and P ∧ P ≡ P
2. Associative Laws:
( P ∨ Q ) ∨ R ≡ P ∨ (Q ∨ R )
( P ∧ Q ) ∧ R ≡ P ∧ (Q ∧ R )
3. Commutative Laws:
P∨Q ≡Q∨ P
P∧Q ≡ Q∧ P
4. Distributive Laws:
P ∨ ( Q ∧ R ) ≡ ( P ∨ Q ) ∧ ( P ∨ R ) and
P ∧ (Q ∨ R ) ≡ ( P ∧ Q ) ∨ ( P ∧ R )
5. Identity Laws:
P ∨ T ≡ T; P ∧ T ≡ P
P∨ F ≡ P ; P∧ F ≡F
F represents contradiction.
6. Complement Laws:
P ∨ ¬P ≡ T; P ∧ ¬P ≡ F
¬T ≡ F ; ¬F ≡ T
7. Demorgans’s Laws:
¬ ( P ∨ Q ) ≡ ¬P ∧ ¬Q and
¬ ( P ∧ Q ) ≡ ¬P ∨ ¬Q
Note:
130
All these laws of algebra of propositions can be proved. The first law can be established
by using truth table and the second law will follow by the duality principle as the second
is the dual of the first law.
As an example let us prove distributive laws:
Example:
State and prove distributive laws:
Solution:
The distributive laws are
(i) P ∨ ( Q ∧ R ) ≡ ( P ∨ Q ) ∧ ( P ∨ R )
(ii) P ∧ ( Q ∨ R ) ≡ ( P ∧ Q ) ∨ ( P ∧ R )
S3 ≡ P ∨ Q; S 4 ≡ P ∨ R; S5 ≡ ( P ∨ Q ) ∧ ( P ∨ R ) .
(Instead of writing big propositions in the truth table they can be replaced by some other
small variables defined like this so that the table will have a neat appearance)
P Q R S1 S2 S3 S4 S5
T T T T T T T T
T T F F T T T T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F F F T F F
F F T F F F T F
F F F F F F F F
From the truth table S 2 ≡ S5 .
Hence P ∨ ( Q ∧ R ) ≡ ( P ∨ Q ) ∧ ( P ∨ R ) − − − − − − − − 1
and it is of the form s ≡ t . Therefore by duality principle s d ≡ t d where s d and t d are the
duals of the left hand side and right hand side respectively.
Therefore taking the dulas of LHS and RHS in equation 1, we have
131
P ∧ (Q ∨ R ) ≡ ( P ∧ Q ) ∨ ( P ∧ R ) − − − − − − − 2
Hence the second law follows by the duality principle. Hence the proof.
Note: Using the laws of algebra of propositions further laws can be obtained.
Exercise
Prove absorption laws: (i) P ∨ ( P ∧ Q ) ≡ P
(ii) P ∧ ( P ∨ Q ) ≡ P
Solution:
P Q P↔Q P→Q Q→P ( P → Q ) ∧ (Q → P ) ( P ∨ Q ) ( P ∧ Q ) ( P ∨ Q ) → ( P ∧ Q )
T T T T T T T T T
T F F F T F T F F
F T F T F F T F F
F F T T T T F F T
In the above table the columns P ↔ Q , ( P → Q ) ∧ ( Q → P ) and
132
In some cases, both truth tables and laws of algebra of propositions can be used to
prove the equivalence as in this problem.
Exercise:
Show that P → ( Q → R ) ≡ ( P ∧ Q ) → R
Solution:
Step 1: We first show that Q → R ≡ ¬Q ∨ R
Q R Q→R ¬Q ¬Q ∨ R
T T T F T
T F F F F
F T T T T
F F T T T
≡ P ∨ ( ¬Q ∨ R ) using 1 .
≡ ( P ∧ Q ) → R by 1 .
∴ P → (Q → R ) ≡ ( P ∧ Q ) → R
Hence proved.
Note: Hence we have proved the following conditional equivalence P → Q ≡ ¬P ∨ Q
≡ ( P ∨ Q) → ( P ∧ Q)
133
conjunction. Thus the set of connectives {¬, ∧} and {¬, ∨} are functionally complete set.
P ↑ P ≡ ¬ ( P ∧ P ) ≡ ¬P ∨ ¬ P ≡ ¬ P
( P ↑ Q) ↑ ( P ↑ Q) ≡ ¬( P ↑ Q) ≡ P ∧ Q
( P ↑ P ) ↑ ( Q ↑ Q ) ≡ ¬P ↑ ¬Q ≡ ¬ ( ¬ P ∧ ¬ Q ) ≡ P ∨ Q
Similarly ¬, ∧, ∨ can be expressed in terms of ↓ alone.
P ↓ P ≡ ¬ ( P ∨ P ) ≡ ¬P ∧ ¬ P ≡ ¬ P
( P ↓ Q) ↓ ( P ↓ Q) ≡ ¬( P ↓ Q) ≡ P ∨ Q
( P ↓ P ) ↓ ( Q ↓ Q ) ≡ ¬P ↓ ¬Q ≡ ¬ ( ¬ P ∨ ¬ Q ) ≡ P ∧ Q
NAND and NOR operators are functionally complete. The sets {↑} and {↓} are called
biconditional.
Solution:
p ∧ (q ↔ r ) ∨ (r ↔ p)
≡ p ∧ (( q → r ) ∧ ( r → q )) ∨ (( r → p ) ∧ ( p → r ))
≡ p ∧ ( ( ¬q ∨ r ) ∧ ( ¬r ∨ q ) ) ∨ ( ( ¬r ∨ p ) ∧ ( ¬p ∨ r ) )
134
Example:
2 2 2
If a triangle ABC is a right angled triangle then AB + BC = AC . This is a
conditional proposition.
2 2 2
Its converse is : If AB + BC = AC then the triangle is a right angled triangle.
2 2 2
Its inverse is : If ABC is not a right angled triangle then AB + BC ≠ AC .
2 2 2
Its contrapositive is : If AB + BC ≠ AC then the triangle ABC is not a right angled
triangle.
TRUTH TABLE FOR CONVERSE, INVERSE AND CONTRAPOSITIVE:
p q p→q q→ p ¬ p → ¬q ¬ q → ¬p
conditional converse inverse contrapositive
T T T T T T
T F F T T F
F T T F F T
F F T T T T
Note: Since the columns of conditional and contrapositive are identical, conditional and
contrapositive are logically equivalent.
2. P ∧ P is equivalent to
(a) 1 (b) P (c) − P (d) None of these Ans: (b)
3. The inverse of “If I run I will catch the train” is
(a) If I run I will not catch the train.
(b) If I don’t run I will catch the train.
(c) If I don’t run I will not catch the train. Ans: (c)
135
3.6 NORMAL FORMS:
A well formed formula is denoted by A ( P1 , P2 ,...Pn ) where P1 , P2 ,...Pn are atomic
Obtain DNF of ( p ∧ ¬ ( q ∨ r ) ) ∨ ( ( ( p ∧ q ) ∨ ¬r ) ∧ p )
Solution: ( p ∧ ¬ ( q ∨ r ) ) ∨ ( ( ( p ∧ q ) ∨ ¬r ) ∧ p )
≡ ( p ∧ ( ¬q ∧ ¬r ) ) ∨ ( ( ( p ∧ q ) ∨ ¬r ) ∧ p ) Demorgan’s law.
≡ ( p ∧ ¬q ∧ ¬r ) ∨ ( ( p ∧ q ∧ p ) ∨ ( ¬r ∧ p ) ) distributive law.
136
CNF: A formula which is equivalent to a given formula and which consists of a product
of elementary sum is called as conjunctive normal form.
Exercises:
1. Obtain CNF of p → ( ( p → q ) ∧ ¬ ( ¬q ∨ ¬p ) )
Solution:
p → ( ( p → q ) ∧ ¬ ( ¬q ∨ ¬p ) )
≡ ¬p ∨ ( ( p → q ) ∧ ¬ ( ¬ q ∨ ¬ p ) )
≡ ¬p ∨ ( ( ¬ p ∨ q ) ∧ ( q ∧ p ) )
≡ ( ¬p ∨ ( ¬ p ∨ q ) ) ∧ ( ¬ p ∨ ( q ∧ p ) )
≡ ( ¬p ∨ ¬p ∨ q ) ∧ ( ( ¬ p ∨ q ) ∧ ( ¬p ∨ p ) )
≡ ( ¬p ∨ q ) ∧ ( ¬p ∨ q ) ∧ (T)
≡ ( ¬p ∨ q ) ∧ T
2. Obtain CNF of q ∨ ( p ∧ r ) ∧ ¬ ( ( p ∨ r ) ∧ q )
Solution: q ∨ ( p ∧ r ) ∧ ¬ ( ( p ∨ r ) ∧ q )
≡ ( q ∨ ( p ∧ r ) ) ∧ ( ¬ ( p ∨ r ) ∨ ¬q )
≡ ( q ∨ ( p ∧ r ) ) ∧ ( ( ¬p ∧ ¬r ) ∨ ¬q )
Note: The disjunctive normal forms and the conjunctive normal forms of a given formula
are not unique.
3.6.3 PRINCIPAL DISJUNCTIVE NORMAL FORM (PDNF):
Minterms:
Let p and q be two variables. The product of the variables and their negations such that
none of the terms contain a variable and its negation are called minterms. For p and q
the minterms are p ∧ q, p ∧ ¬q, ¬p ∧ q, ¬p ∧ ¬q .
137
Note: p ∧ ¬q ∧ q is a elementary product but not a minterm because a minterm should
not contain a variable and its negation.
If there are n variables then there are 2n minterms.
PDNF:
A formula which is equivalent to a given formula consisting of sum of minterms only is
called principal disjunctive normal form.
There are two ways of finding PDNF.
(i) using truth table
(ii) without using truth table.
PDNF is also called as sum of minterms form or sum of products canonical form.
(i) Using truth table:
1. Construct truth table for the given formula.
2. Identify the rows in which the formula has true – as truth value.
3. Construct minterms from each such rows by taking
(i) the variable with true – as variable itself and
(ii) the variable with false – as negated variable.
4. Sum of these minterms will be the required PDNF.
Exercise:
Find PDNF of P → Q
Solution:
P Q P→Q
T T T
T F F Here the 1st, 3rd and 4th rows are true for P → Q . Select
F T T such rows.
F F T
In the 1st row since P and Q have true as truth value the corresponding minterm is
P ∧ Q . In the third row since P has truth value false and Q has truth value true the
corresponding minterms is ¬P ∧ Q .
138
In the fourth row since the variables P and Q have truth value false then
corresponding minterm is ¬P ∧ ¬Q .
Solution:
¬ (( P ∨ Q ) ∧ R ) ∧ ( P ∨ R )
≡ F ∨ ( ¬P ∧ ¬Q ∧ R ) ∨ ( ¬R ∧ P ) ∨ (F) [Q P ∧ ¬P ≡ F R ∧ ¬R ≡ F ]
≡ ( ¬P ∧ ¬Q ∧ R ) ∨ ( ¬R ∧ P )
≡ ( ¬ P ∧ ¬Q ∧ R ) ∨ ( ¬R ∧ P ∧ T )
≡ ( ¬P ∧ ¬Q ∧ R ) ∨ ( ( ¬R ∧ P ) ∧ ( Q ∨ ¬ Q ) )
139
(ii) without using truth tables.
(i) Using truth tables:
1. Construct truth table for the given formula.
2. Identify the rows in which the formula has false – as truth value.
3. Construct maxterm from each such row by taking
(i) the variable with true -as negated variable and
(ii) the variable with false- as the variable itself.
4. Product of these maxterms will be the required PCNF.
1. Find PCNF of ¬ ( P → Q ) using truth table.
P Q P→Q ¬ ( P → Q)
Here 1st, 3rd and 4th row have false as the
T T T F
truth value of the given statement. Select
T F F T
such rows.
F T T F
F F T F
Solution:
¬ ( P → Q ) ≡ ¬ ( ¬P ∨ Q )
≡ ( P ∧ ¬Q )
≡ ( P ∧ ¬Q ) ∨ F (Identity law)
≡ ( P ∧ ¬Q ) ∨ ( P ∧ ¬ P )
140
≡ ( P ∨ P ) ∧ ( ¬ Q ∨ P ) ∧ ( P ∨ ¬P ) ∧ ( ¬ Q ∨ ¬ P )
≡ ( P ∨ P ) ∧ ( P ∨ ¬P ) ∧ ( ¬Q ∨ P ) ∧ ( ¬Q ∨ ¬ P )
≡ ⎡⎣ P ∨ ( P ∧ ¬P ) ⎤⎦ ∧ ( ¬Q ∨ P ) ∧ ( ¬Q ∨ ¬P )
≡ ( P ∨ F) ∧ ( ¬Q ∨ P ) ∧ ( ¬Q ∨ ¬P )
≡ ( P ∨ ( Q ∧ ¬Q ) ) ∧ ( ¬Q ∨ P ) ∧ ( ¬Q ∨ ¬ P )
≡ ( P ∨ Q ) ∧ ( P ∨ ¬ Q ) ∧ ( ¬ Q ∨ P ) ∧ ( ¬ Q ∨ ¬P )
141
( ¬ P ∧ ¬Q ∧ R ) ∨ ( ¬P ∧ Q ∧ ¬ R ) ∨ ( ¬ P ∧ Q ∧ R ) ∨ ( P ∧ ¬ Q ∧ ¬ R ) ∨ ( P ∧ ¬ Q ∧ R ) ∨ ( P ∧ Q ∧ ¬ R ) ∨ ( P ∧ Q ∧ R )
is the required PDNF.
2. Obtain the PCNF and PDNF of ( ¬p → R ) ∧ ( q p) .
Solution:
Let S ≡ ( ¬p → r ) ∧ ( q p)
≡ (¬ ( ¬p ) ∨ r ) ∧ ( q → p ) ∧ ( p → q ) conditional and biconditional equivalence
≡ ( p ∨ r ) ∧ ( ( ¬q ∨ p ) ∧ ( ¬p ∨ q ) ) conditional equivalence & law of double negation
≡ (( p ∨ r ) ∨ F) ∧ (( ¬q ∨ p ) ∨ F) ∧ (( ¬p ∨ q ) ∨ F) identity law
≡ ( ( p ∨ r ) ∨ ( q ∧ ¬ q ) ) ∧ ( ( ¬q ∨ p ) ∨ ( r ∧ ¬ r ) ) ∧ ( ( ¬ p ∨ q ) ∨ ( r ∧ ¬ r ) )
complement law
≡ ( p ∨ q ∨ r ) ∧ ( p ∨ ¬ q ∨ r ) ∧ ( p ∨ ¬ q ∨ r ) ∧ ( p ∨ ¬q ∨ ¬r ) ∧ ( ¬ p ∨ q ∨ r ) ∧
( ¬p ∨ q ∨ ¬ r ) Distributive law
≡ ( p ∨ q ∨ r ) ∧ ( p ∨ ¬ q ∨ r ) ∧ ( p ∨ ¬q ∨ ¬r ) ∧ ( ¬ p ∨ q ∨ r ) ∧ ( ¬ p ∨ q ∨ ¬ r )
is the required PCNF.
To find PDNF:
The maxterms that are not present in PCNF are
( p ∨ q ∨ ¬r ) , ( ¬p ∨ ¬q ∨ r ) , ( ¬p ∨ ¬q ∨ ¬r ) . Conjuncting them we have
( p ∨ q ∨ ¬r ) ∧ ( ¬p ∨ ¬q ∨ r ) ∧ ( ¬p ∨ ¬ q ∨ ¬ r )
Taking Negation we have
¬{( p ∨ q ∨ ¬r ) ∧ ( ¬p ∨ ¬q ∨ r ) ∧ ( ¬p ∨ ¬q ∨ ¬r )}
≡ ¬ ( p ∨ q ∨ ¬ r ) ∨ ¬ ( ¬p ∨ ¬ q ∨ r ) ∨ ¬ ( ¬ p ∨ ¬ q ∨ ¬ r )
≡ ( ¬p ∧ ¬q ∧ r ) ∨ ( p ∧ q ∧ ¬r ) ∨ ( p ∧ q ∧ r ) is the required PDNF.
Solution:
This involves only 2 variables P and Q and has 22 = 4 minterms.
142
This possible minterms are P ∧ Q, P ∧ ¬Q, ¬P ∧ Q and ¬P ∧ ¬Q .
This minterms which is not present in the PDNF is P ∧ ¬Q . Since there is only 1
term we don’t disjunct it with anything.
Taking negation of that we have
¬ ( P ∧ ¬Q ) ≡ ¬P ∨ Q and it is the required PCNF.
143
VALID ARGUMENTS:
An argument P1 , P2 ,...Pn is said to be valid if Q is true whenever all the premises
Eg. p, p → q q
p p→q q
Here the premises are p and p → q . Both the premises are true only
T T T
in the first row. So we check for validity only in the first row where all T F F
the premises are true. In that row the conclusion q is true.Therefore F T T
the conclusion is true when all the premises are true and hence it is a F T F
valid argument.
FALLACY:
An argument which is not valid is called a fallacy.
Eg: p → q , ¬p ¬q p q p→q ¬p ¬q
Here in the fourth row the conclusion is true when the premises T T T F F
are true. But in the third row when the premises p → q and ¬p T F F F T
are true the conclusion is false. Hence it is not valid and is called F T T T F
as a fallacy. F F T T T
The following three statements are equivalent.
(i) P1 , P2 ,...Pn Q is a valid argument.
144
The following methods are used to check the validity of the arguments.
(i) Direct Proof
(ii) Indirect Proof
(i) Direct Proof: A direct proof is the one in which the truth of the premises are
shown to directly imply the truth of the conclusion.
(ii) Indirect Proof: In indirect proof we show that the assumption of the negated
conclusion results in a contradiction.
3.7.3 RULES OF INFERENCES:
In addition to the rules of algebra of proposition we use another set of rules
called the rules of inference.
A proposition P ( p, q.....) is said to logically imply a proposition
Q ( p, q.....) written as
P ( p, q.....) ⇒ Q ( p, q.....)
Example:
Prove that ( p ∧ q ) ⇒ ( p → q )
Solution:
We have to prove that ( p ∧ q ) logically implies ( p → q ) .
(i.e.) we have to prove that ( p ∧ q ) → ( p → q ) ≡ T
( p ∧ q) → ( p → q)
≡ ¬ ( p ∧ q ) ∨ ( ¬p ∨ q ) Conditional equivalence
≡ (¬p ∨ ¬q) ∨ (¬p ∨ q) Demorgans law
≡ ¬p ∨ ( ¬q ∨ q ) idempotent law
≡ ¬p ∨ T complement law
≡ T identity law.
Hence proved.
3. P ∧ ( P → Q ) ⇒ Q (modus ponens)
145
4. ¬Q ∧ ( P → Q ) ⇒ ¬P (modus tollens)
6. ⎡⎣ ¬P ∧ ( P ∨ Q ) ⎤⎦ ⇒ Q (disjunctive syllogism)
7. ( P → Q ) ∧ ( R → S ) ∧ ( P ∨ R ) ⇒ Q ∨ S (constructive dilemma)
8. ( P → Q ) ∧ ( R → S ) ∧ ( ¬Q ∨ ¬S ) ⇒ ( ¬P ∨ ¬R ) (destructive dilemma)
9. ( P → Q ) ≡ ¬Q → ¬P ≡ ¬P ∨ Q (conditional equivalence)
10. ( P ↔ Q ) ≡ ( P → Q ) ∧ ( Q → P ) ≡ ( P ∨ Q ) ∨ ( ¬P ∧ ¬Q ) (biconditional
equivalence)
To prove the arguments we use 3 rules.
(1) rule P
(2) rule T
(3) rule CP
(2) Rule P: A premise can be introduced in any stage of the derivation.
(3) Rule T : A formula S can be used in the derivation if it is tautologically implied by
one or more of the preceeding steps in the derivation.
(4) Rule CP: If we can derive S from R and a set of premises then we can derive
R→S from the set of premises alone.
Exercises: (with direct proof)
1. Show that p → r , ¬p → q, q → s ⇒ ¬r → s
Solution:
Step Proposition Justification
1. p→r Rule P
2. ¬r → ¬p Rule T & (1), conditional equivalence
3. ¬p → q Rule P
4. ¬r → q [(2), (3) and chain rule] Rule T
5. q→s Rule P
6. ¬r → s Rule T and [(4), (5) and Chain rule]
146
Note:
When we move along the rows of the table, at any intermediate step we mean that
all the preceding steps are true and hence they can be connected by ∧ .
In the above problem in step 2 we have ¬r → ¬p in step 3 we have ¬p → q .
Hence when we come to step 4 all the previous steps are taken to be true and hence
combining step 2 and step 3 we have
( ¬r → ¬ p ) ∧ ( ¬ p → q )
By chain rule ( p → q ) ∧ ( Q → R ) ⇒ P → R and hence we have
( ¬r → ¬ p ) ∧ ( ¬ p → q ) ⇒ ¬ r → q which is step 4.
Solution:
Step Proposition Justification
1. ¬s ∧ ¬u Rule P
147
2. ¬u Rule T ((1) and simplification)
3. ¬u → ¬t Rule P
4. ¬t Rule T & (2) and (3) and modus ponens
5. ¬s (1) and rule T and simplification
6. ¬s ∧ ¬t (4) and (5)
7. r → (s ∨ t) Rule P
8. ¬ ( s ∨ t ) → ¬r Rule T and (7) and conditional equivalence
9. ¬s ∧ ¬t → ¬r (8) and Demorgan’s laws
10. ¬r (6), (7) and modus tollens and rule T (as ¬s ∧ ¬t ≡ ¬ ( s ∨ t ) in (6))
11. ( ¬p ∨ q ) → r Rule P
12. ¬r → ¬ ( ¬p ∨ q ) Rule T and (11) and conditional equivalence
Solution:
Step Proposition Justification
1. p→q Rule P
2. q→r Rule P
3. p→r Rule T and (1), (2) and chain rule.
4. ¬p ∨ r (3) and rule T and conditional equivalence
5. p∨r Rule P
6. ( p ∧ ¬p ) ∨ r (4) and (5) and distributive law
( ¬p ∨ r ) ∧ ( p ∨ r ) ≡ ( ¬ p ∧ p ) ∨ r
7. F ∨r (6) and complement law
148
11. r ∧ ( ¬p ∨ ¬r ) Combining (8) & (10)
Solution:
Step Proposition Justification
1. p→q Rule P
2. q → ¬r Rule P
3. p → ¬r Rule T and (1), (2) (chain rule)
4. p Rule P
5. ¬r Rule P
6. p→r Rule P
7. ¬p Rule T from (5) and (6)(modus tollens)
8. p Rule P
9. p ∧ ¬p ⇒ ⇐ contradiction
Using the premises we arrive at a contradiction. Hence the given premises are
inconsistent.
6. Check the validity of the argument:
If the band could not play rock music or the refreshments were not
delivered on time then the New Year’s party would have been cancelled and Alice
would have been angry. If the party were cancelled, then refunds would have to be
made. No refunds were made.
Therefore the band could play rock music.
Solution:
Let p : the band could play rock music.
q : the refreshments were made on time
149
r : The new Year’s party was cancelled.
s : Alice was angry.
t : Refunds had to be made.
Premises are : ( ¬p ∨ ¬q ) → ( r ∧ s )
r →t
¬t
Conclusion is p
This can also be represented as follows:
( ¬p ∨ ¬ q ) → ( r ∧ s )
r →t
¬t
_______________
∴p
(The statements which are above the line are premises and the statement below the line is
the conclusion.Since it is the conclusion it is written with a ‘∴’.)
Proof:
Step Proposition Justification
1. r →t Rule P
2. ¬t Rule P
3. ¬r Rule T [ (1) and (2) and modus tollens]
4. ¬r ∨ ¬s (3) Rule T, rule of disjunctive addition
5. ¬(r ∧ s) Step 4 & Demorgan’s laws
6. ( ¬p ∨ ¬ q ) → ( r ∧ s ) Rule P
Using all the given premises the conclusion p is attained in direct proof method.
Hence the given argument is a valid argument.
150
Problems with indirect proof:
1. Show that a → b, ¬ ( b ∨ c ) ⇒ ¬a .
Solution:
151
Problems with CP:
1. Show that P, P → ( Q → ( R ∧ S ) ) ⇒ Q → S .
Solution: To prove using CP, we take Q as an assumed premise and prove S . This will
imply Q → S as a valid conclusion.
Step Proposition Justification
1. Q Assumed premise
2. P → (Q → ( R ∧ S )) Rule P
3. P Rule P
4. Q → (R ∧ S) (2), (3) & modus ponens & rule T.
P → (Q → R ) , Q → ( R → S )
Solution:
Step Proposition Justification
1. P Assumed premise
2. P → (Q → R ) Rule P
3. Q→R Rule T & (1) & (2) & modus ponens
4. Q → (R → S) Rule P
152
10. P → (Q → S ) Using CP, (1) & (10)
Hence proved.
HAVE YOU UNDERSTOOD THE CONCEPTS ?
ANSWER THE FOLLOWING:
1. ( P ∨ Q ) ∧ ( ( P ∨ Q ) → R ) implies
2. ( P → ( Q ∨ R ) ) ∧ ( ¬Q ∧ ¬R ) implies
153
In both the above sentences we require two variables (names) to define the predicates.
hence they are 2-place predicates.
If T denotes : is taller than (predicate)
t : Tina and r : Ramya (Variables)
The first sentence can be denoted as T(t,r).
If C denotes : is cleverer than (predicate)
v : Vasan and r : Roshan (Variables)
The second sentence can be denoted as C(v,r).
3-PLACE PREDICATES:
If three variables are required to use a predicate then it is called 3 place predicate.
Example:
5 is in between 4 and 6 in the set of whole numbers.
Here 4,5,6 are variables.
……..is between …. and ……. is the predicate.
n-PLACE PREDICATES:
Similarly it can be extended for n variables and in such a case it is called a n-place
predicates.
3.8.2 QUANTIFIERS:
There are two different quantifiers:
1. Universal quantifier
2. Existential quantifier
(i) UNIVERSAL QUANTIFIER:
Let p ( x ) be a propositional function. “For every x ” or “for all x ” is called the
The set of values for which the statement is true is called truth set.
Examples:
154
1. Consider “all scents have pleasant fragrance”.
Let S ( x ) : x is a scent.
( x ) ( S ( x ) → F ( x )) .
2. Let A = {7, 8, 9, 10}
Consider (∀x ∈ A)( x + 5 > 9)
Since x + 5 > 9
x>9–5
x>4
Here x ∈ A and A = {7, 8, 9, 10} and all the values in this set are greater than 4 and
satisfy the relation x + 5 > 9. Hence for every value x in the set the given statement is true.
ii) EXISTENTIAL QUANTIFIER:
Let p(x) be a propositional function. “There exists a x” or “There exists some x” is called
as the existential quantifier and is denoted by ∃x .
∃xp( x) means that the proposition is true for some x.
(∃x ∈ A) p( x) means that there exists some x ∈ A such that the proposition p(x) is true.
Examples:
1. Some students are intelligent.
Let S(x): x is a student.
I(x): x is intelligent.
(∃x) ( S ( x) → I ( x) ) is the symbolic representation of the given statement.
155
∀x is the negation of ∃x .
NESTING OF QUANTIFIERS:
If there are more than one quantifier in front of a proposition then we have a
nesting of quantifiers.
Example:
Consider “Everyone has someone whom they like”.
Let L ( x, y ) : x likes y .
The meaning is ‘there is some y whom x likes and it is true for all x ’. Therefore the
universe for this proposition is the set of all people.
3.8.3 BOUND AND FREE VARIABLES:
Consider (x)A(x) and ( ∃y )B(y). Here (x)A(x) is called x-bound part of the formula
and ( ∃y )B(y) is called an y-bound part of the formula. In the first case x is called bound
variable and in the second case y is called as the bound variable.
Consider (x) P(x,y). Here x is a bound variable and y is a free variable.
The scope of the formula is the formula immediately following the quantifier. If
the scope is an atomic formula no parenthesis are used to enclose the formula.
Example: (x)W(x)
If it is not an atomic formula then parenthesis are needed.
Example:
1. ( x) ( A( x) → B( x) )
2. ∃y ( P( y ) → Q( y ) )
156
M( x ) : x is a mortal and
s : Socrates
Then the Socrates argument can be represented as
( x ) ( H ( x ) → M ( x ))
H(s)
∴ M(s).
(This can be proved using the inference theory for predicate calculus which will have
methods similar to the methods which were used to prove the validity of arguments in
propositional calculus).
Exercises:
1. Translate the statement, ‘the sum of two positive integers is positive’ into a logical
expression.
Solution:
The meaning of the given statement is ‘for every two positive integers x, y the sum
x + y is also positive’.
where the universe of discourse for both variables consists of all integers.
2. Express the statement, ‘If a person is a female and is a parent then this person is
someone’s mother’ as a logical expression.
Solution:
Let F( x ): x is a female
P( x ): x is a parent
M( x, y ): x is a mother of y .
The meaning of the given statement is ‘if x is a parent and a female then she is a
mother of a child y ’. It can be symbolized as ∀x ( ( F ( x) ∧ P( x)) → ∃yM ( x, y ) ) . Since
157
be brought to the front and in such a case an equivalent expression will be
∀x∃y ( ( F ( x) ∧ P( x)) → M ( x, y ) )
quantifier ∃x
≡ ∃x ⎡⎣¬ ( ¬P( x) ∨ Q( x) ) ⎤⎦ Conditional equivalence P → Q ≡ ¬P ∨ Q
Hence the negation is, “There exists an integer x such that x is odd and x 2 − 1 is not
even (odd)”.
(The truth value of this statement is false).
Solution:
{
¬ ∀x∃y ⎡⎣( p ( x, y ) ∧ q ( x, y ) ) → r ( x, y ) ⎤⎦ }
≡ ∃x ⎡⎣¬∃y ( p ( x, y ) ∧ q ( x, y ) ) → r ( x, y ) ⎤⎦
158
{
≡ ∃x∀y ¬ ⎡⎣( p ( x, y ) ∧ q ( x, y ) ) → r ( x, y ) ⎤⎦ }
≡ ∃x∀y {¬ ⎡⎣¬ ( p ( x, y ) ∧ q ( x, y ) ) ∨ r ( x, y ) ⎤⎦} using conditional equivalence.
159
P(8) is true.
R(8, 4) is ‘8 is divisible by 4’
And it is true.
P(8) R(8, 4) P(8) ∧ R(8, 4)
T T T
Hence true.
(vi) R(1, 8) → Q(4)
R(1, 8) is ‘ 1 is divisible by 8’ and it is false
Q(4) is false (found in (ii))
Using definition of conditional statement
R(1, 8) Q(4) R(1, 8) → Q(4)
F F T
Hence true.
3.8.4 INFERENCE THEORY FOR PREDICATE CALCULUS
As discussed earlier, the validity of an argument is checked in inference theory.
When the premises and the conclusion are propositions, the validity of the arguments are
proved using the equivalence laws and the valid inferences.
When the propositions are quantified statements with predicates, the inferences
and the equivalence laws are not sufficient to check their validity. Hence along with those
laws and inferences we use the following for deriving the conclusion from the premises.
Some more Equivalence laws and inferences:
1. ( ∃x ) ( A ( x ) ∨ B ( x ) ) ≡ ( ∃x ) A ( x ) ∨ ( ∃x ) B ( x )
2. ( x ) ( A ( x ) ∧ B ( x ) ) ≡ ( x ) A ( x ) ∧ ( x ) B ( x )
3. ¬ ( ∃x ) A ( x ) ≡ ( x ) ¬A ( x )
4. ¬ ( x ) A ( x ) ≡ ( ∃x ) ¬A ( x )
5. ( x ) A ( x ) ∨ ( x ) B ( x ) ⇒ ( x ) ( A ( x ) ∨ B ( x ) )
6. ( ∃x ) ( A ( x ) ∧ B ( x ) ) ⇒ ( ∃x ) A ( x ) ∧ ( ∃x ) B ( x )
As before the proof is either a direct proof or an indirect proof. Rule P, rule T and
rule CP are also used here with the same meaning.
160
In the inference theory of predicate calculus the arguments contain either the
universal quantifier ⎡⎣( x ) or ∀x ⎤⎦ or the existential quantifier [ ∃x ] . We either use these
additional laws and inferences to derive the conclusion or we remove the quantifiers to
get forms generalized to predicates. Then we use the ordinary equivalence laws and
inferences to get the conclusion. If the conclusion is a quantified statement we introduce
quantifiers to get the desired result. The additional laws and inferences involving
quantifiers can also be used in any stage as required.
The elimination and addition of quantifiers can be done by using the following
rules.
1. Rule US (Universal specification)
2. Rule UG (Universal generalization)
3. Rule ES (Existential specification) and
4. Rule EG (Existential generalization)
Rule US:
If a statement is true for every x in the universe then it is also true for some object
“c” in the universe.
∀xA ( x ) ( x) A( x)
or
∴ A(c) ∴ A(c)
(i.e.) from ( x ) A ( x ) one can conclude A ( c ) .
Rule UG:
If a statement A ( c ) is true for an arbitrary c of the universe then the universal
In symbols,
A ( c ) for an arbitrary c
∴∀xA ( x )
Rule ES:
If a statement is true for some x in the universe (i.e.) if ∃xA ( x ) is true then we
conclude that it will be true for some element ‘c’ in the universe. ∃xA ( x ) means that
161
there exists a ‘x’ for which A ( x ) is true. We name it as ‘c’ and continue the proof
provided ‘c’ is not free in any premise or in any prior step of the derivation.
In symbols,
∃xA ( x )
∴ A(c) for some element ' c '
Rule EG:
If A ( c ) is true for some element ‘c’ in the universe then we conclude that
∃xA ( x ) is true.
In symbols,
A ( c ) for some element ' c '
∴∃xA ( x )
Problems:
1. Prove that ( ∃x ) ( ( p ( x ) ∧ q ( x ) ) ) ⇒ ( ∃x ) p ( x ) ∧ ( ∃x ) ( q ( x ) ) .
Solution:
Step Proposition Justification
1. ( ∃x ) ( p ( x ) ∧ q ( x ) ) Rule P
2. p ( y) ∧ q ( y) Rule ES
162
2. Show that ( ∃x ) M ( x ) follows from the premises
( x ) ( H ( x ) → M ( x )) and ( ∃x ) H ( x )
Proof:
Step Proposition Justification
1. ( ∃x ) H ( x ) Rule P
3. ( x ) ( H ( x ) → M ( x )) Rule P
Hence proved.
3. Show that ( x ) ( P ( x ) ∨ Q ( x ) ) ⇒ ( x ) P ( x ) ∨ ( ∃x ) Q ( x )
Proof:
We use the indirect method of proof.
2. ¬ ( x ) P ( x ) ∧ ¬ ( ∃x ) Q ( x ) Demorgan’s laws
3. ¬( x) P ( x) Conjunctive simplification
4. ( ∃x ) ¬P ( x ) Negation of ( x ) is ∃x
6. ( x ) ¬Q ( x ) Negation of ∃x is ( x )
163
10. ¬( P ( y ) ∨ Q ( y )) (9) & Demorgan’s laws
11. ( x ) ( P ( x ) ∨ Q ( x )) Rule P
14. 0 contradiction
When we assume the negated conclusion we arrive at a contradiction. Hence by
indirect method of proof the given argument is valid. Hence the proof.
2. ( ∀x ) ( R ( x ) → ¬Q ( x ) ) Rule P
4. R ( x) Rule P (assumed)
164
2. What is the truth set for “ x + 3 > 8 ”.
(a) { x : x ∈ N , x > 8}
(b) { x : x ∈ N , x > 3}
(c) { x : x ∈ N , x ≥ 6}
3. Negate ∃x∀y p ( x, y )
(a) ∃x¬∀y, p ( x, y )
(b) ∃x∀y ¬p ( x, y )
(c) ∀x∃y ¬p ( x, y )
SUMMARY:
• Propositions are statements which are either true or false but not both.
• Primitive or atomic propositions are those which cannot be broken down into
simpler propositions and they are represented by either capital letters or small
letters.
• Compound propositions are composed of atomic propositions and are connected
by connectives.
• The truth value of propositions can be found using truth tables and they contain 2n
rows if the proposition consists of n variables.
• Negation is the negative of a statement and it is true if the statement is false and
vice versa and is represented by ¬ .
165
• Conjunction is represented by p ∧ q and is true if both the statements p and q
are true otherwise it is false. Disjunction is represented by p ∨ q and is false only
when both p and q are false otherwise it is true. If … then statement is called
conditional and is denoted by p → q and is false only when p is true and q is
false.
• If and only if statement is called biconditional and it is true only when both p
and q are true or both are false and it is denoted by p ↔ q .
• NAND is ‘not’ and ‘and’ together and is denoted by p ↑ q and it is false only
when both p and q are true. NOR is ‘not’ and ‘or’ together and is denoted by
p ↓ q and it is true only when p and q are false. If p and q are two
propositions then ‘ p exclusive – or q ’ is denoted by p ⊕ q . p ⊕ q is true when
either p is true or q is true but not both. It is called exclusive – or because it
excludes the possibility that both p and q are true.
• Tautology is a statement which is always true. Contradiction is a statement which
is always false. Two statements are equivalent when they have the identical truth
values.
• Two statements are duals of each other if one can be obtained from the other by
replacing ∧ by ∨ and ∨ by ∧ . If two statements are equivalent and are
connected by ∨ and ∧ only then their duals are also equivalent and this is called
as duality principle. Any proposition can be written in terms of the connectives
{¬, ∧} and {¬, ∨} and they are called as functionally complete set of connectives.
{↑} ,{↓} are minimal sets. The laws of algebra of propositions and laws of
166
formula is called PCNF. PCNF & PDNF can be obtained either using truth tables
or without using them. PCNF to PDNF and PDNF to PCNF conversion is also
possible.
• An assertion that a given set of premises yielding the conclusion is called an
argument. An argument in which the conclusion is true when all the premises are
true it is called as a valid argument. An argument which is not valid is called as a
fallacy. The validity of arguments can be proved using direct proof or indirect
proof. For these proofs a set of rules called rule T, rule P, rule CP are used along
with some valid inferences.
• Predicates related by any number of variables constitute predicate calculus.
Depending upon the number of variables they may be 1-place predicates, 2-place
predicates and so on. Quantifiers are of two kinds-universal and existential. ‘for
every x ’ denoted by ∀x or ( x ) is universal quantifier. ‘there exists some x ’
denoted by ∃x is called existential quantifier. Bound and free variables are also
defined and they have applications in the inference theory of predicate calculus.
• Rules are defined for removal and addition of quantifiers. Equivalence laws and
valid inferences which involve quantifiers are also charted. These concepts are
used to check the validity of arguments in predicate calculus.
EXERCISES:
PART A
1. Negate the statement given below:
‘If there is a will there is a way’ Ans: ¬ ( p → q ) ≡ ¬ ( ¬p ∨ q ) ≡ p ∧ ¬q
Ans: ¬p ∨ ( q ∧ r ) ∨ r
167
q − False ]
∀x ⎡⎣ S ( x ) → ( C ( x ) ∨ J ( x ) ) ⎤⎦
7. Express the following statement in symbolic form “Any integer is either positive or
negative”. (
Ans: ∀x I ( x ) → ( P ( x ) ∨ N ( x ) ) )
EXERCISES:
PART – B
1. Show that Q ∨ ( P ∧ ¬Q ) ∨ ( ¬P ∧ ¬Q ) is a tautology without using truth tables.
(ii) P ⊕ Q ≡ ( P ∧ ¬Q ) ∨ ( Q ∧ ¬P )
168
(All these equivalences from problem 2 to 7 can be proved using the truth tables
easily)
8. Find the converse, inverse and contrapositive of
‘If n is prime then n is odd or n is 2’
Ans:
Converse: If n is odd or n is 2 then n is prime.
Inverse: If n is not prime, then n is not odd and n is not 2.
Contrapositive: If n is not odd and n is not 2 then n is not prime.
9. Show that R → S can be derived from the premises P → ( Q → S ) , ¬R ∨ P and Q .
Ans: ( P ∧ Q ) ∨ ( ¬P ∧ Q ) ∨ ( ¬P ∧ ¬Q ) .
14. Translate the following predicate calculus formula into English sentence.
∀x ⎡⎣C ( x ) ∀∃y ( C ( y ) ∧ F ( x, y ) ) ⎤⎦ .
(
Ans: ( x ) p ( x ) → ( ∃y ) ( P ( y ) ∧ Q ( y, x ) ) )
169
where P ( x ) : x is a positive integer.
Q ( y, x ) : y is greater than x .
b) ( ∃y ) ( M ( y ) ∧ ¬W ( y ) )
170