lecture 4.4: equivalence classes and partially ordered sets

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

Upload: stacia

Post on 07-Jan-2016

29 views

Category:

Documents


2 download

DESCRIPTION

Lecture 4.4: Equivalence Classes and Partially Ordered Sets. CS 250, Discrete Structures, Fall 2011 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 Presentation

TRANSCRIPT

Page 1: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4: Equivalence Classes and Partially Ordered Sets

CS 250, Discrete Structures, Fall 2011

Nitesh Saxena

*Adopted from previous lectures by Cinda Heeren

Page 2: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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 Please pick up, if haven’t done so already

Page 3: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Final Exam Thursday, 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

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

Page 4: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

HW4 HW4 to be posted by this weekend Covers the chapter on Relations Will be due in 10 days from the day of

posting

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

Page 5: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

Outline

Equivalence Classes Partially Ordered Sets (POSets) Hasse Diagrams

Page 6: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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

Page 7: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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

Page 8: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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.

Page 9: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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

Page 10: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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.

Page 11: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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.

Page 12: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

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}

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

Page 13: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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

Page 14: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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

Page 15: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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?

Page 16: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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?

Page 17: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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?

Page 18: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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.

Page 19: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

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?

Page 20: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

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

Page 21: Lecture 4.4: Equivalence Classes and Partially Ordered Sets

Lecture 4.4 -- Equivalence Classes and Partially Ordered

Sets

Today’s Reading Rosen 9.5 and 9.6