Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Dr. B. K. Sharma
MCA Department
AKGEC,GZB.
INDEX
UNIT-1
Set Theory, Relations, Functions and Notion of Proof
1.1. Set
1.2 Subsets
1.3 Set Operations :
1.4 Laws of Algebra of Sets:
1.5 Other Important Results in Set Theory
1.6 VENN DIAGRAM
1.7 Some More Results on Set Theory
1.8 Cartesian Product of
1.9 Partitions or Quotient Sets
1.10 Index Set
1.11 Relation
1.12 Different Methods of representation of a relations:
1.13. Properties of Relations (or classification of Relations) f relations on a set.
1.13.1 Reflexive and irreflexive relations
1.13.2 Symmetric, antisymmetric and asymmetric relations
1.13.3Transitive Relation
1.14 Equivalence Relation
1.15 Power of a Relation
1.16 Closures of Relation
1.17 Equivalence class or Equivalence set
1.18 Properties of Equivalence classes
1.19 Relation induced by a Partition of a set
1.20 Quotient Set
1.21 Functions
1.21.1 Function of a single
1.21.2 Difference between a Relation and a Function
1.21.3 Identity Function
1.21.4 Constant Function
1.21.5 Inverse Mapping
1.21.6 Real Valued mapping or function
1.22 Product or Composition of Mapping
1.23 Different forms of function
1.24. Types of functions
1.24.1. One-to-one function or mapping or injective mapping
1.24.2 Many one function or mapping
1.24.3 Surjective or Onto mapping or
1.24.4. Into function or mapping:
1.24.4.1 One-One-into mapping
1.24.4.2 Many one into mapping
1.24.5. Bijective mapping or one to one and onto mapping:
1.24.6. Many-one onto mapping:
1.25 Mathematical Induction :
UNIT-2
Algebraic Structure
UNIT-3
Lattices and Boolean algebra
4.1 Propositions:
4.2 Connectives
4.3 Tautology and Contradiction
4.4 Logical Equivalence
4.5 Converse, inverse and contra positive of the Conditional statements
4.6 Rule of precedence
4.7 Equivalence of Formula
4.8 Argument
4.9 Quantifiers
Unit-5
Trees and Graphs, Recurrence Relation and Combinatorics
5.1 Graph
5.2 Walk
5.3 Different types of graphs
5.4 Trees
5.5 Binary Tree :
5.6. Coloring
5.7 Recurrence Relation
5.8. Methods of solving Recurrence relations
5.9 Combinatorics
UNIT-1:
1.1. Set : Any well defined collection of distinct objects is called a set. The objects in a set can be numbers,
people, letters, rivers, countries etc. The objects in a set are called the elements or members of the set.
Notation – Sets are usually denoted by capital letters or upper case letters A, B, C, X, Y, …., and the elements in a
set are denoted by lower case letters a, b, c, x, y, …
Representation of sets
There are two ways of writing down a set, tabular form and set builder form.
Tabular form or Roaster form of a set - In this form all the members of the set are listed. These members are
separated by commas and enclosed in braces { }.
Example If the elements of a set A are 2, 5, 7, 8, 11, then it can be written in tabular form as A = {2, 5, 7, 8, 11}.
Representation of the set in this way is known as tabular form of a set.
Set-builder form of a set. In this form a set is defined by starting the properties which are satisfied by its
elements. Here the rule governing the membership of the set is stated.
and this is read “B” is a set of numbers x such that x is an even positive integer.
Cardinality or Cardinal Number of a set :The number of elements in a set A is also called the number or cardinal
number of the set and is denoted as n (A) or O (A) or |A|. If n (A) = n (B), A & B are said to be equivalent sets.
Example: If S = {3, 5, 7, 9, 11}, then the cardinal number of this set is 5 because there are only five elements in this
set and we write n (S) = |S| = 5.
Finite and Infinite Sets : A set is called finite if it has n distinct elements where n Î N. Such a set consists of a
specific number of different elements. In such a set the process of counting different members comes to an end.
Otherwise a set is infinite.
Equality of Sets :If every member of set A is a member of set B and every member of set B is also a member of set
A, then two sets A and B are said to be equal and we write A = B
(1) If A = {1, 2, 3, 4, 5} and B = {3, 1, 2, 4, 5}, then A = B, because every member of set A is a member of set B
and every member of set B is a member of set A.
Null Set or Void Set or Empty Set : A set which contain no element is called a Null set. It is denoted by the symbol
Æ or { }.
(2) The set of integers that are less than 4 and greater than 8.
Singleton Set: A set containing only one element is called a singleton set, e.g. A = {3} and B = {0} are both singleton
sets.
1.2 Subsets: If every member in a set A is also a member of set B, then A is said to be a subset of B. We write
this relation as A Ì Band read “A is contained in B” or more precisely it is written as A Í B.
Examples of Subsets
(1) If A = {2, 4, 6} and B = {3, 2, 4, 5, 6} then A is a subset of B because every member of A is also a member of B.
Equality of set and Subsets:If A and B are two sets, then A = B if and only if A Í B and B Í A or A = B Û A Í B and
B Í A.
Note - Some authors have made a distinction in the symbols used for “subset” and “proper subset”. If B is a subset
of A, they write it symbolically as B Í A and if B is a proper subset it is written as B Ì A.
The null set Æ is a proper subset of every other set except itself.
A and B are not comparable if A Ë B and B Ë A and A ¹ B.In this case there will be at least one element in each set
which is not a member of the other set.
(2) If A = {2, 3} and B = {3, 4, 5}, then A and B are not comparable because neither A is a sub set of B nor is B a sub
set of A.
Disjoint Sets: If no element of A is a member of B and no element of B is a member of A, then A and B are said to
be disjoint sets.In such a case the two sets A and B have no elements in common.
Example of disjoint sets. The following pairs of sets A and B are disjoints sets.
Set of sets or Family of sets:It is a set of elements which are sets themselves. For example the set A = {{2, 3}, {3},
{5, 6, 7}, Æ} is a set whose members {2, 3}, {3}, {5, 6, 7} and Æ are sets themselves. We say that A is a set of sets or
family of sets or class of sets.
Example of set of sets:A = {{1, 3, 5}, {2, 4, 6, 8}, {9}} is a family of sets.
Universal Set or Universe of Discourse:The set of which all sets under investigation are sub-sets is called Universal
set. The universal set is generally denoted by U.
1. All the person in the world constitute the universal set for the purpose of population studies.
2. In the study of plane geometry, all the points in the plane constitute a universal set.
Power Set:The set containing all the sub-sets of a given set A as its elements is called a power set of A and is
A
denoted by 2 or P(A). P(S) = {T : T Í S}, Æ and S both Î P(S).
Examples: If A = {3, 4}, then all the sub-sets of A are {3, 4}, {3}, {4}, Æ
A
Hence its power set is 2 ={ {3, 4}, {3}, {4}, Æ}
Number of element in power set :If the number of elements in any set is n then the number of elements in its
n n n n n
power set is Cn + Cn-1 + Cn-2 + … + C1 + 1 = 2 .
1.3 Set Operations :Like the processes of addition, subtraction, multiplication and division in the number
systems, there are certain fundamental operations on sets which are described below:
Union of sets: The Union of two sets A and B is the set of all elements which belong to A or to B or to both A and
B. The union of A and B is denoted by A È B and is read “A union B”
Intersection of sets – The intersection of two sets A and B is the set of elements which belong to A as well as to B
and it is denoted by A Ç B.
Difference of Sets : The difference of two sets A and B is the set of elements which belong to set A but do not
belong to set B. This is denoted by A – B or A ~ B or A \ B
Complement of a set: The complement of a set A is the set of elements which do not belong to A. It is, therefore,
c
the difference of the universal set and the set A. The complement of a set A is denoted by A¢ or A .
then A¢ = È - A = {x | x Î È, x Ï A}
= {1, 3, 5, 7, 9}
Symmetric difference of two sets : Symmetric difference of two sets A and B is given by
A Å B or A ê B = (A – B) È (B – A)
Similarly, B Å A or B ê A = (B – A) È (A – B),
Hence AÅB=BÅA
It is the set of all elements that belong to A or to B but not to both A and B
Idempotent laws
1. a. AÈA=A
b. AÇA=A
Associative laws
2. a. (A È B) È C = A È (B È C)
b. (A Ç B) Ç C = A Ç (B Ç C).
Commutative laws
3. a. AÈB=BÈA
b. AÇB=BÇA
Distributive laws
4. a. A È (B Ç C) = (A È B) Ç (A È C)
b. A Ç (B È C) = (A Ç B) È (A Ç C)
Identity laws
5 a. AÈÆ=A
b. AÇU=A
6 a. AÈU=U
b. AÇÆ=Æ
Involution law
7. (A¢)¢ = A
Complement laws
8. a. A È A¢ = U
b. A Ç A¢ = Æ
9 a. U¢ = Æ
b. Ƣ = U
De Morgan’s law
10 a. (A È B)¢ = A¢ Ç B¢
b. (A Ç B)¢ = A¢ È B¢
11 a. A – (B È C) = (A – B) Ç (A – C)
b. A – (B Ç C) = (A – B) È (A – C)
*
If E is any identity of algebra of sets, then the dual E of E is the expression obtained by replacing each occurrence
of È, Ç, U and Æ in E by Ç, È, Æ and U respectively [All b’s are duals of a’s] known as principle of DUALITY.
9. n (A¢ Ç B¢) = n (S) – n (A È B) [Neither belong to A nor to B i.e. belonging to neither of the two.]
c
10. Æ =U
c
11. U =Æ
c
12. AÈA =U
c
13. AÇA =Æ
14 (a) AÈB=ÆÛA=Æ&B=Æ
(b) A–B=ÆÛAÍB
c
(c). A–B=AÇB
(b) x Ï A or x Ï B Û x Ï A Ç B
(c) x Î A or x Î B Û x Î A È B
(d) x Î A and x Î B Û x Î A Ç B
c c
16. AÎBÛB ËA
17. A Ç (B – C) = (A Ç B) – (A Ç C)
18. A – B = A Ç B¢ and B – A = B Ç A¢
Let x Î S, then x Î (A È B) or x Î C
If x Î (A È B), then x Î A or x Î B.
i.e. x Î A È (B È C)
or x Î T.
\ S Í T. ….(1)
if y Î (B È C), then y Î B or y Î C,
i.e. y Î (A È B) or y Î C
or y Î (A È B) È C
or y Î S.
\ T Í S. ….(2)
or (A È B) È C = A È (B È C).
(A Ç B) Ç C = A Ç (B Ç C)
John Venn, an English Mathematician developed the idea of using geometrical figures to represent sets.
Another mathematician Euler also used diagrams to represent sets and therefore these diagrams are also called
Venn-Euler diagrams.
In a Venn diagram, generally, the universal set is represented by a rectangle and all other sets under consideration
by bounded areas (generally, a circle) within the rectangle.
A B U
The following figures show that the sets A and B are overlapping sets and the shaded portion represents A Ç B.
(i) A U (ii) U
B A
(B Ì A) (A Ì B)
as A Ç B = {b, e}. d b
shown alongside : f g
= {c, d}
Example : If n (U) = 60, n (A) = 27, n (B) = 19 and n (A È B)¢ = 31 : Use Venn-diagram to find :
(i) n (A Ç B) (ii) n (A – B)
Solution
Let n (A Ç B) = x
\ 27 – x + x + 19 – x + 31 = 60,
Þ x = 17 31
Therefore,
(i) n (A Ç B) = x = 17
(ii) n (A - B) = 27 – x = 27 – 17 = 10
Example: It is found that out of 100 students, 18 can drive neither a Scooter nor a Car, while 25 can drive both
these and 55 of then can drive a Scooter. How many can drive a Car.
Solution : Let A and B denote the set of students who can drive scooter and car respectively n (U) – n (A È B) =
18 or 100 – n (A È B) = 18
55 - 25 25 x
= 30
Example: The operation Union (È) is distributive over the operation of intersection (Ç)
or X È (Y Ç Z) = (X È Y) Ç (X È Z)
Proof. Let x Î X È (Y Ç Z)
x Î X or x Î (Y Ç Z)
x Î X or (x Î Y and x Î Z)
(x Î X or x Î Y) and (x Î X or x Î Z)
x Î (X È Y) and x Î (X È Z)
x Î (X È Y) Ç (X È Z).
So X È (Y Ç Z) Í (X È Y) Ç (X È Z) ……(1)
Similarly let y Î (X È Y) Ç (X È Z)
(y Î X or y Î Y) and ( y Î X or y Î Z)
(y Î X or y Î Y) and y Î X or y Î (YÇZ)
y Î X È (Y Ç Z)
So (X È Y) Ç (X È Z) Í X È (Y Ç Z) ……(2)
From (1) and (2)
X È (Y Ç Z) = (X È Y) Ç (X È Z) or X È (Y Ç Z) Û (X È Y) Ç (X È Z)
(i) X È (Y – Z) = (X È Y) – (Z – X)
Proof :
Let x Î X È (Y – Z)
x Î X or x Î (Y – Z)
x Î X or (x Î Y and x Ï Z)
(x Î X or x Î Y) and (x Î X or x Ï Z)
x Î (X È Y) and x Î (X È Z’)
x Î (X È Y) and x Î (X – Z)
x Î (X È Y) and x Ï (Z – X)
xÎ(XÈY) - (Z – X)
again let y Î (X È Y) – (Z – X)
X È (Y – Z) Í (X È Y) – (Z – X) …..(1)
y Î (X È Y) and y Ï (Z – X)
(y Î X or y Î Y) and (y Ï Z and y Î X)
y Î X or (y Î Y and y Ï Z)
y Î X or y Î (Y – Z)
y Î X È (Y – Z)
(X È Y) – (Z – X) Í X È (Y – Z) …(2)
X È (Y – Z) = (or Û) (X È Y) – (Z – X)
Example: To prove that
X – (Y Ç Z) = (X – Y) È (X – Z)
Proof: X – (Y Ç Z) Í (X – Y) È (X – Z)
and (X – Y) È (X – Z) Í X – (Y - È Z)
Let x Î X – (Y Ç Z)
x Î X and x Ï (y Ç Z)
x Î X and (X Ï Y or x Ï Z)
x Î (X – Y) È (X – Z)
so X – (Y Ç Z) Í (X – Y) È (X – Z) …..(1)
again let y Î (X – Y) È (X – Z)
y Î (X – Y) or y Î (X – Z)
(y Î X and y Ï Y) or (y Î X and y Ï Z)
y Î X and (y Ï Y or y Ï Z)
y Î X – (Y Ç Z)
So (X – Y) È (X – Z) Í X – (Y Ç Z) ….(2)
1. To prove
If A Í B and B Í C; then A Í C
Þ x Î C (as B Í C)
So any element of A is also on element of C Hence A Í C.
2. To prove A Í A È B and B Í A È B
Proof: Let x Î A Þ x Î A È B
Hence A Í A È B
Similarly B Í A È B
3. To prove
(i) A È A = A (ii) A È Æ = A
(iii) A È U = U
Also xÎAÈAÞxÎA
So AÈAÍA
Hence AÈA=A
(ii) AÍAÈÆ
Also x Î A È Æ Þ x Î A or Î Æ
Þ xÎA
So AÈUÍU
Hence A È U = U.
4. To prove If A Í B then A È B = B
Proof: BÍAÈB
Also x Î A È B Þ x Î A or x Î B
Þ x Î B as A Í B.
So AÈBÍB
Hence AÈB=B
5. To prove If A Í B then A Ç B = A
Þ x Î A as A Í B
So AÇBÍA ….(1)
so y Î A Ç B.
6. To prove (A’)¢ = A
Proof: x Î A Þ x Ï A¢ Þ x Î (A¢ )¢
so A Í (A¢)¢ ….(1)
So (A’)¢ Í A ….(2)
7. To prove
(i) Æ¢ = È
Proof: Let x ΠƢ Þ x Ï Æ Þ x Î È
so Æ¢ Í È ….(1)
Again let y Î È Þ y Ï Æ Þ y ΠƢ
So È Í Æ¢ …(2)
Æ¢ = È.
1.8 Cartesian Product of Sets :Before explaining Cartesian Product of sets, we shall define ordered pair
Ordered Pair :An ordered pair, generally denoted by (x, y), is a pair of elements x and y of two sets, which is
ordered in the sense such that (x, y) ¹ (y, x) when x ¹ y and x and y are known as the first and second coordinates
of the ordered pair (x, y). The ordered pairs (3, 5) and (5, 3) are different because they represent different point in
the coordinate plane.
Cartesian Product of two sets:The Cartesian product of two sets A and B is the set of all those ordered pairs whose
first coordinate is an element of set A and the second coordinate is an element of set B. It is denoted by A x B and is
read as ‘A cross B’ or product ‘set of A and B’.
Thus A ´ B = {(x, y) : x Î A and y Î B}
Therefore A´B¹BxA
A ´ B = { (2, 3), (2, 4), (3, 3), (3, 4), (5, 3), (5, 4)}
and B ´ A = { (3, 2), (3, 3), (3, 5), (4, 2), (4, 3), (4, 5)}
In a similar way, the Cartesian product for n sets A1, A2, . . . . . . . . An is defined as
Solution 3
1 y
A´B´C= 3
2 y
4
= { (1, x, 3), (1, x, 4), (1, y, 3), (1, y, 4), (1, z, 3), (1, z, 4),
(2, x, 3), (2, x, 4), (2, y, 3), (2, y, 4), (2, z, 3), (2, z, 4)}
A ´ (B È C) = (A ´ B) È (A ´ C)
Solution:- A ´ (B È C) = {(x, y) : x Î A and y Î (B È C)}
= (A ´ B) È (A ´ C)
A ´ (B – C) = (A ´ B) – (A ´ C)
= (A ´ B) – (A ´ C).
1.9 Partitions or Quotient Sets
Let S be a non empty set, A partition of S is a subdivision of S into non overlapping, non empty subsets.
A1 A3
Venn diagram of set S
into five cells A1, A2, A3, A2
A4, A5
S = {1, 2, 3, 4, 5, 6, 7, 8, 9}
(i) is not a partition of S since 7 Î S does not belong to any of the sub sets.
(ii) is not a partition of S since {1, 3, 5} and {5, 7, 9} are not disjoint.
(iv) is not a partition of S since 4 Î S does not belong to any cell.
If T is a non empty set and to each element t Î T, there corresponds a set Ct, then we say that each t Î T indexes a
Ct and the set T used in this sense is called an Index set.
The collection A of all these sets is called the indexed family of set.
Symbolically A = {At : t Î T}
Example : Let the indexed set T = {a, b, c, d} and corresponding to each element a, b, c, and d we have the sets
1.11 Relation : Let A denote the set of all living human males and B denote the set of all living human females,
then we can define a relation R (father) between the two sets A and B. If x Î A and y Î B, then ‘x is related to y by
the relation R if x is the father of y.’
This relation is written as x R y. Here R is a relation from A to B (because any element or member of A can
be the father of an element or member of B and not vice versa).
Thus, if A and B are two non empty sets then the set of ordered pairs (x, y) such that x Î A and y Î B and
the first coordinate of every ordered pair of the set is related to the second coordinate according to a given
relation, then the set of ordered pairs is called a relation from A to B. Thus the relation R from A to B is a subset of
A ´ B. We write it x R y or (x, y) Î R.
R = {(x, y) : x Î A, y Î B and x R y}
Example :- If A = {2, 3, 4} and B = {p, q} then A ´ B = {(2, p), (2, q), (3, p), (3, q), (4, p), (4, q)}
Here 2Rp, 3Rq, 4Rp i.e. first coordinate of every ordered pair bears the same relationship (defined by R) with the
second coordinate of the corresponding ordered pair in R.
Example :- If A = {1, 5, 6} and B = {2, 6, 7} then find the relation from A to B defined by “is less than”.
Solution A ´ B = {(1, 2), (1, 6), (1, 7), (5, 2), (5, 6), (5, 7), (6, 2), (6, 6), (6, 7)}
The required relation R Í A ´ B and R shall contain those ordered pairs of A ´ B in which the first coordinate x “ is
less than” the second coordinate y of the corresponding ordered pair i.e. x R y.
Therefore R = {(1, 2), (1, 6), (1, 7), (5, 6), (5, 7), (6, 7)}
R – relative set of an element:If R is a relation from A to B and x Î A, then we define R (x), the R – relative set of x
to be the set of all y belonging to the set B with the property that x is R – related to y symbolically, R(x) = {y Î B : x
R y}.
Similarly if A1 Í A then R(A1), the R relative set of the set A1 is the set of all y belonging to B with the property that
x is R – related to y for some x in A1 , symbolically,
Example:- If A = {a, b, c, d}, and R = {(a, a), (a, b), (b, c), (c, a), (d, c), (c, b)}
r (R) = {r, s}
2
Relation on A: If R is a relation from a set A to itself i.e. if R is a subset of A ´ A or A , then we say that R is a
relation on A or a relation in A. It is also called a binary relation on A, Symbolically R = {(x, y) : x, y Î A and x R y}
Example :- Let A = {1, 2, 3, 4}. Find the relation on A (i.e. from A to A) defined by
a êb (a divides b).
Solution Here R Í A ´ A shall contain all those elements (ordered pairs) (a, b) of A ´ A in which the first coordinate
a of the ordered pair divides the second coordinate b of the same ordered pair. Thus
R Í {(1, 1),(1, 2),(1, 3),(1, 4),(2, 1),(2, 2),(2, 3),(2, 4),(3, 1),(3, 2),(3, 3),(3, 4),(4, 1),(4, 2),(4, 3),(4, 4)}
= {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4, 4)}
Inverse relation
-1
If R is a relation from a set A to a set B, then the inverse of R (denoted by R ) is the relation from the set B
to set A which contains all the elements (ordered pairs) of R in which first and second coordinates of each ordered
-1
pair are interchanged. It means that R shall consist of all those ordered pairs which if reversed shall belong to R.
Symbolically
-1
R = {(y, x) : (x, y) Î R}
Example :- Inverse of the relation R = {(2, x), (3, y), (5, z)} is given by
-1
R = {(x, 2), (y, 3), (z, 5)}
-1
It is evident from the definitions of R and R that
-1
domain of R = range of R
-1
range of R = domain of R
-1
Also if R is a relation on A i.e. R Í A ´ A, then R is also a relation on A.
Total number of distinct relations from a set A to a set B:Let the number of elements in the sets A and B be m and
n respectively. Then the number of elements in the product set A ´ B is mn. Hence the number of elements in the
mn mn
power set of A ´ B shall be 2 . It means A ´ B has 2 distinct subsets. Since every subset is a relation from A to B,
mn
the number of different relations from A to B shall be 2 .
Solution n (A ´ B) = 3 ´ 2 = 6
6
Therefore the number of subsets in A ´ B = 2
6
and the number of relations in A ´ B = 2
There are five main methods to represent a relation R from a set A to set B.
Roaster Method :In this method all the elements (ordered pairs) of the relation are enclosed within braces.
A rectangular array is formed whose rows are labeled with the elements of set A and whose columns are
labeled with the elements of set B. If an element x Î A is R – related to the element y Î B, then a 1 is written
against x in the column of y (i.e. in the cell (x, y)). If x Î A is not related to y Î B, then a 0 is written in the cell (x, y).
The array is called the matrix of the relation or relation matrix M.
0 if x y.
Example :- The relation R = {(1, y), (1, z), (3, y)} from the set A = {1, 2, 4}, to set B = {x, y, z} can be represented in
matrix form as follows
Entries
x y z
1 0 1 1
2 0 0 0
3 0 1 0
Arrow diagram:The elements of sets A and B are written in two disjoint plane figures (circles, rectangles, discs etc)
and then arrows are drawn from x Î A to y Î B if x is R–related to y.
Example:- The same relation R = {(1, x), (1, z), (3, y)} from set A = {1, 2, 3} to set B = {x, y, z} has been represented
below by arrow diagram
1
x
2
y
Digraph of a relation on sets:When a relation is from a finite set A to itself then it can be represented by a digraph
also. First the elements of the set A are written down. Then arrows are drawn from each element x to each
element y (x, y Î A) whenever x is R related to y.
Example :- Let the set A = {4, 5, 6, 7} and the relation R on A = {(4, 5), (5, 5), (6, 5), (6, 7), (7, 4), (7, 6)} this relation
can be represented by a digraph as shown below-
4 5
6 7
Set Builder form: In this method the rule that associates the first and second coordinates of each ordered pair is
given e.g. Relation from A to B given by
Composition of Relations: If A, B and C are three non empty sets and R and S are the relations from A to B and B to
C respectively, then R Í A ´ B and S Í B ´ C.Then we define a relation from A to C denoted by R o S ( or S o R as
used by certain authors) given by
R = {(3, p), (4, s), (5, p), (5, q), (5, s)} and S = {(q, x), (q, z), (r, y), (s, z)}
Solution:- From the arrow diagrams of R and S given in the figure, there is an arrow from 4 to s followed by an
arrow from s to z. Thus
4 q y
p q r s x y z
MR = 3 1 0 0 0 p 0 0 0
4 0 0 0 1 MS = q 1 0 1
5 1 1 0 1 r 0 1 0
6 0 0 0 0 s 0 0 1
x y z
MR . MS = MRoS = 3 0 0 0
4 0 0 1
5 1 0 2
6 0 0 0
Non zero entries in this matrix tell us which elements are related in R o S
so R o S = {(1, 2), (1, 3), (1, 1), (2, 3), (3, 2), (3, 3)}
2
(b) S = S o S = {(1, 1), (1, 3), (2, 2), (2, 3), (3, 3)}
A A A
1 1 1
2 2 2
S S
Use of Boolean Matrix to find Composition of Relation
0 otherwise
2. Compare corresponding entries. If even a single pair of corresponding entries consist of two 1s, then cij = 1,
otherwise cij = 0
0 1 0 0 1 1 0
1 1 0 1 0 1 0
0 0 1
then A ⊙ B = 1 1 1 0
0 1 1 0
1 1 1 0
1 0 1 1
Matrix representation of composition of relation
i.e. MRoS = MR ⊙ MS
For example if A = {x, y, z} and R and S are relation on A whose Boolean matrix are given by
MR = 1 0 1 Ms = 1 0 0
1 1 1 0 1 1
0 1 0 1 0 1
then the composite relation RoS is represented by the Boolean matrix MRoS given by
MRoS = MR ⊙ MS = 1 0 1 1 0 0
1 1 1 ⊙ 0 1 1
0 1 0 1 0 1
x y z
1 0 1 x 1 0 1
= 1 1 1 = y 1 1 1
0 1 1 z 0 1 1
= {(x, x), (x, z), (y, x), (y, y), (y, z), (z, y), (z, z)}
Theorem:- Let A, B, C, D be sets, R1 is relation from A to B, R2 is a relation from B to C and R3 is a relation from C to
D, then
The relation (R1 o R2) o R3 is determined by Boolean matrix M(R1 o R2) o R3 ….(1)
and the relation R1o(R2 o R3) is determined by MR1o (R2 o R3) ……(2)
Now M(R1 o R2)oR3 = M(R1 o R2) ⊙ MR3 = (MR1 ⊙ MR2) ⊙ MR3 …..(3)
and MR1 o(R2 o R3) = MR1 ⊙ MR2oM3 = MR1 ⊙ (MR2 ⊙ MR3) ………(4)
Proof:- Let A, B and C be three non empty sets such that R is a relation from A to B and S is a relation from B to C.
Example :- If A = {3, 4, 5}, then IA = {(3, 3), (4, 4), (5, 5)}
R = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)} is a universal relation.
1.13. Properties of Relations (or classification of Relations) There are several important properties that are
used to classify relations on a set, We shall discuss some of these important properties and corresponding classes
of relations on a set.
Reflexive:If A is a non empty set and R is a binary relation on A, then R Í A x A. The relation R on a set is called
reflexive if every element of A is R-related to itself i.e. xRx, " x Î R. or (x, x) Î R " x Î R
Example :- Let A = {2, 3, 4, 5} and R = {(2, 2), (2, 3), (3, 2), (3, 3), (4, 4), (5, 2), (5, 5)}
+
Example :- Let I be the set of positive integers and R is defined as divides (i.e. a|b). Is this relation R reflexive?
+ +
Solution Since x|x " x Î I i.e every element of the set divides itself or every element of I is related to itself by the
+
relation R (i.e. xRx " x Î I ), the given relation is reflexive.
Irreflexive or Anti-Reflexive relation: A relation is irreflexive if x x, " x Î A i.e no element of the set A is R-
related to itself.
Example :- If R = {(x, y) Î A x A | x ¹ y}, then R is irreflexive with respect to the relation defined by ¹, since (x, x) Ï
R"xÎA
Example :- If R = f Í A x A, then R is not reflexive since (x, x) Ï R " x Î A (as empty set has no elements) But R is
irreflexive.
1.13.2 Symmetric, antisymmetric and asymmetric relations
Symmetric relation:If A be a non empty set and R be a binary relation on A such that xRy Þ yRx; " (x, y) Î R
R1 = {(2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4), (3, 2), (4, 2), (4, 3)} is a symmetric relation on A. But the relation given
by R2 = {(2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)} is not a symmetric relation in A, since (2, 3) Î R while (3, 2) Ï R and
(2, 4) Î R but (4, 2) Ï R, (3, 4) Î R but (4, 3) Ï R.
Example :- If L is a set of all straight lines on a plane and R is a relation on L defined as:
R = {(x, y) : x, y Î L and x ^ y}, then R is a symmetric relation in A, since if x ^ y and (x, y) Î R, then y is also ^ x and
(y, x) Î R or xRy Þ yRx
Example :- If A = {1, 2, 3, ……….} and R = {(x, y) : x, y Î A and x | y}, then R is an antisymmetric relation, since there
are no pairs of distinct elements x and y in A such that x/y and y/x. (Note that x and y are distinct element) or xRy
and yRx Þ x = y i.e. If x, y Î R, then x/y and y/x is possible only if x = y.
Caution
It should be noted that the terms symmetric and antisymmetric are not opposite. A relation can have both of these
properties or may lack both these properties as we shall see in the examples given ahead in this section.
If a relation contains some pair of the form (x, y) where x ¹ y, then such a relation can not be both symmetric and
antisymmetric.
Asymmetric relation :A relation R on a set A is asymmetric if whenever xRy i.e (x, y) Î R, then y x i.e. (y, x) ÏR.
Similarly R is not asymmetric if there exists a pair of elements x and y in A such that xRy and yRx i.e. (x, y) Î R and
also (y, x) Î R (even for x = y)
[Here R is the relation less then] then we see that if x < y then y x i.e. if xRy then y x. so the relation is
asymmetric.
Example :- Let A denote the set of positive integers and R = {(x, y) Î A x A : x divides y}. If we take x = y=5 then xRy
and yRx, therefore R is not asymmetric.
Relationship between symmetric, asymmetric or antisymmetric relation to the matrix of the corresponding
relation :
1. If MR = [mij] is the matrix of a symmetric relation R, then MR shall be a symmetric matrix i.e. MR = MRT and each
pair of entries, symmetrically placed about the main diagonal are either both 0 or both 1 as shown in the following
matrix.
0 0 1 1
0 1 0 1
1 0 1 1
1 0 1 1
2. If MR = [mij] is the matrix of an asymmetric relation, then the main diagonal of MR consists entirely of zeros as
shown below
0 1 1
0 0 1
0 0 0
3. If MR = [mij] is the matrix of an antisymmetric relation, then if i ¹ j, then mij = 0 or mji = 0 as shown below:
1 0 0 1
0 1 1 1
0 0 1 0
0 0 0 1
1. Digraph of a symmetric relation:- In the digraph of a symmetric relation, if there is an edge from vertex i
to vertex j then there will be an edge from vertex j to vertex i.
2. Digraph of an asymmetric relation:- Such a diagraph can not simultaneously have an edge from vertex i
to vertex j and an edge from vertex j to vertex i. There can be no cycles of length 1 .
3. Digraph of an antisymmetric relation:- In such a graph, for different vertices i and j there cannot be an
edge from vertex i to vertex j and an edge from vertex j to vertex i. No such condition is imposed for i = j
which means that there can be cycles of length 1.
Example :- If R1 and R2 are two distinct symmetric relations on a set A, then prove that R1 È R2 is a symmetric
relation on A.
Þ (x, y) Î R1 È R2
Þ (y, x) Î R1 È R2
1.13.3Transitive Relation:A relation R on a set is transitive if xRy and yRz ÞxRz. It means that if (x, y) Î R and (y, z)
Î R then (x, z) Î R
Similarly a relation R on a set A is not transitive if there exists x, y and z in A such that xRy and yRz, but x z. If
such x, y, z does not exist, then R is transitive.
Example :- If A = {2, 3, 4} and R = {(2, 3), (2, 4), (3, 4)} then R is a transitive relation in A, since 2R3 (i.e. (2, 3) Î R ),
3R4 (i.e. (3, 4) Î R) and 2R4 (i.e (2, 4) Î R)
Example :- If A is a set of straight lines in a plane then the relation R defined by || (is parallel to ) is transitive, since
for x, y, z Î A, if x || y or xRy and y || z or yRz, then x || z or xRz.
1 1 1
MR = 0 0 1
0 0 1 ,
2 2
then R is transitive, since (MR) ⊙ = MR and therefore if (MR) ⊙ has a 1 in any position, then MR must have 1 in the
same position.
Example :- If A is set of all the triangles in a plane and the relation R on A is defined as follows:
Proof:- (a) To prove that R is reflexive:- Since êx º êy " x, y Î A, therefore êx º êx i.e. xRx or (x, x) Î R. Hence
R is reflexive.
Þ êy = ê x or (y, x) Î R
Hence R is symmetric.
(c) To prove that R is transitive:- " x, y, z Î A, we have (x, y) Î R and (y, z) Î R means that
êx º êy and êy º êz
Þ êx º êz or (x, z) Î R
therefore R is transitive.
Example :- Let L be a set of straight lines in a plane, which one of the following two relations is an equivalence
relation?
So R is symmetric. Again " x, y, z if x – y and y – z both are divisible by 8, then x – z = (x – y) + (y – z) is also divisible
by 8 i.e xRy and yRz ÞxRz. So R is transitive.
Example :- If A is the set of real numbers and R is the relation on A defined as follows:
R = {(x, y) Î A x R : x – y is an integer}
Now let x, y, z Î A. If (x – y) and (y – z) both are integers then x – z = (x – y) + (y – z) being sum of two integers is
also an integer. It means that (x – y) Î R and (y – z) Î R Þ (x – z) Î R or xRy and yRz Þ xRz. So R is transitive.
Consequently R is an equivalence relation.
R = {(x, y) : x º y (mod m)}, m divide a – b. where m is a positive integer. Prove that R is an equivalence relation.
Solution (i) Since x – x is divisible by m, therefore x º x (mod m) i.e. xRx. Thus R is reflexive.
Þ x º z (mod m)
So R is transitive.
Note:- The relation x º y (mod m) read as “x is congruent to y mod m” can also be written as “x = r mod m and y = r
mod m which means that x and y yield the same remainder r when divided by m.
-1
Example :- If R is an equivalence relation on A, then prove that R is also equivalence relation on A.
-1 -1
Solution Let x Î A. As R is a reflexive relation, (x, x) Î R which implies that (x, x) Î R So R is reflexive.
The power of a relation is defined from the definition of composition of two relations.
n
If R is a relation on the set A, then power R , n = 1, 2, 3 … are defined inductively by
1 n+1 n
R = R; R = R oR
2 3 2
In this way R = RoR; R = R oR = (RoR)oR and so on,
n
Theorem :- The relation R on a set A is transitive if and only R Í R for n = 1, 2, 3…….
n
Proof:- Let R Í R for n = 1, 2, 3, ………….
2 2
Taking n = 2, R Í R. Now let (x, y) Î R and (y, z) Î R, then by definition of composition (x, z) Î R [=RoR] as shown
below
x x x
y y y RoR = {x,z}
2
z z z or (x.z)Î R
R R
2
Thus (x, y) Î R and (y, z) Î R Þ (x, z) Î R …………….(1)
2
and R Í R (given) so (x, z) Î R ………..(2)
From (1) & (2) (x, y) Î R and (y, z) ÎÞ R Þ (x, z) Î R.
2
So R is transitive. Thus R Í R Þ R is transitive. We can use the method of Mathematical induction to prove the
theorem.
Definition – Let R be a relation on a set A. The relation R may or may not possess some property P (such as
reflexivity, symmetry, or transitivity). Let S be a relation possessing a property P and containing the set R (i.e. R Í
S) such that S is a subset of every relation possessing the same property P and containing R. Then the set S is called
the closure of R with respect to the property P.
Example :- Let A = {2, 3, 4} and a relation R defined on A be given by R = {(2, 2), (2, 3), (3, 2), (4, 3)} Clearly R is not
reflexive. We want to make R reflexive by including the minimum number of ordered pairs of A ´ A to R. This can
be done by including only two elements (ordered pairs) (3, 3) and (4, 4) to R. The new relation S so obtained is
given by
S = {(2, 2), (2, 3), (3, 2), (4, 3), (3, 3), (4, 4)}.
Clearly S is reflexive, contains R and is a subset of any other reflexive relation containing R. Therefore S is reflexive
closure of R.
Similarly the symmetric closure of R = {(2, 2), (2, 3), (3, 3), (3, 4), (4, 2), (4, 3)} on A = {2, 3, 4} is given by
S = {(2, 2), (2, 3), (3, 3), (3, 4), (4, 2), (4, 3), (3, 2), (2, 4)} which is obtained on adding (3, 2), (2, 4) to R. Clearly this S
is symmetric, contains R and is a subset of any symmetric relation containing R.
In a similar way transitive closure of R = {(1, 2), (2, 3), (3, 3)} defined on A = {1, 2, 3} is given by S = {(1, 2), (2, 3), (3,
3), (1, 3)}
Note:- It takes a lot of time to find transitive closure of R when A has a large number of elements.
Let R be an equivalence relation on a non-empty set A. Also let a be any element in A. Then the set of all those
elements of A which are R-related to a is called equivalence class or equivalence set of a with respect to R, and is
denoted as [a] or a or Aa. Symbolically
It can be seen that [4] = [1], [5] = [2] & so on. Thus we have only 3 distinct equivalence classes.
= { x : x Î A and x = 0 + 3m}
Similarly
All these equivalence classes satisfy certain properties which have been discussed in the next section.
Let R be an equivalence relation defined on a non empty set A. If a and b are two arbitrary elements of A, then
(iv) Either the two equivalence classes with respect to R are identical or disjoint i.e. either [a]=[b] or [a] Ç [b] = Æ.
We shall prove each of these four properties as follows:
Proof:- (i) Equivalence class [a] consists of all those elements of set A that are R-related with the elements ‘a’ Î A.
Similarly by taking y as any arbitrary elements of [a], we can prove [a] Í [b] ……(5)
[a] = [b]
(iii) Let [a] = [b]. we shall prove aRb
or x Î [a] Þ x Î [b]
As [a] Ç [b] ¹ Æ, there must exist an elements x such that x Î [a] Ç [b] which implies that x Î [a] and x Î [b]
We have already defined ‘Partition of a set in the chapter on Set Theory. In brief partition of a non-empty set A is a
set P of non empty subsets of S (say A1, A2, A3, …..)
(a) Union of all these subsets in P is the set S i.e. {A1 È A2 È A3, ……….} = S
For example if S = {2, 3, 4, 5, 6, 7, 8, 9} and its subsets A1 = {2, 4}, A2 = {8, 9}, A3 = {3, 6, 7}, A4 = {5}
1.20 Quotient Set:Let A be a non empty set and R be an equivalence relation defined in A. Then the set of
mutually disjoint equivalence classes into which A is partitioned relative to the equivalence relation R is called the
Quotient set of A for the equivalence relation R and is denoted by A/R or `A. The collection of all equivalence
classes of elements of set A denoted by A/R or A/~ is called the Quotient of A by R or ~.
The collection of all equivalence classes of elements of set A under an equivalence relation R denoted by A/R is
called the Quotient set of A by R or simply a partition. Thus it is a collection of non empty subsets of A such that
(b) The intersection of every pair of two distinct elements of P is null set.
A3 = {a, c, e, g}, A4 = {f, h}, A5 = {b, d} then {A1, A2} is not a quotient set since A1 Ç A2 ¹ Æ. {A2, A4} is not a quotient
set since f Î A2, f Î A4.
1.22Functions
1.21.1 Function of a single variable :Suppose A & B are two non empty sets of real numbers. A rule that associates
to every elements x Î A, a unique element y Î B is called a function or mapping from the set A to the set B. Rule is
denoted by f and we write f : A ® B and read, “f is a function from A to B”
and f(x) = {f (x) : x Î A} is called Range of f from A to B or R = {(y) : y Î B and y = f(x) , " x Î A} is called Range of f.
If x Î A and the rule f associates x to an unique element y Î B such that y = f(a), then y is called f-image of x and x
is called pre-image of y in A.
Important : It is not necessary that each element of the set B shall be the image of an element in the set A, but it is
necessary that every elements of A must have one and only one image in the set B.
Range of f = {f (x) : x Î A} Í B.
Let A and B be two sets and f be a function from A to B. f is a subset of A x B such that each x Î A appears in one
and only one ordered pair belonging to f.
(a) No x Î A can have more than one f-image in the set B or we can say there cannot be two or more distinct
second coordinates corresponding to any first coordinate in the set of ordered pairs A x B e. g (x, y1) and (x, y2) can
not be the elements of A x B.
(b) Every element in A must have an image in B. This condition is not necessary for a relation. Thus every function
is a relation but every relation is not a function.
(c) If R is a relation from A to B, then domain of R may be a subset of A. But if f is a function from A to B, then
domain of f is equal to A.
Example :- Let A = {a, b, c} and B = {2, 3, 4, 8} then (i) the subset R of A x B given by R = {(a, 2), (b, 2), (c, 8)} is a
function from A to B.
S1 = {(a, 2), (a, 4), (b, 3), (c, 8)} is a relation but not a function because the same element a Î A is associated with
two elements 2, 4 Î B.
(iii) the subset S2 of A x B given by S2 = {(a, 4), (b , 8)} is a relation but not a function because an element c Î A is
not associated with any element of B .
Example :- Find domain and range of the function defined by
2
x for x < 0
f(x) = x for 0 £ x £ 1
For x > 1, f(x) = 1/x whose value shall lie in the open interval ] 0, 1[, Thus the required range of f shall be given by
1.21.3 Identity Function: If A is a non empty set and f is a function such that f: A® A defined by f (x) = x, " x Î A.
Then f is called identity function.
f : A ® B defined by f (x) = c is called a constant function. It is not one – one as f (2) = c, f (3) = c.
Here every element of the domain is assigned to the same element of the co domain
A B B A
a p p a
b q q b
c r r c
--1
f : A ®B f :B®A
A function is said to be real valued if a set is mapped into a set of real number e.g.f (x) = sin x, f (x) = log x
*
Graph of a function:Let f : A ® B be a function, then the graph of f, generally denoted by f is defined as set of
*
ordered pairs (x, y) Î A x B such that y = f (x). The graph of f is given by f = {(x, y) Î A ´ B : y = f (x)}
2
For example : - if f : R ® R is a function given by f (x) = x + 1 " x Î R then
* 2
f = {(x, y) Î R x R : y = x + 1}
= {(1, 2), (2, 5), (3, 10), (-1, 2), (-2, 5), …..}
2 -1 -1 -1
Example :- If the function f : R ® R be defined by f (x) = x , then find out (i) f (9) (ii) f (-9) (iii) f (9, 16)
2
Solution f : R ® R, f (x) = x , x Î R
-1
(i) f (9) = {x Î R : f(x) = 9 }
= {3, -3}
-1
(ii) Again f (-9) = {x Î R : f (x) = -9}
2
= {x Î R : x = -9}
= {x Î R : x = ± 3i}
= f as ± 3i Ï R
-1 2 2
(iii) f (9, 16) = {x Î R : f (x) = 9, f (x) = 16} = {x Î R : x = 9, x = 16}= {+3, -3, +4, -4}
2 -1
Example :- If the map f : C ® C is given by f (x) = x , then find f (-5)
-1
Solution f (-5) = {z Î C : f (z) = -5}
2
= {z Î C : z = ± iÖ5} = {iÖ5, -iÖ5}
Transformation or operators: If the domain and co domain of a function f are both the same set, say A i.e f : A
® A then f is called an Operator or transformation on the set A.
Equal functions:Two functions f and g defined on the same domain A are said to be equal if
Let A, B, C, be three sets and f and g be two functions such that f : A ® B and g: B ® C.
It means that the function (or mapping) f maps an element x Î A into an element y Î B where y = f (x) " x Î A.
Also the function g maps an element y Î B to an element z Î C, where z = g (y) " y Î B.
So g (y) = g (f (x))
Thus we have a mapping which maps an element x Î A to an element g (f(x)) Î C. It is called the composition or
product of functions f and g in that order and is denoted by gof or simply gf. It is also called composite mapping of
f and g. Hence we say that if f : A ® B, g : B ® C then the composite mapping from A to C is given by
Theorem Let A, B, C and D be four sets and f, g, h be three functions such that f : A ® B, g : B ® C, h : C ® D then
(hog)of = ho(gof)
Let f : X ® Y and g : Y ® Z be two function. The composite relation gof such that
gof = {(x, z)/ (x Î X) Ù (z Î Z) Ù ($ y) (y Î Y) Ù y = f (x) Ù z = g (y))} is called the composition of functions or relative
product of f and g or left composition of g with f, Range Rf of f is a subset of domain of g which is Y i.e. Rf Í Dg
otherwise gof is empty.
f : X ® Y is f = {(1, p), (2, p), (3, q)} and g : Y ® Z is g = {(p, b), (q, b)} Find gof.
X Y Z
1 p a
2 b
3 q
f:X®Y g:Y®Z
f g gof
X Y Z X Z
x1 y1 x1 z1
x2 y2 z1 x2 z2
x3 y3 z2 x3 z3
x4 y4 z3 x4
y5
Diagrammatic representation of f, g, h and (hog)of
(hog)of
y hog
f g h
ho(gof)
2
Example :- It the functions f : R ® R and g : R ® R are defined by f (x) = x + 2 and g (x) = 2x + 1, then evaluate (fog)
(x), (gof) (x).
Algebraic Function :It consists of a finite number of terms involving powers and roots of the independent variable
x and the fundamental operations (+, -, *, / )
3 2 2 2
e.g. 4x – 7x + 3x + 2, (3x – 1) , 3Öx + 7 / (2x + 1)
ns
Three types of Algebraic F
Transcendental Function
ns
Four types of Transcendental F
Other functions
2
Single Valued Function : y= x , y = sinx, corresponding to one value of x we get one value of y.
-1
Many valued Functoin : y = cos x
or y = 2np ± p/3, n Î I
A mapping or function f : A ® B is said to be injective if for each pair of distinct elements of A, their f-images (in B)
are also distinct. It means that f : A ® B is injective if for x1, x2 Î A, (x1 ¹ x2) Þ f (x1) ¹ f (x2) in B.
Example:- The function f (x) = 2x + 1. where x is a real number is injective as for any pair of values of x say x1 and x2
Î A, f (x1) = 2x1 + 1 ¹ f (x2) = 2x2 + 1. The diagrammatic representation of an injective function shall be of the
following form.
x1 y1
x2 y
1.24.2 Many one function or mapping
A mapping f : A ® B is many one if two or more different elements in A have the same f-image in B i.e x1, x2 Î A
and x1 ¹ x2 Þ f (x1) = f (x2)
2
Example:- The mapping {-2, 2, 3, 4} ® {4, 9, 16} defined by f (x) = x is many one because two different elements in
A (i.e. -2, 2) have the same f-image in B (i.e. 4).
-2 4
2 9
1.24.3 Surjective or Onto mapping or Surjection :A mapping f from a non empty set A to another non empty set
B i.e f : A ® B is said to onto or Surjective if " y Î B there exists x Î A such that y = f (x). It means every element in
B has its pre image in A. Each element in B shall have one pre image (in case of one to one mapping) or more than
one (in case of many one mapping) pre images in A.
x1 y1
x1
y1
x2
y2
Example :- Let f(x) = x + 1 (x is any integer), then the domain and range of f shall be the set of integers
f : Z ® Z.
Every element y in codomain set Z shall have its image (= y – 1) in the domain set z.
1.24.4. Into function or mapping:A mapping f : A ® B (of a non empty set A to a non-empty set B) is said to be
into mapping if there exists at least one element of the codomain set B which is not the f-image of any element in
A.
Example :- If the mapping f is defined by f (x) = 2x, where x is any integer then the domain set A shall be the set of
all integers while the set f (x) shall be the set of all even integers which is a proper subset of the set of all integers.
Thus there will be elements in codomain set (odd integers) which will not have any pre-image in the domain set A.
2
Example :- Similarly the function defined by f (x) = x (x is any integer) is also into mapping because the domain set
is set of all integers {0, ±1, ±2, …..} and set f (x) set is set of positive integers only Í set of all integers (codomain
set) and there will be elements in codomain set (negative integers) which will not have their pre-image in domain
set.
Diagrammatically it can be represented as follows :
x1 y1
x2 y2
1.24.4.1 One-One-into mapping :A mapping which is one-to-one and into is called one-one into mapping from A
to B. It means that(a) f (x1) ¹ f (x2) if x1 ¹ x2 i.e. f images of two distinct elements in A shall be the two distinct
elements in B.and (b) there exists at least one element in B which is not the f-image of any element in A.
into
It is written as f : A B
1-1
1.24.4.2 Many one into mapping :A mapping f : A ® B is said many one into if
(b) there is at least one element y Î B which is not the f-image of any element of A.
1.24.5. Bijective mapping or one to one and onto mapping:A mapping or function which is one to one and onto
is called a Bijective mapping. It is written as
onto
A B
1–1
Example :- If A = {p, q, r} and B = {a, b, c} then f = {(p, a), (q, c), (r, b)} is a bijective mapping.
We given below the diagrammatic representation of one – one onto functions, f1, f2, f3, f4 are four functions. f1 : A
® B, f2 : B ® C, f3 : C ® D and f4 : D ® E. All these four functions have been represented by arrow diagrams and
nature of each of these is also discussed here.
1.24.6. Many-one onto mapping: A function f : A ® B which is many one and onto is called many one onto
mapping. In such a mapping (a) f (x1) = f (x2) Þ x1 ¹ x2, x1, x2 Î A
Example :- If A = {3, 4, 5}, B = {x, y}, then f = {(3, x), (4, y), (5, y)} is a many one onto mapping.
Example :- If A and B are two non empty sets and a function f : A®B is one-to-one onto, then prove that the
-1
inverse function f : B®A is also one to-one onto.
-1 -1
Solution Let x1, x2 Î A and f (x1) = y, f (x2) = y2, y1, y2 Î B; then x1 = f (y1) and x2 = f (y2). we can represent this as
follows
-1
x1 = f (y1) f (x1) = y1
f
-1
f
-1
A f B
As f is one-one
y1 ¹ y2 or f (x1) ¹ f (x2) Þ x1 ¹ x2
-1 -1 -1 --1 -1
Þ f (y1) ¹ f (y2) which means that y1 ¹ y2 Þ f (y1) ¹ f (y2), therefore the inverse function f is one-to-one.
-1
Again as f is onto, therefore " x Î A there exists a unique y Î B such that f (x) = y, which implies x = f (y). It
-1 -1
means that corresponding to each x Î A we have a pre image f (y) in B. Therefore f is onto function
-1
Consequently f is one to one onto function.
Example :- Let Q be the set of all rational numbers and f : Q®Q be a function defined by f (x) = 3x + 5, x Î Q, then
prove that f is one to one onto. Also find inverse of f.
Þ y = 3x + 5 or x = (y – 5)/3 ……(1)
Thus any arbitrary element y in Q (in co domain set) is the f-image of the element (y – 5)/3 Î Q (domain set) i.e.
every element in the co domain set has its pre image in domain set. Therefore f is onto.
-1
Now as f is one-one, f has an inverse function f : Q®Q.
If y is the image of x under the function f, then y = f (x) = 3x + 5. Hence x will be the image of y under the
inverse function
-1
x = f (y) = (y – 5)/3 (y Î Q).
1.25 Mathematical Induction :
Let P (n) be a proposition on an integer variable n. Then P (n) is true for all integers n ³ s if and only if the
following two conditions are both satisfied :
(i) P (s ) is true ,
Inductive Hypothesis: We assume the result is true when n = k, i.e. we assume that
2 + (3 ´ 2) + (4 ´ 2 2 ) + ... + ( k + 1)2 k -1 = k 2 k .
Inductive step: We want to prove the result true when n = k + 1, i.e. we want to show that
2 + (3 ´ 2) + (4 ´ 2 2 ) + ... + ( k + 1 + 1)2 k +1-1 = ( k + 1)2 k +1
i.e. that 2 + (3 ´ 2) + (4 ´ 2 2 ) + ... + ( k + 1)2 k -1 + ( k + 2)2 k = ( k + 1)2 k +1 .
4 n+1
Solution: Let f(n) = 2 +3.
5
Step 1: Prove f(1) is a multiple of 5. But f(1) = 2 + 3 = 35 (which is a multiple of 5).
4( n+1) +1
f(n + 1) - f(n) = 2 + 3 - ( 24 n+1 + 3 ) = 2 4 n +5 - 2 4 n +1 = 2 4 n +1 (2 4 - 1) = 15 ´ 2 4 n +1
Therefore:
4 k +1
f(k + 1) – f(k) = 15 ´ 2
4 k +1
So, f(k + 1) = 15 ´ 2 + f (k ) .
Multiple of 5 Assumed to be a
multiple of 5
A binary operation is a function which associates a unique element of the set A to every ordered pair of elements
of A. It means that if A is a non empty set, then any function (denoted by say *): A ´ A ® A is called a binary
operation on A. The binary operation * on set A and the ordered pair (a, b) Î A ´ A, *(a, b) is denoted by a * b.
If a binary operation is applied to the two elements of an ordered pair (a, b) Î A, then the resulting element a * b
shall also belong to the same set A. Such an operation is said to be closed. Thus a binary operation on a set A is
always closed on A, but it may not be closed on a subset of A.
For examples:- (a) The operations of addition (+) and multiplication (´) are binary operations on the set of integers
Z, since " a, b Î Z, a + b Î Z and (a ´ b) Î Z.
(b) The operations of È and Ç are binary operations on the power set of a non empty set S, since A È B Î P(S) and
A Ç B Î P(S) " A, B Í S.
a*bÎA
(b) Associative:- if a, b, c Î A,
(a * b) * c = a * (b * c)
a*e=a=e*a
(d) Inverse of an element:- if e, a Î A and b Î A such that a * b = e = b * a, then b is called an inverse of a
-1
and we write b = a .
2.3 Algebraic Structure : A non empty set G along with one or more binary operations is called an algebraic
structure.
Example :- If G is a non empty set and * and 0 are binary operations, then (G, *), (G, *, 0), (G, 0) are all algebraic
structures.
(N, +), (I, +), (I, -) and (R, +, ·) are all algebraic structures, since (a) addition is a binary operation for the set N as
well as the set I . (b) Subtraction is a binary operation for the set I (c) addition and multiplication are binary
operations for the set R.
2.4 Semi-group : An algebraic structure (G, *), where G is a non-empty set and * is a binary operation, is said to be
a semi-group if the binary operation * is associative in G i.e.
(a * b) * c = a * (b * c), " a, b, c Î G.
Example :- Let N be the set of natural numbers and addition is the binary operation w.r.t N., then addition is an
associative operation on N. Therefore (N, +) is a semi group.
Similarly the algebraic structures (N, ·), (I, +) and (R, +) are semi groups.
2.5 Group :A non empty set G along will an operation denoted by *. i.e. (G, *) is called a group if the operation *
satisfies the following postulates.
1. Closure property:- It means that the operation * is a binary operation i.e. a * b Î G, " a, b Î G
4. Existence of Inverse:- Every element a of G possesses an inverse element. It means that there exists an elements
-1 -1 -1
b Î G such that b * a = e = a * b. This element b is called the inverse of a (=a ). Thus b = a . Therefore a * a = e =
-1
a*a
An algebraic structure (G, *) which satisfies all the four properties mentioned above and also a fifth property
stated below is called an abelian group.
Note:-If it is given that * is a binary operation, then the closure property is automatically satisfied and in order that
(G, *) may be a group, the properties (2) – (4) have to be satisfied.
Some times only the symbol G is used to denote the algebraic structure if there is no confusion regarding the
operation *.
2.7 Finite and Infinite Group:If the non empty set G of the group (G, *) consists of a finite number of distinct
elements, the group is called a finite group, otherwise it is an infinite group.
2.8 Order of a group:The number of elements in a finite group is called the order of the group. The order of an
infinite group is infinite. Order of a group is denoted by o(G).
The group of the smallest order for a given operation or simply the smallest group is the group in which the set G
consists of the identity element e alone i.e. G = {e}.
Example :- Prove that the set I of all integers {------- -3, -2, -1, 0, 1, 2, 3, -----} is a group will respect to the operation
of addition of integers.
Solution:- We shall have to show that the algebraic structure (I, +) satisfies all the four postulates of a group.
1. Closure property - We know that a + b Î I " a, b Î I, therefore the set I is closed with respect to the operation
of addition or addition satisfies the closure property for I.
2. Associativity – It is know that addition is an associative operation for the set I.
3. Existence of identity- We have an integer 0 such that a + 0 = a = 0 + a, " a Î I. Therefore the integer 0 is an
identity for the set I with respect to the operation of addition.
4. Existence of inverse- " a Î I, -a Î I. and (-a) + a = 0 = a + (-a), therefore corresponding to each element a Î I,
there exists an inverse (-a) Î I. Thus (I, +) is a group.
Proof:- Identity element in a group (G, *) means the identity element Î G with respect to the binary operation *.
Let (G, *) be a group. Also let e1 and e2 are identity element of G i.e. e1 , e2 Î G.
e1= e1* e2 = e2
-1 -1 -1 -1
Theorem : If a is the inverse of a , then (a ) = a i.e. the inverse of (a ) is a.
Proof:- Let G be a non empty set and a Î A. Also let e be the identity for G. Let the binary operation be *. Then
-1
a *a=e (by definition of inverse)
-1 -1 -1 -1 -1 -1 -1 -1
or (a ) * [a * a] = (a ) * e (operating both sides by (a ) which belongs to A as a Î G)
-1 -1 -1 -1 -1
or [(a ) * (a )] * a = (a ) (applying associative property on L.H.S and definition of identity on R.H.S)
-1 -1 -1 -1 -1
or e * a = (a ) (by inverse property as (a ) is inverse of a )
-1 -1
or a = (a ) (by definition of identity)
-1 -1
or (a ) = a
Note:- Some times the notation for operation is not used e.g. instead of a * b, we write ab in case no confusion is
created by it.
Theorem :- The inverse of the product of two elements of a group G is equal to the product of the inverses taken in
-1 -1 -1
(ab) = b a " a, b Î G
Note:- Here by product of two elements a, b we mean a b = a * b, (* is any binary operation). Thus we have to
prove that
-1 -1 -1
(a * b) = b * a " a, b Î G.
-1 -1
Proof:-Let a, b, Î G and a and b are inverse of a and b respectively. Let e be the identity element.
-1 -1
Then a * a = e = a * a
-1 -1
and b * b = e = b * b
-1 -1 -1 -1
Now (a * b) * (b * a ) = (a * b * b ) * a (as * is associative)
-1 -1
= [a * (b * b )] * a
-1
= [a * e] * a (by definition of inverse)
-1
= (a) * a (by definition of identity)
We have a * b = a * c
-1 -1 -1
or a * (a * b) = a * (a * c) (operating on left, both sides by a )
-1 -1
or (a * a) * b = (a * a) * c (using associativity property)
Again if b * a = c * a, then
-1 -1 -1
(b * a) * a = (c * a) * a (operating on right, both the sites by a )
-1 -1
or b * (a * a ) = c * (a * a ) (by associativity)
Example :- Show that the set A of complex numbers of absolute value 1 form a group under multiplication of
complex numbers.
2 2
Solution:- Let A = {x + iy : x, y Î R, x + y = 1}
Closure property:- |z1 . z2| = |z1| . |z2| Î C which satisfies the closure property.
Theorem :-If a and b are two elements of a group G, then the equations a x = b and y a = b have unique solutions in
G.
-1 -1 -1
Proof:- Let (G, *) be the group and e be its identity element. Since a Î G, therefore a Î G and a * a = e = a * a .
-1 -1
Again, Since a Î G and b Î G (given), therefore a * b Î G (* being a binary operation) ………..(1)
Theorem8:- A group in which each element is the inverse of itself is an abelian group.
Proof:- Let (G, *) be a group, and a, b Î G. Therefore a * b Î G (since G is a group and * is binary operation.).
-1 -1
Now a = a and b = b (given) ……………(1)
-1
Also (a * b) = (a * b) (given, since a * b Î G) ………..(2)
-1 -1 -1
We have (a * b) = b * a (property of a group)
From (2) & (3) we have a * b = b * a. So the operation * is commutative and the group (G, *) is an ablian group.
Proof:- It means that if it is given that e is the left identity of a group (G, *) i.e. e * a = a, " a Î G, then we have to
prove that e is also its right identity i.e. a * e = a, " a Î G.
Solution:-
1. Closure property:- " a, b Î Q, we know that a * b = ab/2 Î Q+, therefore the set Q+ is closed with respect to the
given operation *.
or e a/2 = a
I II
+ +
From I and II we get e = 2 and 2 Î Q i.e. 2 is the left identity. Thus 2 is the identity for the group Q with respect to
the given operation.
+ +
4 Existence of left inverse: - Let b Î Q be the left inverse of an element a Î Q , then b * a = 2
or ba/2 = 2
I II
+
From I and II we have b = 4/a i.e. 4/a is the left inverse of a. Thus corresponding to each element a Î Q , its inverse
+ +
element = 4/a Î Q . Therefore inverse element exists for each element of Q .
5 Commutativity:- For any two elements a, b Î Q+ we have a * b = ab/2 and b * a = ba/2 = ab/2. Thus a * b = b * a,
+
" a, b Î Q . Therefore the commutativty property is satisfied.
+
Hence (Q , *) is an abelian group.
Example:- If a binary operation * defined for a set of real numbers is given by a * b = a + b + ab " a, b Î R, then
find out the identity element in R and also determine the inverse of a Î R.
or e + a + ea = a = a + e + ae
I II III
Thus the identity element for all elements in R (except – 1) is 0. Again let b Î R be the inverse of a Î R then b * a =
0 = a * b (a ¹ -1)
or b + a + ba = 0 = a + b + ab
I II III
Example :- Show that the set of all positive rational numbers does not form a group with respect to the binary
operation * defined by a * b = a/b.
Solution:-
1. Closure property – It is satisfied (as the operation is a binary operation) for the set of positive rational number
+
2. Associativity – Let a, b, c Î R , then (a * b) * c = (a/b) * c = a/bc
Thus (a * b) * c ¹ a * (b * c)
+
Therefore Associativty property is not satisfied. Hence (R , *) is not a group.
Solution:-
1. Closure property – Let x and y be any two elements in G such that x = a + b√2 and y = c + d√2, a, b, c,d Î Q, then
x + y = (a + c) + (b + d) √2.
Now a + c an b + d each being sum of two rational numbers are themselves rational numbers i.e. a + c Î Q and b +
d Î Q. Thus x + y Î G " x, y Î G. Hence the closure property is satisfied.
2. Associativity – Since elements of G are all real numbers and the operation of addition is associative for the set of
real numbers (& hence for the set of rational numbers).
3. Existence of left identity- Let e = 0 + 0√2 be the le iden ty for an element x = a + b√2, a,b Î Q, then e + x = (0 +
0√2) + (a + b√2) = a + b√2 = x i .e. the le iden ty exists. Thus e = 0 + 0√2 is the iden ty element for G with respect
to the operation of addition.
So a + b√2 Î G Þ -a - b√2 Î G
and (a + b√2) + (-a - b√2) = 0 + 0√2
cosa -sina
Aa =
sina cosa
cosa -sina
Aa =
sina cosa
Aa . Ab =
cos (a + b) -sin (a + b)
= = Aa+b
sin (a+b) cos (a + b)
As a + b being sum of the two real numbers is also a real numbers, Aa+b Î M. therefore the set M is closed with
respect to matrix multiplication.
A0 = cos0 -sin0
sin0 cos0
belongs to M. Also for Aa Î M, we have A0 . Aa = A0+a or Aa. Thus A0 Î M is the left identity element for each
element Aa Î M.
4. Existence of left inverse- If aÎ R, then -a Î R and therefore Aa Î M Þ A-a Î M. Let Ab Î M be the left inverse
of Aa Î M then Ab . Aa = Ao or Aa+b = Ao or a + b = 0 or b = - a. Therefore A-a Î Ma is the left inverse of Aa Î G. It
means each element of M possesses left inverse. Hence (M, ´) is a group.
The tabular form in which a binary operation in a finite set is represented is known as composition table.
Let A = {a1, a2, ……….an} be a finite set and the symbol * denotes a binary composition in the set A such
that ai, aj Î A Þ ai * aj Î A. The elements of the set A are written in the top most row as well as the first column of
the composition table. The value of (ai * aj) is placed at the intersection of ith row and jth column as shown below.
Each element of the set A is written once in each row and each column.
* a1 a2 …………………………. an
. . . .
. . . .
. . . .
. . . .
Example :- Show that the four fourth roots of unity viz 1, -1, i, -i form a group with respect to multiplication.
Solution:- We represent the set A = {1, -1, i, -i} with respect to composition of multiplication in the composition
table as follows:
multiplication 1 -1 i -i
1 1 -1 i -1
-1 -1 1 -i i
i i -i -1 1
-i -i i 1 -1
(1) Closure property:- As all the entries in the composition table belong to A, it is concluded that A is closed
with respect to multiplication
(2) Associativity:- Elements of A are all complex numbers and multiplication of complex numbers is
associative.
(3) Existence of left identity:- Corresponding to each element ai Î A in the first column we have an element 1 Î A
in the topmost row such that 1.(ai) = ai = ai (1) [e.g. 1.(1) = 1, -1.1= -1, 1 (i) = i, 1(-i) = -i] Thus 1 Î A is the left
identity element in A i.e. left identity exists.[This fact is easily recognized by the fact that the column entries below
the element 1 coincides with the first row or the row entries against 1 coincides with the topmost row]
4. Existence of left inverse:- It is evident from the composition table that corresponding to each element ai Î A in
the first column there exists an element aj Î A in the topmost row such that aj.ai = 1 (the identity element) i.e.
left inverse exists " ai Î A. It means that corresponding to every element ai Î A its inverse aj Î A exists.
[1 is the inverse of 1, -1 is the inverse of -1, -i is the inverse of i, i is the inverse of –i]
1 0 -1 0 1 0 -1 0
0 1 0 1 0 -1 0 -1
Solution:- Let the given matrices be denoted by A1, A2, A3 and A4 respectively. Also let M denote the set of these
four matrices i.e. M = {A1, A2, A3, A4}.
Now we arrange the elements of the set M in the form of composition table & fill in the entries by calculating the
value of products.
e.g. 1 0 1 0 1 0
A1. A1 = = = A1
0 +1 0 +1 0 1
1 0 -1 0 -1 0
A1 A2 = = = A2
0 1 0 1 0 1
and so on
Multiplication A1 A2 A3 A4
A1 A1 A2 A3 A4
A2 A2 A1 A4 A3
A3 A3 A4 A1 A2
A4 A4 A3 A2 A1
1. Closure property:- All the entries in the composition table belongs to M, so M is closed with respect to
multiplication.
3. Existent of identity:- Corresponding to each element Ai Î M we have an element A1 Î M such that Ai. A = Ai = A.
Ai for i = 1, 2, 3, 4. (as is evident from the table)
therefore A1 is the left identity. [It is also clear form the fact that the first row and first column of the composition
table coincides]
4. Existence of inverse:- It is easily seen from the composition table that the inverse elements for A1, A2, A3 and A4
are A1, A2, A3, A4 respectively. [It is easily verified from the fact that each of the main diagonal elements of the
table is A1, the identity] Thus M is a group with respect to multiplication.
5. Commutative property:- We see from the composition table that the entries in the first, second, third and
fourth rows coincide with the entries in the first, second, third and fourth column respectively. Therefore we have
Ai. Aj = Aj Ai. Hence the composition in M is commutative. Also the number of elements in M is finite (=4). Hence M
is an abelian group of order 4 with respect to multiplication.
If a and b are any integer and m is a fixed positive integer then “addition module m” written as a + mb is the least
non negative remainder (which is also an integer say r) which is obtained when the ordinary sum of a and b (=a + b)
is divided by m thus a + mb = r, 0 £ r < m.
= 3 (-87) – 1 = 3 (-87) – 3 + 3 – 1
= 3 (-88) + 2
If a and b are two integers such that a – b is divisible by a fixed positive integer or m |(a – b), then a º b (mod m)
which is read as” a is congruent to b modulo m”.
Example :- Prove that if a º b (mod m), then a + mc = b + mc, where a, b, c are integers & m is a positive integer.
= b + mc.
Hence proved.
Note:- 1. a + mb = (a + b) (mod m) = the least non negative integer obtained on dividing a + b by m e.g. 7 + 46 = 13
(mod 4) = 1
a + b º r (mod m).
3. a + mb = b + ma
If a and b are any integers and m is a fixed positive integer, then multiplication modulo m written as a ´ mb is the
least non negative remainder (which is also an integer) obtained on dividing the ordinary product of a and b (=ab)
by m,
Thus a ´ mb = r, 0 £ r <m.
For example 11 ´ 73 = 5.
Þ a = b + km.
Now a x mc = (b + km) ´ mc = the least non negative remainder obtained on dividing (b + km)c or bc + kmc by m.
= least non negative remainder obtained on dividing bc by m (as kmc is already divisible by m)
= b ´ mc Hence proved.
Example:- If 11 º 3 (mod 4), then 11 ´ 45 = 3 ´ 45 = 3
Note: 1. a ´ mb = ab (mod m)
3. a ´ mb = b ´ ma
2.13. Permutations
If P = {a1, a2, ……..an} is a finite set having n distinct elements, then a one to one mapping (f) of P onto itself is
called permutation of degree n.
Symbolically we can say that if f : P ® P is one-one onto then the mapping f is called permutation.
Let f (a1) = b1, f(a2) = b2, f (a3) = b3, ……….., f (an) = bn where {b1, b2, b3, …..bn} = {a1, a2, a3, …………..an}. It should be
noted here that since the mapping is onto therefore b1, b2, b3, …….bn are nothing but some arrangement of a1, a2,
a3, …….an. It means that each value or element in {b1, b2, …….bn} shall definitely be an element in the set {a1, a2,
………an}. Both the sets are the same with different arrangement. e.g. If the set P = {a1, a2, a3} = {1,2, 3} then the set
of bs can be obtained by arranging the elements of P in any way. It can be any one of the following six sets – {1, 2,
3}, {2, 1, 3}, {1, 3, 2}, {3, 2, 1}, {2, 3, 1}, {3, 1, 2}. We can write the permutation in the form given below
f = (a1 a2 a3…………..an)
or
(a1 a2 a3 …………an)
(b1 b2 b3 ………….bn)
where b1 = f (a1), b2 = f (a2), b3 = f (a3) ……..bn = f (an). It should be noted that since the function f is a onto ,
therefore any b shall be some a.
123 231
are all permutations of degree 3.
Equal permutations:- Two permutation f and g are said to be equal if f(a) = g(a) " a Î P.
For example if
f= 1 2 3 4 and g = 2 4 3 1
2 4 1 3 4 3 1 2
then we see that f(1) = 2 = g(1), f(2) = 4 = g (2), f (3) = (1) = g(3) and f (4) = 3 = g (4) therefore f =g
Interchange of Column:- The interchange of any number of columns of a permutation does not change it.
For example f = 1 2 3 4 = 3 2 1 4
2 4 1 3 1 4 2 3
Similarly
an a1 ………a2
= bn b1 ……….b2
Number of Permutation:- If the number of elements in the set P is n, then the total number of distinct
permutations shall be n! . Pn, the set of all permutations of degree n shall have n distinct elements. This set Pn is
called the symmetric set of permutation of degree n. Symbolically Pn = {f : f is a permutation of degree n}.P3 the set
of all (= 3! = 6) permutation of degree 3 is given by
P3 = 1 2 3 1 2 3 1 2 3
1 2 3 , 1 3 2 , 2 1 3
1 2 3 1 2 3 1 2 3
2 3 1 , 3 2 1 , 3 1 2
Identity Permutation:- Let P be a finite set having n elements and I is a one-one mapping such that each element
is replaced by the element itself, then I is called the identity permutation of degree n.
1 2 3…….n a1 a2 ………..an
For example I = or
1 2 3 …....n a1 a2…………an
In I = 1 3 2 4 = 1 2 3 4
1 3 2 4 1 2 3 4
[Note:- Some authors define the product P1 P2 as the result of applying first P2 and then P1]
Product by definition I:- The product (as given by definition I) is easily obtained by writing P2 in such a way that
entries in its first row follows the order of entries appearing in the second row of P1. It should be noted that in
changing the order of entries of first row of P2, the order of entries of the second row of P2 is also adjusted so that
the rearranged P2 must remain equal to the original P2.
Then the product P2 P1 shall be the permutation whose first row is the first row of P1 and whose second
row is the second row of rearranged P2.
1 2 3 4 1 2 3 4
4 1 2 3 3 1 4 2
P2 = 4 1 2 3
2 3 1 4
1 2 3 4 1 2 3 4
3 1 4 2 4 1 2 3
4 1 2 3 1 2 3 4
2 3 1 4 4 1 2 3
(after rearranging P2)
first row of P1
1 2 3 4
2 3 1 4
Theorem 1:- The set Pn of all permutations on the set A = {a1, a2, …..an} is a finite group of order n with respect to
the composition of “product of permutations or composite of permutations.
a1 a2 …………an
1. Closure property:- We know that if f1 and f2 are any two permutations each of order n, then f1f2 is also a
permutation of order n and therefore f1, f2 Î Pn Þ Pn (f1f2)also Î Pn, " f1 and f2Î Pn, Thus Pn is closed with respect
to the operation ‘product of permutations’.
2. Associativity:-
b1 b2 ……………..bn , f2 = c1 c2 ……………….cn
c1 c2 ……………... cn
and f3 = d1 d2………………dn
Associativity:- If f1, f2 and f3 are three permutation each belonging to Pn then we shall prove that for any element r
Î A. ((f3f2)f1)r = f3(f2f1)r
3. Existence of identity:- The permutation I defined by I (r) = r, " r Î A is the identity element of Pn.
a1 a2…………an
-1
4. Existence of inverse:- Let P Î Pn, then since P is a one-one mapping of A onto itself, P is also defined as a one-
one mapping of A onto itself.
-1 -1 -1 -1
Therefore P Î Pn and P P = I = PP [ If P = 1 2 ………….n then P = a1 a2 ……….an
a1 a2………..…an 1 2…………n
which proves the existence of inverse for each element P Î Pn
Note:- 1. The group of all ën permutation of a set with n elements is called a symmetric group of degree n. (n is a
positive integer)
Let A be a set having n distinct elements and f be a permutation of degree n on the set A. Now if we arrange m
elements (out of n elements of A) in a row in such a manner that (i) the f-image of each element in the row is the
element which follows it (ii) the f image of the last element is the first element and (iii) the remaining n-m
elements of the set A are left unchanged by f, then f is called a cyclic permutation or a cycle of length m or an m-
cycle.
2 4 6 1 5 3
is a cycle of length 4 which can be represented by (1 2 4 3). Hence each element of the bracket (1 2 4 3) has been
replaced by the element following it, the last element 3 being replaced by the first element 1. 1 is replaced by 2, 2
is replaced by 4,4 is replaced by 3 and 3 is replaced by 1. The rest of the element 6 and 5 are left unchanged.
2 3 4 5 1
2 3 1 4
Suppose we have a cycle of length 4 represented by (1 3 4 6) then this cycle can be used to represented
permutation of different degrees.
f1 = 1 3 4 6 2 5 7
3 4 6 1 2 5 7
Similarly the permutation f2 of degree 6 on the set A = {1, 2, 3, 4, 5, 6} represented by the cycle (3, 6, 4) shall be
given by f2 = 3 6 4 1 2 5
6 4 3 1 2 5
[First we write in the upper row, the elements 3, 6, 4 in this order and then the remaining elements 1, 2, 5 of the
set A. Then in the second row, we replace 3 by 6, 6 by 4 and 4 by 3 according to the cycle (3 6 4) and after this we
replace the remaining elements of the first row by the same elements in the same order.]
1 3 5 4 2
3 5 4 1 2
Equality of cycle :If the places of the elements in a cycle are changed, in such a way that their cyclic order remain
unchanged, then the cycle does not change.
or (1 2 3 4 ) = (2 3 4 1) = (3 4 1 2)
= ( 4 1 2 3)
Transposition:A cycle of length 2 is called a transposition. The cycle (2 4) is a transposition and the permutation of
degree 4 on the set {1, 2, 3, 4} represented by this cycle shall be given.
2 4 1 3
f= 4 2 1 3
= 1 2 3 4
1 4 3 2
Cycle of length one :In the permutation corresponding to such a cycle, the image of the element included in the
cycle shall be the element itself and the remaining elements of the set A shall remain unchanged. Therefore the
permutation represented by a cycle of length 1 shall be the identity permutation.
Multiplication of cycles:In order to multiply cycles, we multiply the permutation represented by them. For
example
(1 2 3) (4 6 5) = 1 2 3 4 5 6 4 6 5 1 2 3
2 3 1 4 5 6 6 5 4 1 2 3
1 2 3 4 5 6
= 2 3 1 6 4 5
Similarly (1) (3 4 5) = (3 4 5)
Disjoint cycles:Two cycles having no symbol in common are called disjoint cycles.
4. Every cycle can be represented as a product of transpositions in an infinite number of ways e.g. (a1 a2
………an)
or (2 3 5 4) = (3 5) (3 5) (3 2)
n
If (G, *) is a group, then order of an element a Î G is defined as the least positive integer n if it exists, such that a =
a * a * a………..n times = e, the identity element. It is denoted by 0(a). If no such number n exists then order of a is
zero or infinity.
e¢ = e, so 0(e) = 1
If 0(a) = 1, then a¢ = a = e
Example :- Find order of each element of the group (G, *) where G = {1, -1, i, -i} the composition being simple
multiplication.
Solution:- We have already seen that the identity element of the group is 1. Now 0(1) = 1.
1 2
Now (-1) = -1, (-1) =(-1)*(-1)= 1 (identity element)
so 0(-1) = 2
1 2 4
(i) = i, (i) = i * i = -1, (i) = 1 so 0(i) = 4
1 2 3 4
(-i) = -i, (-i) = -1, (-i) = i, (-i) = 1, so 0(-i) = 4
Example :- Find order of 1 and 3 of the group (G, *) where G = {0, 1, 2, 3, 4, 5} and the composition * is addition
modulo 6.
Again 31 = 3, 32 = 3 + 63 = 0 so 0(3) = 2
2.17 Subgroups of a group: Let (G, *) be a group. A nonempty subset H of G is called a sub-group of G if
For example (Z, +) is a subgroup of (Q, +), (R, +) and (C, +).
Similarly (Z, +), (Q, +), and (R, +) are all subgroups of (C, +).
Theorem :- If (H, *) is a subgroup of (G, *) then the identity element in (H, *) is the same as in (G, *)
Proof:- Let e be the identity element in (G, *) and h the identity element in (H, *), then
h * a = a * h = a " a Î H ……………(1)
As H Í G, so a Î G and therefore a * e = e * a = a
Theorem :- The inverse of any element of a subgroup is the same as the inverse of the same element regarded as
the element of the group.
Let a Î H. Let b be the inverse of a in H and c be the inverse of a in G. Then b * a = e and c * a = e. Therefore in G,
we have b * a = c * a or b = c (by right cancellation law)
-1
Note:- 1. Since (H, *) is a group, therefore " a Î H, a Î H.
Therefore we can say that (H, *) is a subgroup of (G, *) if and only if (a) e Î H (b) a, b Î H Þ a * b Î H (c) a Î H Þ
-1
a Î H.
2. Instead of saying that (H, *) is a sub-group of (G, *), we generally say that H is a sub-group of G provided that
there is no confusion about the binary operation.
Theorem :-Necessary and sufficient condition for (H, *) being a sub group of (G, *). If H is a non-empty subset of a
-1
group G, then (H, *) is a subgroup of (G, *) if and only if a, b Î H Þ a * b Î H.
Proof:-
-1 -1
(i) Let (H, *) be a subgroup of (G, *), then a, b Î H Þ a, b Î H Þ a * b Î H (since
* is a binary operation).
-1
(ii) Conversely, as H is non empty set, there must exist an element a Î H and then a * a = e Î H (as H is a group).
-1 -1 -1
Again for any a Î H, e * a = a Î H. Also if a, b Î H, then a * b Î H (given).
-1 -1
So a * (b ) = a * b Î H.
Proof:- Let e be the identity of G. Then e will also be the identity element in H as well as in K. i.e. e Î
H, e Î K.
Thus e Î H Ç K and H Ç K ¹ Æ
-1
Let a, b Î H, a * b Î H (as H is subgroups of G)
-1
Similarly a, b Î K, a * b Î K
-1
Thus a * b Î H Ç K
Hence H Ç K is a subgroup of G.
Proof:- Let Z(G) be the centre of (G, *). The identity element e commutes with every element of G i.e. e * a = a, "
a Î G, therefore e is an element of Z(G). Thus Z(G) ¹ Æ.
First we shall define integral power of an element in a group and then define cyclic group.
Integral powers
Cyclic group
n
A group (G, *) is called cyclic if for some element a ÎG every element x Î G is of the form a , where n is some
integer.
The element a is called the generator of G. We write G = {a} or G = (a). The elements of G shall be of the form
-3 -2 -1 0 2 3
…..a , a , a , a (=e), a, a , a ……..
Also the group G = ({0, 1, 2, 3, 4, 5}, +6) is cyclic having 1 as well as 5 as generators.
Any group G has two normal subgroups {e} and G itself, since {e} x = {e} = x{e} and for any x Î G, G x = G = x G.
Definition:Let (X, *) and (Y, 0) be two algebraic system of the same type in the sense that both * and 0 are binary
(n-ary) operations.
A mapping g : X ®Y is called a homomorphism or simply morphsim from (X, *) to (Y, 0) if for any x1, x2 Î X,
If such a function g exists, then it is customary to call (Y, 0) a homomorphic image of (X, *). g(x) Í Y.
This definition of homomorphism is not restricted to algebraic system with one binary operation. It can be
extended to any two algebraic systems of the same type.
Definition:Let g be a homomorphism from (X, *) to (Y, •). If g: X®Y is onto, then g is called an epimorphism. If g:
X®Y is one-to-one then g is called monomorphism. If g:X ® Y is one-to-one onto, then g is called an isomorphism
and (X, *) and (Y, • ) are said to be isomorphic. The mapping g preserves the composition in X and Y.
Now we shall confine in our further discussion to group as an algebraic system. We give below the definitions for
groups only.
Definitions:Let (G, *) and (G¢, •) be two groups. A mapping f : G ® G¢ is called a group homomorphism from (G, *)
to (G¢, •) if for any x1, x2 Î G, we have f (x1 * x2) = f (x1) • f (x2). It will be seen in the following discussion that the
group homomorphism preserves the composition in G and G¢. It also preserves identities, inverses and subgroups.
Thus if (G, *) and (G¢, •) are two group, then a mapping f : G®G¢ is called an isomorphism if
(i) f is one-to-one (ii) f is onto and (iii) f is a homomorphism. G and G¢ are called isomorphic groups or G is said to
be isomorphic to G¢ and it is written as G @ G¢.
It means that for the function f to be Homomorphic, the results obtained in either of the following two cases must
be the same or equal.
1. If we apply the operation * of the group (G, *) between any two elements x1 and x2 (both belonging to G) to
obtain the result x1 * x2 and then apply the function f on this result to obtain the final result f (x1 * x2).
or 2. If we apply the function f to the elements x1, x2 Î G to get the f images as f (x1) and f (x2) respectively and
then apply the operation • of the group (G¢, •) between these two f-images to get the final result f(x1) • f(x2).
f:
(G, *) (G¢, •)
x1 f(x1)
x2 f(x2)
f(x1*x2) f(x1)•f(x2)
(x1 * x2) •
Applying function f
Result I Result II
is equal to
for f to be homomorphic
A homomorphism form a group (G, *) to (G, *) is called an endomorphism, and an isomorphism from a group (G,
•) to (G, •) is called an automorphism.
Kernel:If f is a group homomorphism from (G, *) to (G¢, •), then the set of elements of G which are mapped into e¢
the identity of the group (G¢, •) is called the kernel of the homomorphism f and is denoted by ker (f).
Example :- If R is the additive group of real numbers and R+ the multiplicative group of positive real numbers, then
x
prove that the mapping f : R®R+ defined by f(x) =e ," x Î R is an isomorphism of R onto R+.
x
Solution:- e is always a positive real unique number " x Î R. Thus f : R®R+
x1 x2 x1 x2
(i) To prove that f is one to one:- " x1, x2 Î R, f(x1) = f(x2) Þ e = e Þ loge = loge Þ x1log e = x2log e Þ x1 = x2
which means that two elements in R have the same f-images in R+ only if they are equal i.e. distinct element in R
have distinct f -images in R+. Thus f is one to one.
(ii) To prove that f is onto:- Let y be any element of R+, then log y is a real number (positive, zero or negative) i.e.
logyÎ R.
logy
Now f(log y) = e = y. Thus y Î R+ Þ that there exist its image log y in R i.e. f(log y) = y. Therefore each element Î
R+ has its pre image in R. Thus f is onto.
(iii) To prove that f is homomorphism (R, +) ® (R, ´).
x1 x2
Let x1, x2 Î R, their images e , e Î R+. Now if we apply the operation + of the first group between x1 and x2 and
x
then operate the result with the function f(x) = e we get the following result
x
+ f(x) = e
x1+x2 x1 x2
x1, x2 (x1 + x2) e = e .e …………….(1)
Again if we apply the operation ´ of the second group between the f-images of x1 and x2 in R+. We get following
result.
x
x1 x2 x1 x2
e ,e e . e ………………………(2)
From (1) & (2) both the results are the same i.e. f preserves the composition in R and R+. Thus f is homomorphism.
Consequently the mapping f : R ® R+ is an isomorphism of R onto R+.
x
Applying f = e
x1
x1 e
x
Applying f = e
x2
x2 e
(x1+ x2) x1 x2
e e * e
(x1+ x2)
or e
(x1 + x2)
x
Applying f = e
Result I = Result II
Example :- If there are two groups (i) additive group of integers (I, +) and (ii) additive group of even integers (2I, +),
and f is a mapping from (I, +) ® (2I, +) defined by f(x) = 2x, x Î I, then prove that f is an isomorphic mapping.
Solution:- (i) Since f(x1) = f(x2) Þ 2x1 = 2x2 or x1 = x2 therefore f is one-to-one mapping.
(iii) f(x1 + x2) = 2(x1 + x2) = 2x1 + 2x2 = f(x1) + f(x2) " x1, x2 Î I, hence f is homomorphism mapping. Consequently f is
an isomorphic mapping.
Example:- If (G, *) is a group and IG : G ® G defined by IG(x) = x, " x Î G is identity mapping on G, prove that IG : G
® G is an isomorphism.
Solution:- (i) Since IG(x1) = x1 and IG(x2) = x2, x1 x2 Î G then IG(x1) = IG(x2) Þ x1 = x2 which proves that IG is one-to-one
mapping.
(ii) Since IG(x) = x and IG : G ® G it means that corresponding to each value x Î codomain there exists a value in the
domain of G. Hence IG is onto.
-1
Theorem :- Let (G, *) and (G¢, •) be two groups and also let f : G ® G¢ be an isomorphism, then f : G¢ ® G is
also an isomorphism.
-1 -1
Proof:-As f is isomorphism it is one to one onto and therefore f is also one-one-onto. Now to prove f as an
-1
isomorphism, we have to prove only that f is a homomorphism.
As f is one to one onto therefore corresponding to x¢1, x¢2 Î G¢ we have x1, x2 Î G such that f(x1) = x¢1 and f(x2) = x¢2.
-1 -1 -1 -1 -
Thus f (x¢1) = x1 and f (x¢2) = x2. We know that f(x1 * x2) = f(x1) • f(x2) = x¢1 • x¢2 Þ f (x¢1 • x¢2) = x1* x2 = f (x¢1) f
1 -1
(x¢2). Therefore f : G¢ ® G is a homomorphism.
Theorem:- Let (G1, •1), (G2, •2) and (G3, •3) be three groups. Also let f : G1 ® G2 and f2 : G2 ® G3 be
homomorphism, then f2 • f1 : G1 ® G3 is also a homomorphism.
=f2(f1(x1) •2 f1(x2))
=f2((f1(x1)) •3 f2(f1(x2))
Hence f2 • f1 is homomorphism.
Theorem - Let f be a homomorphic (or isomorphic) function or mapping of a group G = (G, *) into a group G¢ = (G¢,
*) then
Proof:- a Î G
e Î G therefore a * e = e * a = a ………………….(1)
(identity property)
f(a) Î G¢
(identity property)
[by Homomorphic property that if a, b Î (G, *), then f(a), f(b) Î (G¢, o) then f(a * b) = f(a) o f(b) (preservation of
operation)]
e e¢
a f(a)
-1
f(a )
e¢
Theorem :-Let (G, *) and (G¢, o) be two groups and H be a subgroup of G. If f : G ® G¢ is a homomorphism, then
f(H) is a subgroup of G¢.
Proof:- The identity of G = identity of H = e(say) since H is a subgroups of G. Therefore identity e¢ of (G¢, •) = f(e)
and e¢ Î f(H). It means f(H) is a non empty set.
For x, y Î H, we have x¢, y¢ Î f(H) such that x¢ = f(x) and y¢ = f(y). Since H is a sub group of G and x, y Î H, we have x
-1
o y Î H. Again as f is a homomorphism, we have
-1 -1 -1 -1
F(x o y ) = f(x) o f(y ) = f(x) o [f(y)] = x¢ o (y¢)
-
Theorem :- Let (G, *) and (G¢, •) be two groups and H¢ be a subgroup of G¢. If f : G®G¢ is a homomorphism, then f
1
(H¢) of a subgroup of G.
-1
Proof:- As e¢ Î G¢ is in H¢ and f(e) = e¢, and f (H¢) = {x Î G: f(x) = H¢}
-1 -1
we have e Î f (H¢) so f (H¢) ¹ Æ.
-1 -1
Let x1, x2 Î f (H¢) then f(x1) and f(x2) Î H¢ and since H¢ is a subgroup of G¢, we have f(x1) o (f(x2)) Î H¢ . Again as f is
homomorphism, we have
-1 -1
f(x1) o f(x2 ) Î H¢ or f(x1 o x2 ) Î H¢
-1 -1 -1
or x1 o x2 Î f (H¢). Thus f (H¢) is a sub group of G.
Theorem :-The kernel of a homomorphism f from a group (G, *) to (G¢, •) is a subgroup of (G, *).
Proof:- Since f(e) = e¢, therefore e Î ker (f). It x1, x2 Î ker (f), i.e. f(x1) = f(x2) = e¢ then
2.22. Rings :Let R be a non empty set equipped with two binary operations denoted by * and o respectively, then
the algebraic structure (R, *, o) is called a ring if it satisfies the following postulates.
3. There exists an elements o Î R for the first operation such that o * a = a, " a Î R
4. To each element a Î R there exists an element (-a) Î R such that (-a) * (a) = o
Note:- In place of notation * and o we may use the notation Ú and Ù or + and • also.
Important:- It is clear that the postulates (1) – (4) are the requirements that R is an abelian group with respect to
the first operation * and hence both the cancellation laws hold good for the first operation * in R.
2.22.1 Commutative Ring: It is a ring R in which the second operation o is commutative i.e. a o b = b o a " a, b, Î
R.
2.22.2. Ring with Unity:It is a ring R which contains an identity element 1 Î R for the second operation o or if in a
ring R there exists an element denoted by 1 such that 1 o a = a o 1 = a, " a Î R then R is called a Ring with Unity.
2.22.3. Null Ring or Zero Ring:The set R consisting of a single element 0 (identity element) and equipped with two
binary operation defined 0 * 0 = 0 and 0 o 0 = 0 is called null ring.
(a) ao0=0oa=0
(b) a o (-b) = - (a o b) = (-a) o b
(c) (-a) o (-b) = a o b
(d) a o (b – c) = a o b – a o c
(e) (b – c) o a = b o a – c o a
Proof:- (a) a o 0 = a o (0 * 0) [since 0 * 0 = 0, 0 being identity in R for *]
=ao0*ao0
or 0 = a o 0 [by right cancellation law which holds in a ring for the first operation *] …………..(1)
Similarly 0 o a = (0 * 0) o a = 0 o a * 0 o a
or 0 * 0 o a = 0 o a * 0 o a
Similarly (-a o a) o b = 0 o a
or (-a) o b * a o b = 0
or (-a) o b = -(a o b)
(c) We know that (-a) o (-b) = -[(-a) o b] [since a o (-b) = -(a o b)]
(d) a o (b – c) = a o [b * (-c)]
=aob–aoc
= b o a * [-(c o a)]
=boa–coa
Examples of Rings
1. First prove that the two operations * and 0 are binary operations, if it is given that the two operation are binary
operations, then proceed to step 2.
2. Prove that R is an abelian group with respect to one of the two operation say *. It is achieved by proving that the
first four postulates of 4.1 are satisfied.
3. Then prove the satisfaction of fifth and sixth postulate of section 4.1 with respect to the operation 0.
4. To prove it a commutative ring, the condition given in section 4.1.1 has to be satisfied.
5. To prove it to be Ring with unity, the condition given in section 4.1.2 has to be satisfied.
2
Example :- If (R, *, 0) is a ring such that a = a, a Î R then prove that
Þ (a * a) ° (a * a) = a * a
Þ (a * a) * (a * a) = (a * a) * 0, since a + ° = a
Þ ((a * b) o a) * ((a * b) o b) = a * b
Þ [a * ( b ° a)] *[a ° b * b] = a * b ( as a ° a =a , b ° b)
Example :- Prove that set I of all integers is a ring with respect to addition and multiplication of integers as the ring
composition.
Solution:- 1. It is known that a + b Î I " a, b, Î I. Therefore addition and multiplication are binary operations.
2. We have already proved that the set I of all integers is an abelian group for the composition of addition +.
4. We also known that multiplication is distributive over addition in the set I i.e.
a ´ (b + c) = ab + ac " a, b, x Î I
and (b + c) ´ a = ba + ca
Now since a + 0 = 0 = 0 + a " a Î I zero is the zero element or identity for addition.
Let R be a ring. An element a Î R is said to be a left zero divisor if there exists an element b ¹ 0 Î R such that a ° b
= 0 (zero element or identity element for the operation *)
Similarly if an element b ¹ 0 Î R exists such that b o a = 0, then element a is said to be the right zero divisor.
or we can say that if corresponding to a non zero element a Î R, there exists a non zero element b Î R such that
either a o b = 0 or b o a = 0 then the element a is said to be the zero divisor or divisor of zero. In such a case the
ring R is said to be a ring with zero divisors.
Again if the product of no two non zero element of R is zero (means zero element or identity element for the
operation *) i.e. if a o b = 0 Þ a = 0 or b = 0, then the ring R is said to be a ring without zero divisors.
[Note:- Zero on the R.H.S means the zero element for the operation *]
Example :-If M is a set of 2 ´ 2 matrices with their elements as integers and the two compositions are addition and
multiplication of matrices, then (M, +, ´) is a ring with zero divisors as seen below
0= 0 0
0 0
If A = 1 0 ¹ 0 and B= 0 0 ¹ 0
0 0 1 0
Then 1 0 ´ 0 0 = 0 = 0 0
0 0 1 0 0 0
Thus the product of two non zero element of the ring is equal to the zero element of the ring. Hence M is a ring
with zero divisors.
Example :- If M = {0, 1, 2, 3, 4, 5}, then the ring (M, +6, x6) is ring with zero divisor as seen below
Here the zero element is 0 (zero) and the product (x6) of two non zero elements is zero i.e. 2 x6
3 = 0, 3 x6 4 = 0
But if M = {0, 1, 2, 3, 4} then the ring (M, +5, x5) is not a ring with zero divisor or it is a ring with out zero divisor as
the product (x5) of no two non zero elements is zero.
Theorem :- A ring is without zero divisors if and only if the cancellation laws hold in R.
Proof:- Let R be with out zero divisor. It means that the product (the result obtained on applying second operation)
of no two non zero elements in the ring is zero i.e. a, b Î R, then a o b = 0 Þ either a = 0 or b = 0.
Then a ob = a o c Þ (a o b – a o c) = 0
Þ a o (b – c) = 0
Thus a o b = a oc Þ b = c which means that left cancellation law holds. Similarly it can be shown that right
cancellation law also holds.
Conversely that cancellation laws hold in R. If possible, let a o b = 0 when a ¹ 0, b ¹ 0 i.e. R is with zero
divisor.
which is against our assumption. Thus we get a contradiction. Therefore R is without zero divisor.
2.23. Integral Domain: A ring which (i) is commutative (ii) has unit element and (iii) is without zero divisors, is
called an integral domain.
Solution:- We have already proved in example 7 that this ring is a commutative ring with unit element. Now from
the composition table it is seen that " a, b Î R, a ´ b = 0 Þ either a = 0 or b.
Hence it is without zero divisor. Consequently the given ring is an integral domain.
Theorem :- A commutative ring R is an integral domain, if and only if, for any non zero element x Î R, x o a = x o b
Þ a = b where a, b Î R.
Putting a = x1 and b = 0 in (1), we have for x ¹ 0 xox1 = x o 0 Þ x1 = 0 which means that R is without zero divisor.
Thus R is an integral domain.
2.24 Field:A ring (R, *, o) with at least two elements is called a field if
(i) it is commutative (ii) it possesses a unit element and (iii) it is such that each non-zero element possesses an
inverse with respect to the operation 0.
Example: The ring (Q, +, .) of rational numbers is a field, because it is commutative ring with unity and each non
zero element (=p/q) possesses an inverse (=q/p).
Note:- A field has no zero divisor. Thus in a field the product of two non zero elements is a non zero element.
Proof:- As a field F is a commutative ring with unity therefore for a field to be an integral domain the field should
have no zero divisors, which we shall prove as follows.
Þb=0
-1 -1 -1
Similarly for a o b = 0 where b ¹ 0 we have (a o b) o b = a o b (as b ¹ 0, so b exists)
-1
Þ a o (b o b ) = 0 Þ a o 1 = 0 Þ a = 0
Thus a o b = 0 Þ a = 0 or b = 0. Therefore F is a field with no zero divisions and hence is an integral domain.
Note:- Converse of the above theorem is not true. For example, the ring of integers is an integral domain but it is
not a field because each non zero element (except 1 and -1) has no inverse in the set of integers.
Example:- Show that the set of numbers of the form a + bÖ2 with a and b as rational numbers is a field under the
operation of addition and multiplication real numbers.
Solution:- Let R = {a + bÖ2, a, b Î Q} be the given set, Let (a1 + b1Ö2) and (a2 + b2Ö2) Î R, where a1, a2, b1, b2 Î Q
The elements in R are real numbers. We know that addition and multiplication of real numbers is associative as
well as commutative.
Also it is clear that 0 + 0Ö2 is the additive identity of R and (-a) + (-b) Ö2 is the additive inverse for an element a +
aÖ2 Î R. Thus each element in R possesses an additive inverse.
We also know that multiplication distributives over addition in the set of real numbers.
Also (1 + 0Ö2) Î R is the multiplication identity for a + bÖ2 thus R is a commutative ring with unity. Zero element of
the ring is 0 + 0Ö2 and unit element is 1 + 0Ö2. To prove it to be a field we have still to prove that each non zero
element of R possess a multiplicative inverse.
Let a + bÖ2 be any non zero element of R. (both a and b are not zero)
2 2
Thus 1/( a + bÖ2 ) = (a - bÖ2)/(a + bÖ2) (a - bÖ2) = (a- bÖ2)/(a – 2b )
2 2 2 2
= a/ (a – 2b ) + (-b) / (a – 2b ) Ö2
2 2 2 2 2 2
Now as a and b are rational numbers, a – 2b ¹ 0 (otherwise a = 0, b = 0). Therefore a/a – 2b and –b/a – 2b
2 2 2 2
both are non zero and have a / (a – 2b ) + (-b) / (a – 2b )√2 is a non zero element of R and is the mul plica ve
inverse of a + bÖ2. Thus the given algebraic structure is a field.
2.25 Division Ring or Skew field :A ring with at least two elements is called a division ring or a skew field if it (i)
has unity (ii) is such that each non zero element possesses inverse under the second operation 0.
It means that a commutative divisions ring is a field. Every field is a division ring.
their conjugates is a skew field with respect to matrix addition and multiplication. Zero of this ring is the zero
matrix. This ring is non commutative since the two element
0 -i -1 0
Theorem :-A ring R is a division ring if and only if the equation a o x = b and y o a = b have unique solution in R
where a ¹ 0, a, b Î R.
Proof:- Let R be a division ring. As non zero elements of R are invertible (possesses inverse), R is a group will
respect to the operation 0. Therefore the equations a o x = b and y o b = b have unique solution provided b ¹ 0. In
case b = 0, then a ¹ 0, a o x = b and y o a Þ x = 0 and y =0 (since R has no zero divisor).
Conversely let a o x = b and y o a = b have unique solution in R and (R, *, 0) is a ring where a ¹ 0, a, b Î R. If b = a,
then a o x = a and y 0 a = a.
2
Thus a o x = a o (x o x) = (a o x) o x = a o x
2
or x = x or x = 1 (since x ¹ 0). Similarly we can show that y = 1. Hence R is a ring with unity. Also a o x = 1 and y o a
-1
= 1 Þ a Î (a ¹ c). Hence R is a division ring.
2.26 Sub-Ring:Let the algebraic structure (R, *, 0) be a ring. If S Í R such that (S, *, 0) is also a ring with respect to
the operations on R, then S is called sub ring of R.
Example:- (i) Set of integers is a sub ring of the set of rational numbers with respect to the same operations.
(ii) the set of even integers is a sub ring of the set of integers under the operations of addition and multiplication.
2.27 Sub-Field :Let the algebraic structure (F, *, 0) be a field. If S Í F such that (S, *, 0) is also a field with respect to
the operations of F then is S is called sub-field of F.
UNIT-3
Lattices and Boolean algebra
3.1 Partial Order Relation
A binary relation R in a nonempty set S is called a Partial Order Relation or a Partial Ordering in S iff R is
(a) Reflexive i.e. a R a " a Î S
(b) Antisymmetric i.e. a R b and b R a Þ a = b
a,bÎS
(c) Transitive i.e. a R b and b R c Þ a R c
a,b,c Î S
A partial order relation is generally denoted by £.
If £ is a partial order relation then the ordered pair ( P , £ ) is called Partially Ordered set or Poset.
It should be clear that these three conditions may or may not hold for all pairs of elements of the non–empty set S in
a Poset. There may be pairs of elements that may not satisfy all the three conditions. If any two elements a , b Î S
satisfy all the three conditions then we write a £ b which is read as a precedes b or b succeeds a .
Comparability
Let a and b be two elements in a partially ordered set S with respect to a certain relation R (called partial order
relation). Then a and b are said to be comparable if a £ b or b £ a i.e. either a R b or b R a or we can say that one of
them precedes the other. Otherwise a and b are said to be non comparable and is denoted as a ½½ b (neither a £ b
nor b £ a ). In a partially order set it is not necessary that all the pairs of the element are comparable.
Totally Ordered set or Chain
If every pair of elements of S is comparable, then the set S is said to be totally ordered or linearly ordered set or
Chain or Toset with respect to the given relation and the relation is said to be simple ordering or linear ordering on
S.
Every subset of a linearly ordered set is linearly ordered.
(a) Let S be a set of positive integers ( = N) and the relation R be “divides” i.e. a R b or a £ b if a | b (a divides
b) , then ( N , £ ) is a poset and the relation £ (divides) is a partial order relation because all the three
conditions are satisfied.
(b) Let S be a collection of sets, then the relation of set inclusion Í is a partial order of S and ( S, Í) is a poset.
(c) The set of all statement or the set of all statement formulae in a certain number of variables form a poset under
the ordering of tautological implication.
3.2 Hasse Diagrams of Partially Ordered Sets
Suppose S is a partially order set with respect to the relation £ i.e. ( S , £) is a poset. Then we write any two
elements a , b Î S as
a < b read as a strictly precedes b if a £ b and a ¹ b
b > a read as b strictly succeeds a if b ³ a and b ¹ a
Immediate predecessor and successor.
Let (S, £ ) be a poset and a, b Î S.
We say that a is an immediate predecessor of b or b is an immediate successor of a or b is a cover of a written as a <
< b if a < b and no element of the set S lies between a and b. It means there exits no elements c Î S such that a < c <
b.
Immediate predecessor or successor may or may not exist.
Hasse Diagram
The Hasse diagram of a finite partially order set S is a diagram whose vertices represent the elements of S and if b is
an immediate successor of a (a < < b) in S then an edge or line is drawn directed from a to b. Instead of drawing a
line directed from a to b we take b at a higher level than a and join a and b by a straight line.
3.3 Minimal, Maximal, first and last elements of S
Let S be a partially order set so that (S, £) is a poset.
An element a Î S is called a minimal element of S, if no other element of S strictly precedes a, although the element
a may strictly precede other elements of S.
An element b Î S is called a maximal element of S, if no other element strictly succeeds b. although b may strictly
succeed other elements of S .
If the set S is infinite, then it may not have any minimal or maximal element. For example there is non maximal and
minimal element in the set of integers or the set of real numbers with respect to the relation £ (less than or equal to).
The poset (N, £) has minimal element but no maximal element.
If the set S is finite it must have at least one minimal element and at least one maximal element.
An element a Î S is called a first element or least element or zero of S if a precedes all other elements in S or a is
predecessor of all other element in S i.e. a £ x , " x Î S. It is generally denoted by 0. An element b is called last or
greatest element or unity of S if b succeeds all other elements of S (or b is the successor of all other elements of S)
or all other elements of S precedes i.e. y £ b " y Î S
It is generally denoted by 1.
Example: if A is a poset of non negative real numbers with the usual partial order £ (less than or equal to), then 0 is
its least elements.
(b) if A= {a,b,c,} and the poset B= P(A) the power set of A with Partial order relation “inclusion (Í)”. Then j is a
least element of A and the set A is the greatest element.
Maximal and Greatest Elements, Minimal and Least Elements
A maximal element of set A does not precede any other element of set A, but it is not necessary that all the other
elements of set A shall precede it. Some of the elements may precede it while some may not precede it.
A greatest element also does not precede any other element of the set A, but it is necessary that all the other
elements of set A shall precede it i.e. greatest element succeeds all the other elements of set A.
Maximal elements may be one or more than one for a set while the greatest element can not be more than one:
Similarly the minimal element of set A does not succeed any other element of set A, but it is not necessary that all
the other elements of set A shall succeed it.
A least element of set A also does not succeed any other element of the set A , but it is necessary that all the other
elements of set A shall succeed it i.e. a least element precedes all the other elements of the set.
Minimal elements can be one or more than one but the least element can not be more than one.
In the following Hasse diagram (i) the maximal elements are d , f and g but there is no greatest element.
Similarly in the diagram (ii) the minimal elements are a and b but there is no least element.
g f g
e
d f
c e
b d
a c
(i) a b
( ii )
Example. Set S = {2,3,6,12,24,36} Relation £ : x £ y if x/y then Hasse diagram is as shown below:
Immediate predecessors :
12 < < 24 , 12 << 36 , 6 << 12 , 2 << 6 , 3 << 6 24 36
Minimal Elements : 2 and 3
Maximal Elements : 24 and 26
First Element : No element (since neither 2£3 nor 3£2) 12
Last Element : No element (since neither 24£36 nor 36£24)
6
2 3
5 3 2 7
1
If we take a subset A = {2,7} then A has no upper bound since there is no element u of S such that every element of
A i.e. 2 and 7 precedes u. its lower bound is 1 as 1 Î S, precedes every element of A.
If we take the subset A = {1,2,3}, then 6 is its upper bound as every element of A divides 6 and 1 is its lower bound.
Note :- If A has an upper bound, then A is said to be bounded above and if A has a lower bounded it is said to be
bounded below. A is said to be bounded if it has an upper bound and a lower bound.
Least Upper Bound ( or Supremum) and Greatest lower Bound (or Infimum)
If A is a subset of a partially ordered set S , then an element s Î S is called a least upper bound (lub) or supremum of
A if
(i) s is an upper bound of A
(ii) s £ u whenever u is an upper bound of A i.e. s precedes every other upper bound of A. It is denoted by
sup(A).
Similarly an element i Î S is called a greatest lower bound (glb) or infimum of A if
(i) i is a lower bound of A
(ii) l £ i whenever l is a lower bound of A i.e. i succeeds every other lower bound of A. It is denoted by inf(A).
Greatest and Least Elements of Subset A
Some other properties of Well Ordered Sets The following properties of a Well Ordered set follow directly from
its definition.
Every subset of a well ordered set is well ordered.
Every element a Î S other than a least element has an immediate successor. Because if M(a) denote the set of
elements which strictly succeed a, then the least element or first element of M(a) shall be the immediate
successor of a.
All finite linearly ordered set each having the same number n of elements are well ordered and are all isomorphic to
each other.
If A is well ordered and B is isomorphic to A, then B is well ordered.
3.5 Lattices
Definition (i) In terms of poset
A lattice is a poset (L , £ ) in which every subset {a, b} of L , consisting of two elements has a least upper
bound (lub) or supremum and a greatest lower bound (glb. ) or infimum. lub of the subset {a,b } is denoted by a Ú b
and is called the join of a and b. glb of the subset { a, b } is denoted a Ù b and is called the meet of a and b.
(ii) In terms of algebraic structure
We can also define lattice in terms of algebraic structure as follows:
Let L be a non empty set closed under two binary operations denoted by Ú (called join ) and Ù (called
meet). Then L or (L, Ù, Ú) is a lattice if the following axioms are satisfied " elements a,b,c Î L :
1. Commutative laws
(i) aÚb =bÚa
(ii) aÙb =bÙa
2. Associative laws
(i) a Ú ( b Ú c ) = (a Ú b )Ú c
(ii) a Ù ( b Ù c ) = (a Ù b ) Ù c
3. Absorption laws
(i) a Ù (a Ú b) = a
(ii) a Ú ( a Ù b) = a
Bounded Lattice
A lattice (L, £) is said to be bounded if it has a last or greatest element denoted by I and a first or least denoted by o.
o is said to be the lower bound and I is said to be the upper bound. o£ x and x £ I " x Î L.
Example. The lattice (P(S) , Í ) of all subsets of a set S under the partial order ‘Containment’ (or set inclusion) Í is
bounded. Its greatest element is S and least element isf.
Properties of Bounded Lattice
If L is a bounded lattice , then for all a Î A
o£a£I
Where o is the least element and I is the greatest element [ since least element precedes all the elements of the
set A and all the elements of set A precedes the greatest element]
For a bounded lattice
(i) a Ú o = a, since o, a £ a.
(ii) a Ù o = o, since o and a both succeeds o.
(iii) similarly a Ú I = I
(iv) aÙI=a
(v) every finite lattice L is bounded.
Distributive Lattice
A lattice L is called distributive if for any elements a, b, c Î L
the following distributive properties are satisfied.
1. a Ù (b Ú c) = (a Ù b) Ú (a Ù c)
2. a Ú (b Ú c) = (a Ú b) Ù (a Ú c)
1
3
2
Similarly , = a2 = a2 Ú o = a2 Ú (a Ù a1 )
= (a2 Ú a) Ù (a2 Ú a1 )
= (a Ú a2 ) Ù (a1 Ú a2 )
= I Ù (a1 Ú a2 )
= a1 Ú a 2
therefore a1 = a2
Complemented lattice
If a lattice L is bounded and every element in L has a complement, then the lattice L is called a complemented
lattice.
a b c
o
Definition
A Boolean algebra is an algebraic structure which consists of a non empty set B, equipped with two binary
operations (denoted by Ù and Ú or + and · or * and o), one unary operation (denoted by / ) and two specially
defined elements o and I (in B) and which satisfy the following five laws for all values of a, b, c, Î B.
1. Commutative laws:-
(i) a Ú b = bÚ a or a + b = b + a
(ii) a Ù b = b Ù a or a • b = b • a
2. Associative laws:
(i) a Ú (b Ú c) = (a Ú b) Ú c or a + (b + c) = (a + b) + c
(ii) a Ù (b Ù c) = (a Ù b) Ù c or a • (b• c) = (a • b) • c
3. Distributive laws:
(i) a Ú (b Ù c) = (a Ú b) Ù (a Ú c) or a + (b • c) = (a + b) • (a + c)
(ii) a Ù (b Ú c) = (a Ù b) Ú (a Ù c) or a • (b + c) = a• b + a • c
4. Identity laws:
(i) a Ú 0 = a = 0 Ú a or a + 0 = a = 0 + a
a Ù I = a = I Ù a or a • I = a = I • a
Here 0 is the identity for the operation Ú or + (called join or sum) and I is the identity element for the operation Ù
or • (called meet or product)
5. Complementation laws:
Example:- Let (B, +, •) be an algebraic structure. + and • are two operations for the set B = {0, 1} defined as follows
+ 0 1
0 0 1
• 0 1
1 1 1
0 0 0
1 0 1
Prove that the given set B with defined binary operations is a Boolean algebra.
Solution:-
1. Closure property is satisfied as all the elements in the two tables belong to B, i.e. The set B is closed with respect
to the two binary operations.
2. Commutativity property is also satisfied because of the symmetry in both the tables about the leading
diagonals.
3. Associativity property is also satisfied as we can see from the table that (1 + 0) + 1 = 1 + 1 = 1
and 1 + (0 + 1) = 1 + 1 = 1
consequently 1 + (0 + 1) = (1 + 0) + 1
Also (1 • 0) • 1 = 0 • 1 = 0 and 1• (0 • 1) = 1 • 0 = 0
consequently (1 • 0) • 1 = 1 • (0 • 1)
4. Distributive property is also satisfied as we can see form the table that
1 + ( 0 • 1) = 1 + 0 = 1 giving 1 + (0 • 1) = (1 + 0) • (1 + 1)
Again 1 • (0 + 1) = 1 • 1 = 1 giving 1 • (0 + 1) = (1 • 0) + (1 • 1)
5. Identity laws: As 0 + 0 = 0 and 1 + 0 = 1 = 0 + 1. Therefore 0 is the identity for + operation. Again 0•1 = 0 = 1•0
and 1•1 = 1 = 1•1. Therefore 1 is the identity for • operation, Unique identities exist for both the operations.
6. Complementation laws: 0 + 1 = 1 = 1 + 0
0•1 = 0 = 1•0
Also 1 + 0 = 1 = 0 + 1
Duality
Definition:- The dual of any statement in a Boolean algebra B is the statement which is obtained by interchanging
the operation + and • (or Ú and Ù) and also interchanging their identity elements 0 and 1 in the original statement.
For example the dual of a + 1 = 1 is a•0 = 0, the dual of (0•a) + (b•1) = b is ( 1 +a)•(b + 0) = b.
Boolean Expressions:-
Let (B, +, •, /) or (B, Ú, Ù, /) be a Boolean algebra, where B = {x1, x2…………..} is a non empty set, + or Ú and • or Ù
are two binary operations, / is a unary operation. 0 is the identity element for the operation + or Ú and 1 or I is the
identity for the operation • or Ù. Then x1, x2, ………are called variables. A variable xi can assume the value xi or its
complemented value xi¢. 0 and I also belongs to B.
Definition
1. Literal : A literal is a variable or a complemented variable such as x, x¢, y, y¢ & so on x2, x2¢ are two literals
involving one variable x2.
2. Boolean Expression : Let B = (X, Ù, Ú, ¢, 0, I) be a Boolean algebra. A Boolean expression in variables x1, x2 …….xk
each taking their values in the set X is defined recursively as follows:
(1) Each of the variables x1, x2, ……..xk as well as the elements 0 and I of B are Boolean expressions.
(2) If X1 and X2 are previously defined Boolean expressions, then X1 Ù X2, X1 Ú X2 and X1¢ are also Boolean
expressions. E.g. x1, x3¢ are Boolean expressions by (1) and (2)
3. Minterms :
A Boolean expression in k variables x1, x2, …….xk is called a minterm if it is of the form y1 Ù y2 Ù ………Ù yk. where
each yj is a literal (i.e. either are xi or x¢i) for 1£ i £ k and yi ¹ yj for i ¹ j.
It means a minterm in k variables is a product or meet of exactly k distinct variables e.g. x1 Ù x2¢ is a minterm in two
variables x1 and x2.
Definition:- A Boolean expression E is called a sum-of-products expression if E is a fundamental product or the sum
of two or more fundamental products none of which is contained in another.
Definition:- Let E be any Boolean expression. A sum-of-products form of E is an equivalent Boolean sum-of-
products expression.
Although E1 is a sum of products it is not a sum-of-products expression, as product xz¢ is contained in the product
xyz¢. However by absorption law, E1 can be expressed as
= xz¢ + y¢z
This gives a sum-of-product expression from for E1, E2 is already a sum-of-product expression.
[sum of products]
= xyz + xz¢ + xyz¢ = xyz + xz¢ (By absorption law & identity law)
Alternative definition of sum of product expression: Sum of product expression is a sum (or join) of distinct
minterms (i.e. fundamental products none of which is contained in the other.)
Disjunctive Normal Form (DNF) or Complete sum-of-product forms or disjunctive canonical form
A Boolean expression involving k variables is in disjinctive normal form (DNF) if it is a join or sum of distinct
minterms each involving exactly k variables e.g. the Boolean expression in 2 variables.
Therefore putting values from (2) & (3) we have from (1)
X(x1, x2, x3) = (x1¢ Ù x2 Ù x3) Ú (x1¢ Ù x2 Ù x3¢) Ú (x1 Ù x2 Ù x3) Ú (x1 Ù x2¢ Ù x3) which is an DNF.
Maxterm
A Boolean expression in k variables x1, x2, ………….xk is called maxterm if it is of the form y1 Ú y2 Ú …..Ú yk i.e. a join
or sum of exactly k distinct variables (i.e. literals none of which involves the same variables) where each yj is a
literal (either xi or xi¢) for 1 £ i £ k and yi ¹ yj for i ¹ j.
X(x1, x2, x3) = (x1¢ Ú x2 Ú x3) Ù (x1¢ Ú x2¢ Ú x3) Ù (x1¢ Ú x2 Ú x3¢) is in CNF as it is the meet or product of 3 distinct
maxterms each involving 4 variables.
= (x1¢ Ú x2¢ Ú x3) Ù (x1¢ Ú x2¢ Ú x3¢) Ù (x1 Ú x2¢ Ú x3¢) Ù (x1 Ú x2 Ú x3¢) which is in CNF.
n
Complete Conjunctive normal Form:- A CNF in n variables which contains 2 factors is called Complete CNF in n
variables.
For example Complete CNF in 2 variables x, y is (x + y) (x¢ + y) (x + y¢) (x¢ + y¢) and complete CNF in 3 variables x, y, z
is (x + y + z) (x¢ + y + z) (x + y¢ + z) (x + y + z¢) (x¢ + y¢ + z) (x + y¢ + z¢) (x¢ + y + z¢) (x¢ + y¢ + z¢)
Definition:- Two Boolean expression are equivalent if and only if their respective canonical forms are identical.
Simpler form means, that the expression has fewer connectives and all the literals involved are distinct.
=0 (Identity law)
(b) R.H.S. = [x1 Ù {x2 Ú (x2¢ Ù x3)}] Ù (x1 Ù x3) (Distributive law)
= x1 Ù x3 (Absorption law)
Logic circuits are structures made of certain elementary circuits called logic gates. It is a machine containing one or
more input devices and only one output device. Each input device sends a signal in binary digits 0 and 1. The
following figure shown a box which consists of a number of electric switches or logic gates, wired together in some
specified way. Each line entering the box form left represents an independent power source called input (out of
which some or all lines may supply voltage to the box at a particular time). A single line coming out of the box gives
the final output which depends on the nature of input.
1. AND – gate:- Let x1 and x2 be the Boolean variables (each having value 0 or 1) representing the two inputs. An
AND-gate receives two inputs x1 and x2 to give an out-put denoted by x1 Ù x2 or x1• x2 whose value depends upon
the values of x1 and x2 both. The nature of the output for inputs x1 and x2 in AND-gate can be represented in
tabular form as given below.
x1 x2 x1 Ù x2 or x1•x2
0 0 0
0 1 0
1 0 0
1 1 1
It is clear from this table that output voltage of the gate is 1 only when the input voltage of each of the two inputs
is 1. it is zero otherwise.
x1 x1 Ù x2
x2
2. OR-gate:- If x1 and x2 denote the two inputs then the output of such a gate is represented by x1 Ú x2 or x1 + x2
whose value ( 0 or 1) depend upon the values of the inputs x1 and x2 as shown in the following logic table
0 0 0
0 1 1
1 0 1
1 1 1
It is clear from this table that the output voltage of an OR-gate is at level 1 whenever the level of any one or both
of the inputs wires is 1.
x1 x1Ú x2
x2
3. NOT-gate:- It is such a type of gate that receives an input x (whose value may be 0 or 1) and produces an output
denoted by x¢ (whose value shall be 1 or 0 according to as the value of x is 0 or 1 respectively) as shown in the
following logic table.
X x¢
0 1
1 0
x x¢
All these gates are elementary gates. We can design a logic circuit by using different combinations of these
elementary gates in which output of any of these gates is used as input of the other gate.
4. NAND gate:- This gate is equivalent to a combination of AND gate followed by a NOT gate. A NAND-gate
receives two inputs x1 and x2 to give an output denoted by (x1 Ù x2)¢ or (x1•x2)¢ whose value depends upon the
values of x1 and x2. the nature of output for input x1 and x2 in this gate can be represented in tabular form as given
below.
X1 x2 NAND (x1•x2)
0 0 1
0 1 1
1 0 1
1 1 0
It’s standard representation is just like that of AND gate followed by a circle as shown below:
x1
x2
5. NOR gate:- It is equivalent to an OR-gate followed by a NOT gate. The tabular representation of the output value
y of two inputs x1 and x2 to a NOR-gate is shown below:
0 0 1
0 1 0
1 0 0
1 1 0
Its standard representation is just like that of OR-gate followed by a circle as shown below:
x1 (x1Ú x2)¢
x2
In the following logic circuit the inputs are x1, x2 and x3. Output is y.
x1
x2
x1 x1¢ + x3 Y
x3
A dot (as in the input line of x1 indicates the point where input line splits and its bit signal is sent in more than one
direction.
Hence we see that the inputs x1 and x2 are converted by AND-gate into an output x1•x2 which serves as input for
NOT-gate to give the outputs as (x1•x2)¢. ……………………………………….(1)
Again the x1 serving is input for NOT-gate gives x1¢ as output. This x1¢ along with x3 serves as input for a OR-gate to
give x1¢ + x3 as output. This x1¢ + x3 along with previous out (x1•x2)¢ in (1) serve as input for an OR-gate to give
(x1•x2)¢ + (x1¢ + x3) as the final output. Various Boolean expressions and their corresponding Logic circuits are
shown below:
Boolean Functions
We have seen that the last column of logic table of a Boolean expression gives the value of the output Y of circuit
represented by the given Boolean expression, for different set of values of the input variables x1, x2 …………..xn.
Therefore the output expression Y = X(x1, x2, ……………xn) defines output values as functions of input bits. This
function gives a relation between inputs to the circuit and its outputs.
Let X(x1, x2) = x¢1 Ù x2 be a Boolean expression where x1 and x2 can take values in B = {0, 1}. We can calculate the
values of this expression for different pairs of values of x1 and x2 by using Boolean algebra as represented in the
following table
x1 x2 x1¢ x¢1Ù x2
0 0 1 0
0 1 1 1
1 0 0 0
1 1 0 0
2
This gives the Boolean function for the expression (x1¢ Ù x2) which may be denoted as f : B ® B such functions are
called Boolean functions.
X = X(x1, x2, ……………….xn) and Y = Y(x1, x2, ……………..xn) in n variables are said to be equivalent over the Boolean
algebra B = {0, 1}, if both the expressions X and Y define the same Boolean function B.
It means that
Example:- Show that the following two Boolean expressions are equivalent over the two element algebra B = {0, 1}
Solution:- Let f and g be the Boolean functions corresponding to X1 and X2 respectively. The values of these two
Boolean functions are calculated below in tables.
3
X1 involves three variables. So the corresponding function f shall be a three variable function i.e. f : B ® B which is
defined as
1 1 1 1 0 0 1
1 1 0 1 1 1 1
1 0 1 0 0 0 0
1 0 0 0 1 1 1
0 1 1 0 0 0 0
0 1 0 0 1 0 0
0 0 1 0 0 0 0
0 0 0 0 1 0 0
1 1 1 0 1 1
1 1 0 1 1 1
1 0 1 0 0 0
1 0 0 1 1 1
0 1 1 0 1 0
0 1 0 1 1 0
0 0 1 0 0 0
0 0 0 1 1 0
As the last columns of the two tables are identical, the two expressions x1 and x2 are equivalent.
Karnaugh Maps
Karnaugh maps are pictorial devices or graphical methods to determine the prime implicants and minimal form of
Boolean expressions involving not more than six variables. Thus it gives us a visual method for simplifying sum of
product expressions. We know that a minterm is a fundamental product involving all the variables and a complete
sum of products expression or D.N.F is a sum of distinct minterms.
Two fundamental products P1 and P2 are said to be adjacent if P1 and P2 have the same variables and
differ in exactly one literal. It means that there must be an uncomplemented variable in one product and
complemented variable in the other product. The sum of two such adjacent products P1 and P2 shall be equal to a
fundamental product with one less literal as explained in the examples given below:
Application of Karnaugh map to simplify a complete sum of product expression involving two variables:-
The map consists of a square divided into four sub-squares as shown in fig (a) below. Let the two
variables be x and y. The map is considered like a Venn diagram. Variable x is represented by points in the upper
half of the map as shown by shaded portion in fig (b) and x¢ is represented by the points in the lower half of the
map (shown unshaded in the same fig (b)). Similarly y is represented by the points in the left half of the map as
shown by shaded portion in fig (c) and y¢ shall be represented by the points in the right half of the map (shown by
unshaded portion in the same fig (c)).
In this way the four possible minterms involving two variables i.e. x•y, x•y¢, x¢•y, x¢•y¢ shall represented
by the points in the four sub-squares in the map as shown below in fig (d).
y y¢ y y¢
x x x x x•y x•y¢
x¢ x¢ x¢ x¢ x¢•y x¢•y¢
Since a complete sum-of-products expression is a sum of minterms, it can be represented in a Karnaugh map by
placing checks in the appropriate squares. We may also place any number say 1 in these squares.
After representing the complete sum-of-product expression on the Karnaugh map, we can determine
(i) a prime implicant of the given expression which will be either a pair of adjacent squares (minterms) or or an
isolated square which is not adjacent to any other square of E(x , y).
(ii) a minimal sum-of-products form of E(x, y) which will consist of a minimal number of prime implicants covering
all the squares of E(x, y). It means that whenever there are checks (or 1s) in two adjacent squares in the map, the
minterms represented by these squares can be combined into a product involving just one of the two variables.
For example, x•y¢ and x¢•y¢ are represented by two adjacent squares which taken together form the right half of
the map (which in represented by y¢). Therefore x•y¢ + x¢•y¢ is minimized to y¢. If we have check in all the four
subsquares, the four minterms shall be represented by the expression 1 involving none of the variables. We draw
loops or circle covering the block of sub-squares in the map that represent minterms that can be combined and
then find out the corresponding sum of products. Our aim is to identity the largest possible blocks and to include
all the checks or 1s with the smallest number of blocks using the largest blocks first and always using the largest
possible blocks.
Example:- Use Karnaugh maps to determine the prime implicants and a minimal sum-of-products form for each of
the following complete sum-of-products expressions
y y¢ y y¢ y y¢
x x x
x¢
x¢ x¢
E1 E2 E3
The grouping of minterms as shown above, using Karnaugh maps, is represented in the following figures
y y¢ y y¢ y y¢
x x
x¢ x¢ x¢
E1 E2 E3
(i) E1 consists of only one prime implicant comprising of two adjacent squares which are represented by a single
variable x. So the only prime implicant of E1 is x. Therefore the minimal sum-of-product form of E1 = x.
(ii) E2 consists of two isolated squares representing x•y¢ and x¢•y shown by two loops therefore x•y¢ and x¢•y are
the two prime implicants of E2. Thus E = x•y¢ + x¢•y is the minimal sum of product form of E2.
(iii) The squares containing all the minterms x•y, x¢•y and x¢•y¢ of E3 contains two two pairs of adjacent squares
covered by two loops. The vertical pair of adjacent squares (represented by one loop) represents the variable y
and the horizontal pair of adjacent squares (represented by another loop) represents x¢. Thus y and x¢ are the
prime implicants of E3. The minimal sum-of-products form of E3 = x¢ + y.
Application of Karnaugh map to simplify a complete sum-of-products expression involving three variables:-
The map consists of a rectangle divided into eight squares as shown below. Let the variables be x, y and z.
The variable x is represented by the points in the upper half of the map and x¢ is represented by the points in the
lower half of the map. y is represented by the points in the left half of the map and y¢ by the points in the right half
of the map. z is represented by the points in left and right quarters of the map and z¢ by the points in middle half of
the map as shown below:
x . x
or
x¢ x¢
z z¢ z
All the eight minterms involving three variables i.e. x•y•z, x•y•z¢, x•y¢•z¢, x•y¢•z, x¢•y•z, x¢•y•z¢, x¢•y¢•z¢, x¢•y¢•z
are represented by the points in a square as shown below.
In the Karnaugh map with three variables a basic rectangle denotes either (i) a square or (ii) two adjacent squares
or (iii) four squares which form a one-by-four rectangle or two-by-two rectangle.
These basic rectangles correspond to fundamental products of (i) three or (ii) two or (iii) one literal,
respectively. Also the fundamental product represented by a basic rectangle is the product of just those literal that
appear in every square of the rectangle.
In order that every pair of adjacent products are geometrically adjacent, the left and right edges of the map are
identified by converting the map in the form of a hollow cylinder with left and right edges coinciding.
As in case of two variables we represent a complete sum-of-product expression by placing checks in the
appropriate squares of the Karnaugh map. Then a prime implicant of E shall be a maximal basic rectangle (a basic
rectangle not contained in any larger basic rectangle of E).
A minimal sum-of-products form for E shall comprise of a minimal number of maximal basic rectangles of E which
taken together include all the squares of E.
Application of Karnaugh map to simplify sum of product expressions involving four variables:-
Karnaugh map for expressions involving four variables is a square divided into sixteen small squares to
represent the sixteen possible minterms in four variables as shown below:
By definition of adjacent squares, each square is adjacent to four other squares. The simplification of a sum-of-
products expression in four variables is achieved by identifying those group of 2, 4, 8, or 16 squares that represent
minterms which can be combined.
Unit-4
4.1 Propositions:
Those declarative sentences that are either universally true or universally false but not both are called statements,
or propositions.
3. 2 + 3 = 5
4. 3 + 4 = 9
5. 7 > 5
6. 9 < 4
Here we can say that the facts mentioned in sentences 1, 3, 5, 7, 8 and 11 are true or more correctly are
universally true and the facts mentioned in sentences 2, 4, 6, 9 and 10, are universally false. The sentence 12 is not
universally true. Some people will say it is true while others may say that it is false. The sentences 13 and 14 are
not declarative.
By truth value of a proposition we mean whether it is, true or false. The truth values of ‘true’ and ‘false’ are
denoted by ‘T’ and ‘F” respectively and the proposition are generally represented by lower case letters like p, q, r
etc.
The sun rises in the East by p and the statement 3 + 7 > 20 by q, then we can write
q: 3 + 7 > 20
and say that the truth values of p and q are T and F respectively.
The propositions that cannot be broken into simple propositions are called primitive propositions.
Molecular or Compound propositions or Statements
These are the propositions P(p, q, …..) that are composed of sub-propositions and various connectives,
like and, or, not etc. Such a proposition can be broken into simpler propositions. Truth value of a compound
proposition is completely determined by the truth values of its sub-propositions together with the way in which it
is connected to form the compound proposition or we can define a proposition P(p, q, …..) as an expression
constructed from logical variables p, q, …….., which take on the value ‘True’ (T) or ‘False’ (F) and the logical
connectives Ù, Ú, Ø, ……….
Example : (1) The sun rises in the east and sets in the west. It has two sub-propositions viz. p: The sun rises in the
east and q: The sun sets in the west and a connective ‘and’.
(2) 3 + 7 > 2 or 4 + 5 < 11 has two sub-proportions p: 3 + 7 > 2 and q: 4 + 5 < 11 and a connective ‘or’.
Logic :Logic may be defined as the procedure employed in mathematical proofs which are based on sound
reasoning. Logic is the weapon we need to convince others, that, granting our postulates are valid, certain
conclusions must be valid.
The words “and”, “or” “if……….., then…………”, “if and only if ” (denoted by Ù, Ú, Þ, Û respectively) that serve to
connect two simple statements to form a third compound statement are called logical connectives.
The name of various logical connectives and the symbols to denote them are given below:
Connectives Symbols
Negation (= not) ~ or / or Ø
Conjunction (= and) Ù
Disjunction (= or) * Ú
The compound statement is first broken into simple or primitive statements each being represented by p, q, r etc
and then the given compound propositions is represented in symbolic form. Then its truth value is calculated as
given in the following discussion.
Suppose our compound statement is Kolkata is in East Bengal and Delhi is in India. Its primitive
propositions can be written as
q: Delhi is in India.
The symbolic representation of the given compound statements is p Ù q. Here truth value of p is T and that of q is
T.
Similarly the symbolic representation of the compound statement “4 + 3 = 9 or 7 + 3 < 15” shall be p Ú q (where p:
4 + 3 = 9 and q: 7 + 3 < 15). Here p is F and q is T.
The symbolic representation of “If it rains, then I shall use umbrella” is p Þ q where p: it rains and q: I shall use
umbrella. The symbolic representation of x + y > 0, if and only if x > 0, y > 0 shall be p Û q where p: x + y > 0 and q:
x > 0, y > 0.
4.2 Connectives
Truth values of compound propositions using different connective have been calculated below:
(1) Conjunction, p Ù q – It is a compound proposition formed by combining two primitive propositions by the word
“and”. It is called conjunction of the original propositions represented by p & q respectively & is written as p Ù q.
p Ù q being a proposition has a truth value which depends only on the truth values of p and q. The following table
gives the truth value of p Ù q for different combination of truth values of p and q.
T T
T
T F F
F T F
F F F
p Ù q is true only if p is true and q is true
We give belong a few compound statements (p Ù q) and their truth values (enclosed in circles).
(2) Disjunction, p Ú q:- It is a compound proposition obtained by combining two propositions by the word “Or”. It
is called disjunction of the original propositions & is written as p Ú q & read “ p or q”. Its truth value depends upon
the truth values of p and q as shown below:
p q pÚq
T T
T
T F T
F T T
F F F
(d) 7 + 4 = 8 or 5 + 10 = 7 (F)
(3) p Å q: The exclusive disjunction of two propositions p and q is the statement “Either p or q, but not both p
and q & is denoted by p Å q.
p q pÅq
T T F
T F T
F T T
F F F
p Å is not true if both p & q are true or both p & q are false.
Example:- Find truth value of the following exclusive disjunction “2 + 3 = 7” or Mohan is an Engineer.
rd
Solution:- p Å q. As p is always false, so truth value depends on the truth value of q. Form 3 row ® If q is true
then p Å q is true.
th
From 4 row ® If q is false then p Å q is false.
(4) Negation, Ø p:- Negation of statement p can be formed by writing “It is not the case that …………” or It is false
that ………………..” before p or by inserting the word “not” and is written as Øp or ~p & read “not p”. Its truth value
depends upon the truth value of p as given below:
Table . Truth value of Øp
P Øp
T F
F T
If q: 3 + 2 = 7
Øq: 3 + 2 ¹ 7
If we consider the sentence x + 3 > 7then we can not find out the truth value of this sentence, since it will depend
upon the value of x. But if we are given that x + 3 > 7 where x Î set of whole numbers, then we can say that for the
set of values of x = 5, 6, 7, 8, ……….i.e. x ³ 5, x Î W, the given statement x + 3 > 7 is true.
Such a sentence is known as “open sentence” and the set of values of the unknown quantity e.g. x for which the
truth value of this open sentence is T is called “Truth set or solution set”. In this case the solution set is given by {x
: x ³ 5, x Î W} or {5, 6 ,7 ,8, ………..}
T T F F
T F T T
F T F F
F F T F
p Q Øq p Ù Øq - (p Ù Øq)
T T F F T
T F T T F
F T F F T
F F T F T
Tautologies are composite the propositions P (p, q, ….) which contain only T in the last column of their truth tables
or that are true for any truth values of their variables.
T F T
F T T
Tautology is the statement formula which is true regardless of the truth values of the statements which replaces
the variables in it. (also called a Universally valid formula or a logical truth)
A º B if A Û B is a tautology
A statement A is said to tautologically imply a statement B if & only if A Þ B is a tautology and is denoted by A Û
B
If A º B & B º C, then A º C
Contradictions are those proposition P (p, q, ….) that contains only F in the last column of their truth table or
which are false for any truth values of its variables.
p Øp pÙØp
T F F
F T F
Negation of tautology is a contradiction & vice versa.
Theorem (Principle of Substitution) : If P (p, q, ….) is a tautology, then P(P1, P2, …) is also a tautology for any
propositions P1, P2, ….. or P1(p, q,…), P2(p, q, ……) because P(p, q,…) is independent of truth values of it’s variables
p, q ,.….
Example:- Prove that the sentence ‘It is wet or it is not wet’ is a tautology.
Solution:- Sentence can be symbolized by p Ú ~ p where p symbolizes the sentence ‘It is wet’. Its Truth table is
given below:
P ~p pÚ~p
T F T
F T T
T T F F T F F
T F F T F T F
F T T F T F F
F F T T T F F
Since F appears in every row of the last column, therefore the given proposition is a contradiction.
p q Øp Øq ØpÚØq
p q pÙq ~ (p Ù q)
T T F F F
T T T F
T F F T T
T F F T
F T T F T
F T F T
F F T T T
F F F T
Also when a conditional p Þ q & its converse q Þ p are both true, the statement p & q are said to be logically
equivalent.
Identity laws
(1) p Ù T º p, p Ú T º T
(2) p Ù F º F, p Ú F º p
p T pÙT pÚT
T T T T
T T T T
F T F T
F T F T
p F p ÙF pÚF
T F F T
T F F T
F F F F
F F F F
Hence T is the identity element for the operation Ù (conjunction) and F is the identity element for the operation Ú
(disjunction).
Logical Implications
(1) Conditional
(2) Biconditional
or
Logical symbol of an implication is Þ p Þ q read as “If p, then q” or “p implies q” is the symbolic representation of
a conditional statement.
2
Examples: x = 3 Þ x = 9 (2) A Í B Þ x Î A, x Î B
Antecedent is that component of a conditional statement that is expressed by the “if” clause (the variables p at
the tail).
Consequent is that component of a conditional statement that is expressed by the “then” clause (the variable q at
the head).
Example:- If 5 + 4 = 9, then 9 – 4 = 5
antecedent consequent
We will go out if the weather improves ® If the weather improves, then we will go out.
I will get A grade if I work hard ® If I work hard, then I will get A grade.
Conditional statement – is a statement of the form “If p then q denoted by p Þ q and read as “p implies q” or “p
only if q” or A compound sentence using the connective If …., then is called a conditional statement.
p Q pÞq
T T T
T F F
F T T
F F T
pÞqºØpÚq
Now we shall show that p Þ q is logically equivalent to Ø p Ú q and logically equivalent to Ø q Þ Ø p with the help
of truth tables
T T F F T T T
As the columns for Ø p
Ú q, Øq Þ Øp T F F T F F F and p Þ q are
identical, we conclude that
F T T F T T T
Ø p Ú q
F F T T T T T
º Ø q Þ Øp º p
Þq
Example:- Test if the following two statements written on two restaurants are equivalent or not
Solution:- Let p denote “the food is good”, and q denote “the food is cheap”
p q ùp ùq p Þùq qÞùp
Identical columns
T T F F F F
Hence p Þ ù q º q Þ ù q.
T F F T T T
Both the sentences are equivalent.
F T T F T T
F F T T T T
4.5 Converse, inverse and contra
positive of the Conditional statements
1. The converse of a given conditional is a new conditional formed by interchanging the antecedent and
consequent of the given conditional. q Þ p is the converse of p Þ q
p Q pÞq qÞp
T T T T
T F F T
F T T F
F F T T
2. The Inverse of a given conditional is a new conditional whose antecedent is the negation if the original
antecedent and whose consequent is the negation of the original consequence. The inverse of p Þ q is Ø p Þ Ø q
read as “not p implies not q” or “if not p, then not q”.
p q ~p ~q pÞq ~p Þ~q
T T F F T T
T F F T F T
F T T F T F
F F T T T T
3. The Contrapositive of a given conditional is a new conditional whose antecedent is the negation of the original
consequent and whose consequent is the negation of the original antecedent.
e.g.: original: p Þ q
It is the inverse of the converse of a given conditional or is the converse of the inverse.
Statement: If x + 3 = 8, then x = 6
Converse: If x = 6, then x + 3 = 8
Inverse: If x + 3 ¹ 8, then x ¹ 6
Contrapositive: If x ¹ 6, then x + 3 ¹ 8
p q pÞq q Þp ~p ~q ~p Þ ~q ~q Þ~p
T T T T F F T T
T F F T F T T F
F T T F T F F T
F F T T T T T T
Same
Same
Equivalent Forms
(1) ØØPºP
(2) P ÚPºP
(3) (P Ù Ø P) Ú Q º Q
(4) PÚØPºQÚØQ
(5) (P ® Q) º (Ø P Ú Q)
º Ø P Ú ( Ø Q Ú R) again by (5)
º ( éQ Ú R) Ù ( éR Ú Q) or (Q Ù R) Ú (Ø Q Ù Ø R)
Statement “I can go to Delhi if and only if I am cured” would mean two things viz.
( p Þ q) and (q Þ p)
or (p Þ q) Ù (q Þ p)
Truth table of p Û q
T T T T T T
T F F T F F
F T T F F F
F F T T T T
p Û q is true when both p & q are either true or both false (i.e. equivalent) “If and only if” is sometimes
abbreviated as “iff”.
Order of preference in which the connectives are applied in a formula of propositions having no brackets is as
follows:
(i) ~ Negation
(ii) Ù Conjunction
(iii) Ú and Å Disjunction & exclusive disjunction (any one of these two can be preferred to the other)
(iv) then find truth value of either p ® (q Ù ~ r), or of (q Ù ~ r) « (r Å q). (we chosen to apply ® first)
(v) & finally find truth value of the remaining one as shown in the truth table given below:
Truth table of p ® q Ù ~ r « r Å q
T T T F F F F T
T T F T T T T T
T F T F F T F F
T F F T F F F T
F T T F F F T F
F T F T T T T T
F F T F F T T T
F F F T F F T F
Two statement formulae P and Q in variables p1, p2, ……pn (n ³ 1) are said to be equivalent if they have the same
truth value. Such formulae are considered as the same for all logical purposes.
We give below a list of such standard equivalent formulae. They serve as laws of Algebra of propositions.
Idempotent laws
Associative laws
2(a) (p Ú q) Ú r º p Ú (q Ú r) 2(b) (p Ù q) Ù r º p Ù (q Ù r)
Commutative laws
4(a) p Ú (q Ù r) º (p Ú q) Ù (p Ú r) 4(b) p Ù (q Ú r) º (p Ù q) Ú (p Ù r)
Identity laws
Complement laws
~qÙqºF
Involution laws
9 ØØpºp
DeMorgan’s laws
10(a) Ø (p Ú q) º Ø p Ù Ø q 10(b) Ø (p Ù q) º Ø p Ú Ø q
Absorption laws
p Ú (p Ù q) º p, p Ù (p Ú q) º p
Detachment laws
((p Þ q) Ù p) Þ q
Disjunctive Addition
p Þ (p Ú q)
Conjunctive simplification
(p Ù q) Þ p
Chain rule
(p Þ q) Ù (q Þ r) Þ (p Þ r)
Disjunctive simplification
((p Ú q) Ù (ù p) Þ q
Conditional rules
(p Þ q) Û ((ù p) Ú q)
(p Þ q) Û ù q Þ ù p
Equivalence rules
(p Û q) Û (p Þ q) Ù (q Þ p)
(ù (p Û q)) Û (p Û (ù q))
Implication rules
(p Þ q) Þ ((p Ù r) Þ (q Ù r))
(p Þ q) Þ ((p Ú r) Þ (q Ú r))
Contrapositive Inference
((p Þ q) Ù (ù q)) Þ (ù p)
*
Duality Law:- Two formulae A and A are said to be duals of each other if either can be obtained from the other by
replacing Ù and Ú and Ú and Ù.
The two connections Ù and Ú are said to be dual to each other. If any formula contains T and F, then its
dual is obtained by interchanging T & F in addition to the change explained above
Example:- Duals of (P Ú Q) Ù R is (P Ù Q) Ú R.
~ (~ p Ù q) Ù (p Ú q) º p
º p Ú (~ q Ù q) by distribution law
ºp by identity law.
4.8 Argument
It is an assertion that a given set of proposition P1, P2, …., Pn called premises yields (has a consequence) another
proposition Q called the conclusion and is denoted by P1, P2, ……..,Pn Q
Valid Argument: An argument P1, P2, ……Pn Q is said to be valid if Q is true whenever all the premises P1, P2,
…..Pn are true.
Fallacy:- It is an argument which is not valid. Now P1, P2, ……Pn are true simultaneously if & only if proposition P1 Ù
P2, ………Pn is true. Hence we have the following theorem:
Theorem:- The argument P1, P2, …..Pn Q is valid if & only if Q is true whenever P1 Ù P2 Ù ……….Ù Pn is true or (P1
Ù P2 Ù ….Ù Pn) Þ Q is a tautology.
The conclusion Q is said to logically follow from the given premises P1, P2, ….,Pn if either of the following
condition is satisfied.
Logical Implication:- For any propositions P(p, q,….) and Q(p, q,……….), the following three statements are
equivalent.
(i) P(p, q,…..) logically implies Q(p, q,….) i.e. P(p, q,…….) Þ Q(p, q,………..)
Example: - To prove p Þ p Ú q, or p p Ú q we shall prove that p Ú q is true whenever p is true as shown below:-
P q pÚq
T T T
T F T
F T T
F F F
F T T
F F T
Truth Table
p q Øp Øq pÞq (p Þ q) Ù Ø p [(p Þ q) Ù Ø p] Þ Ø q
T T F F T F T
T F F T F F T
F T T F T T F
F F T T T T T
(1) Conclusion Ø q is not always true where all the propositions of the premises i.e. p Þ q and Ø p are true
simultaneously (i.e. row 3)
or (2) Conclusion Ø q is not always true where conjunction of the propositions of premises i.e. (p Þ q) Ù Ø p is true
(i.e. row 3)
Solution:- Let p denote “it rains” & q denote “he is sick”. The argument translated into symbolic from shall become
p Þ q, Ø p Ø q which has been proved to be a fallacy in example.
(1) Universal Quantifiers – Those which refer to all the elements of a certain set. e.g. all, any, every, each none,
no.
(2) Existential Quantifiers – Those which assert that there exists at least one element in a certain set. e.g. some, at
least one.
(a) for Universal Quantifiers – ("x) read as “for all x” or “for every x”
(2) For all x, y and z in N is written as " x, y, z Î N, where N is a set of natural numbers.
Examples There exist an x in whole numbers such that x < 1 is written as $ x Î W, x < 1
$ n Î W, n • n = 1
Note:- An open sentence like “ x is a bird” is neither true nor false. The statement after quantifying an open
sentence may be judged either true or false and is therefore a statement.
Propositional Function
Definition:- A propositional function or a predicate in a variable x is a sentence p(x) involving x that becomes a
proposition when we give x a definite value from the set of values it can take. Such functions are denoted by p(x)
or q(x) etc.
The set of values x can take is called the Universe of discourse.
If p(x) is ‘x > 6’, then p(x) is not a proposition But when we give x particular values say x = 8 or x = 0, then we get
propositions “ > 6 (is greater than 6 ) is the predicate”.
Note:- A predicate is usually not a proposition, But of course every proposition is a propositional function in the
same way that every real number is a real valued function, namely the constant function.
Let A be a given set (say a set of positive integers N) and p(x) be an expression defined on A (say p(x) is “x + 2 < 7”)
with the property that p(a) is true or false for each a Î A
which means p(x) becomes a statement (with a truth value) whenever any element a Î A is substituted for the
variables x.
Then set A is called the DOMAIN of p(x), set Tp of all elements of A for which p(a) is true is called the TRUTH SET of
p(x)
= {x : p(x)}.
Other examples:
(a) Let p(x) be “x + 3 > 7” defined on the set N of positive integers then it’s truth set Tp = {x : x Î N, x + 3 > 7} = {5, 6,
7, 8,………..}. i.e. integers ³ 5. i.e. p(x) is true for all positive integers equal to or greater than 5.
(b) Let p(x) be “x + 6 < 3” defined again on N. Then its truth set Tp = {x : x Î N, x + 6 < 3} = Æ = empty set. So p(x) is
not true for any positive integer in N.
Statement Formulae are the compound statements derived from the primitive statements like P, Q called
variables by using connectives & parentheses.
ØP PÙQ (P Ù Q) Ú (ØP) P Ù (ØQ)
Formula has no truth value until & unless the statement variables in a formula are replaced by definite statements
that have truth value. Statement formula is not a statement, however a statement can be derived from it by
replacing the variables by statements. A statement Formula is an expression which is a string, consisting of
variables (capital letters with or without subscripts), parentheses and connectives symbol.
3. If A and B are well formed formulae then (A Ù B), (A Ú B), (A ® B) an (A Û B) are well formed formula.
4. A string of symbols containing the statement variables, connectives, and parentheses are well formed formulae
iff it can be obtained by finitely many applications of the rule 1, 2 & 3.
2. (P ® Q)
Substitution Instance:- A formula A is called a substitution instance of another formula B if A can be obtained
from B by substituting formula for some variables of B, with the conditions that the same formula is substituted for
the same variable each time it occurs.
Example- B: P Þ (J Ù P)
Substitute R Û S for P in B we get
A: (R Û S) Þ (J Ù (R Û S))
Then A is a substitution instance of B. Note that (R Û S) Þ (J Ù P) is not the substitution instance of B because P in
J Ù P has not been replaced by R Û S.
Statement – 1:- p(x) is a propositional function defined on set A (" x Î A), p(x) or simply "x p(x) are read as “For
every x in A, p(x) is true statement” or simply “For all x, p(x)”
Statement - 2
Tp = {x : x Î A, p(x)} = A
i.e. truth set of p(x) is the entire set A. Both of the statements are equivalent to each other.
Rule:- If {x : x Î A, p(x)} = A, then "x p(x) is true, otherwise "x p(x) is False.
Examples (1) The proposition ("n Î N) (n + 9 > 8) is true since {n : n + 9 > 8} = {1, 2, 3, …..} = N.
(2) The proposition ("n Î N) (n + 3 > 8) is False, since {n : n + 3 > 8} = {6, 7, 8, ……….} ¹ N.
Statement – 1. p(x) is a propositional function defined on set A, ($x Î A) p(x) or $x p(x), read as “There exist an x
in A such that p(x) is a true statement or “For some x, p(x)”
Rule:- If {x : p(x)} or {x : x Î A, p(x)} ¹ Æ, then $x, p(x) is True, otherwise $x p(x) is False.
Example:-
I(x): x is an integer, P(x): x is either positive or negative the various sentences & their symbolic representation are
given below:-
or
or
or
For all x, if x is an integer, then x is either positive or negative. ("x) (I(x) ® P(x))
To write the statement “x is the father of the mother of y” we name a person called z as the mother of y Now we
want to say, that x is the father of z and z is the mother of y, which is symbolized as
L(x): x is a lover
It can be symbolized as
M(x): x is a man
Symbolic representation of the statement “All men are trees” shall be ("x) (M(x) ® G(x))
Negation of this Statement: (1) It is not the case that all birds are dogs.
or Equivalently
or if p(x) denotes “x is a dog” we can write the above equivalence relation (4) as –
Negation of "x p(x) is “It is not true (not the case) that for all x, p(x) is true”.
or there exists atleast one value of x for which p(x) is not true.
Similarly we have an analogous Theorem for Negation of a proposition containing existential Quantifiers.
Statement: There exist an x in A such that p(x) is true ($x Î A) p(x) ……………..(8)
Negation of this Statement:- (1) It is not the case that there exists an x in A such that p(x) is true or
~ ($x Î A) p(x)
or equivalently
5.1 Graph:
(a) A nonempty set V={v1, v2, v3, ………} of elements vi called vertices or nodes or points or junctions.
(b) a set E={e1, e2,e3, ….} of elements ei called edges or arc or line or branches.
Such that each edge ek is associated with an unordered pair (vi, vj) of vertices. Vertices vi and vj are called end
vertices of the edge ek.
Representation of a graph
A Graph is generally represented by a diagram on a surface with vertices represented by points and edge represented
by line segment, (straight or curved and of any length). This diagram is also called graph.
The following figure gives diagrammatic representation of the graph G={V, E, f} where
V=[ v1, v2, v3, v4}, E={e1, e2, e3, e4, e5, e6} and (e1)={v1, v2}
(e4)={v2, v4}
Self loop:- It is an edge of the graph which has the same vertex as both end vertices e.g. edge e6 (having v3 as its
both end vertices) are self loops.
Parallel edges:- Those edges that are associated with the same pair of vertices are called parallel edges. eg. edges
e1 and e5 (both associated with same pair of vertices v1 and v2) are parallel edges. Parallel edges in a graph are also
called multiple edges.
Incidence and degree:-An edge is said to be incident with (on to ) each one of its end vertices e.g. vertices v3 and v4
are incident vertices of edge e2 and the edge e2 is said to be incident with the vertices v3 and v4.
Adjacent edge:-Non parallel edges that are incident with a common vertex are said to be adjacent to each other
e.g. e2 and e4 are adjacent to each other.
Degree or valency of vertex:-The number of edges that are incident with a vertex vi with self loop counted twice, is
called the degree of the vertex vi and written as d(vi).
d(v1) = 3 d(v4) =2
d(v2) =3 d(v3) =4
Edges in series:-Two edges with a common vertex in a graph are said to be in series if their common vertex is of
degree two e.g. the two edges e2 and e4 are in series.
Isolated vertex: - An Isolated vertex in a graph is a vertex having no edge incident on it and is therefore a vertex
whose degree is zero e.g. vertices v6 and v7 in fig below.
Pendant vertex: A pendant vertex or an end vertex in a graph is a vertex will degree one, e.g. vertex v3 in fig below.
e2
v7 v2
e1 v6
e7
e6
v3
e3
v1
v4 e5
e4
v5
Adjacent Vertex: End vertices of the same edge are said to be adjacent vertices e.g. vertex v4 & vertex v5 are said
to be adjacent to each other.
(a) a non empty set V = {v1, v2, v3, …} of elements vi called vertices,
(b) a set E=[e1, e2, e3, …..} of elements ei called edges
such that each edge is associated with an ordered pair of vertices (vi, vj) . Clearly E is a subset of the
product set V ´ V.
or
vi ek vj
ek is associated with (vi, vj) and not with (vj, vi) i.e. f (ek) = (vi, vj)
Incidence in digraph
If G = (V, E, f) is a digraph and ek is a directed edge associated with an ordered pair (vi, vj) of vertices, then in
the diagrammatic representation given in fig ,
vi ek vj
In case of a directed graph parallel edges are those edges whose end vertices are the same and also their
directions are the same i.e. there are the edges that are associated will the same ordered pair of vertices
e2
v1 v2
e1
e6
e3 e5 e1 and e2 are parallel edges [being associated will
ordered pair of vertices (v1, v2)], while e6 and e7 are not
parallel edged become e6 is associated with {v1, v3} while
v4 v3 e7 is associated with {v3, v1}, that are not the same
e7
ordered pair of vertices.
e4
A given digraph has a unique undirected graph while an undirected graph may have different orientations
possible.
(a) Out degree of a vertex vi in a digraph. It denotes the number of edges beginning at or incident out of the
vertex vi and is written as d+ (vi)
(b) In degree of a vertex vi in a digraph. It denotes the number of edges ending at or incident into vi and is
-
written as d (vi)
Source and Sink
Source: - A vertex in a digraph with zero in degree is called a source e.g. vertex v6.
Sink:- A vertex in a digraph with zero out degree is called a sink e.g. vertex v7 .
5.2 Walk
Walk is defined as a finite alternating sequence of vertices and edges, beginning and ending with vertices, such
that each edge is incident with the vertices preceding and following it. Vertices as well as edges may be
repeated. Length of a walk is the number of edges it contains, with repeated edges counted.
Open Walk: A walk is open if it’s initial (Starting) and final (Ending) vertices are different.
Closed walk: A walk is closed if its initial and final vertices are the same.
Example: In the following graph with 5 vertices and 7 edges x1 – x5 walk of length 4 is W1 = {x1, e1, x2, e6, x4,
e3, x3, e5, x5 } Similarly x1 – x5 walk of length 8 in the same graph is
x4 e4 x5
e3 e6 e7
e5
e1
x3 e2 x2 x1
W2 = {x1, e1, x2, e2, x3, e3, x4, e6, x2, e7, x5, e5, x3, e3,
x4, e4, x5 }. Here e3 has been repeated.
Both the above walks are open walks because their initial and end vertices are different.
W3 = {x2, e7, x5, e5, x3, e2, x2} is a closed walk because the initial and end vertices are the same.
W4 = {x1, e1, x2, e7, x5, e5, x3, e3, x4, e4, x5, e7, x2, e1, x1} is also closed walk.
TRAIL
A trail is an open walk in which no edge is repeated. Vertices can be repeated in a trail.
In the above graph, the sequence {x1, e1, x2, e7, x5, e5, x3, e2, x2} is a trail in which vertex x2 has been repeated
but no edge has been repeated.
CIRCUIT
A circuit is a closed trail or a circuit is a closed walk in which no edge is repeated. Vertices may however be
v2
repeated.
e1 e2
e7 e8
e6
e15 v7 v8
v1 v6 e1 e1 e9 v3
e5 e1 e1
Here, in this fig the sequence
is a v6 – v6 circuit in which
repeated.
PATH
A path is trail with no repeated vertex or a path is an open walk in which neither any edge nor any vertex is
repeated. It is also called an elementary path.
In the above Fig., the sequence {v6, e15, v1, e4, v4, e3, v3, e9, v8, e10, v7 } is a path of length 5 in which neither any
edge nor any vertex is repeated.
It should be noted that if all the vertices in a walk are distinct, then edges also could not be repeated. For this
very reason, a path is always a trail but every trail is not a path (because the vertices may be repeated in a
trail).
CYCLE A cycle is a circuit in which no vertex is repeated except the initial vertex, which is also the end vertex of the
sequence, or a cycle is closed walk in which neither any edge nor any vertex except the initial vertex, is repeated.
In the fig. the sequence
{v6, e11, v7, e10, v8, e14, v5, e13, v3, e3, v4, e4, v1, e1, v2, e6, v6} is a cycle of length 8.
From the definition of cycle each of its vertices including the initial or terminal vertex, is preceded as well as
followed by exactly one edge. It means that exactly two edges are incident with every vertex of a cycle.
Therefore the degree each vertex of a cycle is two.
semi walk : A semi walk in a digraph is a walk in the corresponding undirected graph, but it is not a directed
walk.
v2
e6, v4, e3, v1, e1, v3 is directed walk, e4 e1
v1 v3
while v5, e10, v3, e9, v5, e7, v4 is a
e10
e2 e9
semi walk and not a directed walk as e3 e6
e8
directed walk
open-directed walk : An open-directed walk is a directed walk whose initial and final vertices are distinct.
closed directed walk : A closed directed walk is a directed walk whose initial and end vertices are the same.
Circuit : A circuit in a digraph is a closed directed walk in which no directed edge is repeated, It is a close directed
trail.
directed path : A directed path or a path in digraph is a trail with no repeated vertex. It is an open directed walk in
which neither any directed edge nor any vertex is repeated. The sequence v5, e8, v3, e6, v4, e3 v1 is a directed path in
fig. but v5, e7, v4, e6, v3, e1, v1 is a semi path.
Cycle : A Cycle in a digraph is a directed circuit in which no vertex is repeated except the initial vertex, which is also
the end vertex of the sequence. It is a closed walk in which neither any directed edge nor any vertex, except the
initial vertex is repeated.
The sequence v1, e1, v3, e6, v4, e3, v1 is a directed cycle in fig.
The sequence v1, e1, v3, e6, v4, e2, v1 is not a directed cycle. It is a semi cycle.
Length of the walk or path in a digraph is the number of edges contained in it.
The length of the shortest distance between any two vertices vi and vj of a connected graph G is called the
distance between the vertices vi, and vj. It is denoted by d(vi, vj)
Diameter of the graph
The maximum of all the distances between any pair of vertices of a connected graph is called the diameter of
the graph & is denoted by D, So D = max. d(vi, vj) where vi, vj ÎG
(v1, e1, v6, e9, e5), (v1, e1, v6, e10, v2, e8, v5), (v1, e2, v2, e10, v6, e9, v5), (v1, e2, v2, e8, v5), (v1, e2, v2, e3, v3, e7, v5), (v1,
e2, v2, e3, v3, e5, v4, e6, v5) etc the shortest path from vi to v5 are (v1, e2, v2, e8, v5) and (v1, e1, v6, e9, v5) each
being of length 2.
e11
v6 e9 v5 e6
v4
e1
e8
v1 e10 e7 e5
e2 e4
v2 e3 v3
Simple graph: It is graph that has neither a self loop nor parallel edges.
Multi graph: Multi graphs are undirected graphs that may contain multiple edges but not loops.
Trivial graph: It is a finite graph with one vertex and no edges i.e. a single point.
edge.
A graph G is said to be connected if we can reach any vertex from any other vertex by travelling along the
edges. It means that in a connected graph there is at least one walk between every pair of its vertices.
A graph with one vertex is considered to be a connected graph, because in a disconnected graph there must
exist at least two distinct vertices, which are not joined by edges.
Components
A disconnected graph consists of two or more connected graphs, E each of these graphs is called a
component.
(a) if H is connected and is not a sub graph of any other connected sub graph of G.
and (b) if K is a complete connected sub graph of G, and
H is connected in K, then H = K.
A component is always maximal connected sub graph of G. The two number of components in a graph G is
generally denoted by c(G)
Cycle
Cycle denoted by Cn (n ³ 3) is a graph of n vertices v1, v2, ….., vn and edges {v1, v2}, {v2, v3}, …., {vn-1, vn}, {vn, v1}
v1 v2
v1 v2
v2
v1
v1 v3
v6 v3
v5
v3 v2 v4 v3 v4
v5 v4
C3 C4 C5 C6
Wheel
Wheel denoted by Wn is graph obtained by adding an additional vertex to the cycle Cn (n>=3) and connecting
this new vertex to each of the n vertices of Cn by new edges.
W3 W4 W5 W6
Regular Graph : Regular graph is a graph in which all vertices are of equal degree.
Complete Graph Kn
It is a simple graph with n vertices such that every vertex is joined to every other vertex by an edge. As every
vertex is joined to every other vertex through one edge, the degree of every vertex is 1 and number of edges
in n(n-1)/2.
K1 K2
K3 K4 K5
Finite graph:- It is a graph having a finite number of vertices and a finite number of edges.
Infinite graph: It is graph a having an infinite number of vertices & an infinite number of edges.
Planar Graph: It is a graph whose geometrical representation can be shown on a plane surface such that no two of
its edges intersect.
Euler graph: It is a graph that contains an Euler line. An Euler line is a closed trail (or circuit) containing all the
edges of the graph G.
A cycle C6 is a Euler graph. The following graph is also an Euler graph in which the Euler line is {v1, v5, v3, v1, v2,
v3, v4, v5, v6, v1} v 1
vv6 v2
v5 v3
v4
v3
Hamiltonian Graph: It is a graph G that contains a Hamiltonian cycle. A Hamiltonian cycle is a closed trail (or
v5
circuit) containing every vertex of the graph G exactly once except the initial vertex which is also the
terminating vertex. The following two graphs are Hamiltonian cycle shown through arrows.
v2
v3
v5
v2
v8
v4
v4 v7
v6
{v1, v2, v3, v4, v5,v1} {v1, v2, v3, v4, v5, v6, v7, v8, v1}
Weighted graph
Graphs that have numbers (called weight) assigned to each of its edges are called weighted graphs. These are used
to model computer network. Weights may represent the costs, response time over the lines or distances.
If we represent the cities by vertices and the roads between them by edges, we get a graph. If we associate a real
number wi with every edge ei such that wi represent the distance or length (in km) of the road represent by
the edge ei then such a graph is called a weighted graph with wi as the weight of the edge ei.
Bipartite Graph
A graph G = (V, E) is said to be bipartite if its vertex set V can be partitioned into two non empty disjoint
subsets V1 and V2 such that every edge in set E (G) has one end vertex in the set V1 and the other end vertex
is the set V2. No edge of G can join two vertices of the same subset V1 or V2.
Complete Bipartite graph , denoted by km,n is a graph whose vertex set V is partitioned into two disjoint subsets V1
and V2 consisting of m and n vertices respectively. Each edge of the graph connects a vertex of V1 to a vertex
of V2. Every vertex of V1 is adjacent to every vertex of V2.
Example: C6 is bipartite graph, because its vertex set V can be partitioned in to two sets V1 = {v1, v2, v3} and V2 = {v2,
v4, v6} and also every edge in C6 join a vertex in set V1 to a vertex in set V2 as shown below:
v1 v2
v3 v4
v5
v6
Example: K3 is not bipartite, because if we divide its vertex set V into two disjoint sets V1 and V2 then one of these
two sets V1 and V2 must contain two vertices connected with each other which is not admissible in a bipartite
graph.
K1, 6
Sub Graphs
Sub graph:-
Let G = ( V(G), E(G)) be a graph with vertex set V (G) and edge set E(G) then a graph H(V(H), E(H)) is said to be
a sub graph of graph G if
(i) All the vertices of H are in G i.e. V(H) Í V(G).
v2
a
b
b c
v5
v6
v1 v5
v6 d e
v3
a
d
e v4
c
v4
e1
v1 v4 v4
e4
e4
e8
e2 e3 e6
e6
e5
v3 v3
v2 v2 e5
G
H
e7 e7
V(H) = {v2, v3, v4} Í V (G) and E(H) = {e4, e5,e6, e7} Í E (G)
Also each directed edge of H has the same ordered pair of end vertices in H and G. Then the digraph H is
called the sub graph of the digraph G.
Isomorphism
Two graphics G1 and G2 are said to be isomorphic to each other if there is a one to one correspondence
between their vertices and between their edges so that the incidence relationship is maintained.
It means that if in graph G1 an edge ek is incident with vertices vi and vj then in graph G2 its corresponding
edge ek must be incident with the vertices vi and vj that correspondent to the vertices vi and vj respectively.
The incidence relationship between vertices and edges in G1 is preserved by the incidence relationship
between corresponding vertices and edges in G2.
Isomorphic Digraphs
Isomorphism from a graph G1 = (V1, E1) to G2 = (V2, E2) is defined as mapping f : V1®V2 such that
Homomorphism graphs
Let G1 be a given graph. Another graph G2 can be obtained from this graph by dividing an edge of G1 with
additional vertices. Two graphs G1 and G2 are said to be Homeomorphic if these can be obtained from the
same graph or isomorphic graphs by this method.
5.4 Trees
A tree is a connected graph without any cycles and is therefore a simple graph having neither a self loop nor
parallel edges or A tree is a connected acyclic graph.
A directed tree or a tree with directed edges is a connected digraph that has no cycle–neither a directed cycle nor
a semicycle. Such a tree with n vertices has (n – 1) directd edges and possesses properties similar to those with
undirected edges.
Rooted Tree:
A tree in which any one vertex is distinguished from all the other vertices is called a rooted tree and the
distinguished vertex is called the root of the tree. Root is generally marked by enclosing the vertex within a triangle
or a circle as follows :
Trees without roots are generally termed as trees, free trees or non-rooted trees.
Leaves : Any vertex of a rooted tree T other than the roots is called a leaf of T. In figure below, we have five leaves
v3, v4, v7, v8 and v9.
v0
v1 v5
v6
v4
v2 v10 v9
v8
v7
v3
Sub-tree : If v is a vertex in a tree T = (V, E), then a subgraph T' = (V', E') of T in which V' includes v and all the
descendents of v, and E' contains edges in all directed paths initiating from v is called a sub-free. The root of this
subtree is son of v.
A rooted tree whose subtrees are placed in a definite order is called an ordered rooted tree. These subtrees also
are ordered trees.
Theorem: There is one and only one path between every pair of vertices of a tree.
Proof : (a) As a tree T is defined as a connected graph, there must exist at least one path between every pair
f vertices of T.
Existence of more than one (two or more) distinct paths between any two vertices v1 and v2 of T shall
create a cycle in T which is not acceptable for a tree.
(b) Hence there can not be two or more than two paths between any pair of vertices of a tree. By virtue of
(a) & (b) there is one and only one path between every pair of vertices of a tree.
Proof (by induction) : We can see that the theorem is true for n = 1 [•], n = 2 [ ], n = 3
We assume that the theorem is true for all trees with less than n (upto n – 1) vertices. Now we shall show
that if it is true upto n – 1 vertices, it is also true for n vertices as follows :
Let vi and vj be the end vertices of an edge eK in a tree T. By definition, there is no other path between vi
and vj except eK.
Deletion of eK from T shall make T – eK as a disconnected graph consisting of two components say T1 and T2.
As there is no cycle in T, there must not be any cycle in T1 and T2 also. So T1 as well as T2 is an acyclic connected
graph and hence each is a tree.
Let the number of vertices in T1 and T2 be p and q respectively. As deletion of eK from T does not affect the
number of vertices in T, the number of vertices in T1 and T2 taken together shall be the same as in T.
i.e p + q = n ...(1)
In T1, number of vertices = p (< n), so number of edges in T1 = p – 1 (by our assumption that the theorem
holds for less than n vertices).
= (p – 1) + (q – 1)
=p+q–2
= (n – 2) + 1 by (2)
= n – 1Hence proved.
Proof : Minimum number edges to make graph of n vertices as a connected graph is n – 1. We see that removal of
a single edge from the graph G shall make it disconnected. So (n – 1) is the minimum number of edges required to
make a graph of n vertices as connected and acyclic. Therefore, a connected graph with n vertices and (n – 1)
edges can not have a cycle.
Thus we see that G is a connected graph having no cycles (acyclic) and therefore, G is a tree.
Forest:
Uses of trees :
When the trees are levelled, the root v constitute level 0, the neighboring vertices of v constitute level 1, the
neighbors of vertices having level 1 are assigned level 2 and so on.
If the level of any vertex x is i, then its neighboring vertices on the next level (i +1) are called its children or
descendents. The vertices on previous level are called Father or Predecessor.
A rooted levelled tree in which any vertex has at the most two children is called a binary tree. It means that a
vertex of a binary tree can have no child, one child or two children.
If every vertex of a binary tree has either two children or no children, then such a binary tree is called a Full or
Complete binary tree.
v1
Fig shows a binary tree v1 is a root of the tree. The left subtree
v2 v3
consists of the binary tree with root v2 and the right subtree consists
of the binary tree with root v3. Further v2 has its left subtree with root v6
v4 v5 v7
v4 and right subtree with root v5. Now v4 has its no left subtree. It has
v8 v9 v10
right subtree with root v8. Similarly the subtrees with their roots
corresponding to other vertices also can be defined.
v1
v2
v3
v4 v5
v6
v7
In a directed graph we may define a binary tree as a rooted tree in
which each vertex has at most two out-degree.
Some properties of Binary Trees :
Proof : As only one vertex is of even (= 2) degree and the rest (n – 1) vertices of odd degree (1 or 3) and the
number of vertices with odd degree in a graph (including tree) has to be even. Thus n – 1 is even which is possible
of n is odd.
= (p × 1) + (1 × 2) + [(n – p – 1) × 3] = 3n – 2p –1 (1)
The total number of degrees associated with these n – 1 edges (and hence n vertices) = 2 (n – 1)
= 2n – 2 (2)
3n – 2p – 1 = 2n – 2
or n – 2p + 1 = 0 ...(3)
or n +1 ,
2
Binary Search Tree: Binary Search tree is a binary tree in which each internal node x stores an element such that
the element stored in the left subtree of x are less than or equal to x and elements stored in the right subtree
of x are greater than or equal to x. This is called binary-search-tree
Tree traversal is one of the most common operations performed on tree data structures. It is a way in which each
node in the tree is visited exactly once in a systematic manner. There are many applications that essentially require
traversal of binary trees. For example a binary tree could be used to represent an arithmetic expression as shown
in Fig.
C
*
A B
The full binary tree traversal would produce a linear order for the nodes in a binary tree. There are three
ways of binary tree traversal.
Inorder Traversal :
The inorder traversal of a non-empty tree is defined as follows:
Example :
A
B
C
D E
F G
Preorder traversal:
Postorder Traversal:
In a binary tree the distance of a vertex vi from the root of the tree is called the level of vi and is denoted by li.
Thus level of the root is zero. Levels of the various vertices in the following tree have been denoted by numbers
written adjacent to the respective vertices.
level 0
level 1 level 1
level 2 level 2
level 3
level 3
level 3
level 4
level 4 level 4
level 4
In a binary tree there will be two edges adjacent to the root vertex v0. Let these edges be v0u1 and v0v1. Levels of
Again there can be either 0 or 2 edges adjacent to each of the vertices u1 and v1. Let these edges u1u2, u1u3,
v1v2 and v1v3 levels of each of the four vertices u2, u3, v2, v3 is 2. So maximum number of vertices of level 2 is
4(=22). In a similar way the levels of the 8 vertices that will be obtained by adding two edges to each of the four
vertices u2, u3, v2, v3 shall be 3. So maximum number of vertices each of level 3 is 8(=23). Not more than two
edges can be added to any of the vertices so obtained to keep the degree of that vertex as 3.
v0
u1 v1
u2
u3
v2 v3
Proceeding in this way we see that the maximum number of vertices in a n level binary tree at levels 0, 1, 2, 3,
.......... shall be 20, 21, 22, 23, ........ respectively.
The maximum level of any vertex in a binary tree (denoted by lmax.) is called height of the tree. The
minimum possible height of an n vertex binary tree is [log2(n +1) – 1] which is equal to the smallest integer ³
n -1
[log2(n +1) – 1] and Max. lmax =
2
5.6 Coloring
In coloring a map, any two regions having a common border are assigned different colors. In case the number of
regions is large, we are interested in finding out the least number of colors that can be used to color the map so
that adjacent regions do not have the same color.
In order to solve such type of problems a map in a plane is represented by a graph. Each region of the map is
represented by a vertex and two vertices representing two regions with a common border are joined by an edge.
This graph is called dual graph of the map. The problem of coloring the region of a map is converted into the
problem of coloring the vertices of the corresponding dual graph so that no two adjacent vertices in the graph
have the same color.
Example : The graph given in Fig. (a) below has its dual as shown in Fig. (b).
C B
D E
A
(a)
C
E C
D
(b)
A
The problem of finding out the minimum number of colors required to color the map so that adjacent
regions do not have the same color is equivalent to find the least number of colors required to color the vertices of
the dual graph so that no two adjacent vertices may have the same color.
1. Coloring or proper vertex coloring of a graph: It means painting all the vertices of a graph with colors in
such a way that no two adjacent vertices have the same color.
2. Properly vertex colored graph: It is a graph whose all vertices have been properly colored. The same graph can
be colored in different ways. Instead of writing the name of the colors we shall denote the different colors by
using different numerals 1, 2, 3, ..... etc. for the sake of convenience e.g. The green, blue, red and black colors may
be represented by the numbers 1, 2, 3 and 4 respectively.
1
1 3
3 2
3 2 1 2
1 3
4 3 1
5
Edge colorings
By properly coloring the edges we mean to assign colors to different edges of a graph G such that no two adjacent
edges (two edges incident with the same vertex) receive the same color.
If we assign K colors to each of the edges of a graph G in such a way that no two adjacent edges have the same
color, then it is called a K-edge coloring of G or we say that the graph is K-edge colorable.
Edge chromatic number of G: It denotes the minimum number of colors required to properly color the graph G
and is denoted by '(G).
Examples: A graph which is union of isolated vertices and mutually disjoint edges has edge chromatic number one.
1 2
It denotes the minimum number of colors, say K, required for proper coloring of the graph and the graph is
called a K-vertex chromatic graph or K-vertex colorable graph.
As we are dealing with vertex coloring here, so we shall drop using the word vertex with color, coloring or
colorable or chromatic number.
A formula which defines any term of a sequence in terms of any number of its previous terms or which expresses
any term of a sequence as a function of its previous terms is called recursive and the relation is called a recurrence
relation. For example, the nth terms an of the sequence 3, 8, 13, 18, 23, ............ can be expressed as,
This formula is called recursive formula and the relation is called the recurrence relation.
To define a sequence recursively, the recursive formula has to be accompanied by information about the beginning
of the sequence as a1 = 3 in the above example. This information is called the initial condition or boundary
condition for the sequence.
Again a formula in which the value of any term of the sequence can be determined with the help of its position
number is called explicit formula.
For example the sequence 1, 4, 9, 16, 25, is described completely by the explicit formula
an= n2, n
Various sequences defined by recursive formula or explicit formula are given below.
(i) 5, 10, 20, 40, 80, 160 c1= 5, cn= 2 cn–1 2 n 6 (Recursive formula)
(ii) 3, 7, 11, 15, 19, 23, .......... d1=3, dn=dn–1 + 4 (Recursive formula)
where an depends on one or more of the previous k terms and k is the smallest such integer.
Therefore, if we can compute nth terms of a sequence from the preceding k terms, but not (r–1) terms, we define
the order to be k.
We donot define an order for recurrence relations of the form an, = F (an–1, an–2, .........., n) that depend on each
of its' previous terms.
Degree of a recurrence relation is the degree of F, treated as a polynomial in its variables excluding n. If F is not a
polynomial in its variables, no degree is assigned to the recurrence relation.
A recurrence relation is called Linear, if it is of degree one, it is called Quadratic if its degree is two.
A recurrence relation is called to be Homogeneous, if it contains no terms that depend only on the variable n.
Generally the term Homogeneous is used for Linear recurrences regardless of it’s' order.
In case of kth order recurrence, one needs to know the first k terms (a0 a1 ......., ak–1, of the sequence in order to
uniquely define the sequence.
Related Definitions:
(1) A kth order recurrence relation has Initial Conditions provided the values of one or more of the terms a0, a1,
......, ak–1 are known.
(2) A function f(n) is said to be a General Solution to the homogeneous recurrence relation if it satisfies the
recurrence equation.
(3) A function of g(n) is said to be a Particular Solution to the recurrence relation if it satisfies the recurrence
equation together with the initial conditions.
Homogeneous & non-homogeneous recurrences and characteristic equation. General form of a linear non-
homogeneous recurrence of order k is :
The characteristic equation or auxiliary equation of linear homogeneous recurrence (1) is the equation.
Roots of characteristic equation (2) are called Characteristic roots of recurrence relation (1).
Example: If recurrence relation is un+2 = 2un – un–2,
or x4 = 2n2 – 1
Characteristic roots of this recurrence are 1, 1, –1, –1 or 1 and –1 both with multiplicity 2.
Solving a recurrence relation means to find a sequence {an} that satisfies it, where an is a function of n.
Theorem: A sequence {un} satisfies the linear, homogeneous recurrence relation with constant coefficients.
n n n
b0 C(n, 0)ai + b1 C(1 + n, 1)ai + …….. + bmi-1 C(mi – 1 +n, mi – 1)ai
where ........ are characteristic roots of multiplicity m1, m2 ........ respectively and bi's are constants.
If the characteristic roots are all distinct i.e. of multiplicity one, the form of the solution sequence is
¥
å
un = j =1Aj ajn n³0
n n n n
= A1a1 + A2a2 + A1a1 + …………………….+ Akak
where are characteristic roots and Aj s are constants to be determined by initial conditions.
root 1 of multiplicity 2
root 3 of multiplicity 1
root –2 of multiplicity 3
C(0 + n, 0).3n,
values of constants a, b, c, d, e, f can be determined if initial conditions (values of any six consecutive terms
of the sequence) are given.
A1 = a + b, A2 = b, A3 = c, A4 = d + e + f, A5 = E + 3f/2, A6 = f/2
Values of these constants A1, A2, ....., A6 are determined with the help of initial conditions.
The general solution as given in (2) is more convenient and can be written directly if we know the characteristic
roots.
To find the general solution directly when characteristic roots are known.
x = a1 with multiplicity 1
x = a2 with multiplicity 2
x = a3 with multiplicity 3
n n n
= b1 a1 + [ b2 + b3 (n +1) ]a2 + [ b4 + b5 ( n +1) + b6 (n+2)(n+1)/2]a3
n n 2 n
= b1 a1 + [ b2 + b3 + b3 n ]a2 + [ (b4 + b5 + b6 ) + { (b5 +(3b6/2))n + (b6/2)n }] a3
n n 2 n
= A1 a1 + [ A2 + A3 n ]a2 + [ A4 + { (A5n + A6n }] a3
x = 3 of multiplicity 2
x = 2 of multiplicity 3
x = 4 of multiplicity 4,
where A1, A2, A3, A4, A5, A6, A7, A8, A9 are all constants whose values can be determined with the help of initial
conditions.
Example: Find explicit formula for sequence defined by cn = 3cn–1–2cn–2 with initial conditions c1 = 5, c2 = 3 by
using generating function.
Solution of the recurrence relation cn = 3cn-1 – 2cn-2 with initial condition c1 = 5 and c2 = 3, by using Generating
function:-
Here we are given c1= 5, c2= 3. We shall find the value of c0 by putting n = 2 in the given recurrence relation as:-
= 6,
¥ ¥ ¥
n n n
å cn.Z = 3S cn-1•Z - 2S cn-2•Z
Therefore
n
cn = Coefficient of z in A(z)
n -1 n -1
= Coefficient of z in (-1)(1 – 2Z) + Coefficient of z in 7•(1 – z)
n n
= (-1)•2 + 7•1
n
=7–2
th
This is the (n + 1) term of the sequence c0, c1, c2, c3 and nth term of the sequence c1, c2, c3,……..
an = 3an–1
or an = b. n+0C0.3n
or an = b.3n
Example: Determine the constants c1 and c2 such that the recursion un + c1 un–1 + c2un–2 = 0 has the
So –c1 = 2 or c1 = – 2
2
Product of roots = (1+ i ) . (1 – i ) = 1 – i = 1 + 1 = 2
So c2 = 2
Hence c1 = – 2, c2 = 2
Example: Find explicit formula for sequence defined by cn = 3cn–1–2cn–2 with initial conditions c1 = 5, c2 = 3 by
using Characteristic equation.
x = 2 of multiplicity 1
and x = 1 of multiplicity 1,
cn = A1 (2)n + A2
or cn = A1 2n + A2 ...(4)
From c1 = 5 (given) we put n = 1 and cn = 5 in (4) to get
5 = A1 2n + A2 ...(5)
4= 4 A1 + A2 ... (6)
A1 = – 1 and A2 = 7
Therefore the solution of the given recurrence relation from (4) becomes
Cn = – 2n + 7
Solution:
or dn = A1 + A2 n ...(4)
1.5 = A1 + A2 ...(5)
3 = A1 + 2A2 ...(6)
Solving (5) and (6), we have A2 = 1.5, A1 = 0. Therefore the general solution from (4) becomes
dn = 1.5 n
Example: Solve the fibonacci sequence defined as fn = fn-1 + fn-2 with initial conditions f1 = f1 =1
2
Solution. : Characteristic Eq. is x -x-1 = 0
Characteristic roots are (1 + Ö5)/2 & (1 - Ö5)/2 each with multiplicity 1. (say .
n+1 n n+1 n
General solution. : fn = a1. C 0 a + a2 C0b
n n
or fn = a1. a + a2 b ...(1)
2 2
f2 = 1 i.e. n = 2, fn = 1 giving 1 = a1a + a2b ...(3)
Ö5 2 Ö5 2
Example:- Use (i) generating function (ii) Characteristic roots to solve the recurrence relation un = un-1 + un-2, n ³ 3
u1 = 1, u2 = 3.
or u0 = u2 – u1 = 3 – 1 = 2
¥ ¥ ¥
n n n
S un•z = S un-1•z + S un-2•z
¥ ¥ ¥
n n-1 2 n-2
or S unz = z•S un-1•z + z •S un-2•z
a = (1 + Ö5)/2, b = (1 - Ö5)/2
a + b = 1, ab = -1]
-1 -1
= 1 [(2a - 1)•(1 - az) – (2b - 1)•(1 - bz) ]
a-b
n
Therefore un= Coefficient of z in A(z)
n -1 n -1
or un = 1 [Coeff of z in (2a - 1)•(1 - az) – Coeff of z in (2b - 1)(1 - bz) ]
a-b
n n
= 1 [(2a - 1)•a – (2b - 1)• b ]
a-b
n n
= 1 [Ö5 •[(1 + Ö5)/2] + Ö5•[(1 - Ö5)/2]
Ö5
x = (1 + Ö5)/2 of multiplicity 1.
n n
un = A1•[(1 + Ö5)/2] + A2•[( 1 - Ö5)/2]
n n
or un = A1•a + A2•b ……………….(2)
1 = A1a + A2b………………….(3)
2 2
and 3 = A1a + A2b ………………..(4)
and A2 = (1 – A1a) / b = 1
n n
Hence un = [(1 + Ö5)/2] + [( 1 - Ö5)/2]
¥ ¥ ¥
n n n
å an•z = åan-1•z + åan-2•z
¥ ¥
n-1 2 n-2
= z•åan-1•z + z •åan-2•z ……………………(2)
n=3 n=3
¥
n 3 4
åan•z = a3z + a4z +…………………….
n=3
2 3 4 2
= (a1z + a2z + a3z + a4z + …………………..) – a1z – a2z
2
= A(z) – a1z – a2z ……………………….(3)
¥
n-1 2 3
z•åan-1•z = z[a2z + a3z + ………….]
2 3
n=3 = z[(a1z + a2z + a3z + ……………) – a1z]
2
= z[A(z) – a1z] = z•A(z) – a1z ……………(4)
¥
2 n-2 2 2
z •åan-2•z = z [a1z + a2z + …………….]
n=3
2
= z •A(z) …………………………(5)
Putting values of all the terms from (3), (4) and (5) in (2), we have
2 2 2
A(z) – a1z – a2z = z•A(z) – a1z + z •A(z)
2 2 2
or A(z)[1 – z – z ] = a1z + a2z – a1z
2 2 2
or A(z) = (a1z + a2z – a1z ) / (1 – z – z )
2
= z / (1 – z – z ), (on putting given values of a1 and a2)
2
Solving 1 – z – z = 0, we get its two roots as
a-b
n
Therefore nth terms un = Coefficient of z in the expression of A(z)
n -1 n -1
= 1•[Coeff of z in ( 1 - az) – Coeff of z in (1 - bz) ]
a-b
n n
= 1•[a - b ] n³1
a-b
n n
= 1/Ö5[{(1 + Ö5)/2} – {(1 - Ö5)/2} ]
th
This is n term of the sequence a1, a2, a3, …………
d
Type-1: When g(n) is of the form an , where a is a constant and dÎ N
d
Rule-1: A particular solution of (1) with non-homogeneous part, g(n) = an , where a is a known constant and d Î N,
is of the form :
2 d
(i) A0 + A1 n + A2 n + …… +Ad n , if 1 is not a characteristic root of (1) ;
(ii) A0 nm+ A1 nm+1 + A2 nm+2 +…….+ Ad nm+d , if 1 is a characteristic root of (1) with multiplicity m,
where A0, A1, A2, ….. Ad are constants.
Solving eqs. (5) and (6), we get A1 = 2, A0 = 3. Thus the particular solution (3) becomes
un = 3 + 2n ...(7)
The complete solution shall be the sum of general solution of the associated homogeneous recurrence relation
(given in eq. (2)) and the particular solution (given in (7)) i.e.
n
un = B1.3 + 3 + 2n
un = un-1 + n, n ³ 0, u1 = 3 ...(1)
n n-1
The associated homogeneous recurrence relation shall be un = un-1, whose characteristic equation is x = x or x –
n
1 = 0 and its characteristic root is x = 1 of multiplicity 1. Therefore the general solution is un = B1.1
or un = B1. ...(2)
d
To find particular solution of (1), we see that g(n) = n is of the form a n where a = 1 and d = 1
As the characteristic root is 1, the particular solution by Rule 1 (ii) of Type 1 form is
1 1+1
un = A0.n + A1.n
2
or un = A0n + A1.n ...(3)
0 = -A0 + A1 ...(5)
Solving eqs. (5) and (6), we get A1 = 1/2, A0 = 1/2 . Thus the particular solution from (3) becomes
2
un = (1/2)n + (½)n ...(7)
The complete solution of the given recurrence is the sum of soln. given in eqs. (2) and (7). Hence
2
un = B1 + (½)n + (½)n ...(8)
n
Type 2 : When g(n) is of the form ar , where a is a known constant.
Rule-2 : A particular solution of (1) with non-homogeneous part arn (where a is a known constant) is of the form
:
n
Example: Give complete solution of the recurrence relation un – 4un-1 + 3un-2 = 5
x = 3 of multiplicity 1
and x = 1 of multiplicity 1
To find particular solution of (1) we see that g(n) = 5n which is of the type 2 i.e. a.r , a = 1,
n
r = 5.
Moreover r = 5 is not a characteristic root, therefore by Rule 2 (i) of type 2, the particular solution
n
un = A.5 ...(4)
The complete solution shall be the sum of solution. given in (3) and (6). Hence
n n+2
un = B1.3 + B2 + 5 /8
n
Example: Solve the recurrence relation un = 6un-1 – 9un-2 + 3 .
n
Solution. : The given eq. is un = 6un-1 – 9un-2 + 3 . ...(1)
n 2 n
The required solution is the sum of soln. given in (3) and (5). Hence un = (B1 + B2n)3 + 1(n .3 )/2
If {an} is a solution of is a solution of un = c1un-1 + c2un-2 + …………+ckun-k + g1(n) and {bn}, is a solution of un =
c1un-1 + c2un-2 + …………+ckun-k + g1(n), then the solution of
un = c1un-1 + …………+ckun-k + Ag1(n) + Bg1(n) is given by A.an + B.bn , where A and B are constants.
n n
Example: Solve the recurrence relation un – 7un-1 + 16un-2 – 12un-3 = 2 + 3 ,
u0 = 0, u1 = 1, u2 = 1
n n
Solution. : Given relation is un – 7un-1 + 16un-2 – 12un-3 = 2 + 3 ...(1)
x = 2 of multiplicity m = 2
and x = 3 of multiplicity m = 1
To find the particular solution corresponding to g1(n) = 2 we see that it is of the type 2 i.e. a.rn where a = 1, r = 2
n
Therefore by rule 2 (ii) the particular solution corresponding to g1(n) = 2n shall be of the form
m n 2 n
A1n .r = A1n .2 ...(6)
where A1 is a constant.
Again to find particular solution corresponding to g2(n) = 3 , we see that it is also of the type 2 i.e. arn where a = 1,
n
r = 3 and also 3 is a characteristic root of multiplicity m = 1. Therefore by rule 2(ii) particular solution corresponding
n
to g2(n) = 3 shall be of the form.
m n n
A2n r = A2.n3 ...(7)
where A2 is a constant
n n
Therefore by rule 3, the particular solution of g(n) = g1(n) + g2(n) = 2 + 3
This equality is true for every value of n ³ 3 which is possible if A2 – 9 = 0 i.e. A2 = 9 and i.e. 1 + A1 = 0 i.e. A1 = -1.
Hence the complete soln. of eq. (1) is the sum of solution given in(4) and (10) i.e.
n n 2 n n
un = (B1 + B2n)2 + B3.3 – n .2 + 9n.3
2 n n
or un = (B1 + B2n – n ).2 + (B3 + 9n).3 ...(11)
0 = B1 + B3 or B1 + B3 = 0
B1 = 50 B2 = 13 B3 = – 50
d n
Type-4: When g(n) is of the form a.n .r where a and r are known constants and
x = 3 of multiplicity 1
and x = 2 of multiplicity 1
Therefore the general solution is given by
r r
ar = B1•3 + B2•2 …………….(3)
r
Particular Solution corresponding to 2 + r
r
Particular solution corresponding to the first terms g1(r) = 2 shall be of the form
r
A0•r•2 …………………….(4)
A1 + A2r ………………(5)
by rule 1-(i).
r
Then by rule 3, the particular solution of g1(r) + g2(r) = 2 + r shall be of the form
r
ar = A0r2 + A1 + A2r ………………(6)
which is true if
Rule-4 : A particular solution of (1) with non-homogeneous part a.nd., where a and r are known constants and
shall be of the form–
(ii) , if either r or 1 (but not both) is a characteristic root of (1) with multiplicity m;
(iii) , if r and 1 both are characteristic roots of (1) with multiplicities , respectively. are all constants.
x = 1 of multiplicity 2
x = – 1 of multiplicity 3
and x = 2 of multiplicity 5,
n 2+3 n
then the particular solution corresponding to the non-homogeneous function g(n) = l1.n(-1) shall be A.n .(-1)
5 n 5 n
(A0 + A1n) or n (-1) (AA0 + AA1n) or n (-1) (k0 + k1n) by rule 4 (iii) as 1 and –1 both are characteristic roots.
2 n 2+5
Similarly the particular solution corresponding to the non-homogeneous function g(n) = l23 .2 shall be An .2n(A0
2 3
+ A1n + A2n + A3n ) by the same rule 4(iii). This can also be written as
7 n 2 3
n .2 .(L0 + L1n + L2n + L3n )
5.9 Combinatorics
Basic Counting Techniques: Some probability problems can be attacked by specifying a sample space S={a1,
a2 …,an }in which each simple event has probability 1/n (i.e. is "equally likely"). Thus, if a compound event
A consists of r simple events, then P(A) =r/n. To use this approach we need to be able to count the number of events
in S and in A.
General Counting Rules: There are two basic rules for counting which can
deal with most problems. The rules are phrased in terms of ``jobs" which are
to be done.
1. The Addition Rule: Suppose we can do job 1 in ways and job 2 in ways. Then we can do either
job 1 or job 2, but not both, in ways. For example, suppose a class has 30 men and 25 women.
There are ways the prof. can pick one student to answer a question.
2. The Multiplication Rule: Suppose we can do job 1 in ways and an unrelated job 2 in ways. Then
we can do both job 1 and job 2 in ways. For example, to ride a bike, you must have the chain on
both a front sprocket and a rear sprocket. For a 21 speed bike there are 3 ways to select the front sprocket
and 7 ways to select the rear sprocket.
Example : Five boys and five girls are to be seated in a row. In how many ways can then be seated if
a. No two boys can be seated together
b. John and Mary must be seated together
Solution:
a) As no two boys can be seated together, alternate seats will be taken by girls and boys.
So, No of arrangements = 2(5X5X4X4X3X3X2X2X1X1) =2X5! X 5!
b) John and Mary must be seated together. They can have 2 seating sequences(JM or MJ)
So, 9! are the no of arrangements of 9 seats(John and Mary are considered 1 seat).
Example: In how many ways can a committee consisting of three men and two women be chosen from seven
men and five women?
7
Solution: The three men can be chosen from the seven men C3 ways, and the women can be chosen from the
5
five women in C 2 ways. Hence the committee can be chosen in
7 7 .6 . 5 5 .4
C3 . 5 C 2 = . = 350 ways.
3 .2 .1 2 .1
Statement: the pigeonhole principle states that if there are more pigeons than pigeonholes, then there must be at
least one pigeonhole with at least two pigeons in it.
Example : Among any group of 27 English words, there must be at least two that begin with the same letter, since
there are only 26 letters in the English alphabet.
Here, no of pigeons = 27
No of pigeonholes = 26
Example : Assume there are three men and five women at a party. Show that if these people are lined up in a row, at
least two women will be next to each other.
Consider the case where the men are placed so that no two men are next to each other and not at either end of the
line. In this case, the three men generate four potential locations (pigeonholes) in which to place women (at either
end of the line or two locations between men within the line). Since there are five women (pigeons), at least one slot
will contain two women who must, therefore, be next to each other. If the men are allowed to be placed next to each
other or at the end of the line, there are even fewer pigeonholes and, once again, at least two women will have to be
placed next to each other.