chapter four relations - homepage | · pdf filechapter four relations ... in general, recall...

36
Chapter Four Relations 4.1 INTRODUCTION In this chapter we study the notion of a relation between two sets and a related idea, that of a directed graph. A rather nice example of a relation is provided by the idea of divisibility for positive integers. Given two positive integers a and b, we can ask whether a is a factor of b; if so, let us say that “a is related to b.” We say that “is a factor of” is relation from Z + to Z + . Note that it is possible to have a related to b but b not related to a; this happens, for example, when a = 2 and b = 6. Because of this, it makes good sense to single out the ordered pair (a, b) when a is related to b. Thus, the relation determines a set of ordered pairs, namely, R = {(a, b) | a, b Z + and a is a factor of b} Definition 4.1: A relation from a set X to a set Y is a subset of X × Y . If R is a relation from X to Y and (x, y) R, then we say that x is related to y and write xRy. Since the preceding definition involves two sets X and Y, we sometimes refer to such a relation as a binary relation. Example 4.1: Let X = {Brinkerhoff, Chan, McKenna, Slonneger, Will, Yellen} be the set of computer science instructors at a small college, and let Y = {CS105, CS260, CS261, CS360, CS460} be the set of computer science courses offered next semester at that college. Then X × Y gives all possible pairings of instructors and courses. Let the relation R from X to Y be given by R = {(Brinkerhoff, CS105), (Brinkerhoff, CS360), (Chan, CS260), (Chan, CS360), (Chan, CS460), (McKenna, CS105), (McKenna, CS260), (Slonneger, CS260), (Slonneger, CS261), (Will , CS105), (Yellen, CS261), (Yellen, CS460)}

Upload: dangcong

Post on 03-Mar-2018

212 views

Category:

Documents


0 download

TRANSCRIPT

Chapter Four

Relations

4.1 INTRODUCTION

In this chapter we study the notion of a relation between two sets and a related idea, that of adirected graph.

A rather nice example of a relation is provided by the idea of divisibility for positive integers.Given two positive integers a and b, we can ask whether a is a factor of b; if so, let us say that “ais related to b.” We say that “is a factor of” is relation from Z+ to Z+. Note that it is possible tohave a related to b but b not related to a; this happens, for example, when a = 2 and b = 6. Becauseof this, it makes good sense to single out the ordered pair (a, b) when a is related to b. Thus, therelation determines a set of ordered pairs, namely,

R = {(a, b) | a, b ∈ Z+ and a is a factor of b}

Definition 4.1: A relation from a set X to a set Y is a subset of X × Y . If R is a relationfrom X to Y and (x, y) ∈ R, then we say that x is related to y and write x R y.

Since the preceding definition involves two sets X and Y, we sometimes refer to such a relationas a binary relation.

Example 4.1: Let

X = {Brinkerhoff, Chan, McKenna, Slonneger, Will, Yellen}

be the set of computer science instructors at a small college, and let

Y = {CS105, CS260, CS261, CS360, CS460}

be the set of computer science courses offered next semester at that college. Then X × Y gives allpossible pairings of instructors and courses. Let the relation R from X to Y be given by

R = {(Brinkerhoff, CS105), (Brinkerhoff, CS360), (Chan, CS260), (Chan, CS360), (Chan, CS460),

(McKenna, CS105), (McKenna, CS260), (Slonneger, CS260), (Slonneger, CS261), (Will, CS105),

(Yellen, CS261), (Yellen, CS460)}

166 Chapter 4 Relations

Then R might tell us, for example, which instructors are assigned to teach which courses. Notethat R is not a function from X to Y since several instructors are assigned to teach more than onecourse.

Example 4.2: Let P be the set of primes and define the relation R from P to Z+ by

p R n ↔ p is a factor of n

Find:

(a) all primes p such that p R 126(b) all n such that 3 R n

Solution:

(a) Since 126 = 2 · 3 · 3 · 7, we have that 2 R 126, 3 R 126, and 7 R 126.(b) Note that 3 R n if and only if n is a multiple of 3. Thus, the set of positive integers to which

3 is related under R is 3Z+ = {3, 6, 9, . . .}.�

Suppose that X and Y are finite sets — say, X = {x1,x2, . . . , xm} and Y = {y1, y2, . . . , yn} —and R is a relation from X to Y . One way to represent R is to form a matrix with m rows andn columns in which the i th row corresponds to xi, 1 ≤ i ≤ m, and the j th column corresponds toyj , 1 ≤ j ≤ n. Specifically, if xi R yj , then a 1 is placed in the position of the matrix correspondingto the i th row and j th column; if it is not the case that xi R yj , then we place a 0 in this position.We call this matrix the matrix of R. Denoting the element in the i th row and j th column ofthis matrix by rij, note that

rij =

{

1 if (xi, yj) ∈ R

0 if (xi, yj) /∈ R

For example, the matrix of the relation R of Example 4.1 is given by

1 0 0 1 00 1 0 1 11 1 0 0 00 1 1 0 01 0 0 0 00 0 1 0 1

where the rows correspond to Brinkerhoff, Chan, McKenna, Slonneger, Will, and Yellen, respectively,and the columns to CS105, CS260, CS261, CS360, and CS460, respectively.

In general, recall that a rectangular array of numbers of the form

C =

c11 c12 · · · c1n

c21 c22 · · · c2n

...cm1 cm2 · · · cmn

is called an m by n matrix . For 1 ≤ i ≤ m and 1 ≤ j ≤ n, we call cij the (i, j)- entry of thematrix. We often use the shorthand notation

[

cij

]

to denote C.

4.1 Introduction 167

Example 4.3: In a certain tennis tournament involving five players, each contestant plays each

of the others exactly once. If we denote the contestants by v1, v2, v3, v4, and v5, then the resultsof the matches in the tournament can be represented as a relation A from the setV = {v1, v2, v3, v4, v5} to itself, where

vi A vj ↔ vi beats vj

Suppose that the resulting relation is

A = {(v1, v2), (v1, v3), (v1, v5), (v2, v3), (v2, v4), (v3, v4), (v3, v5), (v4, v1), (v5, v2), (v5, v4)}

Then the matrix of A is

0 1 1 0 10 0 1 1 00 0 0 1 11 0 0 0 00 1 0 1 0

Example 4.4: Define a relation A from the set V = {3, 5, 9, 15, 25, 45, 75} to itself by

u A v ↔ gcd(u, v) > 1

In other words, u and v are related if and only if they are not relatively prime. Determine therelation A and its matrix.

Solution: The relation A is given by

A = {(3, 3), (3, 9), (3, 15), (3, 45), (3, 75), (5, 5), (5, 15), (5, 25), (5, 45), (5, 75), (9, 3),

(9, 9), (9, 15), (9, 45), (9, 75), (15, 3), (15, 5), (15, 9), (15, 15), (15, 25), (15, 45),

(15, 75), (25, 5), (25, 15), (25, 25), (25, 45), (25, 75), (45, 3), (45, 5), (45, 9), (45, 15),

(45, 25), (45, 45), (45, 75), (75, 3), (75, 5), (75, 9), (75, 15), (75, 25), (75, 45), (75, 75)}

The matrix of A is

1 0 1 1 0 1 10 1 0 1 1 1 11 0 1 1 0 1 11 1 1 1 1 1 10 1 0 1 1 1 11 1 1 1 1 1 11 1 1 1 1 1 1

Notice that the entries of the matrix C in the preceding example satisfy the condition

cij = cji

for 1 ≤ i, j ≤ 7. In general, an n by n matrix C =[

cij

]

is called a symmetric matrix providedcij = cji for 1 ≤ i, j ≤ n.

168 Chapter 4 Relations

One final remark regarding the matrix of a relation. If R is a relation from X = {x1, x2, . . . , xm}to Y = {y1, y2, . . . , yn} and we are given the matrix C of R (with xi corresponding to row i andyj corresponding to column j), but are not given R explicitly, then we can determine the pairs ofR from C. Thus, assuming some ordering of the elements in X and in Y (that is, we know whichelements correspond to the rows and columns of the matrix C), we can think of this matrix as a“matrix representation” of R.

The relations given in Examples 4.3 and 4.4 are examples of relations from a set to itself. Ingeneral, if R is a relation from a set V to itself, then we call R a relation on V .

Suppose now that A is a relation on a finite set V . Another representation of A, a geometricone, is obtained using the following scheme. Each element of V corresponds to a point in the planecalled a node or vertex. (The plural of vertex is vertices.) Further, if v1 A v2 for some v1, v2 ∈ A,then a directed simple curve is drawn from the node v1 to the node v2; such a directed simple curveis called a directed edge or arc. In the case v1 = v2, a special type of arc called a loop is drawn fromthe node v1 to itself. The resulting structure is referred to as a directed graph. For example, Figure4.1 shows a directed graph with nodes u, v, x, and y and arcs (u, u), (u, v), (u, y), (x, u), (x, v), and(y, x); the arc (u, u) is a loop.

Figure 4.1 A directed graph

4.1 Introduction 169

Mathematically, we think of a directed graph as being composed of a finite set V together witha relation A on V ; formally then, we have the following definition.

Definition 4.2: A directed graph (or digraph) G consists of a nonempty finite set V togetherwith a relation A on V . We call V the node set of G and A the arc set of G, and writeG = (V, A) to denote the fact that G is a digraph with node set V and arc set A.

Given a digraph G = (V, A), the elements of V are called nodes (or vertices) and the elementsof A are called arcs (or directed edges). An arc of the form (v, v), where v is a node, is called aloop. Given (u, v) ∈ A, we say that u is adjacent to v, that v is adjacent from u, and that uand v are incident with the arc (u, v).

As illustrated by Figure 4.1, a digraph has a geometric representation or “drawing.” However,we shall not make a distinction between the mathematical representation of a directed graph andits geometric representation.

Figure 4.2 The directed graph of the relation of Example 4.3

170 Chapter 4 Relations

Example 4.5: Figure 4.1 shows the digraph

G1 = ({u, v, x, y}, {(u, u), (u, v), (u, y), (x, u), (x, v), (y, x)})

Let G2 be the digraph ({v1, v2, v3, v4, v5}, A), where

A = {(v1, v2), (v1, v3), (v1, v5), (v2, v3), (v2, v4), (v3, v4), (v3, v5), (v4, v1), (v5, v2), (v5, v4)}

is the relation of Example 4.3. The digraph G2 is drawn in Figure 4.2. Note, for instance, that v1

is adjacent to v2 and that v1 is adjacent from v4.�

Example 4.6: Let U be a set and define the relation A on V = P(U) as follows:

(X, Y ) ∈ A ↔ X ⊆ Y

(In words, X is related to Y if and only if X is a subset of Y .) In particular, if U is finite, thenG = (V, A) is a digraph. Figure 4.3 shows a drawing of G in the case U = {1, 2}.

Figure 4.3 The digraph G of Example 4.6 in the case U = {1, 2}

For distinct nodes u and v of a digraph G, if both u is not adjacent to v and v is not adjacent tou, then u and v are said to be nonadjacent nodes. If both u is adjacent to v and v is adjacent

4.1 Introduction 171

to u, then the arcs (u, v) and (v, u) are called symmetric arcs. In this case we can simplify thedrawing of G by replacing the symmetric arcs (u, v) and (v, u) by an undirected simple curve joiningu and v; this is called an edge . The use of edges is illustrated by the next example.

Example 4.7: As in Example 4.4, define the relation A on the set V = {3, 5, 9, 15, 25, 45, 75} by

u A v ↔ gcd(u, v) > 1

Figure 4.4 shows the digraph G = (V, A). Since the arcs of G occur in symmetric pairs, thedrawing of G has been simplified by drawing an edge between those distinct vertices u and v forwhich u and v are not relatively prime.

Figure 4.4 The digraph G of Example 4.7

If R is a relation from a set X to a set Y , then R is a subset of X × Y . Thus, R determines asubset of X, namely, the set of all first coordinates of the ordered pairs in R. Similarly, a subsetof Y is determined by the set of all second coordinates of the ordered pairs in R. These subsetsgeneralize the idea of the domain and image of a function, as defined in the last chapter.

172 Chapter 4 Relations

Definition 4.3: Let R be a relation from the set X to the set Y . The domain of R is the setdom R defined by

dom R = {x ∈ X | (x, y) ∈ R for some y ∈ Y }The image of R is the set im R defined by

im R = {y ∈ Y | (x, y) ∈ R for some x ∈ X}

Exercise Set 4.1

1. For each of the given relations on {1, 2, 3, 6}, determine its matrix and directed graph.

(a) {(x, y) | x is a factor of y} (b) {(x, y) | x < y}(c) {(x, y) | x = y} (d) {(x, y) | x 6= y}(e) {(x, y) | x2 ≤ y} (f) {(x, y) | x + y is odd}

2. Determine the matrix and directed graph of the relation A defined onV = {−3,−2,−1, 0, 1, 2, 3} by

x A y ↔ 3 divides x − y

3. Determine the matrix and directed graph of the relation A defined on V = {1, 2, 4, 5, 10, 20} by

x A y ↔ (x < y and x divides y)

4. Find the domain and image of each relation in Exercise 1.

5. Draw the directed graph of each of the following relations on {1, 2, 3, 4, 5}.

(a) A1 = {(1, 1), (2, 2), (2, 3), (3, 2), (3, 3), (3, 4), (4, 3), (4, 4), (5, 5)}(b) A2 = {(1, 2), (1, 4), (1, 5), (2, 4), (2, 5), (3, 4), (3, 5), (4, 5)}(c) A3 = {(1, 3), (1, 5), (2, 4), (3, 1), (3, 5), (4, 2), (5, 1), (5, 3)}(d) A4 = A3 ∪ {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)}(e) A5 = {(1, 1), (1, 2), (2, 1), (2, 2), (4, 3), (5, 4)}

6. Let X = {1, 2, 3, . . . , 30, 31} be the set of dates in January, and let Y = {Sunday, Monday,Tuesday, Wednesday, Thursday, Friday, Saturday} be the set of days of the week. For January ofthe coming year, define the relation R from X to Y by

(x, y) ∈ R ↔ x falls on y

List the ordered pairs in R. IsR a function from X to Y ?

7. Draw the directed graph of each of the following relations on {−2,−1, 0, 1, 2}.

(a) A1 = {(m, n) | m + n ≤ 4} (b) A2 = {(m, n) | n = m + 1}(c) A3 = {(m, n) | m ≤ n2} (d) A4 = {(m, n) || m |=| n |}

8. Let V = {Illinois, Indiana, Iowa, Michigan, Michigan State, Minnesota, Northwestern, PennState, Purdue, Ohio State, Wisconsin} be the set of schools in the Big Ten conference. Define therelation A on V by

(u, v) ∈ A ↔ u is scheduled to play v in football during the coming season

Draw the directed graph of A.

4.2 Properties of Relations 173

4.2 PROPERTIES OF RELATIONS

Recall that a relation on a set V is defined as a relation from V to itself. We now discuss severalkey properties that such a relation may possess.

Definition 4.4: For a relation A on a nonempty set V :

1. A is reflexive provided (v, v) ∈ A for all v ∈ V .2. A is irreflexive provided (v, v) /∈ A for all v ∈ V .3. A is symmetric provided the following implication holds for all u, v ∈ V :

(u, v) ∈ A → (v, u) ∈ A

4. A is antisymmetric provided the following implication holds for all u, v ∈ V :

((u, v) ∈ A and (v, u) ∈ A) → u = v

5. A is transitive provided the following implication holds for all u, v, w ∈ V :

((u, v) ∈ A and (v, w) ∈ A) → (u, w) ∈ A

In other words, the relation A on the nonempty set V is:1. reflexive provided that every element of V is related to itself; that is, v A v is true for every

v ∈ V .2. irreflexive provided that no element of V is related to itself; that is, v A v is false for every

v ∈ V .3. symmetric provided v is related to u whenever u is related to v; that is, u A v implies v A u

for all u, v ∈ V .4. antisymmetric provided the following implication holds for all u, v ∈ V :

(u A v and v A u) → u = v

5. transitive provided u is related to w whenever both u is related to v and v is related to w;that is, provided the following implication holds for all u, v, w ∈ V :

(u A v and v A w) → u A w

Making use of the contrapositive, we can restate the definition for antisymmetry as follows: Ais antisymmetric if and only if the following implication holds for all u, v ∈ V :

u 6= v → ((u, v) /∈ A or (v, u) /∈ A)

This condition says that, for distinct elements u and v, either u is not related to v or v is not relatedto u.

We can state the definition for antisymmetry in yet another equivalent form by taking the partialcontrapositive (see Chapter 1, Problem 12) of the implication in part 4 of Definition 4.4; this yieldsthe following: A is antisymmetric if and only if the following implication holds for all u, v ∈ V :

(u 6= v and (u, v) ∈ A) → (v, u) /∈ A

This condition says that, if u and v are distinct elements and u is related to v, then v is not relatedto u.

174 Chapter 4 Relations

Example 4.8: For each of the following relations on {1, 2, 3, 4}, determine which of the

properties of Definition 4.4 it satisfies.

(a) A1 = {(1, 1), (1, 2), (1, 4), (2, 3), (3, 4), (4, 3)}(b) A2 = {(1, 1), (1, 3), (1, 4), (2, 2), (3, 1), (3, 3), (3, 4), (4, 1), (4, 3), (4, 4)}(c) A3 = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)}(d) A4 = {(1, 3), (2, 4), (3, 1), (4, 2)}

Solution:

(a) The relation A1 satisfies none of the five properties: A1 is not reflexive since, for example,(2, 2) /∈ A1; it is not irreflexive since (1, 1) ∈ A1; it is not symmetric since, for example, (1, 2) ∈ A1

and (2, 1) /∈ A1; it is not antisymmetric since (3, 4) ∈ A1 and (4, 3) ∈ A1; and A1 is not transitivesince (2, 3) ∈ A1 and (3, 4) ∈ A1, but (2, 4) /∈ A1.

(b) It is easy to check that A2 is reflexive and symmetric. With a bit of effort, it can also bechecked that A2 is transitive. For example, under A2, 1 is related to 3, and 3 is related to 4, so,for A2 to be transitive. it is necessary that 1 is related to 4. Since (1, 4) ∈ A2, this particular casechecks.

(c) Note thatA3 = {(x, y) | x ≤ y}

It is easily checked that the relation “≤” on any nonempty subset V of R is reflexive, antisymmetric,and transitive; in particular, then A3 is reflexive, antisymmetric, and transitive. For example, tosee that ≤ is antisymmetric, let u and v denote arbitrary elements of V . If u ≤ v and v ≤ u, thenclearly u = v. This shows that antisymmetry holds.

(d) The relation A4 is irreflexive and symmetric. It is not transitive — for example, (1, 3) ∈ A4

and (3, 1) ∈ A4, but (3, 3) /∈ A4.

With regard to part (d) of the preceding example, it should be emphasized that the conditionfor a relation A to be transitive:

((u, v) ∈ A and (v, w) ∈ A) → (u, w) ∈ A

must hold for all u, v, w ∈ A, including those cases in which u = w. Thus, if for some elements uand v, we have

(u, v) ∈ A and (v, u) ∈ A and (u, u) /∈ A

then A is not transitive.

Example 4.9: Let V be a nonempty set. The empty set ∅ is a relation on V , called the empty

relation . For this relation, no two elements are related, and no element is related to itself, so it isclearly irreflexive. Is it symmetric? In other words, is it true that, for all u, v ∈ V , (u, v) ∈ ∅implies (v, u) ∈ ∅? Since (u, v) ∈ ∅ is always false, this implication is true. So the empty relationis symmetric. By similar reasoning, it can be seen that the empty relation is antisymmetric andtransitive, as well.

4.2 Properties of Relations 175

Next, consider the relationIV = {(v, v) | v ∈ V }

This relation is called the identity relation on V . It is readily seen to be reflexive, symmetric,antisymmetric, and transitive, but not irreflexive. It should be noted, in fact, that a relation A onV is both symmetric and antisymmetric if and only if A is a subset IV . To see the necessity ofthis, assume that A is both symmetric and antisymmetric, and suppose (u, v) ∈ A. Then, since Ais symmetric, (v, u) ∈ A. Moreover, since A is antisymmetric, (u, v) ∈ A and (v, u) ∈ A imply thatu = v. So (u, v) = (u, u) ∈ IV . Thus, A ⊆ IV .

Finally, consider the relation A = V × V . We call this the complete relation on V . Underthis relation, any two elements are related (and every element is related to itself), so it is clearlyreflexive and symmetric. Moreover, A is antisymmetric if and only if |V | = 1. Is A transitive?Well, consider the implication

((u, v) ∈ A and (v, w) ∈ A) → (u, w) ∈ A

For the complete relation, (u, w) ∈ A is true for all u, w ∈ V , and so the above implication holds forall u, v, w ∈ V . This shows that the complete relation in transitive, as well.

As a general comment, note that a relation on a nonempty set cannot be both reflexive andirreflexive; see Exercise 2.

Example 4.10: Define the relation A on Z by

(x, y) ∈ A ↔ 3 | (x − y)

(that is, x A y if and only if x − y is a multiple of 3). Show that A is reflexive, symmetric, andtransitive.

Solution: For any integer v, v − v = 0 and 3 | 0 is true. Hence (v, v) ∈ A holds for every integerv. Thus, A is reflexive.

Next, for arbitrary integers u and v,

(u, v) ∈ A → 3 | (u − v)

→ 3 | −(u − v)

→ 3 | (v − u)

→ (v, u) ∈ A

This shows that A is symmetric.Finally, for arbitrary integers u, v, and w,

(u, v) ∈ A and (v, w) ∈ A → (3 | (u − v) and 3 | (v − w))

→ 3 |[

(u − v) + (v − w)]

→ 3 | (u − w)

→ (u, w) ∈ A

176 Chapter 4 Relations

This shows that A is transitive.An alternate solution can be based on the fact that

3 | (x − y) ↔ x mod 3 = y mod 3

Formulating A in this way, it is obvious that A is reflexive, symmetric, and transitive; in fact,this follows directly from the fact that the “=” relation on any nonempty subset of R is reflexive,symmetric, and transitive.

This relation is called congruence modulo 3. For integers x and y, we say that “x is congruentto y modulo 3” provided x mod 3 = y mod 3, and denote this fact by the notation x ≡ y (mod 3).In the next section we will generalize this relation.

Example 4.11: Let U be a nonempty set and, as in Example 4.6, define the relation A on

V = P(U) by the following rule:(X, Y ) ∈ A ↔ X ⊆ Y

Show that A is reflexive, antisymmetric, and transitive.

Solution: Let X, Y , and Z be arbitrary subsets of U .

Since X ⊆ X, we have (X, X) ∈ A. Thus, A is reflexive.The following argument shows that A is antisymmetric:

((X, Y ) ∈ A and (Y, X) ∈ A) → (X ⊆ Y and Y ⊆ X) → X = Y

Finally, the following argument shows that A is transitive:

((X, Y ) ∈ A and (Y, Z) ∈ A) → (X ⊆ Y and Y ⊆ Z) → X ⊆ Z → (X, Z) ∈ A

(See Exercise 19 in Exercise Set 1.5.)We remark that A is not symmetric. This follows because A is antisymmetric and A is not a

subset of the identity relation on P(U); for example, (∅, U) ∈ A.

Example 4.12: In Exercise 8 of Exercise Set 4.1, we define a relation A on the set V of schools

in the Big Ten Conference by (u, v) ∈ A if and only if u is scheduled to play v in football duringthe coming season. Clearly, A is irreflexive and symmetric. In general, A is not transitive; in2008, for example, Illinois played Ohio State and Ohio State played Penn State, but Illinois did notplay Penn State.

In the next example we examine how the reflexive, symmetric, and antisymmetric propertiesmanifest themselves in the matrix and directed graph of a relation.

4.2 Properties of Relations 177

Example 4.13: Consider first the relation A of Example 4.11 in the particular case U = {1, 2},so that V = P(U) = {∅, {1}, {2}, {1, 2}}. As shown in Example 4.11, the relation A is reflexiveand antisymmetric. The directed graph G = (V, A) is shown in Figure 4.3. The reflexive propertyof A is reflected in G by the presence of a loop at each node. The antisymmetric property of A isreflected in G by the lack of any symmetric pair of arcs; that is, there is at most one arc joiningany pair of distinct nodes. The matrix of A is

C =

1 1 1 10 1 0 10 0 1 10 0 0 1

The reflexive property is shown in C by the fact that every entry on the main diagonal is 1. As aconsequence of the antisymmetric property of A, we have, for i 6= j, that either the (i, j)-entry orthe (j, i)-entry of C is 0.

Next, consider the relation A on V = {2, 3, 5, 6, 10, 15} defined by:

(x, y) ∈ A ↔ gcd(x, y) = 1

In this case the directed graph G = (V, A) is shown in Figure 4.5 and the matrix of A is

C =

0 1 1 0 0 11 0 1 0 1 01 1 0 1 0 00 0 1 0 0 00 1 0 0 0 01 0 0 0 0 0

Note that A is irreflexive and symmetric. That A is irreflexive is manifested by the fact that G hasno loops and by the fact that each entry on the main diagonal of C is 0. That A is symmetric ismanifested by the fact that C is a symmetric matrix. The symmetric property is shown in G by thefollowing property: For distinct nodes u and v, either both of the arcs (u, v) and (v, u) are present(and represented by an edge joining u and v) or neither of them is present.

As indicated by the observations in Example 4.13, the following general remarks can be maderegarding properties satisfied by a relation A on a nonempty finite set V , its matrix representationC, and its digraph G = (V, A):

A is reflexive ↔ each entry on the main diagonal of C is 1;A is irreflexive ↔ each entry on the main diagonal C is 0;A is symmetric ↔ C is a symmetric matrix;A is antisymmetric ↔ for i 6= j, either the (i, j)-entry or the (j, i)-entry of C is a 0;A is reflexive ↔ there is a loop at each node of G;A is irreflexive ↔ there are no loops in G;A is symmetric ↔ any two distinct nodes of G are either nonadjacent or are joined by a symmetric

pair of arcs;A is antisymmetric↔ any two distinct nodes of G are joined by at most one arc.

178 Chapter 4 Relations

Figure 4.5 The digraph representing the relation of Example 4.13

Let V be a finite set, let A be a relation on V , and suppose that A is irreflexive and symmetric.Consider the digraph G = (V, A). Since A is irreflexive, G has no loops. Since A is symmetric,for distinct nodes u, v ∈ V , if (u, v) ∈ A, then (v, u) ∈ A, and we have already agreed to replacethe symmetric pair of arcs (u, v) and (v, u) by a single undirected edge, denoted uv (or vu). Theresulting structure is called a (simple) graph and is also said to be the graph of the relation A.Mathematically, we have the following formal definition.

Definition 4.5: A (simple) graph G consists of a finite nonempty set V and a set E oftwo-element subsets of V . The set V is called the node set of G, the set E is called the edge set

of G, and we write G = (V, E) to denote the graph G with node set V and edge set E.�

As a general remark, it can be said that much of the terminology for graphs and digraphscorresponds in a natural way. For instance, given a graph G = (V, E), the elements of V are callednodes, whereas the elements of E are called edges. An alternate term for node is vertex . Ife = {u, v} is an edge, we agree to denote it simply by e = uv (or e = vu). In this case, u and v arereferred to as adjacent nodes, u and v are said to be incident with e, and e is incident with uand v.

Just as with digraphs, a graph can be “drawn” in a plane, and we make no distinction betweena graph G = (V, E) and its drawing — sometimes a graph is presented by giving its node and edge

4.2 Properties of Relations 179

sets and sometimes by giving a drawing of the graph. For example, we can now say that Figure 4.5shows a graph. This graph has node set V = {2, 3, 5, 6, 10, 15} and edge set

E = {{2, 3}, {2, 5}, {2, 15}, {3, 5}, {3, 10}, {5, 6}}

Exercise Set 4.2

1. For the relations in Exercise 1 of Exercise Set 4.1, determine which of the properties ofDefinition 4.4 are satisfied.

2. Let V be a nonempty set and let A be a relation on V . Show that it is not possible for A to beboth reflexive and irreflexive.

3. For the relation in Exercise 3 of Exercise Set 4.1, determine which of the properties ofDefinition 4.4 are satisfied.

4. Let A be a relation on a nonempty finite set V = {v1, v2, . . . , vn}. Characterize the transitiveproperty in terms of the matrix and directed graph of A.

5. For the relations in Exercise 5 of Exercise Set 4.1, determine which of the properties ofDefinition 4.4 are satisfied.

6. Let U be a nonempty set and define the relation A on the power set of U by

(X, Y ) ∈ A ↔ X ∩ Y = ∅

Clearly, A is symmetric.

(a) Explain why A is not reflexive.(b) Explain why A is not irreflexive.(c) Show that A is not transitive.(d) Let U = {1, 2, 3}; draw the directed graph of A.

7. For the relations in Exercise 7 of Exercise Set 4.1, determine which of the properties ofDefinition 4.4 are satisfied.

8. In the context of Example 4.1, define the relation A on X by

x1 A x2 ↔ ∃ y ∈ Y (x1 R y and x2 R y)

Determine the relation A and indicate which of the properties of Definition 4.4 it satisfies.

9. For each of the following relations on Z+ − {1}, determine which of the properties of Definition4.4 it satisfies.

(a) A1 = {(m, n) | m and n are relatively prime}(b) A2 = {(m, n) | m and n are not relatively prime}

10. Let A be a relation on a nonempty set V . Complete each of the following statements.

(a) A is not reflexive if and only if, for some v ∈ V , .(b) A is not irreflexive if and only if, for some v ∈ V , .(c) A is not symmetric if and only if, for some u, v ∈ V , .(d) A is not antisymmetric if and only if, for some u, v ∈ V , u 6= v and .(e) A is not transitive if and only if, for some u, v, w ∈ V , .

180 Chapter 4 Relations

11. For each of the following relations on Z+, determine which of the properties of Definition 4.4it satisfies.

(a) A1 = {(m, n) | m divides n} (b) A2 = {(m, n) | n divides m}(c) A3 = {(m, n) | m + n is even} (d) A4 = {(m, n) | m + n is odd}(e) A5 = {(m, n) | mn is even} (f) A6 = {(m, n) | mn is odd}

12. For the relation A of Example 4.3, determine which of the properties it satisfies.

13. For each of the following relations on Z, determine which of the properties of Definition 4.4 itsatisfies.

(a) A1 = {(m, n) | m ≤ n} (b) A2 = {(m, n) | m− n is even}(c) A3 = {(m, n) | n is a multiple of m} (d) A4 = {(m, n) | m− n is odd}(e) A5 = {(m, n) | 3 divides m + 2n} (f) A6 = {(m, n) | mn > 0}

14. For the relation A of Example 4.4, determine which of the properties of Definition 4.4 itsatisfies.

15. Each part of Figure 4.6 shows the directed graph of a relation on {1, 2, 3, 4}; for each of theserelations, determine which of the properties of Definition 4.4 it satisfies.

16. Let A1 and A2 be relations on the nonempty set V . Then each of A1 ∩ A2, A1 ∪ A2, andA1 − A2 is also a relation on V . (Why?) For each of the following statements, indicate whetherthe statement is true or false. (Optional: If the statement is true, prove it; if it is false, give acounterexample to disprove it.)

(a) If both A1 and A2 are reflexive, then A1 ∩ A2 is reflexive.(b) If A1 is reflexive or A2 is reflexive, then A1 ∪ A2 is reflexive.(c) If both A1 and A2 are reflexive, then A1 − A2 is irreflexive.(d) If A1 is irreflexive or A2 is irreflexive, then A1 ∩A2 is irreflexive.(e) If both A1 and A2 are irreflexive, then A1 ∪ A2 is irreflexive.(f) If A1 is irreflexive, then A1 − A2 is irreflexive.(g) If both A1 and A2 are symmetric, then A1 ∩ A2 is symmetric.(h) If both A1 and A2 are symmetric, then A1 ∪ A2 is symmetric.(i) If both A1 and A2 are symmetric, then A1 − A2 is symmetric.(j) If A1 is antisymmetric or A2 is antisymmetric, then A1 ∩ A2 is antisymmetric.(k) If both A1 and A2 are antisymmetric, then A1 ∪A2 is antisymmetric.(l) If A1 is antisymmetric, then A1 − A2 is antisymmetric.(m) If both A1 and A2 are transitive, then A1 ∩ A2 is transitive.(n) If both A1 and A2 are transitive, then A1 ∪ A2 is transitive.(o) If both A1 and A2 are transitive, then A1 − A2 is transitive.

4.2 Properties of Relations 181

182 Chapter 4 Relations

4.2 Properties of Relations 183

Figure 4.6

184 Chapter 4 Relations

4.3 EQUIVALENCE RELATIONS

A relation A on a nonempty set V may have several of the properties of being reflexive, irreflexive,symmetric, antisymmetric, or transitive. Certain combinations of these properties lead to importantkinds of relations for which a general theory has been developed. For example, each of the followingrelations is reflexive, symmetric, and transitive:

1. the relation on Z defined by x is related to y if and only if |x| = |y|;2. the relation defined on a nonempty set of people by x is related to y if and only if x has the

same birthday as y (i.e., x’s birthday falls on the same day as does y’s);3. the relation of “has the same slope as” defined on the set of lines in an x-y plane;4. the relation of “is congruent to” defined on the set of triangles in a plane;5. the relation defined on the set of circles in a plane by x is related to y if and only if x has

the same radius as y.

Definition 4.6: A relation A on a nonempty set V is called an equivalence relation providedit is reflexive, symmetric, and transitive.

In this section we discuss some of the important properties of equivalence relations. In particular,we will prove that any equivalence relation on a nonempty set V can be characterized in terms of apartition of V .

Example 4.14: Let V = {1, 2, 3, 4, 5}. Each of the following is an equivalence relation on V :

(a) the identity relation IV ;(b) A1 = IV ∪ {(2, 5), (3, 4), (4, 3), (5, 2)};(c) A2 = IV ∪ {(1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2), (4, 5), (5, 4)};(d) the complete relation on V .

Consider again the relation A of Example 4.10, defined for integers a and b by

(a, b) ∈ A ↔ 3 | (a − b)

It was shown in that example that A is reflexive, symmetric, and transitive; hence, A is an equivalencerelation. If (a, b) ∈ A, then a mod 3 = b mod 3, by Theorem 3.6. Conversely, if a mod 3 = b mod 3,then (a, b) ∈ A. In other words, the integers a and b are related under A if and only if a and b yieldthe same remainder when divided by 3. In this case, we say that “a is congruent to b modulo 3,”and we write

a ≡ b (mod 3)

This relation is called “congruence modulo 3.” There is nothing special about the use of 3 in thisexample; we can just as well use any positive integer n.

4.3 Equivalence Relations 185

Definition 4.7: Let n be a positive integer. Given integers a and b, we say that a is congruent

to b modulo n, denoted a≡b (mod n), provided a − b s a multiple of n (or, equivalently, provideda mod n = b mod n). This relation on Z is referred to as congruence modulo n.

Theorem 4.1: For any n ∈ Z+, the relation congruence modulo n is an equivalence relation on Z.�

You are asked to prove Theorem 4.1 in Exercise 2. The relation of congruence modulo n gives riseto some interesting results in number theory and provides a number of very useful and fundamentalexamples in the area of abstract algebra.

Consider once again the relation congruence modulo 3 on Z. The very use of the word relation

suggests asking for the set of all “relatives” of a given fixed integer v; that is, we ask for the set ofall those integers u such that u ≡ v (mod 3). For an integer u, we note that u mod 3 is exactly oneof 0, 1, or 2, so it seems reasonable to consider the set of relatives of each of 0, 1, and 2. Thus, weconsider the following sets:

[

0]

= {u ∈ Z | u ≡ 0 (mod 3)}[

1]

= {u ∈ Z | u ≡ 1 (mod 3)}[

2]

= {u ∈ Z | u ≡ 2 (mod 3)}What are the elements of

[

0]

? This is easily determined in the following string:

u ∈[

0]

↔ u ≡ 0 (mod 3) ↔ u mod 3 = 0 ↔ u = 3q for some q ∈ Z

Thus, we see that[

0]

= {3q | q ∈ Z}. In a similar fashion, we obtain that

[

1]

= {3q + 1 | q ∈ Z} and[

2]

= {3q + 2 | q ∈ Z}

More explicitly,[

0]

= { . . . ,−6,−3, 0, 3, 6, . . .}[

1]

= { . . . ,−5,−2, 1, 4, 7, . . .}[

2]

= { . . . ,−4,−1, 2, 5, 8, . . .}Here are some relevant observations to make about the sets

[

0]

,[

1]

, and[

2]

:

1.[

0]

,[

1]

, and[

2]

are each nonempty.

2.[

0]

,[

1]

, and[

2]

are pairwise disjoint.

3.[

0]

∪[

1]

∪[

2]

= Z

Facts 2 and 3 follow from the division algorithm, because each u ∈ Z is uniquely expressible in theform u = 3q + r, with r = 0, 1, or 2.

An analogous discussion can be applied to the relation of congruence modulo n for any positiveinteger n; in fact, this discussion can be applied to any equivalence relation.

Definition 4.8: Let V be a nonempty set and let A be a symmetric relation on V . For eachv ∈ V , the set of relatives of v is denoted by

[

v]

and is defined as follows:

[

v]

= {u ∈ V | (u, v) ∈ A}

186 Chapter 4 Relations

In the particular case when A is an equivalence relation,[

v]

is called the equivalence class of v.

In the context of Definition 4.8, note that we may also define[

v]

as follows:

[

v]

= {u ∈ V | (v, u) ∈ A}

In other words, since the relation A is symmetric, we may define[

v]

as the set of elements relatedto v or as the set of elements to which v is related, whichever is more convenient. We can also makethe following remark about

[

v]

:

A is reflexive ↔ v ∈[

v]

for every v ∈ V

A is irreflexive ↔ v /∈[

v]

for every v ∈ V

Example 4.15: Each part of Example 4.14 gives an equivalence relation on V = {1, 2, 3, 4, 5};find the equivalence classes.

Solution:

(a) For the identity relation IV on V , every element is related to itself but no two distinctelements are related. Thus,

[

1]

= {1},[

2]

= {2},[

3]

= {3},[

4]

= {4},[

5]

= {5}

(b) For the relation A1 we have:

[

1]

= {1},[

2]

= {2, 5} =[

5]

,[

3]

= {3, 4} =[

4]

(c) For the relation A2 we have:

[

1]

= {1, 2, 3} =[

2]

=[

3]

,[

4]

= {4, 5} =[

5]

(d) For the complete relation on V , all elements are related to each other. Thus,

[

1]

= {1, 2, 3, 4, 5}=[

2]

=[

3]

=[

4]

=[

5]

Example 4.16: Each part gives a symmetric relation on Z. For m ∈ Z, find[

m]

.

(a) A1 = {(u, v) | u + v is odd} (b) A2 = {(u, v) | uv is odd}(c) A3 = {(u, v) | |u| = |v|} (d) A4 = {(0, 0)} ∪ {(u, v) | uv > 0}

4.3 Equivalence Relations 187

Solution:

(a) Note that A1 is irreflexive and that integers u and v are related if and only if either u is oddand v is even or u is even and v is odd. Thus,

[

m]

=

{

2Z if m is odd

1 + 2Z if m is even

(Also observe that A1 is not transitive; for example, (0, 1) ∈ A1 and (1, 2) ∈ A1, but (0, 2) /∈ A1.)(b) Integers u and v are related under A2 if and only if both u and v are odd. Hence,

[

m]

=

{

1 + 2Z if m is odd

∅ if m is even

(Observe that A2 is transitive, not reflexive, and not irreflexive.)(c) The relation A3 is easily seen to be an equivalence relation. Note that −m and m are related

under A3 for any integer m; thus, it follows that

[

m]

= {−m, m}

In particular,

[

0]

= {0},[

1]

= {−1, 1},[

2]

= {−2, 2},[

3]

= {−3, 3}, . . .

are the distinct equivalence classes of the relation A3; observe that[

0]

,[

1]

,[

2]

,[

3]

, . . . are nonempty,pairwise disjoint, and that

Z =[

0]

∪[

1]

∪[

2]

∪[

3]

∪ · · ·(d) Under A4, 0 is related only to itself and, for u 6= 0 and v 6= 0, u and v are related if and only

if they have the same sign. It follows that A4 is an equivalence relation and that

[

m]

=

{0} if m = 0

Z− if m < 0

Z+ if m > 0

In particular,[

−1]

= {. . . ,−3,−2,−1},[

0]

= {0},[

1]

= {1, 2, 3, . . .}are the distinct equivalence classes of the relation A4; observe that, as in part (c), these sets arenonempty, pairwise disjoint, and their union is Z.

Example 4.17: Define the relation ∼ on the set of points of the plane R × R by

P1 ∼ P2 ↔ d(P1, Q) = d(P2, Q)

where Q is a fixed point in the plane and d(P, Q) denotes the distance from P to Q. It is easy toverify that ∼ is an equivalence relation on R × R. (Often the symbol ∼ (called “sim” or “wiggle”)is used to denote an equivalence relation on a nonempty set V — we write u ∼ v to denote the factthat u is related to v.)

188 Chapter 4 Relations

What is the equivalence class containing a given point P ? By definition,

[

P]

= {X | X ∼ P } = {X | d(X, Q) = d(P, Q)}

Thus, if d(P, Q) = r > 0, then[

P]

consists of all those points X which are at a distance r from Q.

This set of points is precisely the circle with center Q and radius r. Also,[

Q]

= {Q}; that is, Q isin an equivalence class all by itself, which we can consider as the “circle” with radius 0 centered atQ. So the equivalence classes of the equivalence relation ∼ are the circles in R × R with center Q.

In parts (c) and (d) of Example 4.16, we are given an equivalence relation A on a nonempty setV and we obtain (from the distinct equivalence classes) a collection of pairwise disjoint, nonemptysubsets of V whose union is V . The same phenomenon occurs in each part of Example 4.15. Inpart (c), for example, the distinct equivalence classes are

[

1]

= {1, 2, 3} and[

4]

= {4, 5}; these two

sets are nonempty, pairwise disjoint, and[

1]

∪[

4]

= {1, 2, 3, 4, 5} = V . A collection of subsets withthese properties has a special name.

Definition 4.9: Let V be a nonempty set. A set P of subsets of V is called a partition of Vprovided the following conditions hold:

1. Each subset X in P is nonempty.2. Any two distinct subsets X and Y in P are disjoint.3. The union of the subsets in P is V .

The subsets of V in a partition of V are called parts.�

Example 4.18: The relation congruence modulo 3 on Z yields the partition P = {[

0]

,[

1]

,[

2]

}of Z, where

[

r]

= {3q + r | q ∈ Z} = r + 3Z. This partition of Z has three parts.

In Example 4.17, the relation ∼ yields the partition of the plane into the circles centered at thefixed point Q. This partition of the plane has an infinite number of parts.

The identity relation IV on a nonempty set V is an equivalence relation and yields the partitionP = {{v} | v ∈ V }. Since each element is related only to itself, this partition of V has each elementv ∈ V in a part all by itself. For example, as seen in Example 4.15, part (a), the identity relationon V = {1, 2, 3, 4, 5} yields the partition {{1}, {2}, {3}, {4}, {5}} of V . Notice that this partitionhas 5 parts; in general, if V is a finite set with n ≥ 1 elements, then the partition {{v} | v ∈ V } ofV has n parts.

What about the complete relation on a nonempty set V ? For this relation, each element isrelated to every other element (and to itself), and hence

[

v]

= V for every element v. Thus, thecomplete relation yields the partition {V } of V ; notice that this is the unique partition of V havingexactly one part.

4.3 Equivalence Relations 189

As seen in the preceding examples, an equivalence relation ∼ on V determines or “induces” apartition of V ; this partition is obtained by finding the distinct equivalence classes of ∼. Whatabout the relationship in the other direction? That is, if we start with a partition P of V , can wefind an equivalence relation ∼ on V whose distinct equivalence classes are the parts of P? Indeedwe can, and the next example illustrates this idea.

Example 4.19: Consider the partition P = {{1, 4}, {2, 5, 7}, {3, 6}} of V = {1, 2, 3, 4, 5, 6, 7}.Let’s define an equivalence relation ∼ on V so that the (distinct) equivalence classes of ∼ are theparts of P.

Since ∼ is reflexive, every element of V is related to itself under ∼; in other words, v ∈[

v]

forevery v. Hence,

[

1]

=[

4]

= {1, 4},[

2]

=[

5]

=[

7]

= {2, 5, 7},[

3]

=[

6]

= {3, 6}

Now, since 4 ∈[

1]

, we have that 1 ∼ 4 (and also, of course, 4 ∼ 1 since ∼ is symmetric). Similarly,we obtain that 2 ∼ 5, 2 ∼ 7, 5 ∼ 7, and 3 ∼ 6. Therefore, in terms of ordered pairs, the relation ∼is defined as follows:

IV ∪ {(1, 4), (2, 5), (2, 7), (3, 6), (4, 1), (5, 2), (5, 7), (6, 3), (7, 2), (7, 5)}

Alternately, we may define the relation ∼ very succinctly as follows:

u ∼ v ↔ u and v belong to the same part of P

At first glance, it is difficult to see any strong connection between the concepts of equivalencerelation and partition. However, as the preceding examples illustrate, there is indeed a very strongrelationship.

Theorem 4.2 (Fundamental Theorem on Equivalence Relations): Let V be a nonempty

set. If ∼ is an equivalence relation on V , then the set

P = {[

v]

| v ∈ V }

of the equivalence classes of ∼ is a partition of V . Conversely, if P is a partition of V , then therelation ∼ defined on V by

u ∼ v ↔ u and v belong to the same part of P

is an equivalence relation on V .

Proof: We prove the first part of the theorem, that if ∼ is an equivalence relation on V , then theset P of equivalence classes is a partition of V . You are asked to prove the other part in Exercise 4.

190 Chapter 4 Relations

First, it is clear that[

v]

is nonempty for each v ∈ V ; in particular, v ∈[

v]

since ∼ is reflexive.

Next, to show that distinct equivalence classes are disjoint, we prove the contrapositive: If[

u]

and[

v]

are not disjoint, then[

u]

=[

v]

. So assume[

u]

∩[

v]

6= ∅, say, w ∈[

u]

∩[

v]

. To show that[

u]

=[

v]

, recall that it suffices show that both[

u]

⊆[

v]

and[

v]

⊆[

u]

; in fact, since the proofs of

these inclusions are analogous, we show only that[

u]

⊆[

v]

. To proceed, let x denote an arbitrary

element of[

u]

. Now, since x ∈[

u]

we have x ∼ u, and since w ∈[

u]

and ∼ is symmetric, we have

u ∼ w. Then, since ∼ is transitive, we obtain that x ∼ w. Now then, since w ∈[

v]

, we have

w ∼ v. Hence, again using the transitive property, we obtain that x ∼ v. Thus, x ∈[

v]

, as was tobe shown. Therefore, P is a pairwise-disjoint collection.

Lastly, to show that the union of all equivalence classes is V , it suffices to show that each v ∈ Vbelongs to some equivalence class. But this is obvious because v ∈

[

v]

. This completes the proof.

To repeat, if ∼ is an equivalence relation on a nonempty set V , then the set P = {[

v]

| v ∈ V }of equivalence classes is a partition of V . Conversely, given a partition C of V , the partition Cdetermines an equivalence relation A on V , where (u, v) ∈ A if and only if u and v belong to thesame part of C. We call A the equivalence relation on V induced by C. In fact, if ∼ is anequivalence relation on V and P = {

[

v]

| v ∈ V }, then the equivalence relation on V induced byP is precisely ∼. Thus, in a very real sense, the notions of equivalence relation and partition areequivalent.

Example 4.20: Let V be the set of points in the plane R2 = R × R.

(a) Define the relation ∼ on V − {(0, 0)} by

(x1, y1) ∼ (x2, y2) ↔ x1y2 = x2y1

It is easy to verify that ∼ is an equivalence relation; find the partition of V −{(0, 0}} induced by ∼.(b) For each b ∈ R, let Lb denote the line in the xy-plane with equation y = x + b (that is, Lb is

the line having slope 1 and y-intercept (0, b)). Then it can be seen that the set L = {Lb | b ∈ R} isa partition of the plane. Determine the equivalence relation ∼ on V induced by L.

Solution:

(a) Let (a, b) be a point in the plane, (a, b) 6= (0, 0). Then we have

[

(a, b)]

= {(x, y) | (x, y) ∼ (a, b)} = {(x, y) | xb = ay} =

{

{(x, y) | y = bx/a}, if a 6= 0

{(0, y)}, if a = 0

Thus, if a 6= 0, then[

(a, b)]

consists of those points (other than the origin) on the line y = bx/a

(note that this is the line through the origin with slope b/a, whereas, if a = 0, then[

(a, b)]

consistsof all the points on the y-axis, except for the origin. Hence, the partition of set of points of theplane, other than the origin, induced by ∼ is the partition of this set of points into the lines throughthe origin (with the origin removed from each such line).

(b) Let (x1, y1) and (x2, y2) be two points in the plane. Then, according to the discussionpreceding the example, (x1, y1) ∼ (x2, y2) if and only if (x1, y1) and (x2, y2) are points on the same

4.3 Equivalence Relations 191

line Lb for some b ∈ R. This happens if and only if y1 − x1 = b = y2 − x2. Hence, the equivalencerelation ∼ on V induced by L is given by

(x1, y1) ∼ (x2, y2) ↔ y1 − x1 = y2 − x2

In fact, as remarked preceding the example, note that if we start with this equivalence relation ∼on V , then the set of equivalence classes of ∼ is precisely L.

Example 4.21: Each part gives a partition of the set V = {1, 2, 3, 4, 5, 6}. Find the equivalence

relation on V induced by the partition.

(a) P1 = {{1, 2}, {3, 4}, {5, 6}}(b) P2 = {{1}, {2}, {3, 4, 5, 6}}(c) P3 = {{1, 2, 3}, {4, 5, 6}}

Solution:

(a) The equivalence relation induced by P1 is

A1 = IV ∪ {(1, 2), (2, 1), (3, 4), (4, 3), (5, 6), (6, 5)}

(b) The equivalence relation induced by P2 is

A2 = IV ∪ {(3, 4), (3, 5), (3, 6), (4, 3), (4, 5), (4, 6), (5, 3), (5, 4), (5, 6), (6, 3), (6, 4), (6, 5)}

(c) Similarly, the equivalence relation induced by P3 is

A3 = IV ∪ {(1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2), (4, 5), (4, 6), (5, 4), (5, 6), (6, 4), (6, 5)}= ({1, 2, 3}× {1, 2, 3})∪ ({4, 5, 6}× {4, 5, 6})

In the special (and important) case of congruence modulo n on Z, the induced partition is{[

r]

| r ∈ Z}, where[

r]

= {m ∈ Z | m ≡ r (mod n)}. What are the distinct equivalence classesof congruence modulo n? For any m ∈ Z, recall that there exist unique integers q and r such thatm = nq + r, with 0 ≤ r ≤ n − 1. Hence, m ≡ r (mod n), and we have m ∈

[

r]

. Thus, every

integer belongs to exactly one of the equivalence classes[

0]

,[

1]

, . . . ,[

n − 1]

. It follows that these

classes are pairwise disjoint and that their union is Z. Thus, {[

0],[

1], . . . ,[

n − 1]} is a partition ofZ, where, for 0 ≤ r ≤ n − 1,

[

r]

= {nq + r | q ∈ Z} = r + nZ = {. . . ,−2n + r,−n + r, r, n + r, 2n + r, . . .}

The set {[

0]

,[

1]

,[

2]

, . . . ,[

n − 1]

} is called the set of residue classes modulo n.For example, if n = 4, then the residue classes modulo 4 are:

[

0]

= 4Z = {. . . ,−8,−4, 0, 4, 8, . . .}[

1]

= 1 + 4Z = {. . . ,−7,−3, 1, 5, 9, . . .}[

2]

= 2 + 4Z = {. . . ,−6,−2, 2, 6, 10, . . .}[

3]

= 3 + 4Z = {. . . ,−5,−1, 3, 7, 11, . . .}

192 Chapter 4 Relations

When working with congruence modulo n, keep in mind that[

a]

=[

b]

if and only if n | (a − b).Thus, with n = 4, for instance, we see that

· · · =[

−10]

=[

−6]

=[

−2]

=[

2]

=[

6]

=[

10]

= · · ·

Each of the numbers −10, −6, −2, 2, 6, 10, and so on, is called a representative of the residueclass

[

2]

.

Exercise Set 4.3

1. The relation A4 in part (d) of Exercise 5 of Exercise Set 4.1 is an equivalence relation; find theequivalence classes.

2. Prove Theorem 4.1.

3. The relation A3 in part (c) of Exercise 11 of Exercise Set 4.2 is an equivalence relation on Z+;find the equivalence classes.

4. Prove the remaining part of Theorem 4.2, that if P is a partition of V , then the relation ∼defined on V by

u ∼ v ↔ u and v belong to the same part of Pis an equivalence relation.

5. The relation A2 of part (b) of Exercise 13 of Exercise 4.2 is an equivalence relation on Z; findthe equivalence classes.

6. For each of these symmetric relations on Z+, find[

n]

, n ∈ Z+.

(a) the relation A4 of part (d) of Exercise 11 of Exercise Set 4.2(b) the relation A5 of part (e) of Exercise 11 of Exercise Set 4.2(c) the relation A6 of part (f) of Exercise 11 of Exercise Set 4.2

7. The relation A5 of part (e) of Exercise 13 of Exercise 4.2 is an equivalence relation on Z; findthe equivalence classes.

8. The relation A2 of part (b) of Exercise 9 of Exercise Set 4.2 is a symmetric relation onZ+ − {1}; find

[

n]

, n ∈ Z+. (Hint: Consider the prime factors of n.)

9. Which of the relations whose digraphs are shown in Figure 4.6 are equivalence relations on{1, 2, 3, 4}? For any that are, find the equivalence classes.

10. Determine which of the numbers −22, −12, −6, −3, −2, 3, 6, 8, 39, and 44 are congruentmodulo:

(a) 2 (b) 3(c) 5 (d) 9

11. Define the relation ∼ on Z by

u ∼ v ↔ |u− 2| = |v − 2|

Verify that ∼ is an equivalence relation and find the equivalence classes.

12. Let A1 and A2 be relations on the nonempty set V . Then each of A1 ∩ A2, A1 ∪ A2, andA1 − A2 is also a relation on V . (See Exercise 16 of Exercise Set 4.2.) For each of the followingstatements, indicate whether the statement is true or false. (Optional: If the statement is true,prove it; if it is false, give a counterexample.)

4.3 Equivalence Relations 193

(a) If A1 and A2 are both equivalence relations, then so is A1 ∩ A2.(b) If A1 and A2 are both equivalence relations, then so is A1 ∪ A2.(c) If A1 and A2 are both equivalence relations, then so is A1 − A2.

13. Let U be a nonempty set and let W be a fixed subset of U . Define the relation ∼ on P(U) by

X ∼ Y ↔ X ∩ W = Y ∩ W

(a) Show that ∼ is an equivalence relation.(b) In particular, if U = {1, 2, 3, 4} and W = {1, 3}, find

[

X]

for X ∈ P(U).

(c) In particular, if U = {1, 2, 3, 4, 5} and W = {1, 2, 5}, find[

X]

for X ∈ P(U).

14. Each part gives a set; determine the number of equivalence relations on the set.

(a) {1} (b) {1, 2}(c) {1, 2, 3} (d) {1, 2, 3, 4}

15. Each part gives a partition of the set V = {1, 2, 3, 4, 5, 6, 7}. Find the equivalence relation onV induced by the partition.

(a) P1 = {{1}, {2}, {3}, {4}, {5}, {6}, {7}}(b) P2 = {{1}, {2, 3}, {4, 5}, {6, 7}}(c) P3 = {{1, 3, 5, 7}, {2, 4, 6}}(d) P4 = {{1, 2, 3, 4, 5, 6, 7}}

16. In Exercise 12 it is found that if A1 and A2 are both equivalence relations on a nonempty setV , then A1 ∩ A2 is an equivalence relation on V . How are the equivalence classes for A1 ∩ A2

determined from the equivalence classes for A1 and those for A2?

17. Define the relation ∼ on the set Q by

x ∼ y ↔ x − y ∈ Z

(a) Show that ∼ is an equivalence relation.(b) Find (explicitly)

[

0]

.

(c) Find[

1/2]

.

(d) Generalize parts (b) and (c): for t ∈ Q, 0 ≤ t < 1, find[

t]

.

18. Let ∼ be a reflexive relation on a nonempty set V . Prove that ∼ is an equivalence relation ifand only if the following condition holds for any elements u, v, w ∈ V (u, v, and w are notnecessarily distinct):

(u ∼ v and u ∼ w) → v ∼ w

19. For each of the following relations ∼ on R × R, determine whether it is an equivalencerelation. If it is, describe (geometrically) the equivalence class

[

(a, b)]

.

(a) (x1, y1) ∼ (x2, y2) ↔ x1 + y2 = x2 + y1

(b) (x1, y1) ∼ (x2, y2) ↔ (x1 − 1)2 + y21 = (x2 − 1)2 + y2

2

(c) (x1, y1) ∼ (x2, y2) ↔ (x1 − x2)(y1 − y2) = 0(d) (x1, y1) ∼ (x2, y2) ↔ |x1|+|y1| = |x2|+|y2|(e) (x1, y1) ∼ (x2, y2) ↔ x1y1 = x2y2

194 Chapter 4 Relations

20. For each of the following relations ∼ on R, verify that ∼ is an equivalence relation anddescribe the equivalence classes of ∼.

(a) x ∼ y ↔ bxc = byc, (where bxc denotes the largest integer m such that m ≤ x.)(b) x ∼ y ↔ bx + 0.5c = by + 0.5c(c) x ∼ y ↔ |x| = |y|(d) x ∼ y ↔ x − y ∈ Z

(e) x ∼ y ↔ x − y ∈ Q

CHAPTER PROBLEMS

1. Give an example of a relation on Z that is:

(a) irreflexive and symmetric(b) irreflexive and transitive(c) reflexive and symmetric but not transitive(d) reflexive and transitive but not symmetric

2. Let V be a nonempty set and let A be a relation on V . Let V ′ be a nonempty subset of V .Define the relation A′ on V ′ by

A′ = {(u, v) | (u, v) ∈ A}= A ∩ (V ′ × V ′)

that is, for u, v ∈ V ′, u is related to v under A′ if and only if u is related to v under A. Therelation A′ is called the restriction of A to V ′. Prove each of the following statements.

(a) If A is reflexive, then A′ is reflexive.(b) If A is irreflexive, then A′ is irreflexive.(c) If A is symmetric, then A′ is symmetric.(d) If A is antisymmetric, then A′ is antisymmetric.(e) If A is transitive, then A′ is transitive.

3. Each part gives a set V and a relation A on V . Determine which of the properties ofDefinition 4.4 are satisfied by A.

(a) V = P({1, 2, 3, 4}); (X, Y ) ∈ A ↔ X ⊆ Y ∪ {1}(b) V = Z7; (x, y) ∈ A ↔ y = −x.(c) V = Z7 − {0}; (x, y) ∈ A ↔ y = x−1

(d) V = Z; (x, y) ∈ A ↔ |x − y| > 1(e) V = Z; (x, y) ∈ A ↔ xy ≥ 1(f) V = (0, 1); (x, y) ∈ A ↔ xy ∈ Q

4. In the context of Problem 2, prove: If A is an equivalence relation, then so is A′.

5. Define the relation ∼ on the set R+ of positive real numbers by

x ∼ y ↔ x/y ∈ Q+

Chapter Problems 195

(a) Show that ∼ is an equivalence relation.(b) Find

[

1]

.

(c) For t ∈ (0, 1) − Q+, find[

t]

.

6. Let A be a symmetric and transitive relation on a nonempty set V . Prove: If dom A = V ,then A is reflexive.

7. Define the relation ∼ on Z byx ∼ y ↔ 5 | (2x + 3y)

(a) Show that ∼ is an equivalence relation.(b) Determine the distinct equivalence classes of ∼.

8. Let V be the set of functions from Z+ to R+. For each of the following relations on V ,determine which of the properties of Definition 4.4 it satisfies.

(a) the “little oh” relation; that is, f is o(g) if and only if

limn→∞

f(n)

g(n)= 0

(b) the “big oh” relation; that is, f is O(g) if and only if there is a positive constant c such that,for n sufficiently large, f(n) ≤ cg(n).

(c) the “theta” relation; that is, f is Θ(g) if and only if there exist positive constants c1 and c2

such that, for n sufficiently large, c1g(n) ≤ f(n) ≤ c2g(n).

Are any of these relations equivalence relations?

9. Let A1 and A2 be relations on a nonempty set V . For each of the following statements,indicate whether the statement is true or false. (Optional: If the statement is true, prove it; if it isfalse, give a counterexample.)

(a) If A1 ∩ A2 is reflexive, then A1 is reflexive.(b) If A1 ∪ A2 is reflexive, then A1 is reflexive.(c) If A1 is reflexive and A2 is irreflexive, then A1 − A2 is reflexive.(d) If A1 ∩ A2 is irreflexive, then A1 is irreflexive.(e) If A1 ∪ A2 is irreflexive, then A1 is irreflexive.(f) If A1 − A2 is irreflexive, then A1 is irreflexive.(g) If A1 ∩ A2 is symmetric, then A1 is symmetric.(h) If A1 ∪ A2 is symmetric, then A1 is symmetric.(i) If A1 is symmetric, then A1 − A2 is symmetric.(j) If A1 ∩A2 is antisymmetric, then A1 is antisymmetric.(k) If A1 ∪ A2 is antisymmetric, then A1 is antisymmetric.(l) If A1 − A2 is antisymmetric, then A1 is antisymmetric.(m) If A1 ∩ A2 is transitive, then A1 is transitive.(n) If A1 ∪ A2 is transitive, then A1 is transitive.

10. Show that the relation “is asymptotic to” is an equivalence relation on the set of functionsfrom Z+ to R+, where the relation “is asymptotic to,” or ∼, is defined by

f ∼ g ↔ limn→∞

f(n)

g(n)= 1

196 Chapter 4 Relations

11. Define the relation ∼ on Z × Z+ by

(m1 , n1) ∼ (m2, n2) ↔ m1n2 = m2n1

(a) Show that ∼ is an equivalence relation.(b) Describe the equivalence class

[

(m, n)]

in a nice way. (Hint: Consider the fraction m/n.)

12. Let A be a relation on a nonempty set V . Define the relation Ar on V by

(u, v) ∈ Ar ↔[

(u, v) ∈ A or u = v]

that is, Ar = A ∪IV .

(a) Show that Ar is reflexive.(b) Under what condition does Ar = A?(c) Prove: If A′ is a reflexive relation on V and A ⊆ A′, then Ar ⊆ A′.

The relation Ar is called the reflexive closure of A. Find the reflexive closure of each of thefollowing relations.

(d) A1 = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 4), (3, 5), (4, 3), (4, 5), (5, 3), (5, 4)} on {1, 2, 3, 4, 5}(e) < on Z

(f) ∼ on Z defined by m ∼ n ↔ mn is odd

13. A relation A on a nonempty set V is called a partial order relation, or partial ordering,provided A is reflexive, antisymmetric, and transitive.

(a) Show that “≤” is a partial order relation on R.(b) Show that the relation “divides” is a partial order relation on Z+.(c) Explain why “divides” is not a partial order relation on Z.

14. Let A be a relation on a nonempty set V . Define the relation As on V by

(u, v) ∈ As ↔[

(u, v) ∈ A or (v, u) ∈ A]

(a) Show that As is symmetric.(b) Note that A ⊆ As. Under what condition does A = As?(c) Prove: If A′ is a symmetric relation on V and A ⊆ A′, then As ⊆ A′.

The relation As is called the symmetric closure of A. Find the symmetric closure of each of thefollowing relations:

(d) A1 = {(1, 1), (1, 2), (1, 3), (2, 2), (2, 4), (3, 3), (4, 4)} on {1, 2, 3, 4}(e) < on Z

15. Define the relation � on Q+ by

x � y ↔ y

x∈ Z+

(a) Show that � is a partial order relation on Q+.(b) Show that the restriction of � to Z+ is the relation “divides” on Z+.

Chapter Problems 197

(It is customary to use the symbol “�” to denote an abstract partial order relation; the symbol“�” is called “preceq.”)

16. Let A be a relation on a nonempty set V . The transitive closure of A is the relation At on Vthat is defined by the following properties:

(1) At is transitive.(2) A ⊆ At

(3) If A′ is a transitive relation on V and A ⊆ A′, then At ⊆ A′.

Informally, At is the smallest transitive relation on V that contains A.

(a) Find the transitive closure of the relation A1 = {(1, 2), (2, 1), (2, 3), (3, 4)} on {1, 2, 3, 4}.(b) Find the transitive closure of the relation A2 defined on Z by

(m, n) ∈ A2 ↔ n = m + 1

Define the relation A2 on V by

(u, w) ∈ A2 ↔[

(u, w) ∈ A or[

(u, v) ∈ A and (v, w) ∈ A for some v ∈ V]]

In view of Exercises 12 and 14, it is tempting to define At by At = A2. However:(c) Show that A2 is not transitive in general.

17. Let V = {(m, n) | m, n ∈ Z+ and m and n are relatively prime}. Define the relation � on Vby

(m1 , n1) � (m2, n2) ↔ m1n2 ≤ m2n1

Show that � is a partial order relation.

18. Let V be a nonempty set and let A be a relation on V . Prove or disprove each of thefollowing statements.

(a) If A is symmetric and transitive, then so is Ar. (See Problem 12.)(b) If A is reflexive and transitive, then so is As. (See Problem 14.)(c) If A is reflexive and symmetric, then so is At. (See Problem 16.)(d) The relation ((Ar)s)t is an equivalence relation on V .(e) If A is reflexive and antisymmetric, then At is a partial order relation on V .

19. Define the relation ∼ on the set Q by

x ∼ y ↔ 2(x − y) ∈ Z

(a) Show that ∼ is an equivalence relation.(b) Find (explicitly)

[

0]

.

(c) Find[

1/4]

.

(d) Generalize parts (b) and (c): for t ∈ Q, 0 ≤ t < 1/2, find[

t]

.

20. Let A1 and A2 be relations on a nonempty set V ; suppose that A1 is an equivalence relationand A2 is a partial order relation.

(a) For example, suppose that V = Z+, A1 is the relation of congruence modulo 2, and A2 is therelation of divides. Find A1 ∩ A2 in this case.

(b) Show, in general, that A1 ∩A2 is a partial ordering of V .

198 Chapter 4 Relations

21. Define the relation ∼ on the set Q by

x ∼ y ↔ x − y

2∈ Z

(a) Show that ∼ is an equivalence relation.(b) Find (explicitly)

[

0]

.

(c) Find[

1]

.

(d) Find[

1/2]

.

(e) Generalize parts (b), (c), and (d): for t ∈ Q, 0 ≤ t < 2, find[

t]

.

22. Let V1 and V2 be nonempty sets, let A1 be a relation on V1 and let A2 be a relation on V2.Define the relations A and A′ on V1 × V2 as follows:

(u1, u2) A (v1, v2) ↔ (u1 A1 v1 and u2 A2 v2)

(u1, u2) A′ (v1, v2) ↔[

(u1 6= v1) and u1 A1 v1) or (u1 = v1 and u2 A2 v2)]

For each of the following statements, indicate whether the statement is true or false. (Optional:If the statement is true, prove it; if it is false, give a counterexample.)

(a) If both A1 and A2 are reflexive, then A is reflexive.(b) If A2 is reflexive, then A′ is reflexive.(c) If both A1 and A2 are irreflexive, then A is irreflexive.(d) If A2 is irreflexive, then A′ is irreflexive.(e) If both A1 and A2 are symmetric, then A is symmetric.(f) If both A1 and A2 are symmetric, then A′ is symmetric.(g) If both A1 and A2 are antisymmetric, then A is antisymmetric.(h) If both A1 and A2 are antisymmetric, then A′ is antisymmetric.(i) If both A1 and A2 are transitive, then A is transitive.(j) If both A1 and A2 are transitive, then A′ is transitive.

23. Let r be a fixed positive rational number, and define the relation ∼ on the set Q by

x ∼ y ↔ r(x − y) ∈ Z

(a) Show that ∼ is an equivalence relation.(b) Find (explicitly)

[

0]

.

(c) For t ∈ Q, 0 ≤ t < 1/r, find[

t]

.(d) For r = 1/n, n ∈ Z+, show that the restriction of ∼ to Z is the relation congruence modulo

n.

24. Let X and Y be nonempty sets, and consider a function f : X → Y such that f is onto.Define the relation ∼ on X by

x1 ∼ x2 ↔ f(x1) = f(x2)

(a) Show that ∼ is an equivalence relation on X.

Let P be the partition of X induced by ∼. Define q : X → P by q(x) =[

x]

, and define

f : P → Y by f([

x]

) = f(x).

Chapter Problems 199

(b) Show that the function f is well-defined; that is, if[

x1

]

=[

x2

]

, then f([

x1

]

) = f([

x2

]

).

(c) Show that f is one-to-one and onto.(d) Show that f = f ◦ q.

Thus, every onto mapping (f) may be “factored” as the composition of a “quotient mapping” (q)and a one-to-one, onto mapping (f). This result is the set-theoretic analogue of the fundamentalmorphism theorem of abstract algebra.

25. Let V be a nonempty set and let A be a relation on V such that A is irreflexive and transitive.

(a) Show that A must be antisymmetric, as well.(b) Show that Ar is a partial order relation. (See Problem 12.)

26. In the context of Problem 2, prove: If A is a partial order relation (see Problem 13), then sois A′.27. Define the relation ≺ on Z − {0} by

m ≺ n ↔ (2m) | n

(a) Show that ≺ is irreflexive and transitive.(b) Use the result of Problem 25 to define a partial order relation � on Z − {0}.

28. Consider the relation ∼ defined on the set Z+ of positive integers by

x ∼ y ↔ √xy ∈ Z+

For example, 3 ∼ 12, since√

3(12) =√

36 = 6 ∈ Z+; however, 5 is not related to 7, since√

5(7) =√

35 /∈ Z+.

(a) Explain why ∼ is reflexive.(b) Verify that ∼ is symmetric.(c) Verify that ∼ is transitive. (Hint: For any t ∈ Z+,

√t ∈ Q+ if and only if t is a perfect

square.)

It follows from parts (a), (b), and (c), that ∼ is an equivalence relation on Z+.

(d) Find, explicitly, the equivalence class [1].(e) For n ∈ Z+, n > 1, find, explicitly, the equivalence class [n].

29. Each of the following parts gives a relation on V = {a, b, c, d, e, f}. Determine whether therelation is a partial ordering (see Problem 13).

(a) A1 = {(f, f), (f, e), (f, d), (f, c), (f, b), (f, a), (e, e), (e, c), (e, a), (d, d), (d, c), (d, b), (d, a),(c, c), (c, a), (b, b), (b, a), (a, a)}

(b) A2 = {(f, f), (f, d), (f, c), (f, b), (f, a), (e, e), (e, d), (e, c), (e, b), (e, a), (d, d), (d, c), (d, b), (d, a),(c, c), (c, b), (c, a), (b, b), (b, a), (a, a)}

(c) A3 = A1 ∪ {(e, b), (d, c)}(d) A4 = {(f, f), (f, e), (f, d), (f, c), (f, b), (f, a), (e, e), (e, d), (e, c), (e, b), (e, a), (d, d), (d, b), (d, a),

(c, c), (c, b), (c, a), (b, b), (b, a), (a, a)}(e) A5 = {(f, d), (f, b), (e, c), (e, a), (d, b), (c, a)}(f) A6 = {(f, f), (e, e), (d, d), (c, c), (b, b), (a, a)}(g) A7 = A5 ∪ A6

(h) A8 = A7 ∪ {(d, c)}(i) A9 = A8 ∪ {(f, c)}(j) A10 = A9 ∪ {(a, c)}

200 Chapter 4 Relations

30. If (X,�) is a poset (that is, � is a partial order relation on X) and Y ⊆ X, show that (Y,�)is a poset. (Y,�) is called a subposet of (X,�).

31. If V is a finite set and � is a partial order relation on V , then the Hasse diagram of the poset(V,�) is obtained by simplifying the directed graph representation as follows: First we omit theloop at each node. Second, we adopt the convention of omitting any arc that is implied bytransitivity; in other words, there is an arc drawn from u to v if and only if u � v, u 6= v, and thereis no third node w such that u � w and w � v. Draw the Hasse diagram for each poset found inProblem 29.

32. Each part gives a subset V of Z+. Draw the Hasse diagram of the (sub)poset (V, |).(a) V = {n | n divides 30} (b) V = {n | n divides 45}(c) V = {n | n divides 36} (d) V = {n | n divides 36 or n divides 45}

33. Determine which of the relations defined in Problem 13 are partial-order relations. For eachsuch relation, draw its Hasse diagram.

34. Let n0 be a fixed positive integer, and let Vn0= {n ∈ N | n divides n0}. Show that (Vn0

, |) isa poset.

35. Consider the poset (Z −{0},�), as defined in Problem 27. Let V24 = {n ∈ Z+ | n divides 24}.Draw the Hasse diagram of (V24,�).

36. Prove or disprove: If (X,�) is a totally ordered set — that is � is a partial ordering of X andfor any two distinct elements x1 and x2, either x1 � x2 or x2 � x1— and Y is a subset of X, then(Y,�) is a totally ordered set.

37. Let V = {a, b, c, d, e, f, g} and define the relation A on V by

A = IV ∪ {(g, f), (g, e), (g, d), (g, c), (g, b), (g, a), (f, c), (f, a), (e, b),

(e, a), (d, c), (d, b), (d, a), (c, a), (b, a)}Verify that A is a partial-order relation, and draw the Hasse diagram of the poset (V, A).

38. Consider the poset (Vn0, |), as defined in Problem 34. For what values of n0 is (Vn0

, |) atotally-ordered set? See Problem 36.

39. Each of the following parts gives a set X, a relation � on X, and a subset Y of X. Verifythat � is a partial ordering of X and draw the Hasse diagram of the subposet (Y,�).

(a) X = Z, x � y ↔ (x = y or | x |<| y |), Y = {−3,−2,−1, 0, 1, 2, 3}(b) X = Z, x � y ↔ (x = y or x mod 4 < y mod 4), Y = {−4,−3,−2,−1, 0, 1, 2, 3, 4}(c) X = Z × Z, (a, b) � (c, d) ↔ [(a, b) = (c, d) or a2 + b2 < c2 + d2], Y = {0, 1, 2}× {0, 1, 2}

40. Define the relation ≺ on Z+ − {1} by

m ≺ n ↔ m2 | n(a) Show that ≺ is irreflexive and transitive.(b) Apply the result of Problem 25 to define a partial ordering � on Z+ − {1}. Extend this

partial ordering to all of Z+ by defining 1 � n for all n ∈ Z+.(c) Let V = {1, 2, 3, 4, 6, 9, 16, 36, 81, 1296}. Draw the Hasse diagram of the subposet (V,�).

41. Let V = {a, b, c, d, e, f, g, h, i, j} and define the relation A on V by

A = IV ∪ {(j, i), (j, h), (j, g), (j, f), (j, e), (j, d), (j, c), (j, b), (j, a), (i, f), (i, d), (i, c), (i, a),

(h, e), (h, d), (h, b), (h, a), (g, c), (g, b), (g, a), (f, c), (f, a), (e, b), (e, a), (d, a), (c, a), (b, a)}Verify that A is a partial-order relation and draw the Hasse diagram of the poset (V, A).