Relations Alice E. Fischer April, 2018
1 Inverse of a Relation 2 Properties of Relations
The Inverse of a Relation Let R be a relation from A to B. Define the inverse relation, R 1 from B to A as follows. R 1 = {(y, x) B A (x, y) R} All of the arrows in the mapping diagram of the inverse relation are reversed from those in the original relation.
Example: Inverse of a Finite Relation For example, let A = {2, 3, 4}, B = {2, 6, 8} and let D be the divides relation. Then D = {(2, 2), (2, 6), (2, 8), (3, 6), (4, 8)} D 1 = {(2, 2), (6, 2), (8, 2), (6, 3), (8, 4)} D D -1 2 2 2 2 3 6 3 6 4 8 4 8
Example: Inverse of an Infinite Relation Define a relation S from R to R for all (y, z) R R as: S is the set of all pairs, (y, z) such that z = 2 y S = {(y, z) z = 2 y } The inverse would then be: S 1 = {(z, y) z = 2 y } The diagram on the next page shows graphs of S and S 1.
Graph: Inverse of an Infinite Relation S = {(y, z) z = 2 y } S S 1 = {(z, y) z = 2 y } S -1 x x y y Is S a function? Is S 1 a function?
From Arrow Diagram to Directed Graph In many cases we choose the domain and co-domain of a relation to be the same set. This means that we map elements of a set onto itself in some way. When drawing the mapping, rather than having our arrows go between two distinct sets, these sets now overlap, and all the arrows for the arcs of a directed graph that relates elements of the same set. The three basic properties that a relation on a set can exhibit are that it be reflexive, symmetric and transitive. Looking at such a directed graph, it is easy to see whether certain properties of a relation exist.
A Pretty Directed Graph Consider the set A = {3, 4, 5, 6, 7, 8}. Define relation R = the set of pairs (x, y) where 2 (x y). That is, a pair is in the relation if the difference of the two values is even. The directed graph representing this relationship looks like:
Relation Properties - Reflexive A relation has the property of being reflexive if every element of the set is related to itself. That is, for all x A, (x, x) R. The relation on the previous page is reflexive. This can be easily seen by the fact that every element in the set has an arc directed back at itself. The relation S defined by (x, y) S when x y = 2 is not reflexive, because the difference between an element and itself is always 0.
Relation Properties - Symmetric A relation has the property of being symmetric if when any element of the set is related to another, then the second element is also related to the first. That is, for all x and y A, if (x, y) R then (y, x) R. A symmetric relationship in our graphs looks like a flower petal or a self-loop. The relation from the previous graph is symmetric. This can be easily seen by the fact that for every arc that is going from one element to another, there is a second arc coming back from the second element to the first. The relation S defined by (x, y) S when x y = 2 is not symmetric, because the difference between one element and another is the negative of the difference of the second element and the first. However, if S used x y, it would be symmetric.
Relation Properties - Transitive A relation has the property of being transitive if when any one element of the set is related to another, and that second element is related to a third, then the first element is also related to the third. That is, for all x, y and z A, if (x, y) R and (y, z) R then (x, z) R. The relation from the previous graph is transitive. This can be easily seen by the fact that for every arc that is going from one element to another, followed by a second arc from that element to a third element, there is a third arc going directly between the first and third elements. The relation S defined by (x, y) S when x y = 2 is also not transitive, because the difference between the first element and the third element will always be 4 rather than 2.
Relation Properties - Some Practice Consider the set A = {2, 3, 4, 6, 7, 9}. Define relation R as the set of (x, y) such that 3 (x y). That is, a pair is in the relation if the difference of the two values is divisible by 3. Draw the directed graph representing this relationship and determine if it is reflexive, symmetric or transitive.
Relation Properties - Some Practice Consider the set A = {2, 3, 4, 6, 7, 9}. Define relation R as the set of (x, y) such that 3 (x y). That is, a pair is in the relation if the difference of the two values is divisible by 3. Draw the directed graph representing this relationship and determine if it is reflexive, symmetric or transitive. The directed graph is given by:
Relation Properties - Some Practice Is the relation reflexive?
Relation Properties - Some Practice Is the relation reflexive? Yes. Every element has an arc from itself to itself. Is the relation symmetric?
Relation Properties - Some Practice Is the relation reflexive? Yes. Every element has an arc from itself to itself. Is the relation symmetric? Yes. Every time there is an arc from one element to another, another arc comes back. There does not need to be as many arcs between elements as in the previous example. Is the relation transitive?
Relation Properties - Some Practice Is the relation reflexive? Yes. Every element has an arc from itself to itself. Is the relation symmetric? Yes. Every time there is an arc from one element to another, another arc comes back. There does not need to be as many arcs between elements as in the previous example. Is the relation transitive? Yes. Every pair of linked arcs also has another arc between the two endpoints forming a triangle as between the elements 3, 6 and 9 or a petal, as between 4 and 7?
Relation Properties - More Practice Consider the set A = {0, 1, 2, 3}. Define a binary relation R = {(0, 0), (0, 1), (0, 3), (1, 0), (1, 1), (2, 2), (3, 0), (3, 3)} Draw the directed graph representing this relationship and determine if it is reflexive, symmetric or transitive.
Relation Properties - More Practice Consider the set A = {0, 1, 2, 3}. Define a binary relation R = {(0, 0), (0, 1), (0, 3), (1, 0), (1, 1), (2, 2), (3, 0), (3, 3)} Draw the directed graph representing this relationship and determine if it is reflexive, symmetric or transitive. The directed graph is given by:
Relation Properties - More Practice Is the relation reflexive?
Relation Properties - More Practice Is the relation reflexive? Yes. Every element has an arc from itself to itself. Is the relation symmetric?
Relation Properties - More Practice Is the relation reflexive? Yes. Every element has an arc from itself to itself. Is the relation symmetric? Yes. Every time there is an arc from one element to another, another arc comes back. Is the relation transitive?
Relation Properties - More Practice Is the relation reflexive? Yes. Every element has an arc from itself to itself. Is the relation symmetric? Yes. Every time there is an arc from one element to another, another arc comes back. Is the relation transitive? No. Some elements are involved in transitive groupings: 0 and 3, and 0 and 1. However, in order for this relation to be transitive, all such groupings must be transitive. There are pairs of arcs from 3 to 0 and 0 to 1, but not from 3 to 1, and also going back in the other direction.
Relation Properties - Closure It is often desirable for a relation to have the properties of reflexivity, symmetry and transitivity. If a relation does not have one of these properties, what would it take to give it that property? For a relation on a finite set, we can answer this question directly: add enough pairs to the relation so that every arc is part of a petal or a self-loop. For an infinite relation it is not always so clear what to do. This is the concept of closure. We would like to construct a new relation from the old relation by adding the minimal number of ordered pairs to the relation (or arcs to the directed graph) that produce the desired property.
Relation Properties - Closure Reflexive Closure - to make a relation reflexive, you simply need to add all of the pairs (x, x) that are not already in the relation, so that every element has an arc from itself to itself. This is equivalent to taking the union of the original set with the identity set, R closure = R I. Symmetric Closure - to make a relation symmetric, you simply need to add all of the pairs (y, x) for every pair (x, y) that is already in the set, so that a return arc now exists between two elements that had an arc between them already. This is equivalent to taking the union of the original set with its inverse, R closure = R R 1. Transitive Closure - to make a relation transitive is a little harder. If it already contains the connected pairs (x, y) and (y, z), we must add (x, z) if it does not already exist. However, we need an iterative process, since adding the pair (x, z) to the set may form another connected pairing that needs yet another pairing added.
Closure - An Example Consider a set A = {0, 1, 2, 3} on which a relation R is defined as given by the directed graph below. 0 1 R1 3 2 Determine the arcs (pairs) that you must add to this relation to make it reflexive, symmetric, or transitive.
Closure - An Example Reflexive Closure - add arcs for (1, 1) and (3, 3) 0 1 0 1 3 2 3 2 Symmetric Closure - add arcs for (1, 0), (2, 1) and (3, 2) 0 1 0 1 3 2 3 2
Closure - An Example Transitive Closure - first add arcs for (0, 2) and (1, 3) 0 1 0 1 3 2 3 2 Then on second iteration add arc for (0, 3).
Relation Properties - AntiSymmetric A relation is antisymmetric if when any element of the set is related to a different element, then the second element is not related to the first. An element can still relate to itself. x, y A, if (x, y) R then (y, x) R. The graph below defines an antisymmetric relation. 0 1 R1 3 2 Antisymmetric and also not symmetric.
Antisymmetric Not symmetric antisymmetric is not the same as not symmetric. Although R1 on the previous slide is antisymmetric and also not symmetric, R3, below is neither symmetric nor antisymmetric: 0 1 R3 3 2 This situation happens when SOME but not ALL elements have symmetric relationships.
Properties of Equality Many relations can be defined over an infinite set. One such is equality, which is defined as, (x, y) R if x = y. Equality is reflexive. Obviously, x = x. Equality is symmetric. If x = y, then obviously y = x. Equality is transitive. If x = y and y = z, then it is clear that x = z If a relation is reflexive, symmetric and transitive, it is called an equivalence relation. We will talk more about these later.
Properties of Less Than Another common relation on an infinite set is less than, which is defined as, (x, y) R if x < y. Less than is not reflexive. Obviously, since x = x, it is not true that x < x. Less than is not symmetric. If x < y, then y > x and therefore it is not true that y < x. Less than is transitive. If x < y and y < z, then it is clear that x < z