lecture 4.4: equivalence classes and partially ordered sets
DESCRIPTION
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 - PowerPoint PPT PresentationTRANSCRIPT
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 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
04/22/23 2
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
04/22/23 3
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
04/22/23 4
Outline
Equivalence Classes Partially Ordered Sets (POSets) Hasse Diagrams
04/22/23 5
Equivalence ClassesLemma: Let R be an equivalence relation on
S. Then1. 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
04/22/23 6
Equivalence ClassesLemma: Let R be an equivalence relation on S.
Then1. 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.
S [a]RaS
04/22/23 7
Equivalence ClassesSo 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
Each Ai is called a block of the
partition.
04/22/23 8
Equivalence ClassesGive a partition of the reals into 2 blocks(numbers <= 0) and (numbers > 0)
Give a partition of the integers into 4 blocksnumbers modulo 4
04/22/23 9
Equivalence ClassesTheorem: if R is a _____ S, then {[a]R : a S} is a _____
S.A. Partition of, equivalence relation
onB. Subset of, equivalence class ofC. Relation on, partition ofD. Equivalence relation on, partition
ofE. 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.
04/22/23 10
Equivalence ClassesTheorem: 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.
04/22/23 11
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}
04/22/23 12
Partially Ordered Sets (POSets)
Let R be a relation then R is a Partially Ordered Set (POSet) if it isReflexive - aRa, aTransitive - aRb bRc aRc, a,b,cAntisymmetric - 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
04/22/23 13
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
04/22/23 14
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?
04/22/23 15
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?
04/22/23 16
Partially Ordered Sets (POSets)Ex. (2S, ), the relation “subset” on set of all subsets of S.
Yes, A A, A 2SReflexive?
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?
04/22/23 17
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.
04/22/23 18
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.”
A. 0110 1000
B. 0110 0000
C. 0110 1110
D. 0110 1011
A total order?
04/22/23 19
Hasse DiagramsHasse 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
04/22/23 20
Today’s Reading Rosen 9.5 and 9.6
04/22/23 21