1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008.

Slides:



Advertisements
Similar presentations
Relations Relations on a Set. Properties of Relations.
Advertisements

CSE115/ENGR160 Discrete Mathematics 04/26/12 Ming-Hsuan Yang UC Merced 1.
Basic Properties of Relations
Discrete Mathematics Lecture # 16 Inverse of Relations.
Discrete Structures Chapter 5 Relations Nurul Amelina Nasharuddin Multimedia Department.
Chapter 3 Review MATH130 Heidi Burgiel. Relation A relation R from X to Y is any subset of X x Y The matrix of a Relation R is a matrix that has a 1 in.
CSE115/ENGR160 Discrete Mathematics 05/03/11 Ming-Hsuan Yang UC Merced 1.
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.
Sets, Relation and Functions A set is a collection of objects (elements) or a container of objects. Defining sets –Empty set (Ø): no elements –Universal.
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,
Discrete Mathematics Lecture#11.
Partially Ordered Sets Basic Concepts
Relations Chapter 9.
Chapter 9 1. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing.
Week 8 - Wednesday.  What did we talk about last time?  Cardinality  Countability  Relations.
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∩
Relations (1) Rosen 6 th ed., ch. 8. Binary Relations Let A, B be any two sets. A binary relation R from A to B, written (with signature) R:A↔B, is a.
CS Discrete Mathematical Structures Mehdi Ghayoumi MSB rm 132 Ofc hr: Thur, 9:30-11:30a Fall 2002KSU - Discrete Structures1.
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.
R. Johnsonbaugh, Discrete Mathematics 5 th edition, 2001 Chapter 2 The Language of Mathematics.
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.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
8.3 Representing Relations Directed Graphs –Vertex –Arc (directed edge) –Initial vertex –Terminal vertex.
Relations Relations between sets are like functions, but with a more general definition (given later). presentations: a set, a binary matrix, a graph…
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
Discrete Mathematics Relation.
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.)
1 Lecture 2 Equivalence Relations Reading: Epp Chp 10.3.
1 Partial Orderings Aaron Bloomfield CS 202 Epp, section ???
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.
Equivalence Relations
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.
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
Relations Compare with function – Function: Set of ordered pairs where x’s don’t repeat x’s come from domain; y’s come from co-domain Purpose: to transform.
Chap. 7 Relations: The Second Time Around
CSCI 115 Course Review.
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 B = {a,b} {( 0, a), (
Advanced Digital Designs Jung H. Kim. Chapter 1. Sets, Relations, and Lattices.
Week 8 - Monday.  What did we talk about last time?  Properties of functions  One-to-one  Onto  Inverses  Cardinality.
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
Lecture 7: Relations Dr Andrew Purkiss-Trew Cancer Research UK Mathematics for Computing.
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.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
Citra Noviyasari, S.Si, MT
Chapter 5 Relations and Operations
Introduction to Relations
Equivalence Relations
Atmiya Institute of Technology & Science
Relations Chapter 9.
Dr. Ameria Eldosoky Discrete mathematics
CS2210 Discrete Structures Relations
Relations and Their Properties
Formal Definition and Examples
CSE 321 Discrete Structures
Lecture # 16 Inverse of Relations
Presentation transcript:

1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008

2 CMSC 250 Chapter 10, Relations

3 CMSC 250 Definitions l On sets x  X y  Y R  X  Y A relation on x 1, x 2, …, x n is a subset of x 1  x 2  …  x n l Binary relations xRy

4 CMSC 250 Example l "Less than" relation from A = {0,1,2} to B = {1,2,3} l Use traditional notation 0 < 1, 0 < 2, 0 < 3, 1 < 2, 1 < 3, 2 < 3 1 < 1, 2 < 1, 2 < 2 l 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)} l Or use arrow diagrams

5 CMSC 250 Formal definition l (Binary) relation from A to B where x  A, y  B, (x,y)  A  B and R  A  B xRy  (x,y)  R l Finite example: A = {1,2}, B = {1,2,3}, aRb  a < b l Infinite example: A = Z and B = Z aRb  a  b  Z even

6 CMSC 250 Properties of relations Reflexive Symmetric Transitive

7 CMSC 250 Equivalence relations l Partition the elements: any elements “related” are in the same partition l Equivalence relations are –reflexive, –symmetric, and –transitive l Partitions are called equivalence classes –[a] = the equivalence class containing a –[a] = {x  A | xRa}

8 CMSC 250 Examples l R: X  X X = {a,b,c,d,e,f} R = {(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)} l Lemma : If A is a set, R is an equivalence relation on A, and x and y are elements of A, then either [x]  [y] =  or [x] = [y]

9 CMSC 250 Discrete Structures CMSC 250 Lecture 43 May 12, 2008

10 CMSC 250 Proving properties on infinite sets l Show R is an equivalence relation, where (m, n)  R if m  n (mod 2) (where m, n  Z) –show this relation is: reflexive symmetric transitive

11 CMSC 250 The matrix representation of a relation l M R = [m ij ] m i j = 1 iff (i,j)  R and 0 iff (i,j)  R l Example: R : {1,2,3}  {1,2} R = {(2,1),(3,1),(3,2)}

12 CMSC 250 Other properties Reflexive Irreflexive Symmetric Antisymmetric Asymmetric Non-symmetric Transitive

13 CMSC 250 Partial order relation l R is a partial order relation if and only if R is reflexive, antisymmetric and transitive l Partial order set (POSET) (S,R) = R is a partial order relation on set S l Examples – (Z,  ) – (Z +,  ) (note: “  ” symbolizes “divides”)

14 CMSC 250 Total ordering l When all pairs from a set are “comparable” it is called a total ordering l a and b are comparable if and only if a R b or b R a l a and b are non-comparable if and only if a R b and b R a

15 CMSC 250 The inverse of a relation l R: A  B R = {(x,y)  A  B | xRy} l R  1 : B  A R  1 = {(y,x)  B  A | (x,y)  R} l D: {1,2}  {2,3,4} D = {(1,2),(2,3),(2,4)} D  1 = ? l S = {(x,y)  R  R | y = 2  |x|} S  1 = ?

16 CMSC 250 The complement of a relation l R: A  B R = {(x,y)  A  B | xRy} l R ' : A  B R' = {(x,y)  A  B | (x,y)  R} l D: {1,2}  {2,3,4} D = {(1,2),(2,3),(2,4)} D' = ?

17 CMSC 250 Closures over the properties l Reflexive closure l Symmetric closure l Transitive closure R xc has property x R  R xc R xc is the minimal addition to R (if S is any other relation with property x that contains R, then R xc  S)

18 CMSC 250 Union, intersection, and difference l R: A  B and S: A  B

19 CMSC 250 Composition l R: A  B and S: B  C