2. Relations
2. Relations
Relations
•If we want to describe a relationship between elements of two sets A
and B, we can use ordered pairs.
•An ordered pair is commonly known as a point, has two components
which are the x and y coordinates with their first element taken from
set A and their second element taken from set B.
•The ordering of the two components is important
•This is an example of an ordered pair.
Cartesian Product:
Let A and B be two sets, then the set of all order pairs (a, b), where
a A and b B is called the Cartesian product or Cross product of A
and B.
Example: Let A={1,0,-1} and B={2,3} find out AB and BA
AB={ (1,2),(1,3),(0,2),(0,3),(-1,2),(-1,3)}
BA={ (2,1),(2,0),(2,-1),(3,1),(3,0),(3,-1)}
Sol:
The set of all relations from set A to set B is precisely the set of all
subsets of AB.
Therefore, the number of relations from A to B is equal to the
number of subsets of AB.
Sol:
23m =4096
23m = 212
bases are equal on both sides , hence powers are also equal.
3m=12
m=4, hence |A|=4
Problem-3: Let A={1,2,3} and B={2,4,5} determine the
following.
• |AB|
• Number of relations from A to B.
• Number of binary relations on A.
1. Intersection:
Let A and B be two sets. Let R and S be the two relations from
set A to set B.
The intersection of two relations from set A to Set B is
represented by R ∩ S is defined as
R ∩ S={(a , b) A x B / (a, b) R and (a, b) S } R
∩ S is the intersection of relations R and S
a (R ∩ S) b ≡ a R b a S b
OPERATIONS ON RELATIONS
2.Union:
Let A and B be two sets. Let R and S be the two
relations from set A to set B.
The union of two relations from set A to Set B is
represented by R U S is defined as
R U S={(a , b) A x B / (a, b) R or (a, b) S }
R U S is the union of relations R and S
a (R U S) b ≡ a R b a S b
OPERATIONS ON RELATIONS
3.Difference:
Let A and B be two sets. Let R and S be the two relations from
set A to set B.
The difference of two relations from set A to Set B is
represented by R - S is defined as
R - S={(a , b) A x B / (a, b) R but (a, b) S }
R - S is the difference of relations R and S
a (R - S) b ≡ a R b a S b
OPERATIONS ON RELATIONS
4. Complement:
Let A and B be two sets. Let R be a relation from set A to set B.
The complement of a relation R from set A to Set B is represented
by Rc is defined as
Rc ={(a , b) AxB / (a, b) ∉ R}
Rc is complement of a relation R a (Rc)
b≡ aRb
OPERATIONS ON RELATIONS
5.Composition:
Let A,B and C be three sets Let R be a relation from
set A to set B and S be a relation from set B to set C.
The composite or R and S is the relation consisting
of order pairs (a,c) where a A and c C and for
which there exist an element b B such that (a,b) R
and (b,c) S.
The composition of R and S denoted by R o S
OPERATIONS ON RELATIONS
Sol: relation R satisfy the reflexive property if (a, a)R for every
element a A.
(1,1),(2,2),(3,3),(4,4) R
from the above example, relation R does not satisfy Irreflexive
property,
if (a, a)R for every element a A. (1,1),(2,2),(3,3),(4,4) R
Symmetric Property
A relation R on a set A is called symmetric if whenever (a, b)R then
(b, a)R for all a, b A.
Sol: if whenever (a, b)R and (b, c)R, then (a, c)R for a, b, c A.
if (1,2),(2,1) R then (1,1) ∉ R,
If (4,2),(2,4) R then (4,4) ∉ R,
If (1,2),(2,4) R then (1,4) ∉ R,
Antisymmetric:
if a = b whenever (a, b)ÎR and (b, a)ÎR and
if a ≠ b whenever (a, b)ÎR and (b, a) ∉ R
2 4
1 3 3≤4
2≤3 3
1
2 2≤3
1≤2 2
1≤2 1≤2
1
1
Example-2: Let P={ 1,2,3,4 } and if R is a relation on the set A defined by x
R y if x divides y. Draw the Hasse diagram.
Sol: from the definition of R, we have
R={( x, y)| x, y P and x divides y}
={(1,1),(1,2),(1,3),(1,4),(2,2),(2,4),(3,3),(4,4)}
1 2
1 divides 2
1 4
2 divides 4
2 3
2 3
1 divides 2 1 divides 3 1 divides 3
1 1 divides 2
1
Example-3: Let P={ 2,3,6,12,24,36 } and R be the relation such that
x R y if x divides y, then the Hasse diagram is
12
2 3 6 6 divides 12
2 divides 6 6
3 divides 6 2 3 3 divides 6
2 3
24 36
24
12 divides 36 12 divides 24
12 divides 24
12
12
6 divides 12
6 divides 12
6 3 divides 6
2 divides 6 6
2 divides 6 3 divides 6
2 3
2 3
Example-4: Let P={ 1,2,3,4,6,12 } and if R is a relation on the set A defined by x
R y if x divides y. Prove that R is a partial order on P. Draw the Hasse diagram
for this relation.
Sol: from the definition of R, we note that R={( x,y)| x, y P and x divides y}
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)}
Reflexive: Evidently, ( a, a) R for all a P
(1,1),(2,2),(3,),(4,4),(6,6),(12,12) R Therefore relation R is Reflexive.
Antisymmetric: for all a, b P, if a divides b and b divides a, then a=b. for all
a, b P, if a divides b and b does not divides a, then a ≠ b Hence R is
Antisymmetric
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)}
Therefore R satisfies the Antisymmetric property
Transitive: for all a, b, c P, if a divides b and b divides c, then a divides c
i.e., if ( a, b) R and ( b, c) R then ( a, c) R
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)}
Therefore R satisfies the Transitive property.
Relation R satisfies Reflexive, Antisymmetric and Transitive properties on set P.
Hence relation R is partial order relation on set P
Hasse Diagram is:
2 2 3
1
1 divides 2 1 divides 2 1 divides 3
1 1
4 4 6
2 divides 4 2 divides 4 3 divides 6
2 3 2 divides 6
2 3
1 divides 2 1 divides 3 1 divides 2 1 divides 3
1
1
12
4 divides 12 6 divides 12
4 6
2 divides 4 3 divides 6
2 divides 6
2 3
1 divides 2 1 divides 3
1
Example-5: Let P={ 1,2,3,4,6,8,12} and R be the partial ordering relation on
set P such that x R y if x divides y. Draw the Hasse diagram.
Sol: from the definition of R, we note that R={( x, y)| x, y P and x divides y}
R={(1,1),(1,2),(1,3),(1,4),(1,6),(1,8),(1,12),(2,2),(2,4),(2,6),(2,8),
(2,12),(3,3),(3,6),(3,12),(4,4),(4,8),(4,12),(6,6),(6,12),(8,8),(12,12)}
8 12
4 divides
4 divides 8
12 6 divides 12
4 6
2 divides 4 3 divides 6
2 3
1 divides 2 1 divides 3
1
Example-6: Draw the Hasse diagram representing the
positive divisors of 36.
Sol: The set of all positive divisors of 36 is: D36={1,2,3,4,6,9,12,18,36}
The relation R of divisibility(a R b if and only if a divides b) is a partial
order on the set D36.
The relation R(divisibility) contains the following order pairs.
R={(1,1),(1,2),(1,3),(1,40,(1,6),(1,9),(1,12),(1,18),(1,36),(2,2)(2,4),(2,6),
(2,12),(2,18),(2,36),(3,3),(3,6),(3,9),(3,12),(3,18),(3,36),((4,4),4,12),
(4,36),(6,6),(6,12),(6,36),,(9,9),(9,18),(9,36),(12,12),(12,36),(18,18),
(18,36),(36,36)}
Relation R(divisibility) satisfies reflexive, Antisymmetric, Transitive
properties by observing the above order pairs. Hence, relation R is Partial
order relation on D36
36
12 divides 36 18 divides 36
12 18
6 divides 12 9 divides 18
4 divides 12
6 divides 18
4 6 9
3 divides 6
2 divides 4 2 divides 6 3 divides 9
2 3
1 divides 2 1 divides 3
1
Example-7: Consider the partial order of divisibility on the set A.
Draw the Hasse diagram for theposet and determine whether the
poset is totally order or not.
i. A={ 1,2,3,5,6,10,15,30}
ii. A={ 2,4,8,16,32}
30 32
16
6 10 15
8
2 3 5
4
1
2
By examining the above Hasse diagrams, we find that the given relation is totally ordered in
case (ii), but is not totally ordered in case (i)
TERMINOLOGY RELATED TO POSETS
Maximal member :Let (P, ≤) is a poset, an element aP is called a
maximal member of P, if there is no element b P such that a<b(a
strictly precedes b).
Minimal member :Let (P, ≤) is a poset, An element aP is called a
minimal member of P, if there is no element b P such that b<a(a
strictly precedes b).
Greatest member :Let (P, ≤) is a poset, if there exist an element
aP such that b ≤ a for all b P, then a is called the greatest
member of the poset.
Least member:Let (P, ≤) is a poset, if there exist an element aP
such that a ≤ b for all b P, then a is called the greatest member of
the poset.
Example:
d e d c d d
b
b c
c c
a
a b a
a b
*Let Us Consider The Hasse Diagrams Of Four Posets, Given In The Above
Fig.
For FIG-1, a and b are minimal elements and d and e are the maximal elements
For FIG-2, a and b are minimal elements and d is the greatest element or
maximal elements. There is no least element.
For FIG-3, a is the least element or minimal element and c and d are the
maximal elements. There is no greatest element.
For FIG-4, a is the least element and d is the greatest element.
• A minimal member need not be unique. All those members which appear at
the lowest level of a Hasse diagram of a poset are minimal members.
• In the below Hasse diagram, it contains one maximal member and two
minimal members .