Composition and Closures of Relations
COMPOSITION OF
RELATIONS
If
R is a relation from set A to set B and S is relation from set B to set C then
the composition of R and S denoted by R◦S.
R◦S={(a,c)|there exists some b∈B for which (a,b) ∈R and (b,c) ∈S}
For the relation R◦S, the domain is a subset of R and the range is a subset of
S
Example
Let R={(1,1),(1,3),(3,2),(3,4),(4,2)} and
S={(2,1),(3,3),(3,4),(4,1)}
R◦S={(1,3),(1,4),((3,1),(4,1)}
S◦R={(2,1),(2,3),(3,2),(3,4),(4,1),(4,3)}
R◦R={(1,1),(1,3),(1,2),(1,4),(3,2)}
S◦S={(3,3),(3,4),(3,1)}
(R◦S)◦R={(1,2),(1,4),(3,1),(3,3),(4,1),(4,3)}
R3=R◦R◦R=(R◦R)◦R=R◦(R◦R)
={(1,1),(1,3),(1,2),(1,4)}
CLOSURES
OF RELATIONS
Definition
The closure of a relation R with respect
to property P is the relation obtained by adding the minimum number of ordered
pairs to R to obtain property P.
In terms of the digraph representation
of R
1. To find the reflexive closure – add
loops
2. To find the symmetric closure – add
arcs in the opposite direction
3. To find the transitive closure – if
there is a path from a to b and b to c, add an arc from a to c
Reflexive
Closure
Let R be a relation on A. The reflexive closure of R, denoted r(R) is RU∆A
Add loops to all vertices on the digraph
representation of R
Put 1’s on the diagonal elements of the
matrix of R
Let A be a set and let ∆A ={(a,a)|a∈R}
∆A is called the diagonal (or
the equality) relation on A
Example
If R is the relation on a set
A={1,2,3} defined by (a,b)∈R if
a<b, where a,b∈A, then R={(1,2),(1,3),(2,3)}.
The
reflexive closure of R=r(R)=RU∆A
∆A={(1,1), (2,2),(3,3)}
RU∆A ={(1,1), (1,2),(1,3),(2,2),(2,3),(3,3)}
Symmetric
Closure
Let R be a relation on A. The symmetric
closure of R, denoted s(R) is RUR-1
The inverse of R is the relation R-1={(b,a)|(a,b) ∈R}
Note:
To get R-1
Reverse all the arcs in the digraph representation of R
Take the transpose MTof the matrix M of R
Example
If R is the relation on a set
A={1,2,3} defined by (a,b) ∈ R if a<b, where a,b∈A, then R={(1,2),(1,3),(2,3)}.
The symmetric closure of R=s(R)=RUR-1
R-1={(2,1),(3,1),(3,2)}
RUR-1={(1,2),(1,3),(2,1),(2,3),(3,1),(3,2)}
Transitive
Closure
The transitive closure of a relation R,
t(R), is the smallest transitive relation containing R.
R is transitive iff Rn is
contained in R from all n
Hence, if there is a path from x to y
and y to z then there must be an arc from x to z, or (x,z) ∈R
The connectivity relation or the star
closure of the relation R, denoted R*
which
is equal to R*=RUR2U………URn
Example
Consider the relation
R={(1,2),(2,3),(3,3)} on A={1,2,3}.
R2=R◦R={(1,2),(2,3),(3,3)} ◦ {(1,2),(2,3),(3,3)}
={(1,3),(2,3),(3,3)}
R3=R2◦R={(1,3),(2,3),(3,3)}
The transitive closure of a relation R=t(R)= {(1,2),(1,3),(2,3),(3,3)}
Comments
Post a Comment