40. Not reflexive, symmetric, not antisymmetric, and transitive 41. Not reflexive, not symmetric, and transitive
Let R and S be relations on X . Determine whether each statement in Exercises 42–54 is true or false. If the statement is true, prove it; otherwise, give a counterexample.
42. If R is transitive, then R−1is transitive.
43. If R and S are reflexive, then R∪ S is reflexive.
44. If R and S are reflexive, then R∩ S is reflexive.
45. If R and S are reflexive, then R◦ S is reflexive.
46. If R is reflexive, then R−1is reflexive.
47. If R and S are symmetric, then R∪ S is symmetric.
48. If R and S are symmetric, then R∩ S is symmetric.
49. If R and S are symmetric, then R◦ S is symmetric.
50. If R is symmetric, then R−1is symmetric.
51. If R and S are antisymmetric, then R∪ S is antisymmetric.
52. If R and S are antisymmetric, then R∩ S is antisymmetric.
53. If R and S are antisymmetric, then R◦ S is antisymmetric.
54. If R is antisymmetric, then R−1is antisymmetric.
55. How many relations are there on an n-element set?
In Exercises 56–58, determine whether each relation R defined on the collection of all nonempty subsets of real numbers is reflexive, symmetric, antisymmetric, transitive, and/or a partial order.
56. ( A, B)∈ R if for every ε > 0, there exists a ∈ A and b ∈ B with|a − b| < ε.
57. ( A, B)∈ R if for every a ∈ A and ε > 0, there exists b ∈ B with|a − b| < ε.
58. ( A, B)∈ R if for every a ∈ A, b ∈ B, and ε > 0, there exists a∈ A and b∈ B with |a − b| < ε and |a− b| < ε.
59. What is wrong with the following argument, which supposedly shows that any relation R on X that is symmetric and transitive is reflexive?
Let x∈ X. Using symmetry, we have (x, y) and (y, x) both in R. Since (x, y), ( y, x) ∈ R, by transitivity we have (x, x)∈ R. Therefore, R is reflexive.
3.4 ➜ Equivalence Relations
Suppose that we have a set X of 10 balls, each of which is either red, blue, or green (see Figure 3.4.1). If we divide the balls into sets R, B, and G according to color, the family {R, B, G} is a partition of X. (Recall that in Section 1.1, we defined a partition of a set X to be a collectionS of nonempty subsets of X such that every element in X belongs to exactly one member ofS.)
A partition can be used to define a relation. IfS is a partition of X, we may define x R y to mean that for some set S ∈ S, both x and y belong to S. For the example of Figure 3.4.1, the relation obtained could be described as “is the same color as.” The next theorem shows that such a relation is always reflexive, symmetric, and transitive.
b r b g r
b r r g g
Figure 3.4.1 A set of colored balls.
Theorem 3.4.1 LetS be a partition of a set X. Define x R y to mean that for some set S in S, both x and y belong to S. Then R is reflexive, symmetric, and transitive.
Proof Let x ∈ X. By the definition of partition, x belongs to some member S of S.
Thus x R x and R is reflexive.
Suppose that x R y. Then both x and y belong to some set S∈ S. Since both y and x belong to S, y R x and R is symmetric.
Finally, suppose that x R y and y R z. Then both x and y belong to some set S ∈ S and both y and z belong to some set T ∈ S. Since y belongs to exactly one member ofS, we must have S = T . Therefore, both x and z belong to S and x R z.
We have shown that R is transitive.
Example 3.4.2 Consider the partition
S = {{1, 3, 5}, {2, 6}, {4}}
of X = {1, 2, 3, 4, 5, 6}. The relation R on X given by Theorem 3.4.1 contains the ordered pairs (1, 1), (1, 3), and (1, 5) because{1, 3, 5} is in S. The complete relation is
R= {(1, 1), (1, 3), (1, 5), (3, 1), (3, 3), (3, 5), (5, 1), (5, 3), (5, 5), (2, 2), (2, 6), (6, 2), (6, 6), (4, 4)}.
LetS and R be as in Theorem 3.4.1. If S ∈ S, we can regard the members of S as equivalent in the sense of the relation R, which motivates calling relations that are re-flexive, symmetric, and transitive equivalence relations. In the example of Figure 3.4.1, the relation is “is the same color as”; hence equivalent means “is the same color as.”
Each set in the partition consists of all the balls of a particular color.
Definition 3.4.3 A relation that is reflexive, symmetric, and transitive on a set X is called an equivalence relation on X .
Example 3.4.4 The relation R of Example 3.4.2 is an equivalence relation on{1, 2, 3, 4, 5, 6} because of Theorem 3.4.1. We can also verify directly that R is reflexive, symmetric, and transitive.
3
5 1
2
6
4
Figure 3.4.2 The digraph of the relation of Example 3.4.2.
The digraph of the relation R of Example 3.4.2 is shown in Figure 3.4.2. Again, we see that R is reflexive (there is a loop at every vertex), symmetric (for every directed edge fromv to w, there is also a directed edge from w to v), and transitive (if there is a directed edge from x to y and a directed edge from y to z, there is a directed edge from x to z).
Example 3.4.5 Consider the relation
R= {(1, 1), (1, 3), (1, 5), (2, 2), (2, 4), (3, 1), (3, 3), (3, 5), (4, 2), (4, 4), (5, 1), (5, 3), (5, 5)}
on{1, 2, 3, 4, 5}. The relation is reflexive because (1, 1), (2, 2), (3, 3), (4, 4), (5, 5) ∈ R.
The relation is symmetric because whenever (x, y) is in R, ( y, x) is also in R. Finally, the relation is transitive because whenever (x, y) and ( y, z) are in R, (x, z) is also in R. Since R is reflexive, symmetric, and transitive, R is an equivalence relation on{1, 2, 3, 4, 5}.
3.4 ◆ Equivalence Relations
161
Example 3.4.6 The relation R on X = {1, 2, 3, 4} defined by (x, y) ∈ R if x ≤ y, x, y ∈ X, is not an equivalence relation because R is not symmetric. [For example, (2, 3) ∈ R, but (3, 2) /∈ R.] The relation R is reflexive and transitive.
Example 3.4.7 The relation
R= {(a, a), (b, c), (c, b), (d, d)}
on X = {a, b, c, d} is not an equivalence relation because R is neither reflexive nor transitive. [It is not reflexive because, for example, (b, b) /∈ R. It is not transitive because, for example, (b, c) and (c, b) are in R, but (b, b) is not in R.]
Given an equivalence relation on a set X , we can partition X by grouping related members of X . Elements related to one another may be thought of as equivalent. The next theorem gives the details.
Theorem 3.4.8 Let R be an equivalence relation on a set X . For each a∈ X, let [a]= {x ∈ X | x R a}.
(In words, [a] is the set of all elements in X that are related to a.) Then S = {[a] | a ∈ X}
is a partition of X .
Proof We must show that every element in X belongs to exactly one member ofS.
Let a∈ X. Since a R a, a ∈ [a]. Thus every element in X belongs to at least one member ofS. It remains to show that every element in X belongs to exactly one member ofS; that is,
if x ∈ X and x ∈ [a] ∩ [b], then [a] = [b]. (3.4.1) We first show that for all c, d∈ X, if c R d, then [c] = [d]. Suppose that c R d.
Let x ∈ [c]. Then x R c. Since c R d and R is transitive, x R d. Therefore, x ∈ [d]
and [c]⊆ [d]. The argument that [d] ⊆ [c] is the same as that just given, but with the roles of c and d interchanged. Thus [c]= [d].
We now prove (3.4.1). Assume that x ∈ X and x ∈ [a] ∩ [b]. Then x R a and x R b. Our preceding result shows that [x]= [a] and [x] = [b]. Thus [a] = [b].
Definition 3.4.9 Let R be an equivalence relation on a set X . The sets [a] defined in Theorem 3.4.8 are called the equivalence classes of X given by the relation R.
Example 3.4.10 In Example 3.4.4, we showed that the relation
R = {(1, 1), (1, 3), (1, 5), (3, 1), (3, 3), (3, 5), (5, 1), (5, 3), (5, 5), (2, 2), (2, 6), (6, 2), (6, 6), (4, 4)}
on X= {1, 2, 3, 4, 5, 6} is an equivalence relation. The equivalence class [1] containing 1 consists of all x such that (x, 1)∈ R. Therefore,
[1]= {1, 3, 5}.
The remaining equivalence classes are found similarly:
[3]= [5] = {1, 3, 5}, [2]= [6] = {2, 6}, [4]= {4}.
Example 3.4.11 The equivalence classes appear quite clearly in the digraph of an equivalence relation.
The three equivalence classes of the relation R of Example 3.4.10 appear in the digraph of R (shown in Figure 3.4.2) as the three subgraphs whose vertices are{1, 3, 5}, {2, 6}, and{4}. A subgraph G that represents an equivalence class is a largest subgraph of the original digraph having the property that for any verticesv and w in G, there is a directed edge fromv to w. For example, if v, w ∈ {1, 3, 5}, there is a directed edge from v to w.
Moreover, no additional vertices can be added to 1, 3, 5, and so the resulting vertex set has a directed edge between each pair of vertices.
Example 3.4.12 There are two equivalence classes for the equivalence relation
R= {(1, 1), (1, 3), (1, 5), (2, 2), (2, 4), (3, 1), (3, 3), (3, 5), (4, 2), (4, 4), (5, 1), (5, 3), (5, 5)}
on{1, 2, 3, 4, 5} of Example 3.4.5, namely,
[1]= [3] = [5] = {1, 3, 5}, [2]= [4] = {2, 4}.
Example 3.4.13 We can readily verify that the relation
R= {(a, a), (b, b), (c, c)}
on X = {a, b, c} is reflexive, symmetric, and transitive. Thus R is an equivalence relation. The equivalence classes are
[a]= {a}, [b]= {b}, [c]= {c}.
Example 3.4.14 Let X = {1, 2, . . . , 10}. Define x R y to mean that 3 divides x − y. We can readily verify that the relation R is reflexive, symmetric, and transitive. Thus R is an equivalence relation on X .
Let us determine the members of the equivalence classes. The equivalence class [1] consists of all x with x R 1. Thus
[1]= {x ∈ X | 3 divides x − 1} = {1, 4, 7, 10}.
Similarly,
[2]= {2, 5, 8}, [3]= {3, 6, 9}.
These three sets partition X . Note that
[1]= [4] = [7] = [10], [2]= [5] = [8], [3]= [6] = [9].
For this relation, equivalence is “has the same remainder when divided by 3.”
Example 3.4.15 We show that if a relation R on a set X is symmetric and transitive but not reflexive, the collection of sets [a], a ∈ X, defined in Theorem 3.4.8 does not partition X (see also Exercises 44–48).
3.4 ◆ Equivalence Relations
163
Let R be a relation on a set X that is symmetric and transitive but not reflexive.
We define “pseudo equivalence classes” as in Theorem 3.4.8:
[a]= {x ∈ X | x R a}.
Since R is not reflexive, there exists b ∈ X such that (b, b) ∈ R. We show that b is not in any pseudo equivalence class. Suppose, by way of contradiction, that b∈ [a] for some a∈ X. Then (b, a) ∈ R. Since R is symmetric, (a, b) ∈ R. Since R is transitive, (b, b)∈ R. But we assumed that (b, b) ∈ R. This contradiction shows that b is not in any pseudo equivalence class. Thus the collection of pseudo equivalence classes does not partition X .
We close this section by proving a special result that we will need later (see Sections 6.2 and 6.3). The proof is illustrated in Figure 3.4.3.
X1 (r elements)
X2 (r elements)
Xk (r elements)
X rkX
Figure 3.4.3 The proof of Theorem 3.4.16.
Theorem 3.4.16 Let R be an equivalence relation on a finite set X . If each equivalence class has r elements, there are|X|/r equivalence classes.
Proof Let X1, X2,. . . , Xkdenote the distinct equivalence classes. Since these sets partition X ,
|X| = |X1| + |X2| + · · · + |Xk| = r + r + · · · + r = kr and the conclusion follows.
Problem-Solving Tips
An equivalence relation is a relation that is reflexive, symmetric and transitive. To prove that a relation is an equivalence relation, you need to verify that these three properties hold (see Problem-Solving Tips for Section 3.3).
An equivalence relation on a set X partitions X into subsets. (“Partitions” means that every x in X belongs to exactly one of the subsets of the partition.) The subsets making up the partition can be determined in the following way. Choose x1 ∈ X. Find the set, denoted [x1], of all elements related to x1. Choose another element x2∈ X that is not related to x1. Find the set [x2] of all elements related to x2. Continue in this way until all the elements of X have been assigned to a set. The sets [xi] are called the equivalence classes. The partition is
[x1], [x2],. . . .
The elements of [xi] are equivalent in the sense that they are all related. For example, the relation R, defined by x R y if x and y are the same color, partitions the set into subsets where each subset contains elements that are all the same color. Within a subset, the elements are equivalent in the sense that they are all the same color.
In the digraph of an equivalence relation, an equivalence class is a largest subgraph of the original digraph having the property that for any verticesv and w in G, there is a directed edge fromv to w.
A partition of a set gives rise to an equivalence relation. If X1,. . . , Xnis a partition of a set X and we define x R y if for some i , x and y both belong to Xi, then R is an equivalence relation on X . The equivalence classes turn out to be X1,. . . , Xn. Thus,
“equivalence relation” and “partition of a set” are different views of the same situation.
An equivalence relation on X gives rise to a partition of X (namely, the equivalence classes), and a partition of X gives rise to an equivalence relation (namely, x is related to y if x and y are in the same set in the partition). This latter fact can be used to solve certain problems. If you are asked to find an equivalence relation, you can either find the equivalence relation directly or construct a partition and then use the associated equivalence relation. Similarly, if you are asked to find a partition, you can either find the partition directly or construct an equivalence relation and then take the equivalence classes as your partition.
Section Review Exercises
1. Define equivalence relation. Give an example of an equivalence relation. Give an example of a relation that is not an equivalence relation.
2. Define equivalence class. How do we denote an equivalence
class? Give an example of an equivalence class for your equiv-alence relation of Exercise 1.
3. Explain the relationship between a partition of a set and an equivalence relation.
Exercises
In Exercises 1– 8, determine whether the given relation is an equivalence relation on{1, 2, 3, 4, 5}. If the relation is an equiv-alence relation, list the equivequiv-alence classes. (In Exercises 5– 8, x, y∈ {1, 2, 3, 4, 5}.)
In Exercises 9–14, determine whether the given relation is an equiv-alence relation on the set of all people.
9. {(x, y) | x and y are the same height}
In Exercises 15–20, list the members of the equivalence relation on{1, 2, 3, 4} defined (as in Theorem 3.4.1) by the given partition.
Also, find the equivalence classes [1], [2], [3], and [4].
15. {{1, 2}, {3, 4}} 16. {{1}, {2}, {3, 4}}
17. {{1}, {2}, {3}, {4}} 18. {{1, 2, 3}, {4}}
19. {{1, 2, 3, 4}} 20. {{1}, {2, 4}, {3}}
In Exercises 21–23, let X= {1, 2, 3, 4, 5}, Y = {3, 4}, and C = {1, 3}. Define the relation R on P(X), the set of all subsets of X , as
A R B if A∪ Y = B ∪ Y.
21. Show that R is an equivalence relation.
22. List the elements of [C], the equivalence class containing C.
23. How many distinct equivalence classes are there?
24. Let
X = {San Francisco, Pittsburgh, Chicago, San Diego, Philadelphia, Los Angeles}.
Define a relation R on X as x R y if x and y are in the same state.
(a) Show that R is an equivalence relation.
(b) List the equivalence classes of X .
25. If an equivalence relation has only one equivalence class, what must the relation look like?
26. If R is an equivalence relation on a finite set X and|X| = |R|, what must the relation look like?
3.4 ◆ Equivalence Relations
165
27. By listing ordered pairs, give an example of an equivalence relation on{1, 2, 3, 4, 5, 6} having exactly four equivalence classes.
28. How many equivalence relations are there on the set{1, 2, 3}?
29. Let R be a reflexive relation on X satisfying: for all x, y, z∈ X,
(a) Show that R is an equivalence relation on X× X.
(b) List one member of each equivalence class of X× X.
32. Let X = {1, 2, . . . , 10}. Define a relation R on X × X by (a, b) R (c, d) if ad= bc.
(a) Show that R is an equivalence relation on X× X.
(b) List one member of each equivalence class of X× X.
(c) Describe the relation R in familiar terms.
33. Let R be a reflexive and transitive relation on X . Show that R∩ R−1is an equivalence relation on X .
34. Let R1and R2be equivalence relations on X .
(a) Show that R1∩ R2is an equivalence relation on X . (b) Describe the equivalence classes of R1∩ R2in terms of
the equivalence classes of R1and the equivalence classes of R2.
35. Suppose thatS is a collection of subsets of a set X and X =
∪ S. (It is not assumed that the family S is pairwise disjoint.) Define x R y to mean that for some set S∈ S, both x and y are in S. Is R necessarily reflexive, symmetric, or transitive?
36. Let S be a unit square including the interior, as shown in the following figure.
(a) Show that R is an equivalence relation on S.
(b) If points in the same equivalence class are glued together, how would you describe the figure formed?
37. Let S be a unit square including the interior (as in Exer-cise 36). Define a relation R on S by (x, y) R p(x, y) if
(a) Show that R is an equivalence relation on S.
(b) If points in the same equivalence class are glued together, how would you describe the figure formed?
38. Let f be a function from X to Y . Define a relation R on X by x R y if f (x)= f (y).
Show that R is an equivalence relation on X .
39. Let f be a characteristic function in X . (“Characteristic func-tion” is defined before Exercise 82, Section 3.1.) Define a relation R on X by x R y if f (x) = f (y). According to the preceding exercise, R is an equivalence relation. What are the equivalence classes?
40. Let f be a function from X onto Y . Let S = { f−1({y}) | y ∈ Y }.
[The definition of f−1( B), where B is a set, precedes Exer-cise 70, Section 3.1.] Show thatS is a partition of X. Describe an equivalence relation that gives rise to this partition.
41. Let R be an equivalence relation on a set A. Define a function f from A to the set of equivalence classes of A by the rule
f (x)= [x].
When do we have f (x)= f (y)?
42. Let R be an equivalence relation on a set A. Suppose that g is a function from A into a set X having the property that if x R y, then g(x)= g(y). Show that
h([x])= g(x)
defines a function from the set of equivalence classes of A into X . [What needs to be shown is that h uniquely assigns a value to [x]; that is, if [x]= [y], then g(x) = g(y).]
43. Suppose that a relation R on a set X is symmetric and transitive but not reflexive. Suppose, in particular, that (b, b)∈ R. Prove that the pseudo equivalence class [b] (see Example 3.4.15) is empty.
44. Prove that if a relation R on a set X is not symmetric but transi-tive, the collection of pseudo equivalence classes (see Example 3.4.15) does not partition X .
45. Prove that if a relation R on a set X is reflexive but not symmet-ric, the collection of pseudo equivalence classes (see Example 3.4.15) does not partition X .
46. Prove that if a relation R on a set X is reflexive but not transi-tive, the collection of pseudo equivalence classes (see Example 3.4.15) does not partition X .
47. Give an example of a set X and a relation R on X that is not reflexive, not symmetric, and not transitive, but for which the collection of pseudo equivalence classes (see Example 3.4.15) partitions X .
48. Give an example of a set X and a relation R on X that is not reflexive, symmetric, and not transitive, but for which the collection of pseudo equivalence classes (see Example 3.4.15) partitions X .
49. Let X denote the set of sequences with finite domain. Define a relation R on X as s R t if|domain s| = |domain t| and, if the domain of s is{m, m + 1, . . . , m + k} and the domain of t is{n, n + 1, . . . , n + k}, sm+i= tn+ifor i= 0, . . . , k.
(a) Show that R is an equivalence relation.
(b) Explain in words what it means for two sequences in X to be equivalent under the relation R.
(c) Since a sequence is a function, a sequence is a set of or-dered pairs. Two sequences are equal if the two sets of ordered pairs are equal. Contrast the difference between two equivalent sequences in X and two equal sequences in X .
The relationτ(R) is called the transitive closure of R.
50. For the relations R1and R2of Exercise 36, Section 3.3, find ρ(Ri),σ(Ri),τ(Ri), andτ(σ (ρ(Ri))) for i= 1, 2.
51. Show thatρ(R) is reflexive.
52. Show thatσ(R) is symmetric.
53. Show thatτ(R) is transitive.
54. Show thatτ(σ (ρ(R))) is an equivalence relation containing R.
55. Show thatτ(σ(ρ(R))) is the smallest equivalence relation on X containing R; that is, show that if Ris an equivalence rela-tion on X and R⊇ R, then R⊇ τ(σ(ρ(R))).
56. Show that R is transitive if and only ifτ(R) = R.
In Exercises 57–63, if the statement is true for all relations R1
and R2 on an arbitrary set X , prove it; otherwise, give a counterexample. one-to-one, onto function from X to Y .
64. Show that set equivalence is an equivalence relation.
65. Show that the sets{1, 2, . . .} and {2, 4, . . .} are equivalent.
66. Show that for any set X , X is not equivalent toP(X), the power set of X .