Equivalence Relations Lecture 45 Section 10 3 Fri

  • Slides: 30
Download presentation
Equivalence Relations Lecture 45 Section 10. 3 Fri, Apr 8, 2005

Equivalence Relations Lecture 45 Section 10. 3 Fri, Apr 8, 2005

Equivalence Relations An equivalence relation on a set A is a relation on A

Equivalence Relations An equivalence relation on a set A is a relation on A that is reflexive, symmetric, and transitive. ¢ We often use the symbol ~ as a generic symbol for an equivalence relation. ¢

Examples of Equivalence Relations ¢ Which of the following are equivalence relations? a b,

Examples of Equivalence Relations ¢ Which of the following are equivalence relations? a b, on Z+. l gcd(a, b) > 1, on Z+. l A B, on (U). l p q, on a set of statements. l a b (mod 10), on Z. l

Examples of Equivalence Relations ¢ Which of the following are equivalence relations? p q

Examples of Equivalence Relations ¢ Which of the following are equivalence relations? p q = p, on a set of statements. l gcd(a, b) = 1, on Z+. l gcd(a, b) = a, on Z+. l A B = , on (U). l A = B , on (U). l

Examples of Equivalence Relations ¢ Which of the following are equivalence relations? R R,

Examples of Equivalence Relations ¢ Which of the following are equivalence relations? R R, on R. l

Equivalence Classes Let ~ be an equivalence relation on a set A and let

Equivalence Classes Let ~ be an equivalence relation on a set A and let a A. ¢ The equivalence class of a is [a] = {x A x ~ a}. ¢

Examples: Equivalence Classes ¢ Describe the equivalence classes of each of the following equivalence

Examples: Equivalence Classes ¢ Describe the equivalence classes of each of the following equivalence relations. a b (mod 10), on Z. l A = B , on (U). l p q, on a set of statements. l R R, on R. l

Equivalence Classes and Partitions Theorem: Let ~ be an equivalence relation on a set

Equivalence Classes and Partitions Theorem: Let ~ be an equivalence relation on a set A. The equivalence classes of ~ form a partition of A. ¢ Proof: ¢ We must show that ¢ The equivalence classes are pairwise disjoint, l The union of the equivalence classes equals A. l

Equivalence Classes and Partitions ¢ Proof that the equivalence classes are pairwise disjoint. Let

Equivalence Classes and Partitions ¢ Proof that the equivalence classes are pairwise disjoint. Let [a] and [b] be two distinct equivalence classes. l Suppose [a] [b] . l Let x [a] [b]. l Then x ~ a and x ~ b. l Therefore, a ~ x and x ~ b. l

Equivalence Classes and Partitions By transitivity, a ~ b. l Now let y [a].

Equivalence Classes and Partitions By transitivity, a ~ b. l Now let y [a]. l Then y ~ a. l By transitivity, y ~ b. l So y [b]. l Therefore, [a] [b]. l By a similar argument, [b] [a]. l

Equivalence Classes and Partitions Thus, [a] = [b], which is a contradiction l Therefore,

Equivalence Classes and Partitions Thus, [a] = [b], which is a contradiction l Therefore, [a] [b] = . l Thus, the equivalence classes are pairwise disjoint. l

Equivalence Classes and Partitions ¢ Proof that the union of the equivalence classes is

Equivalence Classes and Partitions ¢ Proof that the union of the equivalence classes is A. Let a A. l Then a [a] since a ~ a. l Therefore, a is in the union of the equivalence classes. l So, A is a subset of the union of the equivalence classes. l

Equivalence Classes and Partitions On the other hand, every equivalence class is a subset

Equivalence Classes and Partitions On the other hand, every equivalence class is a subset of A. l Therefore, the union of the equivalence classes equals A. l ¢ Therefore, the equivalence classes form a partition of A.

Example Let F be the set of all functions f : R R. ¢

Example Let F be the set of all functions f : R R. ¢ For f, g F, define f ~ g to mean that f is (g). ¢

Example Theorem: ~ is an equivalence relation on F. ¢ Proof: ¢ Reflexivity ¢

Example Theorem: ~ is an equivalence relation on F. ¢ Proof: ¢ Reflexivity ¢ l Obviously, f ~ f for all f F.

Example ¢ Symmetry Suppose that f ~ g for some f, g F. l

Example ¢ Symmetry Suppose that f ~ g for some f, g F. l Then f(x) is (g(x)). l There exist positive constants M 1, M 2, and x 0 such that M 1 g(x) f(x) M 2 g(x) , for all x > x 0. l

Example It follows that (1/M 2) f(x) g(x) (1/M 1) f(x) , for all

Example It follows that (1/M 2) f(x) g(x) (1/M 1) f(x) , for all x > x 0. l Therefore, g(x) is (f(x)). l

Example ¢ Transitivity Let f, g, h F and suppose that f ~ g

Example ¢ Transitivity Let f, g, h F and suppose that f ~ g and g ~ h. l Then there exist constants M 1 and x 1 and M 2 and x 2 such that f(x) M 1 g(x) for all x x 1 and l

Example g(x) M 2 h(x) for all x x 2. l Let x 0

Example g(x) M 2 h(x) for all x x 2. l Let x 0 = max(x 1, x 2). l Then for all x x 0, f(x) M 1 g(x) M 1 M 2 h(x) l Therefore, f(x) is O(h(x)).

Example Similarly, we can show that h(x) is O(f(x)). l Therefore, f(x) is (h(x)).

Example Similarly, we can show that h(x) is O(f(x)). l Therefore, f(x) is (h(x)). l Therefore, f ~ h. l Therefore, ~ is an equivalence relation on F. l

Example The equivalence class of f is the set [f] of all functions with

Example The equivalence class of f is the set [f] of all functions with the same growth rate as f. ¢ The most important equivalence classes are ¢ [xa], a R, a > 0. l [bx], b R, b > 1. l [xa logb x], a R, a > 0, b > 1. l

Example ¢ Furthermore, [xa] [xb] if a b. l [ax] [bx] if a b.

Example ¢ Furthermore, [xa] [xb] if a b. l [ax] [bx] if a b. l ¢ However, l [loga x] = [logb x] for all a, b > 1.

The Equivalence Relation Induced by a Partition Let A be a set and let

The Equivalence Relation Induced by a Partition Let A be a set and let {Ai}i I be a partition of A. ¢ Define a relation ~ on A as x ~ y x, y Ai for some i I. ¢

The Equivalence Relation Induced by a Partition ¢ Theorem: The relation ~ defined above

The Equivalence Relation Induced by a Partition ¢ Theorem: The relation ~ defined above is an equivalence relation on A.

The Equivalence Relation Induced by a Partition Proof: ¢ We must prove that ~

The Equivalence Relation Induced by a Partition Proof: ¢ We must prove that ~ is reflexive, symmetric, and transitive. ¢ Proof that ~ is reflexive. ¢ Let a A. l Then a is in Ai for some i I. l So a ~ a. l

The Equivalence Relation Induced by a Partition ¢ Proof that ~ is symmetric. Let

The Equivalence Relation Induced by a Partition ¢ Proof that ~ is symmetric. Let a, b A and suppose that a ~ b. l Then a, b Ai for some i I. l So b, a Ai for some i I. l Therefore b ~ a. l

The Equivalence Relation Induced by a Partition ¢ Proof that ~ is transitive. Let

The Equivalence Relation Induced by a Partition ¢ Proof that ~ is transitive. Let a, b, c A and suppose a ~ b and b ~ c. l Then a, b Ai for some i I and b, c Aj for some j I. l That means that b Ai Aj. l This is possible only if Ai = Aj. l Therefore, a, c Ai. l So, a ~ c. l

Example Consider the set P of all computer programs. ¢ Partition P into subsets

Example Consider the set P of all computer programs. ¢ Partition P into subsets by putting in the same subset any two programs that always produce identical output for the same input. ¢

Example ¢ This partition determines an equivalence relation on P. Let p 1 and

Example ¢ This partition determines an equivalence relation on P. Let p 1 and p 2 be two computer programs. l Then p 1 p 2 if p 1 and p 2 always produce identical output for the same input. l

Example Let A be the set of all people on Earth. ¢ Let R

Example Let A be the set of all people on Earth. ¢ Let R be the relation defined by x R y if x and y have ever shaken hands. ¢ Is R reflexive? Symmetric? Transitive? ¢ Let R* be the reflexive-transitive closure of R. ¢ Is R* an equivalence relation? ¢ What are the equivalence classes of R*? ¢