Relations 2022
Relations 2022
Cartesian Product
Definition 1: The cartesian product of
two
sets A and B, denoted by a bB
A xAB, is the
set of
all ordered pairs (a,b) with and
A B a,b |a A and b B
Thus
2
A
A x A is denoted by ■
Cartesian Product
Definition 2: The cartesian product
of “n” setsA1 , A2 ,...An consists of all
possible n – tuples a1 ,a2 ,...an
where ai Ai for every i; it is
denoted by
A1 A2 ...An ■
Binary Relation
Definition 3: A binary relation
R
from a set A to a set B is a
subset of R A B
AxB:
R 2, 2 , 2, 4 , 2, 6 , 3,3, 3, 6 ,
Then
dom R 2,3 , range R 2,3, 4, 6
Examples
2) A={Tom, Dick, Harry},
B={Amy, Betsy, Carol, Daisy};
R a, b A B | a is married to b
Let
R = { (Tom, Daisy), (Dick, Carol),
(Harry, Amy)}.
Examples
3) A 1,3,5, 7 , B 2, 4, 6 ,
R a, b | a b 9
R 3, 6 , 5, 4 , 7, 2
4) Relation
R x, y | x 2 y 2 9
is the circle with center at the origin
and radius 3
Representation by
Graphs
1) 2 2 2) Tom Amy
3 3 Dick Betsy
5 4 Harry Carol
6 Daisy
7
Definition 4: A directed graph G is the
ordered
pair G=(V,E) of two sets: a nonempty finite
set V,
Representation by
Graphs
5)
A 1, 2,3, 4 , R a, b | a, b A; a b
R 1, 2 , 1,3, 1, 4 , 2,3, 2, 4 , 3, 4
1 2 4
3
Representation by
Matrices
Relation 1):
R 2, 2 , 2, 4 , 2, 6 , 3,3 , 3, 6 ,
Relation 3): A, B 2 3 4 6 7
R 3, 6 , 5, 4 , 7, 2 2 1 0 1 1 0
3 0 1 0 1 0
A, B 2 4 6
5 0 0 0 0 0
1 0 0 0
3 0 0 1
5 0 1 0
7 1 0 0
Function as Relation
Definition 5: For nonempty sets A and
B,
a relation f from A to B which
satisfies the
if a, b f and a, c f , then b c
condition:
R) 1 a S) 1 a
2 b 2 b
3 c 3 c
T) 1 a U) 1 a
2 b 2 b
3 c 3 c
Functions
Definition 6: A function is
called range f
one-to-one, if each element of
a , a R for every a A
2) A relation R on a set A is symmetric
if b, a Rwhenever
a, b
: R
a, b R b, a R
Relation on a set A
3) A relation R on a set A is
antisymmetric if a, b R
band
,a R a b
only if
a, b R and a b b, a :
R
4) A relation R on a set aA, b
is R
transitive if whenever
b, c R
and
a, c R
Equivalence Relation
Definition 8: A relation on a set is an
equivalence relation if it is reflexive,
symmetric, and transitive ■
Examples:
1) The relation: …has the same color
hair as… on the set of people is
reflexive,
symmetric, and transitive. So it is an
equivalence relation.
Equivalence Relation
2) Let A denote a set of all words.
Define a relation
R a, b A | a b
2
x a
If
then
a
x is a representative
of
Equivalence Class
Example:
A 1, 2,1 2, 2 2
R a, b A | a b Z
2
1 2 1, 2 ,
1 2 2 2 1 2, 2 2
A 1 1 2
Partition of a set
Definition 10: P A1 , A2 ,..., An
be a partition of a set A if:
1) A , A A, i 1, 2..., n;
i i
n
2) A Ai ;
i 1
3) Ai Aj , i j ■
Partition of a set
Teorem 1. Let R be an equivalence
relation on a set A. Then the set of
distinct equivalence classes forms a
partition of A.
A2 A4
A1 A6
A3 A5
Partition of a set
Example: Find all equivalence classes
of
the congruence relation mod 4 on the
set Rof a, b Z 2 | a b mod 4
integers:
0 ... 12, 8, 4, 0, 4,8,12,... ;
1 ... 11, 7, 3,1,5,9,13,... ;
2 ... 10, 6, 2, 2, 6,10,14,... ;
3 ... 9, 5, 1,3, 7,11,15,... .
Closures of Relation
Definition 11: Let R is a relation
without
property P (reflexive, symmetric,
transitive or equivalence). If there
R is
aS
relation S with property P such that