80 likes | 239 Views
Relations. Rosen 6 th ed., §8.1. Relations. Re lationships between elements of sets occur in many contexts Example relationships in everyday life: employee and her salary, person and relative, business and it’s phone number, etc.
E N D
Relations Rosen 6th ed., §8.1
Relations • Relationships between elements of sets occur in many contexts • Example relationships in everyday life: employee and her salary, person and relative, business and it’s phone number, etc. • In mathematics we study relationships such as those between a positive integer and one that divides it, etc.
Relations • The most direct way to express a relationship between elements of two sets is to use ordered pairs (binary relations) • A binary relation from A to B is a set R of ordered pairs where the first element of each ordered pair comes from A and the second element comes from B. We use the notation a R b to denote that (a, b) ∈ R and a aRb to denote that (a, b) ∉ R. • In mathematics we study relationships such as those between a positive integer and one that divides it, etc.
Relations • Recall the definition of the Cartesian (Cross) Product: • The Cartesian Product of sets A and B, A x B, is the set A x B = {<x,y> : x ∈ A and y ∈ B}. • A relation is just any subset of the CP!! • R⊆ AxB • Ex: A = students; B = courses. R = {(a,b) | student a is enrolled in class b}
Relations • Recall the definition of a function: f = {<a,b> : b = f(a) , aA and bB} • Is every function a relation? Yes, a function is a special kind of relation
Relations on a Set • Relations from a set A to itself are of special interest • A relation on the set A is a relation from A to A • In other words, a relation on a set A is a subset of A x A
Properties of Relations • Reflexivity: A relation R on AxA is reflexive if for all a ∈ A, (a,a) ∈ R. • Symmetry: A relation R on AxA is symmetric if (a,b) ∈ R implies (b,a) ∈ R for all a,b ∈A. • Anti-symmetry: A relation on AxA is anti-symmetric for all a,b ∈A, if (a,b) ∈ R and (b,a) ∈ R, then a=b.
Properties of Relations • Transitivity: A relation on AxA is transitive if (a,b) R and (b,c) R imply (a,c) R. Examples……..