All Perfect Elimination Orderings & Minimal Vertex Seperators
Partial Orderings
description
Transcript of Partial Orderings
![Page 1: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/1.jpg)
1
Partial Orderings
Based on Slides by Chuck Allison from
http://uvsc.freshsources.com/Courses/CS_2300/Slides/slides.html
Rosen, Chapter 8.6
Modified by Longin Jan Latecki
![Page 2: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/2.jpg)
2
Introduction
An equivalence relation is a relation that is reflexive, symmetric, and transitive
A partial ordering (or partial order) is a relation that is reflexive, antisymmetric, and transitive• Recall that antisymmetric means that if (a,b) R, then
(b,a) R unless b = a
• Thus, (a,a) is allowed to be in R
• But since it’s reflexive, all possible (a,a) must be in R
![Page 3: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/3.jpg)
3
Partially Ordered Set (POSET)
A relation R on a set S is called a partial ordering or partial order if it is reflexive, antisymmetric, and transitive. A set S together with a partial ordering R is called a partially ordered set, or poset, and is denoted by (S, R)
![Page 4: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/4.jpg)
4
Example (1)
Let S = {1, 2, 3} and
let R = {(1,1), (2,2), (3,3), (1, 2), (3,1), (3,2)}
1
23
![Page 5: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/5.jpg)
5
In a poset the notation a b denotes that
This notation is used because the “less than or equal to” relation is a paradigm for a partial ordering. (Note that the symbol is used to denote the relation in any poset, not just the “less than or equals” relation.) The notation a b denotes thata b, but
( , )a b R
a b
![Page 6: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/6.jpg)
6
Example
Let S = {1, 2, 3} and
let R = {(1,1), (2,2), (3,3), (1, 2), (3,1), (3,2)}
1
23
2 2 3 2
![Page 7: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/7.jpg)
7
Example (2)
Show that ≥ is a partial order on the set of integers
• It is reflexive: a ≥ a for all a Z
• It is antisymmetric: if a ≥ b then the only way that b ≥ a is when b = a
• It is transitive: if a ≥ b and b ≥ c, then a ≥ c
Note that ≥ is the partial ordering on the set of integers
(Z, ≥) is the partially ordered set, or poset
![Page 8: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/8.jpg)
8
Example (3)
Consider the power set of {a, b, c} and the subset relation. (P({a,b,c}), )
Draw a graph of this relation.
![Page 9: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/9.jpg)
9
Comparable / Incomparable
The elements a and b of a poset (S, ) are called comparable if either a b or b a. When a and b are elements of S such that neither a b nor b a, a and b are called incomparable.
![Page 10: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/10.jpg)
10
Example
Consider the power set of {a, b, c} and the subset relation. (P({a,b,c}), )
{ , } { , } and { , } { , }a c a b a b a c
So, {a,c} and {a,b} are incomparable
![Page 11: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/11.jpg)
11
(S, )If is a poset and every two elements of S are comparable, S is called totally ordered or linearly ordered set, and is called a total order or a linear order. A totally ordered set is also called a chain.
Totally Ordered, Chains
![Page 12: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/12.jpg)
12
In the poset (Z+,≤), are the integers 3 and 9 comparable?• Yes, as 3 ≤ 9
Are 7 and 5 comparable?• Yes, as 5 ≤ 7
As all pairs of elements in Z+ are comparable, the poset (Z+,≤) is a total order• a.k.a. totally ordered poset, linear order, or chain
![Page 13: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/13.jpg)
13
In the poset (Z+,|) with “divides” operator |, are the integers 3 and 9 comparable?• Yes, as 3 | 9
Are 7 and 5 comparable?• No, as 7 | 5 and 5 | 7
Thus, as there are pairs of elements in Z+ that are not comparable, the poset (Z+,|) is a partial order. It is not a chain.
![Page 14: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/14.jpg)
14
![Page 15: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/15.jpg)
15
(S, ) is a well-ordered set if it is a poset such that is a total ordering and such that every nonempty subset of S has a least element.
Well-Ordered Set
Example: Consider the ordered pairs of positive integers, Z+ x Z+ where
1 2 1 2 1 1 1 1 2 2( , ) ( , ) if , or if and a a b b a b a b a b
![Page 16: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/16.jpg)
16
Well-ordered sets examples
Example: (Z,≤)• Is a total ordered poset (every element is comparable to
every other element)• It has no least element• Thus, it is not a well-ordered set
Example: (S,≤) where S = { 1, 2, 3, 4, 5 }• Is a total ordered poset (every element is comparable to
every other element)• Has a least element (1)• Thus, it is a well-ordered set
![Page 17: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/17.jpg)
17
Lexicographic Order
This ordering is called lexicographic because it is the way that words are ordered in the dictionary.
![Page 18: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/18.jpg)
18
![Page 19: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/19.jpg)
19
For any positive integers m and n and a1a2…am and b1b2…bn in .
1. If and ai = bi for all i = 1, 2, , . . ., m, then
a1,a2…am b1b2….bn.
2. If for some integer k withfor all i = 1,2,…,k-1, and ak R bk but , then
a1,a2…am b1b2….bn.
3. If is the null string and s is any string inthen s.
m n
*
Let be a finite set and suppose R is a partial order relation defined on . Define a relation on , the set of all strings over , as follows:
*
, , and 1, i ik m k n k a b k ka b
*
![Page 20: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/20.jpg)
20
The Principle of Well-Ordered Induction
Suppose that S is a well-ordered set. Then P(x) is true for all x S, if:
BASIS STEP: P(x0) is true for the least element of S, and
INDUCTION STEP: For every y S if P(x) is true for all x y, then P(y) is true.
![Page 21: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/21.jpg)
21
Hasse Diagrams
Given any partial order relation defined on a finite set, it is possible to draw the directed graph so that all of these properties are satisfied.
This makes it possible to associate a somewhat simpler graph, called a Hasse diagram, with a partial order relation defined on a finite set.
![Page 22: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/22.jpg)
22
Hasse Diagrams (continued)
Start with a directed graph of the relation in which all arrows point upward. Then eliminate:
1. the loops at all the vertices,
2. all arrows whose existence is implied by the transitive property,
3. the direction indicators on the arrows.
![Page 23: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/23.jpg)
23
Example
Let A = {1, 2, 3, 9, 19} and consider the “divides” relation on A:
For all , , | for some integer .a b A a b b ka k
1
2
3
9
18
![Page 24: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/24.jpg)
24
Example
Eliminate the loops at all the vertices.
1
2
3
9
18
Eliminate all arrows whose existence is implied by the transitive property.Eliminate the direction indicators on the arrows.
![Page 25: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/25.jpg)
25
Hasse Diagram
For the poset ({1,2,3,4,6,8,12}, |)
![Page 26: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/26.jpg)
26
![Page 27: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/27.jpg)
27
a is a maximal in the poset (S, ) if there is nosuch that a b. Similarly, an element of a poset is called minimal if it is not greater than any element of the poset. That is, a is minimal if there is no element such that b a.
It is possible to have multiple minimals and maximals.
Maximal and Minimal Elements
b S
b S
![Page 28: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/28.jpg)
28
a is the greatest element in the poset (S, ) if b afor all . Similarly, an element of a poset is called the least element if it is less or equal than all other elements in the poset. That is, a is the least element ifa b for all
Greatest ElementLeast Element
b S
b S
![Page 29: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/29.jpg)
29
Upper bound, Lower bound
Sometimes it is possible to find an element that is greater than all the elements in a subset A of a poset (S, ). If u is an element of S such that a u for all elements , then u is called an upper bound of A. Likewise, there may be an element less than all the elements in A. If l is an element of S such that l a for all elements , then l is called a lower bound of A.
a A
a A
Examples 18, p. 574 in Rosen.
![Page 30: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/30.jpg)
30
Least Upper Bound,Greatest Lower Bound
The element x is called the least upper bound (lub) of the subset A if x is an upper bound that is less than every other upper bound of A.
The element y is called the greatest lower bound (glb) of A if y is a lower bound of A and z y whenever z is a lower bound of A.
Examples 19 and 20, p. 574 in Rosen.
![Page 31: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/31.jpg)
31
Lattices
A partially ordered set in which every pair of elements has both a least upper bound and a greatest lower bound is called a lattice.
![Page 32: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/32.jpg)
32
Examples 21 and 22, p. 575 in Rosen.
![Page 33: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/33.jpg)
33
Lattice Model (LinuxSecurity.com)
(I) A security model for flow control in a system, based on the lattice that is formed by the finite security levels in a system and their partial ordering. [Denn] (See: flow control, security level, security model.) (C) The model describes the semantic structure formed by a finite set of security levels, such as those used in military organizations. (C) A lattice is a finite set together with a partial ordering on its elements such that for every pair of elements there is a least upper bound and a greatest lower bound. For example, a lattice is formed by a finite set S of security levels -- i.e., a set S of all ordered pairs (x, c), where x is one of a finite set X of hierarchically ordered classification levels (X1, ..., Xm), and c is a (possibly empty) subset of a finite set C of non-hierarchical categories (C1, ..., Cn) -- together with the "dominate" relation. (See: dominate.)
![Page 34: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/34.jpg)
34
Topological Sorting
A total ordering is said to be compatible with the partial ordering R if a b whenever a R b. Constructing a total ordering from a partial ordering is called topological sorting.
![Page 35: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/35.jpg)
35
0 1 2 3 4
5 6 7 8 9
If there is an edge from v to w, then v precedes w in the sequential listing.
9 6 3 4 8 2 0 5 1 7
![Page 36: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/36.jpg)
36
Example
Consider the set A = {2, 3, 4, 6, 18, 24} ordered by the “divides” relation. The Hasse diagram follows:
The ordinary “less than or equal to” relation on this set is a topological sorting for it since for positive integers a and b, if a|b then a b.
24
4
2
18
6
3
![Page 37: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/37.jpg)
37
Topological Sorting
![Page 38: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/38.jpg)
38
Assemble an Automobile
1) Build Frame2) Install engine, power train components, gas
tank.3) Install brakes, wheels, tires.4) Install dashboard, floor, seats.5) Install electrical lines.6) Install gas lines.7) Attach body panels to frame8) Paint body.
![Page 39: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/39.jpg)
39
Prerequisites
Task Immediately Preceding Tasks
Time Needed to Perform Task
1
2
3
4
5
6
7
8
9
1
1
2
2, 3
4
2, 3
4, 5
6, 7, 8
7 hours
6 hours
3 hours
6 hours
3 hours
1 hour
1 hour
2 hours
5 hours
![Page 40: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/40.jpg)
40
Example – Job SchedulingWhat is the total order compatible with it?
Task 17 hours
Task 26 hours
Task 33 hours
Task 46 hours
Task 53 hours
Task 71 hour
Task 61 hour
Task 82 hour
Task 95 hour
![Page 41: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/41.jpg)
41
![Page 42: Partial Orderings](https://reader033.fdocuments.us/reader033/viewer/2022061414/568150a7550346895dbeb1ee/html5/thumbnails/42.jpg)
42
Example 27, p. 578 in Rosen.