Relations Lecture 9 - - PowerPoint PPT Presentation

relations
SMART_READER_LITE
LIVE PREVIEW

Relations Lecture 9 - - PowerPoint PPT Presentation

Relations Lecture 9 Symmetric: Anti-symmetric: Transitive: Reflexive: Irreflexive: Only self-loops & No bidirectional


slide-1
SLIDE 1

Relations

Lecture 9

slide-2
SLIDE 2


 
 
 
 Reflexive:
 All self-loops 
 
 
 
 Irreflexive:
 No self-loops 
 
 
 
 Symmetric:
 Only self-loops & bidirectional edges 
 
 
 
 Anti-symmetric:
 No bidirectional edges 
 
 
 
 Transitive:
 Path from a to b implies edge (a,b)

The complete relation R = S × S is reflexive, symmetric and transitive Reflexive closure of R: Smallest relation R’ ⊇ R s.t. R’ is reflexive
 Symmetric closure of R: Smallest relation R’ ⊇ R s.t. R’ is symmetric
 Transitive closure of R: Smallest relation R’ ⊇ R s.t. R’ is transitive Each of these is unique

slide-3
SLIDE 3

Question

Let ⊏ be the empty relation (i.e., ∀a,b ¬(a⊏b)).
 Choose the best option.
 


  • A. ⊏ is transitive

  • B. ⊏ is irreflexive

  • C. ⊏ is symmetric

  • D. All of the above

  • E. Some of the above (but not all)

1

  • All. Also, anti-symmetric.
slide-4
SLIDE 4

Question

Let ⊏ be the relation over integers defined as
 x ⊏ y if |x-y| ≤ 10. Choose the best option.
 


  • A. ⊏ is transitive

  • B. ⊏ is reflexive

  • C. ⊏ is symmetric

  • D. All of the above

  • E. Some of the above (but not all)

2

Not transitive

slide-5
SLIDE 5

Equivalence Relation

A relation that is reflexive, symmetric and transitive e.g. is a relative, has the same last digit, is congruent mod 7, … Claim: Let Eq(x) ≜ {y|x~y}. If Eq(x) ∩ Eq(y) ≠ Ø, then Eq(x) = Eq(y). Let z∈Eq(x)∩Eq(y). ∀w∈Eq(x), x~w. Also, x~z ⇒ w~z.
 Also, y~z ⇒ y~w ⇒ w ∈ Eq(y). i.e., Eq(x) ⊆ Eq(y). The Equivalence classes partition the domain

Square blocks along the diagonal, after sorting the elements by equivalence class “Cliques” for each class P1,..,Pt ⊆ S
 s.t. 
 P1∪..∪Pt = S
 Pi∩Pj = Ø

slide-6
SLIDE 6

Question

Which one(s) represent(s) equivalence relation(s) 
 
 
 
 R1 R2 R3
 


  • A. R1 and R3

  • B. R1 only

  • C. R2 only

  • D. R3 only

  • E. None of the above

not reflexive not transitive

3

slide-7
SLIDE 7

Posets

Partial order: a transitive, anti-symmetric and reflexive relation e.g. ≤ for integers, divides for integers, ⊆ for sets, “containment” for line-segments Partial: Some pair may be “incomparable” Transitive and anti-symmetric → “acyclic” Partially ordered set (a.k.a Poset):
 a set and a partial order over it

Check:


  • Anti-symmetric (no bidirectional 


edges), 


  • Transitive,

  • Reflexive (all self-loops)

S1={0,1,2,3}, S2={1,2,3,4}, S3={1,2}, S4={3,4}, 
 S5 = {2}.
 Relation ⊆

Strict partial order: irreflexive, rather than reflexive Cyclic: Some node s.t. you can leave it through an edge (not self-loop), move through some edges, and return to the node

slide-8
SLIDE 8

Posets

Maximal & minimal elements of a poset (S, ≼) x∈S is maximal if ∄y∈S-{x} s.t. x≼y x∈S is minimal if ∄y∈S-{x} s.t. y≼x Need not exist (e.g., in (Z,≤)). Need not be unique when it exists (e.g., (S,⊆), where S is the set of all subsets

  • f integers that have at least one odd number)

Greatest element in T⊆S: x∈T s.t. ∀y∈T, y≼x
 Least element in T⊆S: x∈T s.t. ∀y∈T, x≼y Need not exist, even if T finite. Unique when it exists. Upper Bound for T ⊆ S: x s.t. ∀y∈T, y≼x
 Lower Bound for T ⊆ S: x s.t. ∀y∈T, x≼y Least Upper Bound for T: Least in {x| x u.b. for T}
 Greatest Lower Bound for T: Greatest in {x| x l.b. for T}

Do exist in finite posets 
 (Prove by induction on |S|)

slide-9
SLIDE 9

An Example

Let a ⊏ b iff b/a is prime (with Z+ as the domain) Let ≼ be the transitive and reflexive closure of ⊏ a ≼ b iff a|b Divisibility poset: (Z+ ,≼) When is c a lower bound 
 for T={a,b}? c≼a and c≼b. c is a common divisor for {a,b}. gcd(a,b) = greatest lower bound for {a,b} in this posey

16 8 12 4 6 9 10 14 15 2 3 5 7 11 13 1

slide-10
SLIDE 10

Total/Linear Order

In some posets every two elements are “comparable”: for {a,b}, either a⊑b or b⊑a Can arrange all the elements in a line, with all possible right-pointing edges (plus, self-loops)
 
 
 
 If finite, has unique maximal and unique minimal elements (left and right ends)

slide-11
SLIDE 11

Order Extension

A poset P’=(S,≤) is an extension of a poset P=(S,≼) if ∀a,b∈S, a ≼ b → a ≤ b Any finite poset can be extended to a total ordering (this is called topological sorting) By induction on |S| Induction step: Remove a minimal element, extend to a total ordering, reintroduce the removed element as the minimum in the total ordering. For infinite posets? The “Order Extension Principle” is typically taken as an axiom! (Unless an even stronger axiom called the “Axiom of Choice” is used)

slide-12
SLIDE 12

Chains

C ⊆ S is called a chain if ∀ a,b ∈ C, either a≼b or b≼a That is, (C,≼) is a total order Every element a∈S belongs
 to some chain in which it is
 the maximum element 
 (possibly just {a}) Height(a) = max length chain with a as the maximum E.g., In “Divisibility poset,” height(1)=1, height(p)=2 for all primes p. For m=p1d1⋅…⋅ptdt (pi primes) height(m) = 1+Σi di

Finite if S is finite

16 8 12 4 6 9 10 14 15 2 3 5 7 11 13 1

slide-13
SLIDE 13

Anti-Chains

A ⊆ S is called an anti-chain if 
 ∀a,b∈A, a≠b → neither a≼b nor b≼a (A,≼) is the equality relation Let Ah = { a | height(a)=h } For every finite h, Ah is an
 anti-chain (possibly empty) Otherwise, ∃a≠b, a≼b with height(a) = height(b) = h. 
 height(a) = h ⇒ ∃chain C s.t. a=max(C) and |C|=h
 ⇒ b∉C and C’=C∪{b} is a chain with b=max(C’) 
 ⇒ height(b) ≥ h+1 !

How?

16 8 12 4 6 9 10 14 15 2 3 5 7 11 13 1

slide-14
SLIDE 14

Anti-Chains

A ⊆ S is called an anti-chain if 
 ∀a,b∈A, a≠b → neither a≼b nor b≼a (A,≼) is the equality relation Let Ah = { a | height(a)=h } For every finite h, Ah is an
 anti-chain (possibly empty) In a finite poset, since every element has a finite height, every element appears in some Ah: i.e., Ahs partition S Mirsky’ s Theorem: Least number of anti-chains needed to partition S is exactly the length of a longest chain

16 8 12 4 6 9 10 14 15 2 3 5 7 11 13 1

Height of the poset