6  Relations

In this chapter we introduce the concept of relations on a given set, quickly moving to equivalence relations and their key properties. Modular arithmetic is one of the best known and widely applicable examples of an equivalence relation, and this is the focus of the second half of the chapter.

6.1.  Introduction to Relations

Sometimes elements of a set are related by a mathematical property. For example, we might want to emphasize that the integers come in two types, even and odd, so we could say that image are related if they have the same parity. The idea of “less than” is another relation, where we could write image but not image. As in the case of functions, we can capture this very general notion using ordered pairs.

DEFINITION 6.1.   A relation R on a set S is a subset of image.

Here are nine example relations, in three groups of three.

EXAMPLE 6.2.   These are three relations on image:

image,

image,

image.

Because image, image, and image, we know that image is in all three of these relations. You should check that image is in exactly two of them, and image is in only one.

Exercise 6.1   In the plane, sketch the set of points image that are in each of the relations in Example 6.2.

EXAMPLE 6.3.   Here are three relations on image:

image,

image,

image.

You should check that image is in all three of these relations, image is in exactly two of them, and image is in only one.

EXAMPLE 6.4.   The following are three relations on image:

image,

image,

the empty set, image.

Relation G might correspond to a concept like “admiration,” where Sue admires both Fred and Bob, while Bob admires no one. But just as functions are best defined without “rules,” relations don’t need descriptions or meanings in order to exist: the definition says that any subset of image is a relation on S.

Also like functions, there is a useful notation for relations that often replaces ordered pairs: it is common to write xRy to mean that image, or to connect x and y with a symbol like image or ~. Thus image could also be expressed as image, but most often you will just see image.

Just as adjectives like “injective” and “surjective” are part of the language of functions, the following adjectives describe certain relations.

DEFINITION 6.5.   A relation R on a set S is

(a)   reflexive if for all image, xRx,

(b)   symmetric if for all image, xRy implies yRx,

(c)   transitive if for all image, xRy and yRz implies xRz.

Consider the relation E on image defined in Example 6.3. It is a reflexive relation because image for any image. It is not a symmetric relation: it’s true that image, but it’s not true that image. Finally, the transitive property follows from part (c) of Exercise 1.10.

Exercise 6.2   Determine whether each of the relations in Example 6.2 is reflexive, symmetric, and/or transitive.

Exercise 6.3   In this exercise you should construct a relation with specified properties.

(a)   Flip a coin three times to determine if your relation should be reflexive, symmetric, and/or transitive. Then construct a relation on a non-empty set of your choice that agrees with your list of properties.

(b)   Repeat the process, re-flipping the coin if needed to get a different list of properties.

Exercise 6.4   Explain why any function image is a relation on S. Then give a function image that is neither reflexive, symmetric, nor transitive.

6.2.  Partial Orders

Many well-known relations are orderings. The real numbers are ordered by image and image, and subsets of a set S are ordered by image and image. All four of these relations are reflexive and transitive. These relations are not symmetric, though, and in fact the notion of symmetry runs counter to the notion of an ordering.

DEFINITION 6.6.   A relation R is antisymmetric if whenever aRb and bRa, then image.

For example, the less than or equal relation image on image is antisymmetric, since image and image implies that image.

DEFINITION 6.7.   A relation is a partial order if it is reflexive, antisymmetric, and transitive. A partially ordered set, or poset, consists of a set S and a partial order image on S. Posets are often represented as pairs, image, so as to be clear about the set and the ordering under discussion.

By the results of Exercise 6.2, you already know that image is a reflexive and transitive relation on image, so image is a poset. In Exercise 6.37, you are asked to show that image is an antisymmetric relation on image, the power set of any set S, which along with Exercise 6.33 shows that image is a poset.

Exercise 6.5   In the previous section we noted that divisibility image is a reflexive and transitive relation on image. Prove that divisibility is antisymmetric, and therefore it is a partial order on image, which we can write image.

Let image be a partial order on a finite set S. If a and b are distinct elements with image, and there is no third element such that image, then a is said to cover b. Just as we saw in Chapter 3 with set inclusion, a Hasse diagram is a method for representing a partial order on a finite set, where line segments indicate covering. Figure 1 is a Hasse diagram for the set image, where the partial order is given by divisibility; Exercise 6.38 asks you to verify that image is a poset for any natural number n. Figure 1 in Chapter 3 shows a Hasse diagram for the power set of image ordered by set inclusion.

image

Figure 1. A Hasse diagram for the partial order given by divisibility on the set of integers image.

Exercise 6.6   Can you redraw the Hasse diagram in Figure 1 to avoid crossing line segments?

DEFINITION 6.8.   A maximal element in a poset image is an element M such that if image, then image. Similarly a minimal element is an element m where if image, then image.

The poset image has image as the unique minimal element and image as the unique maximal element. Figure 1 shows that the natural number 1 is the unique minimal element in the poset image, while there are six maximal elements: 7, 8, 9, 10, 11 and 12. Notice that this is the second time we have defined minimal element, the first occurring in Section 4.1 in the context of image and image. Exercise 6.41 asks you to show that the earlier definition is consistent with Definition 6.8.

Exercise 6.7   Recalling the introduction to Fibonacci numbers in Section 1.2, let image be the set of rabbit pairs born in the first n months,which becomes a poset image if we define image when rabbit pair x either is the same as rabbit pair y or is a descendant of rabbit pair y. Explain why image is a poset, and draw the Hasse diagram for image. What are the minimal and maximal elements of image? Feel free to give the rabbits cute or useful names.

Exercise 6.8   Let image be the set of all closed intervals image where image. For example, image contains image, image, and the point image. Order the elements of image by saying image if image or image.

(a)   Explain why image, but image.

(b)   Verify that image is a poset.

(c)   Prove that the maximal elements in this poset are the intervals image where image.

(d)   Prove that the minimal elements in this poset are the intervals image where image.

(e)   Show by example that it is possible for an element to be both maximal and minimal.

DEFINITION 6.9.   In a poset, we say that two elements x and y are comparable if image or image. Figure 1 shows that not all pairs of elements in a poset need to be comparable; for example, neither image nor image is true.

A poset is totally ordered1 if every pair of elements is comparable. For example, the poset image is a totally ordered set: if a and b are any two real numbers, then image or image.

A poset is well ordered2 if it is a totally ordered set such that every non-empty subset contains a minimal element. This definition should remind you of the Well-Ordering Principle for image (Theorem 4.3), which states that image is well ordered.

Exercise 6.9   Which of the following posets are totally ordered?

(a)   image

(b)   image

(c)   image

(d)   image, where image

Exercise 6.10   Which of the totally ordered sets from Exercise 6.9 are well ordered?

Many end-of-chapter exercises help you further explore the structure of posets, including the problem of determining the largest totally ordered subsets in a poset, its maximal chains. This leads naturally to the study of antichains and Mirsky’s Theorem in Project 11.6. Also, Exercise 6.76 explains how certain partial orders can be refined to total orders.

6.3.  Equivalence Relations

There are many contexts in mathematics where you might think of two mathematical objects as being “equivalent,” even when they are not identical. For example, two triangles in the plane are congruent if their edges have the same lengths. Another example is similarity: two triangles in the plane are similar if they have the same angles. In both cases the triangles share important features, and in that sense they are equivalent. This informal notion is captured by equivalence relations.

DEFINITION 6.10.   A relation R on a set S is an equivalence relation if it is reflexive, symmetric, and transitive. Equivalence relations are often denoted with the symbol ~ or some other variation on an equals sign, like image, or image.

Out of the six relations described in Examples 6.2 and 6.3, three are equivalence relations: A, D, and F. It shouldn’t be surprising that A is an equivalence relation; it’s hard to be more “equivalent” than being equal! Having mentioned this, we want to immediately comment that the concept of equivalence relation is intended to allow different elements to be related without necessarily being equal, even if equality is part of the definition of the relation. As an example, let image be the relation on image that says image when image. We can have image without image; as examples, image and image.

PROPOSITION 6.11.   The relation image is an equivalence relation on image.

PROOF.   We need to establish that image has three properties.

Reflexive:   This follows since image for all image.

Symmetric:   If image, then image. But then it is also true that image, so image.

Transitive:   If image and image, then

image

Thus image, so image.

image

A generalization of image and Proposition 6.11 is explored in Exercise 6.57 at the end of this chapter.

Exercise 6.11   In Example 6.3 we defined the relation D on the natural numbers, image. Consider the extension of this relation to the integers:

image

Prove that image is an equivalence relation on image.

If R is an equivalence relation on a set S, there is an important subset of S associated to each image:

DEFINITION 6.12.   If R is an equivalence relation on a set S, the equivalence class of image is the set of all elements related to a:

image

For example, you have just shown that image is an equivalence relation on image. The equivalence class of 0 is

image

and the equivalence class of 1 is

image

Figure 2 shows that every integer is in exactly one of these two equivalence classes.

image

Figure 2. The two equivalence classes for image. The class image is indicated by hollow circles, and image has filled circles.

Exercise 6.12   Let image be the relation on image defined by having image when x and y have the same integer part, that is, when image. Prove that this is an equivalence relation, and prove that the equivalence class of each element is a half-open interval of the form image, where image.

With image and image from the previous two exercises, you might have noticed that the equivalence classes of two elements are either the same or they are disjoint. This is not a coincidence, as you may begin to believe after working through the next exercise.

Exercise 6.13   Consider the equivalence relation image on image from Proposition 6.11.

(a)   Show that the equivalence class of image is

image

(b)   Show that the equivalence class of image is

image

(c)   Prove that for any two equivalence classes image and image for image, either image or image.

What you proved in the exercise above is a special case of the following general result.

THEOREM 6.13.   If R is an equivalence relation on a set S and image, then image or image.

Before presenting a proof of this result, we should think about the logic of the theorem. The statement of the theorem is of the form image, namely

image

This is equivalent to image. (You might have proven this logical equivalence if you worked on Exercise 2.46.) This restatement of what needs to be proven makes intuitive sense: if you are being asked to show that at least one of two possibilities is true, and one of the possibilities is false, then the other one had better be true! This is the approach we take in the proof.

PROOF OF THEOREM  6.13.   Let R be an equivalence relation on S, and assume there are elements image with image. Thus there must be some image that is in both image and image. So aRc and bRc. Since R is symmetric, we also know cRb. Since R is transitive, aRc and cRb imply that aRb; the symmetric property then implies that bRa as well.

Now that we know that a and b are related, we show that image by proving that each equivalence class contains the other. If d is any element of image, then bRd. Since aRb, the transitive property shows that aRd, and thus image. So we know that image. A similar argument starting with image shows that image, and thus image.

image

The result of Theorem 6.13, that image or image, suggests a relationship between equivalence classes and partitions, which were defined in Section 3.7. The blocks of a partition of a set S are non-overlapping, and their union is all of S, just as we have seen with examples of equivalence classes. The following theorem says that for every set S there is a bijection between the set of equivalence relations on S and the set of partitions of S.

THEOREM 6.14.   Let S be a set. If image is a partition of S, then the relation defined by

image

is an equivalence relation on S. Conversely, if ~ is an equivalence relation on S, then the equivalence classes induced by ~ form a partition of S.

PROOF.   If you look back at the statement of Theorem 6.13 and the definition of partition, you will see that we have already proven that equivalence relations give rise to partitions: Theorem 6.13 says that two distinct equivalence classes cannot intersect (requirement (a) for a partition), and requirement (b) follows because every element is in an equivalence class, namely image.

Now, let image be a partition of S, and let image be the relation given in the statement of the theorem. Is this relation …

…reflexive? Yes, because image simply states that x and x are in the same block of image.

…symmetric? Yes, because image means that x and y are in the same block of the partition. But then y and x are in the same block of the partition, so image.

…transitive? Yes, because if image and image, then x and y are in the same block image of the partition, and y and z are in the same block image. Since image and image, we know that image. Since these are blocks in a partition, it follows that image. Thus this block contains both x and z, meaning that image.

image

Exercise 6.14   If S is any set, then the set of singleton sets image forms a partition. Describe the corresponding equivalence relation on S.

Exercise 6.15   How many equivalence relations are there on the set image?

6.4.  Modulo m

In Sections 6.1 and 6.3 you encountered the equivalence relation F, which was originally defined on image but can be extended to image:

image

You have also encountered a number of earlier exercises where the concept of even and odd mattered, and other exercises where it matters if an integer n is of the form image, image, or image. In 1801, having had a number of similar things occur earlier in his work, Carl Friedrich Gauss introduced the idea of congruence modulo m.

DEFINITION 6.15.   If image and image, we say a is congruent to b modulo m when image. The notation is

image

The extra “image” in the relation notation may seem cumbersome at first, but its usage is common. You may also see image denoted by the more compact notation image. The equivalence class of image is denoted image. The number m is called the modulus, and when the value of the modulus is clear, the subscript is sometimes dropped from these notations.

PROPOSITION 6.16.   For any image, the image relation is an equivalence relation on image.

PROOF.   We need to establish the three required properties.

Reflexive:   For any image, image. Since image, it follows that image.

Symmetric:   Assume that image. By the definition this means image. But image, and so image as well. Hence image.

Transitive:   If image and image, then image and image for some integers image. Since image implies image, we know that image.

image

Exercise 6.16   What are the equivalence classes of image with respect to the equivalence relation MOD 2? What are the equivalence classes for MOD 3?

For each image define the set of remainders (or the residues) to be

image

For example, image.

PROPOSITION 6.17.   For any image, let image be as defined above. Then for every image there is a unique image such that image.

Exercise 6.17   Use the Division Algorithm from Section 1.6 to prove Proposition 6.17.

COROLLARY 6.18.   For a and image, image if and only if image and image for some image and a common image.

PROOF.   Assume first that image and image. Then image, so image, which implies that image.

Now assume that image. We know that image, so image for some image. We also know by Proposition 6.17 that there is an image such that image, so image for some image. Thus

image

if we set image.

image

Exercise 6.18   Prove that image if and only if image for some image.

Exercise 6.19   Prove that the set of equivalence classes of image with respect to congruence image is image.

GOING BEYOND THIS BOOK.   It is known that there are true statements of arithmetic that cannot be proven. In [Con13] John Conway describes a number of examples of elementary arithmetic functions, whose definitions are based on remainders modulo an integer m, that appear to be true but are not yet proven. The functions are interesting in their own right, and the possibility that they lead to elementary true but not provable statements is certainly intriguing.

6.5.  Modular Arithmetic

In this section we will explore modular arithmetic. Let image denote the set of equivalence classes of image modulo m. For example, image, which is also equal to image but not image.

The fact that image means that you need to use great care when defining operations or functions in terms of equivalence classes. Any element of an equivalence class is called a representative of that class, so 1, 4, and image are just three of infinitely many representatives of the class image. This is similar to the familiar case of fractions like image and image both representing the same value. In the case of fractions, we know that any representative is equally valid for use in computations. We would, however, be concerned if someone defined a function image by saying image, as then image, but image and image represent the same rational number.

A CAUTIONARY TALE: Derek is working at the board, and he’s written down what he thinks is a function from image to image:

image

As an aside he’s written

image

John, however, is made a bit nervous by this, and he says “Wait a minute, Derek. The numbers 2 and 6 are in the same equivalence class modulo 4, so image. Why shouldn’t it be the case that

image

Exercise 6.20   Explain why this poses a problem for f being a function from image to image.

MORAL OF THE STORY: If you define a mathematical object in terms of representatives of an equivalence class, you need to make sure that your definition does not depend on which representative you pick. Mathematicians say that an object defined on equivalence classes is well defined when it has the same value regardless of which representative is used from a given equivalence class.

Our Cautionary Tale partly explains why we need to present a proof of the following theorem, stating that addition and multiplication can be defined on image in terms of representatives of the equivalence classes, and that these operations are well defined.

THEOREM 6.19.   If image and image, then

(a)   image,

(b)   image.

PROOF.   We know that if image, then image for some image; similarly we know that image for some image. Thus image, so by Exercise 6.18 we have image. Further, image, so image as well.

image

We can now define modular arithmetic: There are functions image and image from image to image which are defined by

image

We emphasize that Theorem 6.19 says that the choice of representatives doesn’t affect the result of addition or multiplication, so each of these is a legitimate function from image to image: each element of image is mapped to a unique element of image.

Because of the connection between equivalence classes and equivalence relations, we have two ways of expressing addition modulo m. In terms of equivalence relations we can make a statement like:

image

What we have shown is that we can also make the exact same claim using the language of equivalence classes by writing:

image

Notice that in this second statement we are discussing sets (the equivalence classes) and so we should use the symbol image in this context, while we should use image when discussing individual numbers. The same situation arises for multiplication modulo m.

Exercise 6.21   The equivalence classes image and image in image have some of the fundamental properties of 0 and 1 in image.

(a)   Prove that image for any integer a and any modulus image.

(b)   Prove that image for any integer a and any modulus image.

Because of the properties above, image is said to be an additive identity in image and image is a multiplicative identity in image.

It is common to display the results of modular arithmetic in tables. For example, the tables for arithmetic in image are shown in Figure 3. The connection with image notation is easy to see. For example, since image and image, we know that image, as displayed in the lower-right entry of the multiplication table.

image

Figure 3. Addition and multiplication for the integers modulo 3.

Exercise 6.22   It is time for you to practice modular arithmetic.

(a)   Create the addition and multiplication tables for image.

(b)   Create the addition and multiplication tables for image.

(c)   You should now be able to check that the product of non-zero entries in image is never zero, just like in ordinary arithmetic. But in image, the product of non-zero entries can be zero. Why do you think this happens in image but not in image?

Exercise 6.23   State a version of Theorem 6.19 that involves n terms, and use mathematical induction to prove it.

Here is one example of the utility of being able to do arithmetic modulo a number m. Trying to find the remainder of image divided by 11 sounds quite hard. But image, so image. Further, since image and image, we have

image

Thus the remainder is 5.

Here is another example of the utility of modular arithmetic. Exercise 4.23 asks you to use induction and a minimal criminal argument to prove that, for all image, image is divisible by 3. Using modular arithmetic, this is now a computation. Being divisible by 3 is equivalent to being congruent to 0 modulo 3. And we can establish the result by applying the fact that image and image:

image

Exercise 6.24   What’s the last digit of image? Notice that if you just want the last digit, you can work with the integers modulo 10.

In our Cautionary Tale, we attempted to define a function from image to image by squaring representatives. The definition did not actually make sense, as it was not consistent across all elements in an equivalence class. Given that example, it may seem a bit daft for us to now consider the following proposed definition for a function from image to image:

image

To see if this function is well defined, we need to check if the answer is the same regardless of the representative we choose for any given equivalence class. By Exercise 6.18 we know that image if and only if image for some image. Notice that

image

Since 3 divides 12 and 36 we know image and image. Theorem 6.19 allows us to replace these terms by zeros, yielding

image

Thus image whenever image, so the function is well defined.

Exercise 6.25   Find a step in the argument given above for image that fails when applied to the supposed function in the Cautionary Tale.

Exercise 6.26   Show that the following functions are well defined, where image.

(a)   image given by image.

(b)   image given by image.

(c)   image given by image.

(d)   image given by image.

REMARK 6.20.   In section 5.7.4 we discussed a common abuse of notation that occurs in the context of functions. There are many places in mathematics where one abuses notation by giving a single symbol multiple meanings or by simplifying notation. The expectation is that the context makes clear what the notation does not.

There are many abuses of notation that occur in the context of modular arithmetic. For example, when the modulus is clear or unimportant, you will often see image instead of the more complete image. Similarly in denoting equivalence classes you might see image instead of image. Perhaps even more confusing, one often drops the square bracket notation and lets a stand for image. This occurs most commonly in addition and multiplication tables, where the square brackets make for a rather cluttered diagram.

6.6.  Invertible Elements

This section makes use of material from Sections 4.4 and 4.5. Theorem 6.19 shows that addition and multiplication make sense in image; it is also the case that subtraction is well defined.

THEOREM 6.21.   If image and image, then image.

Exercise 6.27   Prove Theorem 6.21.

It is less clear that you can divide in image, and given that we are working with integers, you might guess that this is not always possible. Let’s experiment with image and see if we can solve

image

If we can, then whatever x might be it deserves to be considered as “image” within image. Having no better plan available to us, we form the row of the multiplication table for image corresponding to image. We’ll also start to abuse notation and write k instead of image.

image

The highlighted column shows us that image, so 8 plays the role of image in image. We can use this fact to solve an equation like

image

as follows:

image

In this calculation, we used both parts of Theorem 6.19: part (a) to add image to both sides of a congruence, and part (b) to multiply both sides by 8. We can verify that we did not make an error by plugging our answer of image back into the original congruence:

image

Exercise 6.28   What element of image deserves to be called “1/4”?

DEFINITION 6.22.   If image, we say that a and b are additive inverses.

If image, we say that a and b are multiplicative inverses modulo m, and image and image are multiplicative inverses in image.

We can express image as image, notation that is similar to what we used for an inverse function in Chapter 5. But, as with functions, the concept of inverse requires great care.

Since image we know that image is an additive inverse of image, and so additive inverses always exist in image. The situation is more complicated for multiplicative inverses. You have seen that image is a multiplicative inverse of image in image, and you should have discovered that image is its own multiplicative inverse in image, so you can write image and image in image. Having now realized that at times you can do division in image, an unreasonably optimistic individual might conjecture that every non-zero element in image has a multiplicative inverse. The truly careful person would say, “Let’s try to find multiplicative inverses for other values, like [3], before we get too excited.” To do this, we once again produce the relevant row in the multiplication table for image:

image

The number 1 does not appear anywhere in this row, so there is no number a such that image. You might now be sad, since image does not have a multiplicative inverse in image. But instead you really ought to be intrigued. Why does image have an inverse in image but not image? Is there a satisfactory condition that describes when an element of image has a multiplicative inverse?

Exercise 6.29   Show that in image the elements image and image do not have multiplicative inverses, but image and image do.

The following theorem should sound plausible, given your results from working on the exercise above.

THEOREM 6.23.   Let image be a non-zero element of image. Then image has a multiplicative inverse in image if and only if image.

PROOF.   We have to establish two implications, both of which rely on the characterization of relatively prime integers given in Theorem 4.8.

(image) If k and m are relatively prime, then there are integers s and t such that

image

But then image, so image is a multiplicative inverse of image in image.

(image) If image has a multiplicative inverse, then there exists an image such that image. But this means that there is some image such that image, and therefore image. Thus image.

image

DEFINITION 6.24.   Define image to be the subset of image consisting of equivalence classes whose representatives are relatively prime to m:

image

In the study of arithmetic systems, elements that have multiplicative inverses are called units. The notation image comes from the fact that we are looking at imagenits in image.

Exercise 6.30   Show that if image, then image has exactly one multiplicative inverse.

The set of units in image is image, where we are abusing notation by dropping the brackets. The fact that all of these elements are units is verified by the multiplication table for image shown in Figure 4, as every row contains a 1.

image

Figure 4. The multiplication table for image.

Exercise 6.31   What elements are in image? Once you’ve found them, make a multiplication table for image.

The following proposition explains why the multiplication tables for image don’t contain any other elements of image.

PROPOSITION 6.25.   The set image is closed under multiplication and taking multiplicative inverses.

Exercise 6.32   Prove Proposition 6.25. To do this, you will have to show that if image and image are both in image, then so is image. You will also have to show that if image, then image.

REMARK 6.26.   Exercise 6.19 shows that image, but what can you say about image, the number of units modulo m? The answer takes some work to discover and justify; it is the topic of Project 11.7 on Euler’s totient function. If this is of interest, we recommend starting with a couple of warm-up problems that can be found in Exercise 6.71.

6.7.  End-of-Chapter Exercises

Exercises you can work on after Section 6.1

6.33 Let A be a non-empty set and consider the relation image on image.

(a)   Prove that image is reflexive.

(b)   Prove that image is transitive.

(c)   Show that image is not symmetric.

6.34 Example 6.3 presents three relations on image. Since any relation on image is a subset of image, you can visualize relations on image as a subset of the points in the first quadrant whose coordinates are natural numbers. For example, a portion of relation D from Example 6.3 is shown in Figure 5. Make similar illustrations for the relations E and F. You may need to include more points from image than we did in Figure 5 in order for your figure to genuinely illustrate these relations.

image

Figure 5. The elements of the relation D from Example 6.3 are illustrated by filled circles.

6.35 Since a relation on S is a subset of image, you can often look at the “graph” of the relation, which is the obvious extension of the graph of a function. For example, in Figure 6 we illustrate the relation

image

on the set image.

(a)   What geometric property of the graph of a relation corresponds to the property of being reflexive?

(b)   What geometric property of the graph of a relation corresponds to the property of being symmetric?

image

Figure 6. The elements of the relation R from Exercise 6.35 are illustrated by filled circles.

6.36 Consider a finite set S with image.

(a)   How many different relations exist on S?

(b)   How many different reflexive relations exist on S?

(c)   How many different symmetric relations exist on S?

Exercises you can work on after Section 6.2

6.37 Continuing Exercise 6.33, prove that image is an antisymmetric relation on image, and thus image is a poset for any set S.

6.38 Prove that for any image, image is a poset, where image and image is divisibility.

6.39 Draw a Hasse diagram for the poset image. How does the diagram change if you add 0 as a new element to this set?

6.40 For any image, define image to be the partially ordered set whose elements are closed intervals in image with integer endpoints, with image the same relation defined in Exercise 6.8.

(a)   Draw a Hasse diagram for image.

(b)   What are the maximal elements of image?

(c)   What are the minimal elements of image?

6.41 Show that the definition of minimal element given in Section 4.1 agrees with Definition 6.8 when applied to the totally ordered set image.

6.42 Prove that any finite poset that is totally ordered is also well ordered.

6.43 Let R and image be partial orders on a set S. Recalling that R and image are subsets of image, we may define image to be a refinement of R if whenever image, then image as well.

(a)   Consider the poset image. Create a refinement image of image where image.

(b)   Consider the poset image. Create a refinement image of image where image.

6.44 Show that there is a refinement of image that is a total order. For a generalization of this result, see Exercise 6.76.

The remaining exercises in this section require the following definition.

DEFINITION 6.27.   A chain in a poset image is a subset of elements where

image

Put another way, a chain is a totally ordered subset of S. A maximal chain is one that is not properly contained in any other. The height of a poset is the number of elements in a largest chain, when such a value exists.

For example, in the poset image, the subsets

image

form a chain, and

image

is a maximal chain. As can be seen in Figure 5 in Chapter 3, all of the maximal chains in this poset contain 5 elements, so the height of the poset is 5.

6.45 How would you rewrite Exercise 3.32 in terms of maximal chains?

6.46 Consider the poset on image, ordered by divisibility.

(a)   Verify that image is a maximal chain.

(b)   Verify that image is also a maximal chain.

(c)   Prove that this poset has height 6.

6.47 Consider the poset of subsets of image ordered by containment.

(a)   Prove that this poset has height image.

(b)   Prove that this poset contains exactly image maximal chains.

6.48 Construct a poset that, for every image, has a maximal chain with n elements. That is, there is a maximal chain with only one element, there is a maximal chain with exactly two elements, and so on.

6.49 A zigzag poset, or fence, is a poset where the elements can be listed so that the order relation is alternating. An example of a zigzag poset on seven elements is shown in Figure 7. Using zigzag posets as an inspiration, prove that for any image there is an infinite poset, where all the maximal chains have n elements.

image

Figure 7. The Hasse diagram for a zigzag poset on seven elements.

Exercises you can work on after Section 6.3

6.50 Prove that same magnitude,

image

is an equivalence relation on image.

6.51 Define image by

image

for image.

(a)   Prove that image is an equivalence relation on image.

(b)   Describe two distinct equivalence classes for image.

6.52 For any pair of subsets image and image of image, define

image

when the symmetric difference image is finite.

(a)   Prove that image is an equivalence relation on image.

(b)   Describe two distinct equivalence classes for image.

6.53 Consider the following relation on image. We say image if image.

(a)   Prove that ~ is an equivalence relation.

(b)   Which elements are in the equivalence class of image? A graph may be useful here.

6.54 Determine which of the following relations are equivalence relations. For those that are, describe the elements of two different equivalence classes.

(a)   image, and image if either image or the line in image through a and b also goes through the origin.

(b)   image, and image if either image or the perpendicular bisector of the line segment joining a to b in image goes through the origin.

(c)   S is the set of lines in image, and image when the lines image and image are parallel.

6.55 Determine which of the following relations are equivalence relations. For those that are, describe the elements of two different equivalence classes.

(a)   image and image if image.

(b)   image and image if image.

(c)   image and image if image.

6.56 Let ~ and image be equivalence relations on a set S.

(a)   Prove that the intersection image is an equivalence relation.

(b)   Give a counterexample to the following claim: The union image is an equivalence relation.

Remember, both ~ and image are subsets of image.

6.57 Let image, and define image to be the relation on A defined by

image

(a)   Prove that image is an equivalence relation.

(b)   Describe the equivalence classes of image in the language of functions.

6.58 Let image and define a relation on A by image when image. For example, image.

(a)   Show that ~ is an equivalence relation.

(b)   Find an equivalence class with exactly one element.

(c)   Prove that for every image there is an equivalence class with exactly n elements.

(d)   Prove there are no equivalence classes with infinitely many elements.

(e)   Which equivalence classes contain exactly two elements?

(f)   Which equivalence classes contain exactly three elements?

6.59 Let image, and let ~ be the relation on image defined by

image

where image is the symmetric difference. Prove that ~ is an equivalence relation on image, and describe the equivalence class image.

6.60 Let image be a bijection. If image, we have already seen in Exercise 5.48 that

image

It is natural to similarly define

image

and also

image

(a)   Explain why image for any image.

(b)   If image, then the orbit of a is

image

Prove that if image, then image.

(c)   Prove that image is a partition of A.

Exercises you can work on after Sections 6.4 and 6.5

6.61 Solve the following for x, or prove that no solution exists.

(a)   image

(b)   image

(c)   image

(d)   image

6.62 In Theorem 2.12, we used induction to show that, for all non-negative integers n, image is a multiple of 6.

(a)   Use modular arithmetic to offer a simple and non-inductive proof of this theorem.

(b)   Prove that, for all non-negative integers n, image is divisible by 7 if and only if n is odd.

6.63 Let image be written in decimal notation as

image

Use modular arithmetic to …

(a)   …prove that n is divisible by 3 if and only if image is divisible by 3,

(b)   …prove that n is divisible by 9 if and only if image is divisible by 9.

(c)   …prove that n is divisible by 11 if and only if the alternating sum

image

is divisible by 11.

If you did Exercise 1.47, compare your answer to that problem with your new solutions to parts (a) and (b) above.

6.64 Show that the following functions are not well defined.

(a)   image is given by image.

(b)   image is given by image, where image and image.

(c)   image is given by image.

6.65 Show that image is well defined for any image.

6.66 For any integer image, what is the value of the binomial coefficient image modulo n?

Exercises you can work on after Section 6.6

6.67 The integers modulo 7, image, consists of the equivalence classes image image. Which pairs of equivalence classes are additive inverses of each other? Which pairs of equivalence classes are multiplicative inverses of each other? Are there any equivalence classes that do not “pair” nicely? Explain!

6.68 Recalling that you found the multiplicative inverses of 3 and 5 in image as part of Exercise 6.29, solve the following for x.

(a)   image

(b)   image

6.69 Recall that image is the set of units in image.

(a)   What elements of image are in image?

(b)   Create the multiplication table for image.

6.70 Show that each element of image occurs once and only once in each row (or column) of the multiplication table for image.

6.71 Determine the number of units in image when m is prime, and when m is the square of a prime.

More Exercises!

6.72 In Exercise 4.11, you were asked to commit to memory an outline of the proof of the Fundamental Theorem of Arithmetic. Prove that you have!

6.73 Let R be a relation on any set S.

(a)   Prove there is at least one equivalence relation on S that contains R.

(b)   Let image be the intersection of all equivalence relations on S that contain R. Prove that image is itself an equivalence relation containing R.

(c)   Prove that if image is an equivalence relation containing R, then image.

The relation image is often called the equivalence relation generated by R.

(d)   Let T be the relation on image given by image when image. Describe the equivalence relation image generated by T, and describe the equivalence class image.

6.74 Here’s the result you will ultimately want to prove in this exercise:

Let S be a set of n integers. Then there is a subset of S that sums to a number divisible by n.

Here are some questions intended to help you develop a proof:

(a)   Prove that the statement is true when image. (This should be easy.)

(b)   Prove that the statement is true when image. (This might help you find an approach to the general result.)

(c)   Prove that the statement is true when image. (This tests if your approach really works!)

(d)   Prove the general result.

6.75 In this problem we outline how you can construct the rational numbers from the integers using an appropriate equivalence relation.

Let Q be the set image, and let ~ be the relation

image

For example, image.

(a)   Prove that ~ is an equivalence relation on the set Q.

Denote the equivalence class of image by image. We can define addition and multiplication on equivalence classes using the following formulas:

image

Denote the set of equivalence classes by image.

(b)   Verify that these formulas are well defined, that is, the answers do not depend on the choice of representatives from the equivalence classes.

(c)   Show that image is an additive identity. That is, image for all image.

(d)   Show that image is a multiplicative identity, that is, image for all image.

(e)   Show that image for all image.

(f)   Show that if image, there is a image such that image.

At this point you have probably already guessed that the set image with these arithmetic operations is the same thing as the rational numbers. We have simply replaced the more standard notations of image and image by image, and we have highlighted that there is an equivalence relation underlying the multiple ways you can write the same number via fractions.

6.76 The goal of this exercise is to construct a proof of the following theorem:

Theorem 6.28.   Every partial order on a finite set S can be refined to a total order on S.

For the definition of refinement, see Exercise 6.43. The proof we outline uses induction on the number of pairs of incomparable elements. The base case is when there are no incomparable elements, meaning that the original partial order is already a total order on S.

For the inductive step, we assume that the theorem holds whenever there are n or fewer pairs of incomparable elements. Let R be a partial order on a finite set S, with image incomparable pairs, and let a and b be incomparable elements. That is, image and image. In the steps below you will be asked to prove there is a refinement of R that contains image.

Define the set image to consist of those elements that precede a with respect to the partial order R:

image

Similarly define the set image as those elements that b precedes with respect to the partial order R:

image

(a)   Prove that image.

(b)   Define a new relation on S: image. Prove that image is a reflexive relation.

(c)   Prove that image is antisymmetric. Note: This requires checking a number of cases, because a pair image can be in image either because it is a pair in R or because it is in image.

Proving that image is transitive also requires the checking of a number of cases.

Transitivity: Assume that image and image are both in image; we need to prove that this implies image. It cannot be the case that both pairs come from image. If they did, then y would be in both image and image but we have already noted that image. If both pairs were already in R then the result follows since R is transitive.

Assume that image and image. Then from the definition of image we know image. Therefore image, since R is transitive. Thus image, and so

image

If instead we have image and image, then we know that image and so image. Thus

image

(d)   It follows from the work above that image is a partial order on S. Verify that image has n or fewer incomparable pairs, and so induction implies that image can be refined to a total order image on S.

(e)   Prove that image is also a total order that refines R.

Having now worked through the details of this argument, write up a proof of Theorem 6.28 that reads well from beginning to end.


1   For some reason, no one calls it a “toset”

2   …or a “woset.”