Digraphs and Types of Relations
Digraphs and Types of Relations
BXB = {(a, a), (a, b), (a, c), (b, a), (b, b), (b, c), (c, a), (c, b), (c, c)}
and the restriction of R to B is {(a, a), (a, c), (b, c)}.
1
2 Paths in relation
Suppose that R is a relation on a set A. A path of length n in R from a to b is a finite
sequence π : a, x1 , x2 , ....., xn−1 , b, beginning with a and ending b, such that
aRx1 , x1 Rx2 , ......., xn−1 Rb.
A path that begins and ends at the same vertex is called a cycle.
If we have aRb and bRc then there exists a path of length two from a to b and it is represented
by aR2 b.
We have MR2 = MR ⊙ MR
where MR is the matrix for relation R and MR2 for R2 .
R∞ = R ∪ R2 ∪ R3 ∪ .......Rn−1
MR∞ = MR ∨ MR2 ∨ MR3 ∨ ........
3 Types of Relations
3.1 Reflexive and Irreflexive Relations
A relation R on a set A is reflexive if (a, a) ∈ A, that is, if aRa for all a ∈ A. A relation R
on a set A is irreflexive if (a, a) ∈/ R for every a ∈ A.
Examples:
A = {1, 2, 3}, R = {(1, 1), (1, 2)} in this R is neither reflexive nor irreflexive.
A = {}, R = φ in this R is irreflexive.
We can identify a reflexive or irreflexive relation by its matrix as follows. The matrix of
a reflexive relation must have all 1’s on it’s main diagonal, while the matrix of an irreflexive
relation must have all 0’s on its main diagonal.
Similarly, we can characterize the digraph of a reflexive or irreflexive relation as follows. A
reflexive relation has a cycle of length 1 at every vertex, while an irreflexive relation has no
cycles of length 1.
2
(c) Antisymmetric relation satisfies the property that if i 6= j , then mij = 0 or mji = 0.
A relation R is transitive if and only if its matrix MR = [mij ] has the property:
if mij = 1 and mjk = 1, then mik = 1.
In more simple words, if (MR )2⊙ = MR , then R is transitive. The converse is not true.
Example:
Let A = {1, 2, 3} and let R be the relation on A whose matrix is
1 1 1
0 0 1
0 0 1
By direct computation, (MR )2⊙ = MR ; therefore, R is transitive.