Page 219 - HOW TO PROVE IT: A Structured Approach, Second Edition
P. 219
P1: PIG/ P2: OYK/
0521861241c04 CB996/Velleman October 20, 2005 2:54 0 521 86124 1 Char Count= 0
Closures 205
As we saw in the case of reflexive closure, it is not immediately obvious
that these closures will always exist. It turns out that they do, although this will
require proof. But before proving these theorems, let’s look at a few examples
of symmetric and transitive closures.
Let P be the set of all people, and let H ={(x, y) ∈ P × P | x hates y}.
Then H may fail to be symmetric, because if x hates y, it doesn’t necessarily
follow that y hates x. To find the symmetric closure of H we would have to
find the smallest relation on P that is symmetric and contains every ordered
pair in H. We could do this by starting with H and then adding only those
ordered pairs that must be added to make the relation symmetric. Now clearly
if we want to create a symmetric relation, then we will have to add the ordered
pair (x, y) whenever (y, x) ∈ H. In other words, if y hates x, then we’ll have to
include the pair (x, y) in the relation we are constructing. Adding these ordered
pairs to H, we can see that any relation on P that is symmetric and contains
H must contain all the ordered pairs in the set S = H ∪{(x, y) ∈ P × P | y
hates x}={(x, y) ∈ P × P | either x hates y or y hates x}. Now it is not hard
to check that S is a symmetric relation, so it must be the symmetric closure
of H. If you were planning the guest list for a party, you might want to know
about the relation S. If you are inviting some person x and you know that xSy,
you probably shouldn’t invite y!
For an example of a transitive closure, let C be the set of all cities in the
world and let B ={(x, y) ∈ C × C | there is a nonstop bus from x to y}.Now if
(a, b) ∈ B and (b, c) ∈ B, it does not necessarily follow that (a, c) ∈ B, since
there might be nonstop buses from a to b and b to c, but no nonstop bus from
a to c. Thus, if we want to add new ordered pairs to B in order to construct a
transitive relation, we must add the pair (a, c). But notice that once we have
added (a, c), we may be forced to add even more ordered pairs if we want to
end up with a transitive relation. For example, if there is a nonstop bus from
c to some other city d, then we will have to add (a, d). We were forced to
add (a, d) because (a, b), (b, c), and (c, d) were all elements of B. In other
words, you could go by bus from a to b, from b to c, and from c to d. In fact,
it should be clear now that for any two cities x and y, if there is a way to get
from x to y by bus, changing buses any number of times at other cities, then we
will eventually be forced by the transitivity requirement to add the pair (x, y).
Thus, any transitive relation on C that contains all the ordered pairs in B must
contain the relation T ={(x, y) ∈ C × C | it is possible to get from x to y by
bus (possibly changing buses several times at other cities)}. But if you can get
from x to y by bus and you can get from y to z by bus, then by combining the
two bus trips you can get from x to z by bus. Thus, T is transitive, so it is the
transitive closure of B.

