s8.1-3 Relations Representations
s8.1-3 Relations Representations
s8.1-3 Relations Representations
Discrete Mathematics
Definition
The ordered n-tuple (a1 , a2 , ..., an ) is the ordered collection that
has a1 as its first element, a2 as its second element, ..., and an as
its nth element.
Two n-tuples are equal if and only if each corresponding pair of
their elements is equal.
We call 2-tuples couples or ordered pairs.
Definition
Let A and B be sets. The Cartesian product of A and B, denoted
by A × B, is the set of all ordered pairs (a, b), where a ∈ A and
b ∈ B. Hence,
A × B = {(a, b) | a ∈ A ∧ b ∈ B}.
A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}.
Definition
Let A and B be sets. A binary relation from A to B is a subset of
A × B.
Definition
A directed graph G = (V , E ), or digraph, consists of a set V of
vertices (or nodes) together with a set E of edges (or arcs). The
vertex a is called the initial vertex of the edge (a, b), and the
vertex b is called the terminal vertex of this edge.
A B
0
a
b
2
R a b
0 × ×
1 ×
2 ×
1 1
MR = 1 0 .
0 1
Definition
A relation on a set A is a relation from A to A.
A A
1 1
2 2
3 3
4 4
1 2
3 4
R 1 2 3 4
1 × × × ×
2 × ×
3 ×
4 ×
1 1 1 1
0 1 0 1
MR =
0
.
0 1 0
0 0 0 1
Definition
A relation R on a set A is called reflexive if (a, a) ∈ R for all
element a ∈ A.
Remark: Using quantifiers, a relation R on a set A is reflexive if
∀a((a, a) ∈ R), where the universe of discourse is the set of all
elements in A.
1 2
3 4
1 2 1 2
3 4 3 4
1 1 0 0
1 1 0 0
MR =
0
.
0 0 1
1 0 0 1
If not, what is needed to made this relation reflexive?
1 1 0 0 1 1 0 0
1 1 0 0 1 1 0 0
MR =
0
MR = .
0 0 1 0 0 1 1
1 0 0 1 1 0 0 1
To be reflexive, 1 on each entry of the main diagonal is necessary.
Definition
A relation R on a set A is called symmetric if (a, b) ∈ R implies
that (b, a) ∈ R for all a, b ∈ A.
1 2
3 4
1 2 1 2
3 4 3 4
1 1 0 0
1 1 0 0
MR =
0
.
0 0 1
1 0 0 1
If not, what is needed to made this relation symmetric?
1 1 0 0 1 1 0 1
1 1 0 0 1 1 0 0
MR =
0
MR = .
0 0 1 0 0 0 1
1 0 0 1 1 0 1 1
To be symmetric, the matrix need to be symmetric.
Definition
A relation R on a set A is called antisymmetric if, for all a, b ∈ A,
(a, b) ∈ R and (b, a) ∈ R then a = b.
1 2
3 4
1 2 1 2
3 4 3 4
1 1 0 0
1 1 0 0
MR =
0
.
0 0 1
1 0 0 1
If not, what is needed to made this relation antisymmetric?
1 1 0 0 1 1 0 0 1 0 0 0
1 1 0 0 0 1 0 0 1 1
0 0
MR =
0
MR = or .
0 0 1 0 0 0 1 0 0 0 1
1 0 0 1 1 0 0 1 1 0 0 1
Definition
A relation R on a set A is called transitive if, whenever (a, b) ∈ R
and (b, c) ∈ R, then (a, c) ∈ R, for all a, b, c ∈ A.
1 2
3 4
1 2 1 2
3 4 3 4
1 1 0 0
1 1 0 0
MR =
0
.
0 0 1
1 0 0 1
If not, what is needed to made this relation transitive?
1 1 0 0 1 1 0 0
1 1 0 0 1 1 0 0
MR =
0
MR = .
0 0 1 1 1 0 1
1 0 0 1 1 1 0 1
To be transitive, the method used is quite complex...