Download presentation
Presentation is loading. Please wait.
Published byAugustine George Modified over 9 years ago
1
Section 7.4: Closures of Relations Let R be a relation on a set A. We have talked about 6 properties that a relation on a set may or may not possess: reflexive, irreflexive, symmetric, antisymmetric, asymmetric, and transitive. In general we could define any sort of property P that a relation may or may not satisfy (just as we defined the above 6 properties). Def: Let R be a relation over a set A and let P be a property that a relation over the set A may or may not satisfy. If there is a relation C that satisfies property P such that R C and for every relation S with property P where R S it follows that C S then C is called the closure of R with respect to P. That is, the closure of R with respect to P is the smallest relation C containing R that satisfies the property P (such a C may not exist).
2
Ex: Let A be the set {1, 2, 3, 4} and let P be the property that 1 is related to some element. Clearly then this property P is either satisfied or not by any relation over A. Consider the relation R = {(2, 1), (2, 3), (3, 4)}. What is the closure of R with respect to P? We can see that R does not possess the property P. But if we try to find the smallest relation containing R which possesses the property P, we will fail. In this case, the closure of R with respect to P does not exist. Consider for example, S = {(2, 1), (2, 3), (3, 4), (1, 1)} and T = {(2, 1), (2, 3), (3, 4), (1, 2)}. Both S and T contain R and satisfy property P because 1 is related to some element. However neither S T nor T S. By the very nature of this property P, we can see that there is no smallest set containing R which possesses P. So there is no closure. The above example illustrates that the closure may not exist for a certain property. There are some properties P for which the closure with respect to P always exists. We will see an example now.
3
Ex: Let A be the set {1, 2, 3, 4} and let P be the property reflexive. Consider the relation R = {(2, 1), (2, 3), (3, 4)}. What is the closure of R with respect to reflexive? We can see that R is not reflexive. Further, any reflexive relation must have all pairs (1, 1), (2, 2), (3, 3), and (4, 4). Hence the smallest reflexive relation that contains R is C = {(1, 1), (2, 1), (2, 2), (2, 3), (3, 3), (3, 4), (4, 4)}. It turns out that reflexive is a property for which every relation over any set has a closure. The closure with respect to reflexive is also easily found; you just add in all pairs (a, a) that are missing. So we have seen one property for which we are always guaranteed for a closure to exist for any relation with respect to this property. There is also another situation where the closure for a particular relation always exists regardless of property. Namely, if the relation R already possesses the property P, then R is its own closure.
4
Ex: What is the reflexive closure of the relation R = {(a, b) | a < b } on the set of integers? We can see that R is not reflexive. So we must add all pairs (a, a) for all a Z which are missing from R. This results in the relation C = {(a, b) | a b}. Ex: What is the closure of R = {(1, 1), (1, 2), (2, 2)} over {1, 2} with respect to reflexive? We can see that R is already reflexive, hence R is its own closure. That is, R is the smallest relation containing R that is reflexive. Reflexive, as we have seen, is a property for which the closure of a relation always exists. However, consider irreflexive. It turns out that the only time the closure with respect to irreflexive exists for a relation is if the relation is irreflexive to begin with and hence its own closure. That is, a relation that is not irreflexive can never be made so by adding. So there is no relation containing the original that is irrefl.
5
Ex: What is the symmetric closure of R = {(1, 1), (1, 2), (2, 3), (3, 3)} over {1, 2, 3, 4}? We can see that R is not symmetric. To construct the smallest relation C containing R that is symmetric, we need to add as few pairs as possible to make R symmetric. Since (1, 2) is present, we must add (2, 1). Similarly, since (2, 3) is present we must add (3, 2). Once these two pairs are added we have C = {(1, 1), (1, 2), (2, 1), (2, 3), (3, 2), (3, 3)}. This relation is symmetric and since it is the smallest symmetric relation containing R, then C is the symmetric closure of R. Symmetry is another property (like reflexive) for which it turns out that the closure of a relation always exists. We have an equally easy way to construct the symmetric closure; simply add all missing pairs of the form (b, a) for which the pair (a, b) is present in R. It turns out that the transitive closure of a relation always exists as well. However this is more difficult to construct than the reflexive or symmetric closure.
6
Ex: Consider the relation R = {(1, 3), (1, 4), (2, 1), (3, 2)} on the set {1, 2, 3, 4}. What is the transitive closure of R? We can see that R is not transitive. In order to construct the smallest relation C containing R that is transitive, we can see that we will need to add certain pairs just as we have to for reflexivity and symmetry. Since (1, 3) and (3, 2) are present, we must add (1, 2). Similarly, since (2, 1) and (1, 3) are present we must add (2, 3). Also since (2, 1) and (1, 4) are present we must add (2, 4). Finally since (3, 2) and (2, 1) are present we must add (3, 1). After all of these additions we have C = {(1, 2), (1, 3), (1, 4), (2, 1), (2, 3), (2, 4), (3, 1), (3, 2)}. However, even though we added all the pairs we seemed to need, it turns out that this relation is still not transitive. We see that (1, 2) and (2, 1) are present, but (1, 1) is not. What has happened is that the pairs we added are now interacting with other pairs to require further additions. It turns out that if we continue this process and keep adding pairs until no more additions are required, we will reach the transitive closure.
7
Ex (cont): C = {(1, 2), (1, 3), (1, 4), (2, 1), (2, 3), (2, 4), (3, 1), (3, 2)}. (1, 2) matches with (2, 1), (2, 3), and (2, 4) so we need to add (1, 1). (1, 3) matches with (3, 1) and (3, 2) so we need to add (1, 1). (2, 1) matches with (1, 2), (1, 3), and (1, 4) so we need to add (2, 2). (2, 3) matches with (3, 1) and (3, 2) so we need to add (2, 2). (3, 1) matches with (1, 2), (1, 3), and (1, 4) so we need to add (3, 3) and (3, 4). (3, 2) matches with (2, 1), (2, 3), and (2, 4) so we need to add (3, 3) and (3, 4). Now C = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (2, 4), (3, 1), (3, 2), (3, 3), (3, 4)}. It turns out that C is now transitive. So this is the transitive closure of the original relation R. In order to formalize this process of adding items, we will turn to our digraph representation.
8
Recall that a relation R over a finite set A could be represented with a digraph. Recall also that our criteria for determining if a relation represented by a digraph was transitive is that: a, b A, if there is a path from a to b then there is an edge from a to b in R. Theorem: Let R be a relation on a set A and let n be a positive integer. There is a path of length n from a to b if and only if (a, b) R n. Proof: The proof is given in the text and is a very straightforward application of mathematical induction. You should read through it and verify that you understand the principle of mathematical induction and how it is used to prove such a result. In particular, you should be able to produce this proof on your own if asked to. Remark: Note that this theorem is not peculiar to relations over a finite set. Though we introduced the digraph representation for relations over a finite set you can actually represent a relation over an infinite set this way as well. You just can’t ever draw such a digraph!
9
So now our criteria for determining whether a relation is transitive can be stated as follows: A relation R on a set A is transitive if and only if R R n for all n Z +. But we already knew this because we proved it via mathematical induction. So why did we just discuss all this digraph stuff? Because we can’t just continue to form R n for larger and larger n with no bound to construct the transitive closure of R. Using the digraph representation we can put a bound on how high we need to go for n before it will be the case that R n = R n + 1 for all higher values of n. Theorem: Let A be a finite set with n elements and let R be a relation on A. If there is a path from a to b in the digraph representing R, then there is a path from a to b with length n. Remark: This theorem tells us that the transitive closure of R is C = R 1 R 2 … R n.
10
Proof: We will prove the special case where a b and leave the case where a = b as an exercise. Let A be a finite set with n elements and let R be a relation on A. Let a and b be distinct elements of A such that there is a path from a to b in the digraph representing R. We must prove that there is a path from a to b of length n or less. If the path from a to b that we have is already of length n or less then we are done. So assume the path is of length at least n + 1. A path of length n + 1 visits n + 2 nodes. So by the pigeonhole principle, of the n nodes in the digraph, at least one node must be visited multiple times. So there is some node that is visited at least twice, call it a k. If we list out the visited nodes of our path then, we have: a1, a2, a3, …, a r + 1 where r is the length of our path. And some node a k appears twice on this list. So if we take out the portion of the path from the first appearance of a k to the second appearance of a k and replace it with just a k then we will have another path from a to b which is shorter. We can continue this process as long as the path has length n + 1 or >.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.