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

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






                                                       Closures                        207
                              We can find the symmetric and transitive closures of R by imitating the rea-
                            soning we used for the relations H and B. To find the symmetric closure we
                            start with R, and for each ordered pair (x, y)in R we add the ordered pair (y, x).
                            This gives us the relation S ={(1, 2), (1, 3), (2, 1), (2, 2), (3, 1), (3, 4), (4, 3)},
                            whose directed graph is shown in Figure 3. Note that the only difference be-
                            tween this graph and the one in Figure 2 is that single arrows connecting distinct
                            vertices have been changed to pairs of arrows pointing in opposite directions.
                            You should be able to check that S is symmetric, and since the only ordered pairs
                            we added to R are those we were forced to add by the definition of symmetry,
                            S must be the symmetric closure of R.
                              To find the transitive closure of R, we let T ={(x, y) ∈ A × A | you can
                            get from vertex x to vertex y in Figure 2 by following the arrows} =
                            {(1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (2, 4), (3, 4)}. The graph
                            of T is also shown in Figure 3. Note in particular that (1, 1) ∈ T , because you
                            can get from vertex 1 to itself by following the arrows in Figure 2, going first
                            from vertex 1 to vertex 2 and then back to vertex 1. Rephrasing this in terms of
                            the definition of transitivity, since (1, 2) ∈ R and (2, 1) ∈ R, we must add the
                            ordered pair (1, 1) to R if we want to create a transitive relation. Once again,
                            you should be able to verify that T is the transitive closure of R by checking
                            that T is transitive and that the only ordered pairs in T that are not in R are
                            those we were forced to add by the definition of transitivity.




















                                                        Figure 3
                              Let’sreturnnowtotheproblemofprovingthateveryrelationhasasymmetric
                            closure and a transitive closure. Both of these proofs will involve proving that
                            something with a certain property exists, and as we saw in Chapter 3, proofs of
                            this kind are sometimes difficult. The most straightforward way to proceed is to
                            try to find something that has the required property, but sometimes this object is
   216   217   218   219   220   221   222   223   224   225   226