This action might not be possible to undo. Are you sure you want to continue?

BooksAudiobooksComicsSheet Music### Categories

### Categories

### Categories

Editors' Picks Books

Hand-picked favorites from

our editors

our editors

Editors' Picks Audiobooks

Hand-picked favorites from

our editors

our editors

Editors' Picks Comics

Hand-picked favorites from

our editors

our editors

Editors' Picks Sheet Music

Hand-picked favorites from

our editors

our editors

Top Books

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Audiobooks

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Comics

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Sheet Music

What's trending, bestsellers,

award-winners & more

award-winners & more

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

3. Partial orderings and partitions

Reference: Sections 4.1-4.2 of Gersting.

two important classes of relations are − partial orderings − equivalence relations (or partitions) CITS2211 Discrete Structures 1 3.Important relations Two of the most common operations on data are − ordering the data in some way − grouping the data in some way Correspondingly. Partial orderings and partitions .

and antisymmetric For example: − ≤ on − ⊆ on ℘( ) − divides on + (where x divides y ↔ y mod x = 0) The pair (S.Partial orderings A partial ordering on a set S is a binary relation ρ on S that is reflexive. Partial orderings and partitions . transitive. ρ) is called a partially-ordered set or poset − we denote an arbitrary poset by (S. p ) CITS2211 Discrete Structures 2 3.

4. consider the poset ({1. then x is an immediate predecessor of y and y is an immediate successor of x e. Partial orderings and partitions . then x is a predecessor of y and y is a successor of x − if x p y and there is no z satisfying x p z p y.g. p ): − xp y∧x≠y→xp y − equivalently.48}. divides) − the predecessors of 6 are 1. therefore we know that restricting ≤ to the odd integers is also a poset CITS2211 Discrete Structures 3 3.3. 2. {(x. x p y → x p y ∨ x = y − if x p y.36.6. y) ∈ p . and 3 − the immediate predecessors of 6 are 2 and 3 Given a poset (S. ≤) is a poset.g.12. we know that ( . y ∈ A)}) is also a poset − this is called a restriction of p to A − e. x ∈ A. p ): − A ⊆ S → (A.Terminology Given a poset (S. y) | (x.2.

12. p ) is using a graph to show the relationships between the elements of S under p − this graph is called the Hasse diagram of the poset The Hasse diagram features every element of S with a line connecting each element to each of its immediate successors − by convention.2.36.g. ≤ is a total ordering on − if (S. p ) is a total ordering then (x p y)’ ↔ y p x CITS2211 Discrete Structures 4 3.6.3. an element is drawn below its successors The Hasse diagram of a poset conveys all of the information about the poset − in particular.4. Partial orderings and partitions . consider the poset ({1. elements which are unrelated to any other elements must still be included in the diagram e. divides) − what happens if we add 5 and remove 1? A partial ordering on S in which every element of S is related to every other element is called a total ordering − the Hasse diagram for a total ordering is a chain − e.g.48}.Hasse diagrams A useful way to visualise a poset (S.

CITS2211 Discrete Structures 5 3. Partial orderings and partitions .

2. (S.6.36. p ): − a minimal element is an element with no elements below it − x ∈ S is a minimal element if [(∃y)(y ∈ S ∧ y p x)]’ − a least element is an element that is below all other elements − x ∈ S is a least element if (∀y)(y ∈ S → x p y) Note that: − a least element is always minimal.48}. but there is no greatest element − the greatest lower-bound of 6 and 4 is 2 − the least upper-bound of 6 and 4 is 12 If every pair of elements has both a greatest lower-bound and a least upper-bound. and least upper-bound are defined in complementary fashion e. Partial orderings and partitions . divides) − 1 is a least element and so the only minimal element − 36 and 48 are maximal elements. p ) is called a lattice CITS2211 Discrete Structures 6 3. consider the poset ({1.12.4.g. greatest element.Deriving information from Hasse diagrams Given a poset (S. but the opposite does not hold − every poset has at least one minimal element − every poset has at most one least element The greatest lower-bound of two elements x and y is the highest element that is below both x and y − w ∈ S is the greatest lower-bound of x and y if w p x ∧ w p y ∧ (∀z)(z p x ∧ z p y → z p w) The concepts of maximal element.3.

pairwisedisjoint subsets of S whose union is S Theorem: an equivalence relation on a set S uniquely determines a partition of S. y sit in the same row} on 2211students Given a set S and an equivalence relation ρ on S. transitive. y. z} → [x] = [w] = [y] = [z] A partition of a set S is a set of non-empty. and a partition of S uniquely determines an equivalence relation on S − proof in Gersting CITS2211 Discrete Structures 7 3. x. [x] denotes the subset of S whose members are related to x ∈ S by ρ − [x] = {y | y ∈ S ∧ x ρ y} − this is known as the equivalence class of x − [x] = {w. and symmetric For example: − = on any set S − {(x. y) | x. y) | x + y is even} on − {(x.Equivalence relations An equivalence relation on a set S is a binary relation on S that is reflexive. Partial orderings and partitions .

…} … [3/10] = {…. 2/4. 6/20. –3/–10. –6/–20. Partial orderings and partitions . …} [1/1] = {…. –2/–2.Example The set of rational numbers partition of 2 can be regarded as a [0/1] = {…. –1/–2. 1/1. 0/1. …} … Denote the equivalence relation required to define this partition by ~. 3/10. –1/–1. 1/2. given by a/b ~ c/d ↔ a d = b c We have to prove that ~ satisfies the properties required of an equivalence relation − − reflexivity: prove a/b ~ a/b a/b ~ a/b ↔ a b = b a prove a/b ~ c/d ↔ c/d ~ a/b a/b ~ c/d ↔ a d = b c ∴ cb=da ∴ c/d ~ a/b prove a/b ~ c/d ∧ c/d ~ e/f → a/b ~ e/f a/b ~ c/d ↔ a d = b c c/d ~ e/f ↔ c f = d e ∴ bcf=bde ∴ adf=bde ∴ af=be ∴ a/b ~ e/f symmetry: − transitivity: CITS2211 Discrete Structures 8 3. –2/–4. 0/–1. 0/2. 0/–2. …} [1/2] = {…. 2/2.

e. or a PERT chart − e. p ) is called a program evaluation and review technique chart. such that x p y ↔ task x is a prerequisite to task y It is easy to prove that p is reflexive. antisymmetric. Partial orderings and partitions .5) 6(1) 7(2) 8(2) 11(5) 10(3) The process must start with the minimal task(s) of the poset and end with the maximal task(s) CITS2211 Discrete Structures 9 3.g.PERT charts Partial orderings and Hasse diagrams are often used to represent problems in task scheduling Given a process that can be broken down into a set of tasks. and transitive The Hasse diagram for the poset (tasks. some tasks are prerequisites of other tasks We can define a partial ordering on tasks. it is often the case that some tasks cannot be started until some other tasks have been completed − i. manufacturing rocking chairs 2(4) 3(6) 1(3) 4(7) 5(3) 9(2) 12(0.

at each stage looking for the tasks that contribute to the minimum timeto-completion Note that the critical path may not be unique CITS2211 Discrete Structures 10 3.The critical tasks in a PERT chart We can use a PERT chart to calculate the minimum timeto-completion for a process The earliest start time (EST) for a task t is given by − EST(t) = max{ECT(u) | u is an immediate prereq. of t} The earliest completion time (ECT) for a task t is given by − ECT(t) = EST(t) + executionTime(t) The ECTs of tasks are calculated left-to-right. Partial orderings and partitions . the minimum time-tocompletion of the process is increased − if any non-critical task is delayed. the critical path should be re-computed The critical path is calculated right-to-left. starting with the minimal tasks The minimum time-to-completion of a process is the latest ECT of the tasks making up the process The critical path of a PERT chart is the sequence of tasks that contribute to the minimum time-to-completion − tasks on the critical path are called critical tasks − if any critical task is delayed.

y) | y τ z} ∪ {(x. then σ defines an sequential order for the tasks that respects the pre-requisite requirements CITS2211 Discrete Structures 11 3. we can construct a poset (S. z) | y ρ z ∧ y ≠ x} − then σ = τ ∪ {(x. σ) such that σ ⊇ ρ is a total ordering that satisfies x ρ y → x σ y − σ is called a topological sort of ρ A recursive algorithm: − choose one of the minimal elements x from ρ − let τ be a topological sort of {(y. ρ).Topological sorting Given a poset (S. Partial orderings and partitions . x)} The process is easy to visualise from the Hasse diagram If ρ represents a PERT chart.

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd