Structured Sets CS1200, CSE IIT Madras Meghana Nasre April 21, - - PowerPoint PPT Presentation

structured sets
SMART_READER_LITE
LIVE PREVIEW

Structured Sets CS1200, CSE IIT Madras Meghana Nasre April 21, - - PowerPoint PPT Presentation

Structured Sets CS1200, CSE IIT Madras Meghana Nasre April 21, 2020 CS1200, CSE IIT Madras Meghana Nasre Structured Sets Structured Sets Relational Structures Properties and closures Equivalence Relations Partially


slide-1
SLIDE 1

Structured Sets

CS1200, CSE IIT Madras Meghana Nasre April 21, 2020

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-2
SLIDE 2

Structured Sets

  • Relational Structures
  • Properties and closures
  • Equivalence Relations
  • Partially Ordered Sets (Posets) and Lattices
  • Algebraic Structures
  • Groups and Rings

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-3
SLIDE 3

Partially Ordered Sets

  • S1 – all words in English dictionary.
  • Relation R1 on S1:
  • (w1, w2) ∈ R1 if w1 = w2 or w1

appears before w2 in dictionary.

  • S2 – all subsets of {a, b, c}.
  • Relation R2 on S2:
  • (X, Y ) ∈ R2 if X ⊆ Y .

Defn: If R on set S is reflexive, and anti-symmetric, and transitive, then R is a partial ordering on set S. Set S along with R is known as a partially ordered set or poset. a b is used to denote (a, b) ∈ R when R is reflexive, anti-symmetric and transitive. Examples:

  • “divides” on a set {1, 2, 3, 6, 9, 12, 15, 24}.
  • x is older than y on a set of people.
  • ≤ on the set Z +.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-4
SLIDE 4

Example: Course pre-requisite structure

List of courses to be completed to graduate. S = {c1, c2, c3, . . . , cn}. R = { (ci, cj) | (ci = cj) or ci is a pre-requisite for cj }

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-5
SLIDE 5

Example: Course pre-requisite structure

List of courses to be completed to graduate. S = {c1, c2, c3, . . . , cn}. R = { (ci, cj) | (ci = cj) or ci is a pre-requisite for cj }

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-6
SLIDE 6

Example: Course pre-requisite structure

List of courses to be completed to graduate. S = {c1, c2, c3, . . . , cn}. R = { (ci, cj) | (ci = cj) or ci is a pre-requisite for cj }

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • Comparable elements.
  • Minimal elements.
  • Least element (if exists).
  • Chain and Anti-chain.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-7
SLIDE 7

Example: Course pre-requisite structure

List of courses to be completed to graduate. S = {c1, c2, c3, . . . , cn}. R = { (ci, cj) | (ci = cj) or ci is a pre-requisite for cj }

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • Comparable elements.
  • Minimal elements.
  • Least element (if exists).
  • Chain and Anti-chain.
  • Length of Longest Chain:

Minimum number of semesters needed to complete the course work.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-8
SLIDE 8

Example: Course pre-requisite structure

List of courses to be completed to graduate. S = {c1, c2, c3, . . . , cn}. R = { (ci, cj) | (ci = cj) or ci is a pre-requisite for cj }

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • Comparable elements.
  • Minimal elements.
  • Least element (if exists).
  • Chain and Anti-chain.
  • Length of Longest Chain:

Minimum number of semesters needed to complete the course work.

  • Length of Longest Anti-chain:

Maximum number of courses that one can take simultaneously (without violating pre-req).

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-9
SLIDE 9

Example: Course pre-requisite structure

List of courses to be completed to graduate. S = {c1, c2, c3, . . . , cn}. R = { (ci, cj) | (ci = cj) or ci is a pre-requisite for cj }

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-10
SLIDE 10

Example: Course pre-requisite structure

List of courses to be completed to graduate. S = {c1, c2, c3, . . . , cn}. R = { (ci, cj) | (ci = cj) or ci is a pre-requisite for cj }

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • Qn: Is there a total order on

the courses “compatible” with the given partial order?

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-11
SLIDE 11

Example: Course pre-requisite structure

List of courses to be completed to graduate. S = {c1, c2, c3, . . . , cn}. R = { (ci, cj) | (ci = cj) or ci is a pre-requisite for cj }

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • Qn: Is there a total order on

the courses “compatible” with the given partial order? An ordering: Disc. Maths, Prob.

Th., PDS, Adv. Prob., Adv. DS, Algo, RP, Adv. Algo

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-12
SLIDE 12

Example: Course pre-requisite structure

List of courses to be completed to graduate. S = {c1, c2, c3, . . . , cn}. R = { (ci, cj) | (ci = cj) or ci is a pre-requisite for cj }

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • Qn: Is there a total order on

the courses “compatible” with the given partial order? An ordering: Disc. Maths, Prob.

Th., PDS, Adv. Prob., Adv. DS, Algo, RP, Adv. Algo

  • Is this order unique?

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-13
SLIDE 13

Example: Course pre-requisite structure

List of courses to be completed to graduate. S = {c1, c2, c3, . . . , cn}. R = { (ci, cj) | (ci = cj) or ci is a pre-requisite for cj }

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • Qn: Is there a total order on

the courses “compatible” with the given partial order? An ordering: Disc. Maths, Prob.

Th., PDS, Adv. Prob., Adv. DS, Algo, RP, Adv. Algo

  • Is this order unique? No. Write

down another order.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-14
SLIDE 14

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-15
SLIDE 15

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-16
SLIDE 16

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • Prob. Th. t Disc. Maths t PDS t Adv. Prob. t Adv. DS t Algo t Adv. Algo t RP

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-17
SLIDE 17

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • Prob. Th. t Disc. Maths t PDS t Adv. Prob. t Adv. DS t Algo t Adv. Algo t RP
  • Prob. Th. t Disc. Maths t Algo t Adv. Prob. t Adv. DS t PDS t Adv. Algo t RP

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-18
SLIDE 18

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • Prob. Th. t Disc. Maths t PDS t Adv. Prob. t Adv. DS t Algo t Adv. Algo t RP
  • Prob. Th. t Disc. Maths t Algo t Adv. Prob. t Adv. DS t PDS t Adv. Algo t RP ×

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-19
SLIDE 19

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-20
SLIDE 20

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

Qn: How to construct the total order?

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-21
SLIDE 21

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

Qn: How to construct the total order? Topological sorting of a partial order.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-22
SLIDE 22

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

Qn: How to construct the total order? Topological sorting of a partial order. Claim: Every finite poset (S, ) has at least one minimal element.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-23
SLIDE 23

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

Qn: How to construct the total order? Topological sorting of a partial order. Claim: Every finite poset (S, ) has at least one minimal element. Proof: Consider any element ai ∈ S. If ai is a minimal element we are done,

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-24
SLIDE 24

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

Qn: How to construct the total order? Topological sorting of a partial order. Claim: Every finite poset (S, ) has at least one minimal element. Proof: Consider any element ai ∈ S. If ai is a minimal element we are done, else there exists an aj ∈ S such that aj ≺ ai.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-25
SLIDE 25

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

Qn: How to construct the total order? Topological sorting of a partial order. Claim: Every finite poset (S, ) has at least one minimal element. Proof: Consider any element ai ∈ S. If ai is a minimal element we are done, else there exists an aj ∈ S such that aj ≺ ai. Continue the argument with aj.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-26
SLIDE 26

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

Qn: How to construct the total order? Topological sorting of a partial order. Claim: Every finite poset (S, ) has at least one minimal element. Proof: Consider any element ai ∈ S. If ai is a minimal element we are done, else there exists an aj ∈ S such that aj ≺ ai. Continue the argument with aj. We must stop eventually since the poset is finite.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-27
SLIDE 27

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

Qn: How to construct the total order? Topological sorting of a partial order. Claim: Every finite poset (S, ) has at least one minimal element. Proof: Consider any element ai ∈ S. If ai is a minimal element we are done, else there exists an aj ∈ S such that aj ≺ ai. Continue the argument with aj. We must stop eventually since the poset is finite. Topological Sort of a finite poset (S, ) :

  • k = 1
  • while there are elements in S

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-28
SLIDE 28

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

Qn: How to construct the total order? Topological sorting of a partial order. Claim: Every finite poset (S, ) has at least one minimal element. Proof: Consider any element ai ∈ S. If ai is a minimal element we are done, else there exists an aj ∈ S such that aj ≺ ai. Continue the argument with aj. We must stop eventually since the poset is finite. Topological Sort of a finite poset (S, ) :

  • k = 1
  • while there are elements in S
  • Let ai be a minimal element in S w.r.t.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-29
SLIDE 29

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

Qn: How to construct the total order? Topological sorting of a partial order. Claim: Every finite poset (S, ) has at least one minimal element. Proof: Consider any element ai ∈ S. If ai is a minimal element we are done, else there exists an aj ∈ S such that aj ≺ ai. Continue the argument with aj. We must stop eventually since the poset is finite. Topological Sort of a finite poset (S, ) :

  • k = 1
  • while there are elements in S
  • Let ai be a minimal element in S w.r.t.
  • bk = ai

(assign the ai as the k-th element in the order.)

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-30
SLIDE 30

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

Qn: How to construct the total order? Topological sorting of a partial order. Claim: Every finite poset (S, ) has at least one minimal element. Proof: Consider any element ai ∈ S. If ai is a minimal element we are done, else there exists an aj ∈ S such that aj ≺ ai. Continue the argument with aj. We must stop eventually since the poset is finite. Topological Sort of a finite poset (S, ) :

  • k = 1
  • while there are elements in S
  • Let ai be a minimal element in S w.r.t.
  • bk = ai

(assign the ai as the k-th element in the order.)

  • S = S \ {ai}

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-31
SLIDE 31

Total ordering of a partial order

For a poset (S, ), the relation t is said to be a total order on S if a b implies a t b. Note: it is not an iff statement.

A total order is also called as a linearization of the partial order.

Qn: How to construct the total order? Topological sorting of a partial order. Claim: Every finite poset (S, ) has at least one minimal element. Proof: Consider any element ai ∈ S. If ai is a minimal element we are done, else there exists an aj ∈ S such that aj ≺ ai. Continue the argument with aj. We must stop eventually since the poset is finite. Topological Sort of a finite poset (S, ) :

  • k = 1
  • while there are elements in S
  • Let ai be a minimal element in S w.r.t.
  • bk = ai

(assign the ai as the k-th element in the order.)

  • S = S \ {ai}
  • Output b1, b2, . . . , bn as the total order.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-32
SLIDE 32

Back to Chains and Anti-chains

A poset (S, ) Chain: A subset S′ ⊆ S such that every pair of elements in S′ is comparable.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-33
SLIDE 33

Back to Chains and Anti-chains

A poset (S, ) Chain: A subset S′ ⊆ S such that every pair of elements in S′ is comparable. Maximal chain: A chain that is not a subset of any chain of the poset.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-34
SLIDE 34

Back to Chains and Anti-chains

A poset (S, ) Chain: A subset S′ ⊆ S such that every pair of elements in S′ is comparable. Maximal chain: A chain that is not a subset of any chain of the poset. Longest chain: A chain S′ s.t. no other chain has more elements than |S′|.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-35
SLIDE 35

Back to Chains and Anti-chains

A poset (S, ) Chain: A subset S′ ⊆ S such that every pair of elements in S′ is comparable. Maximal chain: A chain that is not a subset of any chain of the poset. Longest chain: A chain S′ s.t. no other chain has more elements than |S′|.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-36
SLIDE 36

Back to Chains and Anti-chains

A poset (S, ) Chain: A subset S′ ⊆ S such that every pair of elements in S′ is comparable. Maximal chain: A chain that is not a subset of any chain of the poset. Longest chain: A chain S′ s.t. no other chain has more elements than |S′|.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • S′ = {Disc.Maths, Adv.DS} a

valid chain, but not maximal.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-37
SLIDE 37

Back to Chains and Anti-chains

A poset (S, ) Chain: A subset S′ ⊆ S such that every pair of elements in S′ is comparable. Maximal chain: A chain that is not a subset of any chain of the poset. Longest chain: A chain S′ s.t. no other chain has more elements than |S′|.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • S′ = {Disc.Maths, Adv.DS} a

valid chain, but not maximal.

  • S′ = {Prob.Th., Algo, Adv.Algo}

a maximal chain but not longest.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-38
SLIDE 38

Back to Chains and Anti-chains

A poset (S, ) Chain: A subset S′ ⊆ S such that every pair of elements in S′ is comparable. Maximal chain: A chain that is not a subset of any chain of the poset. Longest chain: A chain S′ s.t. no other chain has more elements than |S′|.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • S′ = {Disc.Maths, Adv.DS} a

valid chain, but not maximal.

  • S′ = {Prob.Th., Algo, Adv.Algo}

a maximal chain but not longest.

  • Find the longest chain S′ in the

example.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-39
SLIDE 39

Back to Chains and Anti-chains

A poset (S, ) Chain: A subset S′ ⊆ S such that every pair of elements in S′ is comparable. Maximal chain: A chain that is not a subset of any chain of the poset. Longest chain: A chain S′ s.t. no other chain has more elements than |S′|.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • S′ = {Disc.Maths, Adv.DS} a

valid chain, but not maximal.

  • S′ = {Prob.Th., Algo, Adv.Algo}

a maximal chain but not longest.

  • Find the longest chain S′ in the
  • example. |S′| = 4.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-40
SLIDE 40

Back to Chains and Anti-chains

A poset (S, ) Anti-chain: A subset S′ ⊆ S such that every pair of elements in S′ is incomparable.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-41
SLIDE 41

Back to Chains and Anti-chains

A poset (S, ) Anti-chain: A subset S′ ⊆ S such that every pair of elements in S′ is incomparable. Maximal anti-chain: An anti-chain that is not a subset of any anti-chain of the poset.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-42
SLIDE 42

Back to Chains and Anti-chains

A poset (S, ) Anti-chain: A subset S′ ⊆ S such that every pair of elements in S′ is incomparable. Maximal anti-chain: An anti-chain that is not a subset of any anti-chain of the poset. Longest anti-chain: An anti-chain S′ s.t. no other anti-chain has more elements than |S′|.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-43
SLIDE 43

Back to Chains and Anti-chains

A poset (S, ) Anti-chain: A subset S′ ⊆ S such that every pair of elements in S′ is incomparable. Maximal anti-chain: An anti-chain that is not a subset of any anti-chain of the poset. Longest anti-chain: An anti-chain S′ s.t. no other anti-chain has more elements than |S′|.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-44
SLIDE 44

Back to Chains and Anti-chains

A poset (S, ) Anti-chain: A subset S′ ⊆ S such that every pair of elements in S′ is incomparable. Maximal anti-chain: An anti-chain that is not a subset of any anti-chain of the poset. Longest anti-chain: An anti-chain S′ s.t. no other anti-chain has more elements than |S′|.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • S′ = {Disc.Maths, Adv.Prob}.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-45
SLIDE 45

Back to Chains and Anti-chains

A poset (S, ) Anti-chain: A subset S′ ⊆ S such that every pair of elements in S′ is incomparable. Maximal anti-chain: An anti-chain that is not a subset of any anti-chain of the poset. Longest anti-chain: An anti-chain S′ s.t. no other anti-chain has more elements than |S′|.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • S′ = {Disc.Maths, Adv.Prob}.

Is it an anti-chain? Is it maximal?

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-46
SLIDE 46

Back to Chains and Anti-chains

A poset (S, ) Anti-chain: A subset S′ ⊆ S such that every pair of elements in S′ is incomparable. Maximal anti-chain: An anti-chain that is not a subset of any anti-chain of the poset. Longest anti-chain: An anti-chain S′ s.t. no other anti-chain has more elements than |S′|.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • S′ = {Disc.Maths, Adv.Prob}.

Is it an anti-chain? Is it maximal? But not longest.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-47
SLIDE 47

Back to Chains and Anti-chains

A poset (S, ) Anti-chain: A subset S′ ⊆ S such that every pair of elements in S′ is incomparable. Maximal anti-chain: An anti-chain that is not a subset of any anti-chain of the poset. Longest anti-chain: An anti-chain S′ s.t. no other anti-chain has more elements than |S′|.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • S′ = {Disc.Maths, Adv.Prob}.

Is it an anti-chain? Is it maximal? But not longest.

  • S′ = {Adv.DS, Algo, Adv.Prob.}

is the longest anti-chain.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-48
SLIDE 48

Relation between Chains and Anti-chain

A finite poset (S, ) and let k be the length of the longest anti-chain.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-49
SLIDE 49

Relation between Chains and Anti-chain

A finite poset (S, ) and let k be the length of the longest anti-chain. Claim: The set S can be partitioned as k chains.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-50
SLIDE 50

Relation between Chains and Anti-chain

A finite poset (S, ) and let k be the length of the longest anti-chain. Claim: The set S can be partitioned as k chains.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • The longest anti-chain is size 3.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-51
SLIDE 51

Relation between Chains and Anti-chain

A finite poset (S, ) and let k be the length of the longest anti-chain. Claim: The set S can be partitioned as k chains.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • The longest anti-chain is size 3.
  • The blue, green and black (three
  • f them) partition S.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-52
SLIDE 52

Relation between Chains and Anti-chain

A finite poset (S, ) and let k be the length of the longest anti-chain. Claim: The set S can be partitioned as k chains.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • The longest anti-chain is size 3.
  • The blue, green and black (three
  • f them) partition S.
  • Is it true for every poset?

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-53
SLIDE 53

Relation between Chains and Anti-chain

A finite poset (S, ) and let k be the length of the longest anti-chain. Claim: The set S can be partitioned as k chains.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo
  • The longest anti-chain is size 3.
  • The blue, green and black (three
  • f them) partition S.
  • Is it true for every poset?

Ex: Attempt a proof.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-54
SLIDE 54

An application

We are given a group of mn + 1 people. Show that there is:

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-55
SLIDE 55

An application

We are given a group of mn + 1 people. Show that there is:

  • either a list of m + 1 people such that every person in the list (except the

first one) is a descendant of the previous person in the list, or

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-56
SLIDE 56

An application

We are given a group of mn + 1 people. Show that there is:

  • either a list of m + 1 people such that every person in the list (except the

first one) is a descendant of the previous person in the list, or

  • there is a set of n + 1 people such that there is no pair in this set where
  • ne person is a descendant of the other.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-57
SLIDE 57

An application

We are given a group of mn + 1 people. Show that there is:

  • either a list of m + 1 people such that every person in the list (except the

first one) is a descendant of the previous person in the list, or

  • there is a set of n + 1 people such that there is no pair in this set where
  • ne person is a descendant of the other.

Proof: Let S be the set of mn + 1 people.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-58
SLIDE 58

An application

We are given a group of mn + 1 people. Show that there is:

  • either a list of m + 1 people such that every person in the list (except the

first one) is a descendant of the previous person in the list, or

  • there is a set of n + 1 people such that there is no pair in this set where
  • ne person is a descendant of the other.

Proof: Let S be the set of mn + 1 people. Define a b if either a = b or a is descendant of b.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-59
SLIDE 59

An application

We are given a group of mn + 1 people. Show that there is:

  • either a list of m + 1 people such that every person in the list (except the

first one) is a descendant of the previous person in the list, or

  • there is a set of n + 1 people such that there is no pair in this set where
  • ne person is a descendant of the other.

Proof: Let S be the set of mn + 1 people. Define a b if either a = b or a is descendant of b. Argue that (S, ) is a poset.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-60
SLIDE 60

An application

We are given a group of mn + 1 people. Show that there is:

  • either a list of m + 1 people such that every person in the list (except the

first one) is a descendant of the previous person in the list, or

  • there is a set of n + 1 people such that there is no pair in this set where
  • ne person is a descendant of the other.

Proof: Let S be the set of mn + 1 people. Define a b if either a = b or a is descendant of b. Argue that (S, ) is a poset. Let set S′ ⊆ S of people be such that for every pair a, b in S′, neither is a descendant of the other. Furthermore S′ be the largest such set. If |S′| = n + 1, we are done. Else let |S′| = k ≤ n.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-61
SLIDE 61

An application

We are given a group of mn + 1 people. Show that there is:

  • either a list of m + 1 people such that every person in the list (except the

first one) is a descendant of the previous person in the list, or

  • there is a set of n + 1 people such that there is no pair in this set where
  • ne person is a descendant of the other.

Proof: Let S be the set of mn + 1 people. Define a b if either a = b or a is descendant of b. Argue that (S, ) is a poset. Let set S′ ⊆ S of people be such that for every pair a, b in S′, neither is a descendant of the other. Furthermore S′ be the largest such set. If |S′| = n + 1, we are done. Else let |S′| = k ≤ n. By claim earlier, S can be partitioned into k ≤ n chains.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-62
SLIDE 62

An application

We are given a group of mn + 1 people. Show that there is:

  • either a list of m + 1 people such that every person in the list (except the

first one) is a descendant of the previous person in the list, or

  • there is a set of n + 1 people such that there is no pair in this set where
  • ne person is a descendant of the other.

Proof: Let S be the set of mn + 1 people. Define a b if either a = b or a is descendant of b. Argue that (S, ) is a poset. Let set S′ ⊆ S of people be such that for every pair a, b in S′, neither is a descendant of the other. Furthermore S′ be the largest such set. If |S′| = n + 1, we are done. Else let |S′| = k ≤ n. By claim earlier, S can be partitioned into k ≤ n chains. By pigeonhole principle, we must have at least one chain containing m + 1

  • people. This chain is the desired list.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-63
SLIDE 63

An application

We are given a group of mn + 1 people. Show that there is:

  • either a list of m + 1 people such that every person in the list (except the

first one) is a descendant of the previous person in the list, or

  • there is a set of n + 1 people such that there is no pair in this set where
  • ne person is a descendant of the other.

Proof: Let S be the set of mn + 1 people. Define a b if either a = b or a is descendant of b. Argue that (S, ) is a poset. Let set S′ ⊆ S of people be such that for every pair a, b in S′, neither is a descendant of the other. Furthermore S′ be the largest such set. If |S′| = n + 1, we are done. Else let |S′| = k ≤ n. By claim earlier, S can be partitioned into k ≤ n chains. By pigeonhole principle, we must have at least one chain containing m + 1

  • people. This chain is the desired list.

This completes the proof.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-64
SLIDE 64

Posets with additional Properties

A poset (S, ) and let S′ ⊆ S.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-65
SLIDE 65

Posets with additional Properties

A poset (S, ) and let S′ ⊆ S. Upper bound of S′ : An element u ∈ S (if it exists) such that a u for every a ∈ S′.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-66
SLIDE 66

Posets with additional Properties

A poset (S, ) and let S′ ⊆ S. Upper bound of S′ : An element u ∈ S (if it exists) such that a u for every a ∈ S′. Least upper bound (lub) of S′: An upper bound u which is less than every

  • ther upper bound of S′.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-67
SLIDE 67

Posets with additional Properties

A poset (S, ) and let S′ ⊆ S. Upper bound of S′ : An element u ∈ S (if it exists) such that a u for every a ∈ S′. Least upper bound (lub) of S′: An upper bound u which is less than every

  • ther upper bound of S′.

Similar definitions for lower bound and greatest lower bound (glb) of a set S′.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-68
SLIDE 68

Posets with additional Properties

A poset (S, ) and let S′ ⊆ S. Upper bound of S′ : An element u ∈ S (if it exists) such that a u for every a ∈ S′. Least upper bound (lub) of S′: An upper bound u which is less than every

  • ther upper bound of S′.

Similar definitions for lower bound and greatest lower bound (glb) of a set S′.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-69
SLIDE 69

Posets with additional Properties

A poset (S, ) and let S′ ⊆ S. Upper bound of S′ : An element u ∈ S (if it exists) such that a u for every a ∈ S′. Least upper bound (lub) of S′: An upper bound u which is less than every

  • ther upper bound of S′.

Similar definitions for lower bound and greatest lower bound (glb) of a set S′.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo

S′ = {Disc.Maths, Prob.Th., Algo}.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-70
SLIDE 70

Posets with additional Properties

A poset (S, ) and let S′ ⊆ S. Upper bound of S′ : An element u ∈ S (if it exists) such that a u for every a ∈ S′. Least upper bound (lub) of S′: An upper bound u which is less than every

  • ther upper bound of S′.

Similar definitions for lower bound and greatest lower bound (glb) of a set S′.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo

S′ = {Disc.Maths, Prob.Th., Algo}.

  • Adv. Algo is an upper bound for

S′

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-71
SLIDE 71

Posets with additional Properties

A poset (S, ) and let S′ ⊆ S. Upper bound of S′ : An element u ∈ S (if it exists) such that a u for every a ∈ S′. Least upper bound (lub) of S′: An upper bound u which is less than every

  • ther upper bound of S′.

Similar definitions for lower bound and greatest lower bound (glb) of a set S′.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo

S′ = {Disc.Maths, Prob.Th., Algo}.

  • Adv. Algo is an upper bound for

S′ but not least upper bound.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-72
SLIDE 72

Posets with additional Properties

A poset (S, ) and let S′ ⊆ S. Upper bound of S′ : An element u ∈ S (if it exists) such that a u for every a ∈ S′. Least upper bound (lub) of S′: An upper bound u which is less than every

  • ther upper bound of S′.

Similar definitions for lower bound and greatest lower bound (glb) of a set S′.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo

S′ = {Disc.Maths, Prob.Th., Algo}.

  • Adv. Algo is an upper bound for

S′ but not least upper bound.

  • Algo is an lub for S′.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-73
SLIDE 73

Posets with additional Properties

A poset (S, ) and let S′ ⊆ S. Upper bound of S′ : An element u ∈ S (if it exists) such that a u for every a ∈ S′. Least upper bound (lub) of S′: An upper bound u which is less than every

  • ther upper bound of S′.

Similar definitions for lower bound and greatest lower bound (glb) of a set S′.

  • Disc. Maths
  • Prob. Th.

PDS

  • Adv. Prob.

Algo R.P.

  • Adv. DS
  • Adv. Algo

S′ = {Disc.Maths, Prob.Th., Algo}.

  • Adv. Algo is an upper bound for

S′ but not least upper bound.

  • Algo is an lub for S′.
  • The set S′ has no lower bound

and hence no glb.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-74
SLIDE 74

Lattice: Poset with additional Properties

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-75
SLIDE 75

Lattice: Poset with additional Properties

A poset (S, ) such that every pair of elements has a both an lub and glb is called a lattice.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-76
SLIDE 76

Lattice: Poset with additional Properties

A poset (S, ) such that every pair of elements has a both an lub and glb is called a lattice. Examples:

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-77
SLIDE 77

Lattice: Poset with additional Properties

A poset (S, ) such that every pair of elements has a both an lub and glb is called a lattice. Examples: S = {1, 2, 3, 4, 5}, (a, b) ∈ R if a divides b.

  • Verify that (S, R) is a poset.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-78
SLIDE 78

Lattice: Poset with additional Properties

A poset (S, ) such that every pair of elements has a both an lub and glb is called a lattice. Examples: S = {1, 2, 3, 4, 5}, (a, b) ∈ R if a divides b.

  • Verify that (S, R) is a poset.
  • For the pair (2, 3), we see that 1 is a glb, but the pair has no upper

bounds and hence no lub.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-79
SLIDE 79

Lattice: Poset with additional Properties

A poset (S, ) such that every pair of elements has a both an lub and glb is called a lattice. Examples: S = {1, 2, 3, 4, 5}, (a, b) ∈ R if a divides b.

  • Verify that (S, R) is a poset.
  • For the pair (2, 3), we see that 1 is a glb, but the pair has no upper

bounds and hence no lub.

  • Hence (S, R) is a poset but not a lattice.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-80
SLIDE 80

Lattice: Poset with additional Properties

A poset (S, ) such that every pair of elements has a both an lub and glb is called a lattice. Examples: S = {1, 2, 3, 4, 5}, (a, b) ∈ R if a divides b.

  • Verify that (S, R) is a poset.
  • For the pair (2, 3), we see that 1 is a glb, but the pair has no upper

bounds and hence no lub.

  • Hence (S, R) is a poset but not a lattice.

Let X be any set and S = P(X). Let (A, B) ∈ R if A ⊆ B.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-81
SLIDE 81

Lattice: Poset with additional Properties

A poset (S, ) such that every pair of elements has a both an lub and glb is called a lattice. Examples: S = {1, 2, 3, 4, 5}, (a, b) ∈ R if a divides b.

  • Verify that (S, R) is a poset.
  • For the pair (2, 3), we see that 1 is a glb, but the pair has no upper

bounds and hence no lub.

  • Hence (S, R) is a poset but not a lattice.

Let X be any set and S = P(X). Let (A, B) ∈ R if A ⊆ B.

  • Verify that (S, R) is a poset.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-82
SLIDE 82

Lattice: Poset with additional Properties

A poset (S, ) such that every pair of elements has a both an lub and glb is called a lattice. Examples: S = {1, 2, 3, 4, 5}, (a, b) ∈ R if a divides b.

  • Verify that (S, R) is a poset.
  • For the pair (2, 3), we see that 1 is a glb, but the pair has no upper

bounds and hence no lub.

  • Hence (S, R) is a poset but not a lattice.

Let X be any set and S = P(X). Let (A, B) ∈ R if A ⊆ B.

  • Verify that (S, R) is a poset.
  • For any A, B ∈ P(S), we have A ∩ B is glb and A ∪ B is lub.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-83
SLIDE 83

Lattice: Poset with additional Properties

A poset (S, ) such that every pair of elements has a both an lub and glb is called a lattice. Examples: S = {1, 2, 3, 4, 5}, (a, b) ∈ R if a divides b.

  • Verify that (S, R) is a poset.
  • For the pair (2, 3), we see that 1 is a glb, but the pair has no upper

bounds and hence no lub.

  • Hence (S, R) is a poset but not a lattice.

Let X be any set and S = P(X). Let (A, B) ∈ R if A ⊆ B.

  • Verify that (S, R) is a poset.
  • For any A, B ∈ P(S), we have A ∩ B is glb and A ∪ B is lub.
  • Hence (S, R) is a poset that is a lattice.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-84
SLIDE 84

Lattice: Poset with additional Properties

A poset (S, ) such that every pair of elements has a both an lub and glb is called a lattice. Examples: S = {1, 2, 3, 4, 5}, (a, b) ∈ R if a divides b.

  • Verify that (S, R) is a poset.
  • For the pair (2, 3), we see that 1 is a glb, but the pair has no upper

bounds and hence no lub.

  • Hence (S, R) is a poset but not a lattice.

Let X be any set and S = P(X). Let (A, B) ∈ R if A ⊆ B.

  • Verify that (S, R) is a poset.
  • For any A, B ∈ P(S), we have A ∩ B is glb and A ∪ B is lub.
  • Hence (S, R) is a poset that is a lattice.

Ex: Read Example 25 in Section 9.6[KR] for application of lattices.

CS1200, CSE IIT Madras Meghana Nasre Structured Sets

slide-85
SLIDE 85

Summary

  • Posets and properties.
  • Chains and Anti-chains and useful relations between size of longest one

and “covers” by the other.

  • Posets with additional properties : Lattices.
  • Reference: Section 9.6 [KR]

CS1200, CSE IIT Madras Meghana Nasre Structured Sets