Beruflich Dokumente
Kultur Dokumente
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
Relations
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 defined as follows: For all a A and b B, a R b if and only if a divides b
Relations
Relations
Directed Graph
Let R be a relation on a finite set A Describe R pictorially 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 labeled a , to another dot labeled, b , if a R b .
Resulting pictorial representation of R is called the directed graph representation of the relation R
Discrete Mathematical Structures: Theory and Applications
Relations
Relations
Directed graph (Digraph) representation of R
Each dot is called a vertex If a vertex is labeled, a, then it is also called vertex
a
An arc from a vertex labeled a, to another vertex, b is called a directed edge, or directed arc from a to b
The ordered pair (A , R) a directed graph, or digraph, of the relation R, where each element of A is a called a vertex of the digraph
Relations
Directed graph (Digraph) representation of R (Continued)
For vertices a and b , if a R b, a is adjacent to b and b is adjacent from a
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
10
Relations
Directed graph (Digraph) representation of R (Continued)
Position of each vertex is not important
In the digraph of a relation R, there is a directed edge or arc from a vertex a to a vertex b if and only if a 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
11
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
12
Relations
13
Relations
14
Relations
15
Relations
Let A = {1, 2, 3, 4} and B = {p, q, r}. Let R = {(1, q), (2, r ), (3, q), (4, p)}. Then R1 = {(q, 1), (r , 2), (q, 3), (p, 4)}
To find R1, just reverse the directions of the arrows D(R) = {1, 2, 3, 4} = Im(R1), Im(R) = {p, q, r} = D(R1)
16
Relations
17
Relations
18
Relations
Constructing New Relations from Existing Relations
19
Relations
20
Relations
Example: Consider the relations R and S as given in Figure 3.7. The composition S R is given by Figure 3.8.
21
Relations
22
Relations
23
Relations
24
Relations
25
Relations
26
Relations
27
Relations
Example 3.1.26 continued
28
Relations
29
Relations
Example 3.1.27 continued
30
Relations
31
Relations
Example 3.1.31 continued
32
Relations
33
Relations
Example 3.1.32 continued
34
Relations
35
Relations
36
Relations
Consider the relation R = {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (1, 4), (4, 1), (2, 3), (3, 2)} on the set S = {1, 2, 3, 4, 5}. The digraph is divided into three distinct blocks. From these blocks the subsets {1, 4}, {2, 3}, and {5} are formed. These subsets are pairwise disjoint, and their union is S. A partition of a nonempty set S is a division of S into nonintersecting nonempty subsets. 37
Relations
38
Relations
Example: Let A denote the set of the lowercase English alphabet. Let B be the set of lowercase consonants and C be the set of lowercase vowels. Then B and C are nonempty, B C = , and A = B C. Thus, {B, C} is a partition of A. Let A be a set and let {A1, A2, A3, A4, A5} be a partition of A. Corresponding to this partition, a Venn diagram, can be drawn, Figure 3.13
39
Relations
40
Relations
41
Relations
42
Relations
43
Relations
44
Relations
Let A = {a, b, c , d, e , f , g , h, i, j }. Let R be a relation on A such that the digraph of R is as shown in Figure 3.14. Then a, b, c , d, e , f , c , g is a directed walk in R as a R b,b R c ,c R d ,d R e , e R f , f R c , c R g . Similarly, a, b, c , g is also a directed walk in R. In the walk a, b, c , d, e , f , c , g , the internal vertices are b, c , d, e , f , and c , which are not distinct as c repeats. this walk is not a path. In the walk a, b, c , g , the internal vertices are b and c , which are distinct. Therefore, the walk a, b, c, g is a path.
Discrete Mathematical Structures: Theory and Applications
45
Relations
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
2 and 5 are the only minimal elements of this poset. Notice that 2 does not divide 5. Therefore, it is not true that 2 b, for all b S, and so 2 is not a least element in (S,). Similarly, 5 is not a least element. This poset has no least element
Discrete Mathematical Structures: Theory and Applications
64
Figure 3.24
65
Hasse Diagram
20 and 15 are the only maximal elements of this poset 10 does not divide 15, hence it is not true that b 15, for all b S, and so 15 is not a greatest element in (S,)
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86