Lecture 14
Lecture 14
INVERSE OF A RELATION
Let R be a relation from A to B. The inverse relation R -1 from B to A is
defined as:
R-1 = {(b,a) BA | (a,b) R}
More simply, the inverse relation R -1 of R is obtained by interchanging the
elements of all the ordered pairs in R.
EXAMPLE
Let A = {2, 3, 4} and B = {2,6,8} and let R be the “divides” relation from A
to B
i.e. for all (a,b) A B, a R b a | b (a divides b)
Then R = {(2,2), (2,6), (2,8), (3,6), (4,8)}
and R-1 = {(2,2), (6,2), (8,2), (6,3), (8,4)}
In words, R-1 may be defined as:
R
for all (b,a) B A, b R a b is a multiple of a.
The relation R = {(2,2), (2,6), (2,8), (3,6), (4,8)} is represented by the arrow
diagram.
2 2
3 6
4 8
A B 1
R-1
2 2
3 6
A 4 8 B
The relation R = {(2, 2), (2, 6), (2, 8), (3, 6), (4, 8)}from A = {2, 3,4} to B =
{2, 6, 8} is defined by the matrix M below:
2 6 8
2 1 1 1
M 3 0 1 0
4 0 0 1
2 3 4
2 1 0 0
M t 6 1 1 0
8 1 0 1
2
EXERCISE
SOLUTION (i)
Since R-1 consists of exactly those ordered pairs which are obtained by
interchanging the first and second element of ordered pairs in R,
therefore, if (a, a) R then (a, a) R-1.
Accordingly, a A, (a, a) R-1.
Hence R-1 is reflexive as well.
SOLUTION (ii)
Prove that if R is symmetric, then R-1 is symmetric.
Suppose that the relation R on A is symmetric.
Let (a, b) R-1 for a,b A.
By definition of R-1, (b, a) R.
Since R is symmetric, therefore (a, b) R.
But then by definition of R-1, (b, a) R-1. ***
We have thus shown that for all a, b A, if (a, b) R-1 then (b, a) R
3 -1.
Accordingly R-1 is symmetric.
SOLUTION (iii)
SOLUTION (iv)
EXERCISE
EXERCISE
Let
A = {a,b,c}, B = {1,2,3,4} and C={x,y,z}
Define R = {(a,1), (a,4), (b,3),(c,1), (c,4)} as a relation from A to B and
S = {(1,x),(2,x), (3,y), (3,z)} be a relation from B to C.
Then SoR is computed by using all ordered pairs in R and S such that the
second element in the ordered pair in R agrees with the first element of the
ordered pair in S, and then forming the resultant ordered pair.
For example we have first order pair in R is (a,1) now the second element of
the order pair is 1 and in the relation S there is only one order pair whose
first element is 1 which is (1,x) thus the order pair (a,x) will be in the
composition SoR. Now the second order pair in the relation R is (a,4) but
there is no order pair in S whose first element is 4 hence this order does not
play any role in the composition. Next b is related to 3 under R and 3 is
related to y and z in S hence b will be related to y and z in the composition.
Similarly for other order pairs.
Hence
SoR = {(a,x), (b,y), (b,z), (c,x)}
8
COMPOSITE RELATION FROM ARROW DIAGRAM
a 1
2 x
b y
c 3
4 z
C
B
A
SoR
a x
b y
c z
A C
9
MATRIX REPRESENTATION OF COMPOSITE RELATION
The matrix representation of the composite relation can be found using the
Boolean product of the matrices for the relations. Thus if M R and MS are the
matrices for relations R (from A to B) and S (from B to C), then
MSoR = MR OMS
is the matrix for the composite relation SoR from A to C.
NOTE
While computing the Boolean product of matrices, one
should recall the rules of Boolean addition and Boolean multiplication.
BOOLEAN BOOLEAN
ADDITION MULTIPLICATION
a. 1 + 1 = 1 a. 1 . 1 = 1
b. 1 + 0 = 1 b. 1 . 0 = 0
c. 0 + 0 = 0 c. 0 . 0 = 0
Note that in the Boolean algebra we have all the operations same
except that 1+1=1.
Now Boolean product of matrices is the same matrix multiplication of
the to matrices but using the Boolean product and Boolean sums.
That is we will multiply the corresponding entries of first row of the
first matrix to the second matrix and then add them under Boolean addition.
10
EXERCISE
Find the matrix representing the relations SoR and RoS where the matrices
representing R and S are
1 0 1 0 1 0
M R 1 1 0
and M S 0 0 1
0 0 0
1 0 1
SOLUTION
The matrix representation for SoR is
1 0 1 0 1 0
M SOR M R OM S 1 1 0 0 0 1
0 0 0 1 0 1
1 1 1
0 1 1
0 0 0
0 1 0 1 0 1
M ROS M S OM R 0 0 1 1 1 0
1 0 1 0 0 1
1 1 0
0 0 1
11
1 0 1
REMARK
EXERCISE
12