+ All Categories
Home > Documents > CSCI 115 Chapter 6 Order Relations and Structures.

CSCI 115 Chapter 6 Order Relations and Structures.

Date post: 14-Dec-2015
Category:
Upload: miya-morland
View: 218 times
Download: 1 times
Share this document with a friend
35
CSCI 115 Chapter 6 Order Relations and Structures
Transcript
Page 1: CSCI 115 Chapter 6 Order Relations and Structures.

CSCI 115

Chapter 6

Order Relations and Structures

Page 2: CSCI 115 Chapter 6 Order Relations and Structures.

CSCI 115

§6.1

Partially Ordered Sets

Page 3: CSCI 115 Chapter 6 Order Relations and Structures.

§6.1 – Partially Ordered Sets

• POSET– A relation R on a set A is called a partial order

if R is reflexive, antisymmetric, and transitive. The set A together with the partial order R is called a partially ordered set or poset, and is denoted (A,R).

Page 4: CSCI 115 Chapter 6 Order Relations and Structures.

§6.1 – Partially Ordered Sets

• Dual• • Comparable• Linear order (chain)

Page 5: CSCI 115 Chapter 6 Order Relations and Structures.

§6.1 – Partially Ordered Sets

• Theorem 6.1.1– If (A, 1) and (B, 2) are posets, then

(A x B, ) is a poset where is defined by:(a, b) (a’, b’) iff a 1 a’ in A and b 2 b’ in B.

• (A x A, ) where 1 = 2 is called the product partial order

Page 6: CSCI 115 Chapter 6 Order Relations and Structures.

§6.1 – Partially Ordered Sets

• <– a < b if a b and a b

• Lexicographic (dictionary) order– Let (A, ) and (B, ) be posets. Then defined as

(a, b) (a’, b’) iff a < a’ or a = a’ and b b’ is a partial order called the lexicographic or dictionary order.

Page 7: CSCI 115 Chapter 6 Order Relations and Structures.

§6.1 – Partially Ordered Sets

• Theorem 6.1.2– The digraph of a partial order has no cycle of

length greater than 1

Page 8: CSCI 115 Chapter 6 Order Relations and Structures.

§6.1 – Partially Ordered Sets

• Hasse Diagram for (A, )– i) Draw digraph of – ii) Delete all cycles of length 1– iii) Delete all edges implied by transitive property– iv) Draw diagram with all edges pointing up and omit any arrows– v) Replace circles with labeled points

• Hasse diagram gives a visual representation with all the implied components removed

Page 9: CSCI 115 Chapter 6 Order Relations and Structures.

§6.1 – Partially Ordered Sets

• Topological Sorting– Linear order that is an extension of a partial

order– Typical notation: – Many topological sortings may exist for a given

partial order

Page 10: CSCI 115 Chapter 6 Order Relations and Structures.

§6.1 – Partially Ordered Sets

• Let (A, ) and (B, ) be posets. Let f:AB. f is called an isomorphism if:– i) f is a 1-1 correspondence– ii) a1, a2 A, a1 a2 iff f(a1) f(a2)

• In this case, we say (A, ) and (B, ) are isomorphic posets.

Page 11: CSCI 115 Chapter 6 Order Relations and Structures.

§6.1 – Partially Ordered Sets

• Theorem 6.1.3 (Principle of correspondence)– Let (A, ) and (B, ) be finite posets and f:AB be a 1-1

correspondence. Let H be the Hasse diagram of (A, ). Then:• i) If f is an isomorphism and each label a of H is replaced by

f(a), then H becomes a Hasse diagram for (B, ).• ii) If H becomes a Hasse diagram for (B, ) when each label a

of H is replaced by f(a), then f is an isomorphism.

Page 12: CSCI 115 Chapter 6 Order Relations and Structures.

CSCI 115

§6.2

Extremal Elements of Partially Ordered Sets

Page 13: CSCI 115 Chapter 6 Order Relations and Structures.

§6.2 Extremal elements of posets

• Maximal Element– aA is a maximal element of (A,R) if there does not

exist cA s.t. a < c• Minimal Element

– bA is a minimal element of (A,R) if there does not exist dA s.t. d < b

• Theorem 6.2.1– Let (A,) be a poset with A finite and non-empty. Then

A has at least one maximal element, and at least one minimal element.

Page 14: CSCI 115 Chapter 6 Order Relations and Structures.

§6.2 Extremal elements of posets

• Procedure to find a topological sorting of a finite poset (A, ≤)

1. Declare an array called SORT the size of |A|2. Choose a minimal element x of A and remove

x from A3. Make x the next element in SORT4. Repeat steps 2 – 3 until A = {}

Page 15: CSCI 115 Chapter 6 Order Relations and Structures.

§6.2 Extremal elements of posets

• Greatest Element (Unit Element: 1)– aA is a greatest element of (A,R) if xA x a.

• Least Element (Zero Element: 0)– bA is a least element of (A,R) if xA b x.

• Theorem 6.2.2– A poset has at most one greatest element, and at

most one least element.

Page 16: CSCI 115 Chapter 6 Order Relations and Structures.

§6.2 Extremal elements of posets

• Let (A, ) be a poset, with B A.– Upper Bound (UB)

• aA is an upper bound of B if b a bB.– Least Upper Bound (LUB)

• aA is a least upper bound of B if a is an upper bound for B, and a a’ whenever a’ is an upper bound of B.

– Lower Bound (LB)• aA is a lower bound of B if a b bB.

– Greatest Lower Bound (GLB)• aA is a greatest lower bound of B if a is a lower bound for B, and

a’ a whenever a’ is a lower bound of B.

Page 17: CSCI 115 Chapter 6 Order Relations and Structures.

§6.2 Extremal elements of posets

• Theorem 6.2.3– Let (A, ) be a poset. Then a subset B of A has

at most one LUB and at most one GLB.

Page 18: CSCI 115 Chapter 6 Order Relations and Structures.

§6.2 Extremal elements of posets

• Theorem 6.2.4– Suppose (A, ) and (B, ) are isomorphic posets under

f:AB. Then:i) If a is a max (min) element of (A, ), then f(a) is a max (min)

element of (B, ).ii) If a is a greatest (least) element of (A, ), then f(a) is a

greatest (least) element of (B, ).iii) If a is an UB (LB, LUB, GLB) of (A, ), then f(a) is an UB

(LB, LUB, GLB) of (B, ).iv) If every subset of (A, ) has a LUB (GLB), then every subset

of (B, ) has a LUB (GLB).

Page 19: CSCI 115 Chapter 6 Order Relations and Structures.

CSCI 115

§6.3

Lattices

Page 20: CSCI 115 Chapter 6 Order Relations and Structures.

§6.3 – Lattices

• Lattice– Poset (L, ) where every subset of 2 elements

has a LUB and GLB– Join of 2 elements

• a b = LUB ({a, b})

– Meet of 2 elements• a b = GLB ({a, b})

Page 21: CSCI 115 Chapter 6 Order Relations and Structures.

§6.3 – Lattices

• Theorem 6.3.1– If (L1, 1) and (L2, 2) are lattices, then (L, ) is a

lattice where L = L1 x L2 and is the product partial order

• Let (L, ) be a lattice. A non-empty subset S of L is called a sublattice of L if a b S and a b S a, b S

Page 22: CSCI 115 Chapter 6 Order Relations and Structures.

§6.3 – Lattices

• Isomorphic Lattices– If f:L1 L2 is an isomorphism from the poset

(L1, 1) to the poset (L2, 2), and if L1 and L2 are Lattices, then L1 and L2 are isomorphic lattices.

Page 23: CSCI 115 Chapter 6 Order Relations and Structures.

§6.3 – Lattices

• Theorem 6.3.2– Let L be a lattice. a, b L we have:

i) a b = b iff a bii) a b = a iff a biii) a b = a iff a b = b

• Theorem 6.3.3 – 6.3.7 in book

• We will not cover special types of lattices– Bounded, distributive, complemented

Page 24: CSCI 115 Chapter 6 Order Relations and Structures.

CSCI 115

§6.4

Finite Boolean Algebras

Page 25: CSCI 115 Chapter 6 Order Relations and Structures.

§6.4 – Finite Boolean Algebras

• Theorem 6.4.1– If S1 = {x1, x2, …, xn} and S2 = {y1, y2, …, yn}

are 2 finite sets with n elements, then the lattices (P(S1), ) and (P(S2), ) are isomorphic lattices. Consequently, the Hasse diagram of these lattices may be drawn identically.

Page 26: CSCI 115 Chapter 6 Order Relations and Structures.

§6.4 – Finite Boolean Algebras

• If the Hasse diagram of a lattice corresponding to a set with n elements is labeled by a sequence of 0s and 1s of length n, then the resulting lattice is called Bn.

Page 27: CSCI 115 Chapter 6 Order Relations and Structures.

§6.4 – Finite Boolean Algebras

• If x = a1a2…an and y = b1b2

…bn are 2 elements of Bn, then the properties of Bn can be described by:– i) x y iff ak bk for k = 1, 2, 3, …, n

– ii) x y = c1c2…cn where ck = min{ak, bk}

– iii) x y = d1d2…dn where dk = max{ak, bk}

Page 28: CSCI 115 Chapter 6 Order Relations and Structures.

§6.4 – Finite Boolean Algebras

• A finite lattice is called a Boolean Algebra if it is isomorphic to Bn for some nZ+

• Theorem 6.4.2 (modified)– Dn is a boolean algebra iff n = p1p2

…pk where the pi are all distinct primes

• Theorem 6.4.3 and 6.4.4 in book

Page 29: CSCI 115 Chapter 6 Order Relations and Structures.

CSCI 115

§6.5

Functions on Boolean Algebras

Page 30: CSCI 115 Chapter 6 Order Relations and Structures.

§6.5 – Fns on Boolean Algebras• Boolean Polynomials

– Let x1, x2, …, xn be a set of n variables. A Boolean Polynomial p(x1, x2, …, xn) in the variables xk is defined by the following:

• i) x1, x2, …, xn are all boolean polynomials

• ii) 0 and 1 are boolean polynomials• iii) If p(x1, x2, …, xn) and q(x1, x2, …, xn) are both boolean polynomials in

the variables xk, then p(x1, x2, …, xn) q(x1, x2, …, xn) and p(x1, x2, …, xn) q(x1, x2, …, xn) are also boolean polynomials

• iv) If p(x1, x2, …, xn) is a boolean polynomial, then so is If p(x1, x2, …, xn)’

• v) Only polynomials generated by rules 1 – 4 are boolean polynomials

Page 31: CSCI 115 Chapter 6 Order Relations and Structures.

§6.5 – Fns on Boolean Algebras

• Manipulations– Not responsible for manipulations

• Boolean Functions– Similar to polynomial functions

• Accept arguments, and return values• Evaluates to true or false

Page 32: CSCI 115 Chapter 6 Order Relations and Structures.

§6.5 – Fns on Boolean Algebras

• Schematic representations of boolean polynomials– Used in circuitry, and other technical areas– AND gates– OR gates– NOT inverters

Page 33: CSCI 115 Chapter 6 Order Relations and Structures.

§6.5 – Fns on Boolean Algebras

• The AND gate– Accepts 2 arguments, and evaluates to true or

false according to the logical rules for AND

Page 34: CSCI 115 Chapter 6 Order Relations and Structures.

§6.5 – Fns on Boolean Algebras

• The OR gate– Accepts 2 arguments, and evaluates to true or

false according to the logical rules for OR

Page 35: CSCI 115 Chapter 6 Order Relations and Structures.

§6.5 – Fns on Boolean Algebras

• The NOT inverter– Accepts 1 argument, and evaluates to true or

false according to the logical rules for NOT


Recommended