Professional Documents
Culture Documents
3 9/6/2019
Properties of Relations
Reflexive Property
4 9/6/2019
Properties of Relations
Symmetric Property
5 9/6/2019
Properties of Relations
Consider the following relations on {1, 2, 3, 4}:
R1 = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 4), (4, 1), (4, 4)},
R2 = {(1, 1), (1, 2), (2, 1)},
R3 = {(1, 1), (1, 2), (1, 4), (2, 1), (2, 2), (3, 3), (4, 1), (4, 4)},
R4 = {(2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3)},
R5 = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)},
R6 = {(3, 4)}.
Which of these relations are symmetric and antisymmetric?
Consider these relations on the set of integers:
R1 = {(a, b) | a ≤ b},
R2 = {(a, b) | a > b},
R3 = {(a, b) | a = b or a = −b},
R4 = {(a, b) | a = b},
R5 = {(a, b) | a = b + 1},
R6 = {(a, b) | a + b ≤ 3}.
6 Which of these relations are symmetric and antisymmetric? 9/6/2019
Properties of Relations
Transitive Property
Composite Relation
8 9/6/2019
Representing Relations using Matrices
A relation between finite sets can be represented using a zero–one
matrix.
Suppose that R is a relation from A = {a1, a2, . . . , am} to B = {b1, b2, . .
. , bn}. It can be represented by the matrix MR = [mij], where
9 9/6/2019
Representing Properties of Relation using
Square Matrices
Relation R on A is reflexive if (a,
a) ∈ R whenever a ∈ A.
R is reflexive if and only if (ai, ai) ∈
R for i = 1, 2, . . . , n.
R is reflexive if and only if mi,i = 1,
for i = 1, 2, . . . , n.
R is reflexive if all the elements on
the main diagonal of MR are equal
to 1 (note that the elements off the
main diagonal can be either 0 or 1
10 9/6/2019
Representing Properties of Relation using
Square Matrices
Relation R on A is symmetric if (a, b) ∈
R implies that (b, a) ∈ R, for all a, b ∈ A.
R is symmetric if and only if (aj, ai) ∈ R
whenever (ai, aj) ∈ R for i = 1, 2, . . . , n.
R is symmetric if and only if mj,i = 1
whenever mj,i = 1, for i = 1, 2, . . . , n. This
also means mj,i = 0 whenever mi,j = 0.
R is symmetric if and only if mi,j = mj,i for
all pair of integers i and j, with i = 1,
2, . . . , n and j = 1, 2, . . . , n.
R is symmetric if and only if MR = (MR)t
MR is a symmetric matrix and
11 9/6/2019
Representing Properties of Relation using
Square Matrices
Relation R on A is antisymmetric if and only if (a, b)∈
R and (b, a)∈ R, implies a = b, for some a, b∈ A.
R is antisymmetric if it has the property that if
mi,j=1, then mj,i=0 (for i ≠ j)
In other words, either mi, j = 0 or mj,i = 0 when i ≠
j.
Relation R on A is transitive if and only if (a, b)∈ R2
implies (a, b)∈ R for some a, b∈ A.
Take composition of the given relation with itself
Find Boolean product of the relation matrix by
multiplying with itself.
M𝑅 𝑅 = MR2 = MR ۨ MR = MR[2]
∘
R is transitive if m(2)i,j=1, then mi,j=1 (for all i,j)
12 9/6/2019
Representing Relations Using Digraphs
An edge of the form (a, a) is represented using an arc from the vertex a
back to itself.
Such an edge is called a loop.
The relation R on a set A is represented by the
directed graph that has the elements of A as its
vertices and the ordered pairs (a, b), where (a, b)
∈ R, as edges.
This assignment sets up a one-to-one
correspondence between the relations on a set A
and the directed graphs with A as their set of
vertices.
Thus, every statement about relations
corresponds to a statement about directed graphs,
and vice versa.
Directed graphs give a visual display of
13 9/6/2019
information about relations.
Representing Relations Using Digraphs
Directed graphs representing a relation can be used to
determine whether the relation has various properties:
Reflexive: A relation is reflexive if and only if there is a loop at every
vertex of the directed graph, so that every ordered pair of the form (x,
x) occurs in the relation.
Symmetric: A relation is symmetric if and only if for every edge
between distinct vertices in its digraph, there is an edge in the opposite
direction, so that (y, x) is in the relation whenever (x, y) is in the
relation.
Antisymmetric: A relation is antisymmetric if and only if there are
never two edges in opposite directions between distinct vertices.
Transitive: A relation is transitive if and only if whenever there is an
edge from a vertex x to a vertex y and an edge from a vertex y to a
14
vertex z, there is an edge from x to z 9/6/2019
Equivalence Relations
16 9/6/2019
Equivalence Class and Partition
Let A be the set of students who are majoring in exactly one subject, and
let R be the relation on A consisting of pairs (x, y), where x and y are
students with the same major.
R is an equivalence relation.
R splits all students in A into a collection of disjoint subsets, where each
subset contains students with a specified major.
For instance, one subset contains all students majoring (just) in computer
science, and a second subset contains all students majoring in history.
These subsets are equivalence classes of R.
The equivalence classes of an equivalence relation partition a set into
disjoint, nonempty subsets.
17 9/6/2019
Partitioning of a Set by Equivalence
Relation
Let R be an equivalence relation on a set A. The union
of the equivalence classes of R is all of A, because an
element a of A is in its own equivalence class, namely,
[a]R.