Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Mathematics Lecture # 16 Inverse of Relations.

Similar presentations


Presentation on theme: "Discrete Mathematics Lecture # 16 Inverse of Relations."— Presentation transcript:

1 Discrete Mathematics Lecture # 16 Inverse of Relations

2 Inverse of 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)  B  A | (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.

3 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:  for all (b,a)  B  A, b R a  b is a multiple of a.

4 Arrow Diagram of an Inverse Relation The relation R = {(2,2), (2,6), (2,8), (3,6), (4,8)} is represented by the arrow diagram.

5 Arrow Diagram of an Inverse Relation  Then inverse of the above relation can be obtained simply changing the directions of the arrows and hence the diagram is

6 Matrix Representation of Inverse Relation  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:

7 Exercise  Let R be a binary relation on a set A. Prove that:  If R is reflexive, then R -1 is reflexive.  If R is symmetric, then R -1 is symmetric.  If R is transitive, then R -1 is transitive.  If R is antisymmetric, then R -1 is antisymmetric.

8 Solution  If R is reflexive, then R -1 is reflexive.  Suppose that the relation R on A is reflexive.   a  A, (a, a)  R.  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.

9 Solution  If R is symmetric, then R -1 is symmetric.  We will take (a, b)  R -1 and we will show that (b, a)  R -1  Let (a, b)  R -1 for a,b  A. , (b, a)  R. (By definition of R -1 )  Since R is symmetric, therefore  (a, b)  R.  b, a)  R -1. (By definition of R -1 )  Accordingly R -1 is symmetric.

10 Solution  If R is transitive, then R -1 is transitive.  Let (a, b)  R -1 and (b, c)  R -1.  (b, a)  R and (c, b)  R. (by definition of R -1 )  Now R is transitive, therefore  (c, b)  R and (b, a)  R then (c, a)  R.  (a, c)  R -1 (by definition of R -1 )  for all a, b, c  A, if (a, b)  R -1 and (b, c)  R - 1 then (a, c)  R -1.  R -1 is taransitive.

11 Solution  if R is anti-symmetric. Then R -1 is anti- symmetric.  Let (a,b)  R -1 and (b,a)  R -1  (b,a)  R and (a,b)  R. (by definition of R -1 )  we have to show that a=b.  R is anti-symmetric.  (a,b)  R and (b,a)  R then a = b. Thus  (a,b)  R -1 and (b,a)  R -1 then a=b.  Accordingly R -1 is antisymmetric.

12 Exercise  Show that the relation R on a set A is symmetric if, and only if, R= R -1.

13 Solution  Suppose the relation R on A is symmetric.  To prove R = R -1  Let (a,b)  R.  Since R is symmetric, so  (b,a)  R.  if (b,a)  R then (a,b)  R -1. (by definition of R -1 )  Since (a,b) is an arbitrary element of R, so  R  R -1 …………(1)  Next, let (c,d)  R -1. By definition of R -1 (d,c)  R. Since R is symmetric,  so (c,d)  R. Thus we have shown that if (c,d)  R -1 then (c,d)  R.Hence  R -1  R…………..(2)

14 Solution  By (1) and (2) it follows that R= R -1.  Conversely  suppose R = R -1.  We have to show that R is symmetric. Let (a,b)  R.  Now by definition of R -1 (b,a)  R -1.Since R = R -1, so (b,a)  R -1 = R  Thus we have shown that if (a,b)  R then (b,a)  R  Accordingly R is symmetric.

15 Complementry Relation  Let R be a relation from a set A to a set B. The complementry relation R of R is the set of all those ordered pairs in A  B that do not belong to R.  Symbolically:  = A  B - R = {(a,b)  A  B| (a,b)  R}

16 Example  Let A = {1,2,3}and  R = {(1,1), (1,3), (2,2), (2,3), (3,1)}  be a relation on A  Then  = {(1,2), (2,1), (3,2), (3,3)}

17 Exercise  Let R be the relation R = {(a,b)| a<b} on the set of integers. Find 1. Comp(R) 2. R -1

18 Solution  a) = Z  Z - R = {(a,b)| a < b}  = {(a,b)| a  b}   b)R -1 = {(a,b) | a > b}

19 Exercise Let R be a relation on a set A. Prove that R is reflexive.  SOLUTION:  Suppose R is reflexive. Then by definition, for all a  A, (a,a)  R  But then by definition of the complementry relation (a,a) ,  a  A.  Accordingly is irreflexive.  Conversely  if is irreflexive, then (a,a) ,  a  A.  Hence by definition of, it follows that (a,a)  R,  a  A  Accordingly R is reflexive. ve iff is irreflexive

20 Exercise Suppose that R is a symmetric relation on a set A. Is also symmetric.  SOLUTION :  Let (a,b) . Then by definition of, (a,b)  R. Since R is symmetric, so  if (a,b)  R then (b,a)  R.  {for (b,a)  R and (a,b)  R will contradict the symmetry property of R}  ow (b,a)  R  (b,a) .Hence if (a,b)  then (b,a)   Thus is also symmetric.

21 Composite Relation  Let R be a relation from a set A to a set B and S a relation from B to a set C. The composite of R and S denoted SoR is the relation from A to C, consisting of ordered pairs (a,c) where a  A, c  C, and for which there exists an element b  B such that (a,b)  R and (b,c)  S.  Symbolically:  SoR = {(a,c)|a  A, c  C,  b  B, (a,b)  R and (b,c)  S}

22 Example  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.  Hence  SoR = {(a,x), (b,y), (b,z), (c,x)}

23 Composite Relation of Arrow Diagram

24 Let A = {a,b,c},B = {1,2,3,4}and C = {x,y,z}. Define relation R from A to B and S from B to C by the following arrow diagram.

25 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 MR and MS are the matrices for relations R (from A to B) and S (from B to C), then  M SoR = M R OM S  is the matrix for the composite relation SoR from A to C.

26 Rules for Boolean Operations BOOLEAN ADDITIONBOOLEAN MULTIPLICATION 1 + 1 = 11. 1 = 1 1 + 0 = 11. 0 = 0 0 + 0 = 00. 0 = 0

27 Exercise Find the matrix representing the relations SoR and RoS where the matrices representing R and S are

28 Solution The matrix representation for SoR is

29 Solution The matrix representation for RoS is

30 Exercise Let R and S be reflexive relations on a set A. Prove SoR is reflexive.  SOLUTION:  Since R and S are reflexive relations on A, so   a  A, (a,a)  R and (a,a)  S  and by definition of the composite relation SoR, it is clear that  (a,a)  SoR  a  A.  Accordingly SoR is also reflexive flexive.


Download ppt "Discrete Mathematics Lecture # 16 Inverse of Relations."

Similar presentations


Ads by Google