Presentation is loading. Please wait.

Presentation is loading. Please wait.

Equivalence Relations: Selected Exercises

Similar presentations


Presentation on theme: "Equivalence Relations: Selected Exercises"— Presentation transcript:

1 Equivalence Relations: Selected Exercises

2 Copyright © Peter Cappello 2011
Equivalence Relation Let E be a relation on set A. E is an equivalence relation if it is: Reflexive Symmetric Transitive. Examples a E b when a mod 5 = b mod 5. (Over N) (i.e., a ≡ b mod 5 ) a E b when a is a sibling of b. (Over humans) Copyright © Peter Cappello 2011

3 Copyright © Peter Cappello 2011
Equivalence Class Let E be an equivalence relation on A. We denote aEb as a ~ b. (sometimes, it is denoted a ≡ b ) The equivalence class of a is { b | a ~ b } and is denoted [a]. What are the equivalence classes of the example equivalence relations? For these examples: Do distinct equivalence classes have a non-empty intersection? Does the union of all equivalence classes equal the underlying set? Copyright © Peter Cappello 2011

4 Copyright © Peter Cappello 2011
Partition A partition of set S is a set of nonempty subsets, S1, S2, . . ., Sn, of S such that: i j ( i ≠ j  Si ∩ Sj = Ø ). S = S1 U S2 U U Sn. Copyright © Peter Cappello 2011

5 Equivalence Relations & Partitions
Let E be an equivalence relation on S. Thm. E’s equivalence classes partition S. Thm. For any partition P of S, there is an equivalence relation on S whose equivalence classes form partition P. Copyright © Peter Cappello 2011

6 Copyright © Peter Cappello 2011
E’s equivalence classes partition S. [a] ≠ [b]  [a] ∩ [b] = Ø. Proof by contradiction: Assume [a] ≠ [b]  [a] ∩ [b] ≠ Ø: (Draw a Venn diagram) Without loss of generality, let c  [a] - [b]. Let d  [a] ∩ [b]. We show that c  [b] (which contradicts our assumption above) c ~ a ( c  [a] ) a ~ d ( d  [a] ) c ~ d ( c ~ a  a ~ d  E is transitive ) d ~ b ( d  [b] ) c ~ b  c  [b] ( c ~ d  d ~ b  E is transitive ) The union of the equivalence classes is S. Students: Show this use pair proving in class. Copyright © Peter Cappello 2011

7 Copyright © Peter Cappello 2011
For any partition P of S, there is an equivalence relation whose equivalence classes form the partition P. Prove in class. Let P be an arbitrary partition of S. We define an equivalence relation whose equivalence classes form partition P. (Students: Show this (use pair proving) in class) Copyright © Peter Cappello 2011

8 Copyright © Peter Cappello 2011
Exercise 20 Let P be the set of people who visited web page W. Let R be a relation on P: xRy  x & y visit the same sequence of web pages since visiting W until they exit the browser. Is R an equivalence relation? Let s( p ) be the sequence of web pages p visits since visiting W until p exits the browser. Copyright © Peter Cappello 2011

9 Copyright © Peter Cappello 2011
Exercise 20 continued That is, xRy means s( x ) = s( y ). x xRx: R is reflexive. Since x s( x ) = s( x ). x y ( xRy  yRx ): R is symmetric. Since s( x ) = s( y )  s (y ) = s( x ). x y z ( ( xRy  yRz )  xRz ): R is transitive. Since ( s( x ) = s( y )  s( y ) = s( z ) )  s( x ) = s( z ). Therefore, R is an equivalence relation. Copyright © Peter Cappello 2011

10 Copyright © Peter Cappello 2011
Exercise 30 What are the equivalence classes of the bit strings for the equivalence relation of Exercise 11? Ex. 11: Let S = { x | x is a bit string of ≥ 3 bits. } Define xRy such that x agrees with y on the left 3 bits (e.g., ~ ). 010 1011 11111 Copyright © Peter Cappello 2011

11 Copyright © Peter Cappello 2011
Exercise 30 Answer 010 (answer: all strings that begin with 010) 1011 (answer: all strings that begin with 101) 11111 (answer: all strings that begin with 111) Copyright © Peter Cappello 2011

12 Copyright © Peter Cappello 2011
Exercise 40 What is the equivalence class of (1, 2) with respect to the equivalence relation given in Exercise 16? Exercise. 16: Ordered pairs of positive integers such that ( a, b ) ~ ( c, d )  ad = bc. Copyright © Peter Cappello 2011

13 Copyright © Peter Cappello 2011
Exercise 40 a) Answer ( a, b ) ~ ( c, d )  ad = bc  a/b = c/d [ ( 1, 2 ) ] = { ( c, d ) | ( 1, 2 ) ~ ( c, d ) } = { ( c, d ) | 1d = 2c  c/d = ½ }. Copyright © Peter Cappello 2011

14 Copyright © Peter Cappello 2011
Exercise 40 continued b) Interpret the equivalence classes of the equivalence relation R in Exercise 16. Copyright © Peter Cappello 2011

15 Copyright © Peter Cappello 2011
Exercise 40 continued b) Interpret the equivalence classes of the equivalence relation R in Exercise 16. Answer Each equivalence class contains all (p, q), which, as fractions, have the same value (i.e., the same element of Q+). (The fact that 3/7 = 15/35 confuses some small children.) Copyright © Peter Cappello 2011

16 Copyright © Peter Cappello 2011
Exercise 50 A partition P’ is a refinement of partition P when x  P’ y  P x  y. (Illustrate.) Let partition P consist of sets of people living in the same US state. Let partition P’ consist of sets of people living in the same county of a state. Show that P’ is a refinement of P. Copyright © Peter Cappello 2011

17 Copyright © Peter Cappello 2011
Exercise 50 continued It suffices to note that: Every county is contained within its state: No county spans 2 states. Copyright © Peter Cappello 2011

18 Copyright © Peter Cappello 2011
Exercise 62 Determine the number of equivalent relations on a set with 4 elements by listing them. How would you represent the equivalence relations that you list? Copyright © Peter Cappello 2011

19 Copyright © Peter Cappello 2011
End 8.5 Copyright © Peter Cappello 2011

20 Copyright © Peter Cappello 2011
10 Suppose A   & R is an equivalence relation on A. Show f X f: A  X such that a ~ b  f( a ) = f( b ). Proof. Let f : A  X, where X = { [a] | [a] is an equivalence class of R } a f (a ) = [a]. Then, a b a ~ b  f( a ) = [a] = [b] = f( b ). Copyright © Peter Cappello 2011

21 Copyright © Peter Cappello 2011
66 Use Thm. 2 to form an equivalence relation R from a partition P of a set A. What partition results from applying Thm. 2 to R? (i.e, the partition defined by R’s equivalence classes)? Copyright © Peter Cappello 2011

22 Copyright © Peter Cappello 2011
P = {S1 , S2 , S3 , S4 , S5 , S6} S2 S3 S1 S6 S4 S5 P = A = S1  S2  S3  S4  S5  S6 Copyright © Peter Cappello 2011

23 Copyright © Peter Cappello 2011
66 continued Let P = { S1, S2, … , Sn }. R = { ( a, b ) | S  P a,b  S }. Let P’ be the partition defined by R’s equivalence classes. By defn. a  A [a] = { b | aRb }. But aRb  a,b  S, for some S  P. Therefore, P’ = P. Copyright © Peter Cappello 2011


Download ppt "Equivalence Relations: Selected Exercises"

Similar presentations


Ads by Google