Page 195 - HOW TO PROVE IT: A Structured Approach, Second Edition
P. 195

P1: PIG/  P2: OYK/
                   0521861241c04  CB996/Velleman  October 20, 2005  2:54  0 521 86124 1  Char Count= 0






                                                  More About Relations                 181
                              Another way to think about relations is to draw pictures of them. Figure 1
                            shows a picture of the relation R ={(1, 3), (1, 5), (3, 3)} from part 1 of Exam-
                            ple 4.2.2. Recall that this was a relation from the set A ={1, 2, 3} to the set
                            B ={3, 4, 5}. In the figure, each of these sets is represented by an oval, with
                            the elements of the set represented by dots inside the oval. Each ordered pair
                            (a, b) ∈ R is represented by an arrow from the dot representing a to the dot
                            representing b. For example, there is an arrow from the dot inside A labeled 1
                            to the dot inside B labeled 5 because the ordered pair (1, 5) is an element of R.
                              In general, any relation R from a set A to a set B can be represented by such a
                            picture.ThedotsrepresentingtheelementsofAandBinsuchapicturearecalled
                            vertices, and the arrows representing the ordered pairs in R are called edges.It
                            doesn’t matter exactly how the vertices representing elements of A and B are
                            arranged on the page; what’s important is that the edges correspond precisely
                            to the ordered pairs in R. Drawing these pictures may help you understand
                            the concepts discussed in the last section. For example, you should be able
                            to convince yourself that you could find the domain of R by locating those
                            vertices in A that have edges pointing away from them. Similarly, the range
                            of R would consist of those elements of B whose vertices have edges pointing
                            toward them. For the relation R shown in Figure 1, we have Dom(R) ={1, 3}
                            and Ran(R) ={3, 5}. A picture of R −1  would look just like a picture of R but
                            with the directions of all the arrows reversed.





















                                                        Figure 1

                              Pictures illustrating the composition of two relations are a little harder to
                            understand. For example, consider again the relations E and T from parts 5
                            and 6 of Example 4.2.2. Figure 2 shows what part of both relations might look
                            like. (The complete picture might be quite large if there are many students,
   190   191   192   193   194   195   196   197   198   199   200