Unit-1 Discrete Mathematics
Unit-1 Discrete Mathematics
Unit-1 Discrete Mathematics
Contents
1 1 /9/2022
• Set theory
• Relations
• Poset
• Closures of Relations
• Functions
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
3
Introduction :
Most of mathematics is based upon the theory of sets that was originated in 1895 by
the German mathematician G. Cantor who introduced the concept of sets and defined
a set as a collection of definite and distinguishable objects selected by means of certain
rules or description.
Definition
A set is a well-defined collection of objects, called the elements or members of the set.
The adjective “well-defined” means that we should be able to determine if a given
element is contained in the set under scrutinity.
Example of Sets:
❑The set of all states in India.
❑A pair of shoes
❑The set of all canadians
❑The collection of all self-financing colleges in a state.
❑A collection of rocks
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
4
1 1 /9/2022
Representation of a Set:
Capital letters A, B, C,… are generally used to denote sets and lower case
letters a, b, c… to denote elements. If an element x is a member of any set A, it
is denoted by x∈A and if an element y is not a member of set A, it is denoted
by y∉A
Sets can be represented in two ways :-
❑Roster Notation
❑Set Builder Notation
Roster Notation:
The set is represented by listing all the elements comprising it. The elements
are enclosed within braces and separated by commas.
Examples:
❑The Set V of all vowels in English alphabet, V={a,e,i,o,u}
❑The set E of even positive integers less than or equal to 10: E={2,4,6,8,10}
❑The set P of positive integers less than100: P={1,2,3,…,99}
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
5
1 1 /9/2022
Cardinality of a Set:
Cardinality of a set A, denoted by |A|, is the number of elements of the set.
The number is also referred as the cardinal number. If a set has an infinite
number of elements, its cardinality is ∞.
Example:
❑If A={1,4,9,16,25} then the cardinality of A, i.e |A|=5 and
❑If A={1,2,3,….} then |A|=∞
Types of Sets
Sets can be classified into many types. Some of which are universal, empty,
singleton, finite, infinite, subset, proper set, etc.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
7
1 1 /9/2022
Universal Set:
The set which contains all the elements under consideration is called the Universal
set and denoted as U.
Empty set :
The empty (or void, or null) set, symbolized by { } or Ø, contains no elements at all.
Example
❑A={x|x is an odd integer and 3<x<5}={ }
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
8
1 1 /9/2022
Finite Set:
A set which contains a definite number of elements is called a finite set.
Example
• A={𝑥 2 𝑥 ∈ 𝑍 + , 𝑥 2 < 100 = {1, 4, 9, 16, 25, 36, 49, 64, 81} is a finite set.
Infinite Set:
A set which contains infinite number of elements is called an infinite set.
Example
• A={x|x is an even positive intger}=A={2,4,6,8,…} is an infinite set.
Subset:
A set A is called a subset of a set B (symbolized by A ⊆ B ) if every element
of A is also an element of B.
Example
❑The set of all even positive integers between 1 and 100 is a subset of all
positive integers between 1 and 100.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
9
1 1 /9/2022
Note:
1. Any set is a subset of itself, i.e., A ⊆ A and Ø is a subset of any set, i.e.,
Ø⊆A.
2. If A ⊆ B and B ⊆ C then A ⊆ C.
3. If A ⊆ B then B is called the superset of A and is written as B ⊇A.
Definition
Any subset A of the set B is called the proper subset of B, if there is atleast one
element of B which does not belong to A, i.e., if A ⊆ B but A ≠ B. It is denoted
as A⊂ 𝐵.Two sets A and B are said to be equal, i.e., A=B, i.e., if A ⊆ B and
B ⊆ A.
Example:
❑If A={a,b}, B ={a,b,c} and C ={b,c,a} then A and B are subsets of C, but A
is a proper subset of C while B is not , Since B=C.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
10
1 1 /9/2022
Power Set
Given a set S, the set of all subset of the set S is called the power Set of S and
is denoted by P(S).
Example:
❑If A={a,b,c} then P(A)={{},{a},{b}.{c},{a,b},{b,c}{a,c}{a,b,c}}
Property:
If a Set S has n elements, then its power set has 2𝑛 elements, i.e., if |S|=n
then |P(S )|= 2𝑛 .
Note:
In the above example,|A|=3 and so |P(A)|= 23=8
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
11
1 1 /9/2022
Operations on Sets:
Two or more sets can be combined to give rise to new sets. These operations
that play an important role in many applications are discussed as follows.
If U is the Universal set and if A and B are any two sets , Then
3.𝐴𝑐 𝑜𝑟 𝐴′ or 𝐴,ҧ called the complement of A, contains all the elements which
are not in A. i.e., 𝐴′ ={x|x∈ 𝑈 and x∉ 𝐴}.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
12
1 1 /9/2022
4. Two sets A and B are called disjoint sets if they do not have any element in
common,then A∩B=∅.
Example:
❑If A={1,2,3} and B={4,5,6} then A∩B=∅.Hence A and B are disjoint sets.
1 1 /9/2022
1 1 /9/2022
1 1 /9/2022
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
16
1 1 /9/2022
(ii)A ∩ B = B ∩ A
Let us use the set builder notation to prove this identity.
A ∩ B ={ 𝑥|𝑥 ∈ A ∩B }
={x| 𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐵}
={x| 𝑥 ∈ 𝐵 𝑎𝑛𝑑 𝑥 ∈ 𝐴}
={ 𝑥|𝑥 ∈ B ∩A}
=B∩A
(iii)A ∪ (B ∩ C ) = ( A ∪ B ) ∩ ( A ∪ C )
A ∪ (B ∩ C ) ={ 𝑥|𝑥 ∈ 𝐴 𝑜𝑟 𝑥 ∈ B ∩C}
={ 𝑥|𝑥 ∈ 𝐴 𝑜𝑟 (x ∈ B and x ∈ C)}
={ 𝑥|(𝑥 ∈ 𝐴 𝑜𝑟 x ∈ B )and (𝑥 ∈ 𝐴 𝑜𝑟 x ∈ C)}
={ 𝑥|(𝑥 ∈ 𝐴 ∪ B )and (𝑥 ∈ 𝐴 ∪ C)}
={ 𝑥|𝑥 ∈ (𝐴 ∪ B )∩ (𝐴 ∪ C)}
= (A ∪ B ) ∩ (A ∪ C )
Examples
1 1 /9/2022
1 1 /9/2022
Partition of a Set
Definition
If S is a non-empty set , A collection of disjoint non empty subsets of S whose
union is S is called a partition of S. In other words, the collection of subsets 𝐴𝑖 is
a Partition of S if and only if
Note:
The sub sets in a Partition are also called blocks, parts or cells of the partition.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
19
1 1 /9/2022
Example: 1
Let the set be A={1, 2}Then the Partition of the set A= { {1}, {2} } { {1, 2} }
Example:2
Let the set be A ={1, 2, 3} Then the Partition of the set A are as follows:
❑ {{1}, {2}, {3}}
❑ {{1}, {2, 3}}
❑ {{2}, {1, 3}}
❑ {{3}, {1, 2}}
❑ {{1, 2, 3}}.
Note:
The following are not partitions of {1, 2, 3}:
❑ {{}, {1, 3}, {2}} is not a partition because one of its elements is the empty set.
❑ {{1, 2}, {2, 3}} is not a partition because the element 2 is contained in more than one
block.
❑ {{1}, {2}} is not a partition of {1, 2, 3} because none of its blocks contains 3;
however, it is a partition of {1, 2}.
(Note: The number of ways to Partition of a set is called a Bell number. In example:2
Bell number is 5.)
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
20
1 1 /9/2022
Definition
If A and B are sets then the Cartesian Product of A and B denoted as A×B is
the set of all ordered pairs of the form (a, b) where a ∈A and b ∈B. i.e.,
A×B={(a,b)|a∈A and b∈B}.
Example
If A={a,b,c} and B={1,2}then
❑A×B={(a,1),(a,2),(b,1),(b,2),(c,1),(c,2)}and
B×A={(1,a),(1,b)(1,c)(2,a)(2,b)(2,c)}.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
21
1 1 /9/2022
Relations
Definition
A Relation or a Binary relation R from set A to B is a subset of A×B
which can be defined as aRb or (a,b) ∈ R or R(a,b).
A Binary relation R on a single set A is defined as a subset of A×A. For two
distinct set, A and B with cardinalities m and n, the maximum cardinality of
the relation R from A to B is mn.
Example:
Let R be a relation on A={1,2,3,4} defined by aRb if a≤ 𝑏.Then
R={(1,1),(1,2),(1,3),(1,4),(2,2),(2,3),(2,4),(3,3),(3,4),(4,4)}
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
22
1 1 /9/2022
If there are two sets A and B and a relation from A to B is R(a, b),
then the Domain of R is defined as the set {a |(a, b) ∈ R for some b in B} and
the Range of R is defined as the set {b |(a, b) ∈R for some a in A}.
Example:
❑Let A={2,3,5}, B={6,8,10} and a relation aRb if a divides b.
Then
R={(2,6),(2,8),(2,10),(3,6),(5,10)}
Domain of R = D(R) ={2,3,5}
Range of R = R(R) ={6,8,10}
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
23
1 1 /9/2022
Types of relations:
Example:
❑If A={1,2,3}then R ={(1,1),(2,2),(3,3)} is the identity relation on A.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
24
1 1 /9/2022
Example:
❑If A={2,3,5}, B={6,8,10} and a relation aRb if
a divides b.
Then
R={(2,6),(2,8),(2,10),(3,6),(5,10)}
Now
𝑅 −1={(6,2),(8,2),(10,2),(6,3),(10,5)}
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
25
1 1 /9/2022
Operations on Relations :
1. If R and S denote two relations, the intersection of R and S denoted by R∩ 𝑆
is defined by
a(R∩ 𝑆)b=aRb 𝑏𝑆𝑎 ٿ, and
the union of R and S denoted by R∪ 𝑆 is defined by
a(R∪ 𝑆)𝑏= aRb ∨ 𝑎𝑆𝑏
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
26
1 1 /9/2022
Example:
❑Let A={x,y,z},B={1,2,3},C={x,y} and D={2,3}.
Let R be a relation from A to B defined by R={(x,1),(x,2),(y,3)}
and let S be a relation from C to D defined by S={(x,2),(y,3)}.
Then
2.R-S={(x,1)}
3. 𝑅′={(x,3),(y,1),(y,2),(z,1),(z,2),(z,3)}
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
27
1 1 /9/2022
Composition of Relations :
If R is a relation from A to B, S is a Relation from B to C, then the composition
of R and S denoted by R∘S is defined as R∘S={(a,c)|(a,b)∈ 𝑅 and (b,c) ∈S}.
Example
❑Let R={(1,1),(1,3),(3,2),(3,4),(4,2)} and S={(2,1),(3,3),(3,4),(4,1)}.
Then
1.R∘S={(1,3),(1,4),(3,1),(4,1)}
2.S∘R={(2,1),(2,3),(3,2),(3,4),(4,1),(4,3)}
3.R∘R={(1,1),(1,3),(1,2),(1,4),(3,2)}
4.S∘S={(3,3),(3,4),(3,1)}
5.(R∘S) ∘R={(1,2),(1,4),(3,1),(3,3),(4,1),(4,3)}
6.R∘ (S∘R)={(1,2),(1,4),(3,1),(3,3),(4,1),(4,3)}
1 1 /9/2022
Properties of Relations:
1.Reflexive Relation:
A relation R on a set A is called reflexive if (a,a) ∈ R holds for every element a ∈
A. i.e. if set A = {a, b} then R = {(a,a), (b,b)} is reflexive relation.
2.Irreflexive relation :
A relation R on a set A is called irreflexive if no (a,a) ∈ R holds for every
element a ∈ A.i.e. if set A = {a,b} then R = {(a,b), (b,a)} is irreflexive relation.
3.Symmetric Relation:
A relation R on a set A is called symmetric if (b,a) ∈ R holds when (a,b) ∈R.i.e.
The relation R={(4,5),(5,4),(6,5),(5,6)} on set A={4,5,6} is symmetric.
4.Asymmetric relation:
Asymmetric relation is opposite of symmetric relation. A relation R on a set A is
called asymmetric if no (b,a) ∈ R when (a,b) ∈ R.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
29
1 1 /9/2022
5.Transitive Relation:
A relation R on a set A is called transitive if (a,b) ∈ R and (b,c) ∈R
then (a,c) ∈ R for all a,b,c ∈ A. i.e. Relation R={(1,2),(2,3),(1,3)} on set
A={1,2,3} is transitive.
6.AntiSymmetric Relation:
A relation R on a set A is called antisymmetric if (a,b) ∈ R and (b,a) ∈
R then a = b(otherwise it is called not antisymmetric i.e if a≠ 𝑏)
Note:
1.Symmetric and anti-symmetric relations are not opposite because a relation
R can contain both the properties or may not.
Example:
1. R={(1,3),(3,1)(2,3)}is neither symmetric nor antisymmetric, whereas the
relation S={(1,1),(2,2)} is both symmetric and antisymmetric.
2. A relation is asymmetric if and only if it is both anti-symmetric and
irreflexive.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
30
1 1 /9/2022
Definition.1
A relation is called an Equivalence Relation if it is reflexive, symmetric, and transitive.
Example:
Relation R={(1,1),(2,2),(3,3),(1,2),(2,1),(2,3),(3,2),(1,3),(3,1)} on set A={1,2,3} is an
equivalence relation as it is reflexive, symmetric and transitive.
Definition.2
A relation R is called Partial ordering or Partial order relation if R is reflexive,
antisymmetric and transitive.
Example:
If R is a relation “greater than or equal to” (≥) on the set of integers Z then R is a Partial
ordering relation since (i) a≥ 𝑎 for every integer a, i.e ≥ is reflexive
(ii) a≥ 𝑏 and b≥ 𝑎 ⟹ 𝑎 = 𝑏, i.e ≥ is antisymmetric
(iii) a≥ 𝑏 and b≥ 𝑐 ⟹ a≥ 𝑐, i.e ≥ is transitive.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
31
1 1 /9/2022
Problems:
1. If R is the relation on the set of ordered pairs of positive integers such that
(a,b),(c,d)∈R whenever ad=bc, Show that R is an equivalence relation.
Solution
(i) (a,b)R(a,b),since ab=ba
∴R is reflexive.
(ii)when (a,b)R(c,d), ad=bc
⟹ cb=da
This means that (c,d)R(a,b).
∴R is symmetric
(iii)When (a,b)R(c,d) and (c,d)R(e,f), we have ad=bc and cf=de
a c c e
⟹ b
= d and d
= f
a e
⟹ b
= f
⟹ af=be
This means that (a,b)R(e,f).
∴R is transitive
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
32
1 1 /9/2022
2.If R is the relation on the set of positive integers such that (a,b) ∈R if and
only if ab is a perfect square, Show that R is an equivalence relation.
Solution
(i) since 𝑎. 𝑎 = 𝑎 2 is a perfect square, aRa
∴R is reflexive.
(ii)when aRb, ab is a perfect square , say ab=𝑥 2
⟹ ba=𝑥 2 , is a perfect square
That is., bRa.
∴R is symmetric
(iii)when aRb and bRc, we write ab=𝑥 2 and bc=𝑦 2
⟹ (ab)(bc)= 𝑥 2 . 𝑦 2 =(𝑥𝑦)2
⟹a𝑏 2𝑐=(𝑥𝑦)2
𝑥𝑦 2
⟹ a𝑐= , is a perfect square
𝑏
That is., aRc.
∴R is transitive
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
33
1 1 /9/2022
3.If R is the relation on the set of positive integers such that(a,b) ∈R if and
only if 𝑎 2 + 𝑏 is even , Prove that R is an equivalence relation.
Solution
(i)𝑎 2 + 𝑎 =a(a+1)=even, since a and (a+1) are consecutive integers.
i.e.,aRa.
∴R is reflexive.
(ii)when aRb,that is 𝑎 2 + 𝑏 is even, a and b must be both even or both odd.
In either case, 𝑏 2 + 𝑎 is also even.
i.e.,bRa.
∴R is symmetric
(iii)when a,b,c are even, 𝑎 2 + 𝑏 and 𝑏 2 + 𝑐 are even, Also 𝑎 2 + 𝑐 is even
when a,b,c are odd, 𝑎 2 + 𝑏 and 𝑏 2 + 𝑐 are even, Also 𝑎 2 + 𝑐 is even
Then aRb and bRc implies that aRc.
∴R is transitive
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
34
1 1 /9/2022
4.If R is the relation on the set of integers such that (a,b) ∈R if and only if
3a+4b=7n for some integer n, Prove that R is an equivalence relation.
Solution
(i) 3a+4a=7a, when a is an integer
i.e.,aRa .
∴R is reflexive
(ii) when aRb, 3a+4b=7n
Now,
3b+4a=7a+7b-(3a+4b)
=7a+7b-7n
=7(a+b-n), where (a+b-n) is an integer
i.e.,bRa.
∴R is symmetric
(iii)when aRb and bRc, we have 3a+4b=7m and 3b+4c=7n
⟹3a+4b+3b+4c=7m+7n
⟹3a+7b+4c=7m+7n
⟹3a+4c=7m+7n-7b =7(m+n-b)
where (m+n-b) is an integer.i.e.,aRc
∴R is transitive
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
35
1 1 /9/2022
Poset
Definition
A set A together with a partial order relation R is called a Partially ordered set
or Poset.
Example:
The set of integers under the relation “greater than or equal to”(≥) is a
Partially
ordered set. i.e.,(Z,≥) is a Poset.
In other words, the zero-one matrix 𝑀𝑅 has a ‘1’ in its (i-j)th position when 𝑎𝑖
is related to 𝑏𝑗 and a ‘0’ in this position when 𝑎𝑖 is not related by 𝑏𝑗.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
36
1 1 /9/2022
Example:
If A= 𝑎1 , 𝑎2 , 𝑎3 and B= 𝑏1 , 𝑏2 , 𝑏3 , 𝑏4 and
R={ 𝑎1 , 𝑏2 𝑎2 , 𝑏1 𝑎2 , 𝑏3 𝑎2 , 𝑏4 𝑎3 , 𝑏2 𝑎3 , 𝑏4
then the matrix of R is given by
Conversely,
if R is the relation on A={1,3,4} represented by
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
37
1 1 /9/2022
Definition:
If R and S are relations on a set A, represented by 𝑀𝑅 and 𝑀𝑠 respectively
then
1. 𝑀𝑅∪𝑠 = 𝑀𝑅 ⋁𝑀𝑠 (where the operation ′⋁′ is called join )
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
38
1 1 /9/2022
Example:
If R and S are relations on a set A, represented by the matrices 𝑀𝑅
and 𝑀𝑠 as follows:
and
Then
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
39
1 1 /9/2022
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
40
1 1 /9/2022
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
41
1 1 /9/2022
Example:
Let us Construct the Hasse diagram for the partial ordering{(a,b)|𝑎 ≤ 𝑏}on the
set{1,2,3,4}starting from its digraph.
4 4 4 4
3 3 3 3
2 2 2 2
1 1 1 1
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
42
1 1 /9/2022
If there exists an element a∈P such that b≤a for all b∈P ,then ‘a’ is called the
greatest member of P.
Similarly if there exists an element a∈P such that a≤b for all b∈P, then ‘a’ is
called the least member of P.
Note :
❑ The maximal and minimal, the greatest and least members of a poset can be
easily identified using the Hasse diagram of the poset. They are the top and
bottom elements in the diagram.
❑ A Poset can have more than one maximal member and more than one minimal
member, whereas the greatest and least members, when they exist, are unique.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
43
1 1 /9/2022
Example:
c b c
c
b
a b a b a a
From the above figure, in(1) a,b are minimal elements and d, e are maximal elements.
In(2), a,b are minimal elements and d is the greatest element(also the only maximal
element).In (3), a is the least element and c,d are maximal elements. In(4) a is the least
element and d is the greatest element.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
44
1 1 /9/2022
Definitions:
When A is a subset of a poset (P, ≤) and if u is an element of P such
that a≤ u, for all a∈A,Then u is called an upper bound of A.
Similarly an element l ∈P is called a lower bound of A, if for all a∈A, l ≤ a.
Note:
1.The upper and lower bounds of a subset of a Poset are not necessarily
unique.
2.The LUB and GLB of a subset of a poset, if they exist are unique.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
45
1 1 /9/2022
Examples:
1. Let x={2,3,6,12,24,36} and the relation ‘≤’ be such that x ≤ y if x divides y. Draw the
Hasse diagram of (x, ≤).
24 36
12
2 3
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
46
1 1 /9/2022
2. Draw the Hasse diagram representing the partial ordering{(A,B)|A⊆ 𝐵} on the power set
P(S), where S={a,b,c}.
Hasse diagram:
{a,b,c}
{a,c}
{a,b}
{b,c}
{c}
{a} {b}
{∅}
From the fig,{a,b,c} is the greatest element {∅} is the least element of the poset.
The only upper bound of the subset ({a},{b},{c}) is {a,b,c} and hence the LUB of the subset.
Note:
{a,b} is not an upper bound of the subset, as it is not related to {c},similarly{a,c} and {b,c}
are not upper bounds of the given subset. The only lower bound of the
subset({a,b},{a,c},{b,c}) is {∅} and hence GLB of the given subset.
1 1 /9/2022
3. Draw the Digraph representing the partial ordering P={(a,b)| a divides b} on the set
8
6
Digraph:
5 7
4 3
4
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
48
1 1 /9/2022
Deleting all the loops at the vertices, deleting all the edges occurring due to transitivity,
arranging all the edges to point upward and deleting all arrows, we get the corresponding
Hasse diagram as given below.
8 6
5
4 3 7
1
Hasse Diagram
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
49
1 1 /9/2022
Practice Problems:
1.Draw the Hasse diagram representing the Partial ordering P={(a,b)|a
divides b} on the set{1,2,3,4,6,8,12} starting form the digraph of P
2.Draw the Hasse diagram for the divisibility relation on
{2,4,5,10,12,20,25}starting from the digraph.
3.Draw the Hasse diagram for the less than or equal to relation on
{0,2,5,10,11,15}starting from the digraph.
4.For the poset[{3,5,9,15,24,45};divisor of],find (a) the maximal and minimal
elements (b)the greatest and the least element (c) the upper bounds and LUB
of {3,5} (d) the lower bounds and GLB of {15,45}.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
50
1 1 /9/2022
Closures of Relations
Closures of Relations
Definition:
If R is a relation on a set A. If R does not possess a particular property, we can find
the smallest relation R1 on A so that R1 possess the desired property and contains R. This R1
is called the Closure of R.
1 1 /9/2022
Problem 1:
= { (1,1),(1,2),(2,1),(2,3),(3,2),(3,4),(4,3)}
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
52
1 1 /9/2022
Warshall’s Algorithm :
Let us assume W0 = M R
Step 2: List the locations p1, p2, …in column K of WK-1 where the entry is 1 and the
locations of q1, q2,…in row K of WK-1 where the entry is 1.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
53
1 1 /9/2022
1 1 /9/2022
3. 1,2 4 (1,4),(2,4) 1 1 1 1
1 1 1 1
W3 =
0 0 0 1
0 0 0 0
4. 1,2,3 - - 1 1 1 1
1 1 1 1
W4 =
0 0 0 1
0 0 0 0
So the Transitive closure of R is given by
R = (1,1), (1,2), (1,3), (1,4), (2,1), (2,2), (2,3), (2,4), (3,4).
1 0 0 1
0 1 0 1
Problem 2: Find the transitive closure of M R =
0 0 0 1
0 0 0 1
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
55
1 1 /9/2022
1 1 /9/2022
3. - - - 1 0 0 1
0 1 0 1
W3 =
0 0 0 1
0 0 0 1
4. 1,2,3,4 4 (1,4),(2,4),(3,4),(4,4) 1 0 0 1
0 1 0 1
W3 =
0 0 0 1
0 0 0 1
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
57
1 1 /9/2022
Functions
Functions
Introduction:
Function is a special kind of relation. If a relation f from X to Y is also said to be a
function, the domain of f must be equal to X and if ( x, y ) f and ( x, z ) f , then y must be
equal to z.
Definition:
A relation f from a set X to another set Y is called a function if for every x X there is a
unique y Y such that ( x, y ) f .It is represented as f : X → Y or X ⎯
⎯→f
Y . The term
“function” is also sometimes called as “transformation”, “mapping” or “correspondence”.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
58
1 1 /9/2022
Types of functions:
(i) A function f : X → Y is called one-to-one (1-1) (or) injective (or) injection , if
distinct elements of X are mapped into distinct elements of Y. In another words, f
is 1-1 if and only if f ( x1 ) = f ( x2 ) whenever x1 = x2 (or) f ( x1 ) f ( x2 )
whenever x1 x2 .
(ii) A function f : X → Y is onto (or) surjective (or) surjection if and only if for
every element y Y there is an element x X such that f ( x) = y .
(iii) A function f is called one to one onto (or) bijective (or) bijection (or) 1-1
correspondence if it is both 1-1 and onto.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
59
1 1 /9/2022
Problem1:
If f : Z + → Z + and is given by f ( x ) = 3 x , verify if the function is bijective?
Solution:
(i) f is 1-1 if and only if f ( x1 ) = f ( x2 ) whenever x1 = x2 .
If f ( x ) = f ( y ) then we have 3 x = 3 y . So x = y . Hence the function is 1-1.
(ii) f is onto if and only if for every element y Y there is an element x X such
that f ( x) = y
Let 5 Z + . Now 3 x = 5 x = 5 / 3 Z + . So f is not onto.
(iii) Since f is 1-1 but not onto it is not bijective.
Problem 2:
If f : Z → Z and is given by f ( x ) = x + 5 , verify if the function is bijective?
Solution:
(i) f is 1-1 if and only if f ( x1 ) = f ( x2 ) whenever x1 = x2 .
If f ( x ) = f ( y ) then we have x + 5 = y + 5 . So x = y . Hence the function is 1-1.
(ii) f is onto if and only if for every element y Y there is an element x X such
that f ( x) = y
Let y = f ( x) = x + 5 . Now x = y − 5 Z . So f is onto.
(iii) Since f is 1-1 and onto it is bijective.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
60
1 1 /9/2022
( g f )( x) = g ( f ( x)), x A .
(ii) The function f : A → A where f ( x) = x , where x A is called the identity
function on A, denoted by I A .
(iii) If f : A → B and g : B → A , then the function g is called the inverse of the
function f, if g f = I A and f g = I B .
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
61
1 1 /9/2022
Properties of function
Property: 1
Composition of functions is associative.(i.e) if f : A → B , g : B → C and
h : C → D then , h ( g f ) = (h g ) f
Proof
Given f : A → B and g : B → C . Let x A, y B, z C so that f : A → B implies
y = f (x) and g : B → C implies z = g ( y ) .
h ( g f )( x) = h ( g( f ( x)) = h g( y) = h( g( y)) = h( z) and
(h g) f ( x) = (h g)( f ( x)) = (h g)( y) = h( g( y)) = h( z) .
Hence h ( g f ) = (h g ) f .
Property: 2
When f : A → B and g : B → C are functions then g f : A → C is an
Injection, surjection or bijection according as f and g are injection, surjection
or bijection.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
62
1 1 /9/2022
Proof
(i) Let a1 , a2 A . Then to prove g f is 1-1 .
( g f )(a1 ) = ( g f )(a2 )
g ( f (a1 )) = g ( f (a2 )) (as g is injective)
f (a1 ) = f (a2 ) (as f is injective)
a1 = a2 . Hence 1-1.
(ii) To prove g f is surjective:
Let c C . Since g is onto, there is an element b B such that c = g (b) .
Since f is onto , there is an element a A such that b = f (a) .
Now ( g f )( a) = ( g ( f (a)) = g (b) = c . This implies for every element c C ,
there is an element a A such that ( g f )( a) = c . So g f : A → C is onto.
(iii)From (i) and (ii), it is clear that g f : A → C is bijective if f and g are bijective.
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
63
1 1 /9/2022
Property: 3
The necessary and sufficient condition for the function f : A → B to be invertible
is that f is 1-1 and onto.
Proof
case(i) : if f is invertible , then to prove f is 1-1 and onto.
(a) To prove f is 1-1
Let f : A → B be invertible. Then there exists a unique function g : B → A such
that g f = I A and f g = I B ……(1)
Now,
f (a1 ) = f (a 2 )
g ( f (a1 )) = g ( f (a 2 ))
g f (a1 ) = g f (a 2 )
a1 = a2 ( using (1))
So it is clear that f is 1-1
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
64
1 1 /9/2022
1 1 /9/2022
Property: 4
The inverse of a function f, if it exists, is unique.
Proof
Let h and g be the inverses of f. (i.e) if f : A → B then g : B → A and also h : B → A .
By definition g f = I A , h f = I A and f g = I B , f h = I B
Now h = h I B = h ( f g ) = (h f ) g = I A g = g
So h = g .
Property: 5
If f : A → B , g : B → C are invertible (inverse exists) functions, then g f : A → C
is also invertible and ( g f ) −1 = f −1
g −1 .
Proof:
Given f and g are 1-1 and onto. So g f is also bijective. g f is invertible.
Since f : A → B and g : B → C , we have f −1
: B → A and g −1 : C → B .
For any a A , let b = f (a ) and c = g (b ) .
f −1
(b) = a, g −1 (c) = b .
( g f )( a ) = g ( f ( a )) = g (b) = c
a = ( g f ) −1 (c) …..(1)
And ( f −1
g −1 )(c) = f −1
( g −1 (c)) = f −1
(b) = a
a =(f −1
g −1
)(c) …..(2)
From (1) and (2) ( g f ) −1 = f −1
g −1
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
66
1 1 /9/2022
Problem 1 :
2 x − 1 if x 0
If f : Z → N 0 defined by f ( x) = ,
− 2 x if x 0
(a) Prove that f is 1-1 and onto. (b) Determine f-1.
Solution:
(a) Let x1 , x2 Z and f ( x1 ) = f ( x2 ) . Then either f ( x1 ) and f ( x2 ) are both odd or both
even. (Because an odd number cannot be equal to an even number).
If they are both odd, then
2x1 − 1 = 2x2 − 1 x1 = x2
If they are both even, then
− 2x1 = −2x2 x1 = x2 .
Thus if f ( x1 ) = f ( x2 ) then we get x1 = x2 . So f is 1-1.
y +1
Let y N . If y is odd, then its pre image is since
2
y + 1 y + 1 y +1
f = 2 − 1 = y (as 0) .
2 2 2
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
67
1 1 /9/2022
y − y − y y
If y is even, then its pre image is − since f = −2 = y (as − 0) .
2 2 2 2
y +1 y
Thus for any y N , the pre image is Z or − Z . Hence f(x) is onto.
2 2
Consequently f is invertible.
2 x − 1, x 0
(a) Let y = f ( x) =
− 2 x , x 0
y +1
, y = 1,3,5...
Then f −1 ( y ) = x = 2
− y , y = 0,2,4,...
2
x +1
, x = 1,3,5...
Or f −1 ( x) = 2
− x , x = 0,2,4,...
2
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
68
1 1 /9/2022
Problem 2:
Solution:
( f g )( 2) = f ( g (2)) = f (2) = 1
( f g )( 4) = f ( g (4)) = f (3) = 9
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
69
1 1 /9/2022
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
70
1 1 /9/2022
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
71
1 1 /9/2022
Problem 3:
If S={1,2,3,4,5} and if the functions f ,g, and h are from S → S and are given by
f= { (1,2),(2,1),(3,4),(4,5),(5,3) }
g= { (1,3), (2,5),(3,1),(4,2),(5,4) }
h= { (1,2),(2,2,),(3,4),(4,3),(5,1) }
(a) Verify if g f = f g
(b) Explain why f and g have inverses but h does not.
(c) Find f-1 and g-1.
(d) Show that ( f g ) −1 = g −1 f −1
f −1
g −1
Solution:
(a)
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
72
1 1 /9/2022
So h has no inverse.
(b) f −1
= (2,1), (1,2), (4,3), (5,4), (3,5)
g −1 = (3,1), (5,2), (1,3), (2,4), (4,5)
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
73
1 1 /9/2022
Problem 4:
1
If f , g , h : R → R defined by f ( x) = x 3 − 4 x , g ( x ) = , h( x) = x 4 , verify if
x +1
2
x + 1 x +1
1
( g h)( x) = g (h( x)) = g ( x 4 ) =
x8 + 1
3
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.
74
1 1 /9/2022
Thank you
Dr.J.Uma and Dr.E.Sujatha, Assistant Professors, Department of Mathematics, SRM Institute of Science and Technology,
Kattankulathur.