230 likes | 419 Views
Lecture 4: Relations I. Discrete Mathematical Structures: Theory and Applications. Learning Objectives. Learn about relations and their basic properties Explore equivalence relations Become aware of closures. Relations. Relations are a natural way to associate objects of various sets.
E N D
Lecture 4: Relations I Discrete Mathematical Structures: Theory and Applications
Learning Objectives • Learn about relations and their basic properties • Explore equivalence relations • Become aware of closures Discrete Mathematical Structures: Theory and Applications
Relations • Relations are a natural way to associate objects of various sets Discrete Mathematical Structures: Theory and Applications
Relations • R can be described in • Roster form • Set-builder form Discrete Mathematical Structures: Theory and Applications
Relations • Arrow Diagram • Write the elements of A in one column • Write the elements B in another column • Draw an arrow from an element, a, of A to an element, b, of B, if (a ,b) R • Here, A = {2,3,5} and B = {7,10,12,30} and R from A into B is definedas follows: For all a A and b B, a R b if and only if a divides b • The symbol → (called an arrow) represents the relationR Discrete Mathematical Structures: Theory and Applications
Relations Discrete Mathematical Structures: Theory and Applications
Relations • Directed Graph • Let R be a relation on a finite set A • Describe Rpictorially as follows: • For each element of A , draw a small or big dot and label the dot by the corresponding element of A • Draw an arrow from a dot labeleda , to another dot labeled, b , ifa R b . • Resulting pictorial representation ofR iscalled the directed graph representation of the relationR Discrete Mathematical Structures: Theory and Applications
Relations Discrete Mathematical Structures: Theory and Applications
Relations • Directed graph (Digraph) representation of R • Each dot is called a vertex • If a vertex is labeled,a, then it is also called vertexa • An arc from a vertex labeleda, to another vertex,b is called a directed edge, or directed arc froma tob • The ordered pair(A , R) a directed graph, or digraph, of the relationR, where each element of Ais a called a vertex of the digraph Discrete Mathematical Structures: Theory and Applications
Relations • Directed graph (Digraph) representation of R (Continued) • For verticesa and b , ifa R b, a is adjacent tob andb is adjacent froma • Because (a, a) R, an arc from a to a is drawn; because (a, b) R, an arc is drawn from a to b. Similarly, arcs are drawn from b to b, b to c , b to a, b to d, and c to d • For an element a A such that (a, a) R, a directed edge is drawn from a to a. Such a directed edge is called a loop at vertex a Discrete Mathematical Structures: Theory and Applications
Relations • Directed graph (Digraph) representation of R (Continued) • Position of each vertex is not important • In the digraph of a relationR, there is a directed edge or arc from a vertexa toa vertexb if and only ifa R b • Let A ={a ,b ,c ,d} and let R be the relation defined by the following set: R = {(a ,a ), (a ,b ), (b ,b ), (b ,c ), (b ,a ), (b ,d ), (c ,d )} Discrete Mathematical Structures: Theory and Applications
Relations • Domain and Range of the Relation • Let R be a relation from a set A into a set B. Then R ⊆ A x B. The elements of the relation R tell which element of A is R-related to which element of B Discrete Mathematical Structures: Theory and Applications
Relations Discrete Mathematical Structures: Theory and Applications
Relations Discrete Mathematical Structures: Theory and Applications
Relations Discrete Mathematical Structures: Theory and Applications
Relations • Let A = {1, 2, 3, 4} and B = {p, q, r}. Let R = {(1, q), (2, r ), (3, q), (4, p)}. Then R−1= {(q, 1), (r , 2), (q, 3), (p, 4)} • To find R−1, just reverse the directions of the arrows • D(R) = {1, 2, 3, 4} = Im(R−1), Im(R) = {p, q, r} = D(R−1) Discrete Mathematical Structures: Theory and Applications
Relations Discrete Mathematical Structures: Theory and Applications
Relations Discrete Mathematical Structures: Theory and Applications
Relations • Constructing New Relations from Existing Relations Discrete Mathematical Structures: Theory and Applications
Relations Discrete Mathematical Structures: Theory and Applications
Relations • Example: • Consider the relations R and S as given in Figure 3.7. • The composition S ◦ R is given by Figure 3.8. Discrete Mathematical Structures: Theory and Applications
Relations Discrete Mathematical Structures: Theory and Applications
Relations Discrete Mathematical Structures: Theory and Applications