Relations (3) Rosen 6th ed., ch. 8 2008 fall.

Slides:



Advertisements
Similar presentations
Partial Orderings Section 8.6.
Advertisements

CSE 211- Discrete Structures1 Relations Ch 2 schaums, Ch 7 Rosen.
CSCI 115 Chapter 6 Order Relations and Structures.
Relations Relations on a Set. Properties of Relations.
Equivalence, Order, and Inductive Proof
8.6 Partial Orderings. Definition Partial ordering– a relation R on a set S that is Reflexive, Antisymmetric, and Transitive Examples? R={(a,b)| a is.
Chapter 7 Relations : the second time around
CSE115/ENGR160 Discrete Mathematics 05/03/11 Ming-Hsuan Yang UC Merced 1.
1 Relations: The Second Time Around Chapter 7 Equivalence Classes.
Relations binary relations xRy on sets x  X y  Y R  X  Y Example: “less than” relation from A={0,1,2} to B={1,2,3} use traditional notation 0 < 1,
Partial Orderings: Selected Exercises
Partially Ordered Sets Basic Concepts
Section 7.6: Partial Orderings Def: A relation R on a set S is called a partial ordering (or partial order) if it is reflexive, antisymmetric, and transitive.
1 Partial Orderings Based on Slides by Chuck Allison from Rosen, Chapter 8.6 Modified by.
Partially Ordered Sets (POSets)
Relations Chapter 9.
Chapter 9 1. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing.
Chapter 6. Order Relations and Structure
Lecture 4.5: POSets and Hasse Diagrams CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren.
1 Partial Orderings Aaron Bloomfield CS 202 Rosen, section 7.6.
Copyright © Cengage Learning. All rights reserved.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Discrete Structures – CNS2300
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Discrete Math for CS Binary Relation: A binary relation between sets A and B is a subset of the Cartesian Product A x B. If A = B we say that the relation.
2.6 Equivalence Relation §1.Equivalence relation §Definition 2.18: A relation R on a set A is called an equivalence relation if it is reflexive, symmetric,
Chapter 9. Section 9.1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and.
8.3 Representing Relations Directed Graphs –Vertex –Arc (directed edge) –Initial vertex –Terminal vertex.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 8 Relations 歐亞書局.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Relations and their Properties
Sets, Relations, and Lattices
Sets and Subsets Set A set is a collection of well-defined objects (elements/members). The elements of the set are said to belong to (or be contained in)
1 Partial Orderings Aaron Bloomfield CS 202 Epp, section ???
Problem Statement How do we represent relationship between two related elements ?
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Unit II Discrete Structures Relations and Functions SE (Comp.Engg.)
1 Section 4.3 Order Relations A binary relation is an partial order if it transitive and antisymmetric. If R is a partial order over the set S, we also.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
Certain elements have special importance in posets. The maximal element(s) is the greatest element(s). The minimal element (s) is the element (s) with.
Chap. 7 Relations: The Second Time Around
1 Partial Orderings Based on Slides by Chuck Allison from Rosen, Chapter 8.6 Modified by.
Partial Order Relations Lecture 50 Section 10.5 Wed, Apr 20, 2005.
Section 9.3. Section Summary Representing Relations using Matrices Representing Relations using Digraphs.
1 Partial Orderings Epp, section Introduction An equivalence relation is a relation that is reflexive, symmetric, and transitive A partial ordering.
Relations and Their Properties
Chapter 5 Relations and Operations
Partial Orderings: Selected Exercises
Chapter 6 Order Relations and Structures
CSE 2813 Discrete Structures
Unit-III Algebraic Structures
Partial Orders.
Partial Orderings CSE 2813 Discrete Structures.
Partial Orders (POSETs)
CSE15 Discrete Mathematics 05/03/17
Relations Binary relations represent relationships between the elements of two sets. A binary relation R from set A to set B is defined by: R  A 
Learn about relations and their basic properties
Equivalence Relations
Atmiya Institute of Technology & Science
6.1 Partially Ordered Sets
Relations Chapter 9.
Partial Orderings.
Relations and Digraphs
Aaron Bloomfield CS 202 Epp, section ???
Partial Order Relations
Discrete Math (2) Haiming Chen Associate Professor, PhD
Partial Orders Section 9.6 of Rosen Spring 2018
Relations.
교환 학생 프로그램 내년 1월 중순부터 6월 초 현재 학부 2,3 학년?
Relations: The Second Time Around
Presentation transcript:

Relations (3) Rosen 6th ed., ch. 8 2008 fall

Partial ordering A relation R is a partial ordering if it is reflexive, antisymmetric, and transitive. Example ‘greater than or equal to’ ‘is a subset of’ 1 2 3 1 2 3 Greater than or equal to, on {1,2,3}

Example (Partial ordering) Is subset of A ={ a, b, c} P(A) = { {}, {a}, {b}, {c}, {a,b}, {a,c}, {b,c}, {a,b,c} } Partial ordering : 부분적으로 순서화, {a,b}와 {b,c} 사이에는 is-subset-of로 순서화 할 수 없다. {} {a,b,c} {a} {b} {c} {a.b} {a,c} {b,c} Í 2008 fall

Example (Partial ordering) EXAMPLE 2: The divisibility relation | is a partial ordering on the set of positive integers, because it is reflexive, antisymmetric, and transitive. EXAMPLE 4: Let R be the relation on the set of people such that xRy if x and y are people and x is older than y. Show that R is not a partial ordering. Solution: No person is older than himself of herself. So this R is not reflective. 2008 fall

Comparability 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 are called incomparable. EXAMPLE 5: In the poset (Z+, |), are the integers 3 and 9 comparable? Are 5 and 7 comparable? Solution: Yes for 3 and 9, No for 5 and 7. 2008 fall

Totally Ordered Relation If (S, ≤) is a poset and every two elements of S are comparable, S is called a totally ordered or linearly ordered set, and ≤ is called total order or a linear order. A totally ordered set is also called a chain. EXAMPLE 6: The poset (Z+, ≤) is totally ordered because a ≤ b or b ≤ a whenever a and b are integers. EXAMPLE 7: The poset (Z+, |) is not totally ordered because it contains elements that are incomparable, such as 5 and 7. 2008 fall

Lexicographical order Example : 사전의 단어 순서

Hasse Diagrams Start with the directed graph of a relation. Remove loops. Remove all edges that must be in the partial ordering because of the presence of other edges and transitivity. Remove all the arrows. All edges point “upward” toward their terminal vertex. See Figure 2 of page 571. 2008 fall

Hasse Diagrams EXAMPLE 12: Draw the Hasse diagram representing the partial ordering {(a, b) | a divides b} on {1, 2, 3, 4, 6, 8, 12} => see FIGURE 3 of page 572. EXAMPLE 13: Draw the Hasse diagram representing the partial ordering {(A, B) | A  B} on the power set P(S) where S = {a, b, c} => see FIGURE 4 of page 573. 2008 fall

Maximal and Minimal Elements An element of a poset is called maximal if it is not less than any element of the poset. Similary, an element of a poset is called minimal if it is not greater than any element of the poset. EXAMPLE 14: Which elements of the poset ({2, 4, 5, 10, 12, 20, 25}, |) are maximal, and which are minimal? Solution: 12, 20, and 25 are maximal and 2 and 5 are minimal. 2008 fall

Greatest and Least Elements An element of a poset is called greatest element if it is greater than all the other elements in the poset. Similary, an element of a poset is called least element if it is less than all the other elements in the poset. EXAMPLE 17: Is there a greatest element and a least element in the poset (Z+, |) ? Solution: The integer 1 is the least element because 1|n whenever n is a positive integer. Because there is no integer that is divisible by all positive integers, there is no greatest element. 2008 fall

Example EXAMPLE 15: Determine whether the posets represented by following Hasse diagrams have greatest element and a least element. g: a, l: x g: x, l: x g: d, l: x g: d, l: a c a b d c a b e d c a b d b c a d 2008 fall

Upper Bound and Lower Bound If u is an element of a poset (S, ≤) such that a ≤ u for all elements a  A(A  S), then u is called an upper bound of A. Likewise, if l is element of a poset (S, ≤) such that l ≤ a for all elements a  A(A  S), then l is called an lower bound of A. EXAMPLE 18: Find the lower and upper bounds of the subsets {a, b, c}, {j, h}, and {a, c, d, f} in the poset with the Hasse diagram shown in Figure 7. 2008 fall

Example Solution: {a, b, c}: u-b is e, f, j, and h. l-b is a. {j, h}: no u-b. l-b is a, b, c, d, e, and f. {a, c, d, f}: u-b is f, h, and j. l-b is a. Fig. 7. f j h g e b c a d 2008 fall

Upper Bound and Lower Bound Cont. The element x is called the least upper bound of the subset A if x is an upper bound that is less than every other upper bound of A. Similarly, the element y is called the greatest lower bound of the subset A if y is a lower bound that is greater than every other lower bound of A. EXAMPLE 19: Find the greatest lower bound and the least upper upper bound of {b, d, g}, if they exist, in the poset shown in Fig. 7. Solution: g and b. 2008 fall

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. EXAMPLE 22: Is the poset (Z+, |) a lattice? Solution: a와 b를 두 정수라 하자. 이 두 정수의 최소공배수와 최대공약수가 각각 최소상한계와 최대하한계이므로, 이 poset은 격자이다. 2008 fall

Example EXAMPLE 21: 아래 하세 도표들로 표현되는 부분 순서 집합들이 격자(lattice)인지 판별하시오. (a) (b) (c) (a), (c)는 격자, (b)는 b와 c가 최소상한계를 가지지 않으므로 격자가 아니다. d, e, f가 이들의 상한계이지만, 이들 중 어느 것도 나머지 둘 보다 모두 작지는 않다. (Information flow에 활용) Study EXAMPLE 23. c b d e f a f d c b e g h a e a c d b f 2008 fall

Topological Sorting A total ordering is said to be compatible with the partial ordering R if a ≤ b whenever aRb. Constructing a compatible total ordering from a partial ordering is called topological sorting. EXAMPLE 26: Find a compatible total ordering for the poset ({1, 2, 4, 5, 12, 20}, |). Solution: 1 < 5 < 2 < 4 < 20 < 12. Study EXAMPLE 27. 2008 fall

Algorithm for Topological Sorting ALGORITHM Topological Sorting Procedure topological sort((s, ≤): finite poset) k := 1 while S ≠ Ф begin ak := a minimal element of S S := S – {ak} k := k + 1 end {a1, a2, …, an is a compatible total ordering of S} 2008 fall