1 / 62

Discrete Math

Discrete Math. Equivalence relations, Partial orderings. 1. Equivalence Relation. A relation, R e , on a set A is called an equivalence relation if it is reflexive, symmetric and transitive

liana
Download Presentation

Discrete Math

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. Discrete Math Equivalence relations, Partial orderings 1

  2. Equivalence Relation • A relation, Re, on a set A is called an equivalence relation if it is reflexive, symmetric and transitive • Two elements a and b (both elements of A) that are related by equivalence relation, aReb and bRea, are called equivalent. To express that two elements are equivalent with respect to equivalence relation Re we write a~b

  3. Example: equivalence relation • Show the relation R with m∈Z+ R ={ (a, b) | a ≡b(mod m) } is an equivalence relation on Z • To show this relation is an equivalence relation we need to demonstrate that • R is reflexive • R is symmetric • R is transitive

  4. Is R reflexive? • Recall: • a≡b(mod m) iff m | a-b • 0 | a for all a because 0=0*n ∀n∈Z • To be reflexive must be true for all pairs (a, a) so that (a,a)∈R ∀a∈Z • a|a because a=1*a • So a≡a(mod m) • Therefore (a,a)∈R ∀a∈Z, R is reflexive

  5. Is R symmetric? • To be symmetric (a, b)∈R → (b, a)∈R • a≡b(mod m) iff m | a-b • m | a-b or a-b=km • It follows that b-a=(-k)m • So m | (b-a) • Therefore b≡a(mod m) • R is symmetric

  6. Is R transitive? • To show that R is transitive we must show that if a≡b(mod m) and b≡c(mod m) then a≡c(mod m) • a≡b(mod m) iff m | a-b • m | a-b or a-b=km • Similarly b-c=jm • a-c=(a-b)+(b-c)=km+jm=(k+j)m • So m | a-c • a≡c(mod m) • R is transitive

  7. Equivalence Classes • Let R be an equivalence relation on a set A. The set of all elements that are related to an element a of A is called the equivalence class of a. • The equivalence class of a with respect to R is denoted [a]R

  8. Example: equivalence class • What are the equivalence classes of 2 and 3 modulo 5? • The equivalence class of 2 contains all integers a such that a≡2(mod 5). The integers in this class have a remainder of 2 when divided by 5 • [2]R={…,-3,2,7,12, …}

  9. Example: equivalence class • What are the equivalence classes of 2 and 3 modulo 5, where R is the relation • The equivalence class of 3 contains all integers a such that a≡3(mod 5). The integers in this class have a remainder of 3 when divided by 5 • [3]R={…,-2,3,8,13, …}

  10. Your turn • Consider the relation R. aRb is a2=b2. Relation R holds for all a∈Z • Show that R is an equivalence relation • Find the equivalence class of 2 and 9

  11. Your turn: solution (1) • aRb is a2=b2. for all a∈Z • ∀a∈Z a=a so a2=b2 and R is reflexive • ∀a∈Z if a2=c2 and c2=b2 then a2=c2 =b2, and R is transitive • ∀a∈Z if a2=c2 then c2=a2, and R is symmetric • Therefore, R is and equivalence relation

  12. Your turn: solution (2) • aRb is a2=b2. for all a∈Z • The equivalence class of 2 contains all integers such that 22=b2 • [2]={2, -2} • The equivalence class of 9 contains all integers such that 92=b2 • [9]={9, -9}

  13. Equivalence and partitions Theorem 1: Let R be an equivalence relation on set A. These statements for elements a and b of A are equivalent • aRb • [a]=[b] • [a]∩[b]≠∅ Proof: show 1→2→3→1

  14. Proof of Theorem 1: (1) 1) Show aRb →[a]=[b] • Assume aRb • If c∈[a] then aRc. • R is an equivalence relation so R is symmetric • So aRc and cRa, also aRb and bRa • R is an equivalence relation so R is transitive • This means bRa and aRc implies bRc and c∈B • The same series of steps starting with c∈[b] can show c∈A • Therefore, [a]=[b]

  15. Proof of Theorem 1: (2) 2) Show [a]=[b] →[a]∩[b]≠∅ • Assume [a]=[b], if c∈[a] then c∈[b] • So [a]∩[b] must contain c • [a]∩[b] ≠∅

  16. Proof of Theorem 1: (3) 3) Show [a]∩[b]≠∅ → aRb • Assume [a]∩[b] ≠∅ • Then ∃c such that c∈[a] and c∈[b] • So aRc and bRc • The reflexive property give cRb • The transitive property gives aRc^cRb→aRb

  17. Why is this theorem useful? (1) • Consider the last statement we proved [a]∩[b]≠∅ → aRb • The logically equivalent contrapositive states • If a is not equivalent to b then [a]∩[b]=∅. • This statement tell us that all different equivalence sets are disjoint. If a is not equivalent to b, then the equivalence set of a has no members in common with the equivalence set of b

  18. Why is this theorem useful? (2) • The equivalence relation is reflexive so a is equivalent to a for all a in A • The equivalence set of each element in a contains at least the element a. • If we take the union of all the equivalence sets for R it will therefore include every element of A. (since that element is equivalent to itself) • Thus, the equivalence sets partition A into a series of disjoint sets. The union of all these equivalence sets is A.

  19. A theorem summarizing • Theorem 2: let R be an equivalence relation on a set S. Then the equivalence classes of R form a partition of S. Conversely, given a partition {Ak | k ∈ K} of the set S, there is an equivalence relation R that has the sets Ak k ∈ K as its equivalence classes.

  20. Example: partitioning • Return to the example of the equivalence classes for the integers modulo 5? • [0]R={…,-5,0,5,10, …} • [1]R={…,-4,1,6,11, …} • [2]R={…,-3,2,7,12, …} • [3]R={…,-2,3,8,13, …} • [3]R={…,-1,4,9,14, …} • The classes are disjoint and every integer is in exactly one of the classes • The equivalence classes form a partition

  21. Example: partition to relation • Suppose that S={2,4,5,7,11,22,55,66} and the collection of sets A1={2,5,7}, A2={11,22}, A3={55,66} and A4={4} form a partition of S. The sets are disjoint and their union is S. Find the relation that results in this partition. • Consider each set in sequence. For each set construct the list of pairs for the relation on that set.

  22. Example: partition to relation A1={2,5,7}, A2={11,22}, A3={55,66} and A4={4} • Consider each set. For each set construct the list of pairs for the equivalence relation on that set. • A1 (2,2),(2,5),(2,7),(5,2),(5,5),(5,7).(7,2),(7,5),(7,7) • A2 (11,11),(22,22),(11,22),(22,11) • A3 (55,55),(66,66),(55,66),(66,55) • A4 (4,4) • The equivalence relation R on S contains all the pairs in all the equivalence sets

  23. Partial ordering Relation • A relation, Rp, on a set A is called an partial ordering relation if it is reflexive, anti-symmetric and transitive • A set A along with a partial ordering R is called a partially ordered set or poset and is denoted (A,R). Members of A are called members of the poset

  24. Example: poset • Show R= ≥is a partial ordering of the integers • R is reflexive because a ≥ a • R is anti symmetric because a ≥b and b ≥ a → a=b • R is transitive because a ≥b and b ≥ c → a≥c • It follows that ≥ is a partial ordering on the set of integers and (Z, ≥) is a poset

  25. Comparable • The elements a and b of a poset (S, ) are comparable if either a b or b a. • The elements a and b of a poset (S, ) are called incomparable when a and b are elements of S such that neither a b or b a,

  26. Examples: comparable • In the poset (Z,| |) are the integers -2 and 2 comparable? Are the integers -5 and 3 comparable? • -2 and 2 are comparable because |-2|=2 • -5 and 3 are not comparable because |-5|≠3 and |3|≠-5

  27. Well ordered • In a partial ordering some pairs of elements may be incomparable • Consider a relation R on a set S. If all pairs of elements in S are comparable then the relation R is a total ordering. • (S, ) is a well ordered set if it is a poset such that is a total ordering and every nonempty subset of S has a least element

  28. Total ordering: examples • The poset (Z,≤) is totally ordered because for every pair of elements in Z either a≤b or b≤a • The poset (Z,|) is partially ordered (not totally ordered) because there exist pairs of elements in Z for which neither a|b or b|a is true. For example (5,23)

  29. Well ordering: examples • The lexicographic ordering is an example well ordered relation. • It is the set of ordered pairs of positive integers with (a1,a2) (b1,b2) if a1<b1 or a1=b1 or a2 ≤ b2 • The poset (Z,≤) is not well ordered because at least one subset, the set of negative integers, has no least element

  30. Well ordered induction • The principle of well ordered induction: Suppose S is a well ordered set. Then, P(x) is true for all x∈S if For every y in S, if P(x) is true for all x in S with x y then P(y) is true.

  31. Constructing a Hasse diagram • Consider the relation R on the set A={1,4,7,8,14,42,80,84,112}. R={(a,b) | a|b } Is this an partial ordering relation? It is reflexive since a|a for all a in A It is antisymmetric since a|b and b|a implies a=b (recall b=ka, a=mb gives b=kmb so km=1 and k=m=1) It is transitive since a|c and c|b implies a|b (recall a=kc, c=mb gives b=kmb, km∈Z so a|c)

  32. Constructing a Hasse diagram • Consider the partial ordering relation R on the set A={1,4,7,8,14,42,56,84}. R={(a,b) | a|b } • What ordered pairs are part of this partial ordering relation? (1,4),(1,7), …,(1,84),(4,8),(4,56),(4,84),(7,14), (7,42),(7,56),(7,84),(8,56),(14,42),(14,56),(14,84), (42,84), (1,1),…,(84,84)

  33. Constructing a Hasse diagram (1,4),(1,7), …,(1,84),(4,8),(4,56),(4,84),(7,14),(7,42),(7,56), (7,84),(8,56), (14,42),(14,56),(14,84),(42,84),(1,1),…,(84,84) 84 56 42 8 14 4 7 1

  34. Constructing a Hasse diagram Remove paths that must be present: first loops at each node must be present because relation is reflexive. Remove nodes shown in blue 84 56 42 8 14 4 7 1

  35. Constructing a Hasse diagram Remove paths that must be present: next paths that can be constructed using the transitive property (shown in blue) 84 56 42 8 14 4 7 1

  36. Constructing a Hasse diagram Remove directivity: arrange all nodes so that all arrows point up, (already true) then remove the arrows 84 56 42 8 14 4 7 1

  37. Constructing a Hasse diagram Hasse diagram 84 56 42 8 14 4 7 1

  38. Maximal and minimal elements • If (A,R) is a poset, then an element x∈A is called a maximal element of A if there does not exist any a∈A xRa (no a after x) • If (A,R) is a poset, then an element x∈A is called a minimal element of A if there does not exist any a∈A aRx (no a before x)

  39. Minimal and maximal Hasse diagram: find the minimal and maximal elements Minimal element: element for which no value in the set is before the element in the ordering 1 (bottom value) Maximal element: element for which no value in the set is after the element in the ordering 56,84 (top value) 84 56 42 8 14 4 7 1

  40. You turn • What are the minimal and maximal nodes in the following Hasse diagrams? 48 c e 24 16 d 12 b 8 40 3 a 2 q

  41. Greatest and least elements • If (A,R) is a poset, then an element x∈A is called the greatest element of A aRx (a is before x) ∀a∈A (x is unique when it exists) • If (A,R) is a poset, then an element x∈A is called a least element of A if xRa (a is after x) ∀a∈A (x is unique when it exists)

  42. greatest and least Hasse diagram: find the leastl and greatest elements least element: element for which xRa ∀a∈A 1 (bottom value, ) greatest element: element for which aRx ∀a∈A there is no such element 84 56 42 8 14 4 7 1

  43. greatest and least Hasse diagram: find the leastl and greatest elements least element: element for which xRa ∀a∈A there is no such element greatest element: element for which aRx ∀a∈A 168 (top value, ) 84 56 42 168 8 14 4 7

  44. You turn • What are the greatest and least nodes in the following Hasse diagrams? 48 c e 24 16 d 12 b 8 44 3 a 2

  45. Upper bound and lower bound • If (A,R) is a poset, x∈B and B⊆A, x is called the upper bound of B when bRx (b is before x) ∀b∈B (x is unique when it exists) • If (A,R) is a poset, x∈B and B⊆A, then x is called the lower bound of B if xRb (x is before b) ∀b∈B (x is unique when it exists)

  46. Upper and lower bound Hasse diagram: find lower and upper bounds of B={1,4,8} Upper bound: element for which x∈B and B⊆A bRx ∀b∈B 8,56 (top values ) Lower bound: element for which x∈B and B⊆A xRb ∀b∈B 1 (bottom value, ) 84 56 42 8 14 4 7 1

  47. Upper and lower bound Hasse diagram: find lower and upper bounds of B={84,56} Upper bound: element for which x∈B and B⊆A bRx ∀b∈B No such values Lower bound: element for which x∈B and B⊆A xRb ∀b∈B 1,4,7,14 (bottom value, ) 84 56 42 8 14 4 7 1

  48. You turn • find the upper and lower bounds? B={8,16} B={b,c} 48 c e 24 16 d 12 b 8 48 3 a 2

  49. Least Upper bound and greatest lower bound • If (A,R) is a poset, x∈B and B⊆A, x is called the least upper bound of B when bRx (b is before x) ∀b∈B (x is unique when it exists) and it is the earliest x in the ordering with these properties • If (A,R) is a poset, x∈B and B⊆A, then x is called the greatest lower bound of B if xRb (x is before b) ∀b∈B (x is unique when it exists) and is the latest x in the ordering with these properties

  50. Least Upper bound and greatestlower bound Hasse diagram: find the greatest lower and least upper bounds of B={1,4,8} Least upper bound: first element in ordering for which x∈B and B⊆A bRx ∀b∈B 8 (first of 8,56 ) Greatest Lower bound: last element in ordering for which x∈B and B⊆A xRb ∀b∈B 1 (only lower bound, so is 1st) 84 56 42 8 14 4 7 1

More Related