Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4.4: Equivalence Classes and Partially Ordered Sets CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda.

Similar presentations


Presentation on theme: "Lecture 4.4: Equivalence Classes and Partially Ordered Sets CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda."— Presentation transcript:

1

2 Lecture 4.4: Equivalence Classes and Partially Ordered Sets CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren

3 Course Admin Mid-Term 2 Exam Graded Solution has been posted Any questions, please contact me directly Please pick up, if haven’t done so already HW3 Graded Solution has been posted Please contact the TA for questions We will distribute today 2/29/20162

4 Final Exam Tuesday, December 8, 10:45am- 1:15pm, lecture room Heads up! Please mark the date/time/place Our last lecture will be on December 6 We plan to do a final exam review then 2/29/20163

5 HW4 HW4 has been posted due at 11am on Nov 15 (Thursday) Covers the chapter on Relations (lectures 4.*) Has a 10 pointer bonus problem 2/29/20164

6 Outline Equivalence Classes Partially Ordered Sets (POSets) Hasse Diagrams 2/29/20165

7 Equivalence Classes Lemma: Let R be an equivalence relation on S. Then 1. If aRb, then [a] R = [b] R 2. If not aRb, then [a] R  [b] R =  Proof: 1. Suppose aRb, and consider x  S. x  [a] R  aRx  xRa  xRb  bRx  x  [b] R Defn of [a] R symmetry transitivity symmetry Defn of [b] R 2/29/20166

8 Equivalence Classes Lemma: Let R be an equivalence relation on S. Then 1. If aRb, then [a] R = [b] R 2. If not aRb, then [a] R  [b] R =  Proof: 2. Suppose to the contrary that  x  [a] R  [b] R. x  [a] R x  [b] R  aRx and bRx  aRb, contradicting “not aRb”  aRx and xRb Thus, [a] R and [b] R are either identical or disjoint. 2/29/20167

9 Equivalence Classes So S is the union of disjoint equivalence classes of R. A partition of a set S is a (perhaps infinite) collection of sets {A i } with Each A i non-empty Each A i  S For all i, j, A i  A j =  S =  A i Each A i is called a block of the partition. 2/29/20168

10 Equivalence Classes Give a partition of the reals into 2 blocks (numbers 0) Give a partition of the integers into 4 blocks numbers modulo 4 2/29/20169

11 Equivalence Classes Theorem: if R is a _____ S, then {[a] R : a  S} is a _____ S. A.Partition of, equivalence relation on B.Subset of, equivalence class of C.Relation on, partition of D.Equivalence relation on, partition of E.I have no clue. Theorem: if R is an equivalence relation on S, then {[a] R : a  S} is a partition of S. Proof: we need to show that an equivalence relation R satisfies the definition of a partition. Follows from previous arguments and definition of equivalence classes. 2/29/201610

12 Equivalence Classes Theorem: if {Ai} is any partition of S, then there exists an equivalence relation R, whose equivalence classes are exactly the blocks Ai. Proof: If {Ai} partitions S then define relation R on S to be R = {(a,b) :  i, a  A i and b  A i } Next show that R is an equivalence relation. Reflexive and symmetric. Transitive? Suppose aRb and bRc. Then a and b are in A i, and b and c are in A j. But b  A i  A j, so A i = A j. So, a, b, c  A i, thus aRc. 2/29/201611

13 Example: Partition  Equivalence Relation Give an equivalence relation for the partition: {1,2}, {3, 4, 5}, {6} for the set {1,2,3,4,5,6} 2/29/201612

14 Partially Ordered Sets (POSets) Let R be a relation then R is a Partially Ordered Set (POSet) if it is Reflexive - aRa,  a Transitive - aRb  bRc  aRc,  a,b,c Antisymmetric - aRb  bRa  a=b,  a,b Ex. (R,  ), the relation “  ” on the real numbers, is a partial order. How do you check? a  a for any real Reflexive? Transitive? Antisymmetric? If a  b, b  c then a  c If a  b, b  a then a = b 2/29/201613

15 Partially Ordered Sets (POSets) Let (S, R ) be a PO. If a R b, or b R a, then a and b are comparable. Otherwise, they are incomparable. A total order is a partial order where every pair of elements is comparable. Ex. (R,  ), is a total order, because for every pair (a,b) in RxR, either a  b, or b  a. Ex. (people in a queue, “behind or same place”) is a total order Ex. (employees, “supervisor”) is not a total order 2/29/201614

16 Partially Ordered Sets (POSets) Ex. (Z +, | ), the relation “divides” on positive integers. Yes, x|x since x=1x (k=1) Reflexive? Transitive? Antisymmetric? a|b means b=ak, b|c means c=bj. Does c=am for some m? c = bj = akj (m=kj) a|b means b=ak, b|a means a=bj. But b = bjk (subst) only if jk=1. jk=1 means j=k=1, and we have b=a1, or b=a Yes, or No? A total order? 2/29/201615

17 Partially Ordered Sets (POSets) Ex. (Z, | ), the relation “divides” on integers. Yes, x|x since x=1x (k=1) Reflexive? Transitive? Antisymmetric? a|b means b=ak, b|c means c=bj. Does c=am for some m? c = bj = akj (m=kj) 3|-3, and -3|3, but 3  -3. Not a poset. Yes, or No? A total order? 2/29/201616

18 Partially Ordered Sets (POSets) Ex. (2 S,  ), the relation “subset” on set of all subsets of S. Yes, A  A,  A  2 S Reflexive? Transitive? Antisymmetric? A  B, B  C. Does that mean A  C?A  B means x  A  x  B A  B, B  A  A=B A poset. B  C means x  B  x  C Now take an x, and suppose it’s in A. Must it also be in C? A total order? 2/29/201617

19 Partially Ordered Sets (POSets) When we don’t have a special relation definition in mind, we use the symbol “  ” to denote a partial order on a set. When we know we’re talking about a partial order, we’ll write “a  b” instead of “aRb” when discussing members of the relation. We will also write “a < b” if a  b and a  b. 2/29/201618

20 Partially Ordered Sets (POSets) Ex. A common partial order on bit strings of length n, {0,1} n, is defined as: a 1 a 2 …a n  b 1 b 2 …b n If and only if a i  b i,  i. 0110 and 1000 are “incomparable” … We can’t tell which is “bigger.” A.0110  1000 B.0110  0000 C.0110  1110 D.0110  1011 A total order? 2/29/201619

21 Hasse Diagrams Hasse diagrams are a special kind of graphs used to describe posets. Ex. In poset ({1,2,3,4},  ), we can draw the following picture to describe the relation. 1.Draw edge (a,b) if a  b 2.Don’t draw up arrows 3.Don’t draw self loops 4.Don’t draw transitive edges 4 3 2 1 2/29/201620

22 Today’s Reading Rosen 9.5 and 9.6 2/29/201621


Download ppt "Lecture 4.4: Equivalence Classes and Partially Ordered Sets CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda."

Similar presentations


Ads by Google