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

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






                                   174                        Relations
                                     The most difficult concept introduced in Definition 4.2.3 is the concept of
                                   the composition of two relations. For an example of this concept, consider
                                   the relations E and T from parts 5 and 6 of Example 4.2.2. Recall that E
                                   is a relation from the set S of all students to the set C of all courses, and
                                   T is a relation from C to the set P of all professors. According to Defini-
                                   tion 4.2.3, the composition T ◦ E will be the relation from S to P defined as
                                   follows:


                                    T ◦ E ={(s, p) ∈ S × P |∃c ∈ C((s, c) ∈ E and (c, p) ∈ T )}
                                         ={(s, p) ∈ S × P |∃c ∈ C(the student s is enrolled in the course c

                                            and the course c is taught by the professor p)}
                                         ={(s, p) ∈ S × P | the student s is enrolled in some course
                                            taught by the professor p}.

                                   Thus, if Joe Smith is enrolled in Biology 12 and Biology 12 is taught by
                                   Professor Evans, then (Joe Smith, Biology 12) ∈ E and (Biology 12, Professor
                                   Evans) ∈ T , and therefore (Joe Smith, Professor Evans) ∈ T ◦ E. In general, if
                                   s is some particular student and p is a particular professor, then (s, p) ∈ T ◦ E
                                   iff there is some course c such that (s, c) ∈ E and (c, p) ∈ T . This notation may
                                   seem backward at first. If (s, c) ∈ E and (c, p) ∈ T , then you might be tempted
                                   to write (s, p) ∈ E ◦ T , but according to our definition, the proper notation is
                                   (s, p) ∈ T ◦ E. In fact, E ◦ T is undefined, because the second coordinates of
                                   ordered pairs in T and the first coordinates of pairs in E do not come from
                                   the same set. The reason we’ve chosen to write compositions of relations in
                                   this way will become clear in Chapter 5. For the moment, you’ll just have
                                   to be careful about this notational detail when working with compositions of
                                   relations.

                                   Example 4.2.4. Let S, R, C, and P be the sets of students, dorm rooms,
                                   courses, and professors at your school, as before, and let L, E, and T be
                                   the relations defined in parts 4–6 of Example 4.2.2. Describe the following
                                   relations.
                                   1. E −1 .
                                   2. E ◦ L −1 .
                                   3. E  −1  ◦ E.
                                   4. E ◦ E −1 .
                                   5. T ◦ (E ◦ L  −1 ).
                                   6. (T ◦ E) ◦ L −1 .
   183   184   185   186   187   188   189   190   191   192   193