9.1 Relations and Their Properties

p594
Ex: 1-16, 20

Definition 1

Let AA and BB be sets. A binary relation RR from AA to BB is a subset of A×BA \times B.

A×B={(a,b)aAbB}RA×B\begin{aligned} A \times B &= \{(a, b) \mid a\in A \land b \in B\}\\ R &\subseteq A \times B \end{aligned}

Example 1
Let AA be the set of students in your school, and let BB be the set of courses. Let RR be the relation that consists of those pairs (a,b)(a, b), where aa is a student enrolled in course bb. For instance, if Jason Goodfriend and Deborah Sherman are enrolled in CS518, the pairs (Jason Goodfriend, CS518) and (Deborah Sherman, CS518) belong to RR. If Jason Goodfriend is also enrolled in CS510, then the pair (Jason Goodfriend, CS510) is also in RR. However, if Deborah Sherman is not enrolled in CS510, then the pair (Deborah Sherman, CS510) is not in RR.
Note that if a student is not currently enrolled in any courses there will be no pairs in RR that have this student as the first element. Similarly, if a course is not currently being offered there
will be no pairs in RR that have this course as their second element.

Example 2
Let AA be the set of cities in the U.S.A., and let BB be the set of the 50 states in the U.S.A. Define the relation RR by specifying that (a,b)(a, b) belongs to RR if a city with name aa is in the state bb. For instance, (Boulder, Colorado), (Bangor, Maine), (Ann Arbor, Michigan), (Middletown, New Jersey), (Middletown, New York), (Cupertino, California), and (Red Bank, New Jersey) are in RR.

Definition 2

A relation on a set AA is a relation from AA to AA.

RA×A=A2\begin{aligned} R &\subseteq A \times A = A^2 \end{aligned}

Properties of Relations

  • Reflexive
  • Symmetric
  • Antisymmetric
  • Transitive

Definition

A relation RR on a set AA is called reflexive if (a,a)R(a, a) \in R for every element aAa \in A.

a((a,a)R)\begin{aligned} \forall a((a, a) \in R) \end{aligned}

EXAMPLE 7
Consider the following relations on {1,2,3,4}\{1, 2, 3, 4\}:
R1={(1,1),(1,2),(2,1),(2,2),(3,4),(4,1),(4,4)}R_1 = \{(1, 1), (1, 2), (2, 1), (2, 2), (3, 4), (4, 1), (4, 4)\},
R2={(1,1),(1,2),(2,1)}R_2 = \{(1, 1), (1, 2), (2, 1)\},
R3={(1,1),(1,2),(1,4),(2,1),(2,2),(3,3),(4,1),(4,4)}R_3 = \{(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)}R_4 = \{(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)}R_5 = \{(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)\},
R6={(3,4)}R_6 = \{(3, 4)\}.
Which of these relations are reflexive?

Solution

The relations R3R_3 and R5R_5 are reflexive because they both contain all pairs of the form (a,a)(a, a), namely, (1,1)(1, 1), (2,2)(2, 2), (3,3)(3, 3), and (4,4)(4, 4). The other relations are not reflexive because they do not contain all of these ordered pairs. In particular, R1,R2,R4R_1, R_2, R_4, and R6R_6 are not reflexive because (3,3)(3, 3) is not in any of these relations.

Definition

A relation RR on a set AA is called symmetric if (b,a)R(b, a) \in R whenever (a, b) \in R, for all a,bAa, b \in A. A relation RR on a set AA such that for all a,bAa, b \in A, if (a,b)R(a, b) \in R and (b,a)R(b, a) \in R, then a=ba = b is called antisymmetric.

ab((a,b)R(b,a)R)Symmetricab((a,b)R(b,a)R)(a=b))Antisymmetric\begin{aligned} \forall a \forall b ((a, b) \in R &\to (b, a) \in R) &\text{Symmetric}\\ \forall a \forall b ((a, b) \in R \land (b, a) \in R) &\to (a=b)) &\text{Antisymmetric}\\ \end{aligned}

EXAMPLE 12
Is the “divides” relation on the set of positive integers symmetric? Is it antisymmetric?
Solution: This relation is not symmetric because 121 \mid 2, but 212 \nmid 1. It is antisymmetric, for if a and b are positive integers with aba \mid b and bab \mid a, then a = b (the verification of this is left as an exercise for the reader).

Definition
A relation RR on a set AA is called transitive if whenever (a,b)R(a, b) \in R and (b,c)R(b, c) \in R, then (a,c)R(a, c) \in R, for all a,b,cAa, b, c \in A.

abc(((a,b)R(b,c)R)(a,c)R)\begin{aligned} \forall a \forall b \forall c (((a, b) \in R \land (b, c) \in R) \to (a, c) \in R) \end{aligned}

EXAMPLE 15
Is the “divides” relation on the set of positive integers transitive?
Solution: Suppose that aa divides bb and bdividescb divides c. Then there are positive integers kk and ll such that b=akb = ak and c=blc = bl. Hence, c=a(kl)c = a(kl), so aa divides cc. It follows that this relation is transitive.

EXAMPLE 16
How many reflexive relations are there on a set with n\mathsf{n} elements?
Solution: A relation RR on a set AA is a subset of A×AA\times A. Consequently, a relation is determined by specifying whether each of the n2n^2 ordered pairs in A×AA \times A is in RR. However, if RR is reflexive, each of the nn ordered paries (a,a)(a, a) for aAa \in A must be in RR. Each of the other n(n1)n(n-1) ordered pairs of the form (a,b)(a, b), where aba\ne b, may or may not be in RR. Hence, by the product rule form counting, there are 2n(n1)2^{n(n-1)} reflexive relations [this is the number of ways to choose whether each element (a, b), with aba \ne b, belongs to RR].

Combining relations

Definition
Let RR be a relation from a set AA to a set BB and SS a relation from BB to a set CC. The composite of RR and SS is the relation consisting of ordered pairs (a,c)(a, c), where aA,cCa \in A, c \in C, and for which there exists an element bBb \in B such that (a,b)R(a, b) \in R and (b,c)S(b, c) \in S. We denote the composite of R and S by SRS \circ R.

EXAMPLE 20
What is the composite of the relations R and S, where R is the relation from {1,2,3}\{1, 2, 3\} to {1,2,3,4}\{1, 2, 3, 4\} with R={(1,1),(1,4),(2,3),(3,1),(3,4)}R = \{(1, 1), (1, 4), (2, 3), (3, 1), (3, 4)\} and SS is the relation from {1,2,3,4}\{1, 2, 3, 4\} to {0,1,2}\{0, 1, 2\} with S={(1,0),(2,0),(3,1),(3,2),(4,1)}S = \{(1, 0), (2, 0), (3, 1), (3, 2), (4, 1)\}?
Solution: SRS \circ R is constructed using all ordered pairs in RR and ordered pairs in SS, where the second element of the ordered pair in RR agrees with the first element of the ordered pair in SS. For example, the ordered pairs (2,3)(2, 3) in RR and (3,1)(3, 1) in SS produce the ordered pair (2,1)(2, 1) in SRS \circ R. Computing all the ordered pairs in the composite, we find

SR={(1,0),(1,1),(2,1),(2,2),(3,0),(3,1)}\begin{aligned} S \circ R = \{(1,0), (1, 1), (2, 1), (2, 2), (3, 0), (3, 1)\} \end{aligned}

Homework

p602: 3c-f, 9, 25, 32

3. For each of these relations on the set {1,2,3,4}\{1, 2, 3, 4\}, decide whether it is reflexive, whether it is symmetric, whether it is antisymmetric, and whether it is transitive.
c) {(2,4),(4,2)}\{(2, 4), (4, 2)\}

Solution

Let RR be the relation.
Reflective - No. (1,1)R(1, 1) \notin R.
Symmetric - Yes. (2,4)R(4,2)R(2, 4) \in R \land (4, 2) \in R.
Antisymmetric - No. (2,4)R(4,2)R24(2, 4) \in R \land (4, 2) \in R \land 2\ne 4.
Transitive - No. (2,4)R(4,2)R(2,2)R(2, 4) \in R \land (4, 2) \in R \land (2, 2) \notin R.

d) {(1,2),(2,3),(3,4)}\{(1, 2), (2, 3), (3, 4)\}

Solution

Let RR be the relation.
Reflective - No. (1,1)R(1, 1) \notin R.
Symmetric - No. (1,2)R(2,1)R(1, 2) \in R \land (2, 1) \notin R.
Antisymmetric - Yes. (2,1)R(3,2)R(4,3)R(2, 1) \notin R \land (3, 2) \notin R \land (4, 3) \notin R.
Transitive - No. (1,2)R(2,3)R(1,3)R(1, 2) \in R \land (2, 3) \in R \land (1, 3) \notin R.

e) {(1,1),(2,2),(3,3),(4,4)}\{(1, 1), (2, 2), (3, 3), (4, 4)\}

Solution

Let RR be the relation.
Reflective - Yes. (1,1)R(2,2)R(3,3)R(4,4)R(1, 1) \in R \land (2, 2) \in R \land (3, 3) \in R \land (4, 4) \in R.
Symmetric - Yes. (1,1)R(2,2)R(3,3)R(4,4)R(1, 1) \in R \land (2, 2) \in R \land (3, 3) \in R \land (4, 4) \in R.
Antisymmetric - Yes. ab((a,b)R(b,a)R(a=b))\forall a \forall b((a, b) \in R \land (b, a) \in R \to (a=b)).
Transitive - Yes. (1,2)R(2,3)R(1,3)R(1, 2) \in R \land (2, 3) \in R \land (1, 3) \notin R

f) {(1,3),(1,4),(2,3),(2,4),(3,1),(3,4)}\{(1, 3), (1, 4), (2, 3), (2, 4), (3, 1), (3, 4)\}
Let RR be the relation.

Solution

Reflective - No. (1,1)R(1, 1) \notin R.
Symmetric - No. (1,4)R(4,1)R(1, 4) \in R \land (4, 1) \notin R.
Antisymmetric - No. (1,3)R(3,1)R13(1, 3) \in R \land (3,1) \in R \land 1 \ne 3.
Transitive - No. (1,3)R(3,1)R(1,1)R(1, 3) \in R \land (3, 1) \in R \land (1, 1) \notin R

9. Show that the relation R=R = \emptyset on the empty set S=S = \emptyset is reflexive, symmetric, and transitive.

Solution

Because the assumption that there are elements in S×S=S\times S = \emptyset is false, the conclusion that RR is reflexive, symmetric and transitive is always true.

25. How many different relations are there from a set with mm elements to a set with nn elements?

Solution

Let the set with mm elements be AA, and the set with nn elements be BB.
1. A relation from AA to BB is a subset of A×BA \times B.
2. By product rule, A×BA\times B has mnmn elements, so it has 2mn2^{mn} subsets.
3. Thus there are 2mn2^{mn} relations from AA to BB.

32. Let RR be the relation {(1,2),(1,3),(2,3),(2,4),(3,1)}\{(1, 2), (1, 3), (2, 3), (2, 4), (3, 1)\}, and let SS be the relation {(2,1),(3,1),(3,2),(4,2)}\{(2, 1), (3, 1), (3, 2), (4, 2)\}. Find SRS \circ R.

RR SS SRS \circ R
(1, 2) (2, 1) (1, 1)
(1, 3) (3, 1) (1, 1)
(1, 3) (3, 2) (1, 2)
(2, 3) (3, 1) (2, 1)
(2, 3) (3, 2) (2, 2)
(2, 4) (4, 2) (1, 1)
(3, 1) (2, 1) (1, 1)

Solution

See Table Above.
SR={(1,1),(1,2),(2,1),(2,2)}S \circ R = \{(1, 1), (1, 2), (2, 1), (2, 2)\}