4th Sem 2022 Scheme
4th Sem 2022 Scheme
Let R be the relationfrom A to B so that R is a subset of AxB. Let mij = (ai,bj) and assign the values
1 or 0 according the following rule
1 if (ai , a j )∈ R
mij =
0 if (a , a )∉ R
i j
The mxn matrix formed by mij’s is called the matrix of the relation R, or the relation matrix R,
and is denoted by MR or M(R). Since M(R) contains only 0 and 1 as its elements M(R) is also
called the Zero – one matrix for R.
Let R be a relation on a finite set A. Then R can be represented pictorially with arrows and the
elements within the circle, is called Directed graph of R or Digraph of R
Problems
1. Let A = {1,2,3,4} and let R be the relation on A defined by xRy if and only if “x divides y”
Solution:
1 1 1 1
0 1 0 1
M (R ) =
0 0 1 0
0 0 0 1
Solution:
AxA = {(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)}
The digraph of R is
Vertices 1 2 3 4
In-degree 4 3 2 1
Out-degree 1 2 3 4
1 0 0 0
1 1 0 0
M (R ) =
1 1 1 0
1 1 1 1
Solution:
Rc is the converse of R
Solution:
R∩S = {(3,1)}
COMPOSITION OF RELATION
RοR = R2 = {(1,1),(1,3),(1,2),(1,4),(3,2)}
R2οR = R3 = {(1,1),(1,3),(1,2),(1,4)}
SοS= S2 = {(3,3),(3,4),(3,1)}
S2οS = S3 = {(3,3),(3,4),(3,1)}
1 1 1 0 0
0 0 0 1 1
0 0 0 0 1
0 0 0 0 0
0 0 0 0 0 --------------------------------------- (1)
R2 = {(a,a),(a,b),(a,c),(b,d),(b,e),(c,e)}
M(R2) = 1 1 0 0
1 ---------(2)
0 0 0 1 1
0 0 0 0 1
0 0 0 0 0
0 0 0 0 0
1 1 1 0 0 0 1 1
0 0 0 1 0 0 1 0
MR = MS =
0 1 0 0 1 0 0 0
0 0 0 0 1 0 0 0
R = {(1,1),(1,2),(1,3),(2,4),(3,2)}
S = {(1,3),(1,4),(2,3),(3,1),(4,1)}
RοS = {(1,3),(1,4),(1,1),(2,1),(3,3)}
Matrix of RοS = 1 0 1 1
1 0 0 0
0 0 1 0
0 0 0 0
Matrix of SοR = 0 1 0 0
0 1 0 0
1 1 1 0
1 1 1 0
5. Let A = {1,2,3,4}, B = {w,x,y,z} and C={5,6,7}. Also the relations R1,R2 and R3 are defined as
R1={(1,x),(2,x),(3,y),(3,z)}, R2={(w,5),(x,6)} and R3 = {(w,5),(w,6)}. Find R1οR2, R1οR3,
M(R1), M(R2) and M(R1οR2). Also verify that M(R1οR2) = M(R1).M(R2)
Solution:
R1={(1,x),(2,x),(3,y),(3,z)}, R2={(w,5),(x,6)}
R1οR2 = {(1,6),(2,6)}
R1={(1,x),(2,x),(3,y),(3,z)},R3 = {(w,5),(w,6)}
R1οR3 = Φ
M(R1) = 0 1 0 0
0 1 0 0
0 0 1 1
0 0 0 0
1
0 0 0 1 0
M(R2) = οR2) =
M(R1
0
1 0 0 1 0
0
0 0 0 0 0
0
0 0 0 0 0
0 1 0 0 1 0 0
M(R1).M(R2) = 0 1 0 0 0 1 0
0 0 1 1 0 0 0
0 0 0 0 0 0 0
0 1 0
= = M(R1οR2)
0 1 0
0 0 0
0 0 0
PROPERTIES OF RELATIONS
RELATION
If A and B are sets, a relation from A to B is any subset of AXB. Subsets of AXA are called relations on A.
REFLEXIVE
Example:
Let A = {1,2,3}
R = {(1,1),(2,2),(3,3)}
IRREFLEXIVE
Example:
Let A = {1,2,3}
R = {(1,3),(2,1),(3,2)}
SYMMETRIC
Example:
Let A = {1,2,3}
R = {(1,2),(2,1),(3,2),(2,3)}
TRANSITIVE
Example:
Let A = {1,2,3}
R = {(1,3),(3,2),(1,2)}
ANTISYMMETRIC
Given a relation R on a set A is called antisymmetric if for all a,b∈A,aRb and bRa⇒a=b.
R1 = {(1,1),(1,2),(2,1),(2,2),(3,3),(3,4), (4,3),(4,4)}
R2 = {(1,2),(1,3),(3,1),(1,1),(3,3),(3,2), (1,4), (4,2),(3,4)}
Equivalence Relation
A relation R on a set is said to be an equivalence relation on A if (i)R is reflexive (ii) R is symmetric (iii) R is
transitive , on A.
Solution:
∴R is reflexive relation.
Next, we note that (1,2),(2,1) and (3,4),(4,3)∈R. That is whenever (a,b)∈R then (b,a)∈R for a,b∈A
∴R is symmetry relation.
Finally, (1,2),(2,1),(1,1)∈R,
(2,1),(1,2),(2,2)∈R,
(4,3),(3,4),(4,4)∈R,
∴R is transitive relation.
2. Let A = {1,2,3,4,5,6, 7,8,9, 10, 11, 12}. On this set define the relation R by (x,y)∈R iff x – y is
multiple of 5.verify R is an equivalence relation.
Equivalence Classes
Let R be an equivalence relation on a set A and a∈A. Then the set of all those elements x of A which are
related to a by R is called equivalence class of a with respect to R. This equivalence class is denoted by
R(a) or [a], or a
=[a]
a = R(a) = {x∈A | (x,a)∈R}
Example
Let A be a nonempty set. Suppose there exists nonempty subsets A1,A2,……,Ak, o A such that the
following two conditions hold:
Any two of the subsets A1,A2,……,Ak are disjoint; i.e. Ai∩Aj = Φ for i≠j
1. For the equivalence relation R = {(1,1), (1,2), (2,1),(2,2), (3,4),(4,3),(3,3),(4,4)} defined on the
set A = {1,2,3,4}, determined the partion induced.
Solution:
2. Let A = {a,b,c,d,e}. Consider the partion P = {{a,b},{c,d},{e}} of A. Find the equivalence relation
inducing the partion.
Solution:
3. Let A = {1,2,3,4,5,6,7} and R be the equivalence relation on A that induces the partition A =
{1,2}∪{3}∪{4,5,7}∪{6}. Find R.
Solution:
R = {(1,1),(1,2),(2,1),(2,2),(3,3),(4,4),(4,5), (4,7),(5,5),(5,7),(5,4),(7,4),(7,5),(7,7),(6,6}}
Solution:
Let us consider (x1,y1),(x2,y2) and (x3,y3) ∈AxA. Suppose that (x1,y1)R(x2,y2) and
(x2,y2)R(x3,y3).Then x1+y1 = x2+y2 and x2+y2= x3+y3.This gives x1+y1 = x3+y3 which means
(x1,y1)R(x3,y3). ∴R is transitive.
We note that
[(1,3)] = {(x,y)∈AxA|(x,y)R(1,3)}
= {(x,y)∈AxA|x+y = 1+3}
Since A = {1,2,3,4,5}
[(1,1)] = {(1,1)}
To determine the partition induced by R, we have to find the equivalence classes of all elements
(x,y) of AxA with respect to R.
[(1,1)] = {(1,1)}
[(5,5)] = {(5,5)}
Thus, [(1,1)], [(1,2)], [(1,3)], [(1,4)], [(1,5)], [(2,5)], [(3,5)], [(4,5)], and [(5,5)] are the only distinct
equivalence classes of AxA with respect to R. Hence the partition of AxA induced by R is
represented byAxA = [(1,1)] ∪ [(1,2)] ∪ [(1,3)] ∪ [(1,4)] ∪ [(1,5)] ∪ [(2,5)] ∪ [(3,5)] ∪ [(4,5)]∪
[(5,5)]
Partial Orders
i. R is reflexive
iii. R is transitive, on A
Poset
A set A with a partial order R defined on it is called a partially ordered set or an ordered set or
poset and it denoted by the pair (A,R).
Example:
The relation < on the set of integers Z is not a poset (Z,<), because reflexive does not exist.
The relation > on the set of integers Z is not a poset (Z,>), because reflexive does not exist.
Total Order
Let R be a partial order on a set A. Then R is called a total order on A if for all x,y∈A, either xRy or
yRx. In this case, the poset (A,R) is called totally order set.
The totally ordered set is also called a linearly ordered set or chain.
Example:
The partial order relation ≤ is a totally order on the set R. Because, for any x,y∈R we have x ≤ y or
y ≤ x. Thus (R,≤) is a totally ordered set.
The partial order relation ≥ is a totally order on the set R. Because, for any x,y∈R we have x ≥ y
or y ≥ x. Thus (R,≥) is a totally ordered set.
Hasse Diagrams
Draw the diagraph in such a way that all edges point upward.
This diagraph is called poset diagram or the Hasse diagram for the partial order.
R for Hasse diagram is {(1,2), (1,3), (2,4), (3,4)} and the Hasse diagram is
2. Let A = {1,2,3,4,6,12}. On A, define the relation R by aRbiff a divides b. Prove that R is a partial
order on A. Draw the Hasse diagram for this relation.
Solution:
R = {(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)}
One can easily verify that R is a partial order.
R for Hasse diagram {(1,2),(1,3),(2,4),(2,6),(3,6),(3,12),(4,12),(6,12)} and the Hasse diagram is
3. Draw the Hasse diagram representing the positive divisors of 16.
Solution:
The divisors of 16 are A = {1,2,4,8,16}
R = {(1,1),(1,2),(1,4),(1,8),(1,16),(2,2),(2,4),(2,8),(2,16),(4,4),(4,8),(4,16), (8,8),(8,16),(16,16)}
R for the Hasse diagram is R = {(1,2),(2,4),(4,8),(8,16)} and the Hasse diagram is
1 0 1 1 1
0 1 1 1 1
0 0 1 1 1
0 0 0 1 0
0 0 0 0 1
5. The Hasse diagram of a partial order R on the set A = {1,2,3,4,5,6} is as given below. Write
down R as a subset of AxA. Construct its diagraph.
6. Determine the matrix of the partial order whose Hasse diagram is given below
Extermal elements in Posets
Consider a Poset (A,R). We define below some special elements called extremal elements that
may exist in A
Maximal Element
An element a∈A is called a maximal element of A if there exists no element x ≠ a in A such that
aRx.
In other words, a∈A is a maximal element of A if whenever there is x∈A such that aRx then x = a.
Minimal Element
An element a∈A is called a minimal element of A if there exists no element x ≠ a in A such that
xRa.
In other words, a∈A is a minimal element of A if whenever there is x∈A such that xRa then x = a.
In simple words
Greatest Element
Least Element
Example: In the following Hasse diagram let us find all extremal elements.
5 and 6 are maximal elements. Because no edge starts at 5 and 6.
No greatest element. Because no element has connection with all the elements.
Example: In the following Hasse diagram let us find all extremal elements.
5 is the greatest element. Because the element 5 has connection with all the elements.
Upper Bound
An element a∈A is called an upper bound of a subset B of A if xRa for all x∈B.
An element a∈A is called the least upper bound (LUB) of a subset B of A if the following two
conditions hold:
a is an upper bound of B
Lower Bound
An element a∈A is called a lower bound of a subset B of A if aRx for all x∈B.
An element a∈A is called the greatest lower bound (GLB) of a subset B of A if the following two
conditions hold:
a is an lower bound of B
Example:For the following Hasse diagram find the LUB and GLB for B1 and B2, where B1 = {1,2}
and B2 = {3,4,5}
The upper bound 3 is related to all other upper bounds 4,5,6,7,8. Hence 3 is the LUB of B1. We
write LUB(B1) = 3
In A, there is no element x such that xR1 and xR2. Therefore B1 has no lower bounds.
3,4 and 5 are related to 6,7,8. Hence 6,7,8 are upper bounds of B2 = {3,4,5}
For each x∈B2, we have 1Rx. Hence 1 is lower bound. Similarly 2 and 3 are lower bounds.
The lower bounds1 and 2 are related to the lower bound 3. Hence 3 is the GLB of B2. we write
GLB{B2} = 3.
Solution:
The elements a,b,c are related to f,g,h of B. Hence a,b,c are the lower bounds of B.
Solution:
All c,d,e of B are related to e,f,g. Hence e,f,g are upper bounds of B.
The upper bound e of B is related to the upper bounds f and g.
Theorem:If (A,R) is a poset and A is finite (nonempty), then A has at least one maximal element
and at least one minimal element.
Proof: Let a∈A. If a is not maximal. We can find an element x1∈A such that x1≠a and aRx1. If x1
is not maximal, we can find an element x2 ∈A such that x2 ≠ x1 and x1Rx2. Proceeding like this,
we end up with a finite chain of the form aRx1, x1Rx2, x2Rx3,………….Which cannot be extended
beyond a certain final stage because f is finite. Hence, we end up with some xk∈A which is a
maximal element of A. Thus, A has at least one maximal element.
Theorem:Every poset has at most one greatest element and at least one least element.
Proof:Assume that a and b are greatest elements of (A,R). Then since b is greatest element we
have aRb. Similarly, since a is greatest element we have bRa. Thus, aRb and bRa. Since R is an
antisymmetric relation, it follows that a = b. Thus, two greatest elements of (A,R), if such exists
cannot be different. If (A,R) has a greatest element, then that element is unique. Thus, (A,R) has
at most one greatest element.
A similar argument shows hat (A,R) has at most one least element.
Theorem:If (A,R) is a poset and B⊆A, then B has at most one LUB and at most one GLB.
Proof:Assume that a and b are two LUB’s of B. Then a and b are upper bounds of B. Since b is an
upper bound of B and a is LUB of B, we have aRb. Similarly, Since a is an upper bound of B and b
is LUB of B, we have bRa. Since R is antisymmetric it follows that a = b.Hence B cannot have two
distinct LUB’s. This means that B has at most one LUB.
Lattice
Let (A,R) be a poset. This poset is called lattice if, for all x,y∈A, the elements LUB{x,y} and
GLB{x,y} exist in A.
Example
Consider the set N of natural numbers, and R be the partial order “less than or equal to”. Then
for any x,y∈N, we note that LUB{x,y} = max{x,y} and GLB{x,y} = min{x,y} and both these belongs
to N. Therefore the poset (N,≤) is a lattice.