Section 8.6 What Is a Partial Order?
Total Page:16
File Type:pdf, Size:1020Kb
Announcements ICS 6B } Regrades for Quiz #3 and Homeworks #4 & Boolean Algebra & Logic 5 are due Today Lecture Notes for Summer Quarter, 2008 Michele Rousseau Set 8 – Ch. 8.6, 11.6 Lecture Set 8 - Chpts 8.6, 11.1 2 Today’s Lecture } Chapter 8 8.6, Chapter 11 11.1 ● Partial Orderings 8.6 Chapter 8: Section 8.6 ● Boolean Functions 11.1 Partial Orderings (Continued) Lecture Set 8 - Chpts 8.6, 11.1 3 What is a Partial Order? Some more defintions Let R be a relation on A. The R is a partial order iff R is: } If A,R is a poset and a,b are A, reflexive, antisymmetric, & transitive we say that: } A,R is called a partially ordered set or “poset” ● “a and b are comparable” if ab or ba } Notation: ◘ i.e. if a,bR and b,aR ● If A, R is a poset and a and b are 2 elements of A ● “a and b are incomparable” if neither ab nor ba such that a,bR, we write a b instead of aRb ◘ i.e if a,bR and b,aR } If two objects are always related in a poset it is called a total order, linear order or simple order. NOTE: it is not required that two things be related under a partial order. ● In this case A,R is called a chain. ● i.e if any two elements of A are comparable ● That’s the “partial” of it. ● So for all a,b A, it is true that a,bR or b,aR 5 Lecture Set 8 - Chpts 8.6, 11.1 6 1 Now onto more examples… More Examples Let Aa,b,c,d and let R be the relation Let A0,1,2,3 and on A represented by the diagraph Let R0,01,1, 2,0,2,2,2,33,3 The R is reflexive, but We draw the associated digraph: a b not antisymmetric a,c &c,a It is easy to check that R is 0 and not 1 c d transitive d,cc,a, but not d,a Refl. , antisym. & trans. 2 So A,R is a poset. 3 The elements 1,3 are incomparable because 1, 3 R and 3, 1 R so A,R is not a total ordered set. Lecture Set 8 - Chpts 8.6, 11.1 7 Lecture Set 8 - Chpts 8.6, 11.1 8 More Examples (3) Another example Let Aa,b,c,d and let R be the related Matrix: Aall people Rthe relation “a not taller than b” 1 1 1 0 To check Then 0 1 1 0 properties ab 0 0 11 more easily R is reflexive a is not taller than a 1 1 0 1 lets convert it to a diagraph RiR is not antiiisymmetric [][ ] d c ● If “a is not taller than b” and “b is not taller than a”, then a and b have the same height, but a is not necessarily equal to b – it could be 2 people of the We see that R is reflexive loops at every vertex same height. and antisymmetric no double arrows Not a poset! It is not transitive eg. c,d & d,a, but no c,a Lecture Set 8 - Chpts 8.6, 11.1 9 Lecture Set 8 - Chpts 8.6, 11.1 10 Lexicographic Order Lexicographic Order Suppose that A1.1 and A2,2 are two posets. } Lexicographic order is how we order words We construct a partial ordering on the Cartesian product A1x A2. in the dictionary Given 2 elements a1, a2 and b1, b2 in A1x A2 ● It is AKA dictionary order or alphabetic order We say that a1, a2b1, b2 Iff a b but a b ● First, we compare the 1st letters, if they are 1 1 1 1 or a b and a b . equal then we check the 2nd pair and etc. 1 1 2 2 ◘ E.g Let S1,2,3 In other words, ◘ The lexicographical order of a1, a2b1, b2 iff PS ,1,1,2,1,2,3,1,3,2,2,3,3 1. the first entries of a1, a2 the first entries of b1, b2 or } We can apply this to any poset 2. the first entries of a1, a2and b1, b2 , nd nd ● On a poset it is a natural order structure on the and the 2 entries of a1, a2 the 2 entries of b1, b2 entry Cartesian product. 11 12 2 Examples Example (2) Which of the following are true? EX. A1 A2; R1 R2 Then 1,3 1,4 ; 1,3 2,0; 3,5 4,8 True 1, 3 1, 3 4,4 2,8 False In general, ggiven a1, a2 and b1, b2, ,3,8 ,4,5 True compare a1 and b1 1,2,4,10 1,2,5,8 True If a b then 1 1 2,4,5 2,3,6 False a , a b , b 1 2 1 2 1,5,8 2,3,4 True ElseIf a1 b1 , then If b1 b2 then a1, a2b1, b2 Lecture Set 8 - Chpts 8.6, 11.1 13 Lecture Set 8 - Chpts 8.6, 11.1 14 Strings Well Ordered Set } We apply this ordering to strings of symbols where } Let A,R be a poset there is an underlying 'alphabetical' or partial order which is a total order in this case. We say that A is a well‐ordered set if any non‐empty subset BA has a least element. Example: In other words, } Let A a, b, c and suppose R is the natural aB is a least element if ab for all bB. alphabetical order on A: recall that R is denoted by a R b and b R c. Example Then , is well ordered ● Any shorter string is related to any longer string comes ● Any subset B which is not empty has a least element. before it in the ordering. ● Eg if B2,3,4,5,27,248,1253 then the least element is ● If two strings have the same length then use the induced a2, because a b for all bB. partial order from the alphabetical order: aabc R abac , is not well ordered 15 ● Choose B, there is no least element 16 Hasse Diagram Example Construct the Hasse diagram of To every poset A,R we associate a Hasse diagram A1, 2, 3, R ● A graph that carries less info than the diagraph } Thus R1,1,1,2,1,3,2,2,2,3,3,3 To construct a Hasse diagram: Step 2: 1 Construct a digraph representation of the poset Step 1:Draw the Digraph Remove loops A, R so that all arcs point up except the loops. With arrows ppgpointing up 2 Eliminate all loops 3 • R is reflexive – SO we know they are there 3 Eliminate all arcs that are redundant because of Step 3: Eliminate 2 transitivity redundant transitive arcs • Keep a,b and b,c Æ remove a,c 4 Eliminate the arrows at the ends of arcs since 1 everything points up. and it is antisymmetric so arrows Step 4: Remove arrows go only 1 way 17 Lecture Set 8 - Chpts 8.6, 11.1 18 3 Example (2) Example (3) Construct the Hasse diagram of Pa, b, c, } The elements of Pa, b, c are } Given the Hasse diagram write down all the ordered pairs in R a, b, c } Okay, so what do we know about this diagram a, b, a, c, b, c {a, b, c} c d } We know it is antisymmetric a, b, c • and that the arrows point up } Basically, it shows } {a, c} {a, b} {b, c} We know it is reflexive a hierarchy } We also know it is transitive {a} {b} b {c} } Now that we have the diagraph R is easy to find a Ra,a,a,b,a,c,a,d,b,b,b,c, b,d,c,c,d,d Lecture Set 8 - Chpts 8.6, 11.1 19 Lecture Set 8 - Chpts 8.6, 11.1 20 Maximal and Minimal Elements Example Let S, be a poset } In this diagram An element a S is called maximal if there What is the maximal element? is no b such that a b. What is the minimal element? In other words {a, b, c} MMiaxima l a is not less than any element in the poset. Similarly, Note: there can {a, c} {a, b} {b, c} An element B S is called minimal if there is be more than 1 minimal and {a} {b} no b such that b a. maximal element {c} in a poset These are easy to find in a Hasse diagram Minimal Because they are the “top” and “bottom” elements Lecture Set 8 - Chpts 8.6, 11.1 21 Lecture Set 8 - Chpts 8.6, 11.1 22 Example (2) Greatest and Least Elements aS is called the greatest element of poset 3 Maximal elements S, , if b a , b S } If there is only 1 maximal element then it Note: Every poset is the greatest. h1has 1 or more aS is called the least element of poset S, maximal elements and 1 or more , if a b , b S Minimal elements } If there is only 1 minimal element then it is the least 2 Minimal elements Note: The greatest and least may not exist Lecture Set 8 - Chpts 8.6, 11.1 23 Lecture Set 8 - Chpts 8.6, 11.1 24 4 Examples Upper and Lower Bounds Let S be a subset of A in the poset A, R.