Page 190 - HOW TO PROVE IT: A Structured Approach, Second Edition
P. 190
P1: PIG/ P2: OYK/
0521861241c04 CB996/Velleman October 20, 2005 2:54 0 521 86124 1 Char Count= 0
176 Relations
5. We saw in part 2 that E ◦ L −1 is a relation from R to C, and T is a relation
from C to P,so T ◦ (E ◦ L −1 ) is the relation from R to P defined as follows.
T ◦ (E ◦ L −1 ) ={(r, p) ∈ R × P |∃c ∈ C((r, c) ∈ E ◦ L −1 and
(c, p) ∈ T )}
={(r, p) ∈ R × P |∃c ∈ C (some student who lives
in the room r is enrolled in the course c, and c
is taught by the professor p)}
={(r, p) ∈ R × P | some student who lives in
the room r is enrolled in some course taught by
the professor p}.
6. (T ◦ E) ◦ L −1 ={(r, p) ∈ R × P |∃s ∈ S((r, s) ∈ L −1 and
(s, p) ∈ T ◦ E)}
={(r, p) ∈ R × P |∃s ∈ S(the student s lives in the
room r, and is enrolled in some course taught
by the professor p)}
={(r, p) ∈ R × P | some student who lives in
the room r is enrolled in some course taught by
the professor p}.
Notice that our answers for parts 3 and 4 of Example 4.2.4 were different. so
composition of relations is not commutative. However, our answers for parts
5 and 6 turned out to be the same. Is this a coincidence, or is it true in general
that composition of relations is associative? Often, looking at examples of a
new concept will suggest general rules that might apply to it. Although one
counterexample is enough to show that a rule is incorrect, we should never
accept a rule as correct without a proof. The next theorem summarizes some
of the basic properties of the new concepts we have introduced.
Theorem 4.2.5. Suppose R is a relation from A to B, S is a relation from B to
C, and T is a relation from C to D. Then:
−1 −1
1. (R ) = R.
−1
2. Dom(R ) = Ran(R).
−1
3. Ran(R ) = Dom(R).
4. T ◦ (S ◦ R) = (T ◦ S) ◦ R.
−1
5. (S ◦ R) −1 = R −1 ◦ S .

