Escolar Documentos
Profissional Documentos
Cultura Documentos
RELATIONS
A relation is a relationship
between two sets.
A x B = {(a,b) | a A b B}
R AxB
1
EXAMPLE I
RELATION
If (a,b) R, we say that a is
related to b.
aRb
Otherwise
a NR b
3
EXAMPLE II
EXAMPLE III
X = {2,3,4}
Y = {3,4,5,6,7}
Define a relation R from X to Y
such that
(x,y) R if x divides y
R = {(2,4),(2,6),(3,3),(3,6),(4,4)}
A = {1,2,3,4,}
B = {1,3,4,5}
Define a relation (a R b) R on A
such that a < b.
R = {(1,3), (1,4), (1,5), (2,3), (2,4),
(2,5), (3,4), (3,5), (4,5)}
Domain = {1,2,3,4} Range = {3,4,5}
Domain = {2,3,4}
Range = {3,4,6}
Relations on a Set I
Range of R
{y Y | (x,y) R for some x X}
7
Relations on a Set II
10
Relations on a Set IV
512
How many relations are there on
a set with n elements?
12
Properties of relations I
a (a,a) R
13
R1 = {(1,1),(1,2),(2,1),(2,2),(4,4)}
R2 = {(1,1),(2,2),(3,3),(1,2),(2,1)}
R3 = {(1,1),(2,2),(3,3),(4,4)}
R4 = {(1,1),(2,2),(3,3),(4,4),(4,3)}
R5 = {(1,1),(2,1),(3,1),(4,1)}
R6 = {(3,4)}
Which of these are reflexive?
14
15
16
Properties of relations II
b (a,b) R
(b,a) R
a b (a,b) R
(b,a) R a = b
17
18
Symmetric relations
R1 = {(1,1),(1,2),(2,1),(2,2),(2,4)}
R2 = {(1,1),(2,2),(3,3),(1,2),(2,1)}
R3 = {(1,1),(2,2),(3,3),(4,4)}
R4 = {(1,1),(2,2),(3,3),(4,4),(4,3)}
R5 = {(1,1),(2,1),(3,1),(4,1)}
R6 = {(3,4)}
Which of these are symmetric?
20
Symmetric relations
Antisymmetric relations
Antisymmetric relations
R1 = {(1,1),(1,2),(2,1),(2,2),(4,4)}
R2 = {(1,1),(2,2),(3,3),(1,2),(2,1)}
R3 = {(1,1),(2,2),(3,3),(4,4)}
R4 = {(1,1),(2,2),(3,3),(4,4),(4,3)}
R5 = {(1,1),(2,1),(3,1),(4,1)}
R6 = {(3,4)}
Which of these are antisymmetric?
22
Antisymmetric relations
R3, R4, R5 and R6 are antisymmetric.
For each of these relations, there is no pair
of elements a and b with a b such that
(a,b) and (b,a) are both in the relation.
Verify that none of the other relations is
antisymmetric. This is done by finding a
pair (a,b) with a b such that (a,b) and (b,a)
are both in the relation.
A relation R on a set X is
called antisymmetric
if for all x,y X, if(x,y) R and
x y, then (y,x) R
23
24
25
Properties of relations IV
26
Transitive Relations
Consider the following relations on {1,2,3,4}
A relation R on a set X is
called transitive if whenever
(a,b) R and (b,c) R, then
(a,c) R, for all a,b,c A.
a b c((a,b) R
(b,c) R (a,c) R
27
R1 = {(1,1),(1,2),(2,1),(2,2),(3,4),(4,1)}
R2 = {(1,1),(1,2),(2,1)}
R3 = {(1,1),(1,2),(1,4),(2,4),(4,1)}
R4 = {(2,1),(3,1),(3,2),(4,1),(4,2),(4,3)}
R5 = {(1,1), (1,2), (1,3), (1,4), (2,2), (2,3),
(2,4), (3,3), (3,4), (4,4)}
R6 = {(3,4)}
Which of these are transitive?
28
Transitive Relations
Transitive Relations
29
Combining Relations
30
Combining Relations
32
Composite Relations
Composite Relations
34
Composite Relations
Let P be a relation from set A to set B.
And Q be a relation from B to set C.
The composite of P and Q is the relation
consisting of ordered pairs (a,c), where a
A, c C, and for which there exists an
element b (b B) such that (a,b) P and
(b,c) Q.
We denote the composite of P and Q by
PoQ.
35
Inverse of a relation
Representing relations using
matrices
Representing relations using
directed graphs
Closures of relations
36