Lecture 7 (II) CSC510 Relations
Lecture 7 (II) CSC510 Relations
RELATION
Representing a relation:
1) Roster notation
2) Digraph (Arrow diagram)
3) Tabular/matrices form
4) Set builder notation
RELATION
1) Roster notation
Let A be the set {1, 2, 3, 4}. Which ordered pairs are in the relation R = {(a, b) |
a divides b}?
Solution: Because (a, b) is in R if and only if a and b are positive integers not
exceeding 4 such that a divides b, we see that
R = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4, 4)}.
RELATION
2) Digraph (Arrow diagram)
R = {(1, 1), (1, 3), (2, 1), (2, 3), (2, 4), (3, 1), (3, 2), (4, 1)}
RELATION
3) Tabular/matrices form
R = {(a1, b2), (a2, b1), (a2, b3), (a2, b4), (a3, b1), (a3, b3), (a3, b5)}.
RELATION
4) Set builder notation
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}.
Which of these relations contain each of the pairs (1, 1), (1, 2), (2, 1), (1,−1), and (2, 2)?
Solution:
(1, 1) - R1, R3, R4, R6
(1, 2) - R1, R6
(2, 1) - R2, R5, R6
(1,−1) - R2, R3, R6
(2, 2) - R1, R3, R4.
RELATION
Proof:
If |A| = n then |A x A| = n2
▶ R is a binary relation on A if R ⊆ A x A
▶ The number of subsets of A x A = 2|A xA| =
Properties of Relations
▶ Reflexive Relations
▶ Irreflexive Relations
▶ Symmetric Relations
▶ Antisymmetric Relations
▶ Transitive Relations
Reflexive Relations
▶ A relation R on a set A is called reflexive if (a, a) ∈ R for every element a ∈ A.
▶ ∀a((a, a) ∈ R), where the universe of discourse is the set of all elements in A.
▶ A is reflexive if every element of A is related to itself
Example: 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)}.
Example: Show that the “greater than or equal” relation (≥) is a partial ordering
on the set of integers.
Solution:
Because a ≥ a for every integer a, ≥ is reflexive.
If a ≥ b and b ≥ a, then a = b. Hence, ≥ is antisymmetric.
Finally, ≥ is transitive because a ≥ b and b ≥ c imply that a ≥ c.
It follows that ≥ is a partial ordering on the set of integers and (Z, ≥) is a poset.
Total Orderings
▶ The elements a and b of a poset (S, ) are called comparable if either a b
or b a
▶ When a and b are elements of S such that neither a b nor b a, a and b
are called incomparable.
▶ If (S, ) is a poset and every two elements of S are comparable, S is called a
totally ordered or linearly ordered set, and is called a total order or a
linear order.
Example:
The poset (Z,≤) is totally ordered, because a ≤ b or b ≤ a whenever a and b are
integers.
The poset (Z+, | ) is not totally ordered because it contains elements that are
incomparable, such as 5 and 7.