Download presentation
Presentation is loading. Please wait.
Published byDortha Moody Modified over 9 years ago
1
Relations & Their Properties
2
Copyright © Peter Cappello2 Introduction Let A & B be sets. A binary relation from A to B is a subset of A x B. Let R be a relation. If ( a, b ) R, we write a R b. Example: –Let S be a set of students. –Let C be a set of courses. –Let R = { (s, c) | student s is taking course c}. Many students may take the same course. A single student may take many courses.
3
Copyright © Peter Cappello3 Functions as Relations Functions are a kind of relation. –Let function f : A B. –If f( a ) = b, we could write ( a, b ) f A x B. –P( A x B ) = the set of all relations from A to B. –Let F = the set of all functions from A to B. –F is a proper subset of P( A x B ). F P( A x B )
4
Copyright © Peter Cappello4 Relations on a Set A relation on a set A is a relation from A to A. Examples of relations on R: –R 1 = { (a, b) | a b }. –R 2 = { (a, b) | b = +sqrt( a ) }. –Are R 1 & R 2 functions?
5
Copyright © Peter Cappello5 Properties of Relations A relation R on A is: Reflexive: a ( aRa ). Are either R 1 or R 2 reflexive? Symmetric: a b ( aRb bRa ). –Let S be a set of people. –Let R & T be relations on S, R = { (a, b) | a is a sibling of b }. T = { (a, b) | a is a brother of b }. Is R symmetric? Is T symmetric?
6
Copyright © Peter Cappello6 Antisymmetric: 1. a b ( ( aRb bRa ) ( a = b ) ). 2. a b ( ( a b ) ( ( a, b ) R ( b, a ) R ) ). Example: L = { ( a, b ) | a b }. Can a relation be symmetric & antisymmetric? Transitive: a b c ( ( aRb bRc ) aRc ). Are any of the previous examples transitive?
7
Copyright © Peter Cappello7 Composition Let R be a relation from A to B. Let S be a relation from B to C. The composition is S R = { ( a, c ) | b ( aRb bSc ) }. Let R be a relation on A. R 1 = R R n = R n-1 R. Let R = { (1, 1), (2, 1), (3, 2), (4, 3) }. What is R 2, R 3 ?
8
Copyright © Peter Cappello8 End 8.1
9
Copyright © Peter Cappello 20119 Graph a Relation from A to B The word graph above is used as a verb. Let A = { 1, 2, 3 } and B = { 2, 3, 4 }. Let R be a relation from A to B where { (a, b) | a divides b }. 123 A 2 3 4 B
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.