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,

Slides:



Advertisements
Similar presentations
Representing Relations
Advertisements

Partial Orderings Section 8.6.
Relations Relations on a Set. Properties of Relations.
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
Discrete Structures Chapter 5 Relations Nurul Amelina Nasharuddin Multimedia Department.
Relations. Binary Relations a relation between elements of two sets is a subset of their Cartesian product (of ordered pairs). Note the di ff erence between.
1 Relations: The Second Time Around Chapter 7 Equivalence Classes.
Discrete Mathematics Lecture#11.
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.
Relations Chapter 9.
Chapter 9 1. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing.
Exam 2 Review 8.2, 8.5, 8.6, Thm. 1 for 2 roots, Thm. 2 for 1 root Theorem 1: Let c 1, c 2 be elements of the real numbers. Suppose r 2 -c 1.
Exam 2 Review 7.5, 7.6, |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩
Properties of Relations In many applications to computer science and applied mathematics, we deal with relations on a set A rather than relations from.
Chapter 4 Relations and Digraphs
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
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 歐亞書局.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 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
CHAPTER 3 FUZZY RELATION and COMPOSITION. 3.1 Crisp relation Product set Definition (Product set) Let A and B be two non-empty sets, the product.
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 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
Section 4.4 Properties of Relations. Order Relations Draw an arrow diagram for the relation R defined on the set {1,2,3,4} such that
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
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.)
Chapter Relations and Their Properties
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
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.
1 Lecture 2 (part 1) Partial Orders Reading: Epp Chp 10.5.
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
Chap. 7 Relations: The Second Time Around
CSCI 115 Course Review.
Section 7.3: Representing Relations In this section, we will cover two ways to represent a relation over a finite set other than simply listing the relation.
Section 9.3. Section Summary Representing Relations using Matrices Representing Relations using Digraphs.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008.
1 Partial Orderings Epp, section Introduction An equivalence relation is a relation that is reflexive, symmetric, and transitive A partial ordering.
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 is a relation on.
Chapter 5 Relations and Operations
CSE 2813 Discrete Structures
Unit-III Algebraic Structures
Partial Orders.
Partial Orderings CSE 2813 Discrete Structures.
Introduction to Relations
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
6.1 Partially Ordered Sets
Relations Chapter 9.
Partial Orderings.
Relations and Digraphs
Dr. Ameria Eldosoky Discrete mathematics
Relations: Operations & Properties
Formal Definition and Examples
CSE 321 Discrete Structures
Relations.
교환 학생 프로그램 내년 1월 중순부터 6월 초 현재 학부 2,3 학년?
Relations: The Second Time Around
4.4 Properties of Relations
Presentation transcript:

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, 0 < 2, 0 < 3, 1 < 2, 1 < 3, 2 < 3 1  1, 2  1, 2  2 or use set notation A  B={(0,1),(0,2),(0,3),(1,1),(1,2),(1,3),(2,1),(2,2),(2,3)} R={(0,1),(0,2),(0,3), (1,2),(1,3), (2,3)} or use Arrow Diagrams

Formal Definition (binary) relation from A to B where x  A, y  B, (x,y)  A  B and R  A  B xRy  (x,y)  R finite example: A={1,2} B={1,2,3} infinite example: A = Z and B = Z aRb  a-b  Z even

Properties of Relations Reflexive Symmetric Transitive

Proving Properties on Infinite Sets m,n  Z, m  3 n Reflexive Symmetric Transitive

The Inverse of the Relations and The Complement of the Relation R:A  B R={(x,y)  A  B| xRy} R -1 :B  A R -1 ={(y,x)  B  A| (x,y)  R} R ’ :A  B R’ ={(x,y)  A  B| (x,y)  R} D : {1,2}  {2,3,4} D={(1,2),(2,3),(2,4)} D’ = ? D -1 =? S={(x,y)  R  R|y =2*|x|} S -1 =?

Closures over the Properties Reflexive Closure Symmetric Closure Transitive Closure R xc has property x R  R xc R xc is the minimal addition to R (if S is any other transitive relation that contains R, R xc  S)

Matrix Representation of a Relation M R = [m ij ] m ij ={1 iff (i,j)  R and 0 iff (i,j)  R example: R : {1,2,3}  {1,2} R = {(2,1),(3,1),(3,2)}

Powers of Relation For relation M, –M 1 = the list of paths available in 1 step –M 2 = the list of paths available in 2 steps –M 3 = the list of paths available in 3 steps –… –M * = the list of paths available in any number of steps through composition through matrix multiplication

Union, Intersection, Difference and Composition R: A  B and S: A  B R: A  B and S: B  C

Equivalence Relations Partition the elements: any elements “related” are in the same partition Equivalence Relations are –Reflexive –Symmetric –Transitive Partitions are called Equivalence Classes –[a] = equivalence class containing a –[a] = {x  A | xRa}

Examples R: X  X X={a,b,c,d,e,f} {(a,a),(b,b),(c,c),(d,d),(e,e),(f,f), (a,e),(a,d),(d,a)(d,e),(e,a),(e,d),(b,f),(f,b)} Lemma If A is a set and R is an equivalence relation on A and x and y are elements of A, then either [x]  [y] =  or [x] = [y]

Other Properties Reflexive Irreflexive Symmetric Antisymmetric Asymmetric Non-symmetric Transitive

Partial Order Relation R is a Partial Order Relation if and only if R is Reflexive, Antisymmetric and Transitive Partial Order Set (POSET) (S,R) = R is a partial order relation on set S Examples – (Z,  ) – (Z +,|) {note: | symbolizes divides}

Total Ordering When all pairs from the set are “comparable” it is called a Total Ordering a and b are comparable if and only if a R b or b R a a and b are non-comparable if and only if a R b and b R a

Hasse Diagram 1.take the digraph (since it represents the same relation) 2.arrange verticies so all arrows go upward (since it is antisymmetric we know this is possible) 3.remove the reflexive loops (since we know it is reflexive these are not necessary) 4.remove the transitive arrows (since we know it is transitive, these are not necessary) 5.make the remaining edges non-directed (since we know they are all going upward, the direction is not necessary)

Hasse Diagram Example The POSET ({1,2,3,9,18},|) The POSET ({1,2,3,4},  ) The POSET (P{a,b,c},  ) Draw complete digraph diagrams of these relations Derive Hasse Diagram from those

Terminology Maximal : a  A is maximal  b  A (bRa  a and b are not comparable) Minimal : a  A is minimal  b  A (aRb  a and b are not comparable) Greatest : a  A is greatest   b  A (bRa) Least : a  A is least   b  A (aRb)

Topological Sorting 1.select any minimal a)put it into the list b)remove it from the Hasse diagram) 2.Repeat until all members are in the list Example: ({2,3,4,6,18,24},|)