Discrete Math 4
Discrete Math 4
PRODUCT SETS
Consider two arbitrary sets A and B. The set of all ordered pairs:
(a, b) where a ∈ A and b ∈ B is called the product, or Cartesian
product, of A and B. A short designation of this product is A × B,
which is read “A cross B.” By definition,
A × B = {(a, b) | a ∈ A and b ∈ B}
One frequently writes A2 instead of A × A.
Example-1
Let A = {1, 2} and B = {a, b, c}. Then
A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}
B × A = {(a, 1), (b, 1), (c, 1), (a, 2), (b, 2), (c, 2)}
Also, A × A = {(1, 1), (1, 2), (2, 1), (2, 2)}
Definition: Let A and B be sets. A binary relation or, simply,
relation from A to B is a subset of A × B.
Example-3
A = (1, 2, 3) and B = {x, y, z}, and let R = {(1, y), (1, z), (3, y)}. Then
R is a relation from A to B since R is a subset of A × B. With respect
to this relation, 1Ry, 1Rz, 3Ry, but 1Rx, 2Rx, 2Ry, 2Rz, 3Rx, 3Rz
The domain of R is {1, 3} and the range is {y, z}
DEFINITION 1 Let A and B be sets. A binary relation from A to
B is a subset of A × B.
EXAMPLE 4 Let A be the set {1, 2, 3, 4}. Which ordered pairs are
in the relation R = {(a, b) | a divides b}?
EXAMPLE 9
Consider the relation R = {(1, 2), (2, 3), (3, 3)} on A = {1, 2, 3}. Then:
R2 = R◦R = {(1, 3), (2, 3), (3, 3)} and R3 = R2◦R = {(1, 3), (2, 3), (3, 3)}
Example-10
Let R = {(1, 1), (2, 1), (3, 2), (4, 3)}. Find the powers Rn, n = 2, 3, 4, . . . .
Solution: Because R2 = R ◦R, we find that R2 = {(1, 1), (2, 1), (3, 1), (4, 2)}.
Furthermore, because R3 = R2 ◦R, R3 = {(1, 1), (2, 1), (3, 1), (4, 1)}. Additional
computation shows that R4 is the same as R3, so R4 = {(1, 1), (2, 1), (3, 1), (4, 1)}.
It also follows that Rn = R3
for n = 5, 6, 7, . . . . The reader should verify this.
Example-10
Given A = {1, 2, 3, 4} and B = {x, y, z}. Let R be the following
relation from A to B:
R = {(1, y), (1, z), (3, y), (4, x), (4, z)}
(a) Determine the matrix of the relation.
(b) Draw the arrow diagram of R.
(c) Find the inverse relation R−1 of R.
(d) Determine the domain and range of R.
(c) Reverse the ordered pairs of R to obtain R−1:
R−1 = {(y, 1), (z, 1), (y, 3), (x, 4), (z, 4)}
Observe that by reversing the arrows in Fig. 2.6(b), we obtain the
arrow diagram of R−1.
(d) The domain of R, Dom(R), consists of the first elements of the
ordered pairs of R, and the range of R, Ran(R),
consists of the second elements. Thus,
Dom(R) = {1, 3, 4} and Ran(R) = {x, y, z}
Example-11
Let A = {1, 2, 3},B = {a, b, c}, and C = {x, y, z}. Consider the following
relations R and S from A to B
and from B to C, respectively.
R = {(1, b), (2, a), (2, c)} and S = {(a, y), (b, x), (c, y), (c, z)}
(a) Find the composition relation R◦S.
(b) Find the matrices MR,MS, and MR◦S of the respective relations R, S, and R◦S,
and compare MR◦S to
the product MRMS.
Draw the arrow diagram of the relations R and S as in Fig. 2-7(a). Observe that 1
in A is “connected” to x in C by the path 1 → b → x; hence (1, x) belongs to R◦S.
Similarly, (2, y) and (2, z) belong to R◦S.
We have
R◦S = {(1, x), (2, y), (2, z)}
Example-12
Consider the relation R = {(1, 1), (2, 2), (2, 3), (3, 2), (4, 2), (4, 4)}
on A = {1, 2, 3, 4}.
(a) Draw its directed graph. (b) Find R2 = R◦R.
(a) For each (a, b) ∈ R, draw an arrow from a to b as in Fig. 2-7(b).
(b) For each pair (a, b) ∈ R, find all (b, c) ∈ R. Then (a, c) ∈ R2.
Thus
R2 = {(1, 1), (2, 2), (2, 3), (3, 2), (3, 3), (4, 2), (4, 3), (4, 4)}
EXAMPLE 13 What is the composite of the relations R and S,
where R is the relation from {1, 2, 3} to {1, 2, 3, 4} with R = {(1,
1), (1, 4), (2, 3), (3, 1), (3, 4)} and S is the relation from {1, 2, 3,
4} to {0, 1, 2} with S = {(1, 0), (2, 0), (3, 1), (3, 2), (4, 1)}?
Solution: Because R2 = R ◦R, we find that R2 = {(1, 1), (2, 1), (3,
1), (4, 2)}. Furthermore, because R3 = R2 ◦R, R3 = {(1, 1), (2, 1),
(3, 1), (4, 1)}. Additional computation shows that R4 is the same
as R3, so R4 = {(1, 1), (2, 1), (3, 1), (4, 1)}. It also follows that Rn
= R3for n = 5, 6, 7, . . . . The reader should verify this.
Example 15
Given: A = {1, 2},B = {x, y, z}, and C = {3, 4}. Find: A × B ×
C using tree diagram.
Example-16
Formula
MS ◦R = MR MS
Example-17
DEFINITION 3 A relation R on a set A is called reflexive if (a, a)
∈ R for every element a ∈ A.
Example-22
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.
EXAMPLE 23 The divisibility relation | is a partial ordering on the
set of positive integers, because it is reflexive, antisymmetric, and
transitive, as was shown in Section 9.1. We see that (Z+ , |) is a
poset. Recall that (Z+ denotes the set of positive integers.)
Solution: The Hasse diagram in Figure below for this poset shows
that the maximal elements are 12, 20, and 25, and the minimal
elements are 2 and 5.
EXAMPLE 27 Let S be a set. Determine whether there is a greatest
element and a least element in the poset (P (S),⊆).
Solution: The least element is the empty set, because ∅ ⊆ T for any
subset T of S. The set S is the greatest element in this poset, because
T ⊆ S whenever T is a subset of S.