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 Ordered Sets (Posets) and Lattices • Algebraic Structures • Groups and Rings CS1200, CSE IIT Madras Meghana Nasre Structured Sets
Partially Ordered Sets • S 2 – all subsets of { a , b , c } . • S 1 – all words in English dictionary. • Relation R 2 on S 2 : • Relation R 1 on S 1 : • ( X , Y ) ∈ R 2 if X ⊆ Y . • ( w 1 , w 2 ) ∈ R 1 if w 1 = w 2 or w 1 appears before w 2 in dictionary. 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
Example: Course pre-requisite structure List of courses to be completed to graduate. S = { c 1 , c 2 , c 3 , . . . , c n } . R = { ( c i , c j ) | ( c i = c j ) or c i is a pre-requisite for c j } CS1200, CSE IIT Madras Meghana Nasre Structured Sets
Example: Course pre-requisite structure List of courses to be completed to graduate. S = { c 1 , c 2 , c 3 , . . . , c n } . R = { ( c i , c j ) | ( c i = c j ) or c i is a pre-requisite for c j } Adv. Algo R.P. Adv. DS Algo PDS Adv. Prob. Disc. Maths Prob. Th. CS1200, CSE IIT Madras Meghana Nasre Structured Sets
Example: Course pre-requisite structure List of courses to be completed to graduate. S = { c 1 , c 2 , c 3 , . . . , c n } . R = { ( c i , c j ) | ( c i = c j ) or c i is a pre-requisite for c j } • Comparable elements. • Minimal elements. Adv. Algo • Least element (if exists). R.P. Adv. DS • Chain and Anti-chain. Algo PDS Adv. Prob. Disc. Maths Prob. Th. CS1200, CSE IIT Madras Meghana Nasre Structured Sets
Example: Course pre-requisite structure List of courses to be completed to graduate. S = { c 1 , c 2 , c 3 , . . . , c n } . R = { ( c i , c j ) | ( c i = c j ) or c i is a pre-requisite for c j } • Comparable elements. • Minimal elements. Adv. Algo • Least element (if exists). R.P. Adv. DS • Chain and Anti-chain. • Length of Longest Chain: Algo Minimum number of semesters needed to complete the course PDS work. Adv. Prob. Disc. Maths Prob. Th. CS1200, CSE IIT Madras Meghana Nasre Structured Sets
Example: Course pre-requisite structure List of courses to be completed to graduate. S = { c 1 , c 2 , c 3 , . . . , c n } . R = { ( c i , c j ) | ( c i = c j ) or c i is a pre-requisite for c j } • Comparable elements. • Minimal elements. Adv. Algo • Least element (if exists). R.P. Adv. DS • Chain and Anti-chain. • Length of Longest Chain: Algo Minimum number of semesters needed to complete the course PDS work. Adv. Prob. • Length of Longest Anti-chain: Maximum number of courses Disc. Maths Prob. Th. that one can take simultaneously (without violating pre-req). CS1200, CSE IIT Madras Meghana Nasre Structured Sets
Example: Course pre-requisite structure List of courses to be completed to graduate. S = { c 1 , c 2 , c 3 , . . . , c n } . R = { ( c i , c j ) | ( c i = c j ) or c i is a pre-requisite for c j } Adv. Algo R.P. Adv. DS Algo PDS Adv. Prob. Disc. Maths Prob. Th. CS1200, CSE IIT Madras Meghana Nasre Structured Sets
Example: Course pre-requisite structure List of courses to be completed to graduate. S = { c 1 , c 2 , c 3 , . . . , c n } . R = { ( c i , c j ) | ( c i = c j ) or c i is a pre-requisite for c j } Adv. Algo R.P. • Qn: Is there a total order on Adv. DS the courses “compatible” with Algo the given partial order? PDS Adv. Prob. Disc. Maths Prob. Th. CS1200, CSE IIT Madras Meghana Nasre Structured Sets
Example: Course pre-requisite structure List of courses to be completed to graduate. S = { c 1 , c 2 , c 3 , . . . , c n } . R = { ( c i , c j ) | ( c i = c j ) or c i is a pre-requisite for c j } Adv. Algo R.P. • Qn: Is there a total order on Adv. DS the courses “compatible” with Algo the given partial order? An ordering: Disc. Maths, Prob. PDS Th., PDS, Adv. Prob., Adv. DS, Algo, RP, Adv. Algo Adv. Prob. Disc. Maths Prob. Th. CS1200, CSE IIT Madras Meghana Nasre Structured Sets
Example: Course pre-requisite structure List of courses to be completed to graduate. S = { c 1 , c 2 , c 3 , . . . , c n } . R = { ( c i , c j ) | ( c i = c j ) or c i is a pre-requisite for c j } Adv. Algo R.P. • Qn: Is there a total order on Adv. DS the courses “compatible” with Algo the given partial order? An ordering: Disc. Maths, Prob. PDS Th., PDS, Adv. Prob., Adv. DS, Algo, RP, Adv. Algo Adv. Prob. • Is this order unique? Disc. Maths Prob. Th. CS1200, CSE IIT Madras Meghana Nasre Structured Sets
Example: Course pre-requisite structure List of courses to be completed to graduate. S = { c 1 , c 2 , c 3 , . . . , c n } . R = { ( c i , c j ) | ( c i = c j ) or c i is a pre-requisite for c j } Adv. Algo R.P. • Qn: Is there a total order on Adv. DS the courses “compatible” with Algo the given partial order? An ordering: Disc. Maths, Prob. PDS Th., PDS, Adv. Prob., Adv. DS, Algo, RP, Adv. Algo Adv. Prob. • Is this order unique? No. Write down another order. Disc. Maths Prob. Th. CS1200, CSE IIT Madras Meghana Nasre Structured Sets
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
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
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. Adv. Algo R.P. Adv. DS Algo PDS Adv. Prob. Disc. Maths Prob. Th. 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
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. Adv. Algo R.P. Adv. DS Algo PDS Adv. Prob. Disc. Maths Prob. Th. 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
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. Adv. Algo R.P. Adv. DS Algo PDS Adv. Prob. Disc. Maths Prob. Th. 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
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
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
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
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
Recommend
More recommend