0% found this document useful (0 votes)
16 views

Mathematical Logic This Document Is About The Subject Work of Engineering This Material Helps

Uploaded by

DSEC-MCA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Mathematical Logic This Document Is About The Subject Work of Engineering This Material Helps

Uploaded by

DSEC-MCA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 211

lOMoARcPSD|28881680

Mathematical Logic - This document is about the subject work


of engineering. This material helps
Mathematical Logic (Gujarat Technological University)

Studocu is not sponsored or endorsed by any college or university


Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Unit – I
Mathematical Logic
INTRODUCTION
Proposition: A proposition or statement is a declarative sentence which is either
true or false but not both. The truth or falsity of a proposition is called its truth-value.

These two values ‗true‘ and ‗false‘ are denoted by the symbols T and F
respectively. Sometimes these are also denoted by the symbols 1 and 0 respectively.
Example 1: Consider the following sentences:

1. Delhi is the capital of India.


2. Kolkata is a country.
3. 5 is a prime number.
4. 2 + 3 = 4.
These are propositions (or statements) because they are either true of false.
Next consider the following sentences:
5. How beautiful are you?
6. Wish you a happy new year
7. x + y = z
8. Take one book.
These are not propositions as they are not declarative in nature, that is, they do not
declare a definite truth value T or F.
Propositional Calculus is also known as statement calculus. It is the branch of
mathematics that is used to describe a logical system or structure. A logical system
consists of (1) a universe of propositions, (2) truth tables (as axioms) for the logical
operators and (3) definitions that explain equivalence and implication of propositions.

Connectives
The words or phrases or symbols which are used to make a proposition by two or more
propositions are called logical connectives or simply connectives. There are five basic
connectives called negation, conjunction, disjunction, conditional and biconditional.
Negation
The negation of a statement is generally formed by writing the word ‗not‘ at a
proper place in the statement (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 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.
Table 1. Truth table for negation
p ¬p
T F
F T

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example 2: Consider the statement p: Kolkata is a city. Then ¬p: Kolkata is not a city.
Although the two statements ‗Kolkata is not a city‘ and ‗It is not the case that Kolkata is a
city‘ are not identical, we have translated both of them by p. The reason is that both these
statements have the same meaning.

Conjunction
The conjunction of two statements (or propositions) p and q is the statement p ∧ q which is
read as ‗p and q‘. The statement p ∧ q has the truth value T whenever both p and q have the truth
value T. Otherwise it has truth value F.

Table 2. Truth table for conjunction

p q p∧ q

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

Example 3: Consider the following statements p : It is


raining today.
q : There are 10 chairs in the room.
Then p ∧ q : It is raining today and there are 10 chairs in the room.
Note: Usually, in our everyday language the conjunction ‗and‘ is used between two statements
which have some kind of relation. Thus a statement ‗It is raining today and 1 + 1 = 2‘ sounds odd,
but in logic it is a perfectly acceptable statement formed from the statements ‗It is raining today‘
and ‗1 + 1 = 2‘.
Example 4: Translate the following statement:

‗Jack and Jill went up the hill‘ into symbolic form using conjunction.
Solution: Let p : Jack went up the hill, q : Jill went up the hill.
Then the given statement can be written in symbolic form as p ∧ q.

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.

Table 3: Truth table for disjunction

p q p∨ q

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

Example 5: Consider the following statements p : I shall go to the game.

q : I shall watch the game on television.

5
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Then p ∨ q : I shall go to the game or watch the game on television.

Conditional proposition
If p and q are any two statements (or propositions) then the statement p → q which is read as,
‗If p, then q‘ is called a conditional statement (or proposition) or implication and the connective
is the conditional connective.

The conditional is defined by the following table:

Table 4. Truth table for conditional

p q p→q

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

In this conditional statement, p is called the hypothesis or premise or antecedent and q is


called the consequence or conclusion.

To understand better, this connective can be looked as a conditional promise. If the promise
is violated (broken), the conditional (implication) is false. Otherwise it is true. For this reason, the
only circumstances under which the conditional p → q is false is when p is true and q is false.

Example 6: Translate the following statement:

‘The crop will be destroyed if there is a flood’ into symbolic form using conditional
connective.

Solution: Let c : the crop will be destroyed; f : there is a flood.


Let us rewrite the given statement as
‗If there is a flood, then the crop will be destroyed‘. So, the symbolic form of the given
statement is f → c.

Example 7: Let p and q denote the statements:

p : You drive over 70 km per hour.


q : You get a speeding ticket.

Write the following statements into symbolic forms.

(i) You will get a speeding ticket if you drive over 70 km per hour.

(ii) Driving over 70 km per hour is sufficient for getting a speeding ticket.

(iii) If you do not drive over 70 km per hour then you will not get a speeding ticket.
(iv) Whenever you get a speeding ticket, you drive over 70 km per hour.
6
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Solution: (i) p → q (ii) p → q (iii) p → q (iv) q → p.

Notes: 1. In ordinary language, it is customary to assume some kind of relationship between


the antecedent and the consequent in using the conditional. But in logic, the antecedent and the

7
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

consequent in a conditional statement are not required to refer to the same subject matter. For
example, the statement ‗If I get sufficient money then I shall purchase a high-speed computer‘
sounds reasonable. On the other hand, a statement such as ‗If I purchase a computer then this pen is
red‘ does not make sense in our conventional language. But according to the definition of
conditional, this proposition is perfectly acceptable and has a truth-value which depends on the
truth-values of the component statements.

2. Some of the alternative terminologies used to express p → q (if p, then q) are the
following: (i) p implies q

(ii) p only if q (‗If p, then q‘ formulation emphasizes the antecedent, whereas ‗p only if q‘
formulation emphasizes the consequent. The difference is only stylistic.)

(iii) q if p, or q when p.

(iv) q follows from p, or q whenever p.

(v) p is sufficient for q, or a sufficient condition for q is p. (vi) q is necessary for p, or a necessary
condition for p is q. (vii) q is consequence of p.
Converse, Inverse and Contrapositive
If P → Q is a conditional statement, then
(1). Q → P is called its converse

(2). ¬P → ¬Q is called its inverse


(3). ¬Q → ¬P is called its contrapositive.
Truth table for Q → P (converse of P → Q)
P Q Q→P
T T T
T F T
F T F
F F T
Truth table for ¬P → ¬Q (inverse of P → Q)
P Q ¬P ¬Q ¬P → ¬Q
T T F F T
T F F T T
F T T F F
F F T T T
Truth table for ¬Q → ¬P (contrapositive of P → Q)

P Q ¬Q ¬P ¬Q → ¬P
T T F F T
T F T F F
F T F T T
F F T T T

8
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Consider the statement

P : It rains.
Q: The crop will grow.
The implication P → Q states that
R: If it rains then the crop will grow.
The converse of the implication P → Q, namely Q → P sates that S: If
the crop will grow then there has been rain.
The inverse of the implication P → Q, namely ¬P → ¬Q sates that

U: If it does not rain then the crop will not grow.


The contraposition of the implication P → Q, namely ¬Q → ¬P states that T : If
the crop do not grow then there has been no rain.

Example 9: Construct the truth table for (p → q) ∧ (q →p)


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

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

Biconditional proposition
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 table of p↔q is given by the following table:


Table 6. Truth table for biconditional
p q p↔q
T T T
T F F
F T F
F F T

It may be noted that p q is true only when both p and q are true or when both p and q are
false. Observe that p q is true when both the conditionals p → q and q → p are true, i.e., the truth-
values of (p → q) ∧ (q → p), given in Ex. 9, are identical to the truth-values of p q defined here.

Note: The notation p ↔ q is also used instead of p↔q.

TAUTOLOGY AND CONTRADICTION

Tautology: A statement formula which is true regardless of the truth values of the
statements which replace the variables in it is called a universally valid formula or a logical
truth or a tautology.

Contradiction: A statement formula which is false regardless of the truth values of the
statements which replace the variables in it is said to be a contradiction.

9
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Contingency: A statement formula which is neither a tautology nor a contradiction is known


as a contingency.

10
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Substitution Instance
A formula A is called a substitution instance of another formula B if A can be obtained form
B by substituting formulas for some variables of B, with the condition that the same formula
is substituted for the same variable each time it occurs.
Example: Let B : P → (J ∧ P ).

Substitute R↔S for P in B, we get

(i): (R ↔ S) → (J ∧ (R ↔ S))

Then A is a substitution instance of B.


Note that (R ↔ S) → (J ∧P) is not a substitution instance of B because the variables
P in J ∧ P was not replaced by R ↔ S.

Equivalence of Formulas
Two formulas A and B are said to equivalent to each other if and only if A↔ B is a
tautology.
If A↔B is a tautology, we write A ⇔ B which is read as A is equivalent to B.
Note : 1. ⇔ is only symbol, but not connective.
2. A ↔ B is a tautology if and only if truth tables of A and B are the same.
3. Equivalence relation is symmetric and transitive.

Method I. Truth Table Method: One method to determine whether any two statement
formulas are equivalent is to construct their truth tables.
Example: Prove P ∨ Q ⇔ ¬(¬P ∧ ¬Q).
Solution:
P Q P∨Q ¬P ¬Q ¬P ∧ ¬Q ¬(¬P ∧ ¬Q) (P ∨ Q) ⇔ ¬(¬P ∧ ¬Q)
T T T F F F T T
T F T F T F T T
F T T T F F T T
F F F T T T F T

As P ∨ Q ¬(¬P ∧ ¬Q) is a tautology, then P ∨ Q ⇔ ¬(¬P ∧ ¬Q).


Example: Prove (P → Q) ⇔ (¬P ∨ Q).

Solution:

P Q P→Q ¬P ¬P ∨ Q (P → Q) (¬P ∨ Q)
T T T F T T
T F F F F T
F T T T T T
F F T T T T

As (P → Q) (¬P ∨ Q) is a tautology then (P → Q) ⇔ (¬P ∨ Q).


11
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Equivalence Formulas:
1. Idempotent laws:
(a) P ∨ P ⇔ P (b) P ∧ P ⇔ P
2. Associative laws:

(a) (P ∨ Q) ∨ R ⇔ P ∨ (Q ∨ R) (b) (P ∧ Q) ∧ R ⇔ P ∧ (Q ∧ R)

3. Commutative laws:

(a) P ∨ Q ⇔ Q ∨ P (b) P ∧ Q ⇔ Q ∧ P
4. Distributive laws:
P ∨ (Q ∧ R) ⇔ (P ∨ Q) ∧ (P ∨ R) P ∧ (Q ∨ R) ⇔ (P ∧ Q) ∨ (P ∧ R)

5. Identity laws:
(a) (i) P ∨ F ⇔ P (ii) P ∨ T ⇔ T
(b) (i) P ∧ T ⇔ P (ii) P ∧ F ⇔ F
6. Component laws:

(a) (i) P ∨ ¬P ⇔ T (ii) P ∧ ¬P ⇔ F .


(b) (i) ¬¬P ⇔ P (ii) ¬T ⇔ F , ¬F ⇔ T
7. Absorption laws:

(a) P ∨ (P ∧ Q) ⇔ P (b) P ∧ (P ∨ Q) ⇔ P

8. Demorgan‘s laws:

(a) ¬(P ∨ Q) ⇔ ¬P ∧ ¬Q (b) ¬(P ∧ Q) ⇔ ¬P ∨ ¬Q

Method II. Replacement Process: Consider a formula A : P → (Q → R). The formula Q → R is a part
of the formula A. If we replace Q → R by an equivalent formula ¬Q∨R in A, we get another
formula B : P → (¬Q∨R). One can easily verify that the formulas A and B are equivalent to each
other. This process of obtaining B from A as the replacement process.

Example: Prove that P → (Q → R) ⇔ P → (¬Q ∨ R) ⇔ (P ∧ Q) → R.(May. 2010)


Solution: P → (Q → R) ⇔ P → (¬Q ∨ R) [∵ Q → R ⇔ ¬Q ∨ R]

⇔ ¬P ∨ (¬Q ∨ R) [∵ P → Q ⇔ ¬P ∨ Q]

⇔ (¬P ∨ ¬Q) ∨ R [by Associative laws]

⇔ ¬(P ∧ Q) ∨ R [by De Morgan‘s laws]

⇔ (P ∧ Q) → R[∵ P → Q ⇔ ¬P ∨ Q].

Example: Prove that (P → Q) ∧ (R → Q) ⇔ (P ∨ R) → Q.


Solution: (P → Q) ∧ (R → Q) ⇔ (¬P ∨ Q) ∧ (¬R ∨ Q)

12
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

⇔ (¬P ∧ ¬R) ∨ Q ⇔

¬(P ∨ R) ∨ Q ⇔ P ∨

R→Q

13
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Prove that P → (Q → P ) ⇔ ¬P → (P → Q).


Solution: P→ (Q → P ) ⇔ ¬P ∨ (Q → P )

⇔ ¬P ∨ (¬Q ∨ P )

⇔ (¬P ∨ P ) ∨ ¬Q

⇔ T ∨ ¬Q

⇔T

and
¬P → (P → Q) ⇔ ¬(¬P ) ∨ (P → Q)

⇔ P ∨ (¬P ∨ Q) ⇔

(P ∨ ¬P ) ∨ Q ⇔ T

∨Q

⇔T

So, P → (Q → P ) ⇔ ¬P → (P → Q).

***Example: Prove that (¬P ∧ (¬Q ∧ R)) ∨ (Q ∧ R) ∨ (P ∧ R) ⇔ R. (Nov. 2009)


Solution:

(¬P ∧ (¬Q ∧ R)) ∨ (Q ∧ R) ∨ (P ∧ R)

⇔ ((¬P ∧ ¬Q) ∧ R) ∨ ((Q ∨ P ) ∧ R) [Associative and Distributive laws]

⇔ (¬(P ∨ Q) ∧ R) ∨ ((Q ∨ P ) ∧ R) [De Morgan‘s laws]

⇔ (¬(P ∨ Q) ∨ (P ∨ Q)) ∧ R [Distributive laws]

⇔T∧ R [∵ ¬P ∨ P ⇔ T ]

⇔R

**Example: Show ((P ∨ Q) ∧ ¬(¬P ∧ (¬Q ∨ ¬R))) ∨ (¬P ∧ ¬Q) ∨ (¬P ∧ ¬R) is tautology.
Solution: By De Morgan‘s laws, we have

¬P ∧ ¬Q ⇔ ¬(P ∨ Q)

¬P ∨ ¬R ⇔ ¬(P ∧ R)

Therefore
14
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Also (¬P ∧ ¬Q) ∨ (¬P ∧ ¬R) ⇔ ¬(P ∨ Q) ∨ ¬(P ∧ R)

⇔ ¬((P ∨ Q) ∧ (P ∨ R))

¬(¬P ∧ (¬Q ∨ ¬R)) ⇔ ¬(¬P ∧ ¬(Q ∧ R))

⇔ P ∨ (Q ∧ R)

⇔ (P ∨ Q) ∧ (P ∨ R)

Hence ((P ∨ Q) ∧ ¬(¬P ∧ (¬Q ∨ ¬R))) ⇔ (P ∨ Q) ∧ (P ∨ Q) ∧ (P ∨ R)

⇔ (P ∨ Q) ∧ (P ∨ R)

Thus ((P ∨ Q) ∧ ¬(¬P ∧ (¬Q ∨ ¬R))) ∨ (¬P ∧ ¬Q) ∨ (¬P ∧ ¬R)

15
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

⇔ [(P ∨ Q) ∧ (P ∨ R)] ∨ ¬[(P ∨ Q) ∧ (P ∨ R)]

⇔T

Hence the given formula is a tautology.


Example: Show that (P ∧ Q) → (P ∨ Q) is a tautology. (Nov. 2009)
Solution: (P ∧ Q) → (P ∨ Q) ⇔ ¬(P ∧ Q) ∨ (P ∨ Q) [∵ P → Q ⇔ ¬P ∨ Q]

⇔ (¬P ∨ ¬Q) ∨ (P ∨ Q) [by De Morgan‘s laws]

⇔ (¬P ∨ P ) ∨ (¬Q ∨ Q) [by Associative laws and commutative


laws]

⇔ (T ∨ T )[by negation laws]

⇔T

Hence, the result.

Example: Write the negation of the following statements.


(a). Jan will take a job in industry or go to graduate school.
(b). James will bicycle or run tomorrow.
(c). If the processor is fast then the printer is slow.
Solution: (a). Let P : Jan will take a job in industry.
Q: Jan will go to graduate school.
The given statement can be written in the symbolic as P ∨ Q.
The negation of P ∨ Q is given by ¬(P ∨ Q).
¬(P ∨ Q) ⇔ ¬P ∧ ¬Q.

¬P ∧ ¬Q: Jan will not take a job in industry and he will not go to graduate school.
(b). Let P : James will bicycle.
Q: James will run tomorrow.
The given statement can be written in the symbolic as P ∨ Q.
The negation of P ∨ Q is given by ¬(P ∨ Q).
¬(P ∨ Q) ⇔ ¬P ∧ ¬Q.

¬P ∧ ¬Q: James will not bicycle and he will not run tomorrow.
(c). Let P : The processor is fast.
Q: The printer is slow.
The given statement can be written in the symbolic as P → Q.

The negation of P → Q is given by ¬(P → Q).

¬(P → Q) ⇔ ¬(¬P ∨ Q) ⇔ P ∧ ¬Q. P


∧ ¬Q: The processor is fast and the printer is fast.
Example: Use Demorgans laws to write the negation of each statement.
(a). I want a car and worth a cycle.
16
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(b). My cat stays outside or it makes a mess.


(c). I‘ve fallen and I can‘t get up.
(d). You study or you don‘t get a good grade.
Solution: (a). I don‘t want a car or not worth a cycle.
(b). My cat not stays outside and it does not make a mess.

17
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(c). I have not fallen or I can get up.


(d). You can not study and you get a good grade.
Exercises: 1. Write the negation of the following statements.
(a). If it is raining, then the game is canceled.
(b). If he studies then he will pass the examination.
Are (p → q) → r and p → (q → r) logically equivalent? Justify your answer by using the
rules of logic to simply both expressions and also by using truth tables. Solution: (p → q) →
r and p → (q → r) are not logically equivalent because
Method I: Consider
(p → q) → r ⇔ (¬p ∨ q) → r

⇔ ¬(¬p ∨ q) ∨ r ⇔

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

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

⇔ ¬p ∨ (¬q ∨ r) ⇔

¬p ∨ ¬q ∨ r.

Method II: (Truth Table Method)


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

Here the truth values (columns) of (p → q) → r and p → (q → r) are not identical.

Consider the statement: ‖If you study hard, then you will excel‖. Write its converse,
contra positive and logical negation in logic.

Duality Law
Two formulas A and A∗ are said to be 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. If the
18
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

formula A contains the special variable T or F , then A∗, its dual is obtained by replacing T by F and
F by T in addition to the above mentioned interchanges.
Example: Write the dual of the following formulas:

19
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(i). (P ∨ Q) ∧ R (ii). (P ∧ Q) ∨ T (iii). (P ∧ Q) ∨ (P ∨ ¬(Q ∧ ¬S))

Solution: The duals of the formulas may be written as


(i). (P ∧ Q) ∨ R (ii). (P ∨ Q) ∧ F (iii). (P ∨ Q) ∧ (P ∧ ¬(Q ∨ ¬S))

Result 1: The negation of the formula is equivalent to its dual in which every variable
is replaced by its negation.
We can prove

¬A(P1, P2, ..., Pn) ⇔ A∗(¬P1, ¬P2, ..., ¬Pn)

Example: Prove that (a). ¬(P ∧ Q) → (¬P ∨ (¬P ∨ Q)) ⇔ (¬P ∨ Q) (b).
(P ∨ Q) ∧ (¬P ∧ (¬P ∧ Q)) ⇔ (¬P ∧ Q)

Solution: (a).¬(P ∧ Q) → (¬P ∨ (¬P ∨ Q)) ⇔ (P ∧ Q) ∨ (¬P ∨ (¬P ∨ Q)) [∵ P → Q ⇔ ¬P ∨ Q]

⇔ (P ∧ Q) ∨ (¬P ∨ Q)

⇔ (P ∧ Q) ∨ ¬P ∨ Q

⇔ ((P∧ Q) ∨ ¬P )) ∨ Q

⇔ ((P ∨ ¬P ) ∧ (Q ∨ ¬P )) ∨ Q

⇔ (T ∧ (Q ∨ ¬P )) ∨ Q

⇔ (Q ∨ ¬P ) ∨ Q

⇔ Q ∨ ¬P

⇔ ¬P ∨ Q

(b). From (a)


(P ∧ Q) ∨ (¬P ∨ (¬P ∨ Q)) ⇔ ¬P ∨ Q
Writing the dual

(P ∨ Q) ∧ (¬P ∧ (¬P ∧ Q)) ⇔ (¬P ∧ Q)

Tautological Implications
A statement formula A is said to tautologically imply a statement B if and only if A → B
is a tautology.
In this case we write A ⇒ B, which is read as ‘A implies B‘.
Note: ⇒ is not a connective, A ⇒ B is not a statement formula.
A ⇒ B states that A → B is tautology.

20
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Clearly A ⇒ B guarantees that B has a truth value T whenever A has the truth value T .
One can determine whether A ⇒ B by constructing the truth tables of A and B in the same manner as
was done in the determination of A ⇔ B. Example: Prove that (P → Q) ⇒ (¬Q → ¬P ).

21
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Solution:

P Q ¬P ¬Q P→Q ¬Q → ¬P (P → Q) → (¬Q → ¬P )
T T F F T T T
T F F T F F T
F T T F T T T
F F T T T T T

Since all the entries in the last column are true, (P → Q) → (¬Q → ¬P ) is a
tautology.
Hence (P → Q) ⇒ (¬Q → ¬P ).

In order to show any of the given implications, it is sufficient to show that an


assignment of the truth value T to the antecedent of the corresponding condi-

tional leads to the truth value T for the consequent. This procedure guarantees that the
conditional becomes tautology, thereby proving the implication.

Example: Prove that ¬Q ∧ (P → Q) ⇒ ¬P .

Solution: Assume that the antecedent ¬Q ∧ (P → Q) has the truth value T , then both ¬Q and P →
Q have the truth value T , which means that Q has the truth value F , P → Q has the truth value T .
Hence P must have the truth value F .
Therefore the consequent ¬P must have the truth value T.
¬Q ∧ (P → Q) ⇒ ¬P .

Another method to show A ⇒ B is to assume that the consequent B has the truth value F and then
show that this assumption leads to A having the truth value F . Then A → B must have the truth
value T .
Example: Show that ¬(P → Q) ⇒ P .

Solution: Assume that P has the truth value F . When P has F , P → Q has T , then ¬(P → Q) has F

. Hence ¬(P → Q) → P has T .

¬(P → Q) ⇒ P

Other Connectives
We introduce the connectives NAND, NOR which have useful applications in the design of
computers.
NAND: The word NAND is a combination of ‘NOT‘ and ‘AND‘ where ‘NOT‘ stands for negation
and ‘AND‘ for the conjunction. It is denoted by the symbol ↑.
If P and Q are two formulas then
P ↑ Q ⇔ ¬(P ∧ Q)
The connective ↑ has the following equivalence:

P ↑ P ⇔ ¬(P ∧ P ) ⇔ ¬P ∨ ¬P ⇔ ¬P .
22
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(P ↑ Q) ↑ (P ↑ Q) ⇔ ¬(P ↑ Q) ⇔ ¬(¬(P ∧ Q)) ⇔ P ∧ Q.


(P ↑ P ) ↑ (Q ↑ Q) ⇔ ¬P ↑ ¬Q ⇔ ¬(¬P ∧ ¬Q) ⇔ P ∨ Q.

NAND is Commutative: Let P and Q be any two statement formulas.


(P ↑ Q) ⇔ ¬(P ∧ Q)

⇔ ¬(Q ∧ P ) ⇔
(Q ↑ P )

∴ NAND is commutative.
NAND is not Associative: Let P , Q and R be any three statement formulas.
Consider ↑ (Q ↑ R) ⇔ ¬(P ∧ (Q ↑ R)) ⇔ ¬(P ∧ (¬(Q ∧ R)))

⇔ ¬P ∨ (Q ∧ R))

(P ↑ Q) ↑ R ⇔ ¬(P ∧ Q) ↑ R

⇔ ¬(¬(P ∧ Q) ∧ R) ⇔

(P ∧ Q) ∨ ¬R

Therefore the connective ↑ is not associative.


NOR: The word NOR is a combination of ‘NOT‘ and ‘OR‘ where ‘NOT‘ stands for negation and
‗OR‘ for the disjunction. It is denoted by the symbol ↓.
If P and Q are two formulas then
P ↓ Q ⇔ ¬(P ∨ Q)
The connective ↓ has the following equivalence:

P ↓ P ⇔ ¬(P ∨ P ) ⇔ ¬P ∧ ¬P ⇔ ¬P .

(P ↓ Q) ↓ (P ↓ Q) ⇔ ¬(P ↓ Q) ⇔ ¬(¬(P ∨ Q)) ⇔ P ∨ Q.


(P ↓ P ) ↓ (Q ↓ Q) ⇔ ¬P ↓ ¬Q ⇔ ¬(¬P ∨ ¬Q) ⇔ P ∧ Q.

NOR is Commutative: Let P and Q be any two statement formulas.


(P ↓ Q) ⇔ ¬(P ∨ Q)

⇔ ¬(Q ∨ P ) ⇔

(Q ↓ P )

∴ NOR is commutative.
NOR is not Associative: Let P , Q and R be any three statement formulas. Consider
P↓ (Q ↓ R) ⇔ ¬(P ∨ (Q ↓ R))

⇔ ¬(P ∨ (¬(Q ∨ R)))

23
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

⇔ ¬P ∧ (Q ∨ R)
(P ↓ Q) ↓ R ⇔ ¬(P ∨ Q) ↓
R

⇔ ¬(¬(P ∨ Q) ∨ R) ⇔

(P ∨ Q) ∧ ¬R

Therefore the connective ↓ is not associative.

Evidently, P ↑ Q and P ↓ Q are duals of each other.

Since

24
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

¬(P ∧ Q) ⇔ ¬P ∨ ¬Q

¬(P ∨ Q) ⇔ ¬P ∧ ¬Q.

Example: Express P ↓ Q interms of ↑ only.


Solution:
↓ Q ⇔ ¬(P ∨ Q)

⇔ (P ∨ Q) ↑ (P ∨ Q)

⇔ [(P ↑ P ) ↑ (Q ↑ Q)] ↑ [(P ↑ P ) ↑ (Q ↑ Q)]

Example: Express P ↑ Q interms of ↓ only. (May-


2012) Solution: ↑ Q ⇔ ¬(P ∧ Q)

⇔ (P ∧ Q) ↓ (P ∧ Q)

⇔ [(P ↓ P ) ↓ (Q ↓ Q)] ↓ [(P ↓ P ) ↓ (Q ↓ Q)]

Truth Tables
Example: Show that (A ⊕ B) ∨ (A ↓ B) ⇔ (A ↑ B). (May-2012)
Solution: We prove this by constructing truth table.
A B A⊕B A↓B (A ⊕ B) ∨ (A ↓ B) A↑B
T T F F F F
T F T F T T
F T T F T T
F F F T T T
As columns (A ⊕ B) ∨ (A ↓ B) and (A ↑ B) are identical.

∴ (A ⊕ B) ∨ (A ↓ B) ⇔ (A ↑ B).

Normal Forms
n
If a given statement formula A(p1, p2, ...pn) involves n atomic variables, we have 2
possible combinations of truth values of statements replacing the variables.
The formula A is a tautology if A has the truth value T for all possible assignments of the
truth values to the variables p1, p2, ...pn and A is called a contradiction if A has the truth
value F for all possible assignments of the truth values of the n variables. A is said to be satis
able if A has the truth value T for atleast one combination of truth values assigned to p1, p2,
...pn.
The problem of determining whether a given statement formula is a Tautology, or a
Contradiction is called a decision problem.
The construction of truth table involves a finite number of steps, but the construc-tion
may not be practical. We therefore reduce the given statement formula to normal form and
find whether a given statement formula is a Tautology or Contradiction or atleast satisfiable.
It will be convenient to use the word ‖product‖ in place of ‖conjunction‖ and ‖sum‖ in
25
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

place of ‖disjunction‖ in our current discussion.

26
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

A product of the variables and their negations in a formula is called an elementary


product. Similarly, a sum of the variables and their negations in a formula is called an
elementary sum.
Let P and Q be any atomic variables. Then P , ¬P ∧Q, ¬Q∧P ¬P , P ¬P , and Q ∧ ¬P

are some examples of elementary products. On the other hand, P , ¬P ∨ Q, ¬Q ∨ P ∨ ¬P , P

∨ ¬P , and Q ∨ ¬P are some examples of elementary sums.

Any part of an elementary sum or product which is itself an elementary sum or product is
called a factor of the original elementary sum or product. Thus ¬Q,∧ ¬P , and ¬Q ∧ P are
some of the factors of ¬Q ∧ P ∧ ¬P .

Disjunctive Normal Form (DNF)

A formula which is equivalent to a given formula and which consists of a sum of elementary
products is called a disjunctive normal form of the given formula.

Example: Obtain disjunctive normal forms of


(a) P ∧ (P → Q); (b) ¬(P ∨ Q) ↔ (P ∧ Q).

Solution: (a) We have


P ∧ (P → Q) ⇔ P ∧ (¬P ∨ Q)

⇔ (P ∧ ¬P ) ∨ (P ∧ Q)

(b) ¬(P ∨ Q) ↔(P ∧ Q)

⇔ (¬(P ∨ Q) ∧ (P ∧ Q)) ∨ ((P ∨ Q) ∧ ¬(P ∧ Q)) [using

R↔ S ⇔ (R ∧ S) ∨ (¬R ∧ ¬S)

⇔ ((¬P ∧ ¬Q) ∧ (P ∧ Q)) ∨ ((P ∨ Q) ∧ (¬P ∨ ¬Q))

⇔ (¬P ∧ ¬Q ∧ P ∧ Q) ∨ ((P ∨ Q) ∧ ¬P ) ∨ ((P ∨ Q) ∧ ¬Q)

⇔ (¬P ∧ ¬Q ∧ P ∧ Q) ∨ (P ∧ ¬P ) ∨ (Q ∧ ¬P ) ∨ (P ∧ ¬Q) ∨ (Q ∧ ¬Q) which

is the required disjunctive normal form.

Note: The DNF of a given formula is not unique.

Conjunctive Normal Form (CNF)


A formula which is equivalent to a given formula and which consists of a product of elementary
sums is called a conjunctive normal form of the given formula.

The method for obtaining conjunctive normal form of a given formula is similar to the one
27
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

given for disjunctive normal form. Again, the conjunctive normal form is not unique.

28
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Obtain conjunctive normal forms of


(a) P ∧ (P → Q); (b) ¬(P ∨ Q)↔ (P ∧ Q).

Solution: (a). P ∧ (P → Q) ⇔ P ∧ (¬P ∨ Q)


(b).¬(P ∨ Q)↔ (P ∧ Q)

⇔ (¬(P ∨ Q) → (P ∧ Q)) ∧ ((P ∧ Q) → ¬(P ∨ Q))

⇔ ((P ∨ Q) ∨ (P ∧ Q)) ∧ (¬(P ∧ Q) ∨ ¬(P ∨ Q))

⇔ [(P ∨ Q ∨ P ) ∧ (P ∨ Q ∨ Q)] ∧ [(¬P ∨ ¬Q) ∨ (¬P ∧ ¬Q)]

⇔ (P ∨ Q ∨ P ) ∧ (P ∨ Q ∨ Q) ∧ (¬P ∨ ¬Q ∨ ¬P ) ∧ (¬P ∨ ¬Q ∨ ¬Q)

Note: A given formula is tautology if every elementary sum in CNF is tautology.


Example: Show that the formula Q ∨ (P ∧ ¬Q) ∨ (¬P ∧ ¬Q) is a tautology.
Solution: First we obtain a CNF of the given formula.
Q ∨ (P ∧ ¬Q) ∨ (¬P ∧ ¬Q) ⇔ Q ∨ ((P ∨ ¬P ) ∧ ¬Q)

⇔ (Q ∨ (P ∨ ¬P )) ∧ (Q ∨ ¬Q)

⇔ (Q ∨ P ∨ ¬P ) ∧ (Q ∨ ¬Q)
Since each of the elementary sum is a tautology, hence the given formula is tautology.

Principal Disjunctive Normal Form


In this section, we will discuss the concept of principal disjunctive normal form (PDNF).

Minterm: For a given number of variables, the minterm consists of conjunctions in which each
statement variable or its negation, but not both, appears only once.
Let P and Q be the two statement variables. Then there are 2 minterms given by P ∧ Q, P ∧ ¬Q,
2

¬P ∧ Q, and ¬P ∧ ¬Q.

Minterms for three variables P , Q and R are P ∧ Q ∧ R, P ∧ Q ∧ ¬R, P ∧ ¬Q ∧ R,P∧ ¬Q ∧ ¬R, ¬P

∧ Q ∧ R, ¬P ∧ Q ∧ ¬R, ¬P ∧ ¬Q ∧ R and ¬P ∧ ¬Q ∧ ¬R. From the truth tables of these minterms of


P and Q, it is clear that

P Q P∧Q P ∧ ¬Q ¬P ∧ Q ¬P ∧ ¬Q
T T T F F F
T F F T F F
F T F F T F
F F F F F T

(i). no two minterms are equivalent


(ii). Each minterm has the truth value T for exactly one combination of the truth values of the
29
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

variables P and Q.
Definition: For a given formula, an equivalent formula consisting of disjunctions of minterms only
is called the Principal disjunctive normal form of the formula.
The principle disjunctive normal formula is also called the sum-of-products canonical form.

30
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Methods to obtain PDNF of a given formula

(a). By Truth table:


(i). Construct a truth table of the given formula.
(ii). For every truth value T in the truth table of the given formula, select the minterm which
also has the value T for the same combination of the truth values of P and Q.
(iii). The disjunction of these minterms will then be equivalent to the given formula.

Example: Obtain the PDNF of P → Q.


Solution: From the truth table of P → Q
P Q P→Q Minterm

T T T P ∧Q
T F F P ∧ ¬Q
F T T ¬P ∧ Q
F F T ¬P ∧ ¬Q

The PDNF of P → Q is (P ∧ Q) ∨ (¬P ∧ Q) ∨ (¬P ∧ ¬Q).

∴ P → Q ⇔ (P ∧ Q) ∨ (¬P ∧ Q) ∨ (¬P ∧ ¬Q).


Example: Obtain the PDNF for (P ∧ Q) ∨ (¬P ∧ R) ∨ (Q ∧ R).
Solution:

P Q R Minterm P∧Q ¬P ∧ R Q∧R (P ∧ Q) ∨ (¬P ∧ R) ∨ (Q ∧ R)

T T T P∧Q∧R T F T T
T T F P ∧ Q ∧ ¬R T F F T
T F T P ∧ ¬Q ∧ R F F F F
T F F P ∧ ¬Q ∧ ¬R F F F F
F T T ¬P ∧ Q ∧ R F T T T
F T F ¬P ∧ Q ∧ ¬R F F F F
F F T ¬P ∧ ¬Q ∧ R F T F T
F F F ¬P ∧ ¬Q ∧ ¬R F F F F

The PDNF of (P ∧ Q) ∨ (¬P ∧ R) ∨ (Q ∧ R) is

(P ∧ Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (¬P ∧ Q ∧ R) ∨ (¬P ∧ ¬Q ∧ R).

(b). Without constructing the truth table:

In order to obtain the principal disjunctive normal form of a given formula is con-
structed as follows:

31
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(1). First replace →, by their equivalent formula containing only ∧, ∨ and ¬.


(2). Next, negations are applied to the variables by De Morgan‘s laws followed by the
application of distributive laws.
(3). Any elementarily product which is a contradiction is dropped. Minterms are ob-tained in
the disjunctions by introducing the missing factors. Identical minterms appearing in the
disjunctions are deleted.

Example: Obtain the principal disjunctive normal form of


(a) ¬P∨ Q; (b) (P ∧ Q) ∨ (¬P ∧ R) ∨ (Q ∧ R).

Solution:
(a) ¬P ∨ Q ⇔ (¬P ∧ T ) ∨ (Q ∧ T ) [∵ A ∧ T ⇔ A]

⇔ (¬P ∧ (Q ∨ ¬Q)) ∨ (Q ∧ (P ∨ ¬P )) [∵ P ∨ ¬P ⇔ T ]

⇔ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) ∨ (Q ∧ P ) ∨ (Q ∧ ¬P )

[∵ P ∧ (Q ∨ R) ⇔ (P ∧ Q) ∨ (P ∧ R)

⇔ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) ∨ (P ∧ Q) [∵ P ∨ P ⇔ P ]


(b) (P ∧ Q) ∨ (¬P ∧ R) ∨ (Q ∧ R)

⇔ (P ∧ Q ∧ T ) ∨ (¬P ∧ R ∧ T ) ∨ (Q ∧ R ∧ T )

⇔ (P ∧ Q ∧ (R ∨ ¬R)) ∨ (¬P ∧ R ∧ (Q ∨ ¬Q)) ∨ (Q ∧ R ∧ (P ∨ ¬P ))

⇔ (P ∧ Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (¬P ∧ R ∧ Q)(¬P ∧ R ∧ ¬Q)

∨ (Q ∧ R ∧ P ) ∨ (Q ∧ R ∧ ¬P )

⇔ (P ∧ Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (¬P ∧ Q ∧ R) ∨ (¬P ∧ ¬Q ∧ R)

P ∨ (P ∧ Q) ⇔ P

P ∨ (¬P ∧ Q) ⇔ P ∨ Q

Solution: We write the principal disjunctive normal form of each formula and com-pare these
normal forms.
(a) P ∨ (P ∧ Q) ⇔ (P ∧ T ) ∨ (P ∧ Q) [∵ P ∧ Q ⇔ P ]

⇔ (P ∧ (Q ∨ ¬Q)) ∨ (P ∧ Q) [∵ P ∨ ¬P ⇔ T ]

⇔ ((P ∧ Q) ∨ (P ∧ ¬Q)) ∨ (P ∧ Q) [by distributive laws]

⇔ (P ∧ Q) ∨ (P ∧ ¬Q) [∵ P ∨ P ⇔ P ]
which is the required PDNF.

32
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Now, ⇔ P ∧T

⇔ P ∧ (Q ∨ ¬Q)

⇔ (P ∧ Q) ∨ (P ∧ ¬Q)
which is the required PDNF.

Hence, P ∨ (P ∧ Q) ⇔ P .

33
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(b) P ∨ (¬P ∧ Q) ⇔ (P ∧ T ) ∨ (¬P ∧ Q)

⇔ (P ∧ (Q ∨ ¬Q)) ∨ (¬P ∧ Q)

⇔ (P ∧ Q) ∨ (P ∧ ¬Q) ∨ (¬P ∧ Q)
which is the required PDNF.

Now,
P ∨ Q ⇔ (P ∧ T ) ∨ (Q ∧ T )

⇔ (P ∧ (Q ∨ ¬Q)) ∨ (Q ∧ (P ∨ ¬P ))

⇔ (P ∧ Q) ∨ (P ∧ ¬Q) ∨ (Q ∧ P ) ∨ (Q ∧ ¬P )

⇔ (P ∧ Q) ∨ (P ∧ ¬Q) ∨ (¬P ∧ Q)
which is the required PDNF.

Hence, P ∨ (¬P ∧ Q) ⇔ P ∨ Q.

Example: Obtain the principal disjunctive normal form of

P → ((P → Q) ∧ ¬(¬Q ∨ ¬P )). (Nov. 2011)


Solution: Using P → Q ⇔ ¬P ∨ Q and De Morgan‘s law, we obtain

→ ((P → Q) ∧ ¬(¬Q ∨ ¬P )) ⇔ ¬P

∨ ((¬P ∨ Q) ∧ (Q ∧ P ))

⇔ ¬P ∨ ((¬P ∧ Q ∧ P ) ∨ (Q ∧ Q ∧ P )) ⇔

¬P ∨ F ∨ (P ∧ Q)

⇔ ¬P ∨ (P ∧ Q)

⇔ (¬P ∧ T ) ∨ (P ∧ Q)

⇔ (¬P ∧ (Q ∨ ¬Q)) ∨ (P ∧ Q)

⇔ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) ∨ (P ∧ Q)

Hence (P ∧ Q) ∨ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) is the required PDNF.


34
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Principal Conjunctive Normal Form


The dual of a minterm is called a Maxterm. For a given number of variables, the maxterm consists
of disjunctions in which each variable or its negation, but not both, appears only once. Each of the
maxterm has the truth value F for exactly one com-bination of the truth values of the variables. Now
we define the principal conjunctive normal form.

35
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

For a given formula, an equivalent formula consisting of conjunctions of the max-terms only is
known as its principle conjunctive normal form. This normal form is also called the product-of-sums
canonical form.The method for obtaining the PCNF for a given formula is similar to the one
described previously for PDNF.

Example: Obtain the principal conjunctive normal form of the formula (¬P→R)∧(Q↔P)
Solution:
(¬P → R) ∧ (Q ↔ P )

⇔ [¬(¬P ) ∨ R] ∧ [(Q → P ) ∧ (P → Q)]

⇔ (P ∨ R) ∧ [(¬Q ∨ P ) ∧ (¬P ∨ Q)]

⇔ (P ∨ R ∨ F ) ∧ [(¬Q ∨ P ∨ F ) ∧ (¬P ∨ Q ∨ F )]

⇔ [(P ∨ R) ∨ (Q ∧ ¬Q)] ∧ [¬Q ∨ P ) ∨ (R ∧ ¬R)] ∧ [(¬P ∨ Q) ∨ (R ∧ ¬R)]

⇔ (P ∨ R ∨ Q) ∧ (P ∨ R ∨ ¬Q) ∧ (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) which


is required principal conjunctive normal form.

Note: If the principal disjunctive (conjunctive) normal form of a given formula A containing n
variables is known, then the principal disjunctive (conjunctive) normal form of ¬A will consist of
the disjunction (conjunction) of the remaining minterms (maxterms) which do not appear in the
principal disjunctive (conjunctive) normal form of A. From A ⇔ ¬¬A one can obtain the principal
conjunctive (disjunctive) normal form of A by repeated applications of De Morgan‘s laws to the
principal disjunctive (conjunctive) normal form of ¬A.

Example: Find the PDNF form PCNF of S : P ∨ (¬P → (Q ∨ (¬Q → R))).

Solution:
⇔ P ∨ (¬P → (Q ∨ (¬Q → R)))

⇔ P ∨ (¬(¬P ) ∨ (Q ∨ (¬(¬Q) ∨ R))

⇔ P ∨ (P ∨ Q ∨ (Q ∨ R)))

⇔ P ∨ (P ∨ Q ∨ R)

⇔ P ∨ Q ∨R
which is the PCNF.
Now PCNF of ¬S is the conjunction of remaining maxterms, so
36
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

PCNF of ¬S : (P ∨ Q ∨ ¬R) ∧ (P ∨ ¬Q ∨ R) ∧ (P ∨ ¬Q ∨ ¬R) ∧ (¬P ∨ Q ∨ R)

∧ (¬P ∨ Q ∨ ¬R) ∧ (¬P ∨ ¬Q ∨ R) ∧ (¬P ∨ ¬Q ∨ ¬R)


Hence the PDNF of S is

¬(PCNF of ¬S) : (¬P ∧ ¬Q ∧ R) ∨ (¬P ∧ Q ∧ ¬R) ∨ (¬P ∧ Q ∧ R) ∨ (P ∧ ¬Q ∧ ¬R)

∨ ( P ∧ ¬Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (P ∧ Q ∧ R)

37
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Theory of Inference for Statement Calculus


Definition: The main aim of logic is to provide rules of inference to infer a conclusion from
certain premises. The theory associated with rules of inference is known as inference theory .

Definition: If a conclusion is derived from a set of premises by using the accepted rules of
reasoning, then such a process of derivation is called a deduction or a formal proof and the argument
is called a valid argument or conclusion is called a valid conclusion.

Note: Premises means set of assumptions, axioms, hypothesis.

Definition: Let A and B be two statement formulas. We say that ‖B logically follows from A‖ or

‖B is a valid conclusion (consequence) of the premise A‖ iff A → B is a tautology, that is A ⇒ B.


We say that from a set of premises {H1, H2, · · · , Hm}, a conclusion C follows logically iff

H1 ∧ H2 ∧ ... ∧ Hm ⇒ C

(1)

38
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Note: To determine whether the conclusion logically follows from the given premises, we use the
following methods:
 Truth table method
 Without constructing truth table method.

Validity Using Truth Tables


Given a set of premises and a conclusion, it is possible to determine whether the
conclusion logically follows from the given premises by constructing truth tables as follows.

Let P1, P2, · · · , Pn be all the atomic variables appearing in the premises H1, H2, · · · , Hm and
in the conclusion C. If all possible combinations of truth values are assigned to P1, P2, · · · , Pn and if
the truth values of H1, H2, ..., Hm and C are entered in a table. We look for the rows in which all H1,

H2, · · · , Hm have the value T. If, for every such row, C also has the value T, then (1) holds. That is,
the conclusion follows logically.

Alternatively, we look for the rows on which C has the value F. If, in every such row, at
least one of the values of H1, H2, · · · , Hm is F, then (1) also holds. We call such a method a
‗truth table technique‘ for the determination of the validity of a conclusion.

Example: Determine whether the conclusion C follows logically from the premises

H1 and H2.

(a) H1 : P → Q H2 : P C : Q
(b) H1 : P → Q H2 : ¬P C : Q
(c) H1 : P → Q H2 : ¬(P ∧ Q) C : ¬P

(d) H1 : ¬P H2 : P Q C : ¬(P ∧ Q)

(e) H1 : P → Q H2 : Q C : P
Solution: We first construct the appropriate truth table, as shown in table.

P Q P→Q ¬P ¬(P ∧ Q) P Q
T T T F F T
T F F F T F
F T T T T F
F F T T T T

39
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(a) We observe that the first row is the only row in which both the premises have the value T
. The conclusion also has the value T in that row. Hence it is valid.

In (b) the third and fourth rows, the conclusion Q is true only in the third row, but not in
the fourth, and hence the conclusion is not valid.

Similarly, we can show that the conclusions are valid in (c) and (d) but not in (e).
Rules of Inference
The following are two important rules of inferences.

Rule P: A premise may be introduced at any point in the derivation.

Rule T: A formula S may be introduced in a derivation if S is tautologically implied by


one or more of the preceding formulas in the derivation.

Implication Formulas
I1 : P ∧ Q ⇒ P (simplification)

I2 : P ∧ Q ⇒ Q
I3 : P ⇒ P ∨ Q
I4 : Q ⇒ P ∨ Q

I5 : ¬P ⇒ P → Q I6
: Q ⇒ P → Q I7 :
¬(P → Q) ⇒ P

I8 : ¬(P → Q) ⇒ ¬Q

I9 : P, Q ⇒ P ∧ Q
I :
1
¬P, P ∨ Q ⇒ Q (disjunctive syllogism)
I
11 : P, P → Q ⇒ Q (modus ponens)
I
12 : ¬Q, P → Q ⇒ ¬P (modus tollens)
I
13 : P → Q, Q → R ⇒ P → R (hypothetical syllogism)
I
14 : P ∨ Q, P → R, Q → R ⇒ R (dilemma)
Example: Demonstrate that R is a valid inference from the premises P → Q, Q → R, and P .
Solution:
{1} (1) P → Q Rule P
{2} (2) P Rule P,
26
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

{1, 2} (3) Q Rule T, (1), (2), and I13


{4} (4) Q → R Rule P
{1, 2, 4} (5) R Rule T, (3), (4), and I13
Hence the result.

27
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Show that R∨S follows logically from the premises C ∨D, (C ∨D) → ¬H, ¬H → (A ∧

¬B), and (A ∧ ¬B) → (R ∨ S).


Solution:

{1} (1) (C ∨ D) → ¬H Rule P


{2} (2) ¬H → (A ∧ ¬B) Rule P
{1, 2} (3) (C ∨ D) → (A ∧ ¬B) Rule T, (1), (2), and I13
{4} (4) (A ∧ ¬B) → (R ∨ S) Rule P
{1, 2, 4} (5) (C ∨ D) → (R ∨ S) Rule T, (3), (4), and I13
{6} (6) C ∨ D Rule P
{1, 2, 4, 6} (7) R ∨ S Rule T, (5), (6), and I11
Hence the result.

Example: Show that S ∨R is tautologically implied by (P ∨Q)∧(P → R)∧(Q → S).

Solution:

{1} (1) P ∨ Q Rule P


{1} (2) ¬P → Q Rule T, (1) P → Q ⇔ ¬P ∨ Q
{3} (3) Q → S Rule P
{1, 3} (4) ¬P → S Rule T, (2), (3), and I13
{1, 3} (5) ¬S → P Rule T, (4), P → Q ⇔ ¬Q → ¬P
{6} (6) P → R Rule P
{1, 3, 6} (7) ¬S → R Rule T, (5), (6), and I13
{1, 3, 6} (8) S∨R Rule T, (7) and P → Q ⇔ ¬P ∨ Q

Hence the result.

Example: Show that R ∧ (P ∨ Q) is a valid conclusion from the premises P ∨ Q,

Q → R, P → M, and ¬M.

Solution:

{1} (1) P→M Rule P


{2} (2) ¬M Rule P
{1, 2} (3) ¬P Rule T, (1), (2), and I12
{4} (4) P∨Q Rule P
{1, 2, 4} (5) Q Rule T, (3), (4), and I10
{6} (6) Q→R Rule P

28
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

{1, 2, 4, 6} (7) R Rule T, (5), (6), and I11


{1, 2, 4, 6} (8) R ∧ (P ∨ Q) Rule T, (4), (7) and I9
Hence the result.

Example: Show I12 : ¬Q, P → Q ⇒ ¬P .


Solution:

{1} (1) P → Q Rule P


{1} (2) ¬Q → ¬P Rule T, (1), and P → Q ⇔ ¬Q → ¬P
{3} (3) ¬Q Rule P
{1, 3} (4) ¬P Rule T, (2), (3), and I11
Hence the result.

Example: Test the validity of the following argument:

‖If you work hard, you will pass the exam. You did not pass. Therefore, you did not work
hard‖.

Example: Test the validity of the following statements:

‖If Sachin hits a century, then he gets a free car. Sachin does not get a free car.

Therefore, Sachin has not hit a century‖.

Rules of Conditional Proof or Deduction Theorem


We shall now introduce a third inference rule, known as CP or rule of conditional proof.
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.
Rule CP is not new for our purpose her because it follows from the equivalence

29
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(P ∧ R) → S ⇔ P → (R → S)

Let P denote the conjunction of the set of premises and let R be any formula. The above
equivalence states that if R is included as an additional premise and S is derived from P ∧ R, then
R → S can be derived from the premises P alone.

Rule CP is also called the deduction theorem and is generally used if the conclu-sion of the form
R → S. In such cases, R is taken as an additional premise and S is derived from the given
premises and R.

Example: Show that R → S can be derived from the premises P → (Q → S), ¬R ∨ P , and Q.

(Nov. 2011)

Solution: Instead of deriving R → S, we shall include R as an additional premise and show S


first.
{1} (1) ¬R ∨ P Rule P
{2} (2) R Rule P (assumed premise)
{1, 2} (3) P Rule T, (1), (2), and I10
{4} (4) P → (Q → S) Rule P
{1, 2, 4} (5) Q → S Rule T, (3), (4), and I11
{6} (6) Q Rule P
{1, 2, 4, 6} (7) S Rule T, (5), (6), and I11
{1, 2, 4, 6} (8) R→S Rule CP

Example: Show that P → S can be derived from the premises ¬P ∨ Q, ¬Q ∨ R, and R → S.


Solution: We include P as an additional premise and derive S.
{1} (1) ¬P ∨ Q Rule P
{2} (2) P Rule P (assumed premise)
{1, 2} (3) Q Rule T, (1), (2), and I10
{4} (4) ¬Q ∨ R Rule P
{1, 2, 4} (5) R Rule T, (3), (4), and I10
{6} (6) R → S Rule P
{1, 2, 4, 6} (7) S Rule T, (5), (6), and I11
{1, 2, 4, 6} (8) P → S Rule CP
Example: ‗If there was a ball game, then traveling was difficult. If they arrived on time, then
traveling was not difficult. They arrived on time. Therefore, there was no ball game‘. Show that
these statements constitute a valid argument. Solution: Let us indicate the statements as follows:
P : There was a ball game.
Q: Traveling was difficult.
R: They arrived on time.

30
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Hence, the given premises are P → Q, R → ¬Q, and R. The conclusion is ¬P .

{1} (1) R → ¬Q Rule P


{2} (2) R Rule P
{1, 2} (3) ¬Q Rule T, (1), (2), and I11
{4} (4) P → Q Rule P
{4} (5) ¬Q → ¬P Rule T, (4), and P → Q ⇔ ¬Q → ¬P
{1, 2, 4} (6) ¬P Rule T, (3), (5), and I11

Example: By using the method of derivation, show that following statements con-stitute a valid
argument: ‖If A works hard, then either B or C will enjoy. If B enjoys, then A will not work hard.
If D enjoys, then C will not. Therefore, if A works hard, D will not enjoy.

Solution: Let us indicate statements as follows:


Given premises are P → (Q∨R), Q → ¬P , and S → ¬R. The conclusion is P → ¬S. We
include P as an additional premise and derive ¬S.

{1} (1) P Rule P (additional premise)


{2} (2) P → (Q ∨ R) Rule P
{1, 2} (3) Q ∨ R Rule T, (1), (2), and I11
{1, 2} (4) ¬Q → R Rule T, (3) and P → Q ⇔ P ∨ Q
{1, 2} (5) ¬R → Q Rule T, (4), and P → Q ⇔ ¬Q → ¬P
{6} (6) Q → ¬P Rule P
{1, 2, 6} (7) ¬R → ¬P Rule T, (5), (6), and I13
{1, 2, 6} (8) P → R Rule T, (7) and P → Q ⇔ ¬Q → ¬P
{9} (9) S → ¬R Rule P
{9} (10) R → ¬S Rule T, (9) and P → Q ⇔ ¬Q → ¬P
{1, 2, 6, 9} (11) P → ¬S Rule T, (8), (10) and I13
{1, 2, 6, 9} (12) ¬S Rule T, (1), (11) and I11

Example: Determine the validity of the following arguments using propositional logic:
‖Smoking is healthy. If smoking is healthy, then cigarettes are prescribed by physi-
cians. Therefore, cigarettes are prescribed by physicians‖. (May-2012)
Solution: Let us indicate the statements as follows:
P : Smoking is healthy.
Q: Cigarettes are prescribed by physicians.

Hence, the given premises are P , P → Q. The conclusion is Q.


{1} (1) P → Q Rule P

{2} (2) P Rule P


31
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

{1, 2} (3) Q Rule T, (1), (2), and I11

Hence, the given statements constitute a valid argument.

Consistency of Premises
A set of formulas H1, H2, · · · , Hm is said to be consistent if their conjunction has the
truth value T for some assignment of the truth values to the atomic variables appearing in H1,
H2,

· · · , Hm.

If, for every assignment of the truth values to the atomic variables, at least one of
the formulas H1, H2, · · · , Hm is false, so that their conjunction is identically false, then the
formulas H1, H2, · · · , Hm are called inconsistent.

Alternatively, a set of formulas H1, H2, · · · , Hm is inconsistent if their conjunction implies a


contradiction, that is,
H1 ∧ H2 ∧ · · · ∧ Hm ⇒ R ∧ ¬R
where R is any formula.

Example: Show that the following premises are inconsistent:


(1). If Jack misses many classes through illness, then he fails high school.
(2). If Jack fails high school, then he is uneducated.
(3). If Jack reads a lot of books, then he is not uneducated.
(4). Jack misses many classes through illness and reads a lot of books.
Solution: Let us indicate the statements as follows:
E: Jack misses many classes through illness.
S: Jack fails high school.
A: Jack reads a lot of books.
H: Jack is uneducated.
The premises are E → S, S → H, A → ¬H, and E ∧ A.

{1} (1) E → S Rule P


{2} (2) S → H Rule P
{1, 2} (3) E → H Rule T, (1), (2), and I13
{4} (4) A → ¬H Rule P
{4} (5) H → ¬A Rule T, (4), and P → Q ⇔ ¬Q → ¬P
{1, 2, 4} (6) E → ¬A Rule T, (3), (5), and I13
{1, 2, 4} (7) ¬E ∨ ¬A Rule T, (6) and P → Q ⇔ ¬P ∨ Q
{1, 2, 4} (8) ¬(E ∧ A) Rule T, (7), and ¬(P ∧ Q) ⇔ ¬P ∨ ¬Q
{9} (9) E ∧ A Rule P
{1, 2, 4, 9} (10) ¬(E ∧ A) ∧ (E ∧ A) Rule T, (8), (9) and I9

Thus, the given set of premises leads to a contradiction and hence it is inconsistent.

32
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Show that the following set of premises is inconsistent: ‖If the contract is valid, then
John is liable for penalty. If John is liable for penalty, he will go bankrupt. If the bank will loan
him money, he will not go bankrupt. As a matter of fact, the contract is valid, and the bank will
loan him money.‖
Solution: Let us indicate the statements as follows:
V : The contract is valid.
L: John is liable for penalty.
M: Bank will loan him money.
B: John will go bankrupt.

{1} (1) V → L Rule P


{2} (2) L → B Rule P
{1, 2} (3) V → B Rule T, (1), (2), and I13
{4} (4) M → ¬B Rule P
{4} (5) M → ¬M Rule T, (4), and P → Q ⇔ ¬Q → ¬P
{1, 2, 4} (6) V → ¬M Rule T, (3), (5), and I13
{1, 2, 4} (7) ¬V ∨ ¬M Rule T, (6) and P → Q ⇔ ¬P ∨ Q
{1, 2, 4} (8) ¬(V ∧ M) Rule T, (7), and ¬(P ∧ Q) ⇔ ¬P ∨ ¬Q
{9} (9) V ∧ M Rule P
{1, 2, 4, 9} (10) ¬(V ∧ M) ∧ (V ∧ M) Rule T, (8), (9) and I9
Thus, the given set of premises leads to a contradiction and hence it is inconsistent.

Indirect Method of Proof


The method of using the rule of conditional proof and the notion of an
inconsistent set of premises is called the indirect method of proof or proof by
contradiction.

In order to show that a conclusion C follows logically from the premises H1, H2, · · · ,
Hm, we assume that C is false and consider ¬C as an additional premise. If the new set of
premises is inconsistent, so that they imply a contradiction. Therefore, the assump-tion that ¬C is
true does not hold.
Hence, C is true whenever H1, H2, · · · , Hm are true. Thus, C follows logically from
the premises H1, H2, · · · , Hm.

33
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Show that ¬(P ∧ Q) follows from ¬P ∧ ¬Q.

Solution: We introduce ¬¬(P ∧Q) as additional premise and show that this additional premise
leads to a contradiction.

{1} (1) ¬¬(P ∧ Q) Rule P (assumed)


{1} (2) P ∧ Q Rule T, (1), and ¬¬P ⇔ P
{1} (3) P Rule T, (2), and I1
{4} (4) ¬P ∧ ¬Q Rule P
{4} (5) ¬P Rule T, (4), and I1
{1, 4} (6) P ∧ ¬P Rule T, (3), (5), and I9
Hence, our assumption is wrong.
Thus, ¬(P ∧ Q) follows from ¬P ∧ ¬Q.

Example: Using the indirect method of proof, show that


P → Q, Q → R, ¬(P ∧ R), P ∨ R ⇒ R.

Solution: We include ¬R as an additional premise. Then we show that this leads to a


contradiction.

{1} (1) P → Q Rule P


{2} (2) Q → R Rule P
{1, 2} (3) P → R Rule T, (1), (2), and I13
{4} (4) ¬R Rule P (assumed)
{1, 2, 4} (5) ¬P Rule T, (4), and I12
{6} (6) P ∨ R Rule P
{1, 2, 4, 6} (7) R Rule T, (5), (6) and I10
{1, 2, 4, 6} (8) R ∧ ¬R Rule T, (4), (7), and I9
Hence, our assumption is wrong.

Example: Show that the following set of premises are inconsistent, using proof by contradiction
P → (Q ∨ R), Q → ¬P, S → ¬R, P ⇒ P → ¬S.

Solution: We include ¬(P → ¬S) as an additional premise. Then we show that this leads to a
contradiction.
∴ ¬(P → ¬S) ⇔ ¬(¬P ∨ ¬S) ⇔ P ∧ S.

{1} (1) P → (Q ∨ R) Rule P


{2} (2) P Rule P
{1, 2} (3) Q ∨ R Rule T, (1), (2), and Modus Ponens
{4} (4) P ∧ S Rule P (assumed)
34
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

{1, 2, 4} (5) S Rule T, (4), and P ∧ Q ⇒ P

35
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

{6} (6) S → ¬R Rule P


{1, 2, 4, 6} (7) ¬R Rule T, (5), (6) and Modus Ponens
{1, 2, 4, 6} (8) Q Rule T, (3), (7), and P ∧ Q, ¬Q ⇒ P
{9} (9) Q → ¬P Rule P
{1, 2, 4, 6} (10) ¬P Rule T, (8), (9), and P ∧ Q, ¬Q ⇒ P
{1, 2, 4, 6} (11) P ∧ ¬P Rule T, (2), (10), and P, Q ⇒ P ∧ Q
{1, 2, 4, 6} (12) F Rule T, (11), and P ∧ ¬P ⇔ F
Hence, it is proved that the given premises are inconsistent.

The Predicate Calculus


Predicate
A part of a declarative sentence describing the properties of an object is called a
predicate. The logic based upon the analysis of predicate in any statement is called
predicate logic.
Consider two statements:
John is a bachelor
Smith is a bachelor.
In each statement ‖is a bachelor‖ is a predicate. Both John and Smith have the same
property of being a bachelor. In the statement logic, we require two diff erent symbols to
express them and these symbols do not reveal the common property of these statements.
In predicate calculus these statements can be replaced by a single statement ‖x is a
bachelor‖. A predicate is symbolized by a capital letters which is followed by the list of
variables. The list of variables is enclosed in parenthesis. If P stands for the predicate ‖is
a bachelor‖, then P (x) stands for ‖x is a bachelor‖,where x is a predicate variable.
`The domain for P (x) : x is a bachelor, can be taken as the set of all human
names. Note that P (x) is not a statement, but just an expression. Once a value is assigned
to x, P (x) becomes a statement and has the truth value. If x is Ram, then P (x) is a
statement and its truth value is true.

Quantifiers
Quantifiers: Quantifiers are words that are refer to quantities such as ‘some‘ or ‘all‘.
Universal Quantifier: The phrase ‘forall‘ (denoted by ∀) is called the universal quantifier.
For example, consider the sentence ‖All human beings are mortal‖.
Let P (x) denote ‘x is a mortal‘.
Then, the above sentence can be written
as (∀x ∈ S)P (x) or ∀xP (x)

where S denote the set of all human beings.


∀x represents each of the following phrases, since they have essentially the same for all x
For every x
For each x.

Existential Quantifier: The phrase ‘there exists‘ (denoted by ∃) is called the exis-tential
quantifier.

36
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

For example, consider the sentence


2
‖There exists x such that x = 5.
This sentence can be written as
(∃x ∈ R)P (x) or (∃x)P (x),
2
where P (x) : x = 5.

∃x represents each of the following phrases


There exists an x
There is an x
For some x
There is at least one x.

Example: Write the following statements in symbolic form:


(i). Something is good
(ii). Everything is good
(iii). Nothing is good
(iv). Something is not good.
Solution: Statement (i) means ‖There is atleast one x such that, x is good‖.
Statement (ii) means ‖Forall x, x is good‖.
Statement (iii) means, ‖Forall x, x is not good‖.
Statement (iv) means, ‖There is atleast one x such that, x is not good.
Thus, if G(x) : x is good, then
statement (i) can be denoted by (∃x)G(x)
statement (ii) can be denoted by (∀x)G(x)
statement (iii) can be denoted by (∀x)¬G(x)
statement (iv) can be denoted by (∃x)¬G(x).
Example: Let K(x) : x is a man
L(x) : x is mortal

M(x) : x is an integer
N(x) : x either positive or negative
Express the following using quantifiers:
 All men are mortal
 Any integer is either positive or negative.
Solution: (a) The given statement can be written as
for all x, if x is a man, then x is mortal and this can be expressed as
(x)(K(x) → L(x)).
(b) The given statement can be written as
for all x, if x is an integer, then x is either positive or negative and this can be expressed
as (x)(M(x) → N(x)).

37
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Free and Bound Variables


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. Any occurrence of x in an x-bound part of the formula is
called a bound occurrence of x, while any occurrence of x or of any variable that is not a
bound occurrence is called a free occurrence. The smallest formula immediately
following (∀x) or (∃x) is called the scope of the quantifier.
Consider the following formulas:

 (x)P (x, y)
 (x)(P (x) → Q(x))
 (x)(P (x) → (∃y)R(x, y))
 (x)(P (x) → R(x)) ∨ (x)(R(x) → Q(x))
 (∃x)(P (x) ∧ Q(x))
 (∃x)P (x) ∧ Q(x).
In (1), P (x, y) is the scope of the quantifier, and occurrence of x is bound occurrence,
while the occurrence of y is free occurrence.

In (2), the scope of the universal quantifier is P (x) → Q(x), and all concrescences 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
R(x) → Q(x). All occurrences of x are bound occurrences.

In (5), the scope (∃x) is P (x) ∧ Q(x).

In (6), the scope of (∃x) is P (x) and the last of occurrence of x in Q(x) is free.

Negations of Quantified Statements


(i). ¬(x)P (x) ⇔ (∃x)¬P (x)

(ii). ¬(∃x)P (x) ⇔ (x)(¬P (x)).

Example: Let P (x) denote the statement ‖x is a professional athlete‖ and let Q(x) denote the
statement ‖x plays soccer‖. The domain is the set of all people.
(a). Write each of the following proposition in English.
 (x)(P (x) → Q(x)
 (∃x)(P (x) ∧ Q(x))
 (x)(P (x) ∨ Q(x))
(b). Write the negation of each of the above propositions, both in symbols and in words.
Solution:
(a). (i). For all x, if x is an professional athlete then x plays soccer.
‖All professional athletes plays soccer‖ or ‖Every professional athlete plays
soccer‖.
(ii). There exists an x such that x is a professional athlete and x plays soccer.
38
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

‖Some professional athletes paly soccer‖.


(iii). For all x, x is a professional athlete or x plays soccer.
‖Every person is either professional athlete or plays soccer‖.

(b). (i). In symbol: We know that


¬(x)(P (x) → Q(x)) ⇔ (∃x)¬(P (x) → Q(x)) ⇔ (∃x)¬(¬(P (x)) ∨ Q(x))

⇔ (∃x)(P (x) ∧ ¬Q(x))

There exists an x such that, x is a professional athlete and x does not paly soccer.
In words: ‖Some professional athlete do not play soccer‖.
(ii). ¬(∃x)(P (x) ∧ Q(x)) ⇔ (x)(¬P (x) ∨ ¬Q(x))

In words: ‖Every people is neither a professional athlete nor plays soccer‖ or All people
either not a professional athlete or do not play soccer‖.
(iii). ¬(x)(P (x) ∨ Q(x)) ⇔ (∃x)(¬P (x) ∧ ¬Q(x)).

In words: ‖Some people are not professional athlete or do not paly soccer‖.

Inference Theory of the Predicate Calculus


To understand the inference theory of predicate calculus, it is important to be famil-iar
with the following rules:
Rule US: Universal specification or instaniation
(x)A(x) ⇒ A(y)
From (x)A(x), one can conclude A(y).

Rule ES: Existential specification


(∃x)A(x) ⇒ A(y)
From (∃x)A(x), one can conclude A(y).

Rule EG: Existential generalization


A(x) ⇒ (∃y)A(y)
From A(x), one can conclude (∃y)A(y).

Rule UG: Universal generalization


A(x) ⇒ (y)A(y)
From A(x), one can conclude (y)A(y).

Equivalence formulas:
E31 : (∃x)[A(x) ∨ B(x)] ⇔ (∃x)A(x) ∨ (∃x)B(x)

E32 : (x)[A(x) ∧ B(x)] ⇔ (x)A(x) ∧ (x)B(x)

E33 : ¬(∃x)A(x) ⇔ (x)¬A(x)

E34 : ¬(x)A(x) ⇔ (∃x)¬A(x)

E35 : (x)(A ∨ B(x)) ⇔ A ∨ (x)B(x)


39
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

E36 : (∃x)(A ∧ B(x)) ⇔ A ∧ (∃x)B(x)

E37 : (x)A(x) → B ⇔ (x)(A(x) → B)

E38 : (∃x)A(x) → B ⇔ (x)(A(x) → B)

E39 : A → (x)B(x) ⇔ (x)(A → B(x))

40
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

E40 : A → (∃x)B(x) ⇔ (∃x)(A → B(x))

E41 : (∃x)(A(x) → B(x)) ⇔ (x)A(x) → (∃x)B(x)

E42 : (∃x)A(x) → (x)B(X) ⇔ (x)(A(x) → B(X)).

Example: Verify the validity of the following arguments:


‖All men are mortal. Socrates is a man. Therefore, Socrates is mortal‖.
or
Show that (x)[H(x) → M(x)] ∧ H(s) ⇒ M(s).

Solution: Let us represent the statements as follows:


H(x) : x is a man
M(x) : x is a mortal
s : Socrates

Thus, we have to show that (x)[H(x) → M(x)] ∧ H(s) ⇒ M(s).

{1} (1) (x)[H(x) → M(x)] Rule P


{1} (2) H(s) → M(s) Rule US, (1)
{3} (3) H(s) Rule P
{1, 3} (4) M(s) Rule T, (2), (3), and I11

Example: Establish the validity of the following argument:‖All integers are ratio-nal numbers.
Some integers are powers of 2. Therefore, some rational numbers are powers of 2‖.
Solution: Let P (x) : x is an integer
R(x) : x is rational number
S(x) : x is a power of 2
Hence, the given statements becomes

(x)(P (x) → R(x)), (∃x)(P (x) ∧ S(x)) ⇒ (∃x)(R(x) ∧ S(x))


Solution:

{1} (1) (∃x)(P (x) ∧ S(x)) Rule P


{1} (2) P (y) ∧ S(y) Rule ES, (1)
{1} (3) P (y) Rule T, (2) and P ∧ Q ⇒ P
{1} (4) S(y) Rule T, (2) and P ∧ Q ⇒ Q
{5} (5) (x)(P (x) → R(x)) Rule P
{5} (6) P (y) → R(y) Rule US, (5)
{1, 5} (7) R(y) Rule T, (3), (6) and P, P → Q ⇒ Q
{1, 5} (8) R(y) ∧ S(y) Rule T, (4), (7) and P, Q ⇒ P ∧ Q
{1, 5} (9) (∃x)(R(x) ∧ S(x)) Rule EG, (8)
41
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Hence, the given statement is valid.

42
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Show that (x)(P (x) → Q(x)) ∧ (x)(Q(x) → R(x)) ⇒ (x)(P (x) → R(x)).
Solution:

{1} (1) (x)(P (x) → Q(x)) Rule P


{1} (2) P (y) → Q(y) Rule US, (1)
{3} (3) (x)(Q(x) → R(x)) Rule P
{3} (4) Q(y) → R(y) Rule US, (3)
{1, 3} (5) P (y) → R(y) Rule T, (2), (4), and I13
{1, 3} (6) (x)(P (x) → R(x)) Rule UG, (5)
Example: Show that (∃x)M(x) follows logically from the premises
(x)(H(x) → M(x)) and (∃x)H(x).
Solution:

{1} (1) (∃x)H(x) Rule P


{1} (2) H(y) Rule ES, (1)
{3} (3) (x)(H(x) → M(x)) Rule P
{3} (4) H(y) → M(y) Rule US, (3)
{1, 3} (5) M(y) Rule T, (2), (4), and I11
{1, 3} (6) (∃x)M(x) Rule EG, (5)
Hence, the result.
Example: Show that (∃x)[P (x) ∧ Q(x)] ⇒ (∃x)P (x) ∧ (∃x)Q(x).
Solution:

{1} (1) (∃x)(P (x) ∧ Q(x)) Rule P


{1} (2) P (y) ∧ Q(y) Rule ES, (1)
{1} (3) P (y) Rule T, (2), and I1
{1} (4) (∃x)P (x) Rule EG, (3)
{1} (5) Q(y) Rule T, (2), and I2
{1} (6) (∃x)Q(x) Rule EG, (5)
{1} (7) (∃x)P (x) ∧ (∃x)Q(x) Rule T, (4), (5) and I9
Hence, the result.
Note: Is the converse true?

{1} (1) (∃x)P (x) ∧ (∃x)Q(x) Rule P


{1} (2) (∃x)P (x) Rule T, (1) and I1
{1} (3) (∃x)Q(x) Rule T, (1), and I1
{1} (4) P (y) Rule ES, (2)
{1} (5) Q(s) Rule ES, (3)

43
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Here in step (4), y is fixed, and it is not possible to use that variable again in step (5).
Hence, the converse is not true.

Example: Show that from (∃x)[F (x) ∧S(x)] → (y)[M(y) → W (y)] and (∃y)[M(y) ∧ ¬W (y)] the
conclusion (x)[F (x) → ¬S(x)] follows.

{1} (1) (∃y)[M(y) ∧ ¬W (y)] Rule P


{1} (2) [M(z) ∧ ¬W (z)] Rule ES, (1)
{1} (3) ¬[M(z) → W (z)] Rule T, (2), and ¬(P → Q) ⇔ P ∧ ¬Q

{1} (4) (∃y)¬[M(y) → W (y)] Rule EG, (3)

{1} (5) ¬(y)[M(y) → W (y)] Rule T, (4), and ¬(x)A(x) ⇔ (∃x)¬A(x)

{1} (6) (∃x)[F (x) ∧ S(x)] → (y)[M(y) → W (y)]Rule P

{1, 6} (7) ¬(∃x)[F (x) ∧ S(x)] Rule T, (5), (6) and I12

{1, 6} (8) (x)¬[F (x)∧S(x)] Rule T, (7), and ¬(x)A(x) ⇔ (∃x)¬A(x)

{1, 6} (9) ¬[F (z) ∧ S(z)] Rule US, (8)

{1, 6} (10) ¬F (z) ∨ ¬S(z) Rule T, (9), and De Morgan‘s laws

{1, 6} (11) F (z) → ¬S(z) Rule T, (10), and P → Q ⇔ ¬P ∨ Q

{1, 6} (12) (x)(F (x) → ¬S(x)) Rule UG, (11)

Hence, the result.


Example: Show that (x)(P (x) ∨ Q(x)) ⇒ (x)P (x) ∨ (∃x)Q(x). (May. 2012)
Solution: We shall use the indirect method of proof by assuming ¬((x)P (x)∨(∃x)Q(x)) as an
additional premise.

{1} (1) ¬((x)P (x) ∨ (∃x)Q(x)) Rule P (assumed)


{1} (2) ¬(x)P (x) ∧ ¬(∃x)Q(x) Rule T, (1) ¬(P ∨ Q) ⇔ ¬P ∧ ¬Q
{1} (3) ¬(x)P (x) Rule T, (2), and I1
{1} (4) (∃x)¬P (x) Rule T, (3), and ¬(x)A(x) ⇔ (∃x)¬A(x)
{1} (5) ¬(∃x)Q(x) Rule T, (2), and I2
{1} (6) (x)¬Q(x) Rule T, (5), and ¬(∃x)A(x) ⇔ (x)¬A(x)
{1} (7) ¬P (y) Rule ES, (5), (6) and I12
{1} (8) ¬Q(y) Rule US, (6)
{1} (9) ¬P (y) ∧ ¬Q(y) Rule T, (7), (8)and I9

44
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

{1} (10) ¬(P (y) ∨ Q(y)) Rule T, (9), and ¬(P ∨ Q) ⇔ ¬P ∧ ¬Q


{11} (11) (x)(P (x) ∨ Q(x)) Rule P
{11} (12) (P (y) ∨ Q(y)) Rule US
{1, 11} (13) ¬(P (y) ∨ Q(y)) ∧ (P (y) ∨ Q(y)) Rule T, (10), (11), and I9

{1, 11} (14) F Rule T, and (13)

45
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

which is a his wife.


contradiction.
Hence, the
Thus, we have to show that (x)[P (x) → Q(x)] ∧ P (x) ⇒ Q(y).
statement is
valid.
{1} (1) (x)(P (x) → Q(x)) Rule P
Example:
Using {1} (2) P (y) → Q(y) Rule US, (1)
predicate {1} (3) P (y) Rule P
logic,
prove the {1} (4) Q(y) Rule T, (2), (3), and I11
validity Example: Prove using rules of inference
of the Duke is a Labrador retriever.
following All
argument Labr
: ‖Every ador
husband retri
argues ever
with his like
wife. x is to
a swi
husband. m.
Therefore Ther
, x argues efore
with his Duk
wife‖. e
likes
Solution: Let to
P (x): x is a swi
husband. m.
Solution: We denote
Q L(x): x is a Labrador retriever.
(
x S(x): x likes to swim.
) d: Duke.
:
We need to show that L(d) ∧ (x)(L(x) → S(x)) ⇒ S(d).
x

a {1} (1) (x)(L(x) → S(x)) Rule P


r
{1} (2) L(d) → S(d) Rule US, (1)
g
u {2} (3) L(d) Rule P
e
{1, 2} (4) S(d) Rule T, (2), (3), and I11.
s

w
i
t INTRODUCTION
h

46
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

U I
n Mathematical Logic
i
t


Proposition: A proposition or statement is a declarative sentence which is either
true or false but not both. The truth or falsity of a proposition is called its truth-value.

These two values ‗true‘ and ‗false‘ are denoted by the symbols T and F
respectively. Sometimes these are also denoted by the symbols 1 and 0 respectively.
Example 1: Consider the following sentences:

3. Delhi is the capital of India.


4. Kolkata is a country.
3. 5 is a prime number.
4. 2 + 3 = 4.
These are propositions (or statements) because they are either true of false.
Next consider the following sentences:
9. How beautiful are you?
10. Wish you a happy new year
11. x + y = z
12. Take one book.
These are not propositions as they are not declarative in nature, that is, they do not
declare a definite truth value T or F.
Propositional Calculus is also known as statement calculus. It is the branch of
mathematics that is used to describe a logical system or structure. A logical system
consists of (1) a universe of propositions, (2) truth tables (as axioms) for the logical
operators and (3) definitions that explain equivalence and implication of propositions.

Connectives
The words or phrases or symbols which are used to make a proposition by two or more
propositions are called logical connectives or simply connectives. There are five basic
connectives called negation, conjunction, disjunction, conditional and biconditional.
Negation
The negation of a statement is generally formed by writing the word ‗not‘ at a
proper place in the statement (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 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.
Table 1. Truth table for negation
p ¬p
T F
F T

47
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example 2: Consider the statement p: Kolkata is a city. Then ¬p: Kolkata is not a city.
Although the two statements ‗Kolkata is not a city‘ and ‗It is not the case that Kolkata is a
city‘ are not identical, we have translated both of them by p. The reason is that both these
statements have the same meaning.

Conjunction
The conjunction of two statements (or propositions) p and q is the statement p ∧ q which is
read as ‗p and q‘. The statement p ∧ q has the truth value T whenever both p and q have the truth
value T. Otherwise it has truth value F.

Table 2. Truth table for conjunction

p q p∧ q

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

Example 3: Consider the following statements p : It is


raining today.
q : There are 10 chairs in the room.
Then p ∧ q : It is raining today and there are 10 chairs in the room.
Note: Usually, in our everyday language the conjunction ‗and‘ is used between two statements
which have some kind of relation. Thus a statement ‗It is raining today and 1 + 1 = 2‘ sounds odd,
but in logic it is a perfectly acceptable statement formed from the statements ‗It is raining today‘
and ‗1 + 1 = 2‘.
Example 4: Translate the following statement:

‗Jack and Jill went up the hill‘ into symbolic form using conjunction.
Solution: Let p : Jack went up the hill, q : Jill went up the hill.
Then the given statement can be written in symbolic form as p ∧ q.

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.

Table 3: Truth table for disjunction

p q p∨ q

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

Example 5: Consider the following statements p : I shall go to the game.

q : I shall watch the game on television.

5
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Then p ∨ q : I shall go to the game or watch the game on television.

Conditional proposition
If p and q are any two statements (or propositions) then the statement p → q which is read as,
‗If p, then q‘ is called a conditional statement (or proposition) or implication and the connective
is the conditional connective.

The conditional is defined by the following table:

Table 4. Truth table for conditional

p q p→q

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

In this conditional statement, p is called the hypothesis or premise or antecedent and q is


called the consequence or conclusion.

To understand better, this connective can be looked as a conditional promise. If the promise
is violated (broken), the conditional (implication) is false. Otherwise it is true. For this reason, the
only circumstances under which the conditional p → q is false is when p is true and q is false.

Example 6: Translate the following statement:

‘The crop will be destroyed if there is a flood’ into symbolic form using conditional
connective.

Solution: Let c : the crop will be destroyed; f : there is a flood.


Let us rewrite the given statement as
‗If there is a flood, then the crop will be destroyed‘. So, the symbolic form of the given
statement is f → c.

Example 7: Let p and q denote the statements:

p : You drive over 70 km per hour.


q : You get a speeding ticket.

Write the following statements into symbolic forms.

(v) You will get a speeding ticket if you drive over 70 km per hour.

(vi) Driving over 70 km per hour is sufficient for getting a speeding ticket.

(vii) If you do not drive over 70 km per hour then you will not get a speeding ticket.
(viii) Whenever you get a speeding ticket, you drive over 70 km per hour.
6
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Solution: (i) p → q (ii) p → q (iii) p → q (iv) q → p.

Notes: 1. In ordinary language, it is customary to assume some kind of relationship between


the antecedent and the consequent in using the conditional. But in logic, the antecedent and the

7
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

consequent in a conditional statement are not required to refer to the same subject matter. For
example, the statement ‗If I get sufficient money then I shall purchase a high-speed computer‘
sounds reasonable. On the other hand, a statement such as ‗If I purchase a computer then this pen is
red‘ does not make sense in our conventional language. But according to the definition of
conditional, this proposition is perfectly acceptable and has a truth-value which depends on the
truth-values of the component statements.

3. Some of the alternative terminologies used to express p → q (if p, then q) are the
following: (i) p implies q

(vi) p only if q (‗If p, then q‘ formulation emphasizes the antecedent, whereas ‗p only if q‘
formulation emphasizes the consequent. The difference is only stylistic.)

(vii) q if p, or q when p.

(viii) q follows from p, or q whenever p.

(ix) p is sufficient for q, or a sufficient condition for q is p. (vi) q is necessary for p, or a


necessary condition for p is q. (vii) q is consequence of p.
Converse, Inverse and Contrapositive
If P → Q is a conditional statement, then
(1). Q → P is called its converse

(2). ¬P → ¬Q is called its inverse


(3). ¬Q → ¬P is called its contrapositive.
Truth table for Q → P (converse of P → Q)
P Q Q→P
T T T
T F T
F T F
F F T
Truth table for ¬P → ¬Q (inverse of P → Q)
P Q ¬P ¬Q ¬P → ¬Q
T T F F T
T F F T T
F T T F F
F F T T T
Truth table for ¬Q → ¬P (contrapositive of P → Q)

P Q ¬Q ¬P ¬Q → ¬P
T T F F T
T F T F F
F T F T T
F F T T T

8
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Consider the statement

P : It rains.
Q: The crop will grow.
The implication P → Q states that
R: If it rains then the crop will grow.
The converse of the implication P → Q, namely Q → P sates that S: If
the crop will grow then there has been rain.
The inverse of the implication P → Q, namely ¬P → ¬Q sates that

U: If it does not rain then the crop will not grow.


The contraposition of the implication P → Q, namely ¬Q → ¬P states that T : If
the crop do not grow then there has been no rain.

Example 9: Construct the truth table for (p → q) ∧ (q →p)


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

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

Biconditional proposition
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 table of p↔q is given by the following table:


Table 6. Truth table for biconditional
p q p↔q
T T T
T F F
F T F
F F T

It may be noted that p q is true only when both p and q are true or when both p and q are
false. Observe that p q is true when both the conditionals p → q and q → p are true, i.e., the truth-
values of (p → q) ∧ (q → p), given in Ex. 9, are identical to the truth-values of p q defined here.

Note: The notation p ↔ q is also used instead of p↔q.

TAUTOLOGY AND CONTRADICTION

Tautology: A statement formula which is true regardless of the truth values of the
statements which replace the variables in it is called a universally valid formula or a logical
truth or a tautology.

Contradiction: A statement formula which is false regardless of the truth values of the
statements which replace the variables in it is said to be a contradiction.

9
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Contingency: A statement formula which is neither a tautology nor a contradiction is known


as a contingency.

10
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Substitution Instance
A formula A is called a substitution instance of another formula B if A can be obtained form
B by substituting formulas for some variables of B, with the condition that the same formula
is substituted for the same variable each time it occurs.
Example: Let B : P → (J ∧ P ).

Substitute R↔S for P in B, we get

(i): (R ↔ S) → (J ∧ (R ↔ S))

Then A is a substitution instance of B.


Note that (R ↔ S) → (J ∧P) is not a substitution instance of B because the variables
P in J ∧ P was not replaced by R ↔ S.

Equivalence of Formulas
Two formulas A and B are said to equivalent to each other if and only if A↔ B is a
tautology.
If A↔B is a tautology, we write A ⇔ B which is read as A is equivalent to B.
Note : 1. ⇔ is only symbol, but not connective.
2. A ↔ B is a tautology if and only if truth tables of A and B are the same.
3. Equivalence relation is symmetric and transitive.

Method I. Truth Table Method: One method to determine whether any two statement
formulas are equivalent is to construct their truth tables.
Example: Prove P ∨ Q ⇔ ¬(¬P ∧ ¬Q).
Solution:
P Q P∨Q ¬P ¬Q ¬P ∧ ¬Q ¬(¬P ∧ ¬Q) (P ∨ Q) ⇔ ¬(¬P ∧ ¬Q)
T T T F F F T T
T F T F T F T T
F T T T F F T T
F F F T T T F T

As P ∨ Q ¬(¬P ∧ ¬Q) is a tautology, then P ∨ Q ⇔ ¬(¬P ∧ ¬Q).


Example: Prove (P → Q) ⇔ (¬P ∨ Q).

Solution:

P Q P→Q ¬P ¬P ∨ Q (P → Q) (¬P ∨ Q)
T T T F T T
T F F F F T
F T T T T T
F F T T T T

As (P → Q) (¬P ∨ Q) is a tautology then (P → Q) ⇔ (¬P ∨ Q).


11
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Equivalence Formulas:
7. Idempotent laws:
(a) P ∨ P ⇔ P (b) P ∧ P ⇔ P
8. Associative laws:

(a) (P ∨ Q) ∨ R ⇔ P ∨ (Q ∨ R) (b) (P ∧ Q) ∧ R ⇔ P ∧ (Q ∧ R)

9. Commutative laws:

(a) P ∨ Q ⇔ Q ∨ P (b) P ∧ Q ⇔ Q ∧ P
10. Distributive laws:
P ∨ (Q ∧ R) ⇔ (P ∨ Q) ∧ (P ∨ R) P ∧ (Q ∨ R) ⇔ (P ∧ Q) ∨ (P ∧ R)

11. Identity laws:


(a) (i) P ∨ F ⇔ P (ii) P ∨ T ⇔ T
(b) (i) P ∧ T ⇔ P (ii) P ∧ F ⇔ F
12. Component laws:

(a) (i) P ∨ ¬P ⇔ T (ii) P ∧ ¬P ⇔ F .


(b) (i) ¬¬P ⇔ P (ii) ¬T ⇔ F , ¬F ⇔ T
7. Absorption laws:

(a) P ∨ (P ∧ Q) ⇔ P (b) P ∧ (P ∨ Q) ⇔ P

8. Demorgan‘s laws:

(a) ¬(P ∨ Q) ⇔ ¬P ∧ ¬Q (b) ¬(P ∧ Q) ⇔ ¬P ∨ ¬Q

Method II. Replacement Process: Consider a formula A : P → (Q → R). The formula Q → R is a part
of the formula A. If we replace Q → R by an equivalent formula ¬Q∨R in A, we get another
formula B : P → (¬Q∨R). One can easily verify that the formulas A and B are equivalent to each
other. This process of obtaining B from A as the replacement process.

Example: Prove that P → (Q → R) ⇔ P → (¬Q ∨ R) ⇔ (P ∧ Q) → R.(May. 2010)


Solution: P → (Q → R) ⇔ P → (¬Q ∨ R) [∵ Q → R ⇔ ¬Q ∨ R]

⇔ ¬P ∨ (¬Q ∨ R) [∵ P → Q ⇔ ¬P ∨ Q]

⇔ (¬P ∨ ¬Q) ∨ R [by Associative laws]

⇔ ¬(P ∧ Q) ∨ R [by De Morgan‘s laws]

⇔ (P ∧ Q) → R[∵ P → Q ⇔ ¬P ∨ Q].

Example: Prove that (P → Q) ∧ (R → Q) ⇔ (P ∨ R) → Q.


Solution: (P → Q) ∧ (R → Q) ⇔ (¬P ∨ Q) ∧ (¬R ∨ Q)

12
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

⇔ (¬P ∧ ¬R) ∨ Q ⇔

¬(P ∨ R) ∨ Q ⇔ P ∨

R→Q

13
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Prove that P → (Q → P ) ⇔ ¬P → (P → Q).


Solution: P→ (Q → P ) ⇔ ¬P ∨ (Q → P )

⇔ ¬P ∨ (¬Q ∨ P )

⇔ (¬P ∨ P ) ∨ ¬Q

⇔ T ∨ ¬Q

⇔T

and
¬P → (P → Q) ⇔ ¬(¬P ) ∨ (P → Q)

⇔ P ∨ (¬P ∨ Q) ⇔

(P ∨ ¬P ) ∨ Q ⇔ T

∨Q

⇔T

So, P → (Q → P ) ⇔ ¬P → (P → Q).

***Example: Prove that (¬P ∧ (¬Q ∧ R)) ∨ (Q ∧ R) ∨ (P ∧ R) ⇔ R. (Nov. 2009)


Solution:

(¬P ∧ (¬Q ∧ R)) ∨ (Q ∧ R) ∨ (P ∧ R)

⇔ ((¬P ∧ ¬Q) ∧ R) ∨ ((Q ∨ P ) ∧ R) [Associative and Distributive laws]

⇔ (¬(P ∨ Q) ∧ R) ∨ ((Q ∨ P ) ∧ R) [De Morgan‘s laws]

⇔ (¬(P ∨ Q) ∨ (P ∨ Q)) ∧ R [Distributive laws]

⇔T∧ R [∵ ¬P ∨ P ⇔ T ]

⇔R

**Example: Show ((P ∨ Q) ∧ ¬(¬P ∧ (¬Q ∨ ¬R))) ∨ (¬P ∧ ¬Q) ∨ (¬P ∧ ¬R) is tautology.
Solution: By De Morgan‘s laws, we have

¬P ∧ ¬Q ⇔ ¬(P ∨ Q)

¬P ∨ ¬R ⇔ ¬(P ∧ R)

Therefore
14
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Also (¬P ∧ ¬Q) ∨ (¬P ∧ ¬R) ⇔ ¬(P ∨ Q) ∨ ¬(P ∧ R)

⇔ ¬((P ∨ Q) ∧ (P ∨ R))

¬(¬P ∧ (¬Q ∨ ¬R)) ⇔ ¬(¬P ∧ ¬(Q ∧ R))

⇔ P ∨ (Q ∧ R)

⇔ (P ∨ Q) ∧ (P ∨ R)

Hence ((P ∨ Q) ∧ ¬(¬P ∧ (¬Q ∨ ¬R))) ⇔ (P ∨ Q) ∧ (P ∨ Q) ∧ (P ∨ R)

⇔ (P ∨ Q) ∧ (P ∨ R)

Thus ((P ∨ Q) ∧ ¬(¬P ∧ (¬Q ∨ ¬R))) ∨ (¬P ∧ ¬Q) ∨ (¬P ∧ ¬R)

15
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

⇔ [(P ∨ Q) ∧ (P ∨ R)] ∨ ¬[(P ∨ Q) ∧ (P ∨ R)]

⇔T

Hence the given formula is a tautology.


Example: Show that (P ∧ Q) → (P ∨ Q) is a tautology. (Nov. 2009)
Solution: (P ∧ Q) → (P ∨ Q) ⇔ ¬(P ∧ Q) ∨ (P ∨ Q) [∵ P → Q ⇔ ¬P ∨ Q]

⇔ (¬P ∨ ¬Q) ∨ (P ∨ Q) [by De Morgan‘s laws]

⇔ (¬P ∨ P ) ∨ (¬Q ∨ Q) [by Associative laws and commutative


laws]

⇔ (T ∨ T )[by negation laws]

⇔T

Hence, the result.

Example: Write the negation of the following statements.


(a). Jan will take a job in industry or go to graduate school.
(b). James will bicycle or run tomorrow.
(d). If the processor is fast then the printer is slow.
Solution: (a). Let P : Jan will take a job in industry.
Q: Jan will go to graduate school.
The given statement can be written in the symbolic as P ∨ Q.
The negation of P ∨ Q is given by ¬(P ∨ Q).
¬(P ∨ Q) ⇔ ¬P ∧ ¬Q.

¬P ∧ ¬Q: Jan will not take a job in industry and he will not go to graduate school.
(b). Let P : James will bicycle.
Q: James will run tomorrow.
The given statement can be written in the symbolic as P ∨ Q.
The negation of P ∨ Q is given by ¬(P ∨ Q).
¬(P ∨ Q) ⇔ ¬P ∧ ¬Q.

¬P ∧ ¬Q: James will not bicycle and he will not run tomorrow.
(c). Let P : The processor is fast.
Q: The printer is slow.
The given statement can be written in the symbolic as P → Q.

The negation of P → Q is given by ¬(P → Q).

¬(P → Q) ⇔ ¬(¬P ∨ Q) ⇔ P ∧ ¬Q. P


∧ ¬Q: The processor is fast and the printer is fast.
Example: Use Demorgans laws to write the negation of each statement.
(a). I want a car and worth a cycle.
16
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(b). My cat stays outside or it makes a mess.


(c). I‘ve fallen and I can‘t get up.
(d). You study or you don‘t get a good grade.
Solution: (a). I don‘t want a car or not worth a cycle.
(e). My cat not stays outside and it does not make a mess.

17
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(f). I have not fallen or I can get up.


(g). You can not study and you get a good grade.
Exercises: 1. Write the negation of the following statements.
(a). If it is raining, then the game is canceled.
(b). If he studies then he will pass the examination.
Are (p → q) → r and p → (q → r) logically equivalent? Justify your answer by using the
rules of logic to simply both expressions and also by using truth tables. Solution: (p → q) →
r and p → (q → r) are not logically equivalent because
Method I: Consider
(p → q) → r ⇔ (¬p ∨ q) → r

⇔ ¬(¬p ∨ q) ∨ r ⇔

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

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

⇔ ¬p ∨ (¬q ∨ r) ⇔

¬p ∨ ¬q ∨ r.

Method II: (Truth Table Method)


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

Here the truth values (columns) of (p → q) → r and p → (q → r) are not identical.

Consider the statement: ‖If you study hard, then you will excel‖. Write its converse,
contra positive and logical negation in logic.

Duality Law
Two formulas A and A∗ are said to be 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. If the
18
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

formula A contains the special variable T or F , then A∗, its dual is obtained by replacing T by F and
F by T in addition to the above mentioned interchanges.
Example: Write the dual of the following formulas:

19
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(i). (P ∨ Q) ∧ R (ii). (P ∧ Q) ∨ T (iii). (P ∧ Q) ∨ (P ∨ ¬(Q ∧ ¬S))

Solution: The duals of the formulas may be written as


(i). (P ∧ Q) ∨ R (ii). (P ∨ Q) ∧ F (iii). (P ∨ Q) ∧ (P ∧ ¬(Q ∨ ¬S))

Result 1: The negation of the formula is equivalent to its dual in which every variable
is replaced by its negation.
We can prove

¬A(P1, P2, ..., Pn) ⇔ A∗(¬P1, ¬P2, ..., ¬Pn)

Example: Prove that (a). ¬(P ∧ Q) → (¬P ∨ (¬P ∨ Q)) ⇔ (¬P ∨ Q) (b).
(P ∨ Q) ∧ (¬P ∧ (¬P ∧ Q)) ⇔ (¬P ∧ Q)

Solution: (a).¬(P ∧ Q) → (¬P ∨ (¬P ∨ Q)) ⇔ (P ∧ Q) ∨ (¬P ∨ (¬P ∨ Q)) [∵ P → Q ⇔ ¬P ∨ Q]

⇔ (P ∧ Q) ∨ (¬P ∨ Q)

⇔ (P ∧ Q) ∨ ¬P ∨ Q

⇔ ((P∧ Q) ∨ ¬P )) ∨ Q

⇔ ((P ∨ ¬P ) ∧ (Q ∨ ¬P )) ∨ Q

⇔ (T ∧ (Q ∨ ¬P )) ∨ Q

⇔ (Q ∨ ¬P ) ∨ Q

⇔ Q ∨ ¬P

⇔ ¬P ∨ Q

(b). From (a)


(P ∧ Q) ∨ (¬P ∨ (¬P ∨ Q)) ⇔ ¬P ∨ Q
Writing the dual

(P ∨ Q) ∧ (¬P ∧ (¬P ∧ Q)) ⇔ (¬P ∧ Q)

Tautological Implications
A statement formula A is said to tautologically imply a statement B if and only if A → B
is a tautology.
In this case we write A ⇒ B, which is read as ‘A implies B‘.
Note: ⇒ is not a connective, A ⇒ B is not a statement formula.
A ⇒ B states that A → B is tautology.

20
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Clearly A ⇒ B guarantees that B has a truth value T whenever A has the truth value T .
One can determine whether A ⇒ B by constructing the truth tables of A and B in the same manner as
was done in the determination of A ⇔ B. Example: Prove that (P → Q) ⇒ (¬Q → ¬P ).

21
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Solution:

P Q ¬P ¬Q P→Q ¬Q → ¬P (P → Q) → (¬Q → ¬P )
T T F F T T T
T F F T F F T
F T T F T T T
F F T T T T T

Since all the entries in the last column are true, (P → Q) → (¬Q → ¬P ) is a
tautology.
Hence (P → Q) ⇒ (¬Q → ¬P ).

In order to show any of the given implications, it is sufficient to show that an


assignment of the truth value T to the antecedent of the corresponding condi-

tional leads to the truth value T for the consequent. This procedure guarantees that the
conditional becomes tautology, thereby proving the implication.

Example: Prove that ¬Q ∧ (P → Q) ⇒ ¬P .

Solution: Assume that the antecedent ¬Q ∧ (P → Q) has the truth value T , then both ¬Q and P →
Q have the truth value T , which means that Q has the truth value F , P → Q has the truth value T .
Hence P must have the truth value F .
Therefore the consequent ¬P must have the truth value T.
¬Q ∧ (P → Q) ⇒ ¬P .

Another method to show A ⇒ B is to assume that the consequent B has the truth value F and then
show that this assumption leads to A having the truth value F . Then A → B must have the truth
value T .
Example: Show that ¬(P → Q) ⇒ P .

Solution: Assume that P has the truth value F . When P has F , P → Q has T , then ¬(P → Q) has F

. Hence ¬(P → Q) → P has T .

¬(P → Q) ⇒ P

Other Connectives
We introduce the connectives NAND, NOR which have useful applications in the design of
computers.
NAND: The word NAND is a combination of ‘NOT‘ and ‘AND‘ where ‘NOT‘ stands for negation
and ‘AND‘ for the conjunction. It is denoted by the symbol ↑.
If P and Q are two formulas then
P ↑ Q ⇔ ¬(P ∧ Q)
The connective ↑ has the following equivalence:

P ↑ P ⇔ ¬(P ∧ P ) ⇔ ¬P ∨ ¬P ⇔ ¬P .
22
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(P ↑ Q) ↑ (P ↑ Q) ⇔ ¬(P ↑ Q) ⇔ ¬(¬(P ∧ Q)) ⇔ P ∧ Q.


(P ↑ P ) ↑ (Q ↑ Q) ⇔ ¬P ↑ ¬Q ⇔ ¬(¬P ∧ ¬Q) ⇔ P ∨ Q.

NAND is Commutative: Let P and Q be any two statement formulas.


(P ↑ Q) ⇔ ¬(P ∧ Q)

⇔ ¬(Q ∧ P ) ⇔
(Q ↑ P )

∴ NAND is commutative.
NAND is not Associative: Let P , Q and R be any three statement formulas.
Consider ↑ (Q ↑ R) ⇔ ¬(P ∧ (Q ↑ R)) ⇔ ¬(P ∧ (¬(Q ∧ R)))

⇔ ¬P ∨ (Q ∧ R))

(P ↑ Q) ↑ R ⇔ ¬(P ∧ Q) ↑ R

⇔ ¬(¬(P ∧ Q) ∧ R) ⇔

(P ∧ Q) ∨ ¬R

Therefore the connective ↑ is not associative.


NOR: The word NOR is a combination of ‘NOT‘ and ‘OR‘ where ‘NOT‘ stands for negation and
‗OR‘ for the disjunction. It is denoted by the symbol ↓.
If P and Q are two formulas then
P ↓ Q ⇔ ¬(P ∨ Q)
The connective ↓ has the following equivalence:

P ↓ P ⇔ ¬(P ∨ P ) ⇔ ¬P ∧ ¬P ⇔ ¬P .

(P ↓ Q) ↓ (P ↓ Q) ⇔ ¬(P ↓ Q) ⇔ ¬(¬(P ∨ Q)) ⇔ P ∨ Q.


(P ↓ P ) ↓ (Q ↓ Q) ⇔ ¬P ↓ ¬Q ⇔ ¬(¬P ∨ ¬Q) ⇔ P ∧ Q.

NOR is Commutative: Let P and Q be any two statement formulas.


(P ↓ Q) ⇔ ¬(P ∨ Q)

⇔ ¬(Q ∨ P ) ⇔

(Q ↓ P )

∴ NOR is commutative.
NOR is not Associative: Let P , Q and R be any three statement formulas. Consider
P↓ (Q ↓ R) ⇔ ¬(P ∨ (Q ↓ R))

⇔ ¬(P ∨ (¬(Q ∨ R)))

23
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

⇔ ¬P ∧ (Q ∨ R)
(P ↓ Q) ↓ R ⇔ ¬(P ∨ Q) ↓
R

⇔ ¬(¬(P ∨ Q) ∨ R) ⇔

(P ∨ Q) ∧ ¬R

Therefore the connective ↓ is not associative.

Evidently, P ↑ Q and P ↓ Q are duals of each other.

Since

24
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

¬(P ∧ Q) ⇔ ¬P ∨ ¬Q

¬(P ∨ Q) ⇔ ¬P ∧ ¬Q.

Example: Express P ↓ Q interms of ↑ only.


Solution:
↓ Q ⇔ ¬(P ∨ Q)

⇔ (P ∨ Q) ↑ (P ∨ Q)

⇔ [(P ↑ P ) ↑ (Q ↑ Q)] ↑ [(P ↑ P ) ↑ (Q ↑ Q)]

Example: Express P ↑ Q interms of ↓ only. (May-


2012) Solution: ↑ Q ⇔ ¬(P ∧ Q)

⇔ (P ∧ Q) ↓ (P ∧ Q)

⇔ [(P ↓ P ) ↓ (Q ↓ Q)] ↓ [(P ↓ P ) ↓ (Q ↓ Q)]

Truth Tables
Example: Show that (A ⊕ B) ∨ (A ↓ B) ⇔ (A ↑ B). (May-2012)
Solution: We prove this by constructing truth table.
A B A⊕B A↓B (A ⊕ B) ∨ (A ↓ B) A↑B
T T F F F F
T F T F T T
F T T F T T
F F F T T T
As columns (A ⊕ B) ∨ (A ↓ B) and (A ↑ B) are identical.

∴ (A ⊕ B) ∨ (A ↓ B) ⇔ (A ↑ B).

Normal Forms
n
If a given statement formula A(p1, p2, ...pn) involves n atomic variables, we have 2
possible combinations of truth values of statements replacing the variables.
The formula A is a tautology if A has the truth value T for all possible assignments of the
truth values to the variables p1, p2, ...pn and A is called a contradiction if A has the truth
value F for all possible assignments of the truth values of the n variables. A is said to be satis
able if A has the truth value T for atleast one combination of truth values assigned to p1, p2,
...pn.
The problem of determining whether a given statement formula is a Tautology, or a
Contradiction is called a decision problem.
The construction of truth table involves a finite number of steps, but the construc-tion
may not be practical. We therefore reduce the given statement formula to normal form and
find whether a given statement formula is a Tautology or Contradiction or atleast satisfiable.
It will be convenient to use the word ‖product‖ in place of ‖conjunction‖ and ‖sum‖ in
25
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

place of ‖disjunction‖ in our current discussion.

26
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

A product of the variables and their negations in a formula is called an elementary


product. Similarly, a sum of the variables and their negations in a formula is called an
elementary sum.
Let P and Q be any atomic variables. Then P , ¬P ∧Q, ¬Q∧P ¬P , P ¬P , and Q ∧ ¬P

are some examples of elementary products. On the other hand, P , ¬P ∨ Q, ¬Q ∨ P ∨ ¬P , P

∨ ¬P , and Q ∨ ¬P are some examples of elementary sums.

Any part of an elementary sum or product which is itself an elementary sum or product is
called a factor of the original elementary sum or product. Thus ¬Q,∧ ¬P , and ¬Q ∧ P are
some of the factors of ¬Q ∧ P ∧ ¬P .

Disjunctive Normal Form (DNF)

A formula which is equivalent to a given formula and which consists of a sum of elementary
products is called a disjunctive normal form of the given formula.

Example: Obtain disjunctive normal forms of


(a) P ∧ (P → Q); (b) ¬(P ∨ Q) ↔ (P ∧ Q).

Solution: (a) We have


P ∧ (P → Q) ⇔ P ∧ (¬P ∨ Q)

⇔ (P ∧ ¬P ) ∨ (P ∧ Q)

(b) ¬(P ∨ Q) ↔(P ∧ Q)

⇔ (¬(P ∨ Q) ∧ (P ∧ Q)) ∨ ((P ∨ Q) ∧ ¬(P ∧ Q)) [using

R↔ S ⇔ (R ∧ S) ∨ (¬R ∧ ¬S)

⇔ ((¬P ∧ ¬Q) ∧ (P ∧ Q)) ∨ ((P ∨ Q) ∧ (¬P ∨ ¬Q))

⇔ (¬P ∧ ¬Q ∧ P ∧ Q) ∨ ((P ∨ Q) ∧ ¬P ) ∨ ((P ∨ Q) ∧ ¬Q)

⇔ (¬P ∧ ¬Q ∧ P ∧ Q) ∨ (P ∧ ¬P ) ∨ (Q ∧ ¬P ) ∨ (P ∧ ¬Q) ∨ (Q ∧ ¬Q) which

is the required disjunctive normal form.

Note: The DNF of a given formula is not unique.

Conjunctive Normal Form (CNF)


A formula which is equivalent to a given formula and which consists of a product of elementary
sums is called a conjunctive normal form of the given formula.

The method for obtaining conjunctive normal form of a given formula is similar to the one
27
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

given for disjunctive normal form. Again, the conjunctive normal form is not unique.

28
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Obtain conjunctive normal forms of


(a) P ∧ (P → Q); (b) ¬(P ∨ Q)↔ (P ∧ Q).

Solution: (a). P ∧ (P → Q) ⇔ P ∧ (¬P ∨ Q)


(b).¬(P ∨ Q)↔ (P ∧ Q)

⇔ (¬(P ∨ Q) → (P ∧ Q)) ∧ ((P ∧ Q) → ¬(P ∨ Q))

⇔ ((P ∨ Q) ∨ (P ∧ Q)) ∧ (¬(P ∧ Q) ∨ ¬(P ∨ Q))

⇔ [(P ∨ Q ∨ P ) ∧ (P ∨ Q ∨ Q)] ∧ [(¬P ∨ ¬Q) ∨ (¬P ∧ ¬Q)]

⇔ (P ∨ Q ∨ P ) ∧ (P ∨ Q ∨ Q) ∧ (¬P ∨ ¬Q ∨ ¬P ) ∧ (¬P ∨ ¬Q ∨ ¬Q)

Note: A given formula is tautology if every elementary sum in CNF is tautology.


Example: Show that the formula Q ∨ (P ∧ ¬Q) ∨ (¬P ∧ ¬Q) is a tautology.
Solution: First we obtain a CNF of the given formula.
Q ∨ (P ∧ ¬Q) ∨ (¬P ∧ ¬Q) ⇔ Q ∨ ((P ∨ ¬P ) ∧ ¬Q)

⇔ (Q ∨ (P ∨ ¬P )) ∧ (Q ∨ ¬Q)

⇔ (Q ∨ P ∨ ¬P ) ∧ (Q ∨ ¬Q)
Since each of the elementary sum is a tautology, hence the given formula is tautology.

Principal Disjunctive Normal Form


In this section, we will discuss the concept of principal disjunctive normal form (PDNF).

Minterm: For a given number of variables, the minterm consists of conjunctions in which each
statement variable or its negation, but not both, appears only once.
Let P and Q be the two statement variables. Then there are 2 minterms given by P ∧ Q, P ∧ ¬Q,
2

¬P ∧ Q, and ¬P ∧ ¬Q.

Minterms for three variables P , Q and R are P ∧ Q ∧ R, P ∧ Q ∧ ¬R, P ∧ ¬Q ∧ R,P∧ ¬Q ∧ ¬R, ¬P

∧ Q ∧ R, ¬P ∧ Q ∧ ¬R, ¬P ∧ ¬Q ∧ R and ¬P ∧ ¬Q ∧ ¬R. From the truth tables of these minterms of


P and Q, it is clear that

P Q P∧Q P ∧ ¬Q ¬P ∧ Q ¬P ∧ ¬Q
T T T F F F
T F F T F F
F T F F T F
F F F F F T

(iii). no two minterms are equivalent


(iv). Each minterm has the truth value T for exactly one combination of the truth values of the
29
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

variables P and Q.
Definition: For a given formula, an equivalent formula consisting of disjunctions of minterms only
is called the Principal disjunctive normal form of the formula.
The principle disjunctive normal formula is also called the sum-of-products canonical form.

30
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Methods to obtain PDNF of a given formula

(c). By Truth table:


(i). Construct a truth table of the given formula.
(ii). For every truth value T in the truth table of the given formula, select the minterm which
also has the value T for the same combination of the truth values of P and Q.
(iii). The disjunction of these minterms will then be equivalent to the given formula.

Example: Obtain the PDNF of P → Q.


Solution: From the truth table of P → Q
P Q P→Q Minterm

T T T P ∧Q
T F F P ∧ ¬Q
F T T ¬P ∧ Q
F F T ¬P ∧ ¬Q

The PDNF of P → Q is (P ∧ Q) ∨ (¬P ∧ Q) ∨ (¬P ∧ ¬Q).

∴ P → Q ⇔ (P ∧ Q) ∨ (¬P ∧ Q) ∨ (¬P ∧ ¬Q).


Example: Obtain the PDNF for (P ∧ Q) ∨ (¬P ∧ R) ∨ (Q ∧ R).
Solution:

P Q R Minterm P∧Q ¬P ∧ R Q∧R (P ∧ Q) ∨ (¬P ∧ R) ∨ (Q ∧ R)

T T T P∧Q∧R T F T T
T T F P ∧ Q ∧ ¬R T F F T
T F T P ∧ ¬Q ∧ R F F F F
T F F P ∧ ¬Q ∧ ¬R F F F F
F T T ¬P ∧ Q ∧ R F T T T
F T F ¬P ∧ Q ∧ ¬R F F F F
F F T ¬P ∧ ¬Q ∧ R F T F T
F F F ¬P ∧ ¬Q ∧ ¬R F F F F

The PDNF of (P ∧ Q) ∨ (¬P ∧ R) ∨ (Q ∧ R) is

(P ∧ Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (¬P ∧ Q ∧ R) ∨ (¬P ∧ ¬Q ∧ R).

(d). Without constructing the truth table:

In order to obtain the principal disjunctive normal form of a given formula is con-
structed as follows:

31
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(4). First replace →, by their equivalent formula containing only ∧, ∨ and ¬.


(5). Next, negations are applied to the variables by De Morgan‘s laws followed by the
application of distributive laws.
(6). Any elementarily product which is a contradiction is dropped. Minterms are ob-tained in
the disjunctions by introducing the missing factors. Identical minterms appearing in the
disjunctions are deleted.

Example: Obtain the principal disjunctive normal form of


(a) ¬P∨ Q; (b) (P ∧ Q) ∨ (¬P ∧ R) ∨ (Q ∧ R).

Solution:
(a) ¬P ∨ Q ⇔ (¬P ∧ T ) ∨ (Q ∧ T ) [∵ A ∧ T ⇔ A]

⇔ (¬P ∧ (Q ∨ ¬Q)) ∨ (Q ∧ (P ∨ ¬P )) [∵ P ∨ ¬P ⇔ T ]

⇔ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) ∨ (Q ∧ P ) ∨ (Q ∧ ¬P )

[∵ P ∧ (Q ∨ R) ⇔ (P ∧ Q) ∨ (P ∧ R)

⇔ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) ∨ (P ∧ Q) [∵ P ∨ P ⇔ P ]


(b) (P ∧ Q) ∨ (¬P ∧ R) ∨ (Q ∧ R)

⇔ (P ∧ Q ∧ T ) ∨ (¬P ∧ R ∧ T ) ∨ (Q ∧ R ∧ T )

⇔ (P ∧ Q ∧ (R ∨ ¬R)) ∨ (¬P ∧ R ∧ (Q ∨ ¬Q)) ∨ (Q ∧ R ∧ (P ∨ ¬P ))

⇔ (P ∧ Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (¬P ∧ R ∧ Q)(¬P ∧ R ∧ ¬Q)

∨ (Q ∧ R ∧ P ) ∨ (Q ∧ R ∧ ¬P )

⇔ (P ∧ Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (¬P ∧ Q ∧ R) ∨ (¬P ∧ ¬Q ∧ R)

P ∨ (P ∧ Q) ⇔ P

P ∨ (¬P ∧ Q) ⇔ P ∨ Q

Solution: We write the principal disjunctive normal form of each formula and com-pare these
normal forms.
(a) P ∨ (P ∧ Q) ⇔ (P ∧ T ) ∨ (P ∧ Q) [∵ P ∧ Q ⇔ P ]

⇔ (P ∧ (Q ∨ ¬Q)) ∨ (P ∧ Q) [∵ P ∨ ¬P ⇔ T ]

⇔ ((P ∧ Q) ∨ (P ∧ ¬Q)) ∨ (P ∧ Q) [by distributive laws]

⇔ (P ∧ Q) ∨ (P ∧ ¬Q) [∵ P ∨ P ⇔ P ]
which is the required PDNF.

32
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Now, ⇔ P ∧T

⇔ P ∧ (Q ∨ ¬Q)

⇔ (P ∧ Q) ∨ (P ∧ ¬Q)
which is the required PDNF.

Hence, P ∨ (P ∧ Q) ⇔ P .

33
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(b) P ∨ (¬P ∧ Q) ⇔ (P ∧ T ) ∨ (¬P ∧ Q)

⇔ (P ∧ (Q ∨ ¬Q)) ∨ (¬P ∧ Q)

⇔ (P ∧ Q) ∨ (P ∧ ¬Q) ∨ (¬P ∧ Q)
which is the required PDNF.

Now,
P ∨ Q ⇔ (P ∧ T ) ∨ (Q ∧ T )

⇔ (P ∧ (Q ∨ ¬Q)) ∨ (Q ∧ (P ∨ ¬P ))

⇔ (P ∧ Q) ∨ (P ∧ ¬Q) ∨ (Q ∧ P ) ∨ (Q ∧ ¬P )

⇔ (P ∧ Q) ∨ (P ∧ ¬Q) ∨ (¬P ∧ Q)
which is the required PDNF.

Hence, P ∨ (¬P ∧ Q) ⇔ P ∨ Q.

Example: Obtain the principal disjunctive normal form of

P → ((P → Q) ∧ ¬(¬Q ∨ ¬P )). (Nov. 2011)


Solution: Using P → Q ⇔ ¬P ∨ Q and De Morgan‘s law, we obtain

→ ((P → Q) ∧ ¬(¬Q ∨ ¬P )) ⇔ ¬P

∨ ((¬P ∨ Q) ∧ (Q ∧ P ))

⇔ ¬P ∨ ((¬P ∧ Q ∧ P ) ∨ (Q ∧ Q ∧ P )) ⇔

¬P ∨ F ∨ (P ∧ Q)

⇔ ¬P ∨ (P ∧ Q)

⇔ (¬P ∧ T ) ∨ (P ∧ Q)

⇔ (¬P ∧ (Q ∨ ¬Q)) ∨ (P ∧ Q)

⇔ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) ∨ (P ∧ Q)

Hence (P ∧ Q) ∨ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) is the required PDNF.


34
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Principal Conjunctive Normal Form


The dual of a minterm is called a Maxterm. For a given number of variables, the maxterm consists
of disjunctions in which each variable or its negation, but not both, appears only once. Each of the
maxterm has the truth value F for exactly one com-bination of the truth values of the variables. Now
we define the principal conjunctive normal form.

35
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

For a given formula, an equivalent formula consisting of conjunctions of the max-terms only is
known as its principle conjunctive normal form. This normal form is also called the product-of-sums
canonical form.The method for obtaining the PCNF for a given formula is similar to the one
described previously for PDNF.

Example: Obtain the principal conjunctive normal form of the formula (¬P→R)∧(Q↔P)
Solution:
(¬P → R) ∧ (Q ↔ P )

⇔ [¬(¬P ) ∨ R] ∧ [(Q → P ) ∧ (P → Q)]

⇔ (P ∨ R) ∧ [(¬Q ∨ P ) ∧ (¬P ∨ Q)]

⇔ (P ∨ R ∨ F ) ∧ [(¬Q ∨ P ∨ F ) ∧ (¬P ∨ Q ∨ F )]

⇔ [(P ∨ R) ∨ (Q ∧ ¬Q)] ∧ [¬Q ∨ P ) ∨ (R ∧ ¬R)] ∧ [(¬P ∨ Q) ∨ (R ∧ ¬R)]

⇔ (P ∨ R ∨ Q) ∧ (P ∨ R ∨ ¬Q) ∧ (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) which


is required principal conjunctive normal form.

Note: If the principal disjunctive (conjunctive) normal form of a given formula A containing n
variables is known, then the principal disjunctive (conjunctive) normal form of ¬A will consist of
the disjunction (conjunction) of the remaining minterms (maxterms) which do not appear in the
principal disjunctive (conjunctive) normal form of A. From A ⇔ ¬¬A one can obtain the principal
conjunctive (disjunctive) normal form of A by repeated applications of De Morgan‘s laws to the
principal disjunctive (conjunctive) normal form of ¬A.

Example: Find the PDNF form PCNF of S : P ∨ (¬P → (Q ∨ (¬Q → R))).

Solution:
⇔ P ∨ (¬P → (Q ∨ (¬Q → R)))

⇔ P ∨ (¬(¬P ) ∨ (Q ∨ (¬(¬Q) ∨ R))

⇔ P ∨ (P ∨ Q ∨ (Q ∨ R)))

⇔ P ∨ (P ∨ Q ∨ R)

⇔ P ∨ Q ∨R
which is the PCNF.
Now PCNF of ¬S is the conjunction of remaining maxterms, so
36
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

PCNF of ¬S : (P ∨ Q ∨ ¬R) ∧ (P ∨ ¬Q ∨ R) ∧ (P ∨ ¬Q ∨ ¬R) ∧ (¬P ∨ Q ∨ R)

∧ (¬P ∨ Q ∨ ¬R) ∧ (¬P ∨ ¬Q ∨ R) ∧ (¬P ∨ ¬Q ∨ ¬R)


Hence the PDNF of S is

¬(PCNF of ¬S) : (¬P ∧ ¬Q ∧ R) ∨ (¬P ∧ Q ∧ ¬R) ∨ (¬P ∧ Q ∧ R) ∨ (P ∧ ¬Q ∧ ¬R)

∨ ( P ∧ ¬Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (P ∧ Q ∧ R)

37
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Theory of Inference for Statement Calculus


Definition: The main aim of logic is to provide rules of inference to infer a conclusion from
certain premises. The theory associated with rules of inference is known as inference theory .

Definition: If a conclusion is derived from a set of premises by using the accepted rules of
reasoning, then such a process of derivation is called a deduction or a formal proof and the argument
is called a valid argument or conclusion is called a valid conclusion.

Note: Premises means set of assumptions, axioms, hypothesis.

Definition: Let A and B be two statement formulas. We say that ‖B logically follows from A‖ or

‖B is a valid conclusion (consequence) of the premise A‖ iff A → B is a tautology, that is A ⇒ B.


We say that from a set of premises {H1, H2, · · · , Hm}, a conclusion C follows logically iff

H1 ∧ H2 ∧ ... ∧ Hm ⇒ C

(1)

38
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Note: To determine whether the conclusion logically follows from the given premises, we use the
following methods:
 Truth table method
 Without constructing truth table method.

Validity Using Truth Tables


Given a set of premises and a conclusion, it is possible to determine whether the
conclusion logically follows from the given premises by constructing truth tables as follows.

Let P1, P2, · · · , Pn be all the atomic variables appearing in the premises H1, H2, · · · , Hm and
in the conclusion C. If all possible combinations of truth values are assigned to P1, P2, · · · , Pn and if
the truth values of H1, H2, ..., Hm and C are entered in a table. We look for the rows in which all H1,

H2, · · · , Hm have the value T. If, for every such row, C also has the value T, then (1) holds. That is,
the conclusion follows logically.

Alternatively, we look for the rows on which C has the value F. If, in every such row, at
least one of the values of H1, H2, · · · , Hm is F, then (1) also holds. We call such a method a
‗truth table technique‘ for the determination of the validity of a conclusion.

Example: Determine whether the conclusion C follows logically from the premises

H1 and H2.

(c) H1 : P → Q H2 : P C : Q
(d) H1 : P → Q H2 : ¬P C : Q
(c) H1 : P → Q H2 : ¬(P ∧ Q) C : ¬P

(f) H1 : ¬P H2 : P Q C : ¬(P ∧ Q)

(g) H1 : P → Q H2 : Q C : P
Solution: We first construct the appropriate truth table, as shown in table.

P Q P→Q ¬P ¬(P ∧ Q) P Q
T T T F F T
T F F F T F
F T T T T F
F F T T T T

39
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(c) We observe that the first row is the only row in which both the premises have the value T
. The conclusion also has the value T in that row. Hence it is valid.

In (b) the third and fourth rows, the conclusion Q is true only in the third row, but not in
the fourth, and hence the conclusion is not valid.

Similarly, we can show that the conclusions are valid in (c) and (d) but not in (e).
Rules of Inference
The following are two important rules of inferences.

Rule P: A premise may be introduced at any point in the derivation.

Rule T: A formula S may be introduced in a derivation if S is tautologically implied by


one or more of the preceding formulas in the derivation.

Implication Formulas
I1 : P ∧ Q ⇒ P (simplification)

I2 : P ∧ Q ⇒ Q
I3 : P ⇒ P ∨ Q
I4 : Q ⇒ P ∨ Q

I5 : ¬P ⇒ P → Q I6
: Q ⇒ P → Q I7 :
¬(P → Q) ⇒ P

I8 : ¬(P → Q) ⇒ ¬Q

I9 : P, Q ⇒ P ∧ Q
I :
1
¬P, P ∨ Q ⇒ Q (disjunctive syllogism)
I
11 : P, P → Q ⇒ Q (modus ponens)
I
12 : ¬Q, P → Q ⇒ ¬P (modus tollens)
I
13 : P → Q, Q → R ⇒ P → R (hypothetical syllogism)
I
14 : P ∨ Q, P → R, Q → R ⇒ R (dilemma)
Example: Demonstrate that R is a valid inference from the premises P → Q, Q → R, and P .
Solution:
{1} (1) P → Q Rule P
{2} (2) P Rule P,
26
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

{1, 2} (3) Q Rule T, (1), (2), and I13


{4} (4) Q → R Rule P
{1, 2, 4} (5) R Rule T, (3), (4), and I13
Hence the result.

27
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Show that R∨S follows logically from the premises C ∨D, (C ∨D) → ¬H, ¬H → (A ∧

¬B), and (A ∧ ¬B) → (R ∨ S).


Solution:

{1} (1) (C ∨ D) → ¬H Rule P


{2} (2) ¬H → (A ∧ ¬B) Rule P
{1, 2} (3) (C ∨ D) → (A ∧ ¬B) Rule T, (1), (2), and I13
{4} (4) (A ∧ ¬B) → (R ∨ S) Rule P
{1, 2, 4} (5) (C ∨ D) → (R ∨ S) Rule T, (3), (4), and I13
{6} (6) C ∨ D Rule P
{1, 2, 4, 6} (7) R ∨ S Rule T, (5), (6), and I11
Hence the result.

Example: Show that S ∨R is tautologically implied by (P ∨Q)∧(P → R)∧(Q → S).

Solution:

{1} (1) P ∨ Q Rule P


{1} (2) ¬P → Q Rule T, (1) P → Q ⇔ ¬P ∨ Q
{3} (3) Q → S Rule P
{1, 3} (4) ¬P → S Rule T, (2), (3), and I13
{1, 3} (5) ¬S → P Rule T, (4), P → Q ⇔ ¬Q → ¬P
{6} (6) P → R Rule P
{1, 3, 6} (7) ¬S → R Rule T, (5), (6), and I13
{1, 3, 6} (8) S∨R Rule T, (7) and P → Q ⇔ ¬P ∨ Q

Hence the result.

Example: Show that R ∧ (P ∨ Q) is a valid conclusion from the premises P ∨ Q,

Q → R, P → M, and ¬M.

Solution:

{1} (1) P→M Rule P


{2} (2) ¬M Rule P
{1, 2} (3) ¬P Rule T, (1), (2), and I12
{4} (4) P∨Q Rule P
{1, 2, 4} (5) Q Rule T, (3), (4), and I10
{6} (6) Q→R Rule P

28
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

{1, 2, 4, 6} (7) R Rule T, (5), (6), and I11


{1, 2, 4, 6} (8) R ∧ (P ∨ Q) Rule T, (4), (7) and I9
Hence the result.

Example: Show I12 : ¬Q, P → Q ⇒ ¬P .


Solution:

{1} (1) P → Q Rule P


{1} (2) ¬Q → ¬P Rule T, (1), and P → Q ⇔ ¬Q → ¬P
{3} (3) ¬Q Rule P
{1, 3} (4) ¬P Rule T, (2), (3), and I11
Hence the result.

Example: Test the validity of the following argument:

‖If you work hard, you will pass the exam. You did not pass. Therefore, you did not work
hard‖.

Example: Test the validity of the following statements:

‖If Sachin hits a century, then he gets a free car. Sachin does not get a free car.

Therefore, Sachin has not hit a century‖.

Rules of Conditional Proof or Deduction Theorem


We shall now introduce a third inference rule, known as CP or rule of conditional proof.
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.
Rule CP is not new for our purpose her because it follows from the equivalence

29
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

(P ∧ R) → S ⇔ P → (R → S)

Let P denote the conjunction of the set of premises and let R be any formula. The above
equivalence states that if R is included as an additional premise and S is derived from P ∧ R, then
R → S can be derived from the premises P alone.

Rule CP is also called the deduction theorem and is generally used if the conclu-sion of the form
R → S. In such cases, R is taken as an additional premise and S is derived from the given
premises and R.

Example: Show that R → S can be derived from the premises P → (Q → S), ¬R ∨ P , and Q.

(Nov. 2011)

Solution: Instead of deriving R → S, we shall include R as an additional premise and show S


first.
{1} (1) ¬R ∨ P Rule P
{2} (2) R Rule P (assumed premise)
{1, 2} (3) P Rule T, (1), (2), and I10
{4} (4) P → (Q → S) Rule P
{1, 2, 4} (5) Q → S Rule T, (3), (4), and I11
{6} (6) Q Rule P
{1, 2, 4, 6} (7) S Rule T, (5), (6), and I11
{1, 2, 4, 6} (8) R→S Rule CP

Example: Show that P → S can be derived from the premises ¬P ∨ Q, ¬Q ∨ R, and R → S.


Solution: We include P as an additional premise and derive S.
{1} (1) ¬P ∨ Q Rule P
{2} (2) P Rule P (assumed premise)
{1, 2} (3) Q Rule T, (1), (2), and I10
{4} (4) ¬Q ∨ R Rule P
{1, 2, 4} (5) R Rule T, (3), (4), and I10
{6} (6) R → S Rule P
{1, 2, 4, 6} (7) S Rule T, (5), (6), and I11
{1, 2, 4, 6} (8) P → S Rule CP
Example: ‗If there was a ball game, then traveling was difficult. If they arrived on time, then
traveling was not difficult. They arrived on time. Therefore, there was no ball game‘. Show that
these statements constitute a valid argument. Solution: Let us indicate the statements as follows:
P : There was a ball game.
Q: Traveling was difficult.
R: They arrived on time.

30
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Hence, the given premises are P → Q, R → ¬Q, and R. The conclusion is ¬P .

{1} (1) R → ¬Q Rule P


{2} (2) R Rule P
{1, 2} (3) ¬Q Rule T, (1), (2), and I11
{4} (4) P → Q Rule P
{4} (5) ¬Q → ¬P Rule T, (4), and P → Q ⇔ ¬Q → ¬P
{1, 2, 4} (6) ¬P Rule T, (3), (5), and I11

Example: By using the method of derivation, show that following statements con-stitute a valid
argument: ‖If A works hard, then either B or C will enjoy. If B enjoys, then A will not work hard.
If D enjoys, then C will not. Therefore, if A works hard, D will not enjoy.

Solution: Let us indicate statements as follows:


Given premises are P → (Q∨R), Q → ¬P , and S → ¬R. The conclusion is P → ¬S. We
include P as an additional premise and derive ¬S.

{1} (1) P Rule P (additional premise)


{2} (2) P → (Q ∨ R) Rule P
{1, 2} (3) Q ∨ R Rule T, (1), (2), and I11
{1, 2} (4) ¬Q → R Rule T, (3) and P → Q ⇔ P ∨ Q
{1, 2} (5) ¬R → Q Rule T, (4), and P → Q ⇔ ¬Q → ¬P
{6} (6) Q → ¬P Rule P
{1, 2, 6} (7) ¬R → ¬P Rule T, (5), (6), and I13
{1, 2, 6} (8) P → R Rule T, (7) and P → Q ⇔ ¬Q → ¬P
{9} (9) S → ¬R Rule P
{9} (10) R → ¬S Rule T, (9) and P → Q ⇔ ¬Q → ¬P
{1, 2, 6, 9} (11) P → ¬S Rule T, (8), (10) and I13
{1, 2, 6, 9} (12) ¬S Rule T, (1), (11) and I11

Example: Determine the validity of the following arguments using propositional logic:
‖Smoking is healthy. If smoking is healthy, then cigarettes are prescribed by physi-
cians. Therefore, cigarettes are prescribed by physicians‖. (May-2012)
Solution: Let us indicate the statements as follows:
P : Smoking is healthy.
Q: Cigarettes are prescribed by physicians.

Hence, the given premises are P , P → Q. The conclusion is Q.


{1} (1) P → Q Rule P

{2} (2) P Rule P


31
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

{1, 2} (3) Q Rule T, (1), (2), and I11

Hence, the given statements constitute a valid argument.

Consistency of Premises
A set of formulas H1, H2, · · · , Hm is said to be consistent if their conjunction has the
truth value T for some assignment of the truth values to the atomic variables appearing in H1,
H2,

· · · , Hm.

If, for every assignment of the truth values to the atomic variables, at least one of
the formulas H1, H2, · · · , Hm is false, so that their conjunction is identically false, then the
formulas H1, H2, · · · , Hm are called inconsistent.

Alternatively, a set of formulas H1, H2, · · · , Hm is inconsistent if their conjunction implies a


contradiction, that is,
H1 ∧ H2 ∧ · · · ∧ Hm ⇒ R ∧ ¬R
where R is any formula.

Example: Show that the following premises are inconsistent:


(1). If Jack misses many classes through illness, then he fails high school.
(2). If Jack fails high school, then he is uneducated.
(5). If Jack reads a lot of books, then he is not uneducated.
(6). Jack misses many classes through illness and reads a lot of books.
Solution: Let us indicate the statements as follows:
E: Jack misses many classes through illness.
S: Jack fails high school.
A: Jack reads a lot of books.
H: Jack is uneducated.
The premises are E → S, S → H, A → ¬H, and E ∧ A.

{1} (1) E → S Rule P


{2} (2) S → H Rule P
{1, 2} (3) E → H Rule T, (1), (2), and I13
{4} (4) A → ¬H Rule P
{4} (5) H → ¬A Rule T, (4), and P → Q ⇔ ¬Q → ¬P
{1, 2, 4} (6) E → ¬A Rule T, (3), (5), and I13
{1, 2, 4} (7) ¬E ∨ ¬A Rule T, (6) and P → Q ⇔ ¬P ∨ Q
{1, 2, 4} (8) ¬(E ∧ A) Rule T, (7), and ¬(P ∧ Q) ⇔ ¬P ∨ ¬Q
{9} (9) E ∧ A Rule P
{1, 2, 4, 9} (10) ¬(E ∧ A) ∧ (E ∧ A) Rule T, (8), (9) and I9

Thus, the given set of premises leads to a contradiction and hence it is inconsistent.

32
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Show that the following set of premises is inconsistent: ‖If the contract is valid, then
John is liable for penalty. If John is liable for penalty, he will go bankrupt. If the bank will loan
him money, he will not go bankrupt. As a matter of fact, the contract is valid, and the bank will
loan him money.‖
Solution: Let us indicate the statements as follows:
V : The contract is valid.
L: John is liable for penalty.
M: Bank will loan him money.
B: John will go bankrupt.

{1} (1) V → L Rule P


{2} (2) L → B Rule P
{1, 2} (3) V → B Rule T, (1), (2), and I13
{4} (4) M → ¬B Rule P
{4} (5) M → ¬M Rule T, (4), and P → Q ⇔ ¬Q → ¬P
{1, 2, 4} (6) V → ¬M Rule T, (3), (5), and I13
{1, 2, 4} (7) ¬V ∨ ¬M Rule T, (6) and P → Q ⇔ ¬P ∨ Q
{1, 2, 4} (8) ¬(V ∧ M) Rule T, (7), and ¬(P ∧ Q) ⇔ ¬P ∨ ¬Q
{9} (9) V ∧ M Rule P
{1, 2, 4, 9} (10) ¬(V ∧ M) ∧ (V ∧ M) Rule T, (8), (9) and I9
Thus, the given set of premises leads to a contradiction and hence it is inconsistent.

Indirect Method of Proof


The method of using the rule of conditional proof and the notion of an
inconsistent set of premises is called the indirect method of proof or proof by
contradiction.

In order to show that a conclusion C follows logically from the premises H1, H2, · · · ,
Hm, we assume that C is false and consider ¬C as an additional premise. If the new set of
premises is inconsistent, so that they imply a contradiction. Therefore, the assump-tion that ¬C is
true does not hold.
Hence, C is true whenever H1, H2, · · · , Hm are true. Thus, C follows logically from
the premises H1, H2, · · · , Hm.

33
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Show that ¬(P ∧ Q) follows from ¬P ∧ ¬Q.

Solution: We introduce ¬¬(P ∧Q) as additional premise and show that this additional premise
leads to a contradiction.

{1} (1) ¬¬(P ∧ Q) Rule P (assumed)


{1} (2) P ∧ Q Rule T, (1), and ¬¬P ⇔ P
{1} (3) P Rule T, (2), and I1
{4} (4) ¬P ∧ ¬Q Rule P
{4} (5) ¬P Rule T, (4), and I1
{1, 4} (6) P ∧ ¬P Rule T, (3), (5), and I9
Hence, our assumption is wrong.
Thus, ¬(P ∧ Q) follows from ¬P ∧ ¬Q.

Example: Using the indirect method of proof, show that


P → Q, Q → R, ¬(P ∧ R), P ∨ R ⇒ R.

Solution: We include ¬R as an additional premise. Then we show that this leads to a


contradiction.

{1} (1) P → Q Rule P


{2} (2) Q → R Rule P
{1, 2} (3) P → R Rule T, (1), (2), and I13
{4} (4) ¬R Rule P (assumed)
{1, 2, 4} (5) ¬P Rule T, (4), and I12
{6} (6) P ∨ R Rule P
{1, 2, 4, 6} (7) R Rule T, (5), (6) and I10
{1, 2, 4, 6} (8) R ∧ ¬R Rule T, (4), (7), and I9
Hence, our assumption is wrong.

Example: Show that the following set of premises are inconsistent, using proof by contradiction
P → (Q ∨ R), Q → ¬P, S → ¬R, P ⇒ P → ¬S.

Solution: We include ¬(P → ¬S) as an additional premise. Then we show that this leads to a
contradiction.
∴ ¬(P → ¬S) ⇔ ¬(¬P ∨ ¬S) ⇔ P ∧ S.

{1} (1) P → (Q ∨ R) Rule P


{2} (2) P Rule P
{1, 2} (3) Q ∨ R Rule T, (1), (2), and Modus Ponens
{4} (4) P ∧ S Rule P (assumed)
34
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

{1, 2, 4} (5) S Rule T, (4), and P ∧ Q ⇒ P

35
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

{6} (6) S → ¬R Rule P


{1, 2, 4, 6} (7) ¬R Rule T, (5), (6) and Modus Ponens
{1, 2, 4, 6} (8) Q Rule T, (3), (7), and P ∧ Q, ¬Q ⇒ P
{9} (9) Q → ¬P Rule P
{1, 2, 4, 6} (10) ¬P Rule T, (8), (9), and P ∧ Q, ¬Q ⇒ P
{1, 2, 4, 6} (11) P ∧ ¬P Rule T, (2), (10), and P, Q ⇒ P ∧ Q
{1, 2, 4, 6} (12) F Rule T, (11), and P ∧ ¬P ⇔ F
Hence, it is proved that the given premises are inconsistent.

The Predicate Calculus


Predicate
A part of a declarative sentence describing the properties of an object is called a
predicate. The logic based upon the analysis of predicate in any statement is called
predicate logic.
Consider two statements:
John is a bachelor
Smith is a bachelor.
In each statement ‖is a bachelor‖ is a predicate. Both John and Smith have the same
property of being a bachelor. In the statement logic, we require two diff erent symbols to
express them and these symbols do not reveal the common property of these statements.
In predicate calculus these statements can be replaced by a single statement ‖x is a
bachelor‖. A predicate is symbolized by a capital letters which is followed by the list of
variables. The list of variables is enclosed in parenthesis. If P stands for the predicate ‖is
a bachelor‖, then P (x) stands for ‖x is a bachelor‖,where x is a predicate variable.
`The domain for P (x) : x is a bachelor, can be taken as the set of all human
names. Note that P (x) is not a statement, but just an expression. Once a value is assigned
to x, P (x) becomes a statement and has the truth value. If x is Ram, then P (x) is a
statement and its truth value is true.

Quantifiers
Quantifiers: Quantifiers are words that are refer to quantities such as ‘some‘ or ‘all‘.
Universal Quantifier: The phrase ‘forall‘ (denoted by ∀) is called the universal quantifier.
For example, consider the sentence ‖All human beings are mortal‖.
Let P (x) denote ‘x is a mortal‘.
Then, the above sentence can be written
as (∀x ∈ S)P (x) or ∀xP (x)

where S denote the set of all human beings.


∀x represents each of the following phrases, since they have essentially the same for all x
For every x
For each x.

Existential Quantifier: The phrase ‘there exists‘ (denoted by ∃) is called the exis-tential
quantifier.

36
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

For example, consider the sentence


2
‖There exists x such that x = 5.
This sentence can be written as
(∃x ∈ R)P (x) or (∃x)P (x),
2
where P (x) : x = 5.

∃x represents each of the following phrases


There exists an x
There is an x
For some x
There is at least one x.

Example: Write the following statements in symbolic form:


(i). Something is good
(ii). Everything is good
(iii). Nothing is good
(iv). Something is not good.
Solution: Statement (i) means ‖There is atleast one x such that, x is good‖.
Statement (ii) means ‖Forall x, x is good‖.
Statement (iii) means, ‖Forall x, x is not good‖.
Statement (iv) means, ‖There is atleast one x such that, x is not good.
Thus, if G(x) : x is good, then
statement (i) can be denoted by (∃x)G(x)
statement (ii) can be denoted by (∀x)G(x)
statement (iii) can be denoted by (∀x)¬G(x)
statement (iv) can be denoted by (∃x)¬G(x).
Example: Let K(x) : x is a man
L(x) : x is mortal

M(x) : x is an integer
N(x) : x either positive or negative
Express the following using quantifiers:
 All men are mortal
 Any integer is either positive or negative.
Solution: (a) The given statement can be written as
for all x, if x is a man, then x is mortal and this can be expressed as
(x)(K(x) → L(x)).
(d) The given statement can be written as
for all x, if x is an integer, then x is either positive or negative and this can be expressed
as (x)(M(x) → N(x)).

37
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Free and Bound Variables


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. Any occurrence of x in an x-bound part of the formula is
called a bound occurrence of x, while any occurrence of x or of any variable that is not a
bound occurrence is called a free occurrence. The smallest formula immediately
following (∀x) or (∃x) is called the scope of the quantifier.
Consider the following formulas:

 (x)P (x, y)
 (x)(P (x) → Q(x))
 (x)(P (x) → (∃y)R(x, y))
 (x)(P (x) → R(x)) ∨ (x)(R(x) → Q(x))
 (∃x)(P (x) ∧ Q(x))
 (∃x)P (x) ∧ Q(x).
In (1), P (x, y) is the scope of the quantifier, and occurrence of x is bound occurrence,
while the occurrence of y is free occurrence.

In (2), the scope of the universal quantifier is P (x) → Q(x), and all concrescences 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
R(x) → Q(x). All occurrences of x are bound occurrences.

In (5), the scope (∃x) is P (x) ∧ Q(x).

In (6), the scope of (∃x) is P (x) and the last of occurrence of x in Q(x) is free.

Negations of Quantified Statements


(i). ¬(x)P (x) ⇔ (∃x)¬P (x)

(ii). ¬(∃x)P (x) ⇔ (x)(¬P (x)).

Example: Let P (x) denote the statement ‖x is a professional athlete‖ and let Q(x) denote the
statement ‖x plays soccer‖. The domain is the set of all people.
(c). Write each of the following proposition in English.
 (x)(P (x) → Q(x)
 (∃x)(P (x) ∧ Q(x))
 (x)(P (x) ∨ Q(x))
(d). Write the negation of each of the above propositions, both in symbols and in words.
Solution:
(c). (i). For all x, if x is an professional athlete then x plays soccer.
‖All professional athletes plays soccer‖ or ‖Every professional athlete plays
soccer‖.
(ii). There exists an x such that x is a professional athlete and x plays soccer.
38
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

‖Some professional athletes paly soccer‖.


(iii). For all x, x is a professional athlete or x plays soccer.
‖Every person is either professional athlete or plays soccer‖.

(d). (i). In symbol: We know that


¬(x)(P (x) → Q(x)) ⇔ (∃x)¬(P (x) → Q(x)) ⇔ (∃x)¬(¬(P (x)) ∨ Q(x))

⇔ (∃x)(P (x) ∧ ¬Q(x))

There exists an x such that, x is a professional athlete and x does not paly soccer.
In words: ‖Some professional athlete do not play soccer‖.
(ii). ¬(∃x)(P (x) ∧ Q(x)) ⇔ (x)(¬P (x) ∨ ¬Q(x))

In words: ‖Every people is neither a professional athlete nor plays soccer‖ or All people
either not a professional athlete or do not play soccer‖.
(iii). ¬(x)(P (x) ∨ Q(x)) ⇔ (∃x)(¬P (x) ∧ ¬Q(x)).

In words: ‖Some people are not professional athlete or do not paly soccer‖.

Inference Theory of the Predicate Calculus


To understand the inference theory of predicate calculus, it is important to be famil-iar
with the following rules:
Rule US: Universal specification or instaniation
(x)A(x) ⇒ A(y)
From (x)A(x), one can conclude A(y).

Rule ES: Existential specification


(∃x)A(x) ⇒ A(y)
From (∃x)A(x), one can conclude A(y).

Rule EG: Existential generalization


A(x) ⇒ (∃y)A(y)
From A(x), one can conclude (∃y)A(y).

Rule UG: Universal generalization


A(x) ⇒ (y)A(y)
From A(x), one can conclude (y)A(y).

Equivalence formulas:
E31 : (∃x)[A(x) ∨ B(x)] ⇔ (∃x)A(x) ∨ (∃x)B(x)

E32 : (x)[A(x) ∧ B(x)] ⇔ (x)A(x) ∧ (x)B(x)

E33 : ¬(∃x)A(x) ⇔ (x)¬A(x)

E34 : ¬(x)A(x) ⇔ (∃x)¬A(x)

E35 : (x)(A ∨ B(x)) ⇔ A ∨ (x)B(x)


39
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

E36 : (∃x)(A ∧ B(x)) ⇔ A ∧ (∃x)B(x)

E37 : (x)A(x) → B ⇔ (x)(A(x) → B)

E38 : (∃x)A(x) → B ⇔ (x)(A(x) → B)

E39 : A → (x)B(x) ⇔ (x)(A → B(x))

40
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

E40 : A → (∃x)B(x) ⇔ (∃x)(A → B(x))

E41 : (∃x)(A(x) → B(x)) ⇔ (x)A(x) → (∃x)B(x)

E42 : (∃x)A(x) → (x)B(X) ⇔ (x)(A(x) → B(X)).

Example: Verify the validity of the following arguments:


‖All men are mortal. Socrates is a man. Therefore, Socrates is mortal‖.
or
Show that (x)[H(x) → M(x)] ∧ H(s) ⇒ M(s).

Solution: Let us represent the statements as follows:


H(x) : x is a man
M(x) : x is a mortal
s : Socrates

Thus, we have to show that (x)[H(x) → M(x)] ∧ H(s) ⇒ M(s).

{1} (1) (x)[H(x) → M(x)] Rule P


{1} (2) H(s) → M(s) Rule US, (1)
{3} (3) H(s) Rule P
{1, 3} (4) M(s) Rule T, (2), (3), and I11

Example: Establish the validity of the following argument:‖All integers are ratio-nal numbers.
Some integers are powers of 2. Therefore, some rational numbers are powers of 2‖.
Solution: Let P (x) : x is an integer
R(x) : x is rational number
S(x) : x is a power of 2
Hence, the given statements becomes

(x)(P (x) → R(x)), (∃x)(P (x) ∧ S(x)) ⇒ (∃x)(R(x) ∧ S(x))


Solution:

{1} (1) (∃x)(P (x) ∧ S(x)) Rule P


{1} (2) P (y) ∧ S(y) Rule ES, (1)
{1} (3) P (y) Rule T, (2) and P ∧ Q ⇒ P
{1} (4) S(y) Rule T, (2) and P ∧ Q ⇒ Q
{5} (5) (x)(P (x) → R(x)) Rule P
{5} (6) P (y) → R(y) Rule US, (5)
{1, 5} (7) R(y) Rule T, (3), (6) and P, P → Q ⇒ Q
{1, 5} (8) R(y) ∧ S(y) Rule T, (4), (7) and P, Q ⇒ P ∧ Q
{1, 5} (9) (∃x)(R(x) ∧ S(x)) Rule EG, (8)
41
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Hence, the given statement is valid.

42
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Example: Show that (x)(P (x) → Q(x)) ∧ (x)(Q(x) → R(x)) ⇒ (x)(P (x) → R(x)).
Solution:

{1} (1) (x)(P (x) → Q(x)) Rule P


{1} (2) P (y) → Q(y) Rule US, (1)
{3} (3) (x)(Q(x) → R(x)) Rule P
{3} (4) Q(y) → R(y) Rule US, (3)
{1, 3} (5) P (y) → R(y) Rule T, (2), (4), and I13
{1, 3} (6) (x)(P (x) → R(x)) Rule UG, (5)
Example: Show that (∃x)M(x) follows logically from the premises
(x)(H(x) → M(x)) and (∃x)H(x).
Solution:

{1} (1) (∃x)H(x) Rule P


{1} (2) H(y) Rule ES, (1)
{3} (3) (x)(H(x) → M(x)) Rule P
{3} (4) H(y) → M(y) Rule US, (3)
{1, 3} (5) M(y) Rule T, (2), (4), and I11
{1, 3} (6) (∃x)M(x) Rule EG, (5)
Hence, the result.
Example: Show that (∃x)[P (x) ∧ Q(x)] ⇒ (∃x)P (x) ∧ (∃x)Q(x).
Solution:

{1} (1) (∃x)(P (x) ∧ Q(x)) Rule P


{1} (2) P (y) ∧ Q(y) Rule ES, (1)
{1} (3) P (y) Rule T, (2), and I1
{1} (4) (∃x)P (x) Rule EG, (3)
{1} (5) Q(y) Rule T, (2), and I2
{1} (6) (∃x)Q(x) Rule EG, (5)
{1} (7) (∃x)P (x) ∧ (∃x)Q(x) Rule T, (4), (5) and I9
Hence, the result.
Note: Is the converse true?

{1} (1) (∃x)P (x) ∧ (∃x)Q(x) Rule P


{1} (2) (∃x)P (x) Rule T, (1) and I1
{1} (3) (∃x)Q(x) Rule T, (1), and I1
{1} (4) P (y) Rule ES, (2)
{1} (5) Q(s) Rule ES, (3)

43
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Here in step (4), y is fixed, and it is not possible to use that variable again in step (5).
Hence, the converse is not true.

Example: Show that from (∃x)[F (x) ∧S(x)] → (y)[M(y) → W (y)] and (∃y)[M(y) ∧ ¬W (y)] the
conclusion (x)[F (x) → ¬S(x)] follows.

{1} (1) (∃y)[M(y) ∧ ¬W (y)] Rule P


{1} (2) [M(z) ∧ ¬W (z)] Rule ES, (1)
{1} (3) ¬[M(z) → W (z)] Rule T, (2), and ¬(P → Q) ⇔ P ∧ ¬Q

{1} (4) (∃y)¬[M(y) → W (y)] Rule EG, (3)

{1} (5) ¬(y)[M(y) → W (y)] Rule T, (4), and ¬(x)A(x) ⇔ (∃x)¬A(x)

{1} (6) (∃x)[F (x) ∧ S(x)] → (y)[M(y) → W (y)]Rule P

{1, 6} (7) ¬(∃x)[F (x) ∧ S(x)] Rule T, (5), (6) and I12

{1, 6} (8) (x)¬[F (x)∧S(x)] Rule T, (7), and ¬(x)A(x) ⇔ (∃x)¬A(x)

{1, 6} (9) ¬[F (z) ∧ S(z)] Rule US, (8)

{1, 6} (10) ¬F (z) ∨ ¬S(z) Rule T, (9), and De Morgan‘s laws

{1, 6} (11) F (z) → ¬S(z) Rule T, (10), and P → Q ⇔ ¬P ∨ Q

{1, 6} (12) (x)(F (x) → ¬S(x)) Rule UG, (11)

Hence, the result.


Example: Show that (x)(P (x) ∨ Q(x)) ⇒ (x)P (x) ∨ (∃x)Q(x). (May. 2012)
Solution: We shall use the indirect method of proof by assuming ¬((x)P (x)∨(∃x)Q(x)) as an
additional premise.

{1} (1) ¬((x)P (x) ∨ (∃x)Q(x)) Rule P (assumed)


{1} (2) ¬(x)P (x) ∧ ¬(∃x)Q(x) Rule T, (1) ¬(P ∨ Q) ⇔ ¬P ∧ ¬Q
{1} (3) ¬(x)P (x) Rule T, (2), and I1
{1} (4) (∃x)¬P (x) Rule T, (3), and ¬(x)A(x) ⇔ (∃x)¬A(x)
{1} (5) ¬(∃x)Q(x) Rule T, (2), and I2
{1} (6) (x)¬Q(x) Rule T, (5), and ¬(∃x)A(x) ⇔ (x)¬A(x)
{1} (7) ¬P (y) Rule ES, (5), (6) and I12
{1} (8) ¬Q(y) Rule US, (6)
{1} (9) ¬P (y) ∧ ¬Q(y) Rule T, (7), (8)and I9

44
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

{1} (10) ¬(P (y) ∨ Q(y)) Rule T, (9), and ¬(P ∨ Q) ⇔ ¬P ∧ ¬Q


{11} (11) (x)(P (x) ∨ Q(x)) Rule P
{11} (12) (P (y) ∨ Q(y)) Rule US
{1, 11} (13) ¬(P (y) ∨ Q(y)) ∧ (P (y) ∨ Q(y)) Rule T, (10), (11), and I9

{1, 11} (14) F Rule T, and (13)

45
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

which is a contradiction.Hence, the statement is valid.

Example: Using predicate logic, prove the validity of the following argument:
‖Every husband argues with his wife. x is a husband. Therefore, x argues with his
wife‖.

Solution: Let P (x): x is a husband.

Q(x): x argues with his wife.

Thus, we have to show that (x)[P (x) → Q(x)] ∧ P (x) ⇒ Q(y).

{1} (1) (x)(P (x) → Q(x)) Rule P


{1} (2) P (y) → Q(y) Rule US, (1)
{1} (3) P (y) Rule P
{1} (4) Q(y) Rule T, (2), (3), and I11
Example: Prove using rules of inference
Duke is a Labrador retriever.
All Labrador retriever like
to swim. Therefore Duke
likes to swim.
Solution: We denote
L(x): x is a Labrador retriever.
S(x): x likes to swim.
d: Duke.

We need to show that L(d) ∧ (x)(L(x) → S(x)) ⇒ S(d).

{1} (1) (x)(L(x) → S(x)) Rule P


{1} (2) L(d) → S(d) Rule US, (1)
{2} (3) L(d) Rule P
{1, 2} (4) S(d) Rule T, (2), (3), and I11.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

UNIT-2
Set Theory
Set:A set is collection of well defined objects.

In the above definition the words set and collection for all practical purposes are Synonymous. We have
really used the word set to define itself.

Each of the objects in the set is called a member of an element of the set. The objects themselves can be
almost anything. Books, cities, numbers, animals, flowers, etc. Elements of a set are usually denoted by
lower-case letters. While sets are denoted by capital letters of English larguage.

The symbol ∈ indicates the membership in a set.

If ―a is an element of the set A‖, then we write a ∈ A.

The symbol ∈ is read ―is a member of ‖ or ―is an element of ‖.

The symbol  is used to indicate that an object is not in the given


set. The symbol  is read ―is not a member of ‖ or ―is not an
element of ‖. If x is not an element of the set A then we write x  A.

Subset:
A set A is a subset of the set B if and only if every element of A is also an element of B. We also say that A is
contained in B, and use the notation A  B.

Proper Subset:
A set A is called proper subset of the set B. If (i) A is subset of B and (ii) B is not a subset A i.e., A is said to be a
proper subset of B if every element of A belongs to the set B, but there is atleast one element of B, which is
not in A. If A is a proper subset of B, then we denote it by A  B.

Super set: If A is subset of B, then B is called a superset of A.

Null set: The set with no elements is called an empty set or null set. A Null set is designated by the symbol  .
The null set is a subset of every set, i.e., If A is any set then   A.

Universal set:

In many discussions all the sets are considered to be subsets of one particular set. This set is called the
universal set for that discussion. The Universal set is often designated by the script letter  . Universal set
in

not unique and it may change from one discussion to another.

Power set:

The set of all subsets of a set A is called the power set of A.

The power set of A is denoted by P (A). If A has n elements in it, then P (A) has 2n elements:

Disjoint sets:

Two sets are said to be disjoint if they have no element in common.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Union of two sets:

The union of two sets A and B is the set whose elements are all of the elements in A or in B or in both.
The union of sets A and B denoted by A  B is read as ―A union B‖.

Intersection of two sets:

The intersection of two sets A and B is the set whose elements are all of the elements common to both A and B.
The intersection of the sets of ―A‖ and ―B‖ is denoted by A  B and is read as ―A intersection B‖

Difference of sets:
If A and B are subsets of the universal set U, then the relative complement of B in Ais the set of all elements in

A which are not in A. It is denoted by A – B thus: A – B = {x | x ∈ A and xB}

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Complement of a set:

If U is a universal set containing the set A, then U – A is called the complement of A. It is denoted by A1 . Thus

A1 = {x: xA}

Inclusion-Exclusion Principle:

The inclusion–exclusion principle is a counting technique which generalizes the familiar method of
obtaining the number of elements in the unionof two finite sets; symbolically expressed as

|A ∪ B| = |A| + |B| − |A ∩ B|.

Fig.Venn diagram showing the

union of sets A and B

where A and B are two finite sets and |S| indicates the cardinality of a set S (which may be considered as the
number of elements of the set, if the set is finite). The formula expresses the fact that the sum of the sizes of
the two sets may be too large since some elements may be counted twice. The double-counted elements are
those in the intersection of the two sets and the count is corrected by subtracting the size of the intersection.

The principle is more clearly seen in the case of three sets, which for the sets A, B and C is given by

|A ∪ B∪ BC| = |A| + |B|+ |C| − |A ∩ B|− |C ∩ B| − |A ∩ C|+|A ∩B∩C|.

Fig.Inclusion–exclusion illustrated by a
Venn diagram for three sets

This formula can be verified by counting how many times each region in the Venn diagram figure is included
in the right-hand side of the formula. In this case, when removing the contributions of over-counted
elements, the number of elements in the mutual intersection of the three sets has been subtracted too
often, so must be added back in to get the correct total.

In general, Let A1, · · · , Ap be finite subsets of a set U. Then,

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: How many natural numbers n ≤ 1000 are not divisible by any of 2, 3?
Ans: Let A2 = {n ∈ N | n ≤ 1000, 2|n} and A3 = {n ∈ N | n ≤ 1000, 3|n}.

Then, |A2 ∪ A3| = |A2| + |A3| − |A2 ∩ A3| = 500 + 333 − 166 = 667.

So, the required answer is 1000 − 667 = 333.

Example: How many integers between 1 and 10000 are divisible by none of 2, 3, 5,
7? Ans: For i ∈ {2, 3, 5, 7}, let Ai = {n ∈ N | n ≤ 10000, i|n}.

Therefore, the required answer is 10000 − |A2 ∪ A3 ∪ A5 ∪ A7| = 2285.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Relations

Definition: Any set of ordered pairs defines a binary relation.

We shall call a binary relation simply a relation. Binary relations represent


relationships between elements of two sets. If R is a relation, a particular ordered pair, say (x,
y) ∈ R can be written as xRy and can be read as ―x is in relation R to y‖.

Example: Give an example of a relation.


′ ′
Solution: The relation ―greater than‖ for real numbers is denoted by > . If x and y are any
two real numbers such that x > y, then we say that (x, y) ∈>. Thus the relation > is { } >= (x,
y) : x and y are real numbers and x > y
Example: Define a relation between two sets A = {5, 6, 7} and B = {x, y}.

Solution: If A = {5, 6, 7} and B = {x, y}, then the subset R = {(5, x), (5, y), (6, x), (6, y)} is a
relation from A to B.

Definition: Let S be any relation. The domain of the relation S is defined as the set of all first
elements of the ordered pairs that belong to S and is denoted by D(S).
D(S) = { x : (x, y) ∈ S, for some y }

The range of the relation S is defined as the set of all second elements of the ordered pairs that
belong to S and is denoted by R(S).
R(S) = { y : (x, y) ∈ S, for some x}

Example: A = {2, 3, 4} and B = {3, 4, 5, 6, 7}. Define a relation from A to B by (a, b) ∈ R if a

divides b.
Solution: We obtain R = {(2, 4), (2, 6), (3, 3), (3, 6), (4, 4)}.

Domain of R = {2, 3, 4} and range of R = {3, 4, 6}.

Properties of Binary Relations in a Set

A relation R on a set X is said to be


 Reflexive relation if xRx or (x, x) ∈ R, ∀x ∈ X
 Symmetric relation if xRy then yRx, ∀x, y ∈ X
 Transitive relation if xRy and yRz then xRz, ∀x, y, z ∈ X
 ̸ x or (x, x)  R, ∀x ∈ X
Irreflexive relation if x R
 Antisymmetric relation if for every x and y in X, whenever xRy and yRx, then x = y.

Examples: (i). If R1 = {(1, 1), (1, 2), (2, 2), (2, 3), (3, 3)} be a relation on A = {1, 2, 3}, then R1 is a
reflexive relation, since for every x ∈ A, (x, x) ∈ R1.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

(ii). If R2 = {(1, 1), (1, 2), (2, 3), (3, 3)} be a relation on A = {1, 2, 3}, then R2 is not a reflexive
relation, since for every 2 ∈ A, (2, 2)  R2.

(iii). If R3 = {(1, 1), (1, 2), (1, 3), (2, 2), (2, 1), (3, 1)} be a relation on A = {1, 2, 3}, then R3 is a symmetric
relation.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

(iv). If R4 = {(1, 2), (2, 2), (2, 3)} on A = {1, 2, 3} is an antisymmetric.

Example: Given S = {1, 2, ..., 10} and a relation R on S, where R = {(x, y)| x + y = 10}.

What are the properties of the relation R?

Solution: Given that


S = {1, 2, ..., 10}

 = {(x, y)| x + y = 10}

 = {(1, 9), (9, 1), (2, 8), (8, 2), (3, 7), (7, 3), (4, 6), (6, 4), (5, 5)}.

(i). For any x ∈ S and (x, x) R. Here, 1 ∈ S but (1, 1)R.

⇒ the relation R is not reflexive. It is also not irreflexive, since (5, 5) ∈ R.


(ii). (1, 9) ∈ R ⇒ (9, 1) ∈ R
(2, 8) ∈ R ⇒ (8, 2) ∈ R…..

⇒ the relation is symmetric, but it is not antisymmetric. (iii). (1, 9) ∈ R and (9, 1) ∈ R
⇒ (1, 1) R

⇒ The relation R is not transitive. Hence, R is symmetric.

Relation Matrix and the Graph of a Relation


Relation Matrix: A relation R from a finite set X to a finite set Y can be repre-sented by a matrix
is called the relation matrix of R.

Let X = {x1, x2, ..., xm} and Y = {y1, y2, ..., yn} be finite sets containing m and n elements,
respectively, and R be the relation from A to B. Then R can be represented by an m × n matrix

MR = [rij ], which is defined as follows:


1, if (x , y )  R
r =  i j
ij
0, if (xi , y j )  R

Example. Let A = {1, 2, 3, 4} and B = {b1, b2, b3}. Consider the relation R = {(1, b2), (1, b3), (3,
b2), (4, b1), (4, b3)}. Determine the matrix of the relation.

Solution: A = {1, 2, 3, 4}, B = {b1, b2, b3}.

Relation R = {(1, b2), (1, b3), (3, b2), (4, b1), (4, b3)}.
Matrix of the relation R is written as
 0 1 1 
 0 0 0 
 
That is MR = 
0 0 
1
 
 1 0 1 

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: Let A = {1, 2, 3, 4}. Find the relation R on A determined by the matrix
 1 0 1 0 
 
 0 0 1 0
0 0 
MR = 
1 
0
 0 1
1 1
Solution: The relation R = {(1, 1), (1, 3), (2, 3), (3, 1), (4, 1), (4, 2), (4, 4)}.

Properties of a relation in a set:


(i). If a relation is reflexive, then all the diagonal entries must be 1.
(ii). If a relation is symmetric, then the relation matrix is symmetric, i.e., rij = rji for every i and j.
(iii). If a relation is antisymmetric, then its matrix is such that if rij = 1 then rji = 0 for i ≠ j.

Graph of a Relation: A relation can also be represented pictorially by drawing its graph. Let R
be a relation in a set X = {x1, x2, ..., xm}. The elements of X are represented by points or circles
called nodes. These nodes are called vertices. If (xi, xj ) ∈ R, then we connect the nodes xi and xj
by means of an arc and put an arrow on the arc in the direction from xi to xj . This is called
an

edge. If all the nodes corresponding to the ordered pairs in R are connected by arcs with proper
arrows, then we get a graph of the relation R.

Note: (i). If xiRxj and xj Rxi, then we draw two arcs between xi and xj with arrows pointing in
both directions.
(ii). If xiRxi, then we get an arc which starts from node xi and returns to node xi. This arc is called
a loop.

Properties of relations:

(i). If a relation is reflexive, then there must be a loop at each node. On the other hand, if the
relation is irreflexive, then there is no loop at any node.
(ii). If a relation is symmetric and if one node is connected to another, then there must be a return
arc from the second node to the first.
(iii). For antisymmetric relations, no such direct return path should exist.
(iv). If a relation is transitive, the situation is not so simple.

Example: Let X = {1, 2, 3, 4} and R={(x, y)| x > y}. Draw the graph of R and also give its matrix.
Solution: R = {(4, 1), (4, 3), (4, 2), (3, 1), (3, 2), (2, 1)}.

The graph of R and the matrix of R are


1 2

3 4

Graph of R

 0 0 0 0 
 

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

 1 0 0 0
MR = 
1 1 0 0 
 
 1 1 1 0

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Partition and Covering of a Set


Let S be a given set and A = {A1, A2, · · · , Am} where each Ai, i = 1, 2, · · · , m is a subset of S and
m

Ai  S .
i 1

Then the set A is called a covering of S, and the sets A1, A2, · · · , Am are said to cover S. If, in
addition, the elements of A, which are subsets of S, are mutually disjoint, then A is called a

partition of S, and the sets A1, A2, · · · , Am are called the blocks of the partition.

Example: Let S = {a, b, c} and consider the following collections of subsets of S. A = {{a, b}, {b, c}},
B = {{a}, {a, c}}, C = {{a}, {b, c}}, D = {{a, b, c}}, E = {{a}, {b}, {c}}, and F = {{a}, {a, b}, {a,

c}}. Which of the above sets are covering?

Solution: The sets A, C, D, E, F are covering of S. But, the set B is not covering of S, since their
union is not S.

Example: Let S = {a, b, c} and consider the following collections of subsets of S. A = {{a, b}, {b,
c}}, B = {{a}, {b, c}}, C = {{a, b, c}}, D = {{a}, {b}, {c}}, and E= {{a}, {a, c}}.

Which of the above sets are covering?

Solution: The sets B, C and D are partitions of S and also they are covering. Hence, every partition
is a covering.

The set A is a covering, but it is not a partition of a set, since the sets {a, b} and {b, c} are not
disjoint. Hence, every covering need not be a partition.

The set E is not partition, since the union of the subsets is not S. The partition C has one block and
the partition D has three blocks.

Example: List of all ordered partitions S = {a, b, c, d} of type (1, 2, 2).

Solution:

({a}, {b}, {c, d}), ({b}, {a}, {c, d})

({a}, {c}, {b, d}), ({c}, {a}, {b, d})

({a}, {d}, {b, c}), ({d}, {a}, {b, c})

({b}, {c}, {a, d}), ({c}, {b}, {a, d})


Equivalence Relations
({b}, {d}, {a, c}), ({d}, {b}, {a, c})

({c}, {d}, {a, b}), ({d}, {c}, {a, b}).

A relation R in a set X is called an equivalence relation if it is reflexive, symmetric and transitive.


The following are some examples of equivalence relations:
1. Equality of numbers on a set of real numbers.
2. Equality of subsets of a universal set.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: Let X = {1, 2, 3, 4} and R == {(1, 1), (1, 4), (4, 1), (4, 4), (2, 2), (2, 3), (3, 2), (3, 3)}.

Prove that R is an equivalence relation.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

 1 0 0 1 

0 1 1 
MR =  0 
0

1 1 01 
 
 1 0 0 1 







The corresponding graph of R is shown in figure:


Clearly, the relation R is reflexive, symmetric and transitive. Hence, R is an equivalence relation.
Example: Let X = {1, 2, 3, ..., 7} and R =(x, y)| x − y is divisible by 3. Show that R is an
equivalence relation.
Solution: (i). For any x ∈ X, x − x = 0 is divisible by 3.
∴ xRx

⇒ R is reflexive.

(ii). For any x, y ∈ X, if xRy, then x − y is divisible by 3.


⇒ −(x − y) is divisible by 3.
⇒ y − x is divisible by 3.
⇒ yRx
Thus, the relation R is symmetric.
(iii). For any x, y, z ∈ X, let xRy and yRz.

⇒ (x − y) + (y − z) is divisible by 3
⇒ x − z is divisible by 3
⇒ xRz
Hence, the relation R is transitive.
Thus, the relation R is an equivalence relation.
Congruence Relation: Let I denote the set of all positive integers, and let m be apositive
integer. For x ∈ I and y ∈ I, define R as R = {(x, y)| x − y is divisible by m }

The statement ‖x − y is divisible by m‖ is equivalent to the statement that both x and y have the
same remainder when each is divided by m.
In this case, denote R by ≡ and to write xRy as x ≡ y (mod m), which is read as ‖x equals to y
modulo m‖. The relation ≡ is called a congruence relation.
Example: 83 ≡ 13(mod 5), since 83-13=70 is divisible by 5.

Example: Prove that the relation ―congruence modulo m‖ over the set of positive integers is an
equivalence relation.

Solution: Let N be the set of all positive integers and m be a positive integer. We define the
relation ‖congruence modulo m‖ on N as follows:
Let x, y ∈ N. x ≡ y (mod m) if and only if x − y is divisible by m.
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

Let x, y, z ∈ N. Then
(i). x − x = 0.m

⇒ x ≡ x (mod m) for all x ∈ N


(ii). Let x ≡ y (mod m). Then, x − y is divisible by m.
⇒ −(x − y) = y − x is divisible by m.
i.e., y ≡ x (mod m)
∴ The relation ≡ is symmetric.
⇒ x − y and y − z are divisible by m. Now (x − y) + (y − z) is divisible by m. i.e., x − z is
divisible by m.
⇒ x ≡ z (mod m)
∴ The relation ≡ is transitive.
Since the relation ≡ is reflexive, symmetric and transitive, the relation congruence modulo m is an
equivalence relation.

Example: Let R denote a relation on the set of ordered pairs of positive integers such that (x,y)R(u,
v) iff xv = yu. Show that R is an equivalence relation.

Solution: Let R denote a relation on the set of ordered pairs of positive integers.
Let x, y, u and v be positive integers. Given (x, y)R(u, v) if and only if xv = yu.
(i). Since xy = yx is true for all positive integers

⇒ (x, y)R(x, y), for all ordered pairs (x, y) of positive integers.
∴ The relation R is reflexive. (ii). Let (x, y)R(u, v)

⇒ xv = yu ⇒ yu
= xv ⇒ uy = vx

⇒ (u, v)R(x, y)

∴ The relation R is symmetric.


(iii). Let x, y, u, v, m and n be positive integers
Let (x, y)R(u, v) and (u, v)R(m, n)
⇒ xv = yu and un = vm
⇒ xvun = yuvm
⇒ xn = ym, by canceling uv
⇒ (x, y)R(m, n)

∴ The relation R is transitive.


Since R is reflexive, symmetric and transitive, hence the relation R is an
equivalence relation.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Compatibility Relations
Definition: A relation R in X is said to be a compatibility relation if it is reflexive and symmetric.
Clearly, all equivalence relations are compatibility relations. A compatibility relation is sometimes
denoted by ≈.

Example: Let X = {ball, bed, dog, let, egg}, and let the relation R be given by
R = {(x, y)| x, y ∈ X ∧ xRy if x and y contain some common letter}.
Then R is a compatibility relation, and x, y are called compatible if xRy.
Note: ball≈bed, bed≈egg. But ball̸≈egg. Thus ≈ is not transitive.
Denoting ‖ball‖ by x1, ‖bed‖ by x2, ‖dog‖ by x3, ‖let‖ by x4, and ‖egg‖ by x5, the graph of ≈ is
given as follows:

Maximal Compatibility Block:


Let X be a set and ≈ a compatibility relation on X. A subset A ⊆ X is called a maximal
compatibility block if any element of A is compatible to every other element of A and no
element of X − A is compatible to all the elements of A.

Example: The subsets {x1, x2, x4}, {x2, x3, x5}, {x2, x4, x5}, {x1, x4, x5} are maximal compatibility
blocks.

Example: Let the compatibility relation on a set {x1, x2, ..., x6} be given by the matrix:
x2 1
x3 1 1
x4 0 0 1
x5 0 0 1 1
x6 1 0 1 0 1
x1 x2 x3 x4 x5
Draw the graph and find the maximal compatibility blocks of the relation.
Solution:

The maximal compatibility blocks are {x1, x2, x3},{x1, x3, x6},{x3, x5, x6},{x3, x4, x5}.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Composition of Binary Relations


Let R be a relation from X to Y and S be a relation from Y to Z. Then a relation written as R ◦ S
is called a composite relation of R and S where R◦S = {(x, z)| x ∈ X, z ∈ Z, and there exists y ∈
Y with (x, y) ∈ R and (y, z) ∈ S }.

Theorem: If R is relation from A to B, S is a relation from B to C and T is a relation from C to D


then T◦ (S ◦ R) = (T ◦ S) ◦ R

Example: Let R = {(1, 2), (3, 4), (2, 2)} and S = {(4, 2), (2, 5), (3, 1), (1, 3)}. Find R

◦ S, S ◦ R, R ◦ (S ◦ R), (R ◦ S) ◦ R, R ◦ R, S ◦ S, and (R ◦ R) ◦ R.

Solution: Given R = {(1, 2), (3, 4), (2, 2)} and S = {(4, 2), (2, 5), (3, 1), (1, 3)}.

R ◦ S = {(1, 5), (3, 2), (2, 5)}

S ◦ R = {(4, 2), (3, 2), (1, 4)} ≠ R ◦ S

(R ◦ S) ◦ R = {(3, 2)}

R ◦ (S ◦ R) = {(3, 2)} = (R ◦ S) ◦ R

R ◦ R = {(1, 2), (2, 2)}

R ◦ R ◦ S = {(4, 5), (3, 3), (1, 1)}

Example: Let A = {a, b, c}, and R and S be relations on A whose matrices are as
given below:
 1 0 1  1 0 0 
   
MR =  0 1 0  and MS =  1 0 1  
  
1 0 1 1 
1 1

Find the composite relations R ◦ S, S ◦ R, R ◦ R, S ◦ S and their matrices.


Solution:

R = {(a, a), (a, c), (b, a), (b, b), (b, c), (c, b)}

S= {(a, a), (b, b), (b, c), (c, a), (c, c)}. From these, we find that

R ◦ S = {(a, a), (a, c), b, a), (b, b), (b, c), (c, b), (c, c)}

S ◦ R = {(a, a), (a, c), (b, b), (b, a), (b, c), (c, a), (c, b), (c, c)}
2
R ◦ R = R = {(a, a), (a, c), (a, b), (b, a), (b, c), (b, b), (c, a), (c, b),
2
(c, c)} S ◦ S = S = {(a, a), (b, b), (b, c), (b, a), (c, a), (c, c)}.

The matrices of the above composite relations are as given


below:

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

 1 0 1 1 0 1 1 1 1


  1 1 1  
MRO S=  0 1 1 ; M SO R =   ; M RO R 
= 1 1 1 ;

  1 1 1  1 1 1
 1 1 1    
1 0 0 
 
MSO S = 1 0 1 


1 1 1 

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Transitive Closure
Let X be any finite set and R be a relation in X. The relation R = R∪R ∪R ∪· · ·∪R
+ 2 3 n

in X is called the transitive closure of R in X.

Example: Let the relation R = {(1, 2), (2, 3), (3, 3)} on the set {1, 2, 3}. What is the transitive closure of

R?

Solution: Given that R = {(1, 2), (2, 3), (3, 3)}.

The transitive closure of R is R = R ∪ R ∪ R ∪ · · · =


+ 2 3

R= {(1, 2), (2, 3), (3, 3)}


2
R = R ◦ R = {(1, 2), (2, 3), (3, 3)} ◦ {(1, 2), (2, 3), (3, 3)} = {(1, 3),
(2, 3), (3, 3)}
3 2
R = R ◦ R = {(1, 3), (2, 3), (3, 3)}
4 3
R = R ◦ R = {(1, 3), (2, 3), (3, 3)}
R = R ∪ R ∪ R ∪ R ∪ ...
+ 2 3 4

= {(1, 2), (2, 3), (3, 3)} ∪ {(1, 3), (2, 3), (3, 3)} ∪ {(1, 3), (2, 3), (3, 3)} ∪ ...

={(1, 2), (1, 3), (2, 3), (3, 3)}.


+
Therefore R = {(1, 2), (1, 3), (2, 3), (3, 3)}.
+
Example: Let X = {1, 2, 3, 4} and R = {(1, 2), (2, 3), (3, 4)} be a relation on X. Find R .

Solution: Given R = {(1, 2), (2, 3), (3, 4)}


2
R = {(1, 3), (2, 4)}
3
R = {(1, 4)}
4
R = {(1, 4)}
+
R = {(1, 2), (2, 3), (3, 4), (1, 3), (2, 4), (1, 4)}.

Partial Ordering
A binary relation R in a set P is called a partial order relation or a partial ordering in P iff R is
reflexive, antisymmetric, and transitive. i.e.,

 aRa for all a ∈ P


 aRb and bRa ⇒ a = b
 aRb and bRc ⇒ aRc
A set P together with a partial ordering R is called a partial ordered set or poset. The relation R is
often denoted by the symbol ≤ which is diff erent from the usual less than equal to symbol. Thus, if
≤ is a partial order in P , then the ordered pair (P, ≤) is called a poset.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: Show that the relation ‖greater than or equal to‖ is a partial ordering on the set of
integers.
′ ′
Solution: Let Z be the set of all integers and the relation R = ≥
′ ′
(i). Since a ≥ a for every integer a, the relation ≥ is reflexive.
(ii). Let a and b be any two integers.
Let aRb and bRa ⇒ a ≥ b and b ≥ a

⇒ a=b
′ ′
∴ The relation ≥ is antisymmetric. (iii).
Let a, b and c be any three integers.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Let aRb and bRc ⇒ a ≥ b and b ≥ c

⇒ a≥c
′ ′
∴ The relation ≥ is transitive.
′ ′ ′ ′
Since the relation ≥ is reflexive, antisymmetric and transitive, ≥ is partial ordering on the set of
integers. Therefore, (Z, ≥) is a poset.

Example: Show that the inclusion ⊆ is a partial ordering on the set power set of a set S.
Solution: Since (i). A ⊆ A for all A ⊆ S, ⊆ is reflexive.
(ii). A ⊆ B and B ⊆ A ⇒ A = B, ⊆ is antisymmetric.
(iii). A ⊆ B and B ⊆ C ⇒ A ⊆ C, ⊆ is transitive.

Thus, the relation ⊆ is a partial ordering on the power set of S.


′′
Example: Show that the divisibility relation / is a partial ordering on the set of positive integers.
+
Solution: Let Z be the set of positive integers.
Since (i). a/a for all a ∈ Z , / is reflexive.
+

(ii). a/b and b/a ⇒ a = b, / is


antisymmetric. (iii). a/b and b/c ⇒ a/c, / is
transitive.
+ +
It follows that / is a partial ordering on Z and (Z , /) is a poset.

Note: On the set of all integers, the above relation is not a partial order as a and −a both divide
each other, but a = −a. i.e., the relation is not antisymmetric. Definition: Let (P, ≤) be a partially
ordered set. If for every x, y ∈ P we have either x ≤ y ∨ y ≤ x, then ≤ is called a simple ordering or
linear ordering on P , and (P, ≤) is called a totally ordered or simply ordered set or a chain.

Note: It is not necessary to have x ≤ y or y ≤ x for every x and y in a poset P . In fact, x may not be
related to y, in which case we say that x and y are incomparable. Examples:
(i). The poset (Z, ≤) is a totally ordered.
Since a ≤ b or b ≤ a whenever a and b are integers.

(ii). The divisibility relation / is a partial ordering on the set of positive integers.
+
Therefore (Z , /) is a poset and it is not a totally ordered, since it contain elements that are
incomparable, such as 5 and 7, 3 and 5.

Definition: In a poset (P, ≤), an element y ∈ P is said to cover an element x ∈ P if x < y and if
there does not exist any element z ∈ P such that x ≤ z and z ≤ y; that is, y covers x ⇔ (x < y ∧ (x ≤ z

≤ y ⇒ x = z ∨ z = y)).

Hasse Diagrams
A partial order ≤ on a set P can be represented by means of a diagram known as Hasse diagram of
(P, ≤). In such a diagram,

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

(i). Each element is represented by a small circle or dot.


(ii). The circle for x ∈ P is drawn below the circle for y ∈ P if x < y, and a line is drawn
between x and y if y covers x.
(iii). If x < y but y does not cover x, then x and y are not connected directly by a single line.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Note: For totally ordered set (P, ≤), the Hasse diagram consists of circles one below the other. The
poset is called a chain.

Example: Let P = {1, 2, 3, 4, 5} and ≤ be the relation ‖less than or equal to‖ then the Hasse
diagram is:

It is a totally ordered set.

Example: Let X = {2, 3, 6, 12, 24, 36}, and the relation ≤ be such that x ≤ y if x divides y. Draw the
Hasse diagram of (X, ≤). Solution: The Hasse diagram is is shown below:

It is not a total order set.

Example: Draw the Hasse diagram for the relation R on A = {1, 2, 3, 4, 5} whose relation matrix
given below:
 1 0 1 1 1 
 
 0 1 1 1 1
 0 0 1 1 
1
MR =  
 0 0 0 1 0
 
 0 0 0 0 1 

Solution:  

R= {(1, 1), (1, 3), (1, 4), (1, 5), (2, 2), (2, 3), (2, 4), (2, 5), (3, 3), (3, 4), (3, 5), (4, 4), (5.5)}.

Hasse diagram for MR is

4 5

1 2

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: A partial order R on the set A = {1, 2, 3, 4} is represented by the following digraph.
Draw the Hasse diagram for R.

Solution: By examining the given digraph , we find that


R= {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4, 4)}.

We check that R is reflexive, transitive and antisymmetric. Therefore, R is partial order relation
on A.
The hasse diagram of R is shown below:

Example: Let A be a finite set and ρ(A) be its power set. Let ⊆ be the inclusion relation on the
elements of ρ(A). Draw the Hasse diagram of ρ(A), ⊆) for
 A = {a}
 A = {a, b}.
Solution: (i). Let A = {a}
ρ(A) = {ϕ, a}

Hasse diagram of (ρ(A), ⊆) is shown in Fig:

(ii). Let A = {a, b}. ρ(A) = {ϕ, {a}, {b}, {a, b}}. The
Hasse diagram for (ρ(A), ⊆) is shown in fig:

Example: Draw the Hasse diagram for the partial ordering ⊆ on the power set P (S) where S = {a,
b, c}.
Solution: S = {a, b, c}.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

P (S) = {ϕ, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}.

Hasse diagram for the partial ordered set is shown in fig:

Example: Draw the Hasse diagram representing the positive divisions of 36 (i.e., D36).
Solution: We have D36 = {1, 2, 3, 4, 6, 9, 12, 18, 36} if and only a divides b. The Hasse diagram

for R is shown in Fig.

Minimal and Maximal elements(members): Let (P, ≤) denote a partially or-dered set. An
element y ∈ P is called a minimal member of P relative to ≤ if for no x ∈ P , is x < y.

Similarly an element y ∈ P is called a maximal member of P relative to the partial ordering ≤ if


for no x ∈ P , is y < x.
Note:

(i). The minimal and maximal members of a partially ordered set need not unique.
(ii). Maximal and minimal elements are easily calculated from the Hasse diagram.
They are the 'top' and 'bottom' elements in the diagram.
Example:

In the Hasse diagram, there are two maximal elements and two minimal elements.
The elements 3, 5 are maximal and the elements 1 and 6 are minimal.
Example: Let A = {a, b, c, d, e} and let the partial
order on A in the natural way.

The element a is maximal.


The elements d and e are minimal.

Upper and Lower Bounds: Let (P, ≤) be a partially ordered set and let A ⊆ P . Any element x ∈ P
is called an upper bound for A if for all a ∈ A, a ≤ x. Similarly, any element x ∈ P is called a

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

lower bound for A if for all a ∈ A, x ≤ a. Example: A = {1, 2, 3, ..., 6} be ordered as pictured in
figure.

If B = {4, 5} then the upper bounds of B are 1, 2, 3. The lower bound of B is 6.


Least Upper Bound and Greatest Lower Bound:
Let (P, ≤) be a partial ordered set and let A ⊆ P . An element x ∈ P is a least upper bound or
supremum for A if x is an upper bound for A and x ≤ y where y is any upper bound for A.
Similarly, the the greatest lower bound or in mum for A is an element x ∈ P such that x is a
lower
bound and y ≤ x for all lower bounds y.
Example: Find the great lower bound and the least upper bound of {b, d, g}, if they exist in the
poset shown in fig:

Solution: The upper bounds of {b, d, g} are g and h. Since g < h, g is the least upper bound. The
lower bounds of {b, d, g} are a and b. Since a < b, b is the greatest lower bound.

Example: Let A = {a, b, c, d, e, f, g, h} denote a partially ordered set whose Hasse diagram is
shown in Fig:

If B = {c, d, e} then f, g, h are upper bounds of B.


The element f is least upper bound.

Example: Consider the poset A = {1, 2, 3, 4, 5, 6, 7, 8} whose Hasse diagram is shown in Fig and
let B = {3, 4, 5}

The elements 1, 2, 3 are lower bounds of B.


3 is greatest lower bound.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Functions
A function is a special case of relation.
Definition: Let X and Y be any two sets. A relation f from X to Y is called a function if for every x
∈ X, there is a unique element y ∈ Y such that (x, y) ∈ f. Note: The definition of function requires
that a relation must satisfies two additional conditions in order to qualify as a function. These
conditions are as follows:
(i) For every x ∈ X must be related to some y ∈ Y , i.e., the domain of f must be X and nor merely
a subset of X.
(ii). Uniqueness, i.e., (x, y) ∈ f and (x, z) ∈ f ⇒ y = z.
The notation f : X → Y , means f is a function from X toY .
Example: Let X = {1, 2, 3}, Y = {p, q, r} and f = {(1, p), (2, q), (3, r)} then f(1) = p, f(2) = q, f(3)
= r. Clearly f is a function from X to Y .

Domain and Range of a Function: If f : X → Y is a function, then X is called the Domain of f and
the set Y is called the codomain of f. The range of f is defined as the set of all images under f.
It is denoted by f(X) = {y| for some x in X, f(x) = y} and is called the image of X in Y . The Range
f is also denoted by Rf .
2
Example: If the function f is defined by f(x)=x + 1 on the set {−2, −1, 0, 1, 2}, find the range of
f.
2
Solution: f(−2) = (−2) + 1 = 5

2
f(−1) = (−1) + 1 = 2

f(0) = 0 + 1 = 1

f(1) = 1 + 1 = 2

f(2) = 4 + 1 = 5

Therefore, the range of f = {1, 2, 5}.

Types of Functions
One-to-one(Injection): A mapping f : X → Y is called one-to-one if distinct elements of X are
mapped into distinct elements of Y , i.e., f is one-to-one if

x1 ≠ x2 ⇒ f(x1) ≠ f(x2)

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

or equivalently f(x1) = f(x2) ⇒ x1 = x2 for x1, x2 ∈ X.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: f : R → R defined by f(x) = 3x, ∀x ∈ R is one-one, since

f(x1) = f(x2) ⇒ 3x1 = 3x2 ⇒ x1 = x2, ∀x1, x2 ∈ R.

Example: Determine whether f : Z → Z given by f(x) = x , x ∈ Z is a one-to-One function.


2

Solution: The function f : Z → Z given by f(x) = x , x ∈ Z is not a one-to-one function. This is


2

because both 3 and -3 have 9 as their image, which is against the definition of a one-to-one
function.

Onto(Surjection): A mapping f : X → Y is called onto if the range set Rf = Y .

If f : X → Y is onto, then each element of Y is f-image of atleast one element of X.


i.e., {f(x) : x ∈ X} = Y .

If f is not onto, then it is said to be into.

Surjective Not Surjective

Example: f : R → R, given by f(x) = 2x, ∀x ∈ R is onto.

Bijection or One-to-One, Onto: A mapping f : X → Y is called one-to-one, onto or bijective if it is


both one-to-one and onto. Such a mapping is also called a one-to-one correspondence between X
and Y .

Example: Show that a mapping f : R → R defined by f(x) = 2x + 1 for x ∈ R is a bijective map


from R to R.
Solution: Let f : R → R defined by f(x) = 2x + 1 for x ∈ R. We need to prove that f is a bijective
map, i.e., it is enough to prove that f is one-one and onto.
 Proof of f being one-to-one
Let x and y be any two elements in R such that f(x) = f(y)
⇒ 2x + 1 = 2y + 1

⇒ x=y

Thus, f(x) = f(y) ⇒ x = y

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

This implies that f is one-to-one.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

 Proof of f being onto


Let y be any element in the codomain R
⇒ f(x) = y

⇒ 2x + 1 = y

⇒ x = (y-1)/2

Clearly, x = (y-1)/2∈ R

Thus, every element in the codomain has pre-image in the domain.


This implies that f is onto
Hence, f is a bijective map.
Identity function: Let X be any set and f be a function such that f : X → X is defined by f(x) = x
for all x ∈ X. Then, f is called the identity function or identity transformation on X. It can be
denoted by I or Ix.

Note: The identity function is both one-to-one and onto.


Let Ix(x) = Ix(y)

⇒x=y
⇒ Ix is one-to-one
Ix is onto since x = Ix(x) for all x.

Composition of Functions
Let f : X → Y and g : Y → Z be two functions. Then the composition of f and g denoted by g ◦ f, is
the function from X to Z defined as

(g ◦ f)(x) = g(f(x)), for all x ∈ X.

Note. In the above definition it is assumed that the range of the function f is a subset of Y (the
Domain of g), i.e., Rf ⊆ Dg. g ◦ f is called the left composition g with f.
Example: Let X = {1, 2, 3}, Y = {p, q} and Z = {a, b}. Also let f : X → Y be f = {(1, p), (2, q), (3,
q) } and g : Y → Z be given by g = {(p, b), (q, b)}. Find g ◦ f. Solution: g ◦ f = {(1, b), (2, b), (3, b).

Example: Let X = {1, 2, 3} and f, g, h and s be the functions from X to X given


by

f = {(1, 2), (2, 3), (3, 1)} g = {(1, 2), (2, 1), (3, 3)}

h = {(1, 1), (2, 2), (3, 1)} s = {(1, 1), (2, 2), (3, 3)}

Find f ◦ f; g ◦ f; f ◦ h ◦ g; s ◦ g; g ◦ s; s ◦ s; and f ◦ s.

Solution:
f ◦ g = {(1, 3), (2, 2), (3, 1)}

g ◦ f = {(1, 1), (2, 3), (3, 2)} ̸= f ◦ g


Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

f ◦ h ◦ g = f ◦ (h ◦ g) = f ◦ {(1, 2), (2, 1), (3, 1)}

= {(1, 3), (2, 2), (3, 2)}

s ◦ g = {(1, 2), (2, 1), (3, 3)} = g

g ◦ s = {(1, 2), (2, 1), (3, 3)}

∴ s◦g=g◦s=g

s ◦ s = {(1, 1), (2, 2), (3, 3)} = s

f ◦ s = {(1, 2), (2, 3), (3, 1)}

Thus, s ◦ s = s, f ◦ g ≠g ◦ f, s ◦ g = g ◦ s = g and h ◦ s = s ◦ h = h.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: Let f(x) = x + 2, g(x) = x − 2 and h(x) = 3x for x ∈ R, where R is the set of real
numbers. Find g ◦ f; f ◦ g; f ◦ f; g ◦ g; f ◦ h; h ◦ g; h ◦ f; and f ◦ h ◦ g.

Solution: f : R → R is defined by f(x) = x + 2

f: R → R is defined by g(x) = x − 2

h : R → R is defined by h(x) = 3x

 g◦f:R→R
Let x ∈ R. Thus, we can write
(g ◦ f)(x) = g(f(x)) = g(x + 2) = x + 2 − 2 = x

∴ (g ◦ f)(x) = {(x, x)| x ∈ R}

 (f ◦ g)(x) = f(g(x)) = f(x − 2) = (x − 2) + 2 = x


∴ f ◦ g = {(x, x)| x ∈ R}

 (f ◦ f)(x) = f(f(x)) = f(x + 2) = x + 2 + 2 = x + 4


∴ f ◦ f = {(x, x + 4)| x ∈ R}

 (g ◦ g)(x) = g(g(x)) = g(x − 2) = x − 2 − 2 = x − 4


⇒ g ◦ g = {(x, x − 4)| x ∈ R}

 (f ◦ h)(x) = f(h(x)) = f(3x) = 3x + 2


∴ f ◦ h = {(x, 3x + 2)| x ∈ R}

 (h ◦ g)(x) = h(g(x)) = h(x − 2) = 3(x − 2) = 3x − 6


∴ h ◦ g = {(x, 3x − 6)| x ∈ R}

 (h ◦ f)(x) = h(f(x)) = h(x + 2) = 3(x + 2) = 3x + 6 h ◦ f =


{(x, 3x + 6)| x ∈ R}

 (f ◦ h ◦ g)(x) = [f ◦ (h ◦ g)](x)
f(h ◦ g(x)) = f(3x − 6) = 3x − 6 + 2 = 3x − 4

∴ f ◦ h ◦ g = {(x, 3x − 4)| x ∈ R}.

Example: What is composition of functions? Let f and g be functions from R to R, where R is a


2
set of real numbers defined by f(x) = x + 3x + 1 and g(x) = 2x − 3. Find the composition of
functions: i) f ◦ f ii) f ◦ g iii) g ◦ f.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Inverse Functions
−1
A function f : X → Y is aid to be invertible of its inverse function f is also function from the

range of f into X.
Theorem: A function f : X → Y is invertible ⇔ f is one-to-one and onto.
Example: Let X = {a, b, c, d} and Y = {(1, 2, 3, 4} and let f : X → Y be given by f = {(a, 1), (b, 2), (c,
−1
2), (d, 3)}. Is f a function?
−1
Solution: f = {(1, a), (2, b), (2, c), (3, d)}. Here, 2 has two distinct images b and c.

Therefore, f−1 is not a function.


Example: Let R be the set of real numbers and f : R → R be given by f = {(x, x2)| x ∈ R}. Is f−1 a
function?

Solution: The inverse of the given function is defined as f−1 = {(x2, x)| x ∈ R}.
Therefore, it is not a function.
Theorem: If f : X → Y and g : Y → X be such that g ◦ f = Ix and f ◦ g = Iy, then f and g are both
−1 −1
invertible. Furthermore, f = g and g = f.

Example: Let X = {1, 2, 3, 4} and f and g be functions from X to X given by f = {(1, 4), (2, 1), (3,

2) , (4, 3)} and g = {(1, 2), (2, 3), (3, 4), (4, 1)}. Prove that f and g are inverses of each other.
Solution: We check that

(g ◦ f)(1) = g(f(1)) = g(4) = 1 = Ix(1), (f ◦ g)(1) = f(g(1)) = f(2) = 1 = Ix(1).


(g ◦ f)(2) = g(f(2)) = g(1) = 2 = Ix(2), (f ◦ g)(2) = f(g(2)) = f(3) = 2 = Ix(2).

(g ◦ f)(3) = g(f(3)) = g(2) = 3= Ix(3), (f ◦ g)(3) = f(g(3)) = f(4) = 3 = Ix(3).

(g ◦ f)(4) = g(f(4)) = g(3) = 4= Ix(4), (f ◦ g)(4) = f(g(4)) = f(1) = 4 = Ix(4).


Thus, for all x ∈ X, (g ◦ f)(x) = Ix(x) and (f ◦ g)(x) = Ix(x). Therefore g is inverse of f and f is
inverse of g.

Example: Show that the functions f(x) = x and g(x) = x for x ∈ R are inverses of one another.
3 1/3
3 1/3
Solution: f : R → R is defined by f(x) = x ; f: R → R is defined by g(x) = x
1/3 3(1/3)
(f ◦ g)(x) = f(g(x)) = f(x )=x = x = Ix(x)
i.e., (f ◦ g)(x) = Ix(x)
3 3(1/3)
and (g ◦ f)(x) = g(f(x)) = g(x ) = x = x = Ix(x)
i.e., (g ◦ f)(x) = Ix(x)
−1 −1
Thus, f = g or g = f

i.e., f and g are inverses of one other.


***Example: f : R → R is defined by f(x) = ax + b, for a, b ∈ R and a ≠ 0. Show that f is
invertible and find the inverse of f.

(i) First we shall show that f is one-to-one


Let x1, x2 ∈ R such that f(x1) = f(x2)
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

⇒ ax1 + b = ax2 + b
⇒ ax1 = ax2

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

⇒ x1 = x2

∴ f is one-to-one.
 To show that f is onto.
Let y ∈ R(codomain) such that y = f(x) for some x ∈ R.

⇒ y = ax + b
⇒ ax = y − b
⇒ x = (y-b)/a

Given y ∈ R(codomain), there exists an element x = (y-b)/a ∈ R such that f(x) = y.

∴ f is onto
−1
⇒ f is invertible and f (x)= (x-b)/a
3 −1
Example: Let f : R → R be given by f(x) = x − 2. Find f .

(i) First we shall show that f is one-to-one


Let x1, x2 ∈ R such that f(x1) = f(x2)

⇒ x 1−2=x 2−
3 3

2⇒ x 1=x 2
3 3

⇒ x1 = x2

∴ f is one-to-one.
 To show that f is onto.
⇒ y=x −2
3

⇒ x = y+2
3

⇒ x= 3 y  2

Given y ∈ R(codomain), there exists an element x = 3 y  2 ∈ R such that f(x) = y.


∴ f is onto
−1
⇒ f is invertible and f (x) = 3 x  2

Floor and Ceiling functions:


Let x be a real number, then the least integer that is not less than x is called the CEILING of x.
The CEILING of x is denoted by ⌈x⌉.
Examples: ⌈2.15⌉ = 3,⌈ √ 5⌉ = 3,⌈ −7.4⌉ = −7, ⌈−2⌉ = −2
Let x be any real number, then the greatest integer that does not exceed x is called the Floor of x.
The FLOOR of x is denoted by ⌊x⌋.
Examples: ⌊5.14⌋ = 5, ⌊ √5⌋ = 2,⌊ −7.6⌋ = −8,⌊6⌋ = 6,⌊ −3⌋ = −3
Example: Let f and g abe functions from the positive real numbers to positive real numbers
Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

defined by f(x) = ⌊2x⌋, g(x) = x . Calculate f ◦ g and g ◦ f.


2
2 2
Solution: f ◦ g(x) = f(g(x)) =f(x )=⌊2x ⌋
2
g ◦ f(x) = g(f(x))=g(⌊2x⌋)=(⌊2x⌋)

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Recursive Function
n n
Total function: Any function f : N → N is called total if it is defined for every n-tuple in N .
Example: f(x, y) = x + y, which is defined for all x, y ∈ N and hence it is a total function.

Partial function: If f : D → N where D ⊆ N , then f is called a partial function.


n

Example: g(x, y) = x − y, which is defined for only x, y ∈ N which satisfy x ≥ y.

Hence g(x, y) is partial.


Initial functions:
The initial functions over the set of natural numbers is given by
 Zero function Z: Z(x) = 0, for all x.
 Successor function S: nS(x) = n x + 1, for all x.
 Projection function U : U (x , x , ..., x ) = x for all n tuples (x , x , ..., x ), 1 ≤
i ≤ n. i i 1 2 n i 1 2 n

Projection function is also called generalized identity function.


For example, U 1(x) = x for every x ∈ N is the identity function.1
1

2 3 3 3
U 1 (x, y) = x, U 1(2, 6, 9) = 2, U (2,
2 6, 9) = 6, U (2,
3 6, 9) = 9.

Composition of functions of more than one variable:


The operation of composition will be used to generate the other function.
Let f1(x, y), f2(x, y) and g(x, y) be any three functions. Then the composition of g with f1 and f2 is
defined as a function h(x, y) given by

h(x, y) = g(f1(x, y), f2(x, y)).

In general, let f1, f2, ..., fn each be partial function of m variables and g be a partial function of n

variables. Then the composition of g with f1, f2, ..., fn produces a partial function h given by

h(x1, x2, ..., xm) = g(f1(x1, x2, ..., xm), ..., fn(x1, x2, ...xm)).

Note: The function h is total iff f1, f2, ..., fn and g are total.
2
Example: Let f1(x, y) = x + y, f2(x, y) = xy + y and g(x, y) = xy. Then

h(x, y) = g(f1(x, y), f2(x, y))


2
= g(x + y, xy + y
2
= (x + y)(xy + y )

Recursion: The following operation which defines a function f(x1, x2, ..., xn, y) of n + 1 variables

by using other functions g(x1, x2, .., xn) and h(x1, x2, ..., xn, y, z) of n and n + 2 variables,
respectively, is called recursion.

f(x1, x2, ..., xn, 0) = g(x1, x2, ..., xn)

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

f(x1, x2, ..., xn, y + 1) = h(x1, x2, ..., xn, y, f(x1, x2, ..., xn, y))
where y is the inductive variable.
Primitive Recursive: A function f is said to be Primitive recursive iff it can be obtained from the
initial functions by a finite number of operations of composition and recursion.

***Example: Show that the function f(x, y) = x + y is primitive recursive. Hence compute the
value of f(2, 4).

Solution: Given that f(x, y) = x + y.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Here, f(x, y) is a function of two variables. If we want f to be defined by recursion, we


need a function g of single variable and a function h of three variables. Now,

f(x, y + 1) = x + (y + 1)

= (x + y) + 1

= f(x, y) + 1.

Also, f(x, 0) = x. We
define f(x, 0) as
1
f(x, 0) = x = U 1(x)

= S(f(x, y))
3
=S(U 3(x, y, f(x, y)))
1 3
If we take g(x) = U1 (x) and h(x, y, z) = S(U3 (x, y, z)), we get f(x, 0) = g(x) and f(x, y + 1) =

h(x, y, z).
1 3
Thus, f is obtained from the initial functions U1 , U3 , and S by applying composition once and
recursion once.
Hence f is primitive recursive.
Here,
f(2, 0) = 2

f(2, 4) = S(f(2, 3))

=S(S(f(2, 2)))

=S(S(S(f(2, 1))))

=S(S(S(S(f(2, 0)))))

=S(S(S(S(2)))))

=S(S(S(3)))

=S(S(4))

=S(5)

=6
Example: Show that f(x, y) = x ∗ y is primitive recursion.
Solution: Given that f(x, y) = x ∗ y.

Here, f(x, y) is a function of two variables. If we want f to be defined by recursion, we


need a function g of single variable and a function h of three variables. Now, f(x, 0) = 0
and
We can write

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

f(x, y + 1) = x  f(x, y) + x

∗ (y + 1) = x
∗y
f(x, 0) = 0 =Z(x) and
3 3
f(x, y + 1) =f1(U3 (x, y, f(x, y)), U1 (x, y, f(x, y)))

where f1(x, y) = x + y, which is primitive recursive. By taking g(x) = Z(x) = 0 and h defined by h(x,
3 3
y, z) = f1(U3 (x, y, z), U1 (x, y, z)) = f(x, y + 1), we see that f defined by recursion. Since g and h
y
are primitive recursive, f is primitive recursive. Example: Show that f(x, y) = x is primitive
0 0
recursive function. Solution: Note that x = 1 for x ≠ 0 and we put x = 0 for x = 0.

=x ∗x
y+1 y
Also, x
y
Here f(x, y) = x is defined as

f(x, 0) = 1 = S(0) = S(Z(x))

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

f(x, y + 1) = x ∗ f(x, y)

 U1 (x, y, f(x, y)) ∗ U3 (x, y, f(x, y))


3 3

h(x, y, f(x, y) = f1(U1 (x, y, f(x, y)), U3 (x, y, f(x, y))) where f1(x, y) = x ∗ y, which is
3 3

primitive recursive.

∴ f(x, y) is a primitive recursive function.

Example: Consider the following recursive function definition: If x < y then f(x, y) = 0, if y ≤ x
then f(x, y) = f(x − y, y) + 1. Find the value of f(4, 7), f(19, 6).

0;x < y
Solution: Given f(x, y)
={ f(x -y,y)+ 1 ; yx

f(4, 7) = 0 [∴ 4 < 7]

f(19, 6) = f(19 − 6, 6) + 1

= f(13, 6) + 1

f(13, 6) = f(13 − 6, 6) + 1

= f(7, 6) + 1

f(7, 6) = f(7 − 6, 6) + 1

= f(1, 6) + 1

=0 + 1
=1
f(13, 6) = f(7, 6) + 1

=1 + 1
=2
f(19, 6) = 2 + 1
=3
Example: Consider the following recursive function definition: If x < y then f(x, y) = 0, if y ≤ x
then f(x, y) = f(x − y, y) + 1. Find the value of f(86, 17)

Permutation Functions
Definition: A permutation is a one-one mapping of a non-empty set onto itself.
Let S = {a1, a2, ..., an} be a finite set and p is a permutation on S, we list the elements of S and
the corresponding functional values of p(a1), p(a2), ..., p(an) in the following form:
 a1 a2 ... an 
p(a ) . . .
 p(a ) 
p(a )
 1 2 n 

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

If p : S → S is a bijection, then the number of elements in the given set is called the degree of its
permutation.
Note: For a set with three elements, we have 3! permutations.

Example: Let S = {1, 2, 3}. The permutations of S are as follows:


1 2 3  1 2 3  1 2 3 1 2 3 1 2 3 1 2 3 
P1= 1 2 3 ; P2= 2 1 3 ; P3= 2 3 1  ; P4= 3 2 1 ; P5= 3 1 2  ; P6=  
          1 3 2 
Example: Let S = {1, 2, 3, 4} and p : S → S be given by f(1) = 2, f(2) = 1, f(3) = 4, f(4) = 3. Write
this in permutation notation.

Solution: The function can be written in permutation notation as given below:

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

 1 2 3 4
f=  

 2 1 4 3 
Identity Permutation: If each element of a permutation be replaced by itself, then such
a permutation is called the identity permutation.
 a1 a2 ... an 
...
Example: Let S = {a1, a2, , an}.then I=  a  is the identity permutation on S.
a a
 1 2 n 

Equality of Permutations: Two permutations f and g of degree n are said to be equal if and only
if f(a) = g(a) for all a ∈ S.

Example: Let S = {1, 2, 3, 4}

 1 2 3 4  4 1 3 2
f=   ;g=  
3 1 2 4 4 3 2 1
   
We have f(1) = g(1) = 3
f(2) = g(2) = 1
f(3) = g(3) = 2
f(4) = g(4) = 4

i.e., f(a) = g(a) for all a ∈ S.

Product of Permutations: (or Composition of Permutations)


 a b ... h   a b ... h 
f (b) ... g(b) ...
Let S={a,b,…h}and let  f (a) f (h) ,g= g(a) 
g(h)
   
We define the composite of f and g as follows:
 a b ... ha b ... h 
f (b) ... g(b) ...
f ◦ g =  o 
f (a) f (h) g(a) g(h)
   
 a b ... h 
=  f (g(b)) ... 

 f (g(a)) f (g(h))
Clearly, f ◦ g is a permutation. 
1 2 3 4  1 2 3 4
Example: Let S = {1, 2, 3, 4} and let f =   and g =   Find f ◦ g and g ◦

 2 1 4 3  4 1 2 3
f in the permutation from.
1 2 3 4 1 2 3 4
Solution: f ◦ g =   ;g ◦ f =  
3 2 4 1

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

  1 3 4 2  
Note: The product of two permutations of degree n need not be commutative.
Inverse of a Permutation:
 a1 a2 ... an 
If f is a permutation on S = {a1, a2, , an} such that f   
b b .... b
 1 2 n 

−1 −1 −1
then there exists a permutation called the inverse f, denoted f such that f ◦ f =f ◦f=

I (the identity permutation on S)

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

1 b1 b2 ... bn 
where f   a2 ... 

a1 a n 


1 −1
Example: If f =  2 3 4 −1 , and show that f =f
◦f = I
2  , then find f −1
4 3 1 ◦f

−1 2 4 3 1  1 2 3 4
Solution: f =   = 
1 2 3 4  4 1 3 2

 −1 1 2 3 4 1 2 3 4  1 2 3 4
f ◦f = 
2 4 3 1  o4 1 3 2 =  
2 3 4
    1 

−1 −1 −1
Similarly, f ◦ f = I.⇒ f ◦ f =f ◦ f = I.

Cyclic Permutation: Let S = {a1, a2, ..., an} be a finite set of n symbols. A permutation f defined
on S is said to be cyclic permutation if f is defined such that

f(a1) = a2, f(a2) = a3, ..... , f(an−1) = an and f(an) = a1.

Example: Let S = {1, 2, 3, 4}.

1 2 3 4
Then   =(1 4)(2 3) is a cyclic permutation.
4 3 2 1

Disjoint Cyclic Permutations: Let S = {a1, a2, ..., an}. If f and g are two cycles on S such that
they have no common elements, then f and g are said to be disjoint cycles.

Example: Let S = {1, 2, 3, 4, 5, 6}.

If f = (1 4 5) and g = (2 3 6) then f and g are disjoint cyclic permutations on S.


Note: The product of two disjoint cycles is commutative.
1 2 3 4 5 6 7 
Example: Consider the permutation f =  
2 3 4 5 1 7 6

The above permutation f can be written as f = (1 2 3 4 5)(6 7). Which is a product of two disjoint
cycles.

Transposition: A cyclic of length 2 is called a transposition.

Note: Every cyclic permutation is the product of

transpositions.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

1 2 3 4 5
Example: f = 
2 4 5 1  =(1 2 4)(3 5) = (1 4)(1 2)(3 5).
3

Inverse of a Cyclic Permutation: To find the inverse of any cyclic permutation, we write its
elements in the reverse order.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

−1
For example, (1 2 3 4) = (4 3 2 1).
Even and Odd Permutations: A permutation f is said to be an even permutation if f can be
expressed as the product of even number of transpositions.

A permutation f is said to be an odd permutation if f is expressed as the product of odd number of


transpositions.
Note:

(i) An identity permutation is considered as an even permutation.


(ii) A transposition is always odd.
(iii). The product of an even and an odd permutation is odd. Similarly the product of an
odd permutation and even permutations is odd.

Example: Determine whether the following permutations are even or odd permutations.
1 2 3 4 5
(i) f=  
2 4 3 1 5 

1 2 3 4 5 6 7 8
(ii) g =  
2 5 7 8 6 1 4 3 
1 2 3 4 5
(iii) h=  
4 3 1 2 5 
1 2 3 4 5
Solution: (i). For f =   = (1 2 4) = (1 4)(1 2)
2 4 3 1 5

⇒ f is an even permutation

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

1
2 3 4 5 6 7 8
(ii). For g =  
5 7 8 6 1 4 3
2
= (1 2 5 6)(3 7 4 8) = (1 6)(1 5)(1 2)(3 8)(3 4)(3 7)
⇒ g is an even permutation.
1 5
(iii) h=  2 3 4
4 3 1 2  = (1 4 2 3) = (1 3)(1 2)(1 4)
5

Product of three transpositions

⇒ h is an odd permutation.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Lattices
In this section, we introduce lattices which have important applications in the theory and design
of computers.
Definition: A lattice is a partially ordered set (L, ≤) in which every pair of elements a, b ∈ L has
a greatest lower bound and a least upper bound.
+
Example: Let Z denote the set of all positive integers and let R denote the relation ‘division‘ in
Z , such that for any two elements a, b ∈ Z , aRb, if a divides b. Then (Z , R) is a lattice in
+ + +

which the join of a and b is the least common multiple of a and b, i.e.
a ∨ b = a ⊕ b = LCM of a and b,

and the meet of a and b, i.e. a ∗ b is the greatest common divisor (GCD) of a and b i.e.,
a ∧ b = a ∗ b = GCD of a and b.

We can also write a+b = a∨b = a⊕b=LCM of a and b and a.b = a∧b = a∗b=GCD of a and b.
Example: Let n be a positive integer and Sn be the set of all divisors of n If n = 30, S30 = {1, 2,

3, 5, 6, 10, 15, 30}. Let R denote the relation division as defined in Example 1. Then (S30, R) is
a Lattice see Fig:

Example: Let A be any set and P (A) be its power set. The poset P (A), ⊆) is a lattice in which the
meet and join are the same as the operations ∩ and ∪ on sets respectively.
S = {a}, P (A) = {ϕ, {a}}

S = {a, b}, P (A) = {ϕ, {a}, {a}, S}.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Some Properties of Lattice


Let (L, ≤) be a lattice and ∗ and ⊕ denote the two binary operation meet and join on (L, ≤). Then
for any a, b, c ∈ L, we have
(L1): a∗a = a, (L1)′ : a ⊕a = a (Idempotent laws)

(L2): b∗a = b∗a, (L2) : a ⊕b = b + a (Commutative laws)

(L3) : (a∗b)∗c = a∗(b∗c), (L3)′ : (a⊕b)⊕c = a ⊕(b + c) (Associative laws)



(L4) : a∗(a + b) = a,(L4) : a⊕(a ∗b) = a (Absorption laws).

The above properties (L1) to (L4) can be proved easily by using definitions of meet and
′ ′
join. We can apply the principle of duality and obtain (L1) to (L4) .
Theorem: Let (L, ≤) be a lattice in which ∗ and ⊕ denote the operations of meet and join
respectively. For any a, ∈ L, a ≤ b ⇔ a ∗ b = a ⇔ a ⊕ b = b.

Proof: We shall first prove that a ≤ b ⇔ a ∗ b = b.

In order to do this, let us assume that a ≤ b. Also, we know that a ≤ a.


Therefore a ≤ a ∗ b. From the definition of a ∗ b, we have a ∗ b ≤ a.

Hence a ≤ b ⇒ a ∗ b = a.

Next, assume that a ∗ b = a; but it is only possible if a ≤ b, that is, a ∗ b = a ⇒ a ≤ b.


Combining these two results, we get the required equivalence.
It is possible to show that a ≤ b ⇔ a ⊕ b = b in a similar manner.

Alternatively, from a ∗ b = a, we have


b ⊕ (a ∗ b) = b ⊕ a = a ⊕ b

but b ⊕ (a ∗ b) = b

Hence a ⊕ b = b follows from a ∗ b = a.

By repeating similar steps, we can show that a ∗ b = a follows from a ⊕ b = b.


Therefore a ≤ b ⇔ a ∗ b = a ⇔ a ⊕ b = b.
a*ba*c
Theorem: Let (L, ≤) be a lattice. Then b  c 

a  b  a  c
Proof: By above theorem a ≤ b ⇔ a ∗ b = a ⇔ a ⊕ b = b.

To show that a ∗ b ≤ a ∗ c, we shall show that (a ∗ b) ∗ (a ∗ c) = a ∗ b

(a ∗ b) ∗ (a ∗ c) = a ∗ (b ∗ a) ∗ c

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

= a ∗ (a ∗ b) ∗ c

= (a ∗ a) ∗ (b ∗ c)

= a ∗ (b ∗ c)

=a∗b

∴ If b ≤ c then a ∗ b ≤ a ∗ c.Next, let b ≤ c ⇒ b ⊕ c = c.

To show that a ⊕ b ≤ a ⊕ c. It sufficient to show that (a ⊕ b) ⊕ (a ⊕ c) = a ⊕ c.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Consider,(a ⊕ b) ⊕ (a ⊕ c) = a ⊕ (b ⊕ a) ⊕ c

= a ⊕ (a ⊕ b) ⊕ c

= (a ⊕ a) ⊕ (b ⊕ c)

= a ⊕ (b ⊕ c)

=a⊕ b

∴ If b ≤ c then a ⊕ b ≤ a ⊕ c.

Note: The above properties of a Lattice are called properties of Isotonicity.


Lattice as an algebraic system:
We now define lattice as an algebraic system, so that we can apply many concepts
associated with algebraic systems to lattices.
Definition: A lattice is an algebraic system (L, ∗,⊕) with two binary operation ‗∗‘and ‗⊕‘ on L
which are both commutative and associative and satisfy absorption laws.
Bounded Lattice:
A bounded lattice is an algebraic structure (L,,,0,1) sucha that (L,,) is a lattice, and the
constants 0,1∈ L satisfy the following:
1. for all x∈ L, x1=x and x1=1
2. for all x∈ L, x0=0 and x0=x.
The element 1 is called the upper bound, or top of L and the element 0 is called the lower bound
or bottom of L.
Distributive lattice:
A lattice (L,∨,∧) is distributive if the following additional identity holds for all x, y, and z in L: x
∧ (y ∨ z) = (x ∧ y) ∨ (x ∧ z)

Viewing lattices as partially ordered sets, this says that the meet peration preserves nonempty
finite joins. It is a basic fact of lattice theory that the above condition is equivalent to its dual
x ∨ (y ∧ z) = (x ∨ y) ∧ (x ∨ z) for all x, y, and z in L.

Example: Show that the following simple but significant lattices are not distributive.

Solution a) To see that the diamond lattice is not distributive, use the middle elements of the
lattice: a ∧ (b ∨ c) = a ∧ 1 = a, but (a ∧ b) ∨ (a ∧ c) = 0 ∨ 0 = 0, and a ≠0.
Similarly, the other distributive law fails for these three elements.
b) The pentagon lattice is also not distributive

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: Show that lattice is not a distributive lattice.

Sol. A lattice is distributive if all of its elements follow distributive property so let we verify the
distributive property between the elements n, l and m.
GLB(n, LUB(l, m)) = GLB(n, p) [∴ LUB(l, m) = p]
= n (LHS)

also LUB(GLB(n, l), GLB(n, m)) = LUB(o, n); [∴ GLB(n, l) = o and GLB(n, m) = n]
= n (RHS)
so LHS = RHS.
But GLB(m, LUB(l, n)) = GLB(m, p) [∴ LUB(l, n) = p]
= m (LHS)

also LUB(GLB(m, l), GLB(m, n)) = LUB(o, n); [∴ GLB(m, l) = o and GLB(m, n) = n]
= n (RHS)
Thus, LHS ≠ RHS hence distributive property doesn‘t hold by the lattice so lattice is not
distributive.
Example: Consider the poset (X, ≤ ) where X = {1, 2, 3, 5, 30} and the partial ordered relation ≤
is defined as i.e. if x and y ∈X then x ≤ y means ‗x divides y‘. Then show that poset (I+, ≤) is a
lattice.
Sol. Since GLB(x, y) = x ∧ y = lcm(x, y)
and LUB(x, y) = x ∨ y = gcd(x, y)
Now we can construct the operation table I and table II for GLB and LUB respectively and the
Hasse diagram is shown in Fig.

Test for distributive lattice, i.e.,


GLB(x, LUB(y, z)) = LUB(GLB(x, y), GLB(x, z))
Assume x = 2, y = 3 and z = 5, then
RHS:GLB(2, LUB(3, 5)) = GLB(2, 30) = 2
LHS: LUB(GLB(2, 3), GLB(2, 5)) = LUB(1, 1) = 1
SinceRHS ≠ LHS, hence lattice is not a distributive lattice.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Complemented lattice:

A complemented lattice is a bounded lattice (with least element 0 and greatest element 1), in
which every element a has a complement, i.e. an element b satisfying a ∨ b = 1 and a ∧ b = 0.
Complements need not be unique.
Example: Lattices shown in Fig (a), (b) and (c) are complemented lattices.

Sol.
For the lattice (a) GLB(a, b) = 0 and LUB(x, y) = 1. So, the complement a is b and vise versa.
Hence, a complement lattice.

For the lattice (b) GLB(a, b) = 0 and GLB(c, b) = 0 and LUB(a, b) = 1 and LUB(c, b) = 1; so
both a and c are complement of b.
Hence, a complement lattice.

In the lattice (c) GLB(a, c) = 0 and LUB(a, c) = 1; GLB(a, b) = 0 and LUB(a, b) = 1. So,
complement of a are b and c.
Similarly complement of c are a and b also a and c are complement of b.
Hence lattice is a complement lattice.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Algebraic Structures
Algebraic Systems with One Binary Operation
Binary Operation
Let S be a non-empty set. If f : S × S → S is a mapping, then f is called a binary
operation or binary composition in S.
The symbols +, ·, ∗, ⊕ etc are used to denote binary operations on a set.
 For a, b ∈ S ⇒ a + b ∈ S ⇒ + is a binary operation in S.
 For a, b ∈ S ⇒ a · b ∈ S ⇒ · is a binary operation in S.
 For a, b ∈ S ⇒ a ◦ b ∈ S ⇒ ◦ is a binary operation in S.
 For a, b ∈ S ⇒ a ∗ b ∈ S ⇒ ∗ is a binary operation in S.
 This is said to be the closure property of the binary operation and the set S is said to be
closed with respect to the binary operation.
Properties of Binary Operations

Commutative: ∗ is a binary operation in a set S. If for a, b ∈ S, a ∗ b = b ∗ a, then ∗ is said to be


commutative in S. This is called commutative law.
Associative: ∗ is a binary operation in a set S. If for a, b, c ∈ S, (a∗b)∗c = a∗(b∗c), then ∗ is said to
be associative in S. This is called associative law.
Distributive: ◦, ∗ are binary operations in S. If for a, b, c ∈ S, (i) a ◦ (b ∗ c) = (a ◦ b) ∗ (a ◦ c), (ii) (b
∗ c) ◦ a = (b ◦ a) ∗ (c ◦ a), then ◦ is said to be distributive w.r.t the operation ∗.
Example: N is the set of natural numbers.
(i) +, · are binary operations in N, since for a, b ∈ N, a + b ∈ N and a · b ∈ N. In
other words N is said to be closed w.r.t the operations + and ·.

(ii) +, · are commutative in N, since for a, b ∈ N, a + b = b + a and a · b = b · a.

(iii) +, · are associative in N, since for a, b, c ∈ N,

a + (b + c) = (a + b) + c and a · (b · c) = (a · b) · c.

(iv) is distributive w.r.t the operation + in N, since for a, b, c ∈ N, a · (b + c) = a · b + a ·


c and (b + c) · a = b · a + c · a.
(v) The operations subtraction (−) and division (÷) are not binary operations in N, since
for 3, 5 ∈ N does not imply 3 − 5 ∈ N and 5 ∈ N.
3

Example: A is the set of even integers.


(i) +, · are binary operations in A, since for a, b ∈ A, a + b ∈ A and a · b ∈ A.

(i) +, · are commutative in A, since for a, b ∈ A, a + b = b + a and a · b = b · a.

(ii) +, · are associative in A, since for a, b, c ∈ A,

a + (b + c) = (a + b) + c and a · (b · c) = (a · b) · c.

(iv) · is distributive w.r.t the operation + in A, since for a, b, c ∈ A, a ·

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

(b + c) = a · b + a · c and (b + c) · a = b · a + c · a.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: Let S be a non-empty set and ◦ be an operation on S defined by a ◦ b = a for a, b ∈ S.


Determine whether ◦ is commutative and associative in S.
Solution: Since a ◦ b = a for a, b ∈ S and b ◦ a = b for a, b ∈ S.

⇒ a ◦ b ≠ b ◦ a.

∴ ◦ is not commutative in S.
Since (a ◦ b) ◦ c = a ◦ c = a

a ◦ (b ◦ c) = a ◦ b = a for a, b, c ∈ S.

∴ ◦ is associative in S.
Example: ◦ is operation defined on Z such that a ◦ b = a + b − ab for a, b ∈ Z. Is the operation ◦ a
binary operation in Z? If so, is it associative and commutative in Z?
Solution: If a, b ∈ Z, we have a + b ∈ Z, ab ∈ Z and a + b − ab ∈ Z.

⇒ a ◦ b = a + b − ab ∈ Z.

∴ ◦ is a binary operation in Z.
⇒ a ◦ b = b ◦ a.

∴ ◦ is commutative in Z.
Now
(a ◦ b) ◦ c = (a ◦ b) + c − (a ◦ b)c

= a + b − ab + c − (a + b − ab)c
and
=a + b − ab + c − ac − bc + abc

a ◦ (b ◦ c) = a + (b ◦ c) − a(b ◦ c)

=a + b + c − bc − a(b + c − bc)

=a + b + c − bc − ab − ac + abc

=a + b − ab + c − ac − bc + abc

⇒ (a ◦ b) ◦ c = a ◦ (b ◦ c). ∴
◦ is associative in Z.
′ ′
Example: Fill in blanks in the following composition table so that ◦ is associative in S = {a,b,c,d}.
◦ a b c d
a a b c d
b b a c d
c c d c d
d

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Solution: d ◦ a = (c ◦ b) ◦ a[∵ c ◦ b = d]

=c ◦ (b ◦ a) [∵ ◦ is associative]

=c ◦ b

=d

d ◦ b = (c ◦ b) ◦ b = c ◦ (b ◦ b) = c ◦ a = c. d
◦ c = (c ◦ b) ◦ c = c ◦ (b ◦ c) = c ◦ c = c.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

d ◦ d = (c ◦ b) ◦ (c ◦ b)

=c ◦ (b ◦ c) ◦ b

=c ◦ c ◦ b

=c ◦ (c ◦ b)

=c ◦ d

=d

Hence, the required composition table is

◦ a b c d
a a b c d
b b a c d
c c d c d
d d c c d

Example: Let P (S) be the power set of a non-empty set S. Let ∩ be an operation in P (S). Prove
that associative law and commutative law are true for the operation in P (S).

Solution: P(S)= Set of all possible subsets of S.


Let A,B ∈ P(S).

Since A ⊆ S, B ⊆ S ⇒ A ∩ B ⊆ S ⇒ A ∩ B ∈ P(S).

∴ ∩ is a binary operation in P (S).


Also A ∩ B = B ∩ A

∴ ∩ is commutative in P (S).
Again A ∩ B, B ∩ C, (A ∩ B) ∩ C and A ∩ (B ∩ C) are subsets of S.

∴ (A ∩ B) ∩ C, A ∩ (B ∩ C) ∈ P (S).

Since (A ∩ B) ∩ C = A ∩ (B ∩ C)

∴ ∩ is associative in P (S).
Algebraic Structures
Definition: A non-empty set G equipped with one or more binary operations is called an
algebraic structure or an algebraic system.

If ◦ is a binary operation on G, then the algebraic structure is written as (G, ◦).


Example: (N, +), (Q, −), (R, +) are algebraic structures.
Semi Group
Definition: An algebraic structure (S, ◦) is called a semi group if the binary oper-ation ◦ is
associative in S.
That is, (S, ◦) is said to be a semi group if
(i) a, b ∈ S ⇒ a ◦ b ∈ S for all a, b ∈ S

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

(ii) (a ◦ b) ◦ c = a ◦ (b ◦ c) for all a, b, c ∈ S.


Example:
1. (N, +) is a semi group. For a, b ∈ N ⇒ a + b ∈ N and a, b, c ∈ N ⇒ (a + b) + c =a+ (b + c). 2.
(Q, −) is not a semi group. For 5,3/2 , 1 ∈ Q does not imply (5 – 3/2 ) −1 = 5 −(3/2 −1).

3. (R, +) is a semi group. For a, b ∈ R ⇒ a + b ∈ R and a, b, c ∈ R ⇒ (a + b) + c = a+ (b + c).

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: The operation ◦ is defined by a ◦ b = a for all a, b ∈ S. Show that (S, ◦) is a semi group.
Solution: Let a, b ∈ S ⇒ a ◦ b = a ∈ S.

∴ ◦ is a binary operation in S. Let a, b, c ∈ S, a ◦ (b ◦ c) = a ◦ b = a

(a ◦ b) ◦ c = a ◦ c = a.

⇒ ◦ is associative in S.

∴ (S, ◦) is a semi group.


Example: The operation ◦ is defined by a ◦ b = a + b − ab for all a, b ∈ Z. Show that (Z, ◦) is a
semi group.

Solution: Let a, b ∈ Z ⇒ a ◦ b = a + b − ab ∈ Z.

∴ ◦ is a binary operation in Z.
Let a, b, c ∈ Z.

(a ◦ b) ◦ c = (a + b − ab) ◦ c

=a + b − ab + c − (a + b − ab)c

=a + b + c − ab − bc − ac + abc

a ◦ (b ◦ c) = a ◦ (b + c − bc)
abc ⇒ (a ◦ b) ◦ c = a ◦ (b ◦ c).
=a + (b + c − bc) − a(b + c − bc)

=a + b + c − bc − ab − ac +

⇒ ◦ is associative in Z. ∴ (Z, ◦) is semi group.

Example: (P (S), ∩) is a semi group, where P (S) is the power set of a non-empty set S.
Solution: P (S)= Set of all possible subsets of S.
Let A, B ∈ P (S).

Since A ⊆ S, B ⊆ S ⇒ A ∩ B ⊆ S ⇒ A ∩ B ∈ P (S).

∴ ∩ is a binary operation in P (S). Let A, B, C ∈ P (S).

∴ (A ∩ B) ∩ C, A ∩ (B ∩ C) ∈ P (S). Since (A ∩ B) ∩ C

= A ∩ (B ∩ C)

∴ ∩ is associative in P (S).
Hence (P (S), ∩) is a semi group.
Example: (P (S), ∪) is a semi group, where P (S) is the power set of a non-empty set S.
Solution: P (S)= Set of all possible subsets of S.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Let A, B ∈ P (S).

Since A ⊆ S, B ⊆ S ⇒ A ∪ B ⊆ S ⇒ A ∪ B ∈ P (S).
∴ ∪ is a binary operation in P (S). Let A, B, C ∈ P (S).
∴ (A ∪ B) ∪ C, A ∪ (B ∪ C) ∈ P (S). Since (A ∪ B) ∪ C = A ∪ (B ∪ C)
∴ ∪ is associative in P (S).
Hence (P (S), ∪) is a semi group.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: Q is the set of rational numbers, ◦ is a binary operation defined on Q such that a ◦ b = a
− b + ab for a, b ∈ Q. Then (Q, ◦) is not a semi group.
Solution: For a, b, c ∈ Q,

(a ◦ b) ◦ c = (a ◦ b) − c + (a ◦ b)c
=a − b + ab − c + (a − b + ab)c

=a − b + ab − c + ac − bc + abc a
◦ (b ◦ c) = a − (b ◦ c) + a(b ◦ c)

=a − (b − c + bc) + a(b − cbc)


=a − b + c − bc + ab − ac + abc.

Therefore, (a ◦ b) ◦ c ≠ a ◦ (b ◦ c).

Example: Let (A, ∗) be a semi group. Show that for a, b, c in A if a ∗ c = c ∗ a and b ∗ c = c ∗ b,


then (a ∗ b) ∗ c = c ∗ (a ∗ b).

Solution: Given (A, ∗) be a semi group, a ∗ c = c ∗ a and b ∗ c = c ∗ b.


Consider

(a ∗ b) ∗ c = a ∗ (b ∗ c) [∵ A is seme group]

=a ∗ (c ∗ b) [∵ b ∗ c = c ∗ b]

=(a ∗ c) ∗ b [∵ A is seme group]

=(c ∗ a) ∗ b [∵ a ∗ c = c ∗ a]

=c ∗ (a ∗ b) [∵ A is seme group].

Homomorphism of Semi-Groups
Definition: Let (S, ∗) and (T, ◦) be any two semi-groups. A mapping f : S → T such that for any
two elements a, b ∈ S, f(a ∗ b) = f(a) ◦ f(b) is called a semi-group homomorphism.

Definition: A homomorphism of a semi-group into itself is called a semi-group en-domorphism.


Example: Let (S1, ∗1), (S2, ∗2) and (S3, ∗3) be semigroups and f : S1 → S2 and g : S2 → S3 be
homomorphisms. Prove that the mapping of g ◦ f : S1 → S3 is a semigroup homomorphism.

Solution: Given that (S1, ∗1), (S2, ∗2) and (S3, ∗3) are three semigroups and f : S1 →

S2 and g : S2 → S3 be homomorphisms.
Let a, b be two elements of S1.

(g ◦ f)(a ∗1 b) = g[f(a ∗1 b)]

= g[f(a) ∗2 f(b)] (∵ f is a homomorphism)


Downloaded by Sivahari R ([email protected])
lOMoARcPSD|28881680

= g(f(a)) ∗3 g(f(b)) (∵ g is a homomorphism)

=(g ◦ f)(a) ∗3 (g ◦ f)(b)

∴ g ◦ f is a homomorphism.

Identity Element: Let S be a non-empty set and ◦ be a binary operation on S. If there exists an
element e ∈ S such that a ◦ e = e ◦ a = a, for a ∈ S, then e is called an identity element of S.

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example:
(i) In the algebraic system (Z, +), the number 0 is an identity element.
(ii) In the algebraic system (R, ·), the number 1 is an identity element.
Note: The identity element of an algebraic system is unique.

Monoid
Definition: A semi group (S, ◦) with an identity element with respect to the binary operation ◦
is known as a monoid. i.e., (S, ◦) is a monoid if S is a non-empty set and ◦ is a binary
operation in S such that ◦ is associative and there exists an identity element w.r.t ◦.
Example:
1. (Z, +) is a monoid and the identity is 0.
2. (Z, ·) is a monid and the identity is 1.

Monoid Homomorphism
Definition: Let (M, ∗) and (T, ◦) be any two monoids, em and et denote the identity
elements of (M, ∗) and (T, ◦) respectively. A mapping f : M → T such that for any two
elements a, b ∈ M,

f(a ∗ b) = f(a) ◦ f(b) and

f(em) = et
is called a monoid homomorphism.

Monoid homomorphism presents the associativity and identity. It also preserves


−1 −1
commutative. If a ∈ M is invertible and a ∈ M is the inverse of a in M, then f(a ) is the
−1 −1
inverse of f(a), i.e., f(a ) = [f(a)] .

Sub Semi group


Let (S, ∗) be a semi group and T be a subset of S. Then (T, ∗) is called a sub semi group of (S,
∗) whenever T is closed under ∗. i.e., a ∗ b ∈ T, for all a, b ∈ T .

Sub Monoid
Let (S,∗) be a monoid with e is the identity element and T be a non-empty subset of S.
Then (T, ∗) is the sub monoid of (S, ∗) if e ∈ T and a ∗ b ∈ T , whenever a, b ∈ T . Example:

1. Under the usual addition, the semi group formed by positive integers is a sub semi group of
all integers.
2. Under the usual addition, the set of all rational numbers forms a monoid. We denote it (Q,
+). The monoid (Z, +) is a submonid of (Q, +).
3. Under the usual multiplication, the set E of all even integers forms a semi group.
This semi group is sub semi group of (Z, ·). But it is not a submonoid of (Z, ·), because 1≠ E.

Example: Show that the intersection of two submonoids of a monoid is a monoid.


Solution: Let S be a monoid with e as the identity, and S1 and S2 be two submonoids of S.
86

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Since S1 and S2 are submonoids, these are monoids. Therefore e ∈ S1 and e ∈ S2.

87

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Since S1 ∩S2 is a subset of S, the associative law holds in S1 ∩S2, because it holds in S.
Accordingly S1 ∩ S2 forms a monoid with e as the identity.

Invertible Element: Let (S,◦) be an algebraic structure with the identity element e in S w.r.t

◦. An element a ∈ S is said to be invertible if there exists an element x∈ S such that a ◦ x = x ◦


a = e.

Note: The inverse of an invertible element is unique.


From the composition table, one can conclude
1. Closure Property: If all entries in the table are elements of S, then S closed under ◦.
2. Commutative Law: If every row of the table coincides with the corresponding column,
then ◦ is commutative on S.
3. Identity Element: If the row headed by an element a of S coincides with the top row, then a
is called the identity element.
4. Invertible Element: If the identity element e is placed in the table at the intersection of the
′ ′ ′ ′ −1 −1
row headed by a and the column headed by b , then b = a and a = b.
2
Example: A = {1, ω, ω }.
2
· 1 ω ω

1 1 ω ω2
2
ω ω ω 1

ω2 ω2 1 ω
From the table we conclude that
1. Closure Property: Since all entries in the table are elements of A. So, closure property is
satisfied.
st nd rd st nd rd
2. Commutative Law: Since 1 , 2 and 3 rows coincides with 1 , 2 and 3 columns
respectively. So multiplication is commutative on A.
3. Identity Element: Since row headed by 1 is same as the initial row, so 1 is the identity
element.
−1 −1 2 2 −1
4. Inverses: Clearly 1 = 1, ω = ω , (ω ) = ω.

Groups
Definition: If G is a non-empty set and ◦ is a binary operation defined on G such that the
following three laws are satisfied then (G, ◦) is a group.
Associative Law: For a, b, c ∈ G, (a ◦ b) ◦ c = a ◦ (b ◦ c)

Identity Law: There exists e ∈ G such that a ◦ e = a = e ◦ a for every a ∈ G, e is called an


identity element in G.

Inverse Law: For each a ∈ G, there exists an element b ∈ G such that a◦b = b◦a = e, b is called
an inverse of a.

Example: The set Z of integers is a group w.r.t. usual addition.


(i). For a, b ∈ Z ⇒ a + b ∈ Z

88

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

(ii). For a, b, c ∈ Z, (a + b) + c = a + (b + c)
(iii). 0 ∈ Z such that 0 + a = a + 0 = a for each a ∈ G

89

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

∴ 0 is the identity element in Z.


(iv). For a ∈ Z, there exists −a ∈ Z such that a + (−a) = (−a) + a = 0.
∴ −a is the inverse of a. (Z, +) is a
group.
Example: Give an example of a monoid which is not a group.
Solution: The set N of natural numbers w.r.t usual multiplication is not a group.
(i). For a, b ∈ N ⇒ a · b.
(ii). For a, b, c ∈ N, (a · b) · c = a · (b · c).
(iii). 1 ∈ N such that 1 · a = a · 1 = a, for all a ∈ N.
∴ (N, ·) is a monoid.
(iv). There is no n ∈ N such that a · n = n · a = 1 for a ∈ N.
∴ Inverse law is not true.
∴ The algebraic structure (N, ·) is not a group.
Example: (R, +) is a group, where R denote the set of real numbers.
Abelian Group (or Commutative Group): Let (G, ∗) be a group. If ∗ is com-mutative that is
a ∗ b = b ∗ a for all a, b ∈ G then (G, ∗) is called an Abelian group.
Example: (Z, +) is an Abelian group.
2 2
Example: Prove that G = {1, ω, ω } is a group with respect to multiplication where 1, ω, ω

are cube roots of unity.


Solution: We construct the composition table as follows:

2
· 1 ω ω
2
1 1 ω ω
2 3
ω ω ω ω =1
2 2 3 4
ω ω ω =1 ω =ω
3
The algebraic system is (G, ·) where ω = 1 and multiplication · is the binary opera-tion on G.
From the composition table; it is clear that (G, ·) is closed with respect to the oper-ation
multiplication and the operation · is associative.
1 is the identity element in G such that 1 · a = a = a · 1, ∀ a ∈ G.

Each element of G is invertible


1. 1· 1 = 1 ⇒ 1 is its own inverse.
2 3 2 2
2. ω · ω = ω = 1 ⇒ ω is the inverse of ω and ω is the inverse of ω in G.
∴ (G, ·) is a group and a · b = b · a, ∀a, b ∈ G, that is commutative law holds in

G with respect to multiplication.


∴ (G, ·) is an abelian group.

90

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: Show that the set G = {1, −1, i, −i} where i = 1 is an abelian group with respect

to multiplication as a binary operation. Solution: Let us construct the composition table:

· 1 −1 i −i
1 1 −1 i −i
-1 −1 1 −i i
i i −i −1 1
−i −i i 1 -1

From the above composition, it is clear that the algebraic structure (G, ·) is closed and
satisfies the following axioms:
Associativity: For any three elements a, b, c ∈ G, (a · b) · c = a · (b · c).
Since

1 · (−1 · i) = 1 · −i = −i

(1 · −1) · i = −1 · i = −i

⇒ 1 · (−1 · i) = (1 · −1) · i
Similarly with any other three elements of G the properties holds.
∴ Associative law holds in (G, ·).
Existence of identity: 1 is the identity element in (G, ·) such that 1 · a = a = a · 1, ∀ a ∈ G.
Existence of inverse: 1 · 1 = 1 = 1 · 1 ⇒ 1 is inverse of 1.
(−1) · (−1) = 1 = (−1) · (−1) ⇒ −1 is the inverse of (−1)

i · (−i) = 1 = −i · i ⇒ −i is the inverse of i in G.

−i · i = 1 = i · (−i) ⇒ i is the inverse of −i in G.


Hence inverse of every element in G exists.

Thus all the axioms of a group are satisfied.


Commutativity: a · b = b · a, ∀a, b ∈ G hold in G.

1 · 1 = 1 = 1 · 1; − 1 · 1 = −1 = 1 · −1

i · 1 = i = 1 · i; i · −i = −i · i = 1 etc.

Commutative law is satisfied.


Hence (G, ·) is an abelian group.
Example: Prove that the set Z of all integers with binary operation ∗ defined by a ∗ b = a + b
+ 1, ∀ a, b ∈ Z is an abelian group. Solution:

Closure: Let a, b ∈ Z. Since a + b ∈ Z and a + b + 1 ∈ Z.


91

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

∴ Z is closed under ∗.
Associativity: Let a, b, c ∈ Z.

Consider (a ∗ b) ∗ c = (a + b + 1) ∗ c

=a + b + 1 + c + 1

=a + b + c + 2

also

92

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

a ∗ (b ∗ c) = a ∗ (b + c + 1)
=a + b + c + 1 + 1

=a + b + c + 2
Hence (a ∗ b) ∗ c = a ∗ (b ∗ c) for a, b, c ∈ Z.

Existence of Identity: Let a ∈ Z. Let e ∈ Z such that e ∗ a = a ∗ e = a, i.e., a + e + 1

=a

⇒ e = −1

e = −1 is the identity element in Z.


Existence of Inverse: Let a ∈ Z. Let b ∈ Z such that a ∗ b = e.

⇒ a + b + 1 = −1
b = −2 − a

∴ For every a ∈ Z, there exits −2−a ∈ Z such that a∗(−2−a) = (−2−a)∗a = −1.

∴ (Z, ∗) is an abelian group.


Example: Show that the set Q+ of all positive rational numbers forms an abelian group under
the composition defined by ◦ such that a ◦ b = ab/3 for a, b ∈ Q+. Solution: Q+ of the set of all
positive rational numbers and for a, b ∈ Q+, we have the operation ◦ such that a ◦ b = ab/3.
Associativity: a, b, c ∈ Q+⇒ (a ◦ b) ◦ c = a ◦ (b ◦ c).

Since ab∈ Q+ and ab/3∈ Q+.

Associativity: a, b, c ∈ Q+ ⇒ (a ◦ b) ◦ c = a ◦ (b ◦ c).

Since (a ◦ b) ◦ c = ( ab/3 ) ◦ c =[ab/3 .c]/3 = a/3( bc/3 ) = a/3 (b ◦ c) = a ◦ (b ◦ c).


Existence of Identity: Let a ∈ Q+. Let e ∈ Q+ such that e ◦ a = a.

i.e., ea/3 = a
⇒ ea − 3a = 0 ⇒ (e − 3)a = 0

⇒e − 3 = 0 (∵ a ≠ 0)

⇒ e=3

∴ e = 3 is the identity element in Q+.


Existence of Inverse: Let a ∈ Q+. Let b ∈ Q+ such that a ◦ b = e.

⇒ab/3 = 3
b = 9/a (∵ a ≠ 0)
93

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

∴ For every a ∈ Q+, there exists 9/a ∈ Q+ such that a ◦ 9/a = 9/a ◦ a = 3.

Commutativity: Let a, b ∈ Q+ ⇒ a ◦ b = b ◦ a.

Since a ◦ b = ab/3=ba/3 = b ◦ a.
(Q+, ◦) is an abelian group.

Exercises: 1. Prove that the set G of rational numbers other than 1 with operation ⊕ such that
a ⊕ b = a + b − ab for a, b ∈ G is abelian group.

94

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

2. Consider the algebraic system (G, ∗), where G is the set of all non-zero real numbers and ∗
is a binary operation defined by: a ∗ b = 4 , ∀a, b ∈ G. Show that (G, ∗) is an
ab

Addition modulo m
We shall now define a composite known as ―addition modulo m‖ where m is fixed integer.
If a and b are any two integers, and r is the least non-negative reminder obtained by dividing
the ordinary sum of a and b by m, then the addition modulo m of a and b is r symbolically
a +m b = r, 0 ≤ r < m.

Example: 20 +6 5 = 1, since 20 + 5 = 25 = 4(6) + 1, i.e., 1 is the remainder when 20+5 is


divisible by 6.
Example: −15 +5 3 = 3, since −15 + 3 = −12 = 3(−5) + 3.
Multiplication modulo p
If a and b are any two integers, and r is the least non-negative reminder obtained by dividing
the ordinary product of a and b by p, then the Multiplication modulo p of a and b is r
symbolically
a ×p b = r, 0 ≤ r < p.

Example: Show that the set G = {0, 1, 2, 3, 4} is an abelian group with respect to addition
modulo 5.
Solution: We form the composition table as follows:
+5 0 1 2 3 4
0 0 1 2 3 4
1 1 2 3 4 0
2 2 3 4 0 1
3 3 4 0 1 2
4 4 0 1 2 3

Since all the entries in the composition table are elements of G, the set G is closed with
respect to addition modulo 5.
Associativity: For any three elements a, b, c ∈ G, (a +5 b) +5 c and a +5 (b +5 c) leave the
same remainder when divided by 5.

i.e., (a +5 b) +5 c = a +5 (b +5 c)

(1 +5 3) +5 4 = 3 = 1 +5 (3 +5 4) etc.

Existence of Identity: Clearly 0 ∈ G is the identity element, since we have


0 +5 9 = 4 = 9 +5 0,∀ a ∈ G.
Existence of Inverse: Each element in G is invertible with respect to addition modulo 5.
0 is its own inverse; 4 is the inverse of 1 and 1 is the inverse of 4.
2 is the inverse of 3 and 3 is the inverse of 2 with respect to addition modulo 5 in G.
Commutativity: From the composition table it is clear that a+5 b = b+5 a, ∀ a, b ∈ G.

95

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Hence (G, +5) is an abelian group.

96

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: Show that the set G= {1, 2, 3, 4} is an abelian with respect to multipli-cation
modulo 5.
Solution: The composition table for multiplication modulo 5 is
×
5 1 2 3 4
1 1 2 3 4
2 2 4 1 3
3 3 1 4 2
4 4 3 2 1
From the above table, it is clear that G is closed with respect to the operation ×5 and the
binary composition ×5 is associative; 1 is the identity element.
Each element in G has a inverse.
1 is its own inverse
2 is the inverse of 3
3 is the inverse of 2
4 is the inverse of 4, with respect to the binary operation ×5.
Commutative law holds good in (G, ×5).
Therefore (G, ×5) is an abelian group.
Example: Consider the group, G = {1, 5, 7, 11, 13, 17} under multiplication modulo 18.
−1 −1 −1
Construct the multiplication table of G and find the values of: 5 , 7 and 17 .
Example: If G is the set of even integers, i.e., G = {· · · , −4, −2, 0, 2, 4, · · · } then prove that

G is an abelian group with usual addition as the operation. Solution: Let a, b, c ∈ G.


∴ We can take a = 2x, b = 2y, c = 2z, where x, y, z ∈ Z.
Closure: a, b ∈ G ⇒ a + b ∈ G.

Since a + b = 2x + 2y = 2(x + y) ∈ G.

Associativity: a, b, c ∈ G ⇒ a + (b + c) = (a + b) + c

Since
a + (b + c) = 2x + (2y + 2z)

=2[x + (y + z)]

=2[(x + y) + z]

=(2x + 2y) + 2z

=(a + b) + c

Existence of Identity: a ∈ G, there exists 0 ∈ G such that a + 0 = 0 + a = a. Since a + 0 =


2x + 0 = 2x = a and 0 + a = 0 + 2x = 2x = a

∴ 0 is the identity in G.

97

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Existence of Inverse: a ∈ G, there exists −a ∈ G such that a+(−a) = (−a)+a = 0.


Since a + (−a) = 2x + (−2x) = 0 and (−a) + a = (−2x) + 2x = 0.

∴ (G, +) is a group.
Commutativity: a, b ∈ G ⇒ a + b = b + a.

Since a + b = 2x + 2y = 2(x + y) = 2(y + x) = 2y + 2x = b + a.

∴ (G, +) is an abelian group.

98

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Example: Show that set G = {x| x = 2 3 for a, b ∈ Z} is a group under multipli-cation.


a b

Solution: Let x, y, z ∈ G. We can take x = 2 3 , y = 2 3 , z = 2 3 , where p, q, r, s, l, m ∈ Z.


p q r s l m

We know that (i). p + r, q + s ∈ Z

(ii). (p + r) + l = p + (r + l), (q + s) + m = q + (s + m).

Closure: x, y ∈ G ⇒ x · y ∈ G.

∈ G. Associativity: x, y, z ∈ G ⇒ (x · y) · z = x · (y · z)
p q r s p+r q+s
Since x · y = (2 3 )(2 3 ) = 2 3
p q r s l m
Since (x · y) · z = (2 3 2 3 )(2 3 )

=2(p+r)+l3(q+s)+m

=2p+(r+l)3q+(s+m)
p q r s l m
=(2 3 )(2 3 2 3 )

=x · (y · z)

Existence of Identity: Let x ∈ G. We know that e = 2 3 ∈ G, since 0 ∈ Z.


0 0

= 2 3 = x and e · x = 2 3 2 3 = 2 3 = x. ∴ e ∈ G such
p q 0 0 p+0 q+0 p q 0 0 p q p q
∴x·e=2 3 2 3 =2 3
that x · e = e · x = x

0 0
∴ e = 2 3 is the identity element in G.
Existence of Inverse: Let x ∈ G.
−p −q
Now y = 2 3 ∈ G exists, since −p, −q ∈ Z such that
p q −p −q 0 0 −p −q p q 0 0
x·y=2 3 2 3 = 2 3 = e and y · x = 2 3 2 3 = 2 3 = e.

−p −q
∴ For every x = 2 3 ∈ G there exists y = 2 3 ∈ G such that x ·y = y ·x = e. ∴ (G, ·) is a
p q

group.

Example: Show that the sets of all ordered pairs (a, b) of real numbers for which a ≠ 0 w.r.t
the operation ∗ defined by (a, b) ∗ (c, d) = (ac, bc + d) is a group. Is the commutative?
Solution: Let G = {(a, b)| a, b ∈ R and a ≠ 0}. Define a binary operation ∗ on G by (a, b) ∗ (c,

d) = (ac, bc + d), for all (a, b), (c, d) ∈ G. Now we show that (G, ∗) is a group.
Closure: (a, b), (c, d) ∈ G ⇒ (a, b) ∗ (c, d) = (ac, bc + d) ∈ G.

Since a ≠ 0, c ≠ 0 ⇒ ac ≠ 0.

99

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Associativity: (a, b), (c, d), (e, f) ∈ G ⇒ {(a, b) ∗ (c, d)} ∗ (e, f) = (a, b) ∗ {(c, d) ∗(e, f)}. Since
{(a, b) ∗ (c, d)} ∗ (e, f) = (ac, bc + d) ∗ (e, f)

= (ace, (bc + d)e + f)


= (ace, bce + de + f)
Also (a, b) ∗ {(c, d) ∗ (e, f)} = (a, b) ∗ (ce, de + f)

= (a(ce), b(ce) + de + f)
= (ace, bce + de + f)

Existence of Identity: Let (a, b)∈G. Let (x, y)∈ G such that (x, y)∗(a, b)=(a,b)∗(x, y)=(a, b)

⇒ (xa, ya + b) = (a, b)

100

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

⇒ xa = a, ya + b = b

⇒ x = 1, (∵ a ≠ 0) and ya = 0 ⇒ x = 1 and y = 0 (∵ a ≠ 0)

⇒ (1, 0) ∈ G such that (a, b) ∗ (1, 0) = (a, b).

∴ (1, 0) is the identity in G.


Existence of Inverse: Let (a, b) ∈ G. Let (x, y) ∈ G such that (x, y) ∗ (a, b) = (1, 0)

⇒ (xa, ya + b) = (1, 0)
− b
⇒ xa = 1, ya + b = 0 ⇒ x = a , y = a
1

∴ The inverse of (a, b) exits and it is (1/a,-b/a ).


Commutativity: Let (a, b), (c, d) ∈ G ⇒ (a, b) ∗ (c, d) ≠ (c, d) ∗ (a, b)

Since (a, b) ∗ (c, d) = (ac, bc + d) and (c, d) ∗ (a, b) = (ca, da + b).

∴ G is a group but not commutative group w.r.t ∗.


−1 −1 −1
Example: If (G, ∗) is a group then (a ∗ b) =b ∗ a for all a, b ∈ G. Solution:
Let a, b ∈ G and e be the identity element in G.
−1 −1 −1 −1 −1 −1
Let a ∈ G ⇒ a ∈ G such that a∗a =a ∗a=e and b∈ G ⇒ b ∈ G such that b∗b =b ∗b=
e.
−1
Now a, b ∈ G ⇒ a ∗ b ∈ G and (a ∗ b) ∈ G.

Consider
−1 −1 −1 −1
(a ∗ b) ∗ (b ∗ a ) = a ∗ [b ∗ (b ∗ a )] (by associativity law)

−1 −1
=a ∗ [(b ∗ b ) ∗ a ]

−1 −1
= a ∗ (e ∗ a ) (b ∗ b = e)

−1
= a∗ a (e is the identity)

=e

and
−1 −1 −1 −1
(b ∗ a ) ∗ (a ∗ b) = b ∗ [a ∗ (a ∗ b)]
−1 −1
=b ∗ [(a ∗ a) ∗ b]

101

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

−1
=b ∗ [e ∗ b]
−1
=b ∗b

=e
−1 −1 −1 −1
⇒ (a ∗ b) ∗ (b ∗ a ) = (b ∗ a ) ∗ (a ∗ b) = e
−1 −1 −1
(a ∗ b) =b ∗a for all a, b ∈ G.

Note:
−1 −1 −1
1. (b a ) = ab
−1 −1 −1 −1
2. (abc) =c b a

3. If (G, +) is a group, then −(a + b) = (−b) + (−a)


4. −(a + b + c) = (−c) + (−b) + (−a).

102

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Theorem: Cancelation laws hold good in G, i.e., for all a, b, c ∈ G a ∗ b = a ∗ c ⇒ b = c (left


cancelation law) b ∗ a = c ∗ a ⇒ b = c (right cancelation law).

Proof: G is a group. Let e be the identity element in G.


−1 −1 −1
a∈ G⇒ a ∈ G such that a ∗ a =a ∗ a = e.

Consider
a∗b=a∗c
−1 −1
⇒a ∗ (a ∗ b) = a (a ∗ c)
−1 −1
⇒ (a ∗ a) ∗ b = (a ∗ a) ∗ c (by associative law)
−1
⇒ e ∗ b = e ∗ c (a is the inverse of a in G)
⇒ b = c (e is the identity element in G)
and
b∗a=c∗a
−1 −1
⇒ (b ∗ a)a = (c ∗ a) ∗ a

−1 −1
⇒ b ∗ (a ∗ a ) = c ∗ (a ∗ a ) (by associative law)
−1
⇒ b ∗ e = c ∗ e (∵ a ∗ a = e)

⇒ b = c (e is the identity element in G)


Note:
1. If G is an additive group, a + b = a + c ⇒ b = c and b + a = c + a ⇒ b = c.
2. In a semi group cancelation laws may not hold. Let S be the set of all 2 × 2 matrices over
integers and let matrix multiplication be the binary operation defined on S. Then S is a semi
group of the above operation.
 1 0  0 0  0 0 
If A= 0 0; B= 0 1 ;C= 1  , then A, B, C ∈ S and AB = AC, we observe that left
0
     
cancellation law is not true in the semi group.
3. (N, +) is a semi group. For a, b, c ∈ N
a + b = a + c ⇒ b + c and b + a = c + a ⇒ b = c.
But (N, +) is not a group.

In a semigroup even if cancellation laws holds, then semigroup is not a group.

Example: If every element of a group G is its own inverse, show that G is an abelian group.
−1 −1
Solution: Let a, b ∈ G. By hypothesis a = a, b = b.
−1
Then ab ∈ G and hence (ab) = ab.
Now

103

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

−1
(ab) = ab

−1 −1
⇒b a = ab

⇒ ba = ab

∴ G is an abelian group.

104

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Note: The converse of the above not true.


For example, (R, +), where R is the set of real numbers, is abelian group, but no element
except 0 is its own inverse.
2
Example: Prove that if a = a, then a = e, a being an element of a group G.
2
Solution: Let a be an element of a group G such that a = a. To prove that a = e.
a = a ⇒ aa = a
2

−1 −1 −1
⇒ (aa)a = aa ⇒ a(aa ) = e
−1
⇒ ae = e [∵ aa = e] ⇒ a = e [∵ ae = a]

Example: In a group G having more than one element, if x = x, for every x ∈ G.


2

Prove that G is abelian.


Solution: Let a, b ∈ G. Under the given hypothesis, we have a = a, b = b, (ab) = ab.
2 2 2

2 2 2
∴ a(ab)b = (aa)(bb) = a b = ab = (ab) = (ab)(ab) = a(ba)b

⇒ ab = ba (Using cancelation laws)

∴ G is abelian.
Example: Show that in a group G, for a, b ∈ G, (ab) = a b ⇔ G is abelian. (May. 2012)
2 2 2

Solution: Let a, b ∈ G, and (ab) = a b . To prove that G is abelian.


2 2 2

Then
2 2 2
(ab) = a b

⇒ (ab)(ab) = (aa)(bb)

⇒ a(ba)b = a(ab)b (by Associative law) ⇒ ba = ab, (by cancellation


laws)
⇒ G is abelian.
2 2 2
Conversely, let G be abelian. To prove that (ab) = a b .
2 2 2
Then (ab) = (ab)(ab) = a(ba)b = a(ab)b = (aa)(bb) = a b .
***Example: If a, b are any two elements of a group (G, ·), which commute. Show that
−1
1. a and b commute
−1
2. b and a commute
−1 −1
3. a and b commute.
Solution: (G, ·) is a group and such that ab = ba.
−1 −1
1. ab = ba ⇒ a (ab) = a (ba)

−1 −1
⇒ (a a)b = a (ba)
−1
⇒ eb = (a b)a
105

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

−1
⇒ b = (a b)a
−1 −1 −1
⇒ ba = [(a b)a]a
−1 −1
=(a b)(aa )
−1
=(a b)e
−1
=a b

106

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

−1
⇒a and b commute.

−1 −1
1 ab = ba ⇒ (ab)b = (ba)b

−1
⇒ a(bb ) =
−1
(ba)b ⇒
−1
ae = b(ab )
−1
⇒ a = b(ab )
−1 −1 −1
⇒ b a = b [b(ab )]
−1 −1
=(b b)(ab )]
−1
=e(ab )
−1
=ab

−1
⇒b and a commute.

−1 −1 −1 −1 −1 −1
2 ab = ba ⇒ (ab) = (ba) b a =a b

−1 −1
⇒a and b are commute.

Order of an Element
Definition: Let (G, ∗) be a group and a ∈ G, then the least positive integer n if it exists such
n
that a = e is called the order of a ∈ G.
The order of an element a ∈ G is be denoted by O(a).
Example: G = {1, −1, i, −i} is a group with respect to multiplication. 1 is the identity in G.
1 = 1 = 1 = · · · = 1 ⇒ O(1) = 1.
1 2 3

(−1) = (−1) = (−1) = · · · = 1 ⇒ O(−1) = 2.


2 4 6

= · · · = 1 ⇒ O(i) = 4. (−i)
4 8 12 4
i =i =i
= (−i) = · · · = 1 ⇒ O(−i) = 4.
8

5
Example: In a group G, a is an element of order 30. Find order of a .
Solution: Given O(a) = 30
⇒a
30 5
= e, e is the identity element of G. Let O(a ) = n
⇒ (a ) = e
5n

⇒a
5n
= e, where n is the least positive integer. Hence 30 is divisor of 5n.

107

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

∴ n = 6.
5
Hence O(a ) = 6

Sub Groups
Definition: Let (G, ∗) be a group and H be a non-empty subset of G. If (H, ∗) is itself is a
group, then (H, ∗) is called sub-group of (G, ∗).
Examples:
1. (Z, +) is a subgroup of (Q, +).

108

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

2. The additive group of even integers is a subgroup of the additive group of all
integers.
3. (N, +) is not a subgroup of the group (Z, +), since identity does not exist in N under
+.
Example: Let G = {1, −1, i, −i} and H = {1, −1}.

Here G and H are groups with respect to the binary operation multiplication and H is a subset
of G. Therefore (H, ·) is a subgroup of (G, ·).
Example: Let H = {0, 2, 4} ⊆ Z6. Check that (H, +6) is a subgroup of (Z6, +6).
Solution: Z6 = {0, 1, 2, 3, 4, 5}.
+6 0 1 2 3 4 5
0 0 1 2 3 4 5
1 1 2 3 4 5 0
2 2 3 4 5 0 1
3 3 4 5 0 1 2
4 4 5 0 1 2 3
5 5 0 1 2 3 4

∴ (Z6, +6) is a group.

H= {0, 2, 4}.

+6 0 2 4
0 0 2 4
2 2 4 0
4 4 0 2

The following conditions are to be satisfied in order to prove that it is a subgroup.


(i). Closure: Let a, b ∈ H ⇒ a +6 b ∈ H.
0, 2 ∈ H ⇒ 0 +6 2 = 2 ∈ H.

(ii). Identity Element: The row headed by 0 is exactly same as the initial row.
∴ 0 is the identity element.
−1 −1 −1
(iii). Inverse: 0 = 0, 2 = 4, 4 = 2.

Inverse exist for each element of (H, +6).


∴ (H, +6) is a subgroup of (Z6, +6).

Theorem: If (G, ∗) is a group and H ⊆ G, then (H, ∗) is a subgroup of (G, ∗) if and only if
(i) a, b ∈ H ⇒ a ∗ b ∈ H;
−1
(ii) a ∈ H ⇒ a ∈ H.
109

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Proof: The condition is necessary


Let (H, ∗) be a subgroup of (G, ∗).

To prove that conditions (i) and (ii) are satisfied.

110

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Since (H, ∗) is a group, by closure property we have a, b ∈ H ⇒ ab ∈ H.


−1
Also, by inverse property a ∈ H ⇒ a ∈ H.

The condition is sufficient:


Let (i) and (ii) be true. To prove that (H, ∗) is a subgroup of (G, ∗).
We are required to prove is: ∗ is associative in H and identity e ∈ H.
That ∗ is associative in H follows from the fact that ∗ is associative in G. Since H is nonempty,
−1
let a∈H⇒a ∈ H (by (ii))
−1 −1
∴ a ∈ H, a ∈ H ⇒ aa ∈ H (by (i))

⇒ e ∈ H (∵ aa−1 ∈ H ⇒ aa−1 ∈ G ⇒ aa−1 = e, where e is the identity in G.)


⇒ e is the identity in H.
Hence H itself is a group.
∴ H is a subgroup of G.

Example: The set S of all ordered pairs (a, b) of real numbers for which a ≠ 0 w.r.t the
operation × defined by (a, b) × (c, d) = (ac, bc + d) is non-abelian. Let H= {(1, b)| b ∈ R} is a
subset of S. Show that H is a subgroup of (S, ×).

Solution: Identity element in S is (1, 0). Clearly (1, 0) ∈ H.


Inverse of (a, b) in S is (1/a,-b/a ) (∵ a ≠ 0)

Inverse of (1, c) in S is (1, -c/1 ), i.e., (1, −c)

−1
Clearly (1, c) ∈ H ⇒ (1, c) = (1, −c) ∈ H.
Let (1, b) ∈ H.
−1
(1, b) × (1, c) = (1, b) × (1, −c)

= (1.1, b.1 − c) = (1, b − c) ∈ H (∵ b − c ∈ R)

−1
∴ (1, b), (1, c) ∈ H ⇒ (1, b) × (1, c) ∈ H ∴ H is a
subgroup of (S, ×).

Note: (1, b) × (1, c) = (1.1, b.1 + c)

=(1, b + c)

=(1, c + b)

=(1, c) × (1, b)

∴ H is an abelian subgroup of the non-abelian group (S, ×).


Theorem: If H1 and H2 are two subgroups of a group G, then H1 ∩ H2 is also a subgroup of
G.

111

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

Proof: Let H1 and H2 be two subgroups of a group G.


Let e be the identity element in G.
∴ e ∈ H1 and e ∈ H2. ∴ e ∈ H1 ∩
H2.

⇒ H1 ∩ H2 ≠ ϕ.

Let a ∈ H1 ∩ H2 and b ∈ H1 ∩ H2.

112

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

∴ a ∈ H1, a ∈ H2 and b ∈ H1, b ∈ H2.


−1
Since H1 is a subgroup, a ∈ H1 and b ∈ H1 ⇒ ab ∈ H1.
−1
Similarly ab ∈ H2.
−1
∴ ab ∈ H1 ∩ H2.
−1
Thus we have, a ∈ H1 ∩ H2, b ∈ H1 ∩ H2 ⇒ ab ∈ H1 ∩ H2.

∴ H1 ∩ H2 is a subgroup of G.

Example: Let G be the group and Z={x ∈ G| xy=yx for all y∈G}. Prove that Z is a subgroup of

G.

Solution: Since e ∈ G and ey = ye, for all y ∈ G. It follows that e ∈ Z.


Therefore Z is non-empty.

Take any a, b ∈ Z and any y ∈ G. Then

(ab)y = a(by)

=a(yb), since b ∈ Z, by = yb

=(ay)b

=(ya)b

=y(ab)

This show that ab ∈ Z.

Let a ∈ Z ⇒ ay = ya for all y ∈ G.


−1 −1 −1 −1
⇒ a (ay)a = a (ya)a

−1 −1 −1 −1
⇒ (a a)(ya ) = (a y)(aa )
−1 −1 −1 −1
⇒ e(ya ) = (a y)e ⇒ a y = ay
−1
This shows that a ∈ Z.

−1
Thus, when a, b ∈ Z, we have ab ∈ Z and a ∈ Z.
Therefore Z is a subgroup of G.

This subgroup is called the center of G.


Homomorphism

Homomorphism into: Let (G, ∗) and (G , ·) be two groups and f be a mapping from G into
113

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

′ ′
G . If for a, b ∈ G, f(a∗b) = f(a)·f(b), then f is called homomorphism G into G . Homomorphism
′ ′
onto: Let (G, ∗) and (G , ·) be two groups and f be a mapping from G onto G . If for a, b ∈ G,

f(a∗b) = f(a)·f(b), then f is called homomorphism G onto G .

Also then G′ is said to be a homomorphic image of G. We write this as f(G)  G′.


′ ′
Isomorphism: Let (G, ∗) and (G , ·) be two groups and f be a one-one mapping of G onto G .

If for a, b ∈ G, f(a ∗ b) = f(a) · f(b), then f is said to be an isomorphism from G onto G .

Endomorphism: A homomorphism of a group G into itself is called an endomor-phism.


Monomorphism: A homomorphism into is one-one, then it is called an monomor-
phism. Epimorphism: If the homomorphism is onto, then it is called epimorphism.

Automorphism: An isomorphism of a group G into itself is called an automorphism.

114

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680


Example: Let G be the additive group of integers and G be the multiplicative group. Then
′ x ′
mapping f : G → G given by f(x) = 2 is a group homomorphism of G into G .
′ ′
Solution: Since x, y ∈ G ⇒ x + y ∈ G and 2 , 2 ∈ G ⇒ 2 · 2 ∈ G .
x y x y

x+y x y
∴ f(x + y) = 2 = 2 · 2 = f(x) · f(y).

⇒ f is a homomorphism of G into G .

Example: Let G be a group of positive real numbers under multiplication and G be a group of

all real numbers under addition. The mapping f : G → G given by f(x) = log10 x. Show that f
is an isomorphism.
Solution: Given f(x) = log10 x.

Let a, b ∈ G ⇒ ab ∈ G. Also, f(a), f(b) ∈ G .

∴ f(ab) = log10 ab = log10 a + log10 b = f(a) + f(b).



⇒ f is a homomorphism from G into G .
Let x1, x2 ∈ G and f(x1) = f(x2)

⇒ log x = log x
10 1 10 2

⇒ 10
log x log x
10 1
= 10 10 2

⇒ x1 = x2

⇒ f is one-one.
⇒ f(10 ) = log10(10 ) = y.
y y


∴ For ever y ∈ G , there exists 10 ∈ G such that f(10 ) = y
y y

⇒ f is onto.

∴ f an isomorphism from G to G .
+
Example: If R is the group of real numbers under the addition and R is the group of positive
+ x
real numbers under the multiplication. Let f : R → R be defined by f(x) = e , then show that f
is an isomorphism.
+ x
Solution: Let f : R → R be defined by f(x) = e . f
is one-one: Let a, b ∈ G and f(a) = f(b)

a b
⇒e =e
a b
⇒ log e = log e
⇒ a log e = b log e
115

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

⇒a=b
Thus f is one-one.
f is onto: If c ∈ R then log c ∈ R and f(log c) = e
+ log c
=c
+
Thus each element of R has a pre-image in R under f and hence f is onto.
a+b a b
f is Homomorphism: f(a + b) = e = e .e = f(a).f(b) Hence f is an isomorphism.

116

Downloaded by Sivahari R ([email protected])


lOMoARcPSD|28881680

−1
Example: Let G be a multiplicative group and f : G → G such that for a ∈ G, f(a) = a .
Prove that f is one-one and onto. Also, prove that f is homomorphism if and only if G is
commutative.
−1
Solution: f : G → G is a mapping such that f(a) = a , for a ∈ G.
(i). To prove that f is one-one.

−1 −1
Let a, b ∈ G. ∴ a , b ∈ G and f(a), f(b) ∈ G.
Now f(a) = f(b)
−1 −1
⇒a =b

⇒ (a−1)−1 = (b−1)−1

⇒ a=b

∴ f is one-one.

(ii). To prove that f is onto.


−1 −1 −1 −1
Let a ∈ G. ∴ a ∈ G such that f(a ) = (a ) = a.

∴ f is onto.
(iii). Suppose f is a homomorphism.
For a, ∈ G, ab ∈ G. Now f(ab) = f(a)f(b)

−1
⇒ (ab) = a b
−1 −1
⇒ b−1a−1 = a−1b−1

⇒ (b−1a−1)−1 = (a−1b−1)−1

⇒ (a−1)−1(b−1)−1 = (b−1)−1(a−1)−1

⇒ ab = ba
∴ G is abelian.
(iv). Suppose G is abelian ⇒ ab = ba, ∀ a, b ∈ G.
−1
For a, b ∈ G, f(ab) = (ab)

= b−1a−1

=a−1b−1

Downloaded by Sivahari R ([email protected])


117
lOMoARcPSD|28881680

=f(a)f(b)

∴ f is a homomorphism.

Downloaded by Sivahari R ([email protected])


118

You might also like