Relations: An Introduction
Relations: An Introduction
An Introduction
Cartesian Product
Definition
Let A and B be sets. The Cartesian Product is the set of all ordered pairs where the first coordinates are in A and the second coordinates are in B. Notation
AB = { (a,b) aA and bB }
Cartesian Product
Cartesian Product of 3 or more sets (n-fold product)
AB C = { (a, b, c) aA, bB and cC }
Product Rule
if |A| = m and |B| = n, then |AB| = m*n if |C| = k, |ABC| = m*n*k
Cartesian Product
Theorems
1. A (BC)=(AB)(AC) 2. A (BC)=(AB)(AC) 3. A= 4. (AB)(CD)=(AC) (BD) 5. (AB)(CD) (AC) (BD)
Relations
Definition
A Relation on two sets A and B is a subset of AB. A Relation is specified by an open sentence such as a is less than b or a + b = 5. Examples
1. Let R be the Relation from A = { 1, 2, 3, 4 } to B= {1,3,5 } which is defined by x is less than y . R = { ( x,y ) x is less than y } = { (1,3), (1,5), (2,3), (2,5), (3,5) , (4,5) } 2. Let R be the Relation from E = { 2, 3, 4, 5 } to F = { 3, 6, 7, 10 } which is defined by x|y
Relations
Binary Relation: relation defined on two sets that are not
necessarily distinct
Relations
Domain of a Binary Relation R
set whose elements are all as such that (a,b) R. ( a is related to b or aRb )
Relations
Properties of Relations
reflexive. aRa for all a A (every element is related to itself) irreflexive: a A b A, aRb ab (every element is not related to itself) symmetric: a A b A, aRb bRa antisymmetric: a A b A, (aRb bRa) a = b transitive: if aRb bRc then aRc for all a,b,c A
Relations
Properties of Relations: Example
Let R be the Relation on the set of Natural Numbers: x is related to y such that x y Reflexive. every Natural Number is itself Not Symmetric. if x y, y is not necessarily x Antisymmetric: x y y x x = y Transitive: x y y z x z
Equivalence Relation
Definition
A Binary Relation R on a set S is an Equivalence Relation if R is reflexive, symmetric and transitive. The set on which an Equivalence Relation is defined can be partitioned into disjoint sets by Equivalence Classes. A Partition of a set S is a collection of nonempty disjoint subsets whose union equals S. For an Equivalence Relation on a set S
if x S [x] denotes the set of all members of S related to x; [x] is called an Equivalence Class of x.
Equivalence Relation
Examples
R on N defined by xRy if x+y is even
R is reflexive, symmetric and transitive. (verify this) R is an equivalence relation Equivalence Classes (partition of N)
[0] = { 0, 2, 4, 6, 8......} [1] = { 1, 3, 5, 7, 9......}
Partial Ordering
Definition
A Binary Relation on S that is reflexive, transitive and antisymmetric is a partial ordering. S is a partially ordered set (a.k.a. the poset (S, R), where R is the Partial Relation). Example
R on N = {(x,y) x <= y }
The Hasse Diagram depicts the partial ordering of the set on which the relation is defined
Partial Ordering
Examples
R on (A) : x R y x y where x,y (A) A = { a, b } (A) = { {a}, {b}, {a,b}, } R = { ({a,b}, {a,b}) , ({a}, {a,b}), ({a},{a}), ({b}, {b}), ({b}, {a,b}), (, {a}), (, {b}),( , {a,b}), (, ) } Reflexive. Every set is a subset of itself. Transitive. A B B C A C Antisymmetric. A B B A B = A
Partial Ordering
Examples
R on S = { 1, 2, 3, 6, 12, 18 } where x R y if x|y
R = { (1,2), (1,1), (1,3), (1,6), (1,12), (1,18), (2,6), (2,12), (2,18), (3,6), (3,12), (3,18), (6,12), (6,18), (18,18),(12,12), (2,2), (3,3), (6,6) }
Partial Ordering
1
{a}
{b}
2 6
{a, b} 12 18