Discrete Mathematics Lecture # 16 Inverse of Relations.

Slides:



Advertisements
Similar presentations
Representing Relations
Advertisements

Reflexive example: AB = AB Symmetric example: AB = BA
Relations Relations on a Set. Properties of Relations.
CSE115/ENGR160 Discrete Mathematics 04/26/12 Ming-Hsuan Yang UC Merced 1.
Basic Properties of Relations
Discrete Structures Chapter 5 Relations Nurul Amelina Nasharuddin Multimedia Department.
CSE115/ENGR160 Discrete Mathematics 04/24/12 Ming-Hsuan Yang UC Merced 1.
Discrete Mathematics Lecture#11.
1 Section 7.1 Relations and their properties. 2 Binary relation A binary relation is a set of ordered pairs that expresses a relationship between elements.
1 Representing Relations Epp section ??? CS 202 Aaron Bloomfield.
Relations Chapter 9.
Chapter 9 1. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing.
Applied Discrete Mathematics Week 10: Equivalence Relations
1 Relations and Their Properties Epp, section ??? CS 202 Aaron Bloomfield.
Relations (1) Rosen 6 th ed., ch. 8. Binary Relations Let A, B be any two sets. A binary relation R from A to B, written (with signature) R:A↔B, is a.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Chapter 9. Section 9.1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and.
Digraphs and Relations Warm Up. The Divisibility Relation Let “|” be the binary relation on N×N such that a|b (“a divides b”) iff there is an n ∈ N such.
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
Discrete Mathematics Relation.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Sets and Subsets Set A set is a collection of well-defined objects (elements/members). The elements of the set are said to belong to (or be contained in)
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
Section 4.4 Properties of Relations. Order Relations Draw an arrow diagram for the relation R defined on the set {1,2,3,4} such that
CS 103 Discrete Structures Lecture 19 Relations. Chapter 9.
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
Relation. Combining Relations Because relations from A to B are subsets of A x B, two relations from A to B can be combined in any way two sets can be.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
UNIT - 2.  A binary operation on a set combines two elements of the set to produce another element of the set. a*b  G,  a, b  G e.g. +, -, ,  are.
Representing Relations Using Matrices A relation between finite sets can be represented using a zero-one matrix Suppose R is a relation from A = {a 1,
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
Matrices and Determinants
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and B = {a,b} {( 0, a), (
Discrete Mathematics 3. MATRICES, RELATIONS, AND FUNCTIONS Lecture 6 Dr.-Ing. Erwin Sitompul
Section 9.3. Section Summary Representing Relations using Matrices Representing Relations using Digraphs.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008.
Discrete Mathematics Lecture # 17 Function. Relations and Functions  A function F from a set X to a set Y is a relation from X to Y that satisfies the.
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
Discrete Mathematics Lecture # 13 Applications of Venn Diagram.
Chapter8 Relations 8.1: Relations and their properties.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
Discrete Mathematical
Relations and Their Properties
Relations.
Unit-III Algebraic Structures
Relations Chapter 9.
Lecture # 14 Types of Relations
Representing Relations
Dr. Ameria Eldosoky Discrete mathematics
CSE115/ENGR160 Discrete Mathematics 04/28/11
CSNB 143 Discrete Mathematical Structures
Chapter 3 Relation and Function Homework 4 For each of the following relations on set A = { 1,2,3,4 }, check each of them whether they are reflexive, irreflexive,
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 9 Relations Slides are adopted from.
Applied Discrete Mathematics Week 9: Equivalence Relations
Chapter 2 Sets Homework 3 Given U = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } as a set universe and the sets : A = { 1, 2, 3, 4, 5 }, B = { 4, 5, 6, 7 }, C = { 5,
Relations and Their Properties
8.1 Relations and Their Properties
Applied Discrete Mathematics Week 5: Boolean Algebra
Relations and their Properties
CSE 321 Discrete Structures
Properties of Relations
9.5 Equivalence Relations
Basics of Relations.
Agenda Lecture Content: Relations (Relasi)
Lecture # 16 Inverse of Relations
Presentation transcript:

Discrete Mathematics Lecture # 16 Inverse of Relations

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.

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.

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.

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

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:

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.

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.

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.

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.

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.

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

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)

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.

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}

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)}

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

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

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

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.

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}

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)}

Composite Relation of Arrow Diagram

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.

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.

Rules for Boolean Operations BOOLEAN ADDITIONBOOLEAN MULTIPLICATION = = = = = = 0

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

Solution The matrix representation for SoR is

Solution The matrix representation for RoS is

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.