UNIT_2 Relations and Functions_PART-1
UNIT_2 Relations and Functions_PART-1
invertible functions, Floor and ceiling functions, Sterling number of second kind.
Cartesian product of sets
Let A and B be two sets. Then the set of all ordered pairs , where
and , is called the cartesian product or cross product of A and B and is
denoted by . Thus,
It is noted that the product set is not same as the product set .
That is, .
In general,
Example: If and , then
and
Evidently .
Note:
i. If A and B are finite sets with and , then is a finite set with .
1. Let and . Write the following:
.
Solution: By using the definition,
.
2. Let and . Write the following: , .
Solution:
3. Let and . Write the following:
,,.
Solution: We have,
i)
iii) and
}
4. For non-empty sets A, B, C prove that,
i)
ii)
iii)
iv)
v)
Solution:
(i)
.
This proves that .
(ii)
.
This proves that
(iii)
.
This proves that
(iv)
.
This proves that .
(v)
.
This proves that
Relations:
Let and be two sets. Then a subset of is called a binary relation or relation from
to .
If , we say that “ a is related to b by R” and is denoted by .
Example: Let . Let .
Evidently, is a subset of . As such, is a relation form to , and . This relation can
be depicted in a diagram as shown below,
Example 2: Consider the sets and .
Solution: and .
Then and are subsets of and are therefore relations from to . We observe that
consists of elements for which the relationship holds. Hence, is read as “a is
less than b”.
Further, consists of elements for which the relationship holds. Hence, is read
as “a is greater than b”.
Example: If is a set with elements and is a set with elements, find the
number of relations from to .
Solution: Since a relation from to is a subset of , the set of all relations from to is
the same as the set of all subsets of . Therefore, the number of relations from to is
equal to the number of subsets of .
.
.
3. Let and . Determine the following:
a) .
b) Number of relations from to .
c) Number of binary relations on .
Solution: Given, , .
a) .
b) Number of relations from to is .
c) Number of binary relations on is .
4. Let and be the relation on defined by if and only if is a multiple of . Write
down as a set of ordered pairs.
Solution: Given
5. Let , let be a relation on defined as a if .
Solution: .
Clearly, .
and
.
6. Let and and the relation
. Find the domain and range of .
Solution:
and
.
Matrix of a Relation:
Let and be any two finite sets. Let be relation form to then the matrix of the
relation is defined as the matrix, where
The rows of corresponds to the elements of A and the columns to the elements
of B
Example 1:Let and and the relation
Solution:
5.Let and are relations on defined as follows.
i. if and only if .
ii. if and only if
iii. if and only if is odd and is even.
Write down these relations as sets of ordered pairs and corresponding matrix
Solution:
i. iff
ii) if and only if
1. Draw a small circle for each element of and label the circles with
the corresponding element of . These circles are called “Vertices”.
Solution: Digraph:
Digraph:
Elements In degree Out degree
1 4
1 0 1
2 1 1
3 0 0
2 3 4 1 0
3. Let and let be the relation on defined on defined by if and only of “
divides ”.
a) Write down as set of ordered pairs.
b) Draw the digraph of .
c) Determine the in – degree and out – degree of the vertices in the digraph.
Solution: We have
a)
2.Determine the relation from a set to set as described by the following matrix:
.
3. Let and be a relation on whose matrix is given below. Determine and also
draw the associated digraph.
.
4. Find the relation represented by the digraph given below. Also, write down its
matrix.
5. For the digraph in figure below represents a relation on . Determine as well
as its associated relation Matrix and list the in – degree and out – degree of all
vertices.
b d c
e f
Operations on Relations:
Union and intersection of Relations
Given the relations and from a set to a set . The union of and denoted by , is
defined as a relation from to with the property that , if and only if or .
Similarly, intersection of and denoted by , is defined as a relation from to with
the property that if and only if and .
Complement of a Relation:
Given a relation from a set to a set , the complement of , denoted by is defined
as a relation from to with the property that if and only if .
In other words, is the complement of in the universal set .
Converse of a Relation:
Note: .
Examples:
1. Consider the sets and and the relations and from to . Determine , , ,, and .
Solution: .
Therefore,
=
2. Let and . The relations and from to are represented by the following
matrices. Determine the relations , , and and their matrix representations.
Solution: We have
By examining and we note that,
The matrix representations of the above relations are,
Composition of Relations:
Consider a relation from a set to a set and a relation from the set to a set ,
with these relations we can define a new relation called the product or the
composition of and , from the set to set denoted by .
is defined as is ‘a’ is in and ‘c’ is in , then if and only if there is some ‘b’ in
such that and .
That is,
(ii)
(iii)
(iv)
3. Let and and
be relations on . Find , , . Write down their matrices.
Solution:
(ii)
(iii)
(iv)
Exercise:
1. Let and and be relations on whose matrices are as given below: , . Find the
composite relations .
2. Let and and are relations on defined by and . Find . Write down their
matrices.
Properties of a relation:
1. Reflexive: A relation is said to be reflexive if . That is .
That is , where .
4. Anti – symmetric relation: A relation is said to be anti – symmetric if and . That is, and .
Example:let and
is symmetric, since .
Example:let and
is not – symmetric, since .
3. Anti – Symmetric Relation:
Let be a relation on a set . Then “ is anti – symmetric” if .
Example:let and
is anti – symmetric, since and .
Example:let and
is not anti – symmetric, since but .
4. Transitive Relation:
Let be a relation on a set . Then “ is transitive” if whenever .
6. Equivalence relation:
A relation on a set is called an equivalence relation, if is reflexive,
symmetric and transitive.
Example: Let .Determine the nature of the following relations on A:
2 3
1
Example-2:
Let R be a relation on the set A={1, 2, 3, 4} defined by xRy if and only if x divides y. Prove that (A, R)
is a poset. Draw its Hasse diagram.
Solution: From the definition of R, we have
𝑅 = {(𝑥, 𝑦) / 𝑥, 𝑦 ∈ 𝐴 𝑎𝑛𝑑 𝑥 𝑑𝑖𝑣𝑖𝑑𝑒𝑠 𝑦} = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4,4)}
We observe that (𝑎, 𝑎) ∈ 𝑅 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑎 ∈ 𝐴. Hence R is reflexive on A. We verify that the elements of R are
such that if (𝑎, 𝑏) ∈ 𝑅 𝑎𝑛𝑑 𝑎 ≠ 𝑏,𝑡ℎ𝑒𝑛 (𝑏, 𝑎) ∉ 𝑅.That is if x divides y and y divides x, then x=y.
Therefore, R is antisymmetric on A. Further, we check that the elements of R such that if ( 𝑎, 𝑏) ∈ 𝑅 𝑎𝑛𝑑
(𝑏, 𝑐) ∈ 𝑅 𝑡ℎ𝑒𝑛 (𝑎, 𝑐) ∈ 𝑅. Therefore, A is transitive on A. Thus R is reflexive, antisymmetric and
transitive. Hence R is a partial order on A; that is, (A, R) is a POSET. The Hasse diagram for R is as shown
below
Example:
Let A={1, 2, 3, 4, 6, 12 }. On A, define the relation R by aRb if and only if a divides b . Prove
that R is a partial order on A. Draw the Hasse diagram for this relation.
Solution: From the definition of R, we note that 𝑅 = {( 𝑎, 𝑏) / 𝑎, 𝑏 ∈ 𝐴 𝑎𝑛𝑑 𝑎 𝑑𝑖𝑣𝑖𝑑𝑒𝑠 𝑏} = {(1,
1), (1, 2), (1, 3), (1, 4), (1, 6), (1, 12), (2, 2), (2, 4), (2,6), (2, 12), (3, 3), (3, 6), (3,12), (4,4), (4,12),
(6, 6), (6, 12), (12, 12).}
We observe that (𝑎, 𝑎) ∈ 𝑅 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑎 ∈ 𝐴. Hence R is reflexive on A. We verify that the elements of
R are such that if (𝑎, 𝑏) ∈ 𝑅 𝑎𝑛𝑑 𝑎 ≠ 𝑏,𝑡ℎ𝑒𝑛 (𝑏, 𝑎) ∉ 𝑅. That is for all 𝑎, 𝑏 ∈ 𝐴, if a divides b
and b divides a, then a=b. Therefore, R is antisymmetric on A.
Further, we check that the elements of R such that if ( 𝑎, 𝑏) ∈ 𝑅 𝑎𝑛𝑑 ( 𝑏, 𝑐) ∈ 𝑅 𝑡ℎ𝑒𝑛 ( 𝑎, 𝑐) ∈ 𝑅.
Therefore, R is transitive on A. Thus R is reflexive, antisymmetric and transitive. Hence R is a
partial order on A; that is, (A, R) is a poset. The Hasse diagram for R is as shown below.
Example-4:Draw the Hasse diagram representing the positive divisors of 36.
Solution: The set of all positive divisors of 36 is 𝐷36 = {1, 2, 3, 4, 6, 9, 12, 18, 36}
The relation R of divisibility (that is, aRb if and only if a divides b) is a partial order on this set.
The Hasse diagram for this partial order is required here. We note that, under R,
1 is related to all elements of 𝐷36,
2 is related to 2, 4, 6, 12, 18, 36;
3 is related to 3, 6, 9, 12, 18, 36;
4 is related to 4, 12, 36;
6 is related to 6, 12, 18, 36;
9 is related to 9, 18, 36;
12 is related to 12 and 36;
18 is related to 18 and 36;
36 is related to 36.
The Hasse diagram for R must exhibit all of the above facts. The
diagram is as shown below:
Extremal elements in Posets.
Consider a poset (A,R). we define below some special elements(called extremal elements) that may
exist in A.
• An element is called a maximal elementof A if there exists no element in A such that . In other
words, is a maximal element of A if whenever there is x is such that aRx then x=a. This means that a
is a maximal element of A if (and only if ) in the Hasse diagram of R no edge starts at a.
• An element is called a minimal elementof A if there exists no element in A such that . In other
words, is a minimal element of A if whenever there is x is such that xRa then x=a. This means that a
is a minimal element of A if (and only if ) in the Hasse diagram of R no edge terminates at a.
• An element is called a greatest elementof A if xRa for all
• An element is called a least elementof A if aRx for all
• An element is called an Upper bound of a subset B of A if xRa for all
• An element is called a Lower bound of a subset B of A if aRx for all
• An element is called the Least upper bound(LUB) of a subset B of A if the
following two conditions hold:
(i) a is an upper bound of B. (ii) If is an upper bound of B, then
Least upper bound is also called Supremum, written as
• An element is called the Greatest lower bound(GLB) of a subset B of A if the
following two conditions hold:
(i) a is a lower bound of B. (ii) If is a lower bound of B, then
Greatest lower bound is also called Infimum, written as
Note:
• A greatest element is maximal, but a maximal element need not be a greatest element.
• Similarly, a least element is minimal, but a minimal element need not be a least element.
• Every finite subset of a totally ordered set has both a least element and a greatest element.
• A partially ordered set can have at most one greatest element and one least element, but it may have more
than one maximal or minimal element.
Example 1: Consider the Hasse diagram of a poset (A, R) given below.
Find maximal, minimal, greatest and least element.
(i) All of c, d, e which are in B are related to f, g, h. therefore, f, g, h are upper bounds of B.
(ii)The elements a, b and c are related to all of c, d, e which are in B. Therefore a, b, and c are lower
bounds of B.
(iii)The upper bound of of B is related to the other upper bounds g and h of B. Therefore, is the LUB
of B.
(iv)The lower bounds a and b of B are related to the lower bound c of B. Therefore, c is the GLB of B.
Example 4: Consider the poset whose Hasse diagram is shown below. Find LUB and
GLB of B={c, d, e}.
Solution: By examining all upward paths from c, d, e in the given Hasse diagram, we
find that LUB(B)=e.
By examining all upward paths to c, d, e we find that GLB(B)=a.
Example 5: Consider the set A={1, 2, 3, 4, 5, 6, 7, 8} and a partial order
on A whose Hasse diagram is as shown in Fig (a). Consider the subsets
B1= {1, 2} and B2={3, 4, 5} of A shown in (b) and (c).