1 / 21

Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4: Equivalence Classes and Partially Ordered Sets. CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren. Course Admin. Mid-Term 2 Exam Graded Solution has been posted Any questions, please contact me directly

wynona
Télécharger la présentation

Lecture 4.4: Equivalence Classes and Partially Ordered Sets

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 4.4: Equivalence Classes and Partially Ordered Sets CS 250, Discrete Structures, Fall 2012 NiteshSaxena Adopted from previous lectures by CindaHeeren

  2. 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

  3. 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

  4. 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

  5. Outline • Equivalence Classes • Partially Ordered Sets (POSets) • Hasse Diagrams

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

  7. Thus, [a]Rand [b]R are either identical or disjoint. Equivalence Classes Lemma: Let R be an equivalence relation on S. Then • If aRb, then [a]R = [b]R • 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  aRx and xRb  aRb, contradicting “not aRb”

  8. Each Aiis called a block of the partition. 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 {Ai} with • Each Ai non-empty • Each Ai  S • For all i, j, Ai  Aj =  • S = Ai

  9. Equivalence Classes Give a partition of the reals into 2 blocks (numbers <= 0) and (numbers > 0) Give a partition of the integers into 4 blocks numbers modulo 4

  10. Partition of, equivalence relation on Subset of, equivalence class of Relation on, partition of Equivalence relation on, partition of I have no clue. Equivalence Classes Theorem: if R is a _____ S, then {[a]R : a  S} is a _____ S. 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.

  11. 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  Ai and b  Ai} Next show that R is an equivalence relation. Reflexive and symmetric. Transitive? Suppose aRb and bRc. Then a and b are in Ai, and b and c are in Aj. But b  Ai  Aj, so Ai = Aj. So, a, b, c  Ai, thus aRc.

  12. 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}

  13. a  a for any real If a  b, b  c then a  c If a  b, b  a then a = b 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. Reflexive? How do you check? Transitive? Antisymmetric?

  14. 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 orderis 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

  15. Yes, or No? A total order? Yes, x|x since x=1x (k=1) 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 Partially Ordered Sets (POSets) Ex. (Z+, | ), the relation “divides” on positive integers. Reflexive? Transitive? Antisymmetric?

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

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

  18. 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.

  19. A total order? 0110  1000 0110  0000 0110  1110 0110  1011 Partially Ordered Sets (POSets) Ex. A common partial order on bit strings of length n, {0,1}n, is defined as: a1a2…an  b1b2…bn If and only if ai  bi,  i. 0110 and 1000 are “incomparable” … We can’t tell which is “bigger.”

  20. 4 3 2 Draw edge (a,b) if a b Don’t draw up arrows Don’t draw self loops Don’t draw transitive edges 1 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.

  21. Today’s Reading • Rosen 9.5 and 9.6

More Related