Discrete Mathematics and Applications, Second Edition (Instructor's Guide and Solution Manual, Solutions) [2 ed.] 9781498730655, 1498730655


136 27 5MB

English Pages 626 Year 2017

Report DMCA / Copyright

DOWNLOAD PDF FILE

Recommend Papers

Discrete Mathematics and Applications, Second Edition (Instructor's Guide and Solution Manual, Solutions) [2 ed.]
 9781498730655, 1498730655

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

Instructor’s Resource for Discrete Mathematics Second Edition Kevin Ferland Bloomsburg University

2

Copyright ©2016 Kevin Keith Ferland All Rights Reserved

ii

Preface This book should serve as a resource for instructors using Discrete Mathematics. It contains four components intended to supplement the textbook. First, we provide tips on using each section of the textbook. These may be particularly useful to instructors teaching discrete mathematics for the first time. Second, we more explicitly provide lecture notes for each section of the textbook. At the very least, the examples included here could be used by an instructor wishing to prepare his or her own lectures. Moreover, these examples are different from those in the textbook. Third, to help instructors write tests and quizzes, we include problems similar to those found in the textbook. However, none of the problems included here appear in the textbook. The focus is on the kinds of problems that are well-represented in the textbook, and the level of difficulty here is not greater than that of the textbook. Answers appear immediately after the questions to help instructors gauge the difficulty and length of the problems. Lastly, we include the answers to all of the exercises in the textbook. In the case of the odd-numbered exercises from each section and all of the exercises from the review sections, the answers provided here are the same as those provided in the Student Solutions Guide for this textbook. I wish to thank my many students who contributed to reducing the number of errors in this work. Kevin Ferland

iii

iv

PREFACE

Contents Preface

iii

1 Teaching Points 1.0 Chapter 0 . . 1.1 Chapter 1 . . 1.2 Chapter 2 . . 1.3 Chapter 3 . . 1.4 Chapter 4 . . 1.5 Chapter 5 . . 1.6 Chapter 6 . . 1.7 Chapter 7 . . 1.8 Chapter 8 . . 1.9 Chapter 9 . . 1.10 Chapter 10 .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

1 1 2 4 6 9 11 14 16 18 20 22

2 Lecture Notes 2.0 Chapter 0 . 2.1 Chapter 1 . 2.2 Chapter 2 . 2.3 Chapter 3 . 2.4 Chapter 4 . 2.5 Chapter 5 . 2.6 Chapter 6 . 2.7 Chapter 7 . 2.8 Chapter 8 . 2.9 Chapter 9 . 2.10 Chapter 10

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

25 26 28 45 54 70 85 103 117 132 148 164

3 Test Bank 3.0 Chapter 3.1 Chapter 3.2 Chapter 3.3 Chapter 3.4 Chapter

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

183 183 184 191 197 206

0 1 2 3 4

. . . . .

v

vi

CONTENTS 3.5 3.6 3.7 3.8 3.9 3.10

Chapter Chapter Chapter Chapter Chapter Chapter

5 . 6 . 7 . 8 . 9 . 10

4 Answers to All 4.0 Chapter 0 . 4.1 Chapter 1 . 4.2 Chapter 2 . 4.3 Chapter 3 . 4.4 Chapter 4 . 4.5 Chapter 5 . 4.6 Chapter 6 . 4.7 Chapter 7 . 4.8 Chapter 8 . 4.9 Chapter 9 . 4.10 Chapter 10

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

215 227 234 241 252 263

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

275 275 280 324 354 392 428 472 489 512 551 582

Chapter 1

Teaching Points 1.0

Chapter 0

ˆ Do not devote class time to this section. Have the students read it on their own, and assign homework. The material on binary numbers is straightforward. ˆ Basic comfort with binary numbers is helpful when generating truth tables. ˆ In Part II of the book, there are several counting problems that refer to numbers in alternative bases.

1

2

CHAPTER 1. TEACHING POINTS

1.1

Chapter 1

Section 1.1 ˆ This is a long section that should be dealt with relatively quickly. If too much time is spent here, then the students get the wrong first impression that the course will be very easy. ˆ The correct negation of p → q cannot be stressed too much. ˆ For problems like Examples 1.13 and 1.14, it is reasonable to expect students to remember the named equivalences listed in Theorem 1.1. However, for those listed in Theorem 1.2, some description like “a tautology rule” or “a contradiction rule” ought to suffice in test situations.

Section 1.2 ˆ Keep in mind that we are discussing sets somewhat informally in this section to gain comfort with the ideas and notation. We get more formal in Section 1.4. ˆ Some students tend to be sloppy about the distinction between ∈ and ⊆, since they translate both to the word “in”. They read x ∈ A as “x is in A” and A ⊆ B as “A is in B”. Practice with problems like Examples 1.18 and 1.19 is important for those students. ˆ Be sure to mention in class the difference between a singleton set {3} and the element 3 it contains.

Section 1.3 ˆ Students should be gaining comfort not only with the quantifiers being introduced but also with standard mathematical notation likely seen in earlier courses. ˆ Previous experience with the terms in Definitions 1.15 and 1.16 might be expected of the students. Hence, assigning those definitions for reading rather than spending class time on them ought to suffice. Real function notions do provide good examples for practice with quantifiers. Some homework exercises are devoted to this. ˆ If an instructor wishes to formally discuss the constructions of the integers and the real numbers, then this would be a natural section in which to do so. Appendix A can be used for this.

1.1. CHAPTER 1

3

Section 1.4 ˆ Stress the correspondence between set operations and logical operations. Definition 1.18 is laid out to emphasize this correspondence. Also, Theorems 1.5 and 1.6 have been structured purposely to parallel the statements in Theorems 1.1 and 1.2. Students find this comforting. ˆ The set difference operation \ and the symmetric difference operation M tend to be the most difficult for students to work with formally. Emphasize the simple ideas behind them with Venn diagrams. ˆ Binary operations are emphasized in this section. Their n-fold counterparts should be easy to pick up in the reading and the exercises. ˆ For problems like Examples 1.41 and 1.42, it is reasonable to expect students to remember the named set identities listed in Theorem 1.5. However, for those listed in Theorem 1.6, some description like “an ∅ rule” ought to suffice in test situations.

Section 1.5 ˆ It is a good idea to present examples like Example 1.44(a) and Example 1.47 in which the arguments are not valid, though they may seem valid to many students. This shows them that some of their intuitions may need to be adjusted and can illicit some valuable discussions. ˆ The basic argument forms in Theorem 1.7 have been given names that should be easy to remember. Their Latin names have been intentionally avoided. ˆ This section provides a nice link between Chapter 1 and the chapters on proofs that follow it. Mention that the Principles of Specification and Generalization will underlie many of our proofs in the coming chapters.

4

CHAPTER 1. TEACHING POINTS

1.2

Chapter 2

Section 2.1 ˆ Since the proofs in this section are quite easy, use this opportunity to emphasize good writing habits. If the students do not start using complete sentences now, then it will be harder to convert them later. ˆ Show them that proving an existential statement can be hard by giving them an example like “∃ m, n ∈ Z such that 15m+32n = 1.” One solution is given by m = 15, n = −7, but students generally have difficulty coming up with this on the spot. An example like this can also help to advertise the study of Euclid’s algorithm that is coming in Section 3.3.

Section 2.2 ˆ This section calls heavily on a student’s abilities to understand statements in term of quantifiers. For instance, the key to Example 2.12 is the unwinding of the terms constant and periodic. Several other examples come out of the realization that the statement S ⊆ T means ∀ x, if x ∈ S then x ∈ T . ˆ When doing examples that prove set equalities, mention the fact that we are now in a position to start proving the set identities presented earlier in Theorems 1.5 and 1.6. ˆ Use every opportunity to emphasize the connections between set operations and logical operations, like the one between ∩ and ∧. Of course, such a connection is at the heart of a proof involving A ∩ B.

Section 2.3 ˆ Try to do examples in class of if and only if statements for which the proof in the second direction is not merely the reverse of the proof from the first direction. Similarly, do a proof of a set equality = in which the proof of ⊇ is not blatantly symmetric to the proof of ⊆. Doing this will help the students to appreciate the need to consider both directions. ˆ Students find the proofs relating properties of real functions to be the most difficult. However, the greatest emphasis should probably be placed on the set relations. ˆ Mention in class that (x, y) 6∈ A × B if and only if x 6∈ A or y 6∈ B. Students very often have the misconception that the “or” should be an “and”. This is discussed after Example 2.23.

1.2. CHAPTER 2

5

Section 2.4 ˆ This section gives a nice chance to emphasize the ties between this chapter and the previous one. We are using the argument form

¬p → f ∴ p from Example 1.49, and we are using the logical equivalence p → q ≡ ¬q → ¬p from Example 1.11. ˆ It may be a good idea to force students to explicitly write out the contrapositive of a given if-then statement, prior to proving it that way. ˆ Although even and odd numbers are not defined until Section 3.1, the students are surely comfortable with them. Consequently, proving now that,

∀ n ∈ Z, if n2 is odd then n is odd can be a great way to illustrate the utility of the contrapositive.

Section 2.5 ˆ All of those examples that would have fit nicely into other sections were it not for the need for considering cases can now be presented. In many ways, this section helps to review the proof techniques from the previous sections. ˆ Before doing examples involving the absolute value function, it may be necessary to review the formula ( x if x ≥ 0, |x| = −x if x < 0.

The second half of this formula troubles some students, though they are reluctant to admit it. ˆ It is useful to consider an example like Example 2.36 in which the need to split into cases is not completely obvious. This gives the students more respect for the technique.

6

CHAPTER 1. TEACHING POINTS

1.3

Chapter 3

Section 3.1 ˆ Acknowledge the fact that a more natural way to define odd is as not even. Emphasize that our more direct approach helps to give us concrete ways to establish properties of odd numbers. Also, mention that the agreement of these two “definitions” is addressed in the next section. ˆ Some students misread the notation d | n as d divided by n. This error is disastrous if not corrected early. ˆ Ask a student what they think is the definition of a prime number. Their explanation will almost always include 1 as prime. This gives the opportunity to emphasize that 1 is not prime. ˆ Mention the fact that m and n being relatively prime has nothing to do with either m or n being prime. The use of the word prime throws some students off here.

Section 3.2 ˆ Students initial reaction to the Well-Ordering Principle might be that it seems to have no value. For example, the fact that the set {3, 6, 9, 12, . . .} has 3 for its smallest element is obvious and trivial. Instead, challenge the students to specify the smallest element of a set like

{14x + 22y : x, y ∈ Z and 14x + 22y > 0}. At this point, not many may be able to recognize that 2 = 14(−3) + 22(2) is the smallest element. This will give them more respect for the result. ˆ Be sure to do examples of n div d and n mod d, when n is negative. Those are the examples that students find the most confusing. Similarly, consider bxc and dxe, when x is negative.

Section 3.3 ˆ The fact that we can always write gcd(m, n) in the form mx + ny with x, y ∈ Z is a surprising result for students.

– The subtlety of this result can be illustrated by challenging students to write gcd(17, 15) = 17x + 15y. That a solution is given by x = −7 and y = 8 is not likely to be noticed quickly. – The proof of this result is a beautiful application of the Well-Ordering Principle. Even if the proof is not discussed in class, it may be worth mentioning that gcd(m, n) is the smallest element of {mu + nv : u, v ∈ Z and mu + nv > 0}.

1.3. CHAPTER 3

7

– The utility of this result can be seen in proofs like that given for Euclid’s Lemma. – Note that although it may sometimes be hard for students to find even one solution pair (x, y), it is always the case that there are infinitely many solution pairs. Justification of this is explored in the exercises. ˆ Students have the most trouble with the backwards substitution stage of Euclid’s algorithm. Performing the algorithm in the same systematic way each time can help students to get over this difficulty. ˆ Some students may be tempted to use trial and error to find x, y for which gcd(m, n) = mx + ny and to “fake” Euclid’s algorithm. Mentioning that there are infinitely many solution pairs (x, y) and that Euclid’s algorithm finds a particular one may help to steer them back on track.

Section 3.4 ˆ Proving properties of rational numbers gives students more practice with boiling proofs down to definitions. Unwinding a rational number to the form ab is not unlike steps taken in earlier sections where an odd number is written in the form 2k + 1 or the notation d | n is expressed as n = dk. ˆ The theorem asserting that every rational number √ can be written in lowest terms is used in the next section to show that 2 is irrational. ˆ The discussion of decimal form of numbers is not needed in later sections. However, students may find it interesting to at least read this material. The ideas are probably familiar to most students, but the students are now in a position to understand those ideas more deeply and precisely. Also, this discussion of decimals ties in well with the prior understanding many students have that non-terminating and non-repeating decimal expansions signal the irrationality of a number. √ ˆ Consider proving in class that 3 is irrational, since some√students mistakenly believe that the parity arguments in the proof that 2 is irrational are important in general. √

ˆ Some students try to argue that a number like 1+2 2 is obviously irrational √ since 2 is in it. These same students are therefore quick to say that √ √ √2+ √6 is “obviously irrational.” That is why this number appears in the 2+ 3

homework exercises, where many will be surprised to find that it equals 2. ˆ Students tend to find very straightforward the method of using the Rational Roots Theorem to prove that a number is irrational.

8

CHAPTER 1. TEACHING POINTS ˆ The notions of algebraic and transcendental numbers are not needed elsewhere in the book. However, it may be worth noting that our technique of using the Rational Roots Theorem to prove that a number is irrational only works if the number is algebraic.

Section 3.5 ˆ Some of the ideas presented in this section are referenced heavily in Chapter 5. In particular, the result here that congruence is an equivalence relation becomes understood more clearly there. Also, the equivalence classes of integers modulo n serve as useful examples of equivalence classes in Chapter 5. ˆ The discussion of RSA encryption is terse and is mainly intended to assure the students that the computation techniques explored here do have useful applications. Of course, instructors may expand on this as desired. ˆ There is much packed into this section, and the instructor should consider what portion is needed now to satisfy later goals.

1.4. CHAPTER 4

1.4

9

Chapter 4

Section 4.1 ˆ This section is easy for most students. It should be dealt with quickly if at all in class. ˆ Perhaps the most important skill discussed here is that of reindexing a sequence.

Section 4.2 ˆ If all of the students have had integral calculus, then this section can easily be skipped. ˆ Since many calculators can handle sigma notation, students may need to be directed not to use calculators on some summation problems. Some ability to work with sigma notation by hand is needed in Section 4.4.

Pn ˆ It is important to note that in order to use the formula for i=0 ri in a particular example, the index i in that example must both agree with the exponent and start at 0. The end value of the index need not have any special properties.

Section 4.3 ˆ In addition to the domino analogy described in the book, another good analogy is to compare induction to climbing a ladder. The base case represents the ability to step onto the first rung of the ladder. The induction step represents the ability to step from one rung up to the next. With those two skills, one can climb to any desired rung on the ladder. ˆ Since some students seem to get confused by a string of equalities mixed with inequalities, comments like those following Example 4.18 should probably be made in class.

Section 4.4 ˆ Students find this section relatively straightforward. To a large degree, it serves as a review of proofs by induction. The hardest part seems to be the algebra in some of the proofs. ˆ This allows us to go back and prove the summation formulas Pn section P n k i i=1 i and i=0 r from Section 4.2.

10

CHAPTER 1. TEACHING POINTS

Section 4.5 ˆ Students find this section more difficult than the previous two on induction. Correctly stating the stronger inductive hypothesis is troublesome for some students. Interchanging the quantified statement ∀ a ≤ i ≤ k, P (i) with the list P (a), P (a + 1), . . . , P (k) tends to help some get over this hurdle. ˆ To be as consistent as possible with the outline of induction presented in Section 4.3, the “goal” in the inductive step for strong induction is chosen to be P (k + 1). Experience has shown that many students are confused if the inductive step is presented as

[P (i) holds ∀ i < k] → [P (k) holds]. After some comfort is established with the outline of strong induction presented in this course, a student can easily adopt the alternative inductive step presented above if it is encountered in a subsequent course. ˆ The proof that every integer n > 1 has a prime divisor is a great one for showing the utility of strong induction. Remarks like those following that proof should be made to explain why strong induction is sometimes needed where regular induction is not “strong” enough. ˆ Here is an example that can be proven in lecture and illuminates the structure of a strong induction proof. That is, since the proof is so easy, the students can focus their attention on the outline rather than the details. Example. Show: If s0 = s1 = 0 and ∀ n ≥ 2, sn = 7sn−1 − 5sn−2 , then ∀ n ≥ 0, sn = 0. ˆ A fun problem to give the students is the following: With 47¢ and 34¢ stamps (letter and postcard costs, respectively, starting April, 2016), what is the minimum cost such that it and every greater cost is achievable with such stamps? The answer is $15.18. Of course, it follows from the big result in Exercise 48 called the Frobenius Coin Exchange Problem.

Section 4.6 ˆ Not much class time needs to be devoted to this section. The beauty stored in Pascal’s triangle and expansions given by the Binomial Theorem can be dealt with rather quickly. ˆ Problems that ask a student for a particular coefficient in an expansion of some (ax + by)n provide a good way to test a student’s knowledge of the Binomial Theorem. They require little computation, and if the exponents are not chosen too small, then the student cannot “cheat” and use a calculator to get the expansion.

1.5. CHAPTER 5

1.5

11

Chapter 5

Section 5.1 ˆ Emphasize that we have been working with relations all along. However, now we are going to look at them more formally. ˆ Figuring out what to do when asked to prove or disprove that a relation is reflexive (or symmetric, or transitive) is quite difficult for some students. Spending time in class discussing examples like 5.17 and 5.18 is definitely warranted. Coming up with counterexamples when needed seems to be particularly hard for some students.

Section 5.2 ˆ Getting students to think about why a Hasse diagram is sufficient to encode a partial order relation on a set X gets them to think about and remember the three defining properties of a partial order relation. The absences of loops and lines following from transitivity are most obviously tied to reflexivity and transitivity, respectively. However, also note that it is possible to initially arrange the elements of X so that all arrows point upward only if X is antisymmetric. Otherwise, there would be two elements of X with opposing arrows that could not both be made to point upward. ˆ In our presentation of equivalence relations, we have chosen to retain the notation x R y from Section 5.1 rather than to adopt a notation like x ∼ y, as is sometimes used. That is, we have placed consistency over convenience or convention. ˆ The more general notion of a union given in Definition 5.9 is not hard for the students to adopt. This is especially true after sigma notation has already been presented. Of course it is always nice to start with an example in [ which A = {A1 , A2 , . . . , An } is a finite collection of sets, and the union A can alternatively be written as A1 ∪ A2 ∪ · · · ∪ An . A∈A

ˆ A highlight of this section is the correspondence between equivalence relations and partitions. Be sure not to lose in the formalities the very simple idea behind this correspondence.

Section 5.3 ˆ The difference between the codomain and the range of a function is sometimes blurred in lower level mathematics courses. It should be emphasized here.

12

CHAPTER 1. TEACHING POINTS ˆ In a proof that the range of a function is a set B, students often omit an argument that every y ∈ B is actually hit by some x from the domain of f . Be sure to stress the importance of that step. ˆ Students can easily miss some of the subtle reasons why a “function” may not be well-defined. Examples like 5.35(b) and 5.36 should be discussed. ˆ With a precalculus background in hand, students ought to be comfortable with the portions of this section titled “Composing Functions” and “Focusing on Real Functions”. Hence, these might simply be assigned for reading as a review.

Section 5.4 ˆ Students tend to have had some experience proving that a function is oneto-one. However, the notions of onto and bijective are probably new to them. ˆ The bijections in Example 5.48 are referenced in Section 5.6, when we assert that R and (−1, 1) have the same cardinality. ˆ Mention that Theorem 5.10(b) is a useful tool for proving that a function is bijective, since it circumvents the need to separately consider one-to-one and onto. This tool is particularly useful in Section 5.6, where cardinality assertions need to be justified with bijections. ˆ The introduction of logarithms here does provide a nice example for our discussions of inverse functions. However, logarithms are primarily introduced here so that they may be referenced in our later study of function growth and algorithm complexity in Chapter 10.

Section 5.5 ˆ Comments like those in Remark 5.2 should be made regarding our use of similar notations (e.g. f −1 for inverse functions and inverse image). This should serve both to avoid potential confusion and to emphasize connections. ˆ Note that properties of set operations, such as the distributive laws (see Exercise 57), are relatively easy to prove using indexed unions and intersections. In contrast, the corresponding laws for finite sets are typically proven with a tedious proof by induction. Of course, the finite case follows from our more general considerations now.

Section 5.6 ˆ Examples like 5.61 and 5.62 generally lead to some good discussions in class about relative “sizes” of infinite sets. See the comments that follow those examples.

1.5. CHAPTER 5

13

ˆ To justify an assertion that two sets have the same cardinality (such as the integers and the even integers, the positive integers and all integers, or R and (−1, 1)), the book always provides an explicit formula for a bijection. However, it is worthwhile to discuss the more basic idea behind the correspondences we use. That is, a simple understanding of how the elements in one set match up with the elements in the other set is also important. ˆ If the students are familiar with the inverse tangent function, then that provides another nice way to show that R has the same cardinality as an open interval (namely (− π2 , π2 ) is this case).

14

CHAPTER 1. TEACHING POINTS

1.6

Chapter 6

Section 6.1 ˆ The Multiplication Principle is best learned through examples rather than the formal statement of it given in Theorem 6.1. Comments like those following Example 6.2 help students appreciate the precise conditions sufficient for the use of the Multiplication Principle. ˆ Doing an example which uses the fact that there are n − m + 1 integers from m to n, inclusive, will help those students who make the common mistake of missing this count by 1.

Section 6.2 ˆ Students have difficulties with problems like Example 6.18. Comments like those following that example should be made to the students. ˆ The common mistake discussed in the paragraph on Permutations vs. Combinations should be addressed in class.

Section 6.3 ˆ In each example that uses the Addition Principle, emphasize the fact that the sets whose sizes are being added are disjoint. ˆ Have students conjecture the appropriate generalization of the Basic InclusionExclusion Principle to 3 sets. Discussion of why some natural guesses are wrong will set the stage nicely for those moving on to Section 7.1.

Section 6.4 ˆ We only need a very superficial treatment of probability here, since our primary interest is in counting. Note that we use Definition 6.4 to define probability in this section. ˆ Students sometimes have difficulty choosing an appropriate sample space in which the outcomes are equally likely. Comments like those after Example 6.32 are particularly helpful to avoid common mistakes. ˆ Notice in an example like

If 2 balls are randomly selected from a bag containing 3 black and 6 white balls, then what is the probability that both are black? we need not say that the 9 balls are considered distinguishable. Although that issue needs to be made clear in counting problems, it takes care of itself in probability problems, since we want to consider equally likely outcomes.

1.6. CHAPTER 6

15

Section 6.5 ˆ Students find counting poker hands difficult, since a “one card at a time” analysis rarely works. Most of their wrong answers tend to be overcounts. This provides a good opportunity to emphasize the distinction between when order is  important and when it is not in a selection. For example, there are 13 2 ways to determine the two denominations in a hand that is Two Pairs, not 13 · 12. ˆ Discussing why a student’s proposed answer is wrong is extremely valuable to the students and can be an enjoyable challenge for the instructor. The simple observation that the number comes out wrong is not a sufficient explanation. For example, why  is the number of ways to get One Pair in a hand of five cards not 13 42 · 48 · 44 · 40?

Section 6.6  ˆ Thinking that there are 10 5 ways for 10 people to split into 2 teams of 5 is a very common mistake. A discussion like that given in Example 6.45 is thus important to have. ˆ When doing an example like Example 6.46, if at all possible, bring an example of the relevant solid (there a dodecahedron) to class. Pictures are worth a thousand words, but solids are worth a thousand pictures.

16

CHAPTER 1. TEACHING POINTS

1.7

Chapter 7

Section 7.1 ˆ Have a student guess the formula for |A1 ∪ A2 ∪ A3 |. Explaining what is wrong with a guess like |A1 ∪ A2 ∪ A3 | = |A1 | + |A2 | + |A3 | − |A1 ∩ A2 ∩ A3 | can illicit some valuable discussion. ˆ In each example using Inclusion-Exclusion some time should be devoted to explain how the sets Ai are chosen. Picking these sets and deciding whether or not the problem should be approached through the complements Ai c seems to be the hardest part for the students. Otherwise, students find this section relatively straightforward. ˆ Try a “Secret Santas” experiment in class. That is, have the students mix up their names in a hat and retrieve them. Try it a few times. Does the likelihood of no self-selections seem to be 1e ? Following up with an actual gift exchange is optional.

Section 7.2  12 ˆ Mention that multinomial coefficients like 5,4,3 are valuable counting tools that we had to skirt around in earlier sections with computations   7 3 like 12 5 4 3 . ˆ Students do not seem to have a good memory of the Binomial Theorem. Thus a review of it is warranted, and is perhaps best done in the “Revisited” form of Theorem 7.4. ˆ Problems like Example 7.8 provide a good way to test a student’s knowledge of the Multinomial Theorem. They require little computation, and if the exponents are not chosen too small, then the student cannot “cheat” and use a calculator to get the expansion.

Section 7.3 ˆ A comment like that made at the beginning of Example 7.12 is important to make. A question asking how many different selections of 6 balls from 3 red, 2 yellow, and 4 green are possible is too vague. It must be made clear whether or not the balls are considered distinguishable beyond their color. Problems in which the balls are distinguishable beyond their color were considered earlier and should not be confused with our current interest. Our generating function approach depends on our assumption that balls of the same color are indistinguishable. That is, in this section we only care about the number of balls of each color selected. ˆ For the most part, students find the problems in this section relatively straightforward. The problems with which they tend to have the most

1.7. CHAPTER 7

17

difficulty are those like Example 7.13. The final step of picking the desired coefficient seems to give some of them trouble.

Section 7.4 ˆ In lecture it is probably best to take a very informal approach to group theory and try to get to examples using Burnside’s Formula as quickly as possible.

– After Example 7.14, define a group to be a set of symmetries (of interest) of some object. We have no need for multiplying elements in our study. – Go straight to explaining the elements of the cyclic group and dihedral group in Definition 7.3. – Group actions can be handled informally as follows. Let G be a group of symmetries of an object B, and let X be a set of “colorings” of B. Each element g in G may be regarded as permuting the elements of X. We say that G acts on X. For each x in X, the orbit of x is the set {y ∈ X : x is moved to y by some g ∈ G}. The number of orbits is the number of “colorings” after the symmetries are stripped out. All of these ideas can be explained through Example 7.14 and Figure 7.4. – Understanding now that we are interested in counting orbits, the students should be ready to see Burnside’s Formula applied to examples. ˆ Bring a large cube to class when explaining Example 7.18. There is no substitute for seeing some of its “rotations” in action.

Section 7.5 ˆ This section can easily be skipped without impacting later material. However, it can help the students gain valuable insights. ˆ The students may find this section difficult. The problems seem to be especially hard if a hint is not given.

18

CHAPTER 1. TEACHING POINTS

1.8

Chapter 8

Section 8.1 ˆ Students readily accept the notion of a graph. So do not get bogged down in this section. There is a lot of terminology that can be presented through a few well-chosen examples. For the most part, students can then read the formal definitions on their own. ˆ The motivational examples presented here provide some previews of coming attractions in later sections. For example, the birth of graph theory due to Euler obviously sets the stage for the section on Euler circuits.

Section 8.2 ˆ Try not to get too hung up on the vertex labelings established for the graphs presented here. For example, the idea of Km,n can easily be expressed with a picture of a particular example. Labeling the vertices with ordered pair simply provides us a standard way to discuss Km,n is subsequent proofs. ˆ If models of the platonic solids are available, then bring them to class when these examples are discussed. For example, Zometool is wonderful for building such models. See http://www.zometool.com. ˆ There are many nice ways to present Q4 . For example, see the answer to Exercise 53 from Section 9.4. Of course, a 3-dimensional model is always a hit.

Section 8.3 ˆ Matrix multiplication is introduced here for students that have never seen it. However, they may have already encountered it in this book in Exercises 31 through 35 in Section 4.3.

Section 8.4 ˆ Although a graph isomorphism is a special kind of graph map, the notion of a graph isomorphism is discussed first. The need to have the vertex map respect edges is easier to introduce when considering a one-to-one correspondence between two graphs. The more general notion of a graph map is thus presented at the end of this section. ˆ The Petersen Graph is introduced here and is referenced in subsequent sections, where some of its properties are explored. One cute way of explaining the relative “fame” of this graph at this point is to mention that it appears on the cover of the Journal of Graph Theory - every issue!

1.8. CHAPTER 8

19

Section 8.5 P ˆ The proof of the identity v∈V deg(v) = 2|E| can be illustrated nicely in class through an example. After drawing a graph on the board, consider the vertices one at a time. At each vertex, near each end of an edge incident with that vertex, make a mark. After all of the vertices have been considered, there will be two marks on each edge (one near each of its endpoints). ˆ Plan on bringing colored chalk to class if examples illustrating the union and intersection of subgraphs will be presented. However, students have little difficulty with those simple notions. ˆ The construction of the product of two graphs is best shown with pictures. The basic idea should be illustrated before worrying about any formal description of the vertex and edge sets.

Section 8.6 ˆ In one sense, this presentation of directed graphs serves as a review and overview of the concepts introduced in each of the previous sections of this chapter. We are just adding arrows to the edges and are now restricted to traverse edges in their specified direction. Consequently, it is very reasonable, after a very quick introduction in class, to assign the students to read the first half of this section on their own. ˆ Perhaps, the only subtlety in directed graphs that warrants discussion in class is the notion of strong components. Students do have some difficulty looking at a directed graph whose underlying graph is connected and realizing that there may be multiple strong components. ˆ The discussion of Markov chains in this section is optional and is not referenced later in the book.

20

CHAPTER 1. TEACHING POINTS

1.9

Chapter 9

Section 9.1 ˆ Emphasize that, for any given graph G, a proof that κ(G) = k has two main steps. First, a disconnecting set of size k must be presented. This is usually the easy part. Second, it must be argued that no disconnecting set of size smaller than k exists. This is the sometimes neglected part. ˆ Theorem 9.2 is obviously a corollary of Theorem 9.5. However, the fact that κ(G) ≤ δ(G) is presented first for two reasons. First, it is the simplest upper bound for connectivity. Second, vertex connectivity is our primary concern here, and some instructors may choose to skip the notion of edge connectivity.

Section 9.2 ˆ The great strength of Euler’s Theorem makes this section relatively straightforward. However, some students do still have difficulty finding an Euler circuit in large graphs, even though they know one should exist. The discussion in Example 9.6 should be helpful to those who get “stuck” when searching for an Euler circuit. ˆ For simplicity, we consider only snow plow problems like Example 9.7, in which each side of the street must be plowed separately. Of course, this guarantees that the degrees in the corresponding graph will all be even. When this is not the case, a reasonable adjustment is to seek the minimum possible number of edge repetitions in a circuit that covers every edge at least once.

Section 9.3 ˆ The similarities between seeking a circuit that covers every edge exactly once and one that covers every vertex exactly once should be noted. Then, emphasize that the search for Hamiltonian cycles is much more difficult than that for Euler circuits. It is, in general, both difficult to find a Hamiltonian circuit when one exists and to prove that one does not exist otherwise. The examples we consider are thus chosen to be relatively small and reasonable. ˆ Example 9.13 gives a proof by induction that the multidimensional cubes are all Hamiltonian. The induction step can be nicely presented in class by showing how a Hamiltonian cycle for Q2 can be used to build one for Q3 . For additional practice, it might also be helpful to show the step up from Q3 to Q4 . Further arguments involving product graphs are explored in the exercises.

1.9. CHAPTER 9

21

Section 9.4 ˆ Rather than formally defining the notion of a region and the construction of a dual graph in class, it is best to simply do an example or two. Through examples, students will easily understand what is meant by a region and how the adjacencies are formed in a dual graph. ˆ Finding a subdivision of K5 or K3,3 in a non-planar graph can generally be quite hard. Examples, especially for tests or quizzes, should be carefully chosen so that finding these obstructions is reasonable. Realizing that K3,3 is isomorphic to a 6-cycle with antipodes connected is also helpful in problems of this type.

Section 9.5 ˆ Emphasize that, for any given graph G, a proof that χ(G) = k has two main steps. First, a k-coloring must be presented. This is usually the easy part. Second, it must be argued that no coloring using fewer than k colors is possible. This is the sometimes neglected part. ˆ While emphasizing that the Greedy Coloring Algorithm does not always yield an optimal coloring, also mention that it does do a good job if a good ordering is chosen for the vertices. In fact, there is always some ordering of the vertices for which the Greedy Coloring Algorithm does yield an optimal coloring. This is explored in Exercise 52.

22

CHAPTER 1. TEACHING POINTS

1.10

Chapter 10

Section 10.1 ˆ The material in this section could be presented immediately after completing Section 8.1. However, this section does start well the theme of this chapter. ˆ Our proof of Theorem 10.3 using Euler’s Theorem certainly does take great advantage of the relative lateness of our introduction to trees. A more traditional inductive proof using only elementary ideas is suggested in the exercises. It could alternatively be used in class if this material is presented before Section 9.4. ˆ Our proof that every connected graph has a spanning tree is a nice example of a proof by induction in which it is important that strong induction is used. For those that may have struggled with Section 4.5, this may be a more comfortable example. ˆ Theorem 10.7 is used in Section 10.5 in the proof that the worst-case complexity of any sorting algorithm must be at least O(n log2 n).

Section 10.2 ˆ It is hard for students to read through the formal descriptions of the Bread First Search and Depth First Search algorithms. However, talking through a few examples illustrating these in class will convince the students that they are not difficult to understand after all. ˆ Although infix notation is ambiguous in general and hence is not useful, we define it so that each ordered tree traversal algorithm gives a corresponding notation. However, do note that inorder traversal is useful for generating an ordered list of the vertices in a binary search tree.

Section 10.3 ˆ As described in Exercise 23, Kruskal’s Algorithm and Prim’s Algorithm generally yield the same minimum spanning tree. Consequently, to truly test a student’s ability to perform a particular one of these algorithms, directions requesting the order in which edges are added must be included. ˆ Some students will confuse minimum spanning trees and shortest path trees. Hence the difference between them should be emphasized and reemphasized. In some of the applied exercises, students need to decide which kind of tree is relevant. A couple of exercises directly address the skill of deciding between the two kinds of spanning trees.

1.10. CHAPTER 10

23

Section 10.4 ˆ In our study of the relative growth rates of functions, we give general results involving real functions. However, since our primary interest is in comparing orders of algorithms, some of the proofs might be presented to the students with a restricted attention to integer functions. The students may find induction proofs easier, for example. ˆ We define O(f (x)) as a set. Hence, we write g(x) ∈ O(f (x)), rather than saying g(x) is O(f (x)), as is done in some books. One advantage of our choice is the ease with which assertions about relative growth rates can be made, as in Theorem 10.16. For example, the assertion O(logb n) ⊂ O(n) says that log2 n ∈ O(n) and n 6∈ O(log2 n).

Section 10.5 ˆ This last section has a nice connection to the first section (Trees) of this chapter. In proving Theorem 10.17, the students will need to be reminded of Theorem 10.7 from Section 10.1. ˆ The introduction of sorting algorithms is a major component of this section, and Insertion Sort and Merge Sort are explicitly demonstrated in the body of the section. If an instructor wishes to emphasize Bubble Sort, Selection Sort, or Quick Sort, then there is sufficient support of this in the exercises.

24

CHAPTER 1. TEACHING POINTS

Chapter 2

Lecture Notes We provide lecture notes, as used by the author, for each section of the book. In particular, representative and appropriate examples are given to save an instructor valuable preparation time. The writing style is informal, as would be presented on a blackboard. In many cases, the wording used in definitions and theorems is different from that in the sections. The main ideas are emphasized, rather than every technical detail, when that might detract from a motivated discussion occurring in class. The notes here could very well be what is written on the board, with the understanding that further explanation will be given by the instructor. As much as possible and reasonable, examples different from any examples in the sections, the exercises, and the test bank are presented. When canonical examples from the section are duplicated in these notes the appropriate reference number is given. These notes are meant to supplement the book and cannot replace the book. The hope is that first time teachers of a discrete mathematics course or even just first time users of this book will find these notes helpful for their lectures.

25

26

CHAPTER 2. LECTURE NOTES

2.0

Chapter 0

Chapter 0: Representing Numbers Our familiar decimal system: 4703 = (4)103 + (7)102 + (0)101 + (3)100 . It is a base ten place system. Binary is the base two place system, using only 0’s and 1’s as digits. Example. The binary number 1101 has value (1)23 + (1)22 + (0)21 + (1)20 = 8 + 4 + 0 + 1 = 13dec . We can write 1101bin = 13dec . Example. 010110bin = (0)25 + (1)24 + (0)23 + (1)22 + (1)21 + (0)20 = 0 + 16 + 0 + 4 + 2 + 0 = 22dec . Example. Octal is base eight, using digits 0, 1, . . . , 7. 4173oct = (4)83 + (1)82 + (7)81 + (3)80 = (4)512 + (1)64 + (7)8 + (3)1 = 2171dec . Example. Hexadecimal is base sixteen, using digits 0, 1, . . . , 9, a, b, c, d, e, f . (e.g. d = 13dec .) 3da5hex = (3)163 +(d)162 +(a)161 +(5)160 = (3)4096+(13)256+(10)16+(5)1 = 15781dec . How do we convert from decimal to other bases? Example. Convert the decimal number 53 to binary. 53/2 26/2 13/2 6/2 3/2 1/2

= = = = = =

26 13 6 3 1 0

remainder remainder remainder remainder remainder remainder

1 0 1 0 1 1

We stop dividing when the quotient 0 is obtained. The binary representation is then given by listing the remainders in reverse order. 53dec = 110101bin . Example. Convert 700dec to octal. 700/8 87/8 10/8 1/8

= = = =

87 10 1 0

remainder remainder remainder remainder

700dec = 1274oct .

4 7 2 1

2.0. CHAPTER 0

27

Biinary, octal, and hexadecimal can be related by grouping digits. Example. 10011101100 in binary 10 |{z} 011 |{z} 101 |{z} 100 ←− |{z} bin |{z} 2

3

5

4

oct

is 2354 in octal. Example. 3da5 in hexadecimal 3

d

a

5

hex

z}|{ z }|{ z}| { z}| { z }| { 0011 1101 1010 0101 ←− bin is 11110110100101 in binary.

28

CHAPTER 2. LECTURE NOTES

2.1

Chapter 1

Section 1.1: Statement Forms and Logical Equivalences Definition. A statement is a sentence that is either true or false, but not both. Example. The following sentences are statements. (a) Harrisburg is the capital of Pennsylvania. (TRUE) (b) The earth revolves around the sun, and the moon revolves around the earth. (TRUE) (c) Fenway Park is in Boston, and the Boston Celtics play football. (FALSE) (d) If the moon revolves around the earth, then the moon revolves around the sun. (TRUE) Example. The following sentence is NOT a statement. This sentence is false. Statement Forms We study statements by examining their structure. There are four basic logical operations: Symbol Translation ¬ not ∧ and ∨ or → implies (if-then) In the first example, statements (b) and (c) have the form p ∧ q, and (d) has the form p → q, where p and q are statement variables. The four basic logical operations are formally defined by truth tables. ¬p T F

p F T p F F T T

q F T F T

p∧q F F F T

p∨q F T T T

p→q T T F T

The precedence of the basic operations listed from highest to lowest is ¬, ∧, ∨, →.

2.1. CHAPTER 1

29

The operations ∧ and ∨ are equal in precedence (co-equal). Example. Make a truth table for the statement form p ∨ ¬q. p F F T T

q F T F T

¬q T F T F

p ∨ ¬q T F T T

Example. Make a truth table for the statement form ¬p → (q ∨ r). p F F F F T T T T

q F F T T F F T T

r F T F T F T F T

¬p T T T T F F F F

(q ∨ r) F T T T T T T T

¬p → (q ∨ r) F T T T T T T T

Other operations and notions Definition.

(a) The exclusive or operation ⊕ is defined by p ⊕ q = (p ∨ q) ∧ ¬(p ∧ q).

(b) The if and only if operation ↔ (or iff) is defined by p ↔ q = (p → q) ∧ (q → p). p F F T T

q F T F T

p⊕q F T T F

p↔q T F F T

Definition. (a) A tautology, denoted t, is a statement form that is always true. (b) A contradiction, denoted f , is a statement form that is always false. Example (From Example 1.5). (b) p ∧ ¬p is a contradiction.

(a) p ∨ ¬p is a tautology.

30

CHAPTER 2. LECTURE NOTES

Logical Equivalences Definition. We say p is logically equivalent to q, written p ≡ q, if and only if p and q have the same truth tables. Otherwise, we write p 6≡ q. Example (Example 1.9). Verify that p ⊕ q ≡ (p ∧ ¬q) ∨ (¬p ∧ q). p F F T T

q F T F T

¬p T T F F

¬q T F T F

p ∧ ¬q F F T F

¬p ∧ q F T F F

p⊕q F T T F

(p ∧ ¬q) ∨ (¬p ∧ q) F T T F

Example (From Example 1.6). How to negate an if-then statement. ¬(p → q) ≡ p ∧ ¬q. p F F T T

q F T F T

¬q T F T F

p→q T T F T

¬(p → q) F F T F

p ∧ ¬q F F T F

Definition. Given the statement form p → q, (a) its converse is q → p. (b) its contrapositive is ¬q → ¬p. (c) its inverse is ¬p → ¬q. (d) its negation is p ∧ ¬q. (by Example 1.6) Example. Given the statement form p → ¬r, (a) its converse is ¬r → p. (b) its contrapositive is r → ¬p. (c) its inverse is ¬p → r. (d) its negation is p ∧ r. Example (See Example 1.11). The significance of the contrapositive. p → q ≡ ¬q → ¬p. Basic Logical Equivalences See Theorems 1.1 and 1.2. (Project these on a screen.)

2.1. CHAPTER 1

31

Theorem (Theorem 1.1). (a) (b) (c) (d) (e) (f )

¬¬p (p ∧ q) ∧ r (p ∨ q) ∨ r p∧q p∨q p ∧ (q ∨ r) p ∨ (q ∧ r) ¬(p ∧ q) ¬(p ∨ q) If p → q, then [p ∧ q If p → q, then [p ∨ q

≡ ≡ ≡ ≡ ≡ ≡ ≡ ≡ ≡ ≡ ≡

p p ∧ (q ∧ r) p ∨ (q ∨ r) q∧p q∨p (p ∧ q) ∨ (p ∧ r) (p ∨ q) ∧ (p ∨ r) ¬p ∨ ¬q ¬p ∧ ¬q p] q]

Double Negative Associativity Commutativity Distributivity De Morgan’s Laws Absorption Rules

Theorem (Theorem 1.2). ≡ ≡ ≡ ≡ ≡ ≡

¬t ¬f p∧f p∨f t→p p→t

(a) (c) (e)

f t f p p t

(b) (d) (f )

p∧t p∨t p ∧ ¬p p ∨ ¬p p→f f →p

≡ ≡ ≡ ≡ ≡ ≡

Example. Verify that p ∧ ¬(q ∧ ¬r) ≡ ¬(p → q) ∨ (p ∧ r). p ∧ ¬(q ∧ ¬r)

≡ ≡ ≡ ≡

p ∧ (¬q ∨ ¬¬r) p ∧ (¬q ∨ r) (p ∧ ¬q) ∨ (p ∧ r) ¬(p → q) ∨ (p ∧ r)

De Morgan’s Law Double Negative Distributive Law Negation of →

Digital Circuits Example. A digital circuit is constructed using gates. P Q

s

NOT

c

AND OR

(a) Its Input-Output table reflects how it works. P 0 0 1 1

Q 0 1 0 1

S 0 1 1 1

S

p t f t ¬p t

32

CHAPTER 2. LECTURE NOTES

(b) We can trace the circuit to determine its corresponding expression. (P ∧ ¬Q) ∨ Q = S. (c) In this example, S ≡ P ∨Q, and the circuit could be more simply represented by a single OR gate. Example. Draw a circuit that realizes the expression (¬P ∧ Q) ∨ (¬Q ∧ R) = S. Solution. P Q

NOT

c

s

AND OR

NOT

c AND

R

S

2.1. CHAPTER 1

33

Section 1.2: Set Notation List notation S = {1, 5, 8} is the set whose elements are 1, 5, and 8. Note that 8√∈ S, where ∈ denotes ”is an element of”, but 7 6∈ S. T = {− 2, 0, eπ , 23 } is another example of a set of real numbers. Set builder notation W = {n : n is an integer and 0 ≤ n ≤ 2} is ”the set of n such that n is an integer and 0 ≤ n ≤ 2.” Note that the elements of W are 0, 1, and 2. Definition. Two sets A and B are equal, written A = B, if and only if A and B contain the same elements. Example. For W defined above, W = {0, 1, 2} = {2, 0, 1} = {0, 1, 0, 2}. That is, order and repetition of elements listed does not matter. Standard notation: Z= R= N= Z+ = Z− = R+ = R− =

the the the the the the the

set set set set set set set

of of of of of of of

integers real numbers natural numbers positive integers negative integers positive real numbers negative real numbers

= {. . . , −2, −1, 0, 1, 2, . . .}. (the full number line). = {0, 1, 2, 3, . . .}. = {1, 2, 3, . . .}. = {. . . , −3, −2, −1}. = {x : x ∈ R and x > 0}. = {x : x ∈ R and x < 0}.

Definition. We say that a set A is a subset of a set B, written A ⊆ B, if and only if every element of A is also an element of B. Otherwise, we write A * B. If A ⊆ B and A 6= B, we write A ⊂ B and say that A is a proper subset of B. Example.

(a) {2, 4, 6} ⊆ {2, 3, 4, 6, 7}.

(b) {1, 2} ⊂ {1, 2, 3}. (c) {1, 3} * {1, 2}. (d) Z− ⊆ Z. (e) Z ⊆ Z. (f) {{1, 2}, {1, 3}} ⊆ {{1, 2}, {2, 3}, {1, 3}}. Example.

(a) 2 ∈ {2, 4, 6}.

34

CHAPTER 2. LECTURE NOTES (b) {2} 6∈ {2, 4, 6}. (c) {1, 2} ∈ {{1, 2}, {1, 3}}. (d) {1, 2} * {{1, 2}, {1, 3}}.

Typically, all sets in consideration are understood (in context) to be subsets of some universal set U. For example, when U = R, {x : x > 1} = {x : x ∈ R and x > 1}. Definition (See Definition 1.9 for all possibilities). Given a, b ∈ R, d d , (a, b) = {x : a < x < b} a b t d [a, b) = {x : a ≤ x < b} , a b t (−∞, b] = {x : x ≤ b} . b Definition. The empty set, denoted ∅, is the unique set with no elements. Note that ∅ = {} = (0, 0). Theorem. For any set A, ∅ ⊆ A. Definition. The cardinality of a set A, denoted |A|, is the number of elements in A. Example. (a) |{1, 3, 8, π}| = 4. (b) |{1, 3, 1, 3}| = 2. Definition. A set A is finite if and only if |A| ∈ N. Otherwise, A is infinite. Example. (a) {1, 3, 8, π} is finite. (b) Z is infinite. Example (Russell’s Paradox: Example 1.22). Let P = {S : S is a set and S 6∈ S}. Can P be a set? Both possible answers lead to a contradiction. Consequence: Sets need to be defined from a list of axioms. However, we deal primarily with subsets of R and P(R) and need not worry about these issues here.

2.1. CHAPTER 1

35

Section 1.3: Quantifiers Definition (Universal and Existential Statements). (a) ∀ x ∈ U, p(x) means “for all x in U, p(x) holds.” (b) ∃ x ∈ U such that p(x) means “there exists some x in U such that p(x) holds.” Example. Determine whether the following are True or False. (a) ∀ x ∈ R, x4 + 2 > 0.

True.

(b) ∀ n ∈ Z, n2 − 4n + 3 ≥ 0.

False. (n = 2) √ True. (x = π)

(c) ∃ x ∈ R such that x2 = π. (d) ∃ r ∈ R such that r2 = −1.

False.

Example. Write the following statements efficiently using quantifiers and standard notation. (a) Every natural number exceeds −1. ∀ n ∈ N, n > −1. (b) There is an integer whose square is 8. ∃ n ∈ Z such that n2 = 8. (c) Every real number has a fifth root. ∀ x ∈ R, ∃ y ∈ R such that y 5 = x. (d) The sum of any two natural numbers is a natural number. ∀ m ∈ N, ∀ n ∈ N, m + n ∈ N. | {z } ∀ m,n∈N

Assign as reading the subsection on Real Functions. Students will see properties of and operations on real functions with which they are familiar expressed formally using quantifiers. For example, to say that a real function f is nondecreasing means ∀ a, b ∈ R, if a ≤ b, then f (a) ≤ f (b). y

x Assign as reading Appendix A on Assumed Properties of Z and R. It is important to be familiar with these properties that can be used without proof, when we start writing proofs in Chapter 2.

36

CHAPTER 2. LECTURE NOTES For example, the Zero Multiplication Property for real numbers says ∀ x, y ∈ R, if x · y = 0, then either x = 0 or y = 0.

Proposition (Negating Quantified Statements). (a) ¬ [∀ x ∈ U, p(x)] ≡ ∃ x ∈ U such that ¬p(x) (b) ¬ [∃ x ∈ U such that p(x)] ≡ ∀ x ∈ U, ¬p(x) Example. Negate the following statements. (a) ∀ x ∈ R, x4 + 2 > 0. ∃ x ∈ R such that x4 + 2 ≤ 0. (b) ∃ r ∈ R such that r2 = −1. ∀ r ∈ R, r2 6= −1. (c) ∀ x ∈ R, if x > 1, then x2 > 1. ∃ x ∈ R such that x > 1 and x2 ≤ 1. (d) ∀ x ∈ R, ∃ y ∈ R such that y 5 = x. ∃ x ∈ R such that ∀ y ∈ R, y 5 6= x. (e) ∀ m, n ∈ N, m + n ∈ N. ∃ m, n ∈ N such that m + n 6∈ N. (f) ∃ n ∈ Z such that ∀ x ∈ R, x ≤ n. ∀ n ∈ Z, ∃ x ∈ R such that x > n.

2.1. CHAPTER 1

37

Section 1.4: Set Operations and Identities Definition. Let A and B be sets in a universal set U, and let y ∈ U. (a) A = B iff ∀ x ∈ U, x ∈ A ↔ x ∈ B. (b) A ⊆ B iff ∀ x ∈ U, x ∈ A → x ∈ B. (c) y ∈ Ac (the complement of A) iff y 6∈ A. Ac

U '$ A &%

(d) y ∈ A ∩ B (the intersection of A and B) iff y ∈ A ∧ y ∈ B. A∩B

U '$ '$ A B &% &%

(e) y ∈ A ∪ B (the union of A and B) iff y ∈ A ∨ y ∈ B. A∪B

U '$ '$ A B &% &%

(f) y ∈ A \ B (the difference of A minus B) iff y ∈ A ∧ y 6∈ B. A\B

U '$ '$ A B &% &%

38

CHAPTER 2. LECTURE NOTES (g) y ∈ A M B (the symmetric difference of A and B) iff y ∈ A ⊕ y ∈ B. AMB

U '$ '$ A B &% &% Example. Let U = {1, 2, 3, 4, 5}, A = {1, 3, 5}, and B = {2, 3}. (a) Ac = {2, 4}, B c = {1, 4, 5}. (b) A ∩ B = {3}. (c) A ∪ B = {1, 2, 3, 5}. (d) A \ B = {1, 5}, B \ A = {2}. (e) A M B = {1, 2, 5}. Definition. If S ∩ T = ∅, we say that the sets S and T are disjoint and that S ∪ T is a disjoint union. Note in general that, A M B = (A \ B) ∪ (B \ A), a disjoint union. Example. Let U = (2, 10], A = (2, 6], and B = [3, 9). U

d 2

A

d 2

B

t 10 t 6 t 3

d 9

(a) Ac = (6, 10], B c = (2, 3) ∪ [9, 10]. ←− a disjoint union. (b) A ∩ B = [3, 6]. (c) A ∪ B = (2, 9). (d) A \ B = (2, 3), B \ A = (6, 9). (e) A M B = (2, 3) ∪ (6, 9). Definition. The product of sets A and B is A × B = {(x, y) : x ∈ A and y ∈ B}. An element (x, y) is called an ordered pair.

2.1. CHAPTER 1

39

Example. {1, 3, 5} × {2, 3} = {(1, 2), (1, 3), (3, 2), (3, 3), (5, 2), (5, 3)}. Note that R × R = R2 is the Cartesian plane. Example. (2, 6] × [3, 9) is pictured. 9

3 2

6

Definition. The power set of a set A is P(A) = {B : B ⊆ A}. Example.

(a) P({1, 3, 5}) = {∅, {1}, {3}, {5}, {1, 3}, {1, 5}, {3, 5}, {1, 3, 5}}.

(b) P(∅) = {∅}. (c) Note for finite sets that |P(A)| = 2|A| . Basic Set Identities: See Theorems 1.5 and 1.6. (Project these on a screen.) Theorem (Theorem 1.5). (a) (b) (c) (d) (e) (f )

c

(Ac ) (A ∩ B) ∩ C (A ∪ B) ∪ C A∩B A∪B A ∩ (B ∪ C) A ∪ (B ∩ C) c (A ∩ B) c (A ∪ B) If A ⊆ B, then A ∩ B If A ⊆ B, then A ∪ B

= = = = = = = = = = =

A. A ∩ (B ∩ C). A ∪ (B ∪ C). B ∩ A. B ∪ A. (A ∩ B) ∪ (A ∩ C). (A ∪ B) ∩ (A ∪ C). Ac ∪ B c . Ac ∩ B c . A. B.

Double Complement Associativity Commutativity Distributivity De Morgan’s Laws Absorption Rules

Theorem (Theorem 1.6). (a) (c)

Uc ∅c A∩∅ A∪∅

= = = =

∅. U. ∅. A.

(b) (d)

A∩U A∪U A ∩ Ac A ∪ Ac

= = = =

A. U. ∅. U.

40

CHAPTER 2. LECTURE NOTES c

Example. Verify the set identity A ∩ (B ∩ C c ) = (A \ B) ∪ (A ∩ C). c

A ∩ (B ∩ C c )

= = = =

A ∩ (B c ∪ C c c ) A ∩ (B c ∪ C) (A ∩ B c ) ∪ (A ∩ C) (A \ B) ∪ (A ∩ C)

De Morgan’s Law Double Complement Distributive Law Definition of \.

2.1. CHAPTER 1

41

Section 1.5: Valid Arguments Definition. An argument is a sequence of premise statements followed by a conclusion statement. We will precede the conclusion with the symbol ∴ for “Therefore.” Example 2.1. Two examples of arguments. (a) If π = 3, then e ∈ Z. π 6= 3. ∴ e 6∈ Z. (b) If π < 0, then e = 2. e 6= 2. ∴ π ≥ 0. An argument may be valid or invalid, and that is decided by its form. Example. The argument forms from Example 2.1. (a)

p→q ¬p ∴ ¬q.

(b)

p→q ¬q ∴ ¬p.

Definition. An argument form is valid iff its conclusion is true whenever all of its premises are true. Example. The argument in Example 2.1(b) is valid. p F F T T

q F T F T

p→q T T F T

¬q T F T F

¬p T

←− the only relevant row is good

Example. The argument in Example 2.1(a) is invalid. p F F T T

q F T F T

p→q T T F T

¬p T T F F

¬q T F

←− a bad relevant row

42

CHAPTER 2. LECTURE NOTES

Basic Valid Argument Forms: See Theorem 1.7. (Project it on a screen.) Theorem (Theorem 1.7). (a) p → q p ∴ q (b) p → q ¬q ∴ ¬p (c) p → q q→r ∴ p→r (d) p → r q→r p∨q ∴ r (e) p ∨ q ¬p ∴ q (f ) p ∧ q ∴ p (g) p ∴ p∨q (h) p q ∴ p∧q (i) p ↔ q p ∴ q

Direct Implication

Contrapositive Implication

Transitivity of →

Two Separate Cases

Eliminating a Possibility

In Particular Obtaining Or Obtaining And

Substitution of Equivalent

Example. Without using a truth table, verify that the following argument form is valid. p p→q r → ¬q ∴ ¬r. 1. 2. 3. 4. 5. 6.

Statement Form p p→q r → ¬q q ¬¬q ∴ ¬r

Justification Given Given Given (1), (2), Direct Implication (4), Double Negative, Substitution of Equivalent (3),(5), Contrapositive Implication

2.1. CHAPTER 1 How do we analyze

43 arguments involving quantified statements?

Theorem (Principle of Specification). ∀ x ∈ U, p(x) a∈U ∴ p(a) is a valid argument form. Theorem (Principle of Generalization). Let a ∈ U be arbitrary. p(a) ∴ ∀ x ∈ U, p(x) is a valid argument form. Example. Verify that the following argument form is valid. ∀ x ∈ U, p(x) a∈U ∴ p(a) ∨ q(a). 1. 2. 3. 4.

Statement Form ∀ x ∈ U, p(x) a∈U p(a) ∴ p(a) ∨ q(a)

Justification Given Given (1), (2), Principle of Specification (3), Obtaining Or

Example. Verify that the following argument form is valid. ∀ x ∈ U, p(x) → r(x) ∀ x ∈ U, q(x) → r(x) ∀ x ∈ U, p(x) ∨ q(x) ∴ ∀ x ∈ U, r(x). 1. 2. 3. 4. 5. 6. 7. 8. 9.

Statement Form ∀ x ∈ U, p(x) → r(x) ∀ x ∈ U, q(x) → r(x) ∀ x ∈ U, p(x) ∨ q(x) Let a ∈ U be arbitrary. p(a) → r(a) q(a) → r(a) p(a) ∨ q(a) r(a) ∴ ∀ x ∈ U, r(x)

Justification Given Given Given Assumption (1),(4), Principle of Specification (2),(4), Principle of Specification (3),(4), Principle of Specification (5), (6), (7), Two Separate Cases (4), (8), Principle of Generalization

44

CHAPTER 2. LECTURE NOTES

How do we show that an argument involving quantified statements is invalid? Example. Verify that the following argument form is invalid. ∀ x ∈ U, p(x) → q(x) ∀ x ∈ U, q(x) ∴ ∀ x ∈ U, p(x). We need only construct some argument in this form that is invalid. ∀ x ∈ R, x > 0 → x2 + 1 > 0. ∀ x ∈ R, x2 + 1 > 0. ∴ ∀ x ∈ R, x > 0. Since all of the premises are true, and the conclusion is false, this argument is invalid. Hence, so is its form.

2.2. CHAPTER 2

2.2

45

Chapter 2

Section 2.1: Direct Demonstration √ √ √ √ Example 2.2. Show that the points (2, 3), (2 2, − 2), and (−2 3, 1) all lie on a common ellipse centered at the origin. Sketch of the proof for Example 2.2. x2 a2 4 a2 8 a2 12 a2

2

+ yb2 = 1 + b32 = 1 → 4b2 + 3a2 = a2 b2 + b22 = 1 → 8b2 + 2a2 = a2 b2 + b12 = 1 → 12b2 + a2 = a2 b2 −4b2 + a2 = 0 → a2 = 4b2 12b2 + 4b2 = 4b4 → 16b2 = 4b4 → 4 = b2 → a2 = 16 However, a proof must be a sequence of true sentences that form a logical argument. Proof for Example 2.2. Observe that √ ( 3)2 22 + = 1, 16√ 4 √ (2 2)2 (− 2)2 16√ + 4 2 (−2 3)2 + 14 = 16

= 1, and 1.

√ √ √ √ Hence, each of the points (2, 3), (2 2, − 2), and (−2 3, 1) satisfies the equa2 2 tion x16 + y4 = 1 of an ellipse centered at the origin. Existence Proofs:

Proofs of existential statements.

Example. Show: There exist integers x and y such that 9x + 16y = 1. Proof. Let x = −7 and y = 4. Observe that 9(−7) + 16(4) = 1. Example. Show: There is a set A such that |P(A)| = 4. Proof. Let A = {1, 2}. Observe that P(A) = {∅, {1}, {2}, {1, 2}}. Thus, |P(A)| = 4. Counterexamples:

Disproofs of universal statements.

Example. Disprove: ∀ n ∈ Z, n2 − 5n + 4 ≥ 0. Counterexample. Let n = 2. Observe that 22 − 5(2) + 4 = −2 < 0. Hence, n2 − 5n + 4 6≥ 0.

46 Exhaustive Proofs:

CHAPTER 2. LECTURE NOTES Proofs of universal statements with small universes.

Example. Show: ∀ n ∈ {1, 2, 3, 4}, n2 − 5n + 4 ≤ 0. Proof. Observe that 12 − 5(1) + 4 = 0 ≤ 0, 22 − 5(2) + 4 = −2 ≤ 0, 32 − 5(3) + 4 = −2 ≤ 0, and 42 − 5(4) + 4 = 0 ≤ 0.

2.2. CHAPTER 2

47

Section 2.2: General Demonstration (Part 1) We use the Principle of Generalization to prove universal statements. Example. Show: ∀ n ∈ N, (n + 1)2 ∈ Z+ . Proof. Let n ∈ N (be arbitrary). So n ∈ Z and n ≥ 0. Hence, n + 1 ≥ 1. It follows that (n + 1)2 ≥ 12 = 1 > 0. Therefore, (n + 1)2 ∈ Z+ . Note the free use of properties listed in Appendix A. If-Then Statements: Example. Show: ∀ x ∈ R, if x > 1 then 2 − 3x < 0. Proof. Suppose (x ∈ R and) x > 1. So −3x < −3. Hence, 2 − 3x < 2 − 3 = −1 < 0. Example. Show: For all real functions f , if f is bounded above, then f + 100 is bounded above. Proof. Suppose (the real function) f is bounded above. So we have M ∈ R such that ∀ x ∈ R, f (x) ≤ M . Observe that M + 100 ∈ R and ∀ x ∈ R, (f + 100)(x) = f (x) + 100 ≤ M + 100. That is, f + 100 is bounded above. Subsets: Recall that S ⊆ T iff ∀ x ∈ U, x ∈ S → x ∈ T . Example. Show: For all sets A and B, A \ B ⊆ A. Proof. Let A and B be sets. Suppose x ∈ A \ B. So x ∈ A and x 6∈ B. In particular, x ∈ A. (Hence, A \ B ⊆ A.) Example. Let S, A, and B be sets. Show: If S ⊆ A, then S ⊆ A ∪ B.

48

CHAPTER 2. LECTURE NOTES

Proof. Suppose S ⊆ A. (Goal: S ⊆ A ∪ B.) Suppose x ∈ S. So x ∈ A. Hence, x ∈ A ∪ B. Therefore, S ⊆ A ∪ B. Set Equalities: Recall that S = T

iff ∀ x ∈ U, (x ∈ S ↔ x ∈ T ) .

Example. Let A and B be sets in some universal set U. c Show: (Ac \ B) = A ∪ B. Proof. Let x ∈ U. We have the following string of logical equivalences. c

x ∈ (Ac \ B)

c



¬(x ∈ Ac \ B)



¬(x ∈ Ac ∧ x 6∈ B)



¬(x ∈ Ac ) ∨ ¬(x 6∈ B)



x 6∈ Ac ∨ x ∈ B

↔ ↔

x∈A∨x∈B x ∈ A ∪ B.

Hence, x ∈ (Ac \ B) ↔ x ∈ A ∪ B.

2.2. CHAPTER 2

49

Section 2.3: General Demonstration (Part 2) Iff Statements: Recall that p ↔ q ≡ (p → q) ∧ (q → p). Example. Let f be a real function. Show: f is constant iff f + 1 is constant. Proof. (→) Suppose f is constant. So we have some c ∈ R such that ∀ x ∈ R, f (x) = c. Observe that c + 1 ∈ R and ∀ x ∈ R, (f + 1)(x) = f (x) + 1 = c + 1. Hence, f + 1 is constant. (←) Suppose f + 1 is constant. So we have some c ∈ R such that ∀ x ∈ R, (f + 1)(x) = c. Observe that c − 1 ∈ R and ∀ x ∈ R, f (x) = f (x) + 1 − 1 = (f + 1)(x) − 1 = c − 1. Hence, f is constant. Set Equalities: We have S = T ↔ (S ⊆ T ) ∧ (T ⊆ S). Example. Let A, B, C, and D be sets with D ⊆ A, B ⊆ D, and D ⊆ B ∩ C. Show: A ∩ B ∩ C = D. Proof. (⊆) Suppose x ∈ A ∩ B ∩ C. So x ∈ A, x ∈ B, and x ∈ C. In particular, x ∈ B. Since B ⊆ D, we have x ∈ D. (⊇) Suppose x ∈ D. Since D ⊆ A, we have x ∈ A. Since D ⊆ B ∩ C, we have x ∈ B ∩ C. Hence, x ∈ B and x ∈ C. Since x ∈ A, x ∈ B, and x ∈ C, we have x ∈ A ∩ B ∩ C. Sets with Particular Forms: Recall that S × T = {(x, y) : x ∈ S and x ∈ T }. Example. Let A, B, and C be sets. Show: A × B ⊆ A × (B ∪ C). Proof. Suppose (x, y) ∈ A × B. That is, x ∈ A and y ∈ B. Since y ∈ B, we have y ∈ B ∪ C. Hence, (x, y) ∈ A × (B ∪ C). Recall that P(T ) = {S : S ⊆ T }.

50 Example. Let A and B be sets. Show: P(A \ B) ⊆ P(B c ). Proof. Suppose S ∈ P(A \ B). That is, S ⊆ A \ B. (Goal: S ⊆ B c .) Suppose x ∈ S. So x ∈ A \ B. That is, x ∈ A and x 6∈ B. In particular, x ∈ B c . We see that S ⊆ B c . That is, S ∈ P(B c ).

CHAPTER 2. LECTURE NOTES

2.2. CHAPTER 2

51

Section 2.4: Indirect Arguments Proof by Contradiction: Recall the valid argument form from Example 1.49. ¬p → f ∴ p Example. Show: [−1, 1) has no largest element. Proof. Suppose not. (That is, [−1, 1) has a largest element.) Let b be the largest element of [−1, 1). Hence, −1 ≤ b < 1. So −2 ≤ b + b < b + 1 < 2. Thus, −1 ≤ b < b+1 2 < 1. b+1 That is, 2 ∈ [−1, 1) and b+1 2 is larger than b. This is a contradiction. Example (Example 2.26(a)). Let A be a set. Show: A ∩ Ac = ∅. Proof. Suppose not. (That is, A ∩ Ac 6= ∅.) Since A ∩ Ac is not empty, there is some element x ∈ A ∩ Ac . Hence, x ∈ A and x ∈ Ac . That is, x ∈ A and x 6∈ A. This is a contradiction. Example. Show: S = { 21k : k ∈ Z} is infinite. Proof. Suppose not. (That is, S is finite.) So S has cardinality n ∈ N. 1 is a list of n + 1 different elements of S. However, 12 , 212 , . . . , 21n , 2n+1 This contradicts that |S| = n. Proving the Contrapositive: Recall that p → q ≡ ¬q → ¬p. Example 2.3. Let x ∈ R. Show: If x2 6= 0, then x 6= 0. Note the contrapositive: If x = 0, then x2 = 0. Proof for Example 2.3. Suppose x = 0. Hence, x2 = 02 = 0. Example (The Square Function is Nondecreasing.). Let x, y ∈ [0, ∞). √ Root √ Show: If x ≤ y, then x ≤ y.

52

CHAPTER 2. LECTURE NOTES

√ √ Proof. Suppose √ √ x >√ y. √ √ √ Hence, x = x x > x y > y y = y. That is, x > y. Example. Let A be a set. Show: If A × {1, 2, 3} is infinite, then A is infinite. Proof. Suppose A is finite. Let n = |A| and write A = {a1 , a2 , . . . , an }. Observe that A × {1, 2, 3} = {(a1 , 1), (a2 , 1), · · · , (an , 1), (a1 , 2), (a2 , 2), · · · , (an , 2), (a1 , 3), (a2 , 3), · · · , (an , 3)} has 3n elements. Thus, A × {1, 2, 3} is finite.

2.2. CHAPTER 2

53

Section 2.5: Splitting into Cases Example. Let A, B, and C be sets with B ⊆ C. Show: A ∪ B ⊆ A ∪ C. Proof. Suppose x ∈ A ∪ B. So x ∈ A or x ∈ B. Case 1 : x ∈ A. Hence, x ∈ A ∪ C. Case 2 : x ∈ B. Since B ⊆ C, we have x ∈ C. Hence, x ∈ A ∪ C. In both cases, x ∈ A ∪ C, as desired. Recall that ∀ y ∈ R,

(

if y ≥ 0, if y < 0. ( x − 1 if x ≥ 1, Example. Let x ∈ R. Show: |x − 1| = 1 − x if x < 1. |y| =

y −y

Proof. Case 1 : x ≥ 1. So x − 1 ≥ 0. Case 2 : x < 1. So x − 1 < 0. Hence, |x − 1| = −(x − 1) = 1 − x. In each case, the desired result is achieved. Example (Example 2.36). Let A, B, and C be sets. Show: A \ C ⊆ (A \ B) ∪ (B \ C). Proof. Suppose x ∈ A \ C. So, x ∈ A and x 6∈ C. Case 1 : x ∈ B. Since x 6∈ C, we have x ∈ B \ C. Hence, x ∈ (A \ B) ∪ (B \ C). Case 2 : x 6∈ B. Since x ∈ A, we have x ∈ A \ B. Hence, x ∈ (A \ B) ∪ (B \ C). In both cases, x ∈ (A \ B) ∪ (B \ C).

54

CHAPTER 2. LECTURE NOTES

2.3

Chapter 3

Section 3.1: Divisors Parity: Definition. Let n ∈ Z. (a) n is even if n = 2k for some k ∈ Z, and (b) n is odd if n = 2k + 1 for some k ∈ Z. Example. Show that the difference between any two odd integers is even. Proof. Suppose m and n are odd integers. So m = 2j + 1 and n = 2k + 1 for some j, k ∈ Z. Observe that m − n = (2j + 1) − (2k + 1) = 2j − 2k = 2(j − k). and j − k ∈ Z. Hence, m − n is even. Example (Example 3.2). Let n ∈ Z. Show: If n2 is odd, then n is odd. Proof attempt. Suppose n2 is odd. So n2 = 2k + √ 1 for some k ∈ Z. Hence, n = ± 2k + 1?? Proof. Suppose n is not odd. That is, n is even. So n = 2k for some k ∈ Z. Hence, n2 = 4k 2 = 2(2k 2 ). Since 2k 2 ∈ Z, n2 is even. That is, n2 is not odd. Divisors: Definition. Let d, n ∈ Z. We say d divides n, written d | n, if n = dk for some k ∈ Z. (Equivalently, n is divisible by d, n is a multiple of d, d is a divisor of n, and d is a factor of n.) When d does not divide n, we write d - n. Example. Show: ∀ n ∈ Z, (n + 1) | (n3 + 1). Proof. Let n ∈ Z. Observe that n3 + 1 = (n + 1)(n2 − n + 1) and n2 − n + 1 ∈ Z. Example (Example 3.4: Transitivity of |). Let a, b, and c be integers. Show: If a | b and b | c, then a | c.

2.3. CHAPTER 3

55

Proof. Suppose a | b and b | c. So b = ak and c = bl for some k, l ∈ Z. Observe that c = bl = akl = a(kl) and kl ∈ Z. Hence, a | c. Theorem (Theorem 3.1). Let a, b ∈ Z with b > 0. If a | b, then a ≤ b. Proof. Suppose a | b. So b = ak for some k ∈ Z. Case 1 : a ≤ 0. Since a ≤ 0 < b, we have a ≤ b. Case 2 : a > 0. Since ak = b > 0, it must be that k > 0. Since k ∈ Z, we have 1 ≤ k. Hence, a = a · 1 ≤ a · k = b. In both cases, a ≤ b. Definition. An integer p is prime if p > 1 and the only positive divisors of p are 1 and p. An integer n > 1 that is not prime is composite. Primes: 2, 3, 5, 7, 11, 13, 17, 19, . . .. Composites: 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, . . .. Proposition. An integer n > 1 is composite iff ∃ r, s ∈ Z such that r > 1, s > 1, and rs = n. Definition. Given integers m and n not both zero, their greatest common divisor, denoted gcd(m, n), is the unique integer d such that (i) d > 0, (ii) d | m and d | n (i.e. d is a common divisor of m and n), and (iii) ∀ c ∈ Z+ , if c | m and c | n, then c ≤ d. Example.

(a) gcd(105, 45) = 15.

(b) gcd(−48, 42) = 6. (c) gcd(77, −20) = 1. (d) gcd(25 32 74 198 , 23 35 132 196 ) = 23 32 196 . (e) gcd(−65, 0) = 65. (f) gcd(11, 121) = 11. (g) gcd(11, 120) = 1.

56

CHAPTER 2. LECTURE NOTES

Definition. Two integers m and n are relatively prime if gcd(m, n) = 1. Example. 77 and −20 are relatively prime. Lemma (Lemma 3.3). ∀ n ∈ Z, n and n + 1 are relatively prime. Proof. We show that gcd(n, n + 1) = 1. (i) 1 > 0. (ii) 1 | n and 1 | (n + 1). (iii) Suppose c ∈ Z+ and c | n and c | (n + 1). So n = ck and n + 1 = cl for some k, l ∈ Z. Hence, 1 = (n + 1) − n = cl − ck = c(l − k). That is, c | 1, and therefore c ≤ 1.

2.3. CHAPTER 3

57

Section 3.2: Consequences of Well-Ordering Theorem (Well-Ordering Principle for the Integers). Each nonempty subset of N has a smallest element. Example. Find the smallest element of S = {s : s = 30x + 21y > 0 for some x, y ∈ Z}. Solution. 3. Note 3 = 30(−2) + 21(3) ∈ S, and Every element of S is a multiple of 3. Namely, 3(10x + 7y). Theorem (Theorem 3.5). Every integer greater than 1 has a prime divisor. Assign as reading the proof of Theorem 3.5, which uses the Well-Ordering Principle. Theorem (Theorem 3.6). There are infinitely many primes. Proof. Suppose not. Let p1 , p2 , . . . , pm be all of the primes. Let n = p1 · p2 · · · · · pm . By Theorem 3.5, n + 1 has a prime divisor, and it must be some pk from the list. However, n is divisible by pk . So the relatively prime integers n and n + 1 have the factor pk > 1 in common. This is a contradiction. The Great Internet Mersenne Prime Search (GIMPS) has a website that keeps track of the current largest known prime. Integer Division: Example. An elementary school student might say that 115 ÷ 7 gives 16 remainder 3. 1 6 7 ) 1 1 5 7 4 5 - 4 2 3 Theorem (Division Algorithm). Given any n ∈ Z and d ∈ Z+ , there exist a unique quotient q and a unique remainder r such that (i) n = dq + r, and (ii) 0 ≤ r < d. We write n div d = q and n mod d = r.

58

CHAPTER 2. LECTURE NOTES

Example.

(a) 115 div 7 = 16 and 115 mod 7 = 3.

(b) 48 div 5 = 9 and 48 mod 5 = 3. (c) −48 div 5 = −10 and −48 mod 5 = 2. Example. Show: ∀ n ∈ Z, 3 - (n3 − n + 5). Proof. Let n ∈ Z. By the Division Algorithm, n must be of the form 3k, 3k + 1, or 3k + 2, for some k ∈ Z. Case 0 : n = 3k. n3 − n + 5 = 27k 3 − 3k + 5 = 3(9k 3 − k + 1) + 2. Case 1 : n = 3k + 1. n3 − n + 5 = 27k 3 + 27k 2 + 9k + 1 − 3k − 1 + 5 = 3(9k 3 + 9k 2 + 2k + 1) + 2. Case 2 : n = 3k + 2. n3 − n + 5 = 27k 3 + 54k 2 + 36k + 8 − 3k − 2 + 5 = 3(9k 3 + 18k 2 + 11k + 3) + 2. In each case, (n3 − n + 5) mod 3 6= 0. Definition. Let x ∈ R. (a) Its floor bxc is the largest integer n ≤ x. (b) Its ceiling dxe is the smallest integer n ≥ x. Example.

(a) b12.9c = 12.

(b) b−8.2c = −9. (c) d12.9e = 13. (d) d−8.2e = −8. Theorem (Theorem 3.12). Given any n, d ∈ Z with d > 0, b nd c = n div d. Proof. Let n, d ∈ Z with d > 0. By the Division Algorithm, n = dq + r, for some q, r ∈ Z with 0 ≤ r < d. Observe that q = nd − dr ≤ nd < nd + d−r d = q + 1. Therefore, b nd c = q = n div d. Applications: Example (Check Digit Formulas). (a) A Universal Product Code (UPC) number d1

d2

d3

d4

d5

d6

d7

d8

d9

d10

d11

d12

is attached to all products available for sale. The check digit d12 is determined by the requirement that [3(d1 +d3 +d5 +d7 +d9 +d11 )+d2 +d4 +d6 +d8 +d10 +d12 ] mod 10 = 0. For example, the UPC number for a 14 oz. box of Kellogg’s Corn Pops is

2.3. CHAPTER 3

59 0 38000 01011 8.

(b) An International Standard Book Number (ISBN-10) d1

− d2

d3

d4



d5

d6

d7

d8

d9

− d10

is attached to each book published. Its check digit d10 is determined by the requirement that [10d1 +9d2 +8d3 +7d4 +6d5 +5d6 +4d7 +3d8 +2d9 +d10 ] mod 11 = 0. For example, the ISBN-10 for Cider House Rules by John Irving is 0-345-38765-1. The ISBN for Jane Eyre by Charlotte Bront¨e is 0-671-45319-X, where X is used to represent the value 10. Example. Find the value of the digit d in the ISBN-10 reading 0-345-361d9-2. Solution. Through exhaustive trial and error we find that d = 7. The book is A Prayer for Owen Meany by John Irving. Example (Binary Linear Code from Example 3.18). A message b1 b2 b3 is converted to a code word b1 b2 b3 b4 b5 b6 by the formulas b4

=

(b1 + b2 ) mod 2

b5

=

(b1 + b3 ) mod 2

b6

=

(b1 + b2 + b3 ) mod 2

yielding the following binary linear code. Message 000 001 010 011 100 101 110 111

Code Word 000000 001011 010101 011110 100111 101100 110010 111001

Definition. (a) The weight of a binary linear code is the minimum number of ones that appear in a nonzero code word. (b) Nearest neighbor decoding decodes a string c1 c2 · · · cn to the message associated with the code word differing from it in the least number of digits.

60

CHAPTER 2. LECTURE NOTES

Proposition. For a binary linear code of weight w, nearest neighbor decoding can decode a received string with up to b w−1 2 c erroneous digits. Example. For the binary linear code in Example 3.18, (a) the weight is 3. (b) up to 1 erroneous digit can be corrected in a received string. (c) the received string 111010 is closest to the code word 110010 and would be decoded to the message 110.

2.3. CHAPTER 3

61

Section 3.3: Euclid’s Algorithm and Lemma Theorem. If m, n ∈ Z are not both zero, then there exist integers x and y such that gcd(m, n) = mx + ny. Assign as reading this proof, which uses the Well-Ordering Principle. Example 2.4. gcd(30, 21) = 3 and 3 = 30(5) + 21(−7). Corollary. Two integers m and n are relatively prime iff there exist integers x and y such that mx + ny = 1. Example. ∀ n ∈ Z, n and n + 1 are relatively prime, since n(−1) + (n + 1)(1) = 1. That is, x = −1 and y = 1. Euclid’s Algorith (for finding gcd’s): (1) ∀ k ∈ Z+ , gcd(k, 0) = k. (2) Given n ≥ m > 0. Let n = mq + r, where q = n div m and r = n mod m. Then gcd(n, m) = gcd(m, r). Repeat until (1) suffices. Assign proofs as reading. Example. Compute gcd(75, 45). gcd(75, 45)

= gcd(45, 30) = gcd(30, 15) = gcd(15, 0) = 15

since 75 = (45)1 + 30 since 45 = (30)1 + 15 since 30 = (15)2 + 0 by Step (1).

Example. Compute gcd(30, 21), and write it as 30x + 21y for some x, y ∈ Z. gcd(30, 21)

= gcd(21, 9) = gcd(9, 3) = gcd(3, 0) = 3

since 30 = (21)1 + 9 since 21 = (9)2 + 3 since 9 = (3)3 + 0 by Step (1).

So 3 = 21 − (9)2 = 21 − (30 − 21)2 = (30)(−2) + (21)(3). That is, x = −2 and y = 3. Note that these are different from the x and y presented in Example 2.4. Example. Compute gcd(90, 66), and write it as 90x + 66y for some x, y ∈ Z. gcd(90, 66)

= = = = =

gcd(66, 24) gcd(24, 18) gcd(18, 6) gcd(6, 0) 6

since 90 = (66)1 + 24 since 66 = (24)2 + 18 since 24 = (18)1 + 6 since 18 = (6)3 + 0 by Step (1).

So 6 = 24 − (18) = 24 − (66 − (24)2) = (66)(−1) + (24)(3) = (66)(−1) + (90 − 66)(3) = (90)(3) + (66)(−4). That is, x = 3 and y = −4.

62

CHAPTER 2. LECTURE NOTES

Theorem (Euclid’s Lemma). Let m, n, and c be integers. If c | mn and gcd(c, m) = 1, then c | n. Proof. Suppose c | mn and gcd(c, m) = 1. So, mn = ck for some k ∈ Z. Hence, cx + my = 1 for some x, y ∈ Z. Observe that n = (cx + my)n = cnx + mny = cnx + cky = c(nx + ky). Therefore, c | n. Note that the relatively prime condition is important, since 4 | (6 · 10), but 4 - 6 and 4 - 10. Corollary (Corollary 3.17). Let m, n, p ∈ Z with p prime. If p | mn, then p | m or p | n.

2.3. CHAPTER 3

63

Section 3.4: Rational and Irrational Numbers Definition. r ∈ R is said to be rational if r = b 6= 0.

a b

for some integers a and b with

Q is the set of rational numbers. Example. Examples of rational numbers. (a)

9 14 .

(b)

−7 3 .

(c) 25 =

25 1 .

(d) 3.78 =

378 100 .

(e) 20.836 =

1146 45 .

How? Let x = 20.836. So 10x = 208.36. So 1000x = 20836.36. So 990x = 1000x − 10x = 20836.36 − 208.36 = 20836 − 208 = 20628. 1146 So x = 20628 990 = 45 . Note that Z ⊆ Q ⊆ R. Example. Let r, s ∈ Q. Show: Proof. We have r = s So 2r−s = 2r 3 3 − 3 =

a b and s 2a c 3b − 3d

= =

2r−s 3

∈ Q.

c d for some a, b, c, d ∈ Z with 6ad−3bc 9bd , and 9bd ∈ Z \ {0}.

b, d 6= 0.

Theorem (Theorem 3.21: Properties of Q). Let r, s ∈ Q. Then, (a) 0, 1 ∈ Q. (b) r + s ∈ Q. (c) −s ∈ Q. (d) rs ∈ Q. (e) if s 6= 0, then

1 s

∈ Q.

The proof is left for the reading and the exercises. Theorem (Theorem 3.22). Given r ∈ Q, there exist unique a, b ∈ Z such that b > 0, gcd(a, b) = 1, and r = ab . That is, ab expresses r in lowest terms. The proof is left for the reading.

64

CHAPTER 2. LECTURE NOTES

Theorem (Theorem 3.23). A real number in decimal form represents a rational number iff the decimal part is finite or repeating. Of course, given integers a and b with b 6= 0, evaluating easily provides its decimal form.

a b

via long division

Definition. Numbers in R \ Q are said to be irrational. Note: We will not use Theorem 3.23 to prove that a real number is irrational. √ Theorem. 2 is irrational. Proof. Suppose not. √ Hence, we can write 2 = ab in lowest terms. √ We have a = 2b. So a2 = 2b2 . That is, a2 is divisible by 2. Thus, a is divisible by 2. That is, a = 2k for some k ∈ Z. It follows that 2b2 = a2 = 4k 2 . So b2 = 2k 2 . Since b2 is divisible by 2, it follows that b is divisible by 2. The fact that both a and b are divisible by 2 contradicts the fact that supposed to be in lowest terms. √ Example. Show that 4 − 3 2 is irrational.

a b

was

Proof. Suppose √ not. So r = 4 √ − 3 2 is rational. Hence, 3 2√= 4 − r. Therefore, 2 = 4−r 3 ∈ Q. This is a contradiction. Example. Show that log2 15 is irrational. Proof. Suppose not. That is, log2 15 = ab for some a, b ∈ Z with b > 0. Since log2 15 > 0, it follows that a > 0. a By the definition of logarithms, 2 b = 15. Raising both sides of this equation to the power b gives 2a = 15b = 3b 5b . Since a > 0, we see that 2 | 3b 5b . This is a contradiction. Theorem (Rational Roots Theorem). Let n ∈ Z+ and f (x) = cn xn + cn−1 xn−1 + · · · + c0 , where cn , cn−1 , . . . , c0 ∈ Z with cn 6= 0. If r ∈ Q and f (r) = 0, then r = ab for a, b ∈ Z with a | c0 and b | cn . Example. Show that f (x) = x6 − 6x4 − 4x3 + 12x2 − 24x − 4 has no rational roots.

2.3. CHAPTER 3

65

Proof. By the Rational Roots Theorem, the only possible rational roots are ± 11 , ± 21 , and ± 41 . However, f (1) = −25 6= 0, f (−1) = 31 6= 0, f (2) = −68 6= 0, f (−2) = 92 6= 0, f (4) = 2396 6= 0, and f (−4) = 3100 6= 0. √ √ Example. Show that 3 2 − 2 is irrational. √ √ Sketch. √Let x√ = 3 2 − 2. So x + 2√= 3 2. √ So x3 + 3 2x2 + 6x + 2 2 =√2.. So x3 + 6x − 2 = (−3x2 − 2) 2. So x6 + 12x4 − 4x3 + 36x2 − 24x + 4 = 18x4 + 24x2 + 8. So x6 − 6x4 − 4x3 + 12x2 − 24x − 4 = 0. 4 3 2 Proof. Let f (x) √ = x6 − √6x − 4x + 12x − 24x − 4. 3 Observe that f ( 2 − 2) = 0. By the√previous √ example, f has no rational roots. Since 3 2 − 2 is a root of f , it is not rational. p √ 3 Example. Show that 4 − 11 is irrational. p √ 3 Sketch. Let x√= 4 − 11. So x3 = 4 − √ 11. So x3 − 4 = − 11. So x6 − 8x3 + 16 = 11. So x6 − 8x3 + 5 = 0.

Proof. Let f (x) p = x6 − 8x3 + 5. √ 3 Observe that f ( 4 − 11) = 0. By the Rational Roots Theorem, the only possible rational roots of f are ±1 and ±5. However, f (1) = −2, f (−1) = 14, f (5) = 14630, and f (−5) = 16630. Hence,pf has no rational roots. √ 3 Since 4 − 11 is a root of f , it must be irrational.

66

CHAPTER 2. LECTURE NOTES

Section 3.5: Modular Arithmetic Clock Arithmetic Example. What time is it (a) 16 hours after 5 o’clock? Ans: 9 o’clock. (b) 80 hours after 2 o’clock? Ans: 10 o’clock. Example. Assume today is Monday. What day of the week will it be (a) 8 days from now? Ans: Tuesday. (b) 40 days from now? Ans: Saturday. Definition. Given a, b, n ∈ Z with n > 1, we say a is congruent to b modulo n, written a ≡ b (mod n), if n | (a − b). i.e. a = b + kn for some k ∈ Z. Example.

(a) 16 ≡ 4 (mod 12).

(b) 80 ≡ 8 (mod 12). Also, 80 ≡ −4 (mod 12). (c) 8 ≡ 1 (mod 7). (d) 40 ≡ 5 (mod 7). Also, 40 ≡ −2 (mod 7). Theorem (Properties of ≡). Let a, b, c, n ∈ Z with n > 1. (a) a ≡ a (mod n). (b) If a ≡ b (mod n), then b ≡ a (mod n). (c) If a ≡ b (mod n) and b ≡ c (mod n), then a ≡ c (mod n). Theorem (Arithmetic Properties). Let a1 , a2 , b1 , b2 , n ∈ Z with n > 1. Suppose a1 ≡ a2 (mod n) and b1 ≡ b2 (mod n). Then, (a) a1 + b1 ≡ a2 + b2 (mod n). (b) a1 b1 ≡ a2 b2 (mod n). (c) If m ∈ Z, then ma1 ≡ ma2 (mod n). m (d) If m ∈ N, then am 1 ≡ a2 (mod n).

Example. Since 10 ≡ −2 (mod 12), (a) 1010 ≡ (−2)10 ≡ 1024 ≡ 4 (mod 12). (b) So 1010 + 9 ≡ 4 + 9 ≡ 13 ≡ 1 (mod 12). Lemma. Given n, d ∈ Z with d > 1, we have n mod d ≡ n (mod d), and n mod d is the unique integer in {0, 1, . . . , d−1} congruent to n modulo d.

2.3. CHAPTER 3

67

Example. By part (a) from the previous example, 1010 mod 12 = 4. Example 2.5. Compute 923 mod 731. Solution. Note that 93 ≡ 729 ≡ −2 (mod 731). So 923 ≡ (93 )7 92 ≡ (−2)7 92 ≡ −128 · 81 ≡ −10368 (mod 731). Hence, 923 mod 731 = −10368 mod 731 = 597. Definition. Given a, n ∈ Z with n > 1, a multiplicative inverse of a modulo n is a c ∈ Z such that ac ≡ 1 (mod n). Example. Observe that 10 and 19 are multiplicative inverses of each other modulo 27, since 10 · 19 ≡ 190 ≡ 1 (mod 27). Given n ∈ Z with n > 1, an integer a has a multiplicative inverse modulo n iff gcd(a, n) = 1. One can be found by solving ac + ny = 1 for c, y ∈ Z and taking c, since 1 − ac = ny. Example 2.6. Find a multiplicative inverse of 23 modulo 336. Solution. We can solve 23c + 336y = 1. Euclid’s Extended Algorithm gives 23(−73) + 336(5) = 1. Hence c = −73 is a multiplicative inverse. Since −73 ≡ 263 (mod 336), 263 is another multiplicative inverse, that happens to be positive. Applications: First, realize that letters can be represented by numbers. 0

A 1

B 2

C 3

D 4

E 5

F 6

G 7

H 8

I 9

J 10

K 11

L 12

M 13

N 14

O 15

P 16

Q 17

R 18

S 19

T 20

U 21

V 22

W 23

X 24

Y 25

Z 26

Example (Linear Ciphers). Integers a and b with gcd(a, 27) = 1 determine a linear cipher, which converts a “letter” x to a “letter y by the formula y = (ax + b) mod 27. When a = 1, it is called a shift cipher. Deciphering is then accomplished by the formula x = c(y − b) mod 27, where c is a multiplicative inverse of a modulo 27.

68

CHAPTER 2. LECTURE NOTES (a) Given a = 10 and b = 3, the message ATM is enciphered as MNY. (b) Using c = 19 as the inverse of 10 modulo 27, the received message BRN is deciphered as HOT.

Example (RSA Encryption). Given large primes p and q, let n = pq. Let m = gcd(p − 1, q − 1). Let a be relatively prime to m. Let c be a multiplicative inverse of a modulo m. A message x is encrypted to y via the formula y = xa mod n. Decryption of y to x is then accomplished by the forumla x = y c mod n. For example, let p = 17 and q = 43. So n = 731 and m = gcd(16, 42) = 336. Let a = 23 and c = 263. (See Example 2.6.) (a) Encrypt x = 9. y = 923 mod 731 = 597, from Example 2.5. (b) Decrypt y = 597. x = 597263 mod 731 = 9. This can be seen by exploiting 5975 ≡ 100 (mod 731) and hence 59715 ≡ −8 (mod 731). Higher-Level Pursuits: Theorem (Fermat’s Little Theorem). If p is a prime, a ∈ Z, and p - a, then ap−1 ≡ 1 (mod p). Example. Compute 64340 mod 19. Solution. By Fermat’s Little Theorem, 618 ≡ 1 (mod 19). Note that 4340 = 18(241) + 2. So 64340 ≡ 62 ≡ 36 ≡ 17 (mod 19). Hence, 64340 mod 19 = 17. Let n > 1 be an integer. For each a ∈ Z, let [a]n = {k : k ∈ Z and k ≡ a (mod n)}, the equivalence class of a modulo n. Then let Zn = {[a]n : a ∈ Z}. Example. Z4 = {[0]4 , [1]4 , [2]4 , [3]4 }. For each a, b ∈ Z, let [a]n + [b]n = [a + b]n and −[a]n = [−a]n . As a consequence of the arithmetic properties of congruence modulo n, the set Zn , together with this operation of addition (and the understanding of negatives), forms a group, called the additive group of integers modulo n. This notion is considered in Section 7.4.

2.3. CHAPTER 3

69

Example. Let n = 4. Following conventions, we abbreviate [a]4 by just [a]. The addition table for Z4 = {[0], [1], [2], [3]} is as follows. + [0] [1] [2] [3]

[0] [0] [1] [2] [3]

[1] [1] [2] [3] [0]

[2] [2] [3] [0] [1]

[3] [3] [0] [1] [2]

70

CHAPTER 2. LECTURE NOTES

2.4

Chapter 4

Section 4.1: Sequences, Indexing, and Recursion Notation Definition (Factorials). For n ∈ Z+ , n! = n(n − 1) · · · 2 · 1. Further, 0! = 1. Example.

(a) 1! = 1.

(b) 3! = 3 · 2 · 1 = 6. (c) 5! = 5 · 4 · 3! = 20 · 6 = 120. Definition (Binomial Coefficients). For integers n ≥ k ≥ 0,  The notation nk is read “n choose k”.  5! Example. (a) 52 = 2!3! = 5·4 2 = 10.  5! (b) 53 = 3!2! = 10.  7! (c) 70 = 0!7! = 1.

n k



=

n! k!(n−k)! .

Sequences A sequence {sn } is an ordered list of real numbers. We consider some examples. 2, 9, 16, 23, 30, . . .

(2.1)

2π, 6π, 18π, 54π, 162π, . . .

(2.2)

1, −3, 6, −10, 15, −21, . . .

(2.3)

4, 5, −100, 3, 17, −8, −315, . . .

(2.4)

Can you see patterns in the sequences above? What is the next term? What is the general term? We explore special types of sequences. An arithmetic sequence {sn } is determined by a starting value s0 and a common difference c, so that ∀ n ≥ 0, sn = s0 + cn. E.g. (2.1) ∀ n ≥ 0, sn = 2 + 7n. A geometric sequence {sn } is determined by a starting value s0 and a multiplying factor r, so that ∀ n ≥ 0, sn = s0 rn . E.g. (2.2) ∀ n ≥ 0, sn = 2π · 3n .

2.4. CHAPTER 4

71

An alternating sequence is a sequence whose terms alternate in sign. E.g. (2.3) ∀ n ≥ 2, sn = (−1)n

n 2



.

Note that the factor (−1)n gives the alternation of sign in the formula. A sequence with no pattern, such as (2.4), is a random sequence. However, we focus on sequences with patterns. The formulas given for sequences (2.1), (2.2), and (2.3) are all closed formulas. That is, they express each value sn in terms of n. Reindexing Example. Let {sn }n≥2 be defined by the formula ∀ n ≥ 2, sn = 4 + 3 · 2n . Reindex the formula so that the indexing starts at 0 (and not 2). Solution. Let m = n − 2. So n = m + 2. Hence, 4 + 3 · 2n = 4 + 3 · 2m+2 = 4 + 3 · 22 · 2m = 4(1 + 3 · 2m ). That is, ∀ n ≥ 0, tn = 4(1 + 3 · 2n ) generates the same sequence of values 16, 28, 52, . . .. Recursion A recursive formula for a sequence {sn } specifies each value sn not only in terms of n (if at all) but also in terms of previous values in the sequence. Example (Arithmetic sequence (2.1)). s0 = 2, ← initial condition ∀ n ≥ 1, sn = sn−1 + 7. ← recurrence relation Example (Geometric sequence (2.2)). s0 = 2π, ∀ n ≥ 1, sn = 3sn−1 . Example (The Fibonacci sequence {Fn }). F0 = 1 and F1 = 1, ← initial conditions ∀ n ≥ 2, Fn = Fn−2 + Fn−1 . ← recurrence relation It is the sequence 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, . . ..

72

CHAPTER 2. LECTURE NOTES

Section 4.2: Sigma Notation Given a sequence s0 , s1 , s2 , . . ., we write b X

si = sa + sa+1 + · · · + sb .

i=a

Example.

4 X

2i = 20 + 21 + 22 + 23 + 24 = 31.

i=0

Example. 4 + 9 + 16 + 25 + 36 + 49 =

7 X

i2 .

i=2 +

Example. For any n ∈ Z , n X

i3 = 1 + 8 + 27 + · · · + n3 .

i=1

Some (Sum) Formulas

Let n ∈ Z+ . n X

1

=

n

(2.5)

i

=

n(n + 1) 2

(2.6)

i2

=

i=1 n X i=1 n X i=1 n X

∀ r 6= 1,

i=1 n X

i3 ri

i=0

n(n + 1)(2n + 1) 6  2 n(n + 1) = 2 =

rn+1 − 1 r−1

(2.7) (2.8) (2.9)

Note that the sum in (2.9) starts at i = 0. The proofs of (2.5) through (2.9) are saved until Section 4.4, after induction is introduced. Instead, we focus here on using the results. Example. Compute

n X

(3i + 7).

i=1

Note that we can use the obvious associativity and distributivity Pproperties Pn Pn n of sums stated in Theorem 4.1, such as (s + t ) = s + i i=1 i i=1 ti and i=1 i Pn Pn cs = c s . i i=1 i i=1

2.4. CHAPTER 4

73

Solution. n X

(3i + 7)

n X

=

i=1

3i +

i=1 n X

=

3

n X

i+7

i=1

3

=

n X

1

i=1

n(n + 1) + 7n 2 3n2 + 17n . 2

=

Example. Compute

7

i=1 n X

4i .

i=2

Note that this sum does not start at i = 0. Solution 1. n X

4i

=

i=2

n X

4i −

1 X

i=0 n+1

= = =

4i

i=0

−1 − (1 + 4) 4−1 4n+1 − 1 15 − 3 3 4n+1 − 16 . 3 4

Solution 2. Let j = i − 2. So i = j + 2. n X

4i

=

i=2

n−2 X

4j+2

j=0

=

42

n−2 X

4j

j=0

= =

4n−2+1 − 1 4−1 4n+1 − 16 . 3

42

74

CHAPTER 2. LECTURE NOTES Similar to summation notation, we have product notation b Y

si = sa · sa+1 · · · · · sb .

i=a

Example.

4 Y 2i + 1 i=1

2i

=

3 5 7 9 945 315 · · · = = . 2 4 6 8 384 128

General summation formulas for sums of the form n X i=1

i4 =

Pn

n(n + 1)(2n + 1)(3n2 + 3n − 1) , 30

are discussed in the reading.

i=1

im , such as

2.4. CHAPTER 4

75

Section 4.3: Mathematical Induction, an Introduction We prove universal statements of a certain form. To Prove: ∀ n ≥ a, P (n). Method of Induction: Base case. Show: P (a) holds. (For simplicity, we assume a single base case here.) Inductive step. Show: ∀ k ≥ a, if P (k) holds, then P (k + 1) holds. That is, suppose k ≥ a and P (k) holds. ←− inductive hypothesis Then show that P (k + 1) must hold. Example. Show: ∀ n ≥ 0, (−1)2n = 1. Proof. (By induction) Base case: (n = 0) Note that (−1)2(0) = (−1)0 = 1. Inductive step: Suppose k ≥ 0 and (−1)2k = 1. (Goal: (−1)2(k+1) = 1.) Observe that (−1)2(k+1) = (−1)2k+2 = (−1)2k (−1)2 = 1 · (−1)2 = 1.

Dominoes Analogy. The base case knocks over the first domino. The inductive step says that the falling of the kth domino will knock down the (k + 1)st domino. Hence, all dominoes must fall. ... 1

2

3

4

5

... k k+1

The formal proof that induction works follows from the Well-Ordering Principle and can be assigned as reading. Example. Show: ∀ n ≥ 2, n3 > n2 + 3. Proof. (By induction) Base case: (n = 2) Note that 23 = 8 > 7 = 22 + 3. Inductive step: Suppose k ≥ 2 and k 3 > k 2 + 3.

76

CHAPTER 2. LECTURE NOTES

(Goal: (k + 1)3 > (k + 1)2 + 3.) Observe that (k + 1)3

=

(k 3 ) + 3k 2 + 3k + 1

>

(k 2 + 3) + 3k 2 + 3k + 1

=

(k 2 + 2k + 1) + (3k 2 + k + 3)

=

(k + 1)2 + (3k 2 + k + 3)

>

(k + 1)2 + 3.

Example. Show: ∀ n ≥ 0, 10 | (11n − 1). Proof. (By induction) Base case: (n = 0) Note that 110 − 1 = 0 and 10 | 0. Inductive step: Suppose k ≥ 0 and 10 | (11k − 1). That is, 11k − 1 = 10c for some c ∈ Z. (Goal: 10 | (11k+1 − 1.) Observe that 11k+1 − 1

=

11k (11) − 1

=

11k (10 + 1) − 1

=

10 · 11k + 11k − 1

=

10 · 11k + 10c

=

(by the inductive hypothesis)

k

10(11 + c).

Therefore, 10 | (11k+1 − 1). Example. Given that s0 = 2 and ∀ n ≥ 1, sn = sn−1 + 7, show: ∀ n ≥ 0, sn = 2 + 7n. Proof. (By induction) Base case: (n = 0) Observe that 2 = 2 + 7(0). Inductive step: Suppose k ≥ 0 and sk = 2 + 7k. (Goal: sk+1 = 2 + 7(k + 1).) Observe that sk+1 = sk + 7 = 2 + 7k + 7 = 2 + 7(k + 1).

2.4. CHAPTER 4

77

Section 4.4: Induction and Summations We prove Theorem 4.2(c), which was formula (2.7) in the Section 4.2 lecture. Example (Example 4.23). n X n(n + 1)(2n + 1) Show: ∀ n ≥ 1, i2 = . 6 i=1 Proof. (By Induction) Base case: (n = 1) 1 X 1(2)(3) Note that . i2 = 1 = 6 i=1 Inductive step: k X k(k + 1)(2k + 1) Suppose k ≥ 1 and . i2 = 6 i=1 (Goal:

k+1 X

i2 =

i=1

(k + 1)(k + 2)(2k + 3) (k + 1)((k + 1) + 1)(2(k + 1) + 1) = .) 6 6

Observe that k+1 X

i

2

=

i=1

k X

! 2

i

+ (k + 1)2

i=1

= = = = =

k(k + 1)(2k + 1) + (k + 1)2 (by the inductive hypothesis) 6 2 k(k + 1)(2k + 1) + 6(k + 1) 6 (k + 1)[k(2k + 1) + 6(k + 1)] 6 (k + 1)(k + 2)(2k + 3) 6 (k + 1)((k + 1) + 1)(2(k + 1) + 1) . 6

We prove a special case of Theorem 4.3 (formula (2.7) in the Section 4.2 lecture), which is proved in general in Example 4.24. Example. Show: ∀ n ≥ 0,

n X i=0

11i =

11n+1 − 1 . 10

Proof. (By Induction) Base case: (n = 0) P0 1 Note that i=0 11i = 1 = 1110−1 . Inductive step: Pk k+1 Suppose k ≥ 0 and i=0 11i = 11 10 −1 .

78

CHAPTER 2. LECTURE NOTES

Pk+1 i (Goal: i=0 11 = Observe that k+1 X

11

i

=

i=0

11k+2 −1 .) 10

k X

!

= = =

+ 11k+1

11

i=0 k+1

=

i

11

−1

10

+ 11k+1

(by the inductive hypothesis)

11k+1 − 1 + 11k+1 (10) 10 11k+1 − 1 + 11k+2 − 11k+1 10 11k+2 − 1 . 10

Example. Show: ∀ n ≥ 1,

n Y

4i = 2n(n+1) .

i=1

Proof. (By Induction) Base case: (n = 1) 1 Y 4i = 4 = 21(2) . Note that i=1

Inductive step: Suppose k ≥ 1 and

k Y

4i = 2k(k+1) .

i=1

(Goal:

k+1 Y

4i = 2(k+1)(k+2) .)

i=1

Observe that k+1 Y

i

4

k Y

=

i=1

=

! i

4k+1

4

i=1 k(k+1) k+1

2

4

k(k+1) 2(k+1)

=

2

=

2k(k+1)+2(k+1)

2

=

2(k+1)(k+2) .

2.4. CHAPTER 4

79

Section 4.5: Strong Induction To Prove: ∀ n ≥ a, P (n). Method of Strong Induction: Base cases. Show: P (a), . . . , P (b) hold. Inductive step. Show: ∀ k ≥ b, if P (a), . . . , P (k) hold, then P (k + 1) holds. That is, suppose k ≥ b and, for all a ≤ i ≤ b, P (i) holds. ←− strong inductive hypothesis Then show that P (k + 1) must hold. Example. Let {sn } be the sequence defined by s0 = 6, s1 = 2, and ∀ n ≥ 2, sn = 2sn−1 + 3sn−2 . Show: ∀ n ≥ 0, sn = 4(−1)n + 2 · 3n . Proof. (By Induction) Base cases: (n = 0, 1) Note that 6 = 4(−1)0 + 2 · 30 and 2 = 4(−1)1 + 2 · 31 . Inductive step: Suppose k ≥ 1 and, for each 0 ≤ i ≤ k, si = 4(−1)i + 2 · 3i . (Goal: sk+1 = 4(−1)k+1 + 2 · 3k+1 .) Observe that sk+1

=

2sk + 3sk−1

=

2[4(−1)k + 2 · 3k ] + 3[4(−1)k−1 + 2 · 3k−1 ]

=

8(−1)k + 4 · 3k + 12(−1)k−1 + 6 · 3k−1

=

−8(−1)k−1 + 12 · 3k−1 + 12(−1)k−1 + 6 · 3k−1

=

4(−1)k−1 + 18 · 3k−1

=

4(−1)k+1 + 2 · 3k+1 .

Example. Let {sn } be the sequence defined by s0 = 7, s1 = 8, s2 = 22 and ∀ n ≥ 3, sn = 3sn−1 − 4sn−3 . Show: ∀ n ≥ 0, sn = 2(−1)n + 5 · 2n . Proof. (By Induction) Base cases: (n = 0, 1, 2) Note that 7 = 2(−1)0 + 5 · 20 , 8 = 2(−1)1 + 5 · 21 , and 22 = 2(−1)2 + 5 · 22 . Inductive step: Suppose k ≥ 2 and, for each 0 ≤ i ≤ k, si = 2(−1)i + 5 · 2i . (Goal: sk+1 = 2(−1)k+1 + 5 · 2k+1 .)

80

CHAPTER 2. LECTURE NOTES

Observe that sk+1

=

3sk − 4sk−2

=

3[2(−1)k + 5 · 2k ] − 4[2(−1)k−2 + 5 · 2k−2 ]

=

6(−1)k + 15 · 2k − 8(−1)k−2 − 20 · 2k−2

=

6(−1)k−2 + 60 · 2k−2 − 8(−1)k−2 − 20 · 2k−2

= −2(−1)k−2 + 40 · 2k−2 =

2(−1)k+1 + 5 · 2k+1 .

Example. Show that any postage amount of 30¢ or greater can be obtained using only 4¢ and 11¢ stamps. Proof. (By Induction) Base case: (n = 30, 31, 32, 33) Note that 30¢ = 2 (4¢)+ 2 (11¢), 31¢ = 5 (4¢)+ 1 (11¢), 32¢ = 8 (4¢), and 33¢ = 3 (11¢). Inductive step: Suppose k ≥ 33 and any postage amount from 30¢ to k ¢ can be obtained using only 4¢ and 11¢ stamps. (Goal: (k + 1)¢ can be obtained using only 4¢ and 11¢ stamps.) By the inductive hypothesis, we have a, b ∈ N such that (k − 3)¢ = a (4¢)+ b (11¢). Observe that (k + 1)¢ = (a+1)(4¢)+ b (11¢). Thus, (k + 1)¢ can be obtained using only 4¢ and 11¢ stamps. Standard Factorization A standard factorization of a positive integer lists the prime factors in increasing order and uses exponents to reflect repeated use of primes. 35

=

5·7

127008

=

25 · 34 · 72

23

=

23

Theorem (Fundamental Theorem of Arithmetic). Every integer greater than 1 has a unique standard factorization. Assign as reading the proof by strong induction of the Fundamental Theorem of Arithmetic. We instead consider the proof of a simpler theorem. Theorem (Theorem 3.5). Every integer n ≥ 2 has a prime divisor.

2.4. CHAPTER 4

81

Proof. (By Induction) Base case: (n = 2) Certainly, 2 is already prime and divides itself. Inductive step: Suppose k ≥ 2 and that each integer i with 2 ≤ i ≤ k has a prime divisor. (Goal: k + 1 has a prime divisor) Case 1: k + 1 is prime. Obviously, k + 1 divides itself. Case 2: k + 1 is composite. We can write k + 1 = rs, where 2 ≤ r ≤ k and 2 ≤ s ≤ k. By the inductive hypothesis, r = pt for some prime p and integer t. Since k + 1 = rs = pts, it follows that k + 1 is divisible by the prime p. Recall that the Fibonacci sequence {Fn } is defined by F0 = 1, F1 = 1, and ∀ n ≥ 2, Fn = Fn−2 + Fn−1 . It is the sequence 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, . . .. It also satisfies Binet’s formula,  √ !n+1 1  1+ 5 − ∀ n ≥ 0, Fn = √ 2 5 as is proven by strong induction in Example 4.27.

 √ !n+1 1− 5 , 2

82

CHAPTER 2. LECTURE NOTES

Section 4.6: The Binomial Theorem Pascal’s Triangle 1 1 1 1 1

1 2

3 4

1 3

6 .. .

1 4

1

This triangular grid of integers cn,k for 0 ≤ k ≤ n is defined recursively by ∀ n ≥ 0, cn,0 = cn,n = 1, and ∀ n ≥ k + 1 ≥ 2, cn,k = cn−1,k−1 + cn−1,k .  This is also the recursive characterization for the binomial coefficients nk ,   ∀ n ≥ 0, n0 = nn =  1   n−1 ∀ n ≥ k + 1 ≥ 2, nk = n−1 k−1 + k .  whose recurrence relation is called Pascal’s Identity. Hence, nk = cn,k .  0 0   1 1 0 1    2 2 2 0 1 2     3 3 3 3 0 1 2 3      4 4 4 4 4 0

1

2

.. .

3

4

Binomial Expansions (a + b)0 (a + b)1 (a + b)2 (a + b)3 (a + b)4 .. .

= = = = =

1 a+b a2 + 2ab + b2 3 a + 3a2 b + 3ab2 + b3 4 a + 4a3 b + 6a2 b2 + 4ab3 + b4 .. .

(2.10)

The coefficients are precisely the binomial coefficients. That is,       n n−1 n n−2 2 n n n (a + b) = a + a b+ a b + ··· + abn−1 + bn . 1 2 n−1 Theorem (The Binomial Theorem). Let a, b ∈ R and n ∈ N. Then, n   X n n−i i (a + b)n = a b i i=0

2.4. CHAPTER 4

83

Assign the proof as reading. Example. Expand (3x + 2y)4 . Solution. Here n = 4, a = 3x, and b = 2y. 4

(3x + 2y)

      4 4 4 4 0 3 1 = (3x) (2y) + (3x) (2y) + (3x)2 (2y)2 0 1 2     4 4 1 3 + (3x) (2y) + (3x)0 (2y)4 3 4 =

34 x4 + 4 · 33 x3 2y + 6 · 32 x2 22 y 2 + 4 · 3x23 y 3 + 24 y 4

=

81x4 + 216x3 y + 216x2 y 2 + 96xy 3 + 16y 4 .

Example. Expand (x − y)5 . Solution. Here n = 5, a = x, and b = −y. (x − y)5

= x5 + 5x4 (−y) + 10x3 (−y)2 + 10x2 (−y)3 + 5x(−y)4 + (−y)5 = x5 − 5x4 + 10x3 y 2 − 10x2 y 3 + 5xy 4 − y 5 .

Example. Find the coefficient of x30 y 10 in (x + 2y)40 . Solution. By the Binomial Theorem, (x + 2y)40 =

  40   X 40 40−i 40 30 x (2y)i = · · · + x (2y)10 + · · · i 10 i=0

 10 30 10 The relevant term is 40 y . 10 2 x  10 The desired coefficient is 40 2 . 10 Example. Find the coefficient of x20 y 40 in (3x + 5y)100 . Solution. By the Binomial Theorem, 10

(3x + 5y)

=

 100  X 100 i=0

i

(3x)100−i (5y)i

There is no term with 100 − i = 20 and i = 40. Hence, the desired coefficient is 0.

84

CHAPTER 2. LECTURE NOTES

Summation Proofs Example. Let n ∈ N. Show:

n   X n n−i i 2 3 = 5n . i i=0

Proof. By the Binomial Theorem, n   X n n−i i 5 = (2 + 3) = 2 3. i i=0 n

n

n X

  n 2n−i Example. Let n ∈ N. Show: (−1) 2 = 2n . i i=0 i

Proof. By the Binomial Theorem, 2n = (4 − 2)n = =

n   X n i=0

i

n   X n i=0

4n−i (−2)i n X

  n 2n−i (−1) 2 . 2 (−1) = i i=0

2n−2i i

2

i i

i

2.5. CHAPTER 5

2.5

85

Chapter 5

Section 5.1: General Relations Definition. A relation R from a set X to a set Y is a subset of X × Y . That is, R ⊆ X × Y . However, when (x, y) ∈ R, we write x R y. Example. ≤ is a relation from R to R. When (x, y) ∈≤, we write x ≤ y and understand “x is less than or equal to y”. √ E.g. 2 ≤ 5, 6 ≤ 6, 2 ≤ π, and 4 6≤ 3. Example. Let X = {red, green, blue, yellow}, Y = {USA, Italy, France}, and take R to be the relation “is the color of a stripe on the flag of”. That is, R = {(red, USA), (red, Italy), (green, Italy), (red, France), (blue, France)}. E.g. green R Italy, but yellow R 6 Italy. Definition. A relation on a set X is a relation from X to X. E.g. ≤ is a relation on R. Definition. Given a relation R from X to Y , its inverse is the relation from Y to X given by R−1 = {(y, x) : y ∈ Y, x ∈ X, and (x, y) ∈ R}. That is, y R−1 x iff x R y. Example. The inverse of the “is the color of a stripe on the flag of” relation R is the relation R−1 that would read “has a stripe on its flag of color”. E.g. Italy R−1 green, but Italy R 6 −1 yellow.

Databases An table in a relational database provides a relation. For example, the following table is from a registrar’s database. Student Rachel Abbey Raj Gupta Terrence Jackson Rachel Abbey Tracy Houston

Major mathematics computer science statistics computer science mathematics

This is a relation from a set of students to a set of majors.

86

CHAPTER 2. LECTURE NOTES

Representing Relations An arrow diagram for a relation between two sets is a directed graph constructed like the following example for the “is the color of a stripe of the flag of” relation. ' $ XXX ' red tH XX @HH z t USA X t H @ X green XX H jt H @ XX z Italy t @ X X blue XXX@ R X z t France X t yellow & & %

$

Y %

A digraph for a relation on a set is a directed graph constructed like the following example for the subset relation ⊆ on P({1, 3, 5}). R {1, 3, 5} * H  Y 6@ IHH   @ H R  @ HR {1, 3} {1, 5} {3, 5} @ YH  H * YH  H * 6@ 6  HH H @  6 I @ HR  HH@ @ {1} H {3} * {5}  Y  H @  H I I @ 6  HH @  H ∅ I A matrix for a relation between two sets is a 0-1 matrix constructed like the following example for the “is the color of a stripe on the flag of” relation.

red green blue yellow

 USA 1  0   0 0

Italy 1 1 0 0

France  1 0   1  0

2.5. CHAPTER 5

87

A graph for a relation on R is a drawing in R2 like the following example for the relation x ≤ y. y @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ x @ @ @ @ @ @

Properties of Relations on Sets Definition. A relation R on a set X is said to be (a) reflexive if ∀ x ∈ X, x R x. (b) symmetric if ∀ x, y ∈ X, x R y → y R x. (c) antisymmetric if ∀ x, y ∈ X, x R y and y R x → x = y. (d) transitive if ∀ x, y, z ∈ X, x R y and y R z → x R z. Example. ≤ on R is (a) reflexive: x ≤ x. (b) not symmetric: 0 ≤ 1, but 1 6≤ 0. (c) antisymmetric: If x ≤ y and y ≤ x, then x = y. (d) transitive: If x ≤ y and y ≤ z, then x ≤ z. See Appendix A. Example. ≡ (mod n) on Z is (a) reflexive: Theorem 3.26(a) (b) symmetric: Theorem 3.26(b) (c) not antisymmetric: n ≡ 0 (mod n) and 0 ≡ n (mod n). However, n 6= 0.

88

CHAPTER 2. LECTURE NOTES (d) transitive: Theorem 3.26(c)

Example. The “has nonempty intersection with” relation on P({1, 3, 5}) is (a) not reflexive: ∅ ∩ ∅ = ∅. (b) symmetric: If A ∩ B 6= ∅, then B ∩ A 6= ∅. (c) not antisymmetric: {1} ∩ {1, 3} = 6 ∅ and {1, 3} ∩ {1} = 6 ∅, but {1} = 6 {1, 3}. (d) not transitive: {1} ∩ {1, 3} = 6 ∅ and {1, 3} ∩ {3} = 6 ∅, but {1} ∩ {3} = ∅.

2.5. CHAPTER 5

89

Section 5.2: Special Relations on Sets Order Relations Definition. A relation on a set X is a partial ordering if it is reflexive, antisymmetric, and transitive. Example. We saw in the previous section that ≤ on R is a partial ordering. Example (Example 5.19). Given any set U, the subset relation ⊆ on P(U) is a partial ordering. Example. The relation < on R is not a partial ordering, since it is not reflexive. Assign as reading the discussion of the construction of a Hasse diagram for a partial ordering, such as the following example for the subset relation ⊆ on P({1, 3, 5}). {1, 3, 5} HH  H 

HH  {1, 3} {1, 5} {3, 5} HH  HH   H  H  HH  HH {1} H {3}  {5} HH   H  HH  ∅

Lexicographic Order An ordering of the letters a, b, . . . , z imposes an ordering on words - the familiar dictionary order here. discreet E discrete math E mathematics cat E dog In general, a partial ordering  on characters imposes a partial ordering E on words or strings of characters. Example. Assuming 1  2  3  a  b  c, we have a2ba E a31. Equivalence Relations Definition. A relation on a set is an equivalence relation if it is reflexive, symmetric, and transitive. Example. The relation = on R is an equivalence relation.

90

CHAPTER 2. LECTURE NOTES

Example (Example 5.27). By Theorem 3.26, the relation ≡ (mod n) on Z is an equivalence relation. Example. The divides relation | on Z is not an equivalence relation, since it is not symmetric. For example, 1 | 2, but 2 - 1. Definition. Given an equivalence relation R on a set X, the equivalence class for an element x ∈ X is [x] = {y : y ∈ X and y R x}. Example. For the relation ≡ (mod 4) on Z, we have [0] = {. . . , −12, −8, −4, 0, 4, 8, 12, 16, . . .} = [4] = [−8] = [16], [1] = {. . . , −11, −7, −3, 1, 5, 9, 13, 17, . . .}, [2] = {. . . , −10, −6, −2, 2, 6, 10, 14, 18, . . .}, [3] = {. . . , −9, −5, −1, 3, 7, 11, 15, 19, . . .}. Example. For the relation = on R, we have [x] = {x}. Partitions Definition. Let A be a collection of sets from some universe U. [ A, is the set defined by (a) The union of A, denoted A∈A

∀ x ∈ U,

x∈

[

A ↔ x ∈ A for some A ∈ A.

A∈A

(b) We say that A is a collection of disjoint sets if ∀ A, B ∈ A,

if A 6= B, then A ∩ B = ∅.

Example. Let A = {[0, 1], [1, 2], [2, 3]}, a set of three intervals in R. [ (a) A = [0, 1] ∪ [1, 2] ∪ [2, 3] = [0, 3]. A∈A

(b) Since [0, 1] ∩ [1, 2] 6= ∅, the collection of sets is not disjoint. Definition. A partition of a set X is a collection of disjoint nonempty subsets of X whose union is X. Example. The three sets [0, 1), [1, 2), [2, 3) do form a partition of [0, 3). Lemma. Let X be a set. For each equivalence relation R on X, there is a corresponding partition of X given by the collection of equivalence classes under R. Example. For the relation ≡ (mod 4) on Z, the four sets [0], [1], [2], [3] form a partition of Z.

2.5. CHAPTER 5 Example. Let X be the set of toys {blue car, red truck, red ball, green block, red car, blue block}, and let R be the equivalence relation “is the same color as”. The partition corresponding to R is given by the sets [blue car] = {blue car, blue block}, [red truck] = {red truck, red ball, red car}, [green block] = {green block}.

91

92

CHAPTER 2. LECTURE NOTES

Section 5.3: Basics of Functions Definition 2.1. A function f : X −→ Y is a relation f from X to Y such that each x ∈ X is related to a unique y ∈ Y . We write f (x) = y in place of x f y, and say x maps to y, written x 7→ y. (a) The domain of f is the set X. (b) The codomain of f is the set Y . (c) The range of f is the set range(f ) = {y : y ∈ Y and f (x) = y for some x ∈ X}. ' sx

$ ' ' f −→ s f (x) &

&

domain

$ $

range

%

% & codomain

%

Example. Define f : {−2, −1, 0, 1, 2} −→ {0, 1, 2, 3, 4, 5} by x f y iff y = x2 . Note that this does produce a function f with f (x) = x2 . (a) domain(f ) = {−2, −1, 0, 1, 2}. (b) codomain(f ) = {0, 1, 2, 3, 4, 5}. (c) range(f ) = {f (−2), f (−1), f (0), f (1), f (2)} = {4, 1, 0, 1, 4} = {0, 1, 4}. Example. Define f : [0, 1] −→ [−1, 1] by f (x) = y iff x = y 2 . Does this actually produce a function? Solution. No. This is a relation. However, x = 1 is related to both y = −1 and y = 1. So a value f (1) is not uniquely determined. Example. Define f : R −→ R by x 7→ 4 − x2 . Show: range(f ) = (−∞, 4]. Proof. (We are proving a set equality.) (⊆) Suppose y ∈ range(f ). So we have x ∈ R such that y = 4 − x2 ≤ 4. That is, y ∈ (−∞, 4]. (⊇) Suppose y ∈ (−∞, 4]. √ (Goal: We need x such that 4 − x2 = y. i.e y = ± 4 − y.)

2.5. CHAPTER 5

93

√ Let x = 4 − y ∈ R. Observe that p p f (x) = f ( 4 − y) = 4 − ( 4 − y)2 = 4 − (4 − y) = y. Hence, y ∈ range(f ). Definition. Given f : X −→ Y and g : Y −→ Z, the composition g ◦ f : X −→ Z is defined by (g ◦ f )(x) = g(f (x)).

g◦f $

' sx & domain of f =

f −→

j s f (x)

g −→

s g(f (x))

% codomain of g =

domain of g ◦ f

codomain of g ◦ f

Example. Define f, g : N −→ N by f (n) = n! and g(n) = n2 . (f ◦ g) = f (g(n)) = f (n2 ) = (n2 )!, and (g ◦ f ) = g(f (n)) = g(n!) = (n!)2 . Observe here that f ◦ g 6= g ◦ f , since (22 )! = 24 6= 4 = (2!)2 . Real Functions A real function is a function f : X −→ Y such that X, Y ⊆ R. Important classes of real functions and their formula types include: a constant function f (x) = c for some fixed c ∈ R, a polynomial function f (x) = cn xn + cn−1 xn−1 + · · · + c0 for some constants cn , cn−1 , . . . , c0 ∈ R, and an exponential function f (x) = bx for some fixed base b ∈ R+ . Examples in which the domain may not be all of R include f (x) = √ 1 some fixed n ∈ Z+ and f (x) = x n = n x for some 2 ≤ n ∈ Z.

1 xn

for

Note: When just a formula for a real function is given, its domain is understood to be the set of all real numbers for which the formula can be evaluated. √ Example. Given f (x) = x + 4, we determine that domain(f ) = [−4, ∞) and range(f ) = [0, ∞).

94

CHAPTER 2. LECTURE NOTES

Section 5.4: Special Functions Definition. The identity function id : X −→ X is defined by id(x) = x. Definition. Given f : X −→ Y , we say f is (a) one-to-one if ∀ x1 , x2 ∈ X,

if f (x1 ) = f (x2 ) then x1 = x2 .

(b) onto if range(f ) = Y . (c) bijective (or a bijection) if f is both one-to-one and onto. t

-t 1    t Not One-to-one

t t P PP

-t t PP qt P

Not Onto

Example. Let f : R −→ R. (a) f (x) = x3 − x + 2 is not one-to-one. Proof. Observe that f (0) = 2 = f (1), but 0 6= 1. (b) f (x) = 2x − 1 is one-to-one. Proof. Suppose f (x1 ) = f (x2 ). That is, 2x1 − 1 = 2x2 − 1. So 2x1 = 2x2 . Hence, x1 = x2 . (c) f (x) = 2x is not onto. Proof. Since ∀ x ∈ R, 2x > 0, there is no x such that f (x) = 0. (d) f (x) = 2x − 1 is onto. Proof. Suppose y ∈ R. (Goal: y = 2x − 1. i.e. x = y+1 2 .) . Let x = y+1 2 y+1 Observe that f (x) = f ( y+1 2 ) = 2 2 − 1 = (y + 1) − 1 = y. That is, y ∈ range(f ). (e) f (x) = x3 − x + 2 is not bijective.

2.5. CHAPTER 5

95

Proof. This follows from part (a). (f) f (x) = 2x − 1 is bijective. Proof. This follows from parts (b) and (d). Example. id : X −→ X is a bijection. Example. Define f : {−2, −1, 0, 1, 2} −→ {0, 1, 2, 3, 4, 5} by f (x) = x2 . (a) f is not one-to-one, since f (−2) = f (2). (b) f is not onto, since 2 6∈ range(f ). Example (Hash Tables). A hash function is a function from a subset of the integers (containing identifying keys within a database) to a subset of the integers (representing data storage locations). Generally, it is not one-to-one and is onto. A common form for a hash function is given by h(n) = n mod d, where d is the number of available storage locations. Theorem (Theorem 5.9). Let f : X −→ Y and g : Y −→ Z. For each of the properties one-to-one, onto, and bijective, if f and g both have that property, then so does g ◦ f . Inverse Functions Definition. Given f : X −→ Y and g : Y −→ X we say that f and g are inverses of one another if g ◦ f = idX

and

f ◦ g = idY .

Example. The real functions f (x) = 2x − 1 and g(x) = another.

x+1 2

are inverses of one

Proof. Observe that (g ◦ f )(x) = g(f (x)) = g(2x − 1) = (2x−1)+1 = 2x 2 2 = x = id(x), and y+1 y+1 (f ◦ g)(y) = f (g(y)) = f ( 2 ) = 2( 2 ) − 1 = (y + 1) − 1 = y = id(y).

Definition. If f : X −→ Y is a bijection, then there is a function f −1 : Y −→ X defined by f −1 (y) = x iff f (x) = y. We call f −1 the inverse of f . Note that we find f −1 by solving the equation f (x) = y for x. Example. Define f : R −→ R by f (x) = 13 x5 + 2. Find f −1 .

96

CHAPTER 2. LECTURE NOTES

Solution. Let 13 x5 + 2 = y. So 13 x5 = y − 2. So x5 = 3(y p − 2). Hence, x = 5 3(y − 2). p p Therefore f −1 (y) = 5 3(y − 2). Equivalently, f −1 (x) = 5 3(x − 2). Theorem (Theorem 5.10). Let f : X −→ Y be any function. (a) If f is a bijection, then f and f −1 are inverses of one another. (b) If there is a function g : Y −→ X such that f and g are inverses of one another, then f is a bijection (and g = f −1 ). Theorem 5.10(b) provides a useful way to show that a function is a bijection. Example. Define f : R −→ R by f (x) = 3x + 6. Show that f is a bijection. Sketch. Let 3x + 6 = y. So 3x = y − 6. So x = 31 y − 2. Proof. Define g : R −→ R by g(x) = 31 x − 2. Observe that g(f (x)) = g(3x + 6) = 31 (3x + 6) − 2 = (x + 2) − 2 = x = id(x), and f (g(y)) = f ( 13 y − 2) = 3( 13 y − 2) + 6 = (y − 6) + 6 = y = id(y). Therefore, f and g are inverses of one another and f is a bijection. Logarithms Definition (logarithm base b). Given b > 1, the function logb (x) is the inverse of the function bx . That is, logb (x) = y iff by = x. y

y

x y = bx

x y = logb (x)

Note that domain(logb (x)) = R+ and range(logb (x)) = R. Example. log4 (16) = 2, since 42 = 16. Definition. The natural logarithm function ln(x) is loge (x). Example. ln(eπ ) = π.

2.5. CHAPTER 5

97

Section 5.5: General Set Constructions Images and Inverse Images Definition. Let f : X −→ Y . (a) Given S ⊆ X, the image of S under f is f (S) = {t : t ∈ Y and f (s) = t for some s ∈ S}. (b) Given T ⊆ Y , the inverse image of T under f is f −1 (T ) = {s : s ∈ X and f (s) = t for some t ∈ T }. Note that range(f ) = f (X). Example. Define f : {−2, −1, 0, 1, 2} −→ {0, 1, 2, 3, 4, 5} by f (x) = x2 . (a) Let S = {−1, 1}. f (S) = {f (−1), f (1)} = {1, 1} = {1}. (b) Let S = {0, 2}. f (S) = {f (0), f (2)} = {0, 4}. (c) Let T = {0, 4}. f −1 (T ) = {0, 2, −2}. (d) Let T = {1, 2, 3}. f −1 (T ) = {−1, 1}. Example. Define f : [−4, 2] −→ [0, 20] by f (x) = x2 . y

x

(a) f ((−1, 1]) = [0, 1]. Proof. (⊆) Suppose y ∈ f ((−1, 1]). So y = f (x) = x2 for some −1 < x ≤ 1. Since 0 ≤ x2 ≤ 1, y ∈ [0, 1]. (⊇) Suppose y ∈ [0, 1]. √ Let x = y ∈ [0, 1] ⊆ (−1, 1]. √ Since f (x) = ( y)2 = y, y ∈ f ((−1, 1]).

98

CHAPTER 2. LECTURE NOTES (b) f ([0, 2)) = [0, 4). (c) f −1 ([0, 4)) = (−2, 2). Proof. (⊆) Suppose x ∈ f −1 ([0, 4)). So x2 = f (x) ∈ [0, 4). Since 0 ≤ x2 < 4, −2 < x < 2. So x ∈ (−2, 2). (⊇) Suppose x ∈ (−2, 2). Since −2 < x < 2, 0 ≤ x2 < 4. Since f (x) ∈ [0, 4), x ∈ f −1 ([0, 4)). (d) f −1 ([0, 9]) = [−3, 2].

Example. The registrar’s database table Student Rachel Abbey Raj Gupta Terrence Jackson Charles Rose Tracy Houston

Major mathematics computer science statistics computer science mathematics

represents a function f : S −→ M , where S is a set of students, M is a set of majors, and f (s) is the major of student s. (a) f ({Charles Rose, Tracy Houston}) = {computer science, mathematics}. (b) f −1 ({computer science}) = {Charles Rose, Raj Gupta}, the set of computer science majors. Indexed Set Operations From Chapter 1, we know that A1 ∪ A2 = {x : x ∈ A1 or x ∈ A2 } and A1 ∩ A2 = {x : x ∈ A1 and x ∈ A2 }. Moreover, A1 ∪ A2 ∪ A3 ∪ A4 = {x : x ∈ A1 or x ∈ A2 or x ∈ A3 or x ∈ A4 }, and A1 ∩ A2 ∩ A3 ∩ A4 = {x : x ∈ A1 and x ∈ A2 and x ∈ A3 and x ∈ A4 }. In our new notation, we will write these as [ Ai and i∈{1,2,3,4}

\

Ai ,

i∈{1,2,3,4}

respectively. Definition. Let I be the indexing set for a collection of sets {Ai }i∈I . [ (a) Ai = {x : x ∈ Ai for some i ∈ I}. i∈I

2.5. CHAPTER 5 (b)

\

99

Ai = {x : x ∈ Ai for every i ∈ I}.

i∈I

Example.

[

[n, n + 1] = [1, 2] ∪ [2, 3] ∪ [3, 4] ∪ [4, 5] = [1, 5].

i∈{1,2,3,4}

Example.

\

[−n, n] = [−1, 1] ∩ [−2, 2] ∩ [−3, 3] = [−1, 1].

i∈{1,2,3}

Example.

[ 1 1 1 [ , n] = [1, 1] ∪ [ , 2] ∪ [ , 3] ∪ · · · = (0, ∞). n 2 3 +

n∈Z

Example.

1 1 1 1 1 1 [− , ] = [−1, 1] ∩ [− , ] ∩ [− , ] ∩ · · · = {0}. n n 2 2 3 3 +

\ n∈Z

Proof. Suppose r 6= 0. By the Archimedean Principle, we have n ∈ Z+ such that Since n1 < |r|, r 6∈ [− n1 , n1 ].

1 |r|

< n.

100

CHAPTER 2. LECTURE NOTES

Section 5.6: Cardinality We understand from Chapter 1 that |{1, 7, 2, 8}| = 4. But how do we define this precisely? Definition. (a) We say two sets A and B have the same cardinality if there is a bijection f : A −→ B. (b) Given n ∈ N, we say A has cardinality n, written |A| = n, if A has the same cardinality as {1, 2, . . . , n}. (c) We say A is finite if A has cardinality n for some n ∈ N. Otherwise, A is infinite. Example. |{4, 7, 10, 13, 16}| = 5. Proof. Define f : {4, 7, 10, 13, 16} −→ {1, 2, 3, 4, 5} by 4 7→ 1, 7 7→ 2, 10 7→ 3, 13 7→ 4, and 16 7→ 5. Observe that f is one-to-one and onto and hence a bijection. Thus, {4, 7, 10, 13, 16} and {1, 2, 3, 4, 5} have the same cardinality. In the previous example, note that f (x) = specify a formula for f .

x−1 3 ,

but it is not necessary to

Example (Example 5.61). Let E be the set of even integers. Show that Z and E have the same cardinality. Proof. Define functions f : Z −→ E by f (n) = 2n Z ↓ E

··· f ···

and g : E −→ Z by g(n) =

−3 ↓ −6

−2 −1 ↓ ↓ −4 −2

n 2.

Observe that

0 ↓ 0

1 ↓ 2

2 ↓ 4

3 ··· ↓ 6 ···

∀ n ∈ E, (f ◦ g)(n) = f (g(n)) = f ( n2 ) = 2( n2 ) = n, and ∀ n ∈ Z, (g ◦ f )(n) = g(f (n)) = g(2n) = 2n 2 = n. Hence, f and g are inverses of one another, and f is a bijection. Therefore, Z and E have the same cardinality. Example. Show that [0, 3] and [1, 7] have the same cardinality. Proof. Define f : [0, 3] −→ [1, 7] by f (x) = 2x + 1 and g : [1, 7] −→ [0, 3] by g(x) = x−1 2 . Observe that f and g are inverses of one another. Hence, f is a bijection. Theorem 5.11 tells us that the relation “has the same cardinality as” is an equivalence relation.

2.5. CHAPTER 5

101

Theorem (The Pigeon Hole Principle). If a finite set A has cardinality greater than the cardinality of a set B, then any function f : A −→ B must send two inputs to the same output.

Pigeons

u

u S

u S

Hole 1

u

u

S

Hole 2

S

Hole 3

u S

Hole 4

Hole 5

It follows from the Pigeon Hole Principle that finite cardinalities are unique and that Z+ is infinite (Example 5.63). Definition 2.2. Let A be a set. (a) A is countably infinite if A has the same cardinality as Z+ . (b) A is countable if A is finite or countably infinite. (c) A is uncountable if A is not countable. Example (Example 5.64). Show that Z is countably infinite.   Proof. Define f : Z+ −→ Z by f (n) = (−1)n n2 Z+ ↓ Z

f

1 ↓ 0

2 3 ↓ ↓ 1 −1

4 5 ↓ ↓ 2 −2

6 7 ↓ ↓ 3 −3

··· ···

and g : Z −→ Z+ by ( 2n g(n) = 2|n| + 1

if n > 0, if n ≤ 0.

The equations ∀ ∀ ∀ ∀

even n ∈ Z+ , g(f (n)) = g( n2 ) = 2( n2 ) = n, n−1 odd n ∈ Z+ , g(f (n)) = g(− n−1 2 ) = 2( 2 ) + 1 = n, 2n positive n ∈ Z, f (g(n)) = f (2n) = b 2 c = n, nonpositive n ∈ Z, f (g(n)) = f (−2n + 1) = −b −2n+1 c = −(−n) = n 2

show that f is a bijection (with inverse g). Theorem (Theorem 5.14). R is uncountable. Proof. (Cantor’s diagonal argument) It suffices to prove that (0, 1) is uncountable. From Section 3.4, each x ∈ (0, 1) can be expressed in decimal form 0.a1 a2 a3 · · · .

102

CHAPTER 2. LECTURE NOTES

Suppose to the contrary that (0, 1) is countable. Thus, we have a bijective function f : Z+ −→ (0, 1). f (1) = 0. f (2) = 0. f (3) = 0. .. . f (n) = 0. .. .

a1,1 a2,1 a3,1

a1,2 a2,2 a3,2

a1,3 a2,3 a3,3

··· ··· ···

a1,n a2,n a3,n

··· ··· ···

an,1

an,2

an,3

···

an,n

···

Let x = 0.b1 b2 b3 · · · , where, for each i ∈ Z+ , ( 1 if ai,i = 6 1, bi = 2 if ai,i = 1. For each i, bi 6= ai,i , and therefore x 6= f (i). Since x is not in the range, f is not onto. This contradiction shows that (0, 1) is uncountable.

2.6. CHAPTER 6

2.6

103

Chapter 6

Section 6.1: The Multiplication Principle A statement of the Multiplication Principle can be read in Theorem 6.1. We instead focus on illustrating it through examples. Example. There are 4 movies playing at the Cineplex, and they sell 5 different snack items. How many possibilities are there for a movie and a snack item? Solution.

S’st  (((tt ( ( th  P h  Ph t Ph Ph M 1 Pt   S’st     (((tt ( (   Ph h M 2 th PPhht   PPt      t  XX PATRON Z XXX S’s t 3  Z XM XX (((tt  Z XXth ( (  h P Z Ph ht Ph Z PPt ZM 4 Z S’s t Z  Z  (((tt  ( (  Zth Ph Ph t Ph Ph Pt

4 × 5 = 20. Example. A small university consists of 3 colleges. The College of Arts and Sciences contains 5 departments, the College of Business contains 5 departments, and the College of Education contains 4 departments. How many departments are there at this university? Solution. The Multiplication Principle does not apply here. D’s t   ((tt (  ( t(  h P h  Ph t Ph Ph  Pt  A&S  D’st    (((tt (  (  Bus. th P h h PPhht   PPt    t  Univ. XXX D’st XXX Educ. XXX  (((tt ( Xth h ( hhht 5 + 5 + 4 = 14.

104

CHAPTER 2. LECTURE NOTES

Example. How many possible license plates have 2 letters (A to Z) followed by 5 digits (0 to 9), where the first digit is not a 0, and the last two digits are not the same? Solution. 26 · 26 · 9 · 10 · 10 · 10 · 9 = 262 · 92 · 103 = 54756000. Example. How many numbers from 100 to 1001 are divisible by 3? Solution. The relevant multiples of 3 are 102, 105, 108, . . . , 999. These are 3(34), 3(35), 3(36), . . . , 3(333). The number of integers 34, 35, 36, . . . , 333 is 333 − 34 + 1 = 300. Example. How many possible license plates have 3 distinct letters followed by 4 digits that are not all 0’s? Solution. |

{z

letters

}

|

{z

digits (not 0000)

}

26 · 25 · 24 · 9999 = 15600 · 9999 = 155984400. Example. How many days after Barack Obama’s birth (8/4/1961) was he first inaugurated as president (1/20/2009)? Solution. 8/4/1961 to 8/4/2008 is 47 years, of which 12 were leap years. 8/4/2008 to 1/20/2009 is 27 + 30 + 31 + 30 + 31 + 20 = 169 days. Total: 47(365) + 12 + 169 = 17336 days.

2.6. CHAPTER 6

105

Section 6.2: Permutations and Combinations Permutations Definition. A permutation of a set is an ORDERING of its elements. Example. In how many possible orders could 4 children take turns jumping off the diving board? Solution. 4 · 3 · 2 · 1 = 4! = 24. Theorem. There are n! ways to put n distinct items in order. Definition. A permutation of k objects from a set of n objects is an ORDERING of k objects from the n-set. The number of such is denoted P (n, k). Example. How many sequences of 3 distinct digits are possible? Solution. 10 · 9 · 8 = 720 = P (10, 3). Theorem. P (n, k) = n(n − 1) · · · (n − k + 1) =

n! (n−k)! .

Combinations Definition. A combination of k objects from a set of n objects is a (UNORDERED) subset of size k from the n-set.  Theorem. The number of combinations of k objects from an n-set is nk = n! k!(n−k)! .    n Recall that nk is read “n choose k”, and nk = n−k . Example. How many ways are there to form the 18-member Senate Committee on the Judiciary (from the 100 Senators)?  Solution. 100 18 = 30,664,510,802,988,208,300. Mixtures Example. From the student body of 400 students, how many ways are there for them to elect a student council of 15 and for the council to appoint a chair and a vice-chair?  Solution. 400 15 P(15, 2). or P (400, 2) 398 13 . A LARGE number. Example. How many 5-digit numbers (no leading zero) have their digits in (strictly) increasing order?  Solution. 95 = 126.

106

CHAPTER 2. LECTURE NOTES

Example. Among the possible sequences of 4 die throws, how many have exactly 3 ones?  Solution. 43 · 5 = 20. Example. If 5 dice are rolled, then how many possible outcomes form a full house? Solution. 6 · 5 = P (6, 2) = 30.

2.6. CHAPTER 6

107

Section 6.3: Addition and Subtraction Theorem (Addition Principle). If A ∩ B = ∅, then |A ∪ B| = |A| + |B|. Example. From an assortment of 12 chocolates, how many selections of 3 or 4 of them are possible?   12 Solution. 12 3 + 4 = 715. Theorem (Complement Principle). If U is finite and A ⊆ U, then |A| = |U| − |Ac |. Proof. Since A ∩ Ac = ∅, we have |U| = |A| + |Ac |. Example. A bag of bagels contains 5 cinnamon raisin, 4 sesame, and 3 whole wheat. If the dozen bagels are distinguishable, then how many ways are there to select 2 bagels of different kinds?    Solution. Same kind: 52 + 42 + 32 = 19.  Different kinds: 12 2 − 19 = 47. Example. How many 5-card poker hands have at least 2 hearts?    39 39 Solution. 52 5 − [ 5 + 13 4 ] = 953940. Theorem (Basic Inclusion-Exclusion Principle). |A ∪ B| = |A| + |B| − |A ∩ B|. '$ '$ A B A∩B

&% &% Example. How many 5-card poker hands have exactly 2 hearts or exactly 3 diamonds?  39     13 39 13 13 Solution. 13 2 3 + 3 2 − 2 3 = 902460. Example. How many possible license plates consisting of 6 distinct letters are in alphabetical order or start ABC?   23 Solution. 26 6 + P (23, 3) − 3 = 239085. Example. How many of the integers from 101 to 10100 are divisible by 7 or 17?

108

CHAPTER 2. LECTURE NOTES

Solution. Note that 7 · 17 = 119. 15(7) = 105, . . . , 1442(7) = 10094 includes 1442 − 15 + 1 = 1428 numbers. 6(17) = 102, . . . , 594(17) = 10098 includes 594 − 6 + 1 = 589 numbers. 1(119) = 119, . . . , 84(119) = 9996 includes 84 numbers. Ans: 1428 + 589 − 84 = 1933. Example. Among the possible sequences of 4 die tosses, how many have at least 2 sixes? Solution. 64 − (54 + 4 · 53 ) = 171.  4 2 Or 2 5 + 43 5 + 1 = 171. Example. If 5 dice are rolled, then how many possible (unordered) outcomes have at least 4 ones? Solution. 5 + 1 = 6. Corollary. If U is finite and A, B ⊆ U, then |Ac ∩B c | = |U|−|A|−|B|+|A∩B|. Example. Use Inclusion-Exclusion to compute φ(98). Solution. 98 = 2 · 72 . 98 φ(98) = 98 − 98 2 − 7 +

98 14

= 42.

2.6. CHAPTER 6

109

Section 6.4: Probability Example. A 4-sided die and a 6-sided die are rolled. We study the possibility of getting a sum of 4. Terminology. The experiment is the rolling of the dice. An outcome is a possible result of the experiment, here, (f, s), where f is the number showing on the 4-sided die, and s is the number showing on the 6-sided die. The sample space is the set S of all possible outcomes for the experiment. S={

(1, 1), (2, 1), (3, 1), (4, 1),

(1, 2), (2, 2), (3, 2), (4, 2),

(1, 3), (2, 3), (3, 3), (4, 3),

(1, 4), (2, 4), (3, 4), (4, 4),

(1, 5), (2, 5), (3, 5), (4, 5),

(1, 6), (2, 6), (3, 6), (4, 6) }.

We focus on sample spaces with equally likely outcomes. 1 In this case, for each x ∈ S, we have P (x) = |S| , where P (x) is the likelihood, or probability, of obtaining outcome x in a random performance of the experiment. An event is a subset E of S. The event of getting a sum of 4 is the subset E = {(1, 3), (2, 2), (3, 1)}. Definition. If all of the outcomes in a samples space S are equally likely, then we obtain the probability of an event E by P (E) =

|E| . |S|

Example. If a 4-sided die and a 6-sided die are rolled, then what is the probability of getting a sum of 4? Solution. E = {(1, 3), (2, 2), (3, 1)} has 3 outcomes. Since |S| = 4 · 6 = 24, we 3 have P (E) = 24 = 18 . Example. What is the probability of being dealt two cards from a standard deck that are both Jack or better? Solution. Each must be Jack, Queen, King, or Ace, of any suit.  16 20 2 ≈ 0.09. p = 52 = 221 2

Example. If 4 (standard) dice are thrown, then what is the probability of getting (a) exactly 3 ones? (b) at least 2 sixes?

110

CHAPTER 2. LECTURE NOTES

Solution. (a) 4 3



·5

64

=

5 ≈ 0.015. 324

(b) 64 − (54 + 4 · 53 ) 171 = ≈ 0.132. 4 6 1296

Theorem (Probability Complement Principle). For any event E, P (E) = 1 − P (E c ). Example. If a jury of 12 is randomly selected from a pool of 25 women and 15 men, then what is the probability that the jury will not be all women? Solution. 25 12  40 12



1−

=1−

805 ≈ 0.99907. 864838

Theorem (Basic Probability Inclusion-Exclusion). For any events E and F , P (E ∪ F ) = P (E) + P (F ) − P (E ∩ F ). Conditional Probability Definition. The conditional probability of an event E given an event F is P (E | F ) =

P (E ∩ F ) . P (F )

Example. A jury of 5 women and 7 men was selected from a pool of 25 women and 15 men. If a person is selected from the pool of 40, then what is the probability that she is a woman, given that she is not on the jury? Solution.

20 20+8

=

20 28

=

5 7

≈ 0.71.

Definition. We say that two events E and F are independent if P (E ∩ F ) = P (E) · P (F ). Note in this case, if P (F ) 6= 0, then P (E | F ) = P (E). Example. From the pool of 40 people in the previous example, selecting a woman and selecting someone not on the jury are not independent events. Solution. The probability of selecting a woman is

25 40

=

5 8

6= 75 .

2.6. CHAPTER 6

111

Theorem. Let S = F1 ∪ · · · ∪ Fn , a disjoint union, with P (F1 ), . . . , P (Fn ) positive, and let E ⊆ S. n X (a) P (E) = P (E | Fi )P (Fi ). i=1

(b) (Bayes’ Formula) For any 1 ≤ k ≤ n, if P (E) > 0, then P (E | Fk )P (Fk ) . P (Fk | E) = Pn i=1 P (E | Fi )P (Fi ) Example. In the California State Assembly, there are 55 Democrats and 25 Republicans. Suppose 40% of the Democrats and 76% of the Republicans support Proposition A. (a) Will Proposition A pass with a majority vote? (b) What is the probability that a randomly selected representative who supports Proposition A is a Republican? Solution. 55 ) + 0.76( 25 (a) P (A) = 0.40( 80 80 ) = 0.5125 > 0.5. Yes. 25 0.76( 80 ) P (A | R)P (R) 19 (b) P (R | A) = = = ≈ 0.46. P (A) 0.5125 41

112

CHAPTER 2. LECTURE NOTES

Section 6.5: Applications of Combinations Paths in a Grid Example. In the pictured neighborhood, we consider routes from S to F that only travel down and to the right. St -

t

t

t

t

t

? t

t

t

t

t

? t-

tM

t

t

t

t

? t-

t-

t F

E.g. The pictured path would be recorded as RDDRDRR. All such paths have length 7 blocks and consist of 4 R’s (and 3 D’s). (a) How many such paths are there from S to F ? (b) How many pass through M ? Solution.  (a) 74 = 35.   (b) 42 32 = 18.

Poker See Tables 6.3 and 6.4, (Project these on a screen.)

Hand Straight-Flush Four of a Kind Full House Flush Straight Three of a Kind Two Pairs One Pair Nothing

Description A run of 5 cards of the same suit 4 cards of one denomination 3 cards of one denomination and 2 of one other 5 cards of the same suit, not forming a run A run of 5 cards, not all of the same suit 3 cards of one denomination and 2 of others 2 cards each of two denominations and 1 of one other 2 cards of one denomination and 3 of others None of the hands listed above

2.6. CHAPTER 6

113

Hand Straight-Flush Four of a Kind Full House Flush Straight Three of a Kind Two Pairs One Pair Nothing

Number Possible 40 624 3744 5108 10200 54912 123552 1098240 1302540

Probability (to 8 places) .00001539 .00024010 .00144058 .00196540 .00392465 .02112845 .04753902 .42256903 .50117739

Proof of results in Table 6.4. (All hands)   52 = 2598960. 5 (Straight Flush) 10 · 4 = 40,

p=

40 ≈ 0.00001539. 2598960

(Straight) 10 · 45 − 40 = 10200,

p=

10200 ≈ 0.00392465. 2598960

(One Pair) 13 ·

    4 12 · 43 = 1098240, · 2 3

(Two Pairs)       13 4 4 · · · 44 = 123552, 2 2 2

p=

1098240 ≈ 0.42256903. 2598960

p=

123552 ≈ 0.04753902. 2598960

The rest is left to the exercises. Choices with Repetition Example. A bag contains ten $1 bills, ten $10 bills, and ten $100 bills. If 8 bills are selected, then how many different monetary values are possible? Solution. A selection could be recorded in a table $1 √√√

$10 √√

$100 √√√

114

CHAPTER 2. LECTURE NOTES

√√√ √√ √√√ or more efficiently in a string | | √ of length 10 containing 8 ’s (and 2|’s). The number of such sequences is 10 8 = 45.  Theorem. There are n+c−1 ways to put n identical items into c distinct n categories. In the example above, each “item” is a selection of a bill, and each “category” is a value of a bill. Example. If 3 (standard 6-sided) dice are rolled, then how many different outcomes (or “hands”) are possible (not sums)? Solution.  n 8= 3 dice, and c = 6 numbers. 3+6−1 = 3 = 56. 3

2.6. CHAPTER 6

115

Section 6.6: Correcting for Overcounting Example. How many possibilities are there for a necklace using each of a gold bead, a silver bead, a bronze bead, and a wooden bead? We understand that the necklace can be freely rotated and flipped to any orientation. Solution. There are 4! = 24 necklaces with a fixed orientation, as pictured. G

S

W

G

B

W S

B

W

B

B

S

S

G

W

B

B

S

S

G

W

G

S

W

G

B

W S

B

G

B

W

G

S

W B

S

W

S

S

B

B

G

W

W

S

S

B

B

G

G

W

G

B

W

G

S

W B

S

G

B

S

G

W

S

B

W

S

W W

B

G

B

G

S

S

W W

B

G

B

G

S

G

B

G

W

S

B

W

G

S

G

G

W

However, each half-row contains 4 necklaces that are the same under rotation. And each of the 2 half-rows forming a row is the same necklace after a flip. So there are only 4! =3 4·2 different necklaces, as pictured. G

S

G

B

G

B

W

B

W

S

S

W

Example. How many ways are there for 15 boys to break into 3 teams of 5? Solution. There is no order to the teams.    15 10 5 5

5

5

3!

= 126126.

Example (Example 6.46). How many different 12-sided dice can be made by placing the numbers 1 through 12 on the sides of a dodecahedron? p p p p p

p p p p p

p p p p p p p p p p

116

CHAPTER 2. LECTURE NOTES

Solution. There are 12 · 5 = 60 possible orientations of the dodecahedron. 12! = 7983360. 60

Example. The pictured mobile is to be hung from the central point, with each location ◦ filled by one each of 12 painted eggs. If each • marks a rotational center, then how many different mobiles are possible? e u e e

e

e u

u

e e

Solution.

P (12,3) 3

·

P (9,3) 3

· 4

e

e

e

u e

P (6,3) 3

e u

·

P (3,3) 3

= 1478400.

2.7. CHAPTER 7

2.7

117

Chapter 7

Section 7.1: Inclusion-Exclusion We already know |A1 ∪ A2 | = |A1 | + |A2 | − |A1 ∩ A2 |. U '$ '$ A1 A2 &% &% The next level is |A1 ∪ A2 ∪ A3 | = |A1 | + |A2 | + |A3 | −(|A1 ∩ A2 | + |A1 ∩ A3 | + |A2 ∩ A3 |) +|A1 ∩ A2 ∩ A3 |. U '$ '$ A1 A2 '$ &% &% &% A3 Theorem (Generalized Inclusion-Exclusion Principle (PIE)).   n X sum of the sizes of the possible intersections i−1 (−1) |A1 ∪A2 ∪· · ·∪An | = of i sets from A1 , A2 , . . . , An i=1 {z } | Si

Example. When n = 4, PIE says |A1 ∪A2 ∪A3 ∪A4 | = |A1 | + |A2 | + |A3 | + |A4 | −(|A1∩A2|+|A1∩A3|+|A1∩A4|+|A2∩A3|+|A2∩A4|+|A3∩A4|) +(|A1∩A2∩A3 | + |A1∩A2∩A4 | + |A1∩A3∩A4 | + |A2∩A3∩A4 |) −|A1 ∩ A2 ∩ A3 ∩ A4 | Proof. Let x ∈ A1 ∪A2 ∪A3 ∪A4 , and consider its contribution to the right-hand side above. Let k be the number of Ai that contain x. E.g. Consider the case in which k = 3. Without loss of generality, say x ∈ A1 ∩ A2 ∩ A3 . Since x is in A1 , A2 , A3 , A1 ∩ A2 , A1 ∩ A3 , A2 ∩ A3 , and A1 ∩A2 ∩A3 , its contribution is 1 + 1 + 1 − (1 + 1 + 1) + (1) − 0 = 1, as required. The other cases are handled similarly.

118

CHAPTER 2. LECTURE NOTES

Example. A bag contains 6 bronze, 7 silver, 8 gold, and 9 platinum coins. Assume all are distinguishable beyond their type. How many ways are there to select 5 such that not all 4 types are represented? Solution. Let AB = the selections without a BRONZE coin, AS = the selections without a SILVER coin, AG = the selections without a GOLD coin, and AP = the selections without a PLATINUM coin.         24 23 22 21 |AB ∪ AS ∪ AG ∪ AP | = [ + + + ] 5 5 5 5             17 16 15 15 14 13 −[ + + + + + ] 5 5 5 5 5 5         6 7 8 9 +[ + + + ] 5 5 5 5 −0 =

122836 − 19851 + 209 − 0

=

103194.

Corollary. |A1 c ∩ A2 c ∩ · · · ∩ An c | =

n X (−1)i Si . i=0

Example. Compute φ(490). Solution. A2 = the A5 = the A7 = the

Note that 490 = 2 · 5 · 72 . Let set of integers in [1, 490] divisible by 2, set of integers in [1, 490] divisible by 5, and set of integers in [1, 490] divisible by 7.

|A2 c ∩ A5 c ∩ A7 c | =

490 490 490 490 + + ) −( 2 5 7 490 490 490 +( + + ) 2·5 2·7 5·7 490 − 2·5·7 = 490 − 413 + 98 − 7 = 168.

Example (Special case of Example 7.3). If 5 people wish to have a Secret Santas gift exchange, then what is the probability that no person will select himself or herself? i.e. What is the probability of a derangement? Solution. Let U = the set of permutations (assignments) of 1, 2, 3, 4, 5, A1 = the set of assignments in which 1 selects himself, A2 = the set of assignments in which 2 selects himself,

2.7. CHAPTER 7

119

A3 = the set of assignments in which 3 selects himself, A4 = the set of assignments in which 4 selects himself, and A5 = the set of assignments in which 5 selects himself. So A1 , A2 , A3 , A4 , A5 are the sets we wish to avoid in U. Note that |U| = 5!.       5 5 5 c c c c c |A1 ∩A2 ∩A3 ∩A4 ∩A5 | = 5! − 5 · 4! + 3! − 2! + 1! − 0! 2 3 4 5! 5! 5! 5! 5! 5! = − + − + − . 0! 1! 2! 3! 4! 5!

p=

|A1 c ∩ A2 c ∩ A3 c ∩ A4 c ∩ A5 c | 5!

1 1 1 1 1 1 − + − + − 0! 1! 2! 3! 4! 5! 5 X (−1)i 11 = = ≈ 0.367. i! 30 i=0 =

Note, in general, p=

n X (−1)i i=0

i!



1 ≈ 0.368. e

120

CHAPTER 2. LECTURE NOTES

Section 7.2: Multinomial Coefficients Definition. For natural numbers k1 + k2 + · · · km = n,   n n! = . k1 , k2 , · · · , km k1 !k2 ! · · · km !   n Note that k,n−k = nk .  11 11! Example. 6,2,3 = 6!2!3! = 4620.  n Theorem. There are k1 ,k2 ,··· ,km ways to split n DISTINCT items into m DISTINCT categories of sizes k1 , k2 , . . . , km (ordered).  15 Example. There are 5,5,5 = 756756 ways to split 15 boys into teams named A, B, and C. = 126126 ways to form 3 (unordered) teams. However, there are 756756 3! Example. (a) How many ways are there to split 18 women into two groups of 5 and 2 groups of 4? (b) If the groups are assigned randomly, then what is the probability that Anne and Barbara will be in the same group? Solution. (a) 18 5,5,4,4



2!2!

= 192972780.

(b) 16 (3,5,4,4 )

( 16 ) + 5,5,2,4 32 2! = ≈ 0.209. 192972780 153 n   X n k1 k2 n Recall the Binomial Theorem: (a1 + a2 ) = a a . k1 1 2 2!

k1 =0

Theorem (The Multinomial Theorem). Let a1 , a2 , . . . , am ∈ R and n ∈ N. Then   X n n (a1 + a2 + · · · + am ) = ak1 ak2 · · · akmm . k1 , k2 , · · · km 1 2 0 ≤ k1 , k2 , . . . , km ≤ n k1 + k2 + · · · + km = n Proof. The number of unsimplified monomials ai1 ai2 · · · ain in the expansion of (a1 + a2 + · · · + am )(a1 + a2 + · · · + am ) · · · (a1 + a2 + · · · + am )  that simplify to ak11 ak22 · · · akmm is k1 ,k2n,···km . Example. Expand (x + y + z)2 .

2.7. CHAPTER 7 Solution. The indexing set for the sum is {(2, 0, 0), (1, 1, 0), (1, 0, 1), (0, 2, 0), (0, 1, 1), (0, 0, 2)}.       2 2 2 2 2 2 Note that 2,0,0 = 0,2,0 = 0,0,2 = 1 and 1,1,0 = 1,0,1 = 0,1,1 = 2. So (x + y + z)2 = 1x2 y 0 z 0 + 2x1 y 1 z 0 + 2x1 y 0 z 1 + 1x0 y 2 z 0 + 2x0 y 1 z 1 + 1x0 y 0 z 2 = x2 + 2xy + 2xz + y 2 + 2yz + z 2 . Example. What is the coefficient of x2 y 4 z 6 in (2x + 3y + z)12 ? Solution. The relevant term is   12 (2x)2 (3y)4 z 6 = 13860 · 4x2 81y 4 z 6 . 2, 4, 6 The coefficient is 13860 · 4 · 81 = 4490640.

121

122

CHAPTER 2. LECTURE NOTES

Section 7.3: Generating Functions Definition. Given a sequence c0 , c1 , c2 , . . ., its generating function is g(x) = c0 + c1 x + c2 x2 + · · · . For us, ci will count something in terms of i. E.g. ci = the number of possible candy bags with i items, given limited choices or ci = the number of ways to make $i, given certain denominations of bills. Example. Find the coefficient of x8 in g(x) = (1 + x + x2 + x3 )(x3 + x4 + x5 )(1 + x2 + x4 ). Solution. (1 + x + x2 + x3 )(x3 + x4 + x5 )(1 + x2 + x4 )

1

1

1

1

1

1

The coefficient is 6. In fact, g(x) = x3 + 2x4 + 4x5 + 5x6 + 6x7 + 6x8 + 5x9 + 4x10 + 2x11 + x12 is the generating function for 0, 0, 0, 1, 2, 4, 5, 6, 6, 5, 4, 2, 1, 0, . . .. Example. Suppose we have 3 Almond Joys, 5 Reese’s Peanut Butter Cups, and 4 Tootsie Pops. How many ways are there to fill a candy bag with 8 items (a) if at least 3 Reese’s Peanut Butter Cups must be included and an even number of Tootsie Pops must be included? (b) if there are no restrictions? Solution. (a) The coefficient of x8 in (1 + x + x2 + x3 ) (x3 + x4 + x5 ) (1 + x2 + x4 ) | {z }| {z }| {z } Almond Joy

Reese’s PBC

Tootsie Pops

is 6. (b) The coefficient of x8 in h(x) = (1 + x + x2 + x3 )(1 + x + x2 + x3 + x4 + x5 )(1 + x + x2 + x3 + x4 ) is 14. We need tools to find this. Example. How many ways are there to make $25 given five $1 bills, five $5 bills, and two $10 bills? We cannot distinguish bills of the same value.

2.7. CHAPTER 7

123

Solution. The coefficient of x25 in (1 + x + x2 + x3 + x4 + x5 ) (1 + x5 + x10 + x15 + x20 + x25 ) (1 + x10 + x20 ) {z }| {z }| {z } | $1 bills

$5 bills

$10 bills

is 6. Now for some tools. Algebraic Tools (a) 1 + x + x2 + · · · + xn =

Theorem.

1−xn+1 1−x .

1 (b) (1 + x + x2 + · · · )n = (1−x) n     3 1+n−1 2+n−1 2 = 0+n−1 + x + x + 3+n−1 x + ···. 0 1 2 3     (c) (1 + x)n = n0 + n1 x + n2 x2 + · · · + nn xn .

Example. Find the coefficient of x4 in f (x) = (1 + x + x2 + x3 )2 (1 + x + x2 + · · · )5 (1 + x)4 . Solution. 2 1 1 − x4 · (1 + x)4 · 1−x (1 − x)5 (1 − x4 )2 · (1 + x)4 (1 − x)7 1 · (1 − 2x4 + x8 )(1 + 4x + 6x2 + 4x3 + x4 ) (1 − x)7 1 · (1 − x)7

 f (x)

= = = =

(1+4x+6x2 +4x3 −x4 −8x5 −12x6 −8x7 −x8 +4x9 +6x10 +4x11 +x12 )         7 8 2 9 3 10 4 = (1 + x+ x + x + x + ···) · 1 2 3 4 (1 + 4x + 6x2 + 4x3 − x4 + more) The coefficient of x4 is         10 9 8 7 ·1+ ·4+ ·6+ · 4 + 1 · (−1) 4 3 2 1 = 741. Example. If you have 3 pineapples, 3 grapefruits, unlimited supplies of apples, oranges, peaches, plums, and nectarines, and one each of a kiwi, a papaya, a mango, and a lime, then how many possibilities are there for a fruit basket consisting of 4 pieces of fruit?

124

CHAPTER 2. LECTURE NOTES

Solution. The relevant generating function is (1 + x + x2 + x3 )2 (1 + x + x2 + · · · )5 (1 + x)4 | {z }| {z } | {z } two 3-sets

five unlimited-sets

four 1-sets

The coefficient of x4 in this function f (x) was seen in the previous example to be 741. Example. Verify that 14 is the coefficient of x8 in the function h(x) = (1 + x + x2 + x3 )(1 + x + x2 + x3 + x4 + x5 )(1 + x + x2 + x3 + x4 ) from part (b) of the earlier candy bag example. Solution. h(x)

= = =

1 − x4 1 − x6 1 − x5 1−x 1−x 1−x 1 (1 − x4 − x5 − x6 + x9 + x10 + x11 − x15 ) (1 − x)3         4 2 5 3 6 4 10 8 (1 + 3x + x + x + x + ··· + x )· 2 3 4 8 (1 − x4 − x5 − x6 + · · · − x15 )

The coefficient of x8 is         10 6 5 4 1 −1 −1 −1 = 14. 8 4 3 2 Example. The number of ways to make change for a dollar if 50¢ pieces are allowed but a $1 coin is not is 293. Solution. The coefficient of x100 in (1+x+· · ·+x100 )(1+x5+· · ·+x100 )(1+x10+· · ·+x100 )(1+x25+· · ·+x100 )(1+x50+x100 ) is 293, as can be seen by using a computer.

2.7. CHAPTER 7

125

Section 7.4: Counting Orbits Example (Example 7.14). How many possibilities are there for a 4-bead necklace, if black, gray, and white beads are available in unlimited supplies? The necklace can be freely rotated and flipped to any orientation. Solution. There are 34 = 81 necklaces with a Figure 7.4. Project it on a screen. d d d d ba d d ba ba d d ba t t t t d d ba d ba d ba d d d d ba d t t d t d d t ba t t d d ba t d ba d ba t d d ba d ba d d ba d ba dba dba ba d d ba d ba d ba d ba d d dba d t t d t t t t t t t t t d d t ba d d d d ba d d d d d d d d d d ba dba d ba t t d d ba t t t t t t t t t d ba dba t t d d t d d d d d d d d d t t d t d ba d ba t d ba d ba dba dba ba d d ba d ba d ba d ba t t dba d d d ba d d ba d ba d dba ba d d ba d ba d d d d dba d d t d t t d t t t t d d d d t ba d d ba t d ba t t dba t t t t d ba d ba d ba dba t d d ba t d d t dba d t d d d ba d ba d d t ba d t d d ba d ba t d dba t d ba d ba d d d ba dba t t d d ba t t d ba d t ba t t d d t t dba d d d t d d ba t d dba d d t d ba d ba d d d d t dba t ba d d ba t d ba d t dba d dba dba t d d d ba d ba d ba dba t d t t t d ba t d d ba t d t t ba d d t t t t dba d dba d

fixed orientation, as pictured in

d d dba dba t t

t dba t d dba d

t d t dba dba t

bad d d dba d t

bad t d t d dba

d d dba dba t t

However, each row contains necklaces that are the same under rotations and flips. So the number of necklaces is 21, the number of rows in Figure 7.4. The formal definition of a group is given in Definition 7.2. For our purposes, a group is a set of symmetries (of interest) for some object.

126

CHAPTER 2. LECTURE NOTES

Example. Let n ≥ 3 and let the object B be a regular n-gon. 1q Z  5 q BB B Bq 4

1q   q 6 T TT q 5

Z 2 Zq   q 3

q2 T T Tq 3    q 4

For each i = 0, 1, . . . , n − 1, let ri be the rotation of B by ni of a full clockwise rotation. The cyclic group of order n is Zn = {r0 , r1 , . . . , rn−1 }. Let f1 , f2 , . . . , fn be the n different flips of B about lines of symmetry through the center of B. The dihedral group of order 2n is Dn = {r0 , r1 , . . . , rn−1 , f1 , f2 , . . . , fn }. Note that {f1 , f2 , . . . , fn } does not form a group by itself. Definition. (Informal) Let G be a group of symmetries of a fixed object B, and let X be a set of “colorings” of B. Then, we regard each g in G as permuting the elements of X. That is, g turns one “coloring” of B into another “coloring” of B. We say that G acts on X. Example. D4 acts on the colorings of the square (i.e. each corner is colored) shown in Figure 7.4. r1



u u ca e e

=

cae u e u

f4



u u ca e e

=

u u e e ca .

and

Here, f4 is the flip about the vertical line through the center of the square. Definition. Let a group G act on a set X. For each x ∈ X, the orbit of x is the set Orb(x) = {y : y ∈ X and y = gx for some g ∈ G}. An orbit is a set Orb(x) for some x ∈ X. Example. Under the action of D4 on the colorings of the square shown in Figure 7.4, the orbits are the rows shown there. Theorem. If a group G acts on a set X, then the orbits are equivalence classes for an equivalence relation on X. Application. Given a group G of symmetries of an object B and a set X of “colorings” of B, each resulting orbit from the action of G on X is a set of colorings we consider equivalent with respect to the symmetries in G. The number of orbits N is thus the number of “colorings” of B we consider distinct after the symmetries from G are stripped out. We want to count N .

2.7. CHAPTER 7

127

Theorem (Burnside’s Formula). Let a group G act on a set X, and let N be the number of orbits under this action. Then, N=

1 X |Fix(g)|, |G| g∈G

where, ∀ g ∈ G, Fix(g) = {x : x ∈ X and gx = x}, called the fixed points of g. Example (Example 7.14 Revisited). Let X be the set of colorings of the vertices of a square in black, gray, and white. Count the number of orbits N of X under the natural action of D4 . Solution. Case 1 : g = r0 the identity. So |Fix(r0 )| = 34 = 81. Case 2 : g = ri for i = 1 or 3. That is, So |Fix(ri )| = 3. . I R @  Case 3 : g = r2 . That is, So |Fix(r2 )| = 32 = 9.

6 ?

Case 4 : g = fi for i = 1 or 2. That is, So |Fix(fi )| = 33 = 27.



Case 5 : g = fi for i = 3 or 4. That is, So |Fix(fi )| = 32 = 9.

6 ? 6 ?

N

=

or

or

 ? - 6 .

I . R @  -

or

 - .

1 X |Fix(g)| |D4 | g∈D4

= =

1 (|Fix(r0)|+|Fix(r1)|+|Fix(r3)|+|Fix(r2)|+|Fix(f1)|+|Fix(f2)|+|Fix(f3)|+|Fix(f4)|) 8 1 168 (81 + 3 + 3 + 9 + 27 + 27 + 9 + 9) = = 21. 8 8

Example. If the squares in the previous example could not be flipped over, then how many possible necklaces would there be? Solution. Here G = Z4 , but as before |Fix(r0 )| = 34 , |Fix(r1 )| = |Fix(r3 )| = 3, and |Fix(r2 )| = 32 . Now, 1 N = (34 + 2(3) + 32 ) = 24. 4 Note now that each of the last 3 rows of Figure 7.4 split into two separate orbits (necklaces). Example. A merry-go-round company makes 8-animal merry-go-rounds and uses 5 different types of animals. How many different merry-go-rounds can this company make?

128

CHAPTER 2. LECTURE NOTES u !!aa ! au u L Lu u L L L Lu u a ! aau !!

Solution. Here G = Z8 . |Fix(r0 )| = 58 . |Fix(r1 )| = |Fix(r3 )| = |Fix(r5 )| = |Fix(r7 )| = 5. |Fix(r2 )| = |Fix(r6 )| = 52 . |Fix(r4 )| = 54 . 1 N = (58 + 4(5) + 2(52 ) + 54 ) = 48915. 8 Example (Example 7.18). How many possibilities are there for a die made from a cube by coloring each face either black or white? Solution. Let G be the symmetry group of a cube. So |G| = 6 · 4 = 24. Case 1 : g moves no faces. |Fix(g)| = 26 . Case 2 : g is one of 3 · 2 = 6 symmetries fixing a pair of opposite faces and rotating the remaining four by ±90◦ around a line through the center of the fixed opposite faces. ? 6 

|Fix(g)| = 23 . Case 3 : g is one of 3 symmetries fixing a pair of opposite faces and rotating the remaining four by 180◦ around a line through the center of the fixed opposite faces. 

|Fix(g)| = 24 . Case 4 : g is one of 6 symmetries reversing the ends of each of a pair of opposite edges. 

|Fix(g)| = 23 .

2.7. CHAPTER 7

129

Case 5 : g is one of 4 · 2 = 8 symmetries rotating the cube by ±120◦ about a line through a pair of opposite vertices.   I

|Fix(g)| = 22 . The above cases account for all 1 + 6 + 3 + 6 + 8 = 24 elements of G. N=

1 (1(26 ) + 6(23 ) + 3(24 ) + 6(23 ) + 8(22 )) = 10. 24

Example. The pictured mobile is to be hung from the central point, with each location ◦ filled by a sun, a moon, or a star. If each • marks a rotational center, then how many different mobiles are possible? e

e

e u

e u

e

u

e e

Solution. Each 3-item piece e

u e e u

e

e u

e

e

e

can be filled in one of

1 3 (3 + 2(3)) = 11 3 ways. So the number of ways to complete the full mobile is 1 (114 + 2(11) + 112 ) = 3696. 4

130

CHAPTER 2. LECTURE NOTES

Section 7.5: Combinatorial Arguments If we create a counting problem and solve it in two different ways, then those two solutions must be equal.   n−1 Example (Example 7.19). Show: For each 1 ≤ k ≤ n−1, nk = n−1 k−1 + k . Proof. The number of ways to choose a subset of size k from {1, 2, . . . , n} is   n . k The number of ways to choose a subset of size k that contains the element n is n−1 k−1 . The numberof ways to choose a subset of size k that does not contain the element n is n−1 k . So the number of ways to choose a subset of size k is     n−1 n−1 + . k−1 k These two results must be equal. n   X n k Example. Show: For each n ∈ N, 9 = 10n . k k=0

n

Proof. There are 10 decimal sequences of length n. For each 0 ≤ k ≤ n, the  number of decimal sequences of length n with exactly k nonzero digits is nk 9k . Hence, the total number of decimal sequences of length n is n   X n k 9 . k k=0

This must equal 10n .    n   X n n 2n Example (Simplified Example 7.22). Show: ∀ n ≥ 0, = . k n−k n k=0

Proof. Given an n + 1 by n + 1 square grid of points tdn

St -

t

t

t

t

? t

t

. t.

t

? t-

td2

t

t

t

td1

? t-

t

t

td0

t

t

? t-

t F

.

t

2.7. CHAPTER 7

131

 the number of paths from S to F which only move to the right or down is 2n n . n For each 0 ≤ k ≤ n, the number of paths that pass through dk is nk n−k . So the total number of paths is  n   X n n . k n−k

k=0

This must equal

 2n n

.

Example. Show: ∀ n ≥ 1,

n X

k−1

(−1)

k=1

  n 10n−k = 10n − 9n . k

Proof. There are 10n − 9n decimal sequences of length n thatcontain at least one 0. For each 1 ≤ j ≤ n, let Aj be those which have a 0 in position j. For each 1 ≤ j1 < j2 < · · · < jk ≤ n, |Aj1 ∩ Aj2 ∩ · · · ∩ Ajk | = 10n−k . By the Principle of Inclusion-Exclusion, 10n − 9n =

n X k=1

(−1)k−1

  n 10n−k . k

132

CHAPTER 2. LECTURE NOTES

2.8

Chapter 8

Section 8.1: Motivation and Introduction Motivation Example. Computer Network.         1 2

Graph.

    3

    4

1s

    5

2s

s3

s 4

s 5

Can we analyze connection issues? Example. Housing Development.

Graph. m

s

s

s

sm

s

s

s

s

s

s

s

Can we plan a plowing route? Example. K¨ onigsberg Bridge Problem. A 1  

2

3

 4 

B

C

6

5

7 D

Graph. At @ 1 @3 2 @ 4 @tC Bt 6 7 5 t D

What is a good sightseeing tour? Example. Scheduling Conflicts. Math Math C.S. Film Pool Bowling

X X X X

C.S. X

Film X

X X

How can we schedule meetings?

Graph. Pool X X

Bowling X X

Ft

Mt

tB

t P

t C

2.8. CHAPTER 8

133

Note that the first and fourth graphs are the “same”. Introduction Definition. A graph G = (V, E) consists of (i) a set V of vertices (points), (ii) a set E of edges (curves), and (iii) an incidence assignment of each edge to a set of two or one endpoint vertices. Example. Graph drawing. 1t

a

2t

 t3 c 

b e d

f

t 4

Description. V = {1, 2, 3, 4} and E = {a, b, c, d, e, f } with a 7→ {1, 2}. b 7→ {2, 3}. c 7→ {3}. c is a loop edge. d 7→ {2, 4}. e 7→ {2, 4}. d and e are multiple (parallel) edges. f 7→ {3, 4}. Definition. A simple graph is a graph with no loops and no multiple edges. E.g. The previous graph is not simple. The first graph given (for the computer network) is simple.

The technical rules for a drawing of a graph are outlined in Definition 8.2. t t t :     A crossing of edges is allowed in a drawing.

t

t

Definition. A subgraph of a graph G = (V, E) is a graph H = (W, F ) such that W ⊆ V , F ⊆ E, and the set of endpoints of edges from F is a subset of W . If F equals the set of edges whose endpoints are in W , then H is the subgraph induced by W .

134

CHAPTER 2. LECTURE NOTES

Example. Given the following graph G, 1t 2t a b e d

 t3 c  f

t 4

this is a subgraph with vertext set W = {2, 3, 4}, 2t b t3 d

t 4

while this is the subgraph induced by W = {2, 3, 4}.  2t b t3 c  e f d t 4 Definition. A walk in a graph G = (V, E) is an alternating sequence of linked vertices and edges v0 , e1 , v1 , e2 , v2 , e3 , . . . , vn−1 , en , vn , whose length is taken to be n. The distance dist(u, v) between two vertices u and v is the length of the shortest walk from u to v. We also consider special kinds of walks. (i) A circuit has n > 0 and v0 = vn . (ii) A trail has no repeated edges. (iii) A path has no repeated vertices. (iv) A cycle has vn = v0 and no other repeated vertices. Example. Consider different kinds of walks in this graph.  t t t xt  t

Note that dist(x, y) = 5.

t

t

t

t

t

ty

2.8. CHAPTER 8

135

Definition. A graph is connected if you can walk between any pair of vertices. Otherwise it is disconnected. Example. This graph is disconnected.

It has 3 components.

t

t

t

 t 

t

t

t

t

t

t

t

136

CHAPTER 2. LECTURE NOTES

Section 8.2: Special Graphs The path Pn . The cycle Cn .

t1

t2

t3 . . .

tn − 1

tn

1t Z

t n

Z Zt2 BB  B  Bt . . . t 

n−1

3

Theorem.  If G = (V, E) is a simple graph on n = |V | ≥ 2 vertices, then |E| ≤ n2 . The complete graph Kn is the simple graph on n vertices with all edges. E.g. K5 . 1t BZ  BZ t Zt2 5   B  BZ B ZZ B  B  Z  Bt ZBBt 4 3

n 2



possible

The empty graph Φn has n vertices and no edges. Definition. A graph is bipartite if its vertices can be split into two sets (a bipartition) such that each edge goes from one set to the other. Bipartite t t HH   H  H t H t   t 

Not bipartite: Example 8.12 t t @ @ @t

Theorem. A graph is bipartite iff every cycle in it has even length (i.e. no odd cycles are present). The complete bipartite graph Km,n joins m vertices to n vertices with all mn possible edges. E.g. K3,4 . t t H  @ J HH   J@ HH tH t J@ @H @ H J  HH tH @ @t @J HH J @ H J Jt H @

2.8. CHAPTER 8

137

The Platonic Solids Project Figure 8.17 on a screen or bring models to class. t

t

t

t

t

t

t

t t

t

t

t

t

t

t

t

Tetrahedron

t

Cube

t

t

t

t

Octahedron

t

t

t

t

t

t

t

t

t t

t t

t

t

t

t

t

t

t

t

t

t

t t

t

t

t

Dodecahedron

Icosahedron

Definition. The n-dimensional cube Qn is the graph whose vertex set is the set of binary sequences of length n and whose edges connect two vertices iff they differ in exactly one coordinate. Project Figure 8.19 on a screen. Q4

1001

t

t1011 t0001

1101

t

0011

t

t t

t

0101

t

1111

0111

t0010

0000

t 0100

1100

t

t

t

1000

0110

1010

t

t

1110

t

t

138

CHAPTER 2. LECTURE NOTES

Section 8.3: Matrices Definition. An adjacency matrix for a graph G on vertices v1 , v2 , . . . , vn is an n × n matrix whose entry in row i and column j is the number of edges connecting vi to vj . Example. The following graph G with vertex list 1, 2, 3, 4  1t 2t t3  t 4 has adjacency matrix A. 1 2 3 4

 1 0  1   0 0

2 1 0 1 2

3 0 1 1 1

4 0 2 1 0

  =A  

A graph without multiple edges can also be represented by adjacency lists. Example. A graph and its adjacency lists.  1t t2 

1 : 2, 3 2 : 1, 2 3: 1

t 3 Recall how to multiply matrices.   3 5 7 1 6 4

2 0



 =

41 31

6 2



Theorem. If A is an adjacency matrix for a graph G on vertices v1 , v2 , . . . , vn , then Am has the property that the entry in row i and column j is the number of walks of length m from vi to vj . Example. From the graph G with adjacency matrix A above, we have 1 2 3 4

 1 2 3 4  1 0 1 2  0 6 3 1  = A2 .    1 3 3 3  2 1 3 5

Note how the result of the previous theorem is illustrated here. Note that the entry in row 1 and column 2 of A3 would be 6. Count walks!

2.8. CHAPTER 8

139

Section 8.4: Isomorphisms Are graphs G and H the same?  G

3s  @ @ @ @ @ @s @s s 4 5 2 1s @

Answer: Yes.

G

 H

8s 6s  H HH @ H @ HH@ HH @s s s 9 10 7





1s @

3s  @ @ @ @ @ @s @s s 2 4 5

1 7→ 9 2 7→ 7 3 7→ 6 4 7→ 8 5 7→ 10

H

9s @

6s  @ @ @ @ @ @s @s s 7 8 10

Definition. A graph isomorphism f : G −→ H is a bijection between the vertex sets with a corresponding bijection between the edge sets that respects endpoints. When one exists, we say G is isomorphic to H, written G ∼ = H. A graph isomorphism from a graph G to itself is called an automorphism. Example. The above graph H is isomorphic to the pictured graph  K

1s @ @

2s @ @s 4

3s 

s 5

via 6 7→ 3, 7 7→ 2, 8 7→ 4, 9 7→ 1, 10 7→ 5. Example (Part of Example 8.23.). The Petersen graph. 1t Z  t Z  6 Z 2 5X Zt tXt C t   L  C , l L 10 l C 7  , L 9 t,lCt8 L  A Lt At 4 3

1 7→ a 2 7→ b 3 7→ c 4 7→ h 5 7→ i 6 7→ j 7 7→ f 8 7→ d 9 7→ g 10 7→ e

at !a a i! ! t atb  T  TTt t h  c t  D "b " j b  DDt" b " bt g @ d @t t f e

Definition. A graph is vertex transitive if, for any vertices u and v, there is a graph automorphism f with f (u) = v.

140

CHAPTER 2. LECTURE NOTES Exercise 30 asks for a proof that the Petersen graph is vertex transitive.

Example. Find all of the automorphisms of the following graph. 2u 5u @ @ @1u @u6 3 u @ @ @u @u 4 7 Solution. 1) The identity map. 2) Switch 2 ↔ 4. 3) Switch 5 ↔ 7. 4) Switch 2 ↔ 4 and 5 ↔ 7. 5) Switch 2 ↔ 5, 3 ↔ 6, and 4 ↔ 7. 6) Switch 2 ↔ 7, 3 ↔ 6, and 4 ↔ 5. 7) 3 ↔ 6, 5 7→ 4, 7 7→ 2, 2 7→ 5, and 4 7→ 7. 8) 3 ↔ 6, 2 7→ 7, 4 7→ 5, 5 7→ 2, and 7 7→ 4. Note that there are 23 = 8 automorphisms. Theorem. The set of automorphisms of a graph G, denoted Aut(G), forms a group under composition. E.g. Aut(P8 ) = Z2 . Definition. A graph map f : G −→ H is a function from the vertices of G to the vertices of H with a corresponding edge function that respects endpoints. Example. A graph map from G to H 1s G

a

2s

b e d

 s3 c 

g

s 4

is given by 1 7→ 6, 2 7→ 5, 3 7→ 6, 4 7→ 6 and a 7→ y, b 7→ y, c 7→ w, d 7→ y, e 7→ y, g 7→ w.

H

5s @

y z @ x@ @s 7

 s6 w 

2.8. CHAPTER 8

141

Section 8.5: Invariants How can we show G ∼ 6 H? = Theorem. If G ∼ = H, then |VG | = |VH | and |EG | = |EH |. We use the contrapositive of this result. Example. (a) P4 ∼ 6 C3 , since they have different numbers of vertices. = (b) C4 ∼ 6 K4 , since they have different numbers of edges. = Definition. The degree of a vertex v, denoted deg(v), is the number of ‘ends’ of edges incident with v. Example 2.7. In the pictured graph  us ws  @ @ @ @ @ @ @s @s s v x y deg(u) = 3, deg(v) = 4, deg(w) = 5, deg(x) = 4, and deg(y) = 2. Definition. Let G = (V, E) be a graph. (a) The maximum degree of G, denoted ∆(G), is the maximum degree among all vertices in G. (b) The minimum degree of G, denoted δ(G), is the minimum degree among all vertices in G. (c) A degree sequence for G is a list of the degrees determined from a listing of the vertices of G. (d) G is r-regular if all vertices have degree r. (e) An isolated vertex is a vertex of degree 0. (f) A pendant vertex (or leaf) is a vertex of degree 1. Example. The graph G in Example 2.7 has ∆(G) = 5 and δ(G) = 2. 2, 3, 4, 4, 5 is a degree sequence for G (determined by the listing y, u, x, v, w of the vertices). Example. (a) C4 is 2-regular. (b) Φ4 has 4 isolated vertices. (c) P4 has 2 pendant vertices.

142

CHAPTER 2. LECTURE NOTES

Theorem. If G ∼ = H, then ∆(G) = ∆(H), δ(G) = δ(H), and G and H have a common degree sequence. Example. The pictured graphs G and H are not isomorphic  G



s s  @ @ @ @ @ @ @s @s s

H

s @

s  @ @ @ @ @ @s @s s

since δ(G) 6= δ(H). (Note, however, that |V |, |E|, and ∆ are the same.) Example. The pictured graphs G and H are not isomorphic G

s   s  A A As

s A A As   s

H

s s

A J  J A s As J

J A  A J  A

Js s

since G has the degree sequence 2, 2, 3, 4, 4, 5 and H has the degree sequence 2, 3, 3, 3, 4, 5. These are not permutations of each other. (Note, however, that |V |, |E|, ∆, and δ are the same.) Theorem. For any graph G = (V, E),

X

deg(v) = 2|E|.

v∈V

Proof. Each edge contributes 2 to the degree sum. E.g. In the graph G in the previous example, 2 + 2 + 3 + 4 + 4 + 5 = 2(10). Corollary. A graph must have an even number of odd-degree vertices. Additional Tools Proposition. If G ∼ = H, then G and H have the same number of components. Definition. Given a simple graph G = (V, E), its complement is Gc = (V, P2 (V ) \ E).

2.8. CHAPTER 8

143

Example 2.8. Pictured are graphs G and H with their complements below. s s s s H G

A A J J A  J A  J s As s As  J J

J A A   J A J  A J  A

As Js s Js s s s s Gc Hc



s s s s



s

s s s Theorem. If G ∼ = H, then Gc ∼ = H c. Example. The graphs G and H in Example 2.8 are not isomorphic, since their complements are not isomorphic. Note that ∆(Gc ) 6= ∆(Gc ). Example. Show that the pictured graphs G and H are not isomorphic s s s s H G s

s

s

s

s

s

Proof. Consider the subgraphs induced by the degree 2 vertices in each graph. Those are not isomorphic, since that subgraph is connected in G and not in H. The union and the intersection of two subgraphs of a fixed graph are defined by performing that same operation on their sets of vertices and edges. Definition. The disjoint union of two graphs G and H is a new graph, denoted G + H, constructed so that it is a disjoint union G0 ∪ H 0 , where G0 ∼ = G and H0 ∼ = H. Example. P2 + C4 is pictured. s

s

s

s

s

s

Example (Example 8.33). The product of the pictured graphs  H G t  t

t

and t

t

144

CHAPTER 2. LECTURE NOTES

is the displayed graph G × H.

t

t

t

t

t

t

Notice that G×H contains |VH | = 3 disjoint copies of G, as subgraphs. Similarly, it contains |VG | = 2 disjoint copies of H. Theorem. For n ≥ 2, Qn ∼ = Qn−1 × P2 . E.g. Q3 ∼ = Q2 × P2 . (0,0,1)

(1,0,1)

t

(0,0,0)

(1,0,0)

t

t

t(0,1,1)

t(1,1,1) t

t(0,1,0)

t(1,1,0)

2.8. CHAPTER 8

145

Section 8.6: Directed Graphs and Markov Chains Example. Bus Routes.

Digraph t

 -



t -

t -

t

t -

? 6 t

?

? 6 

6 t -

t -

6 ?

-

? 6 t 

6

t



What is the shortest route between two given locations? Definition. A directed graph (or digraph) is a graph in which each edge e is given a particular direction from a tail vertex u to a head vertex v. That is, incidence is assigned e 7→ (u, v). With the understanding that a walk in a directed graph must traverse each of its edges from tail to head, the elementary concepts (length, circuit, trail, path, cycle, distance) introduced for ordinary graphs also apply to directed graphs. Definition. A digraph is strongly connected if, between every pair of vertices u and v, there exists both a path from u to v and a path from v to u. E.g. The bus route digraph above is strongly connected. Example. The following digraph is NOT strongly connected. 1t

 2t -

? 5

t -

6 t -

6

3t



? 6 t 7

t4 6  t8 6 

It has 2 strong components. One is induced by {1, 2, 5, 6}, and the other is induced by {3, 4, 7, 8}. This graph is weakly connected, since its underlying graph is connected. For a vertex v in a directed graph, indeg(v) is the number of edges whose head is v, and outdeg(v) is the number of edges whose tail is v. E.g. In the graph in the preceding example, indeg(8) = 2 and outdeg(3) = 1.

146

CHAPTER 2. LECTURE NOTES

Markov Chains Definition. (a) A Markov chain is a process which jumps among certain states, such that the likelihood of a next state depends only on the current state and not on previous states. (b) The corresponding Markov chain graph is the directed graph whose vertices are the states, and for which each edge (u, v) is assigned the probability Xp(u, v) of transitioning from state u to state v. For each state u, p(u, v) = 1. v∈V

Example 2.9. A cop has 4 hiding spots from which he catches speeders. Each hour he moves his position according to the following Markov chain graph, so that drivers cannot predict his whereabouts.   .5 .7 At Bt  @ @ @ .8 ?.5 .6 6.3 ? @@ I @ @  t @t  .2 .4 D C   Definition. The transition matrix for a Markov chain with states v1 , . . . , vn has, for each i, j, the probability p(vi , vj ) in row i and column j. Example. Displayed is the transition matrix M for the Markov chain in Example 2.9. C D A B 0 .7 0 .3 A  0 .5 .5 0  = M B    .8 0 0 .2  C D .6 0 0 .4 Theorem. Let m ∈ Z+ , and let M be the transition matrix for the Markov chain with states v1 , . . . , vn . For each i, j, the entry in row i and column j of M m is the probability of transitioning from vi to vj in exactly m iterations. Example. Let M  .18  .4 M2 =   .12 .24

be the transition matrix for the Markov chain in Example 2.9.    .35 .35 .12 .352 .301 .175 .172   .25 .25 .1   M 3 =  .26 .405 .125 .21    .56 0 .32 .192 .364 .28 .164  .42 0 .34 .204 .378 .21 .208

If the cop is at location B, then the probability that 3 hours later he will be at location C is 0.125.

2.8. CHAPTER 8

147

Definition. (a) A Markov chain is irreducible if its graph is strongly connected. Strong components are called classes. (b) A state u has period p ∈ Z+ if every circuit starting at u has length a multiple of p. If p > 1, then u is periodic. Otherwise, u is aperiodic. (c) A Markov chain that is irreducible and only has aperiodic states is regular. Theorem. Let M be the transition matrix for a regular Markov chain with states v1 , . . . , vn . Then, lim M m = M ∞ , a matrix all of whose rows are the m→∞ same. The entry in column i of M ∞ is the longterm probability of being in state vi , independent of the initial state. Example. Let M be the transition matrix for the Markov chain in Example 2.9.   .261 .365 .183 .191  .261 .365 .183 .191  ∞  M 30 ≈   .261 .365 .183 .191  ≈ M .261 .365 .183 .191 In the longrun, the cop spends 36.5% of his time at location B and 18.3% of his time in location C. Example. A basketball game in which each basket earns 1 point is tied, and it is decided that a team must win by 2. Team A is better than Team B, and we have the following Markov chain with states B W = ’B wins’, B + = ’B is up by 1’, T = tied, A+ = ’A is up by 1’, and AW = ’A wins’. W  A+ t -A t 1 6 .52  .52 .48 ?6

T t

W

B B+ T A+ AW

B     

W

1 .48 0 0 0

B+ 0 0 .48 0 0

T 0 .52 0 .48 0

A+ 0 0 .52 0 0

AW 0 0 0 .52 1

   =M   

.48 ?6 .52  .48 t t 1 6 B+ B W  There are three classes {B W }, {B + , T, A+ }, and {AW }. Each state has period 2. States B W and AW are absorbing.    1 0 0 0 0 1 0 0  .48 .2496  .719 0 0 0 .2704 0     30  0 .4992 0 .2704  M2 =   .2304  M ≈  .460 0 0  0   .221 0 0 .2304 0 .2496 .52 0 0 0 0 1 0 0 0

 0 0 0 .281   0 .540   0 .779  0 1

From a tie, Team A wins 54% of the time, and Team B wins 46% of the time.

148

CHAPTER 2. LECTURE NOTES

2.9

Chapter 9

Section 9.1: Connectivity Example 2.10. Given a communication network, sc b s s

s

s

s

s

a s

s

s

s

s d

s

how few node losses will leave a disconnected network? Solution. The removal of any one node will not disconnect the network. If a and c are removed, then b cannot communicate with d. So 2 is the smallest number of node losses that will leave a disconnected network. Definition. Let G be any non-complete graph. (a) A disconnecting set for G is a set D of vertices whose removal leaves a disconnected graph. (b) The connectivity κ(G) is the minimum size of a disconnecting set. (c) A κ-set is a disconnecting set of size κ(G). (d) κ(Kn ) = n − 1. Theorem. Let n ≥ 3. Then, κ(Pn ) = 1 and κ(Cn ) = 2. Proof. In Pn , remove 2. t1 In Cn , remove 1 and 3.

t2

t3 . . .

tn − 1

tn

1t Z

t n

Z Zt2 BB  B  Bt . . . t 

n−1

3

Lemma. If D is a disconnecting set for a graph G, then κ(G) ≤ |D|. Theorem. κ(G) ≤ δ(G).

2.9. CHAPTER 9

149

Proof. Consider as a disconnecting set the set D of neighbors of a vertex of minimum degree. Example. The graph G in Example 2.10 above has κ(G) = 2 < 3 = δ(G). Theorem. For any graph G, G is connected and 2-regular iff G ∼ = Cn for some n ∈ Z+ . Example. The cycles.  t t 

t A t At

t

t

t

t

t

···

Theorem. κ(Km,n ) = min{m, n}. E.g. Consider K3,4 . t t H  @ J HH  @ HHt tJ H J@ @H @ J H t @ JHH @t H H@ J HH @ J H @ Jt The 3 vertices on the left form a unique κ-set. Edge Connectivity Definition. The edge connectivity λ(G) is the minimum size of a set of edges whose removal disconnects G. Example. The graph G in Example 2.10 earlier has λ(G) = 3. Note that κ(G) < λ(G) here. Theorem. κ(G) ≤ λ(G) ≤ δ(G). Example. Computer Network.         1 2     4

Graph G.     3     5

Observe that κ(G) = λ(G) = δ(G) = 1. Theorem. For any 3-regular graph G, κ(G) = λ(G).

1s

2s

s3

s 4

s 5

150

CHAPTER 2. LECTURE NOTES

Example (Example 9.3.). The following graph G t @

t @

t

@ @t

has κ(G) = λ(G) = 2 < δ(G) = 3.

t @ @ t

t @ @t

2.9. CHAPTER 9

151

Section 9.2: Euler Circuits Example. K¨ onigsberg Bridge Problem.

Graph. At @

A 1 1  

2

3

 4 

B

Bt

C

6

6

5

@3 @ 4 @tC

2

7

5

D

7

t D

Can we find a walk that starts and ends at the same place in K¨onigsberg and passes over each bridge exactly once? Definition. An Euler circuit (respectively, Euler trail), is a circuit (respectively, trail) which covers every edge exactly once and hits every vertex. A graph is Eulerian if it has an Euler circuit. Example. The pictured graph  3 g c  t t @d @ @ @i a b @ h @ @ e @ @ @ @t @t t f j 2 4 5 1

has an Euler circuit a, b, c, g, h, f, e, i, j, d. Example. The pictured graph 1t

a

2t

 t3 c 

b e d

f

t 4

has an Euler trail a, b, c, f, e, d but no Euler circuit. Example. The K¨ onigsberg Bridge Graph has neither an Euler circuit nor an Euler trail. Theorem (Euler’s Theorem). A graph G is Eulerian iff G is connected and every vertex of G has even degree. A non-Eulerian G has an Euler trail iff G is connected and has exactly two vertices of odd degree.

152

CHAPTER 2. LECTURE NOTES

Example (Proof Method for Euler’s Theorem). We illustrate our technique on the following example.  3 g c  t t @ @d @i @ a b @ h @ @ e @ @ @ @t @t t f j 2 4 5 1

Suppose we start with the circuit a, b, c, g, h, d, which puts us stuck back at 1 without having covered every edge. Since vertex 3 has unused edges, we build from there the circuit i, j, f, e of unused edges, which we can now insert in the original circuit at vertex 3 between edges g and h. We get the circuit a, b, c, g, i, j, f, e, h, d, which is an Eulerian circuit. Example. Housing Development.

Relevant graph. h

s

s

s

m sh

s

s

s

s

s

s

s

Assuming that we must separately plow each side of each street, can we find a plowing route starting and ending in the same place that plows each side of each street exactly once? Solution. Yes, by Euler’s Theorem applied to the relevant graph. Example. Pictured is an Eulerian directed graph. t



t -

t -

t

t -

? 6 t

? t -

6 t -

? 6 t

 t

In a strongly connected directed graph, we need the in-degree to equal the out-degree at each vertex.

2.9. CHAPTER 9

153

Section 9.3: Hamiltonian Cycles Example 2.11. Delivery Route.

Graph. s1

s3

s6

s2

s4

s7

s9

s5

s8

s10

Assume there is a mailbox at each intersection of this neighborhood. Starting and ending in the same place can we find a delivery route that visits every mailbox exactly once? Definition. A Hamiltonian cycle (respectively, Hamiltonian path) is a cycle (respectively, path) that visits every vertex. A graph is Hamiltonian if it has a Hamiltonian cycle. Example. The graph in Example 2.11 has a Hamiltonian cycle 1, 3, 6, 7, 9, 10, 8, 5, 4, 2, 1. Example 2.12. The following graph is not Hamiltonian. u u @ @ u @u @u @ @ @u @u When you go from one side to the other, it is impossible to go back. There is no known theorem characterizing Hamiltonian graphs in a nice way. Theorem. If G is Hamiltonian, then κ(G) ≥ 2. Proof. A Hamiltonian cycle forms a subgraph with connectivity 2. The contrapositive of the previous theorem says: If κ(G) ≤ 1, then G is not Hamiltonian. That also proves the assertion in Example 2.12 above. Example (Example 9.13.). ∀ n ≥ 2, Qn is Hamiltonian. Proof. (By induction.) Base case: Q2 ∼ = C4 is Hamiltonian. Inductive step: Suppose k ≥ 2 and Qk is Hamiltonian.

154

CHAPTER 2. LECTURE NOTES

Since Qk+1 ∼ = Qk × P2 , we can truncate a Hamiltonian cycle in Qk to a Hamiltonian path and use it to construct a Hamiltonian cycle in Qk+1 , as shown. u t

tv

(u, 1) t

t(v, 1) t(v, 2)

  t 

(u, 2)

? w t

tx

P = u, w, x, v Q = v, x, w, u

6

(w, 1) t

?

6 (w, 2) t

t(x, 1)

-



t(x, 2)

The following result tells us that very dense graphs must be Hamiltonian. Theorem (Theorem 9.11). For any simple graph G = (V, E), if δ(G) ≥ |V2 | > 1, then G is Hamiltonian. The following result gives us tools to show that a graph is not Hamiltonian. Theorem. If C is a Hamiltonian cycle in a graph, then (i) C covers exactly two edges incident with each vertex, and (ii) C contains no (premature) cycle on fewer than all of the vertices. Example. Show that the following graph is not Hamiltonian. v

v

v

v

v

Proof. Suppose we have a Hamiltonian cycle C. Then C must contain the edges incident with the degree 2 vertices a and b, as shaded. a v

v

vb

v

v

However, C now contains a premature cycle. This is a contradiction.

2.9. CHAPTER 9

155

Tournaments Definition. A tournament is a directed graph whose underlying graph is complete. Example. The following tournaments represent the results from two groups in the first round of the 2006 FIFA World Cup. Group E

Group A Germany t tPoland @ R @ ? @ ? @  @t t - @ Ecuador Costa Rica

Italy t

-

tCzech Republic

R ? I  t Ghana

? t United States

Group A has a unique Hamiltonian path: Germany, Ecuador, Poland, Costa Rica. In Group E, the doubled edges reflect the tie between Italy and the United States in their first round match. One possible Hamiltonian path there is: Italy, Ghana, Czech Republic, United States. However, another is: United States, Italy, Ghana, Czech Republic. This is interesting because the United States did not win a single match, and Italy went on to win the World Cup in 2006. Theorem. Every tournament has a Hamiltonian path. Proof. The inductive step makes use of the following figure. vn+1 t AU z : t- t . . . t- t At- t . . . t- t v1 v2 vk vn vk+1 We assume we have a Hamiltonian path in the first n vertices. Taking vk+1 to be the first vertex with an edge from vn+1 , we can put vn+1 between vk and vk+1 to form a Hamiltonian path.

156

CHAPTER 2. LECTURE NOTES

Section 9.4: Planar Graphs In graphs reflecting circuit boards or flight plans, for example, we may want to minimize the number of edge crossings. Definition. A graph is planar if it CAN be drawn in the plane without crossings. Example. K4 is planar.

t T  tT ,l , lT t  Tt , l

Example. Show that the pictured graph is planar. t t :      A crossing of edges. Proof.

t

t

t

t

t

t

t

t

Tools to Refute Planarity Definition. A planar embedding of a graph G partitions the plane into a set of regions R, which we use as the vertices in the dual graph D(G). The edges of D(G) join a pair of regions when they share an edge of G as a common border. Example. The pictured planar embedding has regions R = {A, B, C, D, O}. 

O

u S S

B u 

u @ @ S

u @

S A

S S S

Su

@ @ C @ D @

@u

2.9. CHAPTER 9

157

We can draw the dual D(G) on top of G 

'$

Be e u u u   O @ S @ S u &% @ S e  @ S e S @ C A @ S eD @ S @u Su

and then draw D(G) by itself. '$ O

Bu

u



&% u A

u  C uD

Theorem (Euler’s Formula). Given a planar embedding of a graph G, |V | − |E| + |R| = 2 Assign the proof (which is by induction on |V |) as reading. Note in the example above that |V | = 6, |E| = 9, and |R| = 5. Example. The Platonic Solids are planar. Solid Tetrahedron Cube Octahedron Dodecahedron Icosahedron

|V | 4 8 6 20 12

|E| 6 12 12 30 30

|R| 4 6 8 12 20

We see in the exercises that the Cube and the Octahedron are duals, the Dodecahedron and the Icosahedron are duals, and the Tetrahedron is self-dual.

158

CHAPTER 2. LECTURE NOTES Project Figure 8.17 on a screen or bring models to class. t t

t t

t

t

t t

t t

t Tetrahedron

t

t

t

t

Cube

t

t

t

t

t

t

t t

t t

t t

t t

t

Octahedron t

t t

t

t

t

t

t

t

Dodecahedron

t

t

t t

t

t

t t t

Icosahedron

Corollary. If G = (V, E) is planar, then |E| ≤ 3|V | − 6. Proposition. K5 is not planar. Proof. |V | = 5 and |E| = 10. Corollary. If G = (V, E) is planar and has no triangles (and |V | ≥ 3), then |E| ≤ 2|V | − 4. Proposition. K3,3 is not planar. Proof. |V | = 6 and |E| = 9. Theorem (Kuratowski’s Theorem). A graph is NOT planar iff it contains a subgraph that is a subdivision of K5 or K3,3 . What is a subdivision? K3,3 sb a sQ  S Q   S  Q  Q   S Q Qsd s c   Q S   Q  S  Q   QS Q Ss f Q  e s

subdivision of K3,3 sb a sQ  S Qsr   S  Q  Q   S Q Qsd c s  Q S   Q  S  Q s ts   sQS Q Ss f Q  e s

t

t

2.9. CHAPTER 9

159

Example. Show that the following graph G is not planar. 1 v

v2

v  3  

       v7 v 4 v HH  5 H  HH  Hv  6 Proof. Vertices 1, 2, 3, 4, 5, and 7 induce a subdivision of K5 . Definition. The crossing number ν(G) is the minimum possible number of crossings in a drawing of G. Example. The graph G above has ν(G) = 1, since edge {3, 4} can be bent around to leave a drawing with one crossing.

160

CHAPTER 2. LECTURE NOTES

Section 9.5: Chromatic Number A Recreational Math Problem Try to color the vertices of a graph G so that adjacent vertices receive different colors (i.e. specify a coloring of G) using as few colors as possible. The minimum possible number of colors in a coloring is the chromatic number χ(G). Example 2.13. Let G be the following graph. sa sb

A J  J A f s Asc J

J A  A J  s Js d e A

The following is a 4-coloring of G.

s1 s2

A J  J A 2 s As3 J

J A  A J  Js 2 s 4 A

However, here is a 3-coloring of G.

s1 s2

A J  J A 2 s As1 J

J A  A J  Js 2 s 3 A

In fact, χ(G) = 3, since the subgraph induced by {a, e, f } requires 3 colors. In the 3-coloring, the color classes are {a, c}, {b, d, f }, and {e}. Definition. A clique in a graph is a subgraph that is complete. The clique number ω(G) is the maximum number of vertices in a clique. Theorem. χ(G) ≥ ω(G). Example. χ(C5 ) = 3 > 2 = ω(C5 ). Theorem. χ(G) ≤ 2 iff G is bipartite. Definition. An independent set of vertices in a graph G is an induced subgraph that is empty. The independence number α(G) is the maximum number of vertices in an independent set. Theorem. If G is a simple graph, then α(G) = ω(Gc ). Example. α(C6 ) = 3. Theorem. If G has n vertices and no loops, then χ(G) ≥ Example. χ(C6 ) ≥ 63 .

n α(G) .

2.9. CHAPTER 9

161

Greedy Coloring Algorithm Given an ordering of the vertices of G, color the vertices in order with colors 1, 2, 3, . . ., always using the smallest color possible. Example. Using the alphabetical ordering of the vertices, the 3-coloring shown earlier for the graph G in Example 2.13 is given by the Greedy Coloring Algorithm. Example 2.14. Using the alphabetical ordering of the vertices, apply the Greedy Coloring Algorithm to the given graph G. at

Solution.

1t

bt

ct

t d

t e

2t

3t

t 1

t 4

Note, however, that this is not optimal. The Greedy Coloring Algorithm with the order a, b, c, e, d gives a 3-coloring, which is optimal. Corollary. χ(G) ≤ ∆(G) + 1. Proof. Order the vertices in nonincreasing order of degree and apply the Greedy Coloring Algorithm. Note that equality holds for complete graphs and odd cycles. Theorem (Brooks’ Theorem). If G is not complete and not an odd cycle, then χ(G) ≤ ∆(G). Example. In the graph G in Example 2.14 above, χ(G) = 3 < 4 = ∆(G). Applications Example. Scheduling Conflicts. We need to schedule meetings for the student clubs listed in the following table, where an X reflects overlapping membership. Math Math C.S. Film Pool Bowling

X X X X

C.S. X

X X

Film X

Pool X X

Bowling X X

Ft

Mt

tB

t P

t C

162

CHAPTER 2. LECTURE NOTES

Find a schedule that accommodates these needed meetings using the minimum possible number meeting times. Solution. Color the displayed scheduling graph G (where edges join clubs with overlapping membership) using as few colors as possible. 1t

2t

t3

t 3

t 1

Taking the colors as meeting periods yields an optimal schedule. Period 1 2 3

Club Film, C.S. Math Pool, Bowling

Fact: The minimum number of meeting times needed is χ(G).

Example. Map Coloring. Color the provinces of France using as few colors as possible, while keeping provinces that share a border distinguishable. E D

C

B

K

I

A

F

G H

L

J N

O

P

M

Q

R S

T

U V

2.9. CHAPTER 9

163

Solution. From the map of France, form its dual graph G. Es

sD

C s

Bs

K s

Is

As

Es

Fs

Js

Gs

s

sL

Ns

s

R

s

Q

s

sU

T

s

sO

R

s

S

Gs

s

sL

s

P

Fs

Js

M

Ns

s

sO

K s

sI

As

Hs

sD

C s

Bs

s

M

s

P

Q

s

S

Hs

sU

T

s

s

V

V

Color G using as few colors as possible, and translate that coloring back to the map of France. 1s

s2

3s

2 s

4s

s1

1 s

1

1s

3s 2 s

s

1

2s

s

s2 s3 s

2

s

1s

s

3

1

2 1

2

3 2

4

4

1

1

3

2

3

2

3

s

1

4

3

1

1

s2

2

3

s

1

2 1

Theorem (The Four Color Theorem). If G is planar, then χ(G) ≤ 4. Consequently, maps require at most 4 colors. The proof of the Four Color Theorem in 1976 by Appel and Haken considered 1478 reducible configurations and required over 1200 hours of computer time. An improved proof in 1997 (by Robertson, Sanders, Seymour, and Thomas) cut that to 633 reducible configurations and under 4 hours of computer time.

164

CHAPTER 2. LECTURE NOTES

2.10

Chapter 10

Section 10.1: Trees Definition.

(a) A tree is a graph that is connected and has no cycles.

(b) A forest is a graph all of whose components are trees. (c) A leaf is a vertex of degree 1. (d) Vertices of degree at least 2 are internal. Example. A tree.

r r A J r J Ar J A JJr Ar

Example. Saturated hydrocarbons Cn H2n+2 . butane

isobutane

H

H

H

H

H C

C

C

C H

H

H

H

H

H

H

H

H C

C

C H

H

H H C H H

The number of them is the number of (carbon) trees on n vertices with ∆ ≤ 4. Theorem. Properties of a tree T = (V, E). (a) For any two vertices u and v, there is a unique path from u to v. (b) If |V | > 1, then T has at least two leaves. (c) |E| = |V | − 1. Proof. (a) If there were two paths, we would find a cycle. (b) The ends of a maximum length path must be leaves. (c) Use induction on |V |, and invoke part (b). Definition. A spanning tree for a graph is a subgraph that is a tree for the whole vertex set. Theorem. Every connected graph has a spanning tree. The proof is by strong induction on |V |. The graph with a vertex removed will have a spanning forest.

2.10. CHAPTER 10

165

Example. A graph with a spanning tree shaded. v

v

v

v

v

Definition. A rooted tree is a tree T together with a vertex v. designated to be the root. (a) The level of a vertex u in T is dist(u, v). (b) The height of T is its maximum level. (c) A child of a vertex is a neighbor of level one greater. (d) The parent of a vertex is the neighbor of level one less. (e) T is m-ary (respectively, full m-ary) if each internal vertex has at most (respectively, exactly) m children. binary means 2-ary. Example 2.15. Consider this tree T rooted at v1 . vt1 v2t

vt3

v4 t

v5 t tv6

tv7

(a) v5 is at level 2. (b) T has height 3. (c) The children of v2 are v4 and v5 . (d) The parent of v5 is v2 . Only v1 has no parent. (e) T is a full binary tree. Applications: Corporate hierarchy, directory file system, family tree. Theorem. Let T be a full m-ary tree with n vertices, l leaves, and i internal vertices (so n = i + l). Then, n = mi + 1. Example. In Example 2.15, m = 2, l = 4, i = 3, and n = 2(3) + 1 = 7. We use the following theorem for analysis of algorithms in Section 10.5. Theorem. If T is an m-ary tree with l leaves and height h, then h ≥ dlogm le.

166

CHAPTER 2. LECTURE NOTES

Definition. (a) An ordered rooted tree has each set of children ordered (usually pictured left to right). (b) A binary search tree has all of its vertices ordered such that, for each vertex v, left subtree < v < right subtree. Example. Search for horse in the following alphabetized tree. dog cat

pig

bird cow duck sheep chicken

rabbit

After duck, horse is not found. Example. Form the alphabetized binary search tree for the list: football, basketball, hockey, golf, soccer, tennis, baseball, bowling. Solution.

football basketball

hockey

baseball bowling golf soccer tennis

Example. Using the standard ordering of the 4 quadrants in the plane, the pictured BW image

is represented by the following quadtree. t W

t B WB B

t

t

W B B B B B B W

2.10. CHAPTER 10

167

Section 10.2: Search Trees We consider here simple graphs with an understood ordering of their vertices. We then order edges lexicographically. Breadth-First Search Tree Case: Given a rooted tree (T, v). (0) Visit v. (1) Visit the children of v. (2) Visit the children of those children, and so on. We list the vertices in the order visited. Example. Perform Breadth-First Search on the following tree with root 3. 3 t 2t

4t

1t

7t t6

t5 t8

Solution. L = [3, 2, 4, 1, 7, 5, 6, 8]. General Case: Given a connected graph G and a starting vertex v. (0) Visit v. (1) Visit the neighbors of v. (2) Visit the unvisited neighbors of those neighbors, and so on. Shade the edges used to visit neighbors as we go, and list the vertices in the order visited. Those shaded edges form a spanning tree called the breadth-first search tree. Example. Perform Breadth-First search on the following graph

(a) starting at 8. (b) starting at 5.

t8

t9

t10

t7

t6

t5

t4

t1

t2

t3

168

CHAPTER 2. LECTURE NOTES

Solution. (a)

(b)

t8

t9

t10

L = [8, 7, 9, 6, 10, 1, 5, 2, 4, 3].

t7

t6

t5

t4

t1

t2

t3

t8

t9

t10

L = [5, 2, 4, 6, 10, 1, 3, 7, 9, 8].

t7

t6

t5

t4

t1

t2

t3

Depth-First Search Tree Case: Given a rooted tree (T, v). (Let parent(v) = null.) (0) Visit v. (1) If v has unvisited children, then let v 0 be the first unvisited child, let T 0 be the subtree of T rooted at v 0 , and perform DFS on (T 0 , v 0 ). (2) Otherwise, return to the parent of v, and continue. (3) Repeat until null is returned. We add a vertex to the list L when it is last visited. Example. Perform Depth-First Search on the following tree with root 3. 3t 2

4 t

t

1t

7t t6

t5 t8

Solution. L = [1, 6, 8, 7, 2, 5, 4, 3]. General Case: Given a connected graph G and a starting vertex v. (0) Visit v. (1) If v has unvisited neighbors, then visit the first one, and do DFS from there. (2) Otherwise, return along the edge that first brought you to your location, and continue.

2.10. CHAPTER 10

169

(3) Repeat until you are trying to return from the starting vertex v. Shade the edges used to visit neighbors as we go, and add each vertex to the list L when it is last visited. Those shaded edges form a spanning tree called the depth-first search tree. Example. Perform Depth-First search on the following graph t8

t9

t10

t7

t6

t5

t4

t1

t2

t3

(a) starting at 9. (b) starting at 2. Solution. (a)

(b)

t8

t9

t10

L = [10, 5, 4, 3, 2, 1, 8, 7, 6, 9].

t7

t6

t5

t4

t1

t2

t3

t8

t9

t10

L = [3, 4, 7, 8, 9, 10, 5, 6, 1, 2].

t7

t6

t5

t4

t1

t2

t3

Managing Algebra Example. The algebraic expression 2∗(a+1)−b is represented by the following tree (rooted at −). − @ @ ∗ b @ @ 2 + @ @ a 1

170

CHAPTER 2. LECTURE NOTES

(a) The list [2, a, 1, +, ∗, b, −] generated from this tree by Depth-First Search (called postorder traversal in this context) is the postfix notation for the expression. That notation is evaluated from left to right as follows: when an operation is encountered, perform it on the two values to its left. (b) If we change Depth-First Search so that we add a vertex to the list L when it is FIRST visited, then we have done a preorder traversal yielding the postfix notation for the expression. We get [−, ∗, 2, +, a, 1, b] in this case. It is evaluated from right to left as follows: when an operation is encountered, perform it on the two values to its right. (c) Infix notation coincides with the list obtained by deleting the parentheses from the original algebraic expression [2, ∗, a, +, 1, −, b] and is thus ambiguous in general.

2.10. CHAPTER 10

171

Section 10.3: Weighted Trees Definition. A weighted graph is a graph in which each edge is assigned a weight value (in R+ ). Minimum Spanning Trees Example. Distances (in meters) between computers to be linked in a network.         15   8   weighted graph 10    

9 5

7    

s 15

12

11    

14

10

9

s

5

s 8 7

12

s

14

s 11

s

A spanning tree in the representative graph would specify connections sufficient to permit universal communication among the computers (shaded below). u 15

u 8

9 10

u

12 7

u

11 u

5

u 14

Definition. (a) The weight of a subgraph is the total of the weights of the edges in it. (b) A minimum spanning tree is a spanning tree with the smallest weight among all spanning trees. Example. The weight of the tree shaded above is 10 + 5 + 12 + 8 + 11 = 46. How do we find a minimum spanning tree? Kruskal’s Algorithm (for finding a minimum spanning tree). Starting with no edges, always add an edge of minimum possible weight that does not form a cycle. Repeat until a spanning tree is formed. Example. In the pictured graph, shade the edges of the spanning tree given by Kruskal’s Algorithm. u 8

u 15 9 10

12 7

u

11 u

5

u

u 14

172

CHAPTER 2. LECTURE NOTES

This minimum spanning tree has weight 5 + 7 + 8 + 10 + 11 = 41. Example. In the pictured graph, shade the edges of the spanning tree given by Kruskal’s Algorithm. 8 t t @ @ @ @5 @ @ @4 @ @ @ @ @ 6 7 @ @ @ @ @ @ @ @ @ @ @ @ 9 @ @ @ @ @ @ @t @ @ @t @ @ t 2 10 This minimum spanning tree has weight 2 + 4 + 5 + 7 = 18. Prim’s Algorithm (for finding a minimum spanning tree). Starting with no edges, always add an edge of minimum possible weight that makes a bigger tree. Repeat until a spanning tree is formed. Example. In the pictured graph, shade the edges of the spanning tree given by Prim’s Algorithm. u 8 u 10 u 6 3

12 7

u

4 u

5

u 11

This minimum spanning tree has weight 3 + 5 + 6 + 10 + 4 = 28. Example. In the pictured graph, shade the edges of the spanning tree given by Prim’s Algorithm. 2 t t @ @ @7 @ @ @ @ @ 11 4 9 @ @ @ @ @ @ @ 5 @ @ @ @ @ @ @ @t @t t 8 3 This minimum spanning tree has weight 2 + 4 + 7 + 3 = 16. Theorem. Kruskal’s and Prim’s Algorithms do indeed yield minimum spanning trees. Proof for Kruskal’s Algorithm. Let T be the spanning tree for G produced by Kruskal’s Algorithm. Select a minimum spanning tree T 0 for G so that T 0 has

2.10. CHAPTER 10

173

the maximum possible number of edges in common with T . Suppose toward a contradiction that T 0 6= T . Let e be the first edge chosen for T that is not in T 0 . So T 0 ∪ {e} contains a cycle C. Select an edge e0 from C that is not in T . Thus, e0 is in T 0 , and T 0 \ {e0 } ∪ {e} is a spanning tree for G. If ω(e0 ) < ω(e), then e0 would have been chosen for T instead of e. If ω(e0 ) > ω(e), then T 0 \ {e0 } ∪ {e} has smaller weight than T 0 . Thus, it suffices to assume that ω(e0 ) = ω(e). However, T 0 \ {e0 } ∪ {e} has more edges in common with T than does T 0 , which is a contradiction.

Shortest Path Trees Example. Train service and prices among cities in a sales territory.

Watford

u

$100

$250

$125

u Harlow

$225  $75    $150 u  Greenwich $50

u Epsom

$200

$260



 

u   Brentwood $25

u   Dartford

 $160  u  Croydon

For a sales representative stationed in Greenwich, what is the cheapest way to get to each of the other cities in her territory? Definition. Given a weighted connected graph G with a specified vertex v, a shortest path tree from v is a spanning tree T such that the weighted distance between v and any other vertex of G is the weight of the path in T .

Dijkstra’s Algorithm (for finding a shortest path tree) Given a weighted connected graph G with a specified vertex v, start with no edges. Always add an edge making a bigger tree containing v such that this newly formed path from v in the tree has weight as small as possible. Repeat until a spanning tree is formed. Example. In the pictured graph, use v as the starting vertex, and shade the

174

CHAPTER 2. LECTURE NOTES

edges of the spanning tree given by Dijkstra’s Algorithm. s

s

250

260  

s

 225 25   150  s s  v   50  160  s  75

125

100

s

200

Edges added: 50, 75, 150, 25, 125, 100. Theorem. Dijkstra’s Algorithm does indeed yield a shortest path tree. Example. In the pictured graph, use v as the starting vertex, and shade the edges of the spanning tree given by Dijkstra’s Algorithm. u 5

v

u 6

3 1

4 u

2 Edges added: 3, 1, 2, 6, 4.

9 7

u

u

u 8

2.10. CHAPTER 10

175

Section 10.4: Analysis of Algorithms (Part 1) Search Algorithms aim to find a specified value in a given array of values. Sequential Search Start at the beginning of the array and move through it in order, one at a time, comparing the entry with the specified value being sought. Example. Sequential Search for x = 2 in A = 7

1

4

2

3

5 .

Solution. i 1 2 3 4

compare 7 = 2? 1 = 2? 4 = 2? 2 = 2?

result No No No Yes

2 is found in A[4]. Binary Search (within an ORDERED array of length n) Split the array at its halfway point. (The first d n2 e elements form the first half.) After comparing the last entry in the first half with the specified value, focus on the half that could possibly contain the specified value. Repeat until the considered array has only one element. Example. Binary Search for x = 2 in A = 1

2

3

4

5

7 .

Solution. matrix 1 2 1 2 1 2 2

3 3

4

5

compare 3 < 2? 2 < 2? 1 < 2? 2 = 2?

7

result No. Keep first half. No. Keep first half. Yes. Keep second half. Yes. Found location.

2 is found in A[2]. Example. Search for x = 9 in A = 2 (a) using Binary Search. (b) using Sequential Search.

4

5

7

8

10

11

Solution. (a) Binary Search yields: matrix 2 4

5

7

8 8 8

10 10 10 10

11 11

compare 7 < 9? 10 < 9? 8 < 9? 10 = 9?

result Yes. Keep second half. No. Keep first half. Yes. Keep second half. No. Not found.

176

CHAPTER 2. LECTURE NOTES

9 is not present in A. (b) Sequential Search yields: i 1 2 3 4 5 6 7

compare 2 = 9? 4 = 9? 5 = 9? 7 = 9? 8 = 9? 10 = 9? 11 = 9?

result No No No No No No No

9 is not present in A. In general, for an ordered array A, which search algorithm is more efficient? That is, which has fewer comparisons? Complexity of Algorithms Definition. The worst-case complexity of an algorithm is a function f of the input size n such that f (n) = the maximum number of operations possibly performed by the algorithm on an input of size n. Note: For search algorithms, comparisons are the operation of interest, and the input size is the size of the given array. Example (Example 10.18). The worst-case complexity of Sequential Search is n. Why? n comparisons are done when the desired value is at the end of the array or not present. Example (Example 10.19). The worst-case complexity of Binary Search is 1 + dlog2 ne. Why? Special case: n = 2m for some integer m = log2 n. There are m splits of the array, each with a comparison, plus a final comparison for equality with the desired value. Note that m + 1 = dlog2 ne + 1. General case: Assign as reading. Which complexity is better? For large n (namely, n > 2), the complexity of Binary Search is better. y y=n

y = 1 + log2 (n) q q

1

2

n

2.10. CHAPTER 10

177

Growth of Functions Definition. Given a function g(x), big-O of g(x) is O(g(x)) = {f (x) : ∃ C, d ∈ R+ such that ∀ x > d, |f (x)| ≤ C|g(x)|}. Example. Consider g(x) = x. 1 + log2 (x) ∈ O(x) since ∀ x > 2, |1 + log2 (x)| ≤ |x|. That is, C = 1 and d = 2 work here. Lemma. f (x) ∈ O(g(x)) iff O(f (x)) ⊆ O(g(x)). How do powers of x compare to each other? y y = x3

y = x2 y = x

1

y = x2 q

x Lemma. If r < s, then x ∈ O(x ) and x ∈ 6 O(x ). Hence, O(xr ) ⊂ O(xs ). 1

r

s

s

r

Proof. Use C = 1 and d = 1 for the first part. The second part follows since xs s−r eventually exceeds any fixed C ∈ R+ . xr = x Theorem. Let m ∈ N. If f (x) is a polynomial of degree at most m, then f (x) ∈ O(xm ). Definition. Given a function g(x), big-Θ of g(x) is Θ(g(x)) = {f (x) : f (x) ∈ O(g(x)) and g(x) ∈ O(f (x))}. Lemma. f (x) ∈ Θ(g(x)) iff O(f (x)) = O(g(x)). If f (x) and g(x) are polynomials of the same degree, then O(f (x)) = O(g(x)). That is, f (x) and g(x) have the same order of growth. Order of Algorithms Definition. We say an algorithm is O(g(n)) if its worst-case complexity (function) is O(g(n)). E.g. Sequential Search is O(n). E.g. Binary Search is O(1 + dlog2 ne) = O(log2 n). This equality is in the homework exercises. Theorem. O(1) ⊂ O(log2 n) ⊂ O(n) ⊂ O(n log2 n) ⊂ O(n2 ) ⊂ O(n3 ) ⊂ · · · ⊂ O(2n ) ⊂ O(n!) Algorithms that are Θ(log2 n) are said to be logarithmic. Those that are Θ(nm ) for some m ∈ Z+ are polynomial, and those that are Θ(bn ) for some b > 1 are exponential.

178

CHAPTER 2. LECTURE NOTES

Section 10.5: Analysis of Algorithms (Part 2) Decision Trees We consider binary trees reflecting the comparisons made in an algorithm. The vertices represent the states of the algorithm, and we have branches at comparisons. Example. The decision tree for Sequential Searchi =for the value x in a1 1

a2

a3

a4 .

a1

a2 a3 a4 a1 = x ? HHF T   H i=2 Return a1 a2 a3 a4 1 a2 = x ? HHF T   H i=3 Return a1 a2 a3 a4 2 a3 = x ?  HHF T   H i=4 Return a1 a2 a3 a4 3 a4 = x ? H F T  HH  Return

Return

4 0 The height is 4. In general, for Sequential Search with |A| = n, the height is n, the worst-case complexity. Example. The decision tree for Binary Search for the value x in a1 a1

a2

a3

a4

a5

a6 .

a3 a4 a5 a6 a3 < x ? HHF  T H  a4 a5 a6 a1 a2 a3 a5 < x ? a2 < x ? @ @ @ @ a6 a4 a5 a3 a1 a2 a6 = x ? a4 < x ? a3 = x ? a1 < x ? @ @ @ @ @ @ @ @ a5 a4 a2 a1 Return Return Return Return 6 0 3 0 a5 = x ? a4 = x ? a2 = x ? a1 = x ? @ @ @ @ Return Return Return Return Return Return Return Return 5

0

a2

4

0

2

0

1

0

2.10. CHAPTER 10

179

The height is 4 = 1 + dlog2 6e. In general, for Binary Search with |A| = n, the height is 1 + dlog2 ne, the worst-case complexity. Sorting Algorithms We aim to put the elements of an array of length n into nondecreasing order. Insertion Sort For i = 2 to n, insert the entry A[i] into the already sorted first i − 1 entries of the array to obtain i already sorted entries. Example. Use Insertion Sort to sort A = 4 Solution.

i=2 4 3 ( ←3

4

8

1

6

i=3 8 

1

6

3 4 ( ←

i=4 8 1 ← ←-

1

3

4

i=5 8 6 ( ←-

1

3

4

6

3

8

1

6 .

6

8

ends with

Example (Example 10.23). The worst-case complexity of Insertion Sort is n(n−1) . It is O(n2 ). 2 Proof. For each i, inserting is done by comparing A[i] with A[1], A[2], . . . until it fits. So as many as i − 1 comparisons are done. The maximum possible total n X n(n − 1) . number of comparisons is thus (i − 1) = 2 i=2 Merge Sort To do this, we first need a basic algorithm, called Merge, that combines two sorted arrays into one sorted array. It does so by repeatedly moving the smaller of the two leading entries from the given arrays to the first available entry in the resulting array until the two given arrays are empty. Example. Merge 3

4 and 1

6

Solution. Is 3 < 1? No. So 1 is first. Is 3 < 6? Yes. So 3 is second. Is 4 < 6? Yes. So 4 is third. The first array is done. So 6 is fourth, and 8 is fifth. We get 1 3 4 6 8 .

8 .

180

CHAPTER 2. LECTURE NOTES

Note: A Merge resulting in an array of length n will perform at most n − 1 comparisons. Merge Sort To Merge Sort an array A[1, . . . , n] of length n, if n = 1, then return A[1], otherwise, Merge the result of Merge Sort on A[1, . . . , b n2 c] with the result of Merge Sort on A[b n2 c + 1, . . . , n]. Example. Use Merge Sort to sort A = 4

3

8

1

6 .

Solution. 4  4

3

8

1



6 SPLITS into two “halves”

HH H

3

8

1

@@ 4

@ @ 3

@@ 3

4

6

8

3

1

@ @ 1 6 H 1

 

HH 3

4

6

1

@ @ 6

1

6 @ @ 1 6

8

4

6

8 MERGES of two “halves”

8

Example (Example 10.25). Merge Sort is O(n log2 n). Theorem 2.1 (Theorem 10.17). The worst-case complexity of every sorting algorithm is at least n2 log2 n2 . Proof. The decision tree must have at least n! leaves, one for each possible permutation of the array.

2.10. CHAPTER 10

181

The height of this tree must therefore be at least dlog2 n!e



log2 (n(n − 1) · · · d n2 e)

=

log2 n + log2 (n − 1) + · · · + log2 d n2 e



(b n2 c + 1) log2 d n2 e



n 2

log2 n2 .

Consequence: Since O( n2 log2 n2 ) = O(n log2 n), no sorting algorithm can be more efficient than O(n log2 n), the complexity of Merge Sort. Other sorting algorithms are described in the exercises: Bubble Sort, Selection Sort, and Quick Sort.

182

CHAPTER 2. LECTURE NOTES

Chapter 3

Test Bank 3.0

Chapter 0

1. Convert the binary number 10110 to base ten. Answer. 22 2. Write the base ten number 37 in binary. Answer. 100101 3. Write the base ten number 19 in binary. Answer. 10011 4. Convert the base 8 number 75 to base ten. Answer. 61 5. Write the base ten number 75 in base 8. Answer. 113 6. Convert the base 16 number a7 to base ten. Answer. 167 7. Write the base ten number 436 in base 16. Answer. 1b4 8. How is 8n expressed in binary? Answer. A 1 followed by 3n 0’s.

183

184

3.1

CHAPTER 3. TEST BANK

Chapter 1

Section 1.1 1. Is the sentence “There are no true sentences.” a statement? Explain. Answer. Yes. It is false. 2. Make a truth table for p → q ∨ r. Answer. p F F F F T T T T

q F F T T F F T T

r F T F T F T F T

q∨r F T T T F T T T

p→q∨r T T T T F T T T

3. Is the statement form p → ¬p a contradiction? Explain. Answer. No. It is true when p is false. 4. Determine if ¬(p → q) and ¬p → ¬q are logically equivalent? Justify your answer. Answer. They are not logically equivalent. They differ when p is true and q is true. 5. Write and simplify the contrapositive of p → ¬q ∧ r. Answer. q ∨ ¬r → ¬p 6. Given the statement If Tara is not studying, then Tara is sleeping. Write its (a) converse. (b) contrapositive. (c) inverse. (d) negation.

3.1. CHAPTER 1

185

Answer. (a) If Tara is sleeping, then Tara is not studying. (b) If Tara is not sleeping, then Tara is studying. (c) If Tara is studying, then Tara is not sleeping. (d) Tara is not studying, and Tara is not sleeping. 7. Verify that ¬p ∧ (¬q ∨ p) ≡ ¬(p ∨ q) not by making a truth table but by using known basic logical equivalences. Answer. ¬p ∧ (¬q ∨ p)

≡ ≡ ≡ ≡

(¬p ∧ ¬q) ∨ (¬p ∧ p) (¬p ∧ ¬q) ∨ f ¬p ∧ ¬q ¬(p ∨ q)

Distributivity Contradiction Rule Contradiction Rule De Morgan’s Law

8. Trace the pictured circuit P

s

Q

OR

S

AND

c

NOT

(a) to determine an expression for the output in terms of the input, (b) and make an input-output table. (c) Explain how the same input-output table can be accomplished by a circuit using fewer basic gates. Answer. (a) (P ∨ Q) ∧ ¬Q = S. (b)

P 0 0 1 1

Q 0 1 0 1

S 0 0 1 0

(c) S ≡ P ∧ ¬Q. Q

NOT

c AND

P

S

9. Draw a circuit that realizes the expression ¬P ∨ Q = S. Answer. P Q

NOT

c OR

S

186

CHAPTER 3. TEST BANK

Section 1.2 1. Express in set notation the set of integers smaller than 5. Answer. {n : n ∈ Z and n < 5}. 2. Express in interval notation the set of real numbers greater than or equal to −3. Answer. [−3, ∞). For Exercises 3 through 8, determine if each of the the following relations is True or False. 3. {1, 3, 5, 3, 1, 7, 1} ⊆ {1, 3, 5, 7}. Answer. True. 4. {7} ∈ N. Answer. False. 5. 3 ⊂ {1, 2, 3, 4}. Answer. False. 6. ∅ = 0. Answer. False. 7. [−1, 1] is infinite. Answer. True. 8. |{2, 3, 7, 8, 5, 3}| = 6. Answer. False. 9. Write the expression for the “set” given in Russell’s Paradox. Answer. {S : S is a set and S 6∈ S}.

Section 1.3 For Exercises 1 through 3, write the given statement as efficiently as possible using quantifiers and standard notation. Determine if the statement is True or False. 1. Every real number is smaller than twice itself. Answer. ∀ x ∈ R, x < 2x. 2. There is an integer whose square is odd.

3.1. CHAPTER 1

187

Answer. ∃ n ∈ Z such that n2 is odd. 3. There is an integer n such that the nth power of every real number is negative. Answer. ∃ n ∈ Z such that ∀ x ∈ R, xn < 0. For Exercises 4 through 6, write the negation of the given statement. Determine which of the statement or its negation is True. 4. For every integer n, if n is positive then 2n − 1 is positive. Answer. ∃ n ∈ Z such that n > 0 and 2n − 1 ≤ 0. The original statement is True. 5. There is a real number whose cube is negative. Answer. ∀ x ∈ R, x3 ≥ 0. The original statement is True. 6. The product of any two real numbers is positive. Answer. ∃ x, y ∈ R such that xy ≤ 0. The negation is True. 7. Negate the statement ∃ n ∈ Z such that ∀ x ∈ R, xn < 0. Answer. ∀ n ∈ Z, ∃ x ∈ R such that xn ≥ 0. 8. Negate the statement All good things come to an end. Answer. There is a good thing that does not end. For Exercises 9 and 10, let f and g be real functions. Use quantifiers to precisely express the definition of the given notion. 9. f is periodic. Answer. ∃ p ∈ R+ such that ∀ x ∈ R, f (x + p) = f (x). 10. The composite function g ◦ f . Answer. The function g ◦ f is defined by ∀ x ∈ R, (g ◦ f )(x) = g(f (x)).

188

CHAPTER 3. TEST BANK

Section 1.4 For Exercises 1 and 2, find Ac , A ∩ B, A ∪ B, A \ B, and A M B for the given sets. 1. A = {2, 3, 7}, B = {1, 2, 7, 9}, and U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Answer. Ac = {1, 4, 5, 6, 8, 9, 10}, A ∩ B = {2, 7}, A ∪ B = {1, 2, 3, 7, 9}, A \ B = {3}, and A M B = {1, 3, 9}. 2. A = (0, 3], B = (2, 4), and U = R. Answer. Ac = (−∞, 0] ∪ (3, ∞), A ∩ B = (2, 3], A ∪ B = (0, 4), A \ B = (0, 2], and A M B = (0, 2] ∪ (3, 4). 3. Are (0, 3) and (2, 4) disjoint? Justify your answer. Answer. No. 2.5 ∈ (0, 3) ∩ (2, 4) 6= ∅. 4. Find {0, 1} × {2, 4, 6}. Answer. {(0, 2), (0, 4), (0, 6), (1, 2), (1, 4), (1, 6)}. 5. Sketch (1, 3] × [2, 5). Answer. 5

2 1

3

6. Find P({0, 1, 2}). Answer. {∅, {0}, {1}, {2}, {0, 1}, {0, 2}, {1, 2}, {0, 1, 2}}. 7. Decide if the proposed identity A ∩ (B \ C) = (A ∩ B) \ (A ∩ C) is True or False. Answer. True. 8. Use definitions and basic set identities to verify the identity c

Ac ∩ (B c ∪ A) = (A ∪ B) . Answer. Ac ∩ (B c ∪ A)

= = = =

(Ac ∩ B c ) ∪ (Ac ∩ A) (Ac ∩ B c ) ∪ ∅ Ac ∩ B c c (A ∪ B)

Distributivity An ∅ Rule An ∅ Rule De Morgan’s Law

3.1. CHAPTER 1

189

Section 1.5 1. Determine if the given argument form is valid. Justify your answer. p→q r→p q∨r ∴ q Answer. p F F F F T T T T

q F F T T F F T T

p→q T T T T F F T T

r F T F T F T F T

r→p T F T F T T T T

q∨r F T T T F T T T

q

T

T T

Rows 3, 7, and 8 demonstrate the validity of the argument form. 2. Show that the given argument form is valid without using a truth table. q→p ¬q → p ∴ p Answer. 1. 2. 3. 4.

Statement Form q→p ¬q → p q ∨ ¬q ∴ p

Justification Given Given a tautology (1),(2),(3), Two Separate Cases

3. Determine if the given argument is valid or invalid. Justify your answer. If e > 0, then 1 > 0. e ∴ e > 0. Answer. The argument’s form p→q q ∴ p

1 > 0. e

190

CHAPTER 3. TEST BANK is not valid, as can be seen when p is false (and q is arbitrary). So the argument is not valid.

4. Verify that the given argument form is valid. ∀ x ∈ U, p(x) ∧ q(x) a∈U ∴ p(a) Answer. 1. 2. 3. 4.

Statement Form ∀ x ∈ U, p(x) ∧ q(x) a∈U p(a) ∧ q(a) ∴ p(a)

Justification Given Given (1),(2), Principle of Specification (3), In Particular

5. Verify that the given argument form is valid. ∀ x ∈ U, p(x) ∴ ∀ x ∈ U, p(x) ∨ q(x) Answer. 1. 2. 3. 4. 5.

Statement Form ∀ x ∈ U, p(x) Let a ∈ U be arbitrary p(a) p(a) ∨ q(a) ∴ ∀ x ∈ U, p(x) ∨ q(x)

Justification Given Assumption (1),(2), Principle of Specification (3), Obtaining Or (2), (4), Principle of Generalization

6. Show that the given argument form is invalid. ∀ x ∈ U, p(x) → q(x) ∀ x ∈ U, q(x) ∴ ∀ x ∈ U, p(x) Answer. Let U = R+ , p(x) = “x > 1”, and q(x) = “x > 0”. The resulting argument ∀ x ∈ R+ , if x > 1 then x > 0 ∀ x ∈ R+ , x > 0 ∴ ∀ x ∈ R+ , x > 1 has all of its premises true but its conclusion false.

3.2. CHAPTER 2

3.2

191

Chapter 2

Section 2.1 1. Show: There exists x ∈ Z such that 2x2 − 5x + 2 = 0. Answer. Observe that 2(22 ) − 5(2) + 2 = 0. 2. Show: There exist m, n ∈ Z such that 5m + 3n = 1. Answer. Observe that 5(−1) + 3(2) = 1. 3. Disprove: For all sets A and B, |A ∪ B| = |A| + |B|. Answer. Let A = B = {6}. So |A ∪ B| = |{6}| = 1 and |A| + |B| = 1 + 1 = 2. Hence, |A ∪ B| = 6 |A| + |B| in this case. 4. Prove or Disprove: ∀ m ∈ Z, if m2 is odd, then m is even. Answer. Counterexample: Observe that 12 is odd and 1 is not even. 5. Show: ∀ n ∈ {3, 6, 9}, the sum of the (base ten) digits of 7n is n. Answer. Observe that 7(3) = 21 and 2 + 1 = 3, 7(6) = 42 and 4 + 2 = 6, and 7(9) = 63 and 6 + 3 = 9. 6. Show: ∀ A ∈ P({4, 7}), |A| ≤ 2. Answer. Note that |∅| = 0, |{4}| = |{7}| = 1, and |{4, 7}| = 2.

Section 2.2 1. Show: ∀ n ∈ Z− , −n − 1 ∈ N. Answer. Let n ∈ Z− . So n ∈ Z and n ≤ −1. Thus, −n ≥ 1, and hence −n − 1 ≥ 0. Since −n − 1 ∈ Z, it follows that −n − 1 ∈ N. 2. Show: ∀ x ∈ R, if x < 0 then x3 < 0. Answer. Suppose x ∈ R and x < 0. Since x2 > 0, it follows that x(x2 ) < 0(x2 ). That is, x3 < 0. 3. Show: For all real functions f , if f is bounded above, then −2f is bounded below.

192

CHAPTER 3. TEST BANK Answer. Suppose f is a real function that is bounded above. So we have M ∈ R such that ∀ x ∈ R, f (x) ≤ M . Observe that ∀ x ∈ R, (−2f )(x) = −2 · f (x) ≥ −2 · M = −2M . Hence, −2f is bounded below.

4. Show: For all real functions f , if f is decreasing, then −f is increasing. Answer. Suppose f is a real function that is decreasing. Suppose x, y ∈ R with x < y. So f (x) > f (y). Multiplication by −1 gives −f (x) < −f (y). So −f is increasing. 5. Prove or Disprove: For all real functions f , if f is increasing, then f is not bounded above. Answer. Counterexample: Let f (x) =

√ x . x2 +1

y 1 x −1 y = f (x) This function is increasing and bounded above (by 1). 6. Show: For all sets A, B, and C, A ∩ B ∩ C ⊆ A ∩ C. Answer. Let A, B, and C be sets. Suppose that x ∈ A ∩ B ∩ C. So x ∈ A, x ∈ B, and x ∈ C. In particular, x ∈ A and x ∈ C. Therefore, x ∈ A ∩ C. 7. Let A and B be sets in some universal set U. Show: B ∪ A = A ∪ B. Answer. Observe that ∀ x ∈ U, x ∈ B ∪ A iff x ∈ B ∨ x ∈ A iff x ∈ A ∨ x ∈ B iff x ∈ A ∪ B.

Section 2.3 1. Show: ∀ x ∈ R, x ∈ [−3, 4) if and only if 2x + 3 ∈ [−3, 11). Answer. Let x ∈ R. (→) Suppose x ∈ [−3, 4). That is, −3 ≤ x < 4. So −6 ≤ 2x < 8. So −3 ≤ 2x + 3 < 11. That is, 2x + 3 ∈ [−3, 11). (←) Suppose 2x + 3 ∈ [−3, 11). That is, −3 ≤ 2x + 3 < 11. So −6 ≤ 2x < 8. So −3 ≤ x < 4. That is, x ∈ [−3, 4).

3.2. CHAPTER 2

193

2. Let n ∈ Z. Show: 2n2 − 5n − 3 = 0 if and only if n = 3. Answer. (→) Suppose 2n2 − 5n − 3 = 0. So (2n + 1)(n − 3) = 0, and hence n = − 21 or n = 3. Since n ∈ Z, it must be that n = 3. (←) Suppose n = 3. Observe that 2 · 32 − 5 · 3 − 3 = 0. 3. Let f be a real function. Show: −f is periodic if and only if f is periodic. Answer. (→) Suppose −f is periodic. Let p be its period. Suppose x ∈ R. Since −f (x + p) = −f (x), multiplication by −1 gives that f (x + p) = f (x). Therefore, f is periodic. (←) Suppose f is periodic. Let p be its period. Suppose x ∈ R. Since f (x + p) = f (x), multiplication by −1 gives that −f (x + p) = −f (x). Therefore, −f is periodic. 4. Let A, B, and C be sets in some universal set U. Show: A ∩ (B \ C) = (A \ C) ∩ B. Answer. (⊆) Suppose x ∈ A ∩ (B \ C). So x ∈ A and x ∈ B \ C. Thus, x ∈ B and x 6∈ C. Since x ∈ A and x 6∈ C, we have x ∈ A \ C. Since we also have x ∈ B, we have x ∈ (A \ C) ∩ B. (⊇) Suppose x ∈ (A \ C) ∩ B. So x ∈ A \ C and x ∈ B. Thus, x ∈ A and x 6∈ C. Since x ∈ B and x 6∈ C, we have x ∈ B \ C. Since we also have x ∈ A, we have x ∈ A ∩ (B \ C). 5. Show: (0, 2) ∩ [1, 3] = [1, 2). Answer. (⊆) Suppose x ∈ (0, 2) ∩ [1, 3]. That is, 0 < x < 2 and 1 ≤ x ≤ 3. So 1 ≤ x < 2. That is, x ∈ [1, 2). (⊇) Suppose x ∈ [1, 2). So 0 < 1 ≤ x < 2 ≤ 3. Hence, 0 < x < 2 and 1 ≤ x ≤ 3. That is, x ∈ (0, 2) ∩ [1, 3]. c

6. Show: [2, ∞) × (3, 4] ⊆ (1, 2) × [3, ∞). Answer. Suppose (x, y) ∈ [2, ∞) × (3, 4]. So x ∈ [2, ∞) and y ∈ (3, 4]. Since x ≥ 2, it follows that x 6∈ (1, 2). Since y > 3, it c follows that y ∈ [3, ∞). Therefore, (x, y) ∈ (1, 2) × [3, ∞). 7. Let A and B be sets. Show: P(A) ⊆ P(A ∪ B). Answer. Suppose S ∈ P(A). That is, S ⊆ A. Since A ⊆ A ∪ B, it follows from the transitivity of the subset relation that S ⊆ A ∪ B. That is, S ∈ P(A ∪ B).

194

CHAPTER 3. TEST BANK

Section 2.4 1. Show: Z has no smallest element. Answer. Suppose not. Let s be the smallest element of Z. However, s−1 is then a smaller element of Z. This is a contradiction. 2. Show: R− is infinite. Answer. Suppose not. Let n be the cardinality of R− . However, each of the n + 1 elements on the list −1, −2, . . . , −n, −(n + 1) are negative real numbers. This is a contradiction. 3. Show: ∀ n ∈ Z, 1 − 2n 6= 0. Answer. Suppose not. So there is some n ∈ Z such that 1−2n = 0. However, this gives that n = 21 , and 12 6∈ Z. This is a contradiction. 4. Let a, b ∈ R. Show: If b < a, then [a, b] = ∅. Answer. Suppose [a, b] is nonempty. Hence, we have some x ∈ R such that a ≤ x ≤ b. From the transitivity of ≤ it follows that a ≤ b. Hence, it is not true that b < a. 5. Let A and B be sets. Show: If A ⊆ B c , then A ∩ B = ∅. Answer. Suppose A∩B is nonempty. So we have some x ∈ A∩B. That is, x ∈ A and x ∈ B. Since x ∈ A and x 6∈ B c , it follows that A * B c . 6. Let f be a real function. Show: If f is unbounded below, then f 2 is unbounded above. Answer. Suppose f 2 is bounded above. Hence, we have some M ∈ R such that ∀ x ∈ R, f 2 (x) ≤ M. In fact, it must be that M ≥ 0. It then follows that √ ∀ x ∈ R, f (x) ≥ − M . (This assertion can be proven by contradiction.) Therefore, f is bounded below.

3.2. CHAPTER 2

195

Section 2.5 1. Let A, B, and C be sets. Show: A ∪ C ⊆ A ∪ B ∪ C. Answer. Suppose x ∈ A ∪ C. So x ∈ A or x ∈ C. Case 1 : x ∈ A. Since x ∈ A or x ∈ B or x ∈ C, it follows that x ∈ A ∪ B ∪ C. Case 2 : x ∈ C. Since x ∈ A or x ∈ B or x ∈ C, it follows that x ∈ A ∪ B ∪ C. 2. Let A, B, and C be sets. Show: (A ∪ B) ∩ C ⊆ (A ∩ C) ∪ B. Answer. Suppose x ∈ (A ∪ B) ∩ C. So x ∈ A ∪ B and x ∈ C. That is, x ∈ A or x ∈ B. Case 1 : x ∈ A. Since x ∈ A and x ∈ C, we have x ∈ A ∩ C. Thus, x ∈ (A ∩ C) ∪ B. Case 2 : x ∈ B. Thus, x ∈ (A ∩ C) ∪ B. 3. Let A, B, and C be sets. Show: A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C). Answer. (⊆) Suppose x ∈ A ∪ (B ∩ C). So x ∈ A or x ∈ B ∩ C. Case 1 : x ∈ A. So x ∈ A ∪ B or x ∈ A ∪ C. Hence, x ∈ (A ∪ B) ∩ (A ∪ C). Case 2 : x ∈ B ∩ C. So x ∈ B and x ∈ C. Since x ∈ B, we have x ∈ A ∪ B. Since x ∈ C, we have x ∈ A ∪ C. Hence, x ∈ (A ∪ B) ∩ (A ∪ C). (⊇) Suppose x ∈ (A∪B)∩(A∪C). So x ∈ A∪B and x ∈ A∪C. Case 1 : x ∈ A. Hence, x ∈ A ∪ (B ∩ C). Case 2 : x 6∈ A. Since x ∈ A ∪ B, it must be that x ∈ B. Since x ∈ A ∪ C, it must be that x ∈ C. So, x ∈ B ∩ C. Hence, x ∈ A ∪ (B ∩ C). 4. Show: (0, 2) ∪ [1, 3] = (0, 3]. Answer. (⊆) Suppose x ∈ (0, 2) ∪ [1, 3]. So x ∈ (0, 2) or x ∈ [1, 3]. Case 1 : x ∈ (0, 2). Since 0 < x < 2, we have 0 < x ≤ 3. x ∈ (0, 3]. Case 2 : x ∈ [1, 3]. Since 1 ≤ x ≤ 3, we have 0 < x ≤ 3. x ∈ (0, 3]. (⊇) Suppose x ∈ (0, 3]. So 0 < x ≤ 3. (Note: x < 2 or 2 ≤ x.) Case 1 : x < 2. Since 0 < x < 2, we have x ∈ (0, 2). x ∈ (0, 2) ∪ [1, 3]. Case 2 : 2 ≤ x. Since 1 ≤ 2 ≤ x ≤ 3, we have x ∈ [1, 3]. x ∈ (0, 2) ∪ [1, 3].

Thus, Thus,

Thus, Thus,

196

CHAPTER 3. TEST BANK

5. Assume that C ⊆ A and C ⊆ B. Show: A \ C = B \ C if and only if A = B. Answer. (→) Suppose A \ C = B \ C. (⊆) Suppose x ∈ A. If x ∈ C, then x ∈ B. So consider x 6∈ C. Hence, x ∈ A \ C = B \ C. Thus, x ∈ B. So A ⊆ B. Similarly, B ⊆ A. Therefore, A = B. (←) Suppose A = B. Hence, A \ C = B \ C. ( x − 1 if x ≥ 1, 6. Let x ∈ R. Show: |x − 1| = 1 − x if x < 1. Answer. Case 1 : x ≥ 1. Since x−1 ≥ 0, we have |x−1| = x−1. Case 2 : x < 1. Since x − 1 < 0, we have |x − 1| = −(x − 1) = 1 − x. 7. Let x, y ∈ R. Show: If |x| > y, then x > y or x < −y. Answer. Suppose |x| > y. Case 1 : x ≥ 0. So x = |x| > y. Case 2 : x < 0. So −x = |x| > y. Multiplication by −1 gives x < −y. 8. Let a, b ∈ R. Show: If ab > 0, then

a b

> 0.

Answer. Suppose ab > 0. Observe that b 6= 0. Case 1 : b > 0. So a > 0, and hence ab > 0. Case 2 : b < 0. So a < 0, and hence

a b

> 0.

3.3. CHAPTER 3

3.3

197

Chapter 3

Section 3.1 1. Show that the sum of any two odd integers is even. Answer. Suppose that m and n are odd integers. So m = 2j + 1 and n = 2k + 1 for some j, k ∈ Z. Thus, m + n = 2j + 1 + 2k + 1 = 2(j + k + 1). Since j + k + 1 ∈ Z, the sum m + n is even. 2. Show that the sum of two consecutive odd integers is divisible by 4. Answer. Suppose that m and n are consecutive odd integers. So m = 2j + 1 and n = 2j + 3 for some j ∈ Z. Thus, m + n = 2j + 1 + 2j + 3 = 4(j + 1). Since j + 1 ∈ Z, the sum m + n is divisible by 4. 3. Let n ∈ Z. Show: If 6 | n, then 4 | n2 . Answer. Suppose 6 | n. So n = 6k for some k ∈ Z. Observe that n2 = 36k 2 = 4(9k 2 ). Since 9k 2 ∈ Z, we see that 4 | n2 . 4. Prove or disprove: For any integers a, b, c, if a - b and b - c then a - c. Answer. Counterexample: Let a = c = 2 and b = 3. Observe that a - b and b - c, but a | c. 5. Find gcd(700, 120) by factoring. Answer. gcd(700, 120) = gcd(22 · 52 · 7, 23 · 3 · 5) = 22 · 5 = 20. 6. Are 3 and 105 relatively prime? Explain Answer. No. gcd(3, 105) = 3 6= 1 7. Let n ∈ Z+ . Show: gcd(n, 2n) = n. Answer. Observe that n > 0, n | n and n | 2n. Suppose c > 0, c | n, and c | 2n. Since c is a divisor of n, there is a lemma that tells us that c ≤ n. Hence, n = gcd(n, 2n). 8. Two spinning gear wheels are adjacent, as pictured.  A q B  Gear A has 12 equally-spaced teeth, gear B has n equally-spaced teeth, and the size of B is such that the spacing between its teeth is the same as that of A. What necessary conditions on n force every tooth of gear B to eventually touch the pictured black tooth on gear A?

198

CHAPTER 3. TEST BANK Answer. gcd(12, n) = 1. That is, 2 - n and 3 - n.

9. Evaluate lcm(60, 36). Answer.

60·36 12

= 180.

Section 3.2 1. Find the smallest element of the set {m : m = 15 + 6n > 0 for some n ∈ Z}. Answer. 3. It occurs when n = −2. 2. Prove or disprove: If 2n + 1 is prime, then n is prime. Answer. False. Consider n = 4. 3. Compute each of the following: (a) 87 div 12. (b) 55 mod 7. (c) −47 mod 10. Answer. (a) 7. (b) 6. (c) 3. 4. Show: ∀ n ∈ Z, 4 - (n2 + 1). Answer. By the Division Algorithm, we can write n = 4k + r for some k ∈ Z and r ∈ {0, 1, 2, 3}. So n2 + 1 = (4k + r)2 + 1 = 4k 2 + 8kr + r2 + 1. Case 0 : r = 0. So, n2 + 1 = 4(k 2 ) + 1. Case 1 : r = 1. So, n2 + 1 = 4(k 2 + 2k) + 2. Case 2 : r = 2. So, n2 + 1 = 4(k 2 + 4k + 1) + 1. Case 3 : r = 3. So, n2 + 1 = 4(k 2 + 6k + 2) + 2. In each case, we see that (n2 + 1) mod 4 = 1 or 2 (never 0). Hence, 4 - (n2 + 1). 5. Compute each of the following: (a) b−6.3c. (b) d3.2e. (c) d−5.8e.

3.3. CHAPTER 3

199

Answer. (a) −7. (b) 4. (c) −5. 6. Let n ∈ Z. Show: bn + 21 c = n. Answer. Observe that n ∈ Z and n ≤ n +

1 2

< n + 1.

7. Prove or disprove: ∀ x, y ∈ R, bxyc = bxcbyc. Answer. Counterexample: Let x = 12 and y = 2. So bxyc = b1c = 1 and bxcbyc = 0 · 2 = 0. However, 1 6= 0. 8. The identification number d1 d2 · · · d10 on an American Express Traveler’s Check satisfies d1 + d2 + · · · + d10 mod 9 = 0. Determine the check digit # on the check number 536178450#. Answer. 6. 9. The UPC number for Huggies Ultratrim Diapers is read in as 0 36000 5219# 8, where # is a digit that cannot be read. Determine the value of that missing digit. Answer. 4. 10. Use the letter to number conversions “ ” = 0, A = 1, ... , Z = 26 and a shift cipher with n = 27 and encrypting shift value b = 5 to decrypt “HFQHZQZX”. Answer. “CALCULUS”. 11. Use the letter to number conversions “ ” = 0, A = 1, ... , Z = 26 and a shift cipher with n = 27 and encrypting shift value b = 14 to decrypt “JEB TN FJRW”. Answer. “WRONG ANSWER”. 2

12. Prove: ∀ n ∈ Z, b n2 cd n2 e = b n4 c. Answer. Case 1 : n is even. 2 Note n2 n2 = n4 . Case 1 : n is odd. n+1 n2 −1 Note n−1 2 2 = 4 .

200

CHAPTER 3. TEST BANK

13. A binary linear code turns a 3-digit binary message b1 b2 b3 into a 6-digit code word b1 b2 b3 b4 b5 b6 according to the following formulas b4

=

(b1 + b2 + b3 ) mod 2

b5

=

(b1 + b2 ) mod 2

b6

=

(b2 + b3 ) mod 2.

(a) Make a table for the entire code. (b) What is the weight of this code? (c) Using nearest neighbor decoding, to what message should the code word 111010 be decoded? Answer. (a)

Message 000 001 010 011 100 101 110 111

Code Word 000000 001101 010111 011010 100110 101011 110001 111100

(b) 3. (c) 011.

Section 3.3 1. Use any method you wish to find integers x, y such that gcd(55, 35) = 55x + 35y. Answer. gcd(55, 35) = 5 = 55(2) + 35(−3). 2. Prove or disprove that 20x + 16y = 2 has a solution with x, y ∈ Z. Answer. There is no such solution, since 4(5x + 4y) = 2 would imply that 4 | 2. 3. Compute gcd(68, 20) using Euclid’s algorithm. Show your work. Answer. gcd(68, 20)

= gcd(20, 8) = gcd(8, 4) = gcd(4, 0) = 4

since 68 = (20)3 + 8 since 20 = (8)2 + 4 since 8 = (4)2 + 0 obviously.

4. Use Euclid’s algorithm to find gcd(88, 32) and to write it in the form 88x + 32y for x, y ∈ Z.

3.3. CHAPTER 3

201

Answer. gcd(88, 32)

= gcd(32, 24) since 88 = (32)2+24, so 24 = 88−(32)2 = gcd(24, 8) since 32 = (24)1+8, so 8 = 32−(24)1 = gcd(8, 0) since 24 = (8)3+0 = 8 obviously.

Therefore, 8 = 32 − (24)1 = 32 − (88 − 2(32))1 = (88)(−1) + (32)(3). That is, gcd(88, 32) = 8 = 88x + 32y for x = −1 and y = 3. 5. Show: ∀ n ∈ Z, n and 2n + 1 are relatively prime. Answer. (−2)(n) + (1)(2n + 1) = 1. 6. Let m, n, c ∈ Z. Is it always true that, if c | mn and c - m then c | n? Why? Answer. No. Consider m = n = 2 and c = 4.

Section 3.4 1. Show that 1.403 is rational. Answer. 1.403 =

1403 1000

and 1403, 1000 ∈ Z with 1000 6= 0.

2. Show that 0.234 is rational. Answer. Let x = 0.234. So 10x = 2.34 and 1000x = 234.34. Since 990x = 1000x − 10x = 232, it follows that 232 0.234 = x = 990 = 116 495 . Since 116, 495 ∈ Z and 495 6= 0, we see that 0.234 is rational. 3. Let r ∈ R. Use only the definition of Q to show: If r ∈ Q, then

r 6

∈ Q.

Answer. Suppose r ∈ Q. So r = ab for some a, b ∈ Z with b 6= 0. a Observe that 6r = 6b and a, 6b ∈ Z with 6b 6= 0. Thus, 6r ∈ Q. 4. Let a, b ∈ Z. Show: If lowest terms.

a b

is in lowest terms and is positive, then

b a

is in

Answer. Suppose ab is in lowest terms and is positive. Since ab is in lowest terms, gcd(a, b) = 1 and b > 0. Since ab is positive, a > 0. Since a > 0 and gcd(b, a) = gcd(a, b) = 1, it follows that b a is in lowest terms. 5. Write

14 33

in decimal form without using a calculator. Show your work.

202

CHAPTER 3. TEST BANK Answer. 33 ) -

1 1

. 4. 3 -

So

14 33

6. Show that

4 0 2 8 6 1

2

0 6 4

remainder 8 remainder 14

= 0.42. √

11 is irrational by mimicking the proof that



2 is irrational.

√ √ Answer. Suppose 11 is not irrational. Write 11 = ab in lowest √ terms. So b 11 = a. So b2 11 = a2 . So 11 | a2 . Since 11 is prime, 11 | a. Write a = 11c. So b2 11 = a2 = 112 c2 . So b2 = 11c2 . So 11 | b2 . Since 11 is prime, 11 | b. So gcd(a, b) ≥ 11. This contradicts the assumption that ab is in lowest terms. 7. Use the result from problem 1 to show that

√ 3 11−1

is irrational.

3 Answer. Suppose to the contrary that r = √11−1 is rational. So √ r+3 11 = r . Since r is clearly nonzero, the arithmetic properties of Q guarantee that r+3 r is rational. This contradicts the result √ from problem 1 that 11 is irrational. Hence, it must be that √ 3 is irrational. 11−1

8. Show that log2 (11) 6∈ Q. Answer. Suppose to the contrary that log2 (11) ∈ Q. Write a log2 (11) = ab , with a, b > 0. So 2 b = 11. So 2a = 11b . By the Fundamental Theorem of Arithmetic, a = b = 0. This is a contradiction. 9. Is the product of irrational numbers always irrational? Justify your answer. Answer. No. E.g. x = y =



2, xy = 2.

10. Show: ∀ x ∈ R, if x2 6∈ Q, then x 6∈ Q. Answer. Suppose x ∈ Q. Hence, the product x2 ∈ Q. 11. Use the Rational Roots Theorem to show that

p √ 1 + 2 6∈ Q.

3.3. CHAPTER 3

203

Answer. p Scratch √ work. Let r = 1 + √ 2. So r2 = 1 + 2. √ Hence, r2 − 1 = 2. So r4 − 2r2 + 1 = 2. Therefore, r4 − 2r2 − 1 = 0. Proof. Let f (x) = x4 − 2x2 − 1. By the Rational Roots Theorem, the p √ only possible rational roots of fpare ±1. Of course, 1 + 2 √ is neither 1 nor −1. Since f ( 1 + 2) = 0, it follows that p √ 1 + 2 must be irrational. 12. Show that

√ 1√ 2+ 3

is algebraic.

√ √ √ 1√ Answer. Let x = √2+ = 3 − 2. So x2 = 5 − 2 6. Since 3 √ x2 − 5 = −2 6, we see that x2 − 10x + 25 = (x2 − 5)2 = 24. 1√ Thus, x2 − 10x + 1 = 0. Since √2+ is a root of the polynomial 3 1√ 2 x − 10x + 1 (which has integer coefficients), √2+ is algebraic. 3

Section 3.5 1. Determine if the following statements are True or False. (a) 28 ≡ 10 (mod 3). (b) 4 ≡ 0 (mod 8). Answer. (a) True. (b) False. 2. In a single year, is it possible for July 4th and Christmas (December 25th) to occur on the same day of the week? Justify your answer. Answer. No, since (27 + 31 + 30 + 31 + 30 + 25) mod 7 = 6 6= 0. 3. Let a, b, n ∈ Z with n > 1. Show: If a ≡ −b (mod n), then a2 ≡ b2 (mod n). Answer. Suppose a ≡ −b (mod n). So n | (a + b). That is, (a + b) = nk for some k ∈ Z. Observe that a2 − b2 = (a + b)(a − b) = n · k(a − b) and k(a − b) ∈ Z. Thus, n | a2 − b2 . That is, a2 ≡ b2 (mod n). 4. Compute (368135 + 35) mod 9.

204

CHAPTER 3. TEST BANK Answer. Observe that 368135 = 9 · 368133 ≡ 0 · 368133 ≡ 0 (mod 9). Hence, (368135 + 35) mod 9 = 35 mod 9 = 8.

5. Use the fact that 34 ≡ 1 (mod 10) to compute 353186 mod 10. Answer. 353186 ≡ (34 )13296 · 32 ≡ 113296 · 9 ≡ 9 (mod 10). So, 353186 mod 10 = 9. 6. Show: ∀ n ∈ Z, (3n4 + 1)2 ≡ 1 (mod 5). (

0 if n ≡ 0 (mod 5), Answer. Let n ∈ Z. First observe that n ≡ 1 if n 6≡ 0 (mod 5). ( 1 if n ≡ 0 (mod 5), So, 3n4 + 1 ≡ −1 if n 6≡ 0 (mod 5). Since 12 = (−1)2 = 1, we see that (3n4 + 1)2 ≡ 1 (mod 5). 4

7. Use Fermat’s Little Theorem to help you compute 7123432 mod 11. Answer. Since 11 is prime and 11 - 7, Fermat’s Little Theorem tells us that 710 ≡ 1 (mod 11). Hence, 7123432 ≡ (710 )12343 · 72 ≡ 112343 · 49 ≡ 49 ≡ 4 (mod 11). Therefore, 7123432 mod 11 = 4. 8. A certain product ID code is 4 characters long and is constructed using only the letters in Table 3.1. A linear cipher with n = 7, a = 3, and b = 1 A 0

B 1

C 2

D 3

E 4

F 5

G 6

Table 3.1: Converting Letters to Numbers (i.e. y = (3x + 1) mod 7) is used to encode the ID’s. (a) Encrypt ‘FACE’. (b) Decrypt ‘GDFG’. Answer. (a) CBAG. (b) EDGE. 9. Use binary expansion and repeated squaring to compute 207 mod 403.

3.3. CHAPTER 3

205

Answer. 266. Note that 7 = 4 + 2 + 1, and 202 ≡ −3, 204 ≡ 9 (mod 403). Also, 9 · (−3) · 20 ≡ −540 ≡ 266 (mod 403). 10. A company is using the RSA encryption method with p = 7 and q = 17, so n = 119. The number a = 35 is used to encode messages via y = x35 mod 119. Note that c = 11 is a multiplicative inverse of a modulo 48. (a) Encrypt the message x = 2. (b) Decrypt the message y = 5. Answer. (a) 25. (Note that 27 ≡ 9 (mod 119).) (b) 45. (Note that 53 ≡ 6 (mod 119).) 11. Find and simplify [13]10 + [7]10 . Answer. [20]10 = [0]10 .

206

3.4

CHAPTER 3. TEST BANK

Chapter 4

Section 4.1 1. List the first 4 terms of the sequence ∀ n ≥ 2, sn =

(n2 )

2n−2 .

Answer. s2 = 1, s3 = 32 , s4 = 32 , s5 = 54 . 2. List the first 4 terms of the sequence given by s0 = 1 and ∀ n ≥ 1, sn = (sn−1 + 1)2 . Answer. s0 = 1, s1 = 4, s4 = 25, s5 = 676. 3. Give a closed formula for the sequence 3, −6, 9, −12, 15, −18, . . .. Answer. ∀ n ≥ 1, sn = (−1)n+1 · 3n. 4. Give a recursive formula for the sequence 2, 5, 8, 11, 14, . . .. Answer. s0 = 2 and ∀ n ≥ 1, sn = sn−1 + 3. 5. Reindex the sequence ∀ n ≥ 3, sn = so that the indexing starts at 0. Answer. ∀ n ≥ 0, tn =

(n−2)! 2n

(n+1)! 2n+3

6. Given that k ≥ 1, s0 = 6, s1 = 2, and ∀ n ≥ 2, sn = 3sn−1 − 2sn−2 , express sk+1 in terms of prior values in the sequence. Answer. sk+1 = 3sk − 2sk−1 . 7. Annuity. A deposit of s0 = 1000 is made into an account. For each n ≥ 1, the balance sn after n months is determined as follows. Interest at a monthly interest rate of 1% is added to the previous month’s balance and then 50 dollars is withdrawn from the account. (a) Find balances s1 and s2 . (b) Write a recursive formula for sn . Answer. (a) s1 = 960 and s2 = 910.96. (b) ∀ n ≥ 1, sn = 1.01sn−1 − 50.

3.4. CHAPTER 4

207

Section 4.2 1. Compute

5 X

i!.

i=0

Answer. 1 + 1 + 2 + 6 + 24 + 120 = 154 2. Write the sum 4 + 9 + 16 + 25 + · · · + 10000 in sigma notation. P100

Answer. 3. Compute

n X

i=2

i2

(5 − 6i) using known summation formulas.

i=1

Pn Pn Pn = Answer. i=1 (5 − 6i) = i=1 5 − 6 i=1 i = 5n − 6 n(n+1) 2 2 5n − 3n(n + 1) = 2n − 3n .

4. Compute

n−2 X

(5 · 3i ) using known summation formulas.

i=2

Pn−2 Pn−2 Pn−4 Pn−4 Answer. i=2 (5·3i ) = 5 i=2 3i = 5 j=0 3j+2 = 5 j=0 32 3j = Pn−4 n−4+1 n−3 − 1). 45 j=0 3j = 45 3 3−1 −1 = 45 2 (3 5. The triangular number tn is the number of dots in a triangular array of dots consisting of n rows. s s sss ss sss ··· t1 = 1, t2 = 3, t3 = 6, That is, there must be 1 dot in the first row, 2 dots in the second row, 3 dots in the third row, and so forth. (a) Express tn as a sum using sigma notation. (b) What is the closed formula for tn ? Answer. P n (a) tn = i=1 i. (b) tn = n(n+1) . 2 6. True or False. ∀ n ≥ 1,

n Y i=1

Answer. False.

i3 = (n3 )!

208

CHAPTER 3. TEST BANK

Section 4.3 1. Show: ∀ n ≥ 3, 2n2 + 1 ≥ 5n. Answer. Base case: (n = 3). Note that 2 · 32 + 1 ≥ 5(3). Inductive step: Suppose k ≥ 3 and 2k 2 + 1 ≥ 5k. (Goal: 2(k + 1)2 + 1 ≥ 5(k + 1).) Observe that 2(k + 1)2 + 1 = 2k 2 + 4k + 2 + 1 = (2k 2 + 1) + (4k + 2) ≥ 5k + (4k + 2) ≥ 5k + 5 = 5(k + 1). 2. Show: ∀ n ≥ 1, 3n−1 ≥ n. Answer. Base case: (n = 1). Note that 30 ≥ 1. Inductive step: Suppose k ≥ 1 and 3k−1 ≥ k. (Goal: 3(k+1)−1 ≥ (k + 1).) Observe that 3(k+1)−1 = 3k = 3 · 3k−1 ≥ 3k = k + 2k ≥ k + 1. 3. Show: ∀ n ≥ 0, n2 + 4 ≥ 4n. Hint: More than one base case may need to be considered. Answer. Base cases: (n = 0, 1, 2). Note that 02 + 4 ≥ 4(0), 12 + 4 ≥ 4(1), and 22 + 4 ≥ 4(2). Inductive step: Suppose k ≥ 2 and k 2 + 4 ≥ 4k. (Goal: (k + 1)2 + 4 ≥ 4(k + 1).) Observe that (k +1)2 +4 = k 2 +2k +1+4 = (k 2 +4)+(2k +1) ≥ 4k + (2k + 1) ≥ 4k + 4 = 4(k + 1). 4. Show: ∀ n ≥ 0,

2 | (3n + 1).

Answer. Proof. Base case: (n = 0). Note that 2 | (30 + 1). Inductive step: Suppose k ≥ 0 and 2 | (3k + 1). So, 3k + 1 = 2c for some c ∈ Z. (Goal: 3 | (3k+1 + 1).) Observe that 3k+1 + 1 = 3 · 3k + 1 = (2 + 1)3k + 1 = 2 · 3k + (3k + 1) = 2 · 3k + 2c = 2(3k + c). Thus, 3 | (3k+1 + 1). 5. Show: ∀ n ≥ 0,

7 | (10n − 3n ).

Answer. Proof. Base case: (n = 0). Note that 7 | (100 − 30 ). Inductive step: Suppose k ≥ 0 and 7 | (10k − 3k ). So, 10k − 3k = 7c for some c ∈ Z. (Goal: 7 | (10k+1 − 3k+1 ).) Observe that 10k+1 − 3k+1 = (7 + 3)10k − (3)3k = 7(10k ) + 3(10k − 3k ) = 7(10k ) + 3(7c) = 7(10k + 3c). Thus, 7 | (10k+1 − 3k+1 ).

3.4. CHAPTER 4

209

6. Let A be a set. Show: ∀ n ≥ 1, for all sets B1 , B2 , . . . , Bn , A × (B1 ∩ B2 ∩ · · · ∩ Bn ) = (A × B1 ) ∩ (A × B2 ) ∩ · · · ∩ (A × Bn ). You may assume that it is true in the case that n = 2. Answer. Base case: (n = 1). Let B1 be any set. Note that A × (B1 ) = (A × B1 ). Inductive step: Suppose k ≥ 1 and, for all sets B1 , B2 , . . . , Bk , A × (B1 ∩ B2 ∩ · · · ∩ Bk ) = (A × B1 ) ∩ (A × B2 ) ∩ · · · ∩ (A × Bk ). Let B1 , B2 , . . . , Bk+1 be any sets. Observe that A × (B1 ∩ B2 ∩ · · · ∩ Bk+1 ) = A × ((B1 ∩ B2 ∩ · · · ∩ Bk ) ∩ Bk+1 ) = (A × (B1 ∩ B2 ∩ · · · ∩ Bk )) ∩ (A × Bk+1 ) = ((A × B1 ) ∩ (A × B2 ) ∩ · · · ∩ (A × Bk )) ∩ (A × Bk+1 ) = (A × B1 ) ∩ (A × B2 ) ∩ · · · ∩ (A × Bk+1 ). 7. Annuity. The balance sn after n months in an account is set up so that s0 = 1000 and ∀ n ≥ 1, sn = 1.02sn−1 − 100. (a) Prove: ∀ n ≥ 0, sn = 5000 − 4000(1.02)n . (b) Find s11 . Answer. (a) Base case: (n = 0). Note that 1000 = 5000 − 4000(1.02)0 . Inductive step: Suppose k ≥ 0 and sk = 5000 − 4000(1.02)k . (Goal: sk+1 = 5000 − 4000(1.02)k+1 .) Observe that sk+1 = 1.02sk − 100 = 1.02(5000 − 4000(1.02)k ) − 100 = 5100 − 4000(1.02)k+1 − 100 = 5000 − 4000(1.02)k+1 . (b) $26.50. 8. Show: ∀ n ≥ 1, 

1 2

0 1

n

 =

1 0 2n 1

Answer. Base case: (n = 1). Obvious.  1 Inductive step: Suppose k ≥ 1 and 2  k+1    1 0 1 0 Observe that = · 2 1 2 1       1 0 1 0 1 0 · = . 2 1 2k 1 2(k + 1) 1

Section 4.4 1. Show: ∀ n ≥ 1,

n X i=1

i(3i + 1) = n(n + 1)2 .

 .

0 1

k

1 2

0 1

 = k =

1 2k

0 1

 .

210

CHAPTER 3. TEST BANK Answer. Base case: (n = 1). P1 Note that i=1 i(3i + 1) = 4 = 1 · 22 . Pk Inductive step: Suppose k ≥ 1 and i=1 i(3i + 1) = k(k + 1)2 . Pk+1 2 (Goal: i=1 i(3i + 1) = (k + 1)(k + 2) .) Observe Pk+1 that Pk i=1 i(3i + 1) = i=1 i(3i + 1) + (k + 1)(3(k + 1) + 1) = k(k + 1)2 + (k + 1)(3k + 4) = (k + 1)[k(k + 1) + (3k + 4)] = (k + 1)[k 2 + 4k + 4] = (k + 1)(k + 2)2 .

2. Show: ∀ n ≥ 1,

2n X (3i − 1) = n(6n + 1). i=1

Answer. Base case: (n = 1). P2 Note that i=1 (3i − 1) = 2 + 5 = 7 = 1(6(1) + 1). P2k Inductive step: Suppose k ≥ 1 and i=1 (3i − 1) = k(6k + 1). P2(k+1) (Goal: i=1 (3i−1) = (k +1)(6(k +1)+1) = (k +1)(6k +7).) P2(k+1) Observe that i=1 (3i − 1) = P2k i=1 (3i − 1) + (3(2k + 1) − 1) + (3(2k + 2) − 1) = k(6k + 1) + (3(2k + 1) − 1) + (3(2k + 2) − 1) = 6k 2 + 13k + 7 = (k + 1)(6k + 7). 3. Show: ∀ n ≥ 1, 3 + 33 + 35 + 37 + · · · + 32n−1 = 38 (9n − 1). Pn Answer. We prove that i=1 32i−1 = 83 (9n − 1). P1 2i−1 Base case: (n = 1) Note that = 3 = 83 (9 − 1). i=1 3 P k Inductive step: Suppose k ≥ 1 and i=1 32i−1 = 83 (9k − 1). Pk+1 2i−1 (Goal: = 38 (9k+1 − 1).) i=1 3 Pk+1 2i−1 Pk Observe that i=1 3 = i=1 32i−1 + 32(k+1)−1 = 3 k 2(k+1)−1 = 38 (9k+1 − 1). 8 (9 − 1) + 3 4. Show: ∀ n ≥ 2,

n X (i + 1)( 32 )i = 3(n − 1)( 32 )n . i=2

Answer. Base case: (n = 2). P2 3 2 Note that i=2 (i + 1)( 23 )i = 27 4 = 3(1)( 2 ) . Inductive step: Pk Suppose k ≥ 2 and i=1 (i + 1)( 32 )i = 3(k − 1)( 32 )k . Pk+1 3 i 3 k+1 (Goal: .) i=2 (i + 1)( 2 ) = 3(k + 2)( 2 ) Pk+1 P k 3 i Observe that i=2 (i+1)( 2 ) = i=1 (i+1)( 23 )i +(k+2)( 32 )k+1 = 3(k − 1)( 32 )k + (k + 2)( 32 )k+1 = 2(k − 1)( 32 )k+1 + (k + 2)( 32 )k+1 = [2(k − 1) + (k + 2)]( 32 )k+1 = 3k( 32 )k+1 .

3.4. CHAPTER 4

211

5. Annuity. If an initial investment of s0 = $1000 is made into an account earning 2% interest per month, and a deposit of $20 is added at the end of each subsequent month, then the balance sn after n ≥ 1 months is sn = 1000 · 1.02n + 20 · 1.02n−1 + 20 · 1.02n−2 + · · · + 20 · 1.02 + 20. (3.1) (a) Express (3.1) using sigma notation. (b) Prove by induction: ∀ n ≥ 0, sn = 2000(1.02)n − 1000. Answer. Pn−1 (a) sn = 1000 · 1.02n + i=0 20 · 1.02i . (b) Base case: (n = 0). Note that 1000 = 2000(1.02)0 − 1000. Inductive step: Suppose k ≥ 0 and sk = 2000(1.02)k − 1000. (Goal: sk+1 = 2000(1.02)k+1 − 1000.) Pk Observe that sk+1 = 1000 · 1.02k+1 + i=0 20 · 1.02i = P k−1 (1000 · 1.02k )(.02 + 1) + ( i=0 20 · 1.02i ) + 20 · 1.02k = P k−1 20 · 1.02k + (1000 · 1.02k + i=0 20 · 1.02i ) + 20 · 1.02k = 20 · 1.02k + sk + 20 · 1.02k = 2000(1.02)k − 1000 + 40 · 1.02k = 2040(1.02)k − 1000 = 2000(1.02)k+1 − 1000. 6. Show: ∀ n ≥ 2,

n Y i+2 i=2

i−1

=

n(n + 1)(n + 2) . 6

Q2 i+2 Answer. Base case: (n = 2). Note that i=2 i−1 = 4 = 2(3)(4) . 6 Qk i+2 k(k+1)(k+2) Inductive step: Suppose k ≥ 2 and i=2 i−1 = . Qk+16i+2 Qk+1 i+2 = (k+1)(k+2)(k+3) .) Observe that = (Goal: i=2 i−1 i=2 i−1 6 Qk i+2 k+3 (k+1)(k+2)(k+3) k+3 ( i=2 i−1 )( k ) = ( k(k+1)(k+2) )( ) = . 6 k 6

Section 4.5 1. Let {sn } be the sequence defined by s0 = 3, s1 = 14, and ∀ n ≥ 2, sn = 4(3sn−1 − 5sn−2 ). Show: ∀ n ≥ 0, sn = 2n+1 + 10n . Answer. Base cases: (n = 0, 1). Note that 3 = 21 + 100 and 14 = 22 + 101 . Inductive step: Suppose k ≥ 1 and that, for each 0 ≤ i ≤ k, si = 2i+1 + 10i . (Goal: sk+1 = 2k+2 + 10k+1 .) Observe that sk+1 = 4(3sk − 5sk−1 ) = 4(3[2k+1 + 10k ] − 5[2k + 10k−1 ]) = 24 · 2k + 120 · 10k−1 − 20 · 2k − 20 · 10k−1 = 4 · 2k + 100 · 10k−1 = 2k+2 + 10k+1 .

212

CHAPTER 3. TEST BANK

2. Let {sn } be the sequence defined by s0 = 0, s1 = 4, and ∀ n ≥ 2, sn = 4sn−1 − 3sn−2 . Show: ∀ n ≥ 0, sn = 2(3n − 1). Answer. Base cases: (n = 0, 1). Note that 0 = 2 · (30 − 1) and 4 = 2 · (31 − 1). Inductive step: Suppose k ≥ 1 and that, for each 0 ≤ i ≤ k, si = 2(3i − 1). (Goal: sk+1 = 2(3k+1 − 1).) Observe that sk+1 = 4sk −3sk−1 = 4[2(3k −1)]−3[2(3k−1 −1)] = 8 · 3k − 8 − 2 · 3k + 6 = 6 · 3k − 2 = 2(3k+1 − 1). 3. In a certain game, 5 points are awarded for a woggle and 8 points are awarded for a wuggle. Show that, with woggles and wuggles, any point total from 28 on up is achievable. Answer. Base cases: (n = 28, 29, 30, 31, 32). We see that 28 points are awarded for 4 woggles and 1 wuggle, 29 points are awarded for 1 woggle and 3 wuggles, 30 points are awarded for 6 woggles, 31 points are awarded for 3 woggles and 2 wuggles, and 32 points are awarded for 4 wuggles. Inductive step: Suppose k ≥ 32 and that, for each 28 ≤ i ≤ k, it is possible to get i points. By the inductive hypothesis, (k − 5) points is achievable by a woggles and b wuggles, for some a, b ∈ N. Observe that k points is thus achievable by a + 1 woggles and b wuggles. 4. Find the standard factorization of 24000. Answer. 26 · 3 · 53 . 5. Use the Fundamental Theorem of Arithmetic to prove the following special case of Euclid’s Lemma. Let p, m, n ∈ Z+ with p prime. Show: If p | mn, then p | m or p | n. Answer. Suppose p | mn. So mn = pk for some k ∈ Z+ . Let m = pe11 · p2e2 · · · · · peuu , n = q1f1 · q2f2 · · · · · qvfv , and gw k = r1g1 · r2g2 · · · · · rw be the standard factorizations of m,n, and k, guaranteed by the Fundamental Theorem of Arithmetic. After grouping together like primes, both sides of the equation gw pe11 · pe22 · · · · · peuu · q1f1 · q2f2 · · · · · qvfv = p · r1g1 · r2g2 · · · · · rw

3.4. CHAPTER 4

213

represent standard factorizations of mn. Since such factorizations are unique and p occurs on the right-hand side, it must also occur on the left-hand side. Hence, either p = pi or p = qi for some i. That is, p | m or p | n. 6. Let {Fn }n≥0 be the Fibonacci sequence 1, 1, 2, 3, 5, 8, . . . and let {Ln }n≥1 be the Lucas sequence 1, 3, 4, 7, 11, 18, . . .. Show: ∀ n ≥ 2, Ln+1 = Fn+2 − Fn−2 . Answer. Base cases: (n = 2, 3). Note that L3 = 4 = 5 − 1 = F4 − F0 and L4 = 7 = 8 − 1 = F5 − F1 . Inductive step: Suppose k ≥ 3 and that, for each 2 ≤ i ≤ k, Li+1 = Fi+2 − Fi−2 . (Goal: Lk+2 = Fk+3 − Fk−1 .) Observe that Lk+2 = Lk+1 + Lk = Fk+2 − Fk−2 + Fk+1 − Fk−3 = (Fk+2 + Fk+1 ) − (Fk−2 + Fk−3 ) = Fk+3 − Fk−1 .

Section 4.6 1. Use the Binomial Theorem to expand (2x + 5y)4 . Show your work. Answer. (2x + 5y)4

= (2x)4 + 4(2x)3 (5y) + 6(2x)2 (5y)2 + 4(2x)(5y)3 + (5y)4 = 16x4 + 4 · 8x3 5y + 6 · 4x2 25y 2 + 8x125y 3 + 625y 4 =

16x4 + 160x3 y + 600x2 y 2 + 1000xy 3 + 625y 4 .

2. Use the Binomial Theorem to expand (x − 2y)5 . Show your work. Answer. 5

(x − 2y)

=

      5 5 5 4 5 3 0 1 x (−2y) + x (−2y) + x (−2y)2 0 1 2       5 2 5 1 5 0 3 4 + x (−2y) + x (−2y) + x (−2y)5 3 4 5

= x5 + 5x4 · (−2)y + 10x3 · 4y 2 +10x2 · (−8)y 3 + 5x · 16y 4 + (−32)y 5 = x5 − 10x4 y + 40x3 y 2 − 80x2 y 3 + 80xy 4 − 32y 5 . 3. What is the coefficient of x333 y 167 in (x − y)500 ?  Answer. − 500 333 . 4. What is the coefficient of x100 y 200 in (x + y)400 ? Answer. 0

214

CHAPTER 3. TEST BANK

5. Let n ∈ N. Use the Binomial Theorem to prove:

n   X n i=0

Answer. 32n = 9n = (5 + 4)n =

Pn

 n

i=0

i

i

5n−i 4i .

6. Let n ∈ N. Use the Binomial Theorem to prove:

n X

(−1)i

i=0

Answer. 1 = (5 − 4)n = (5 − 22 )n =

Pn

5n−i 4i = 32n .

i=0 (−1)

i n i



  n n−i 2i 5 2 = 1. i

5n−i 22i .

3.5. CHAPTER 5

3.5

215

Chapter 5

Section 5.1 1. Let X = {1, 2, 3, 5} and Y = {0, 3, 4, 9}, and define the relation R from X to Y by x R y if and only if x2 = y. Determine whether the given statements are True or False. (a) 3 is related to 9. (b) 1 is related to 1. (c) 4 is related to 2. Answer. (a) True. (b) False. Note that 1 6∈ Y . (c) False. Note that 42 6= 2. 2. Let X = {0, 1, 2, 3}, and let R be the relation on X defined by a R b if and only if a | b. Find the matrix representing R. Answer. 0 1 2 3

 0 1  1   1 1

1 0 1 0 0

2 0 1 1 0

3 0 1 0 1

   

3. Let R be the relation on R given by x R y if and only if y 2 = x + 1. (a) Draw the graph of R. (b) Complete the statement: x R−1 y if and only if (c) Draw the graph of R−1 . Answer. (a) y

x

(b) x2 = y + 1.

216

CHAPTER 3. TEST BANK (c) y

x

4. Table 3.2 is from a database storing the champions from golf’s major Champion Tiger Woods Ernie Els Justin Leonard Davis Love III Mark O’Meara Lee Janzen Mark O’Meara Vijay Singh

Tournament Masters U. S. Open British Open PGA Championship Masters U. S. Open British Open PGA Championship

Table 3.2: Golf’s Major Champions 1997-1998 tournaments. Draw an arrow diagram for the corresponding relation. ' Answer. Woods Els Leonard Love O’Meara Janzen

$ ' - t Masters 7t  t U. S. Open  7   t British Open t  3   t    - t PGA Championship &   t    t t

Singh t &

%

5. Draw the digraph for the ‘divides’ relation on {2, 3, 4, 5, 6}. Answer.

$

%

3.5. CHAPTER 5

217  6t z   AK  A   A 4t A z    A  A  A ty ty Aty    5 2 3  

6. Let R be the relation on R given by x R y if and only if x > y − 1. Prove or disprove each of the following. (a) R is reflexive. (b) R is symmetric. (c) R is transitive. Answer. (a) True. ∀ x ∈ R, x > x − 1. (b) False. 1 R 0 but 0 R 6 1. 1 1 6 1. (c) False. 0 R 2 and 2 R 1, but 0 R 7. Let R be the relation on P(R2 ) given by A R B if and only if A ⊆ B ∩ Z. Prove or disprove each of the following. (a) R is reflexive. (b) R is symmetric. (c) R is transitive. Answer. (a) False. R R 6 R. (b) False. Z R R but R R 6 Z. (c) True. Suppose A R B and B R C. That is, A ⊆ B ∩ Z and B ⊆ C ∩ Z. So, A ⊆ B ∩ Z ⊆ B ⊆ C ∩ Z. That is, A ⊆ C ∩ Z. Therefore, A R C.

Section 5.2 1. Let X be the set of circles in the plane R2 that are centered at the origin. Define a relation R on X by C1 R C2 if and only if radius(C1 ) ≤ radius(C2 ). Prove that R is a partial order relation on X.

218

CHAPTER 3. TEST BANK Answer. Reflexive. For any circle C, radius(C) ≤ radius(C). Antisymmetric. For any circles C1 , C2 , if radius(C1 ) ≤ radius(C2 ) and radius(C2 ) ≤ radius(C1 ), then radius(C1 ) = radius(C2 ). Since C1 and C2 are centered at the origin, C1 = C2 . Transitive. For any circles C1 , C2 , C3 , if radius(C1 ) ≤ radius(C2 ) and radius(C2 ) ≤ radius(C3 ), then radius(C1 ) ≤ radius(C3 ).

2. Let X be the set of real functions, and define a relation R on X by f R g if and only if f (0) ≤ g(0). Prove that R is not a partial order relation. Answer. R is not antisymmetric. For the functions f (x) = x and g(x) = −x, we have f (0) = 0 = g(0), but f 6= g. 3. Make a Hasse diagram for the divides relation on {1, 3, 7, 9, 21, 63}, the set of positive divisors of 63. Answer.

63

J

J 9 21

3

7 J

J

1

4. Using lexicographic order on N3 , based upon the normal ordering ≤ on N, put (3, 2, 5), (2, 3, 5), and (2, 2, 7) in their proper order. Answer. (2, 2, 7) E (2, 3, 5) E (3, 2, 5). 5. Let X be the set of circles in the plane R2 . Define a relation R on X by C1 R C2 if and only if C1 and C2 have the same radius, that is, radius(C1 ) = radius(C2 ). Prove that R is an equivalence relation on X. Answer. Reflexive. For any circle C, radius(C) = radius(C). Symmetric. For any circles C1 , C2 , if radius(C1 ) = radius(C2 ), then radius(C2 ) = radius(C1 ). Transitive. For any circles C1 , C2 , C3 , if radius(C1 ) = radius(C2 ) and radius(C2 ) = radius(C3 ), then radius(C1 ) = radius(C3 ). 6. Let R be the relation on R2 defined by (x1 , y1 ) R (x2 , y2 ) if and only if y1 + x1 = y2 + x2 . Prove that R is an equivalence relation on R2 .

3.5. CHAPTER 5

219

Answer. Reflexive. For any (x, y) ∈ R2 , y + x = y + x. Symmetric. For any (x1 , y1 ), (x2 , y2 ) ∈ R2 , if y1 + x1 = y2 + x2 , then y2 + x2 = y1 + x1 . Transitive. For any (x1 , y1 ), (x2 , y2 ), (x3 , y3 ) ∈ R2 , if y1 + x1 = y2 + x2 and y2 + x2 = y3 + x3 , then y1 + x1 = y3 + x3 . 7. Let R be the equivalence relation on R2 defined in Problem 6. (a) Is it true that [(2, 3)]R = [(4, 1)]R ? (b) Sketch in the plane [(2, 3)]R . (c) Find a representative for [(3, −4)]R in which the second coordinate is zero. Answer. (a) Yes. 3 + 2 = 1 + 4. (b)

y q5 q 5

x

(c) (0, −1). 8. Let A = {(i, i + 2) : i ∈ Z and 0 ≤ i ≤ 4}. Is A a partition of (0, 6)? Justify your answer. Answer. No. It is not disjoint since (0, 2) ∩ (1, 3) 6= ∅. 9. Let X = {2, 3, 4, 5, 8, 9}, and define the equivalence relation R on X by x R y if and only if gcd(x, y) > 1. Specify the partition of X corresponding to R. Answer. The equivalence classes are {2, 4, 8}, {3, 9}, {5}. 10. Let X = Z, A1

= {m : m = 3k + 1 for some k ∈ Z},

A2

=

{m : m = 3k + 2 for some k ∈ Z},

A3

=

{m : m = 3k for some k ∈ Z},

and A = {A1 , A2 , A3 }. (a) Explain why A is a partition of X.

220

CHAPTER 3. TEST BANK (b) Find the familiar equivalence relation on X corresponding to A. Answer. (a) The Division Algorithm guarantees that {A1 , A2 , A3 } is a disjoint collection whose union is Z. (b) Congruence modulo 3.

Section 5.3 ( x + 1 if x ≤ 0, 1. Define f from to R to R by f (x) = x2 − 1 if x ≥ 0. Determine whether or not f is a function. Justify your answer. Answer. It is not a function. The value of f (0) is not uniquely determined. Is it 1 or −1? 2. Define f from to Q to Q by f ( m n) = is a function. Justify your answer.

m2 +n2 n2 .

Determine whether or not f

Answer. It is a function. It is the function f (x) = x2 + 1 restricted to Q. 3. Define f : R −→ Z by f (x) = bxc2 . Specify each of the following. You need not justify your answer. (a) The domain of f . (b) The range of f . Answer. (a) R. (b) N. 4. Define f : [1, 4] −→ R by f (x) = 3x + 2. Prove that the range of f is [5, 14]. Answer. Observe that the following inequalities are equivalent. 1≤x≤4 3 ≤ 3x ≤ 12 5 ≤ 3x + 2 ≤ 14 So, if x ∈ [1, 4], then f (x) ∈ [5, 14]. Further, suppose y ∈ [5, 14]. Let x = follows that x ∈ [1, 4]. 2 . 5. Define f : R+ −→ R+ by f (x) = x+2 Prove that the range of f is (0, 1).

y−2 3 .

So y = 3x + 2. It

3.5. CHAPTER 5

221

Answer. Observe that the following inequalities are equivalent. 0 n1 and m2 > n2 . Thus, m1 m2 > n1 n2 . However, by the Pigeon Hole Principle, it must be that m1 m2 = |A1 × A2 | ≤ |B1 × B2 | = n1 n2 . This is a contradiction.

3.6. CHAPTER 6

3.6

227

Chapter 6

Section 6.1 1. A small sundae consists of one scoop of ice cream and one topping. How many different small sundaes are possible if there are 5 flavors of ice cream and 3 toppings to choose from? Answer. 15. 2. How many license plates consisting of 3 distinct letters (A to Z) followed by 3 odd digits (1 to 9) are there? Answer. 26 · 25 · 24 · 5 · 5 · 5 = 1950000. 3. How many different sequences of 8 coin tosses are possible? Answer. 28 = 256. 4. How many 7-digit base 8 numbers (leading zeros are allowed) read the same frontward and backward? Answer. 84 = 4096. 5. How many of the integers from 100 to 500 are divisible by 3? Answer. 133. 6. How many days after 4/15/1912 (Titanic sinks) was 5/6/1937 (Hindenburg crashes)? Answer. 9152. 7. How many days passed from the Red Sox World Series victory on 9/11/1918 to that on 10/27/2004? Answer. 365(86) + 21 + 19 + 27 = 31457. 8. How many days after prohibition began 1/16/1920 did prohibition end 12/5/1933? Answer. 365(14) + 4 − 16 − 26 = 5072.

228

CHAPTER 3. TEST BANK

Section 6.2 1. How many different finishing orders are possible in a race finished by 8 horses with no ties? Answer. 8! = 40320. 2. In how many ways might places 1, 2, 3, 4, 5 be awarded from the 50 contestants in the Miss America Pageant? Answer. P (50, 5) = 254251200. 3. In how many ways can a team of size 40 choose 3 to be captains? Answer.

40 3



= 9880.

4. List all of the combinations of 3 items from the set {a, b, c, d}. Answer. {a, b, c}, {a, b, d}, {a, c, d}, {b, c, d}. 5. In how many ways, from the 100 senators, could a senate committee consisting of a Chair, a Vice Chair, and 5 additional members be formed? Answer. P (100, 2)

98 5



= 672317553600.

6. Suppose a die is rolled 3 times and each of the values obtained is listed in order. (a) How many possible lists have values in decreasing order? (b) How many possible lists have 3 distinct values? Answer.  (a) 63 = 20. (b) P (6, 3) = 120. 7. How many 7-digit base 8 numbers (leading zeros are allowed) have exactly 3 fives and 2 sevens? Answer.

7 3

 4 2

62 = 7560.

8. In a Postnet code, how many bars are used to represent a digit? Answer. 5

3.6. CHAPTER 6

229

Section 6.3 1. How many sequences of 10 coin flips contain at most 3 heads? 10 2



Answer. 1 + 10 +

10 3



+

= 176.

2. How many sequences of 30 coin flips contain at least 3 heads? 30 2



Answer. 230 − (1 + 30 +

) = 1073741358.

3. How many of the integers from 1 to 729 are relatively prime to 729? Answer. 729 −

729 3

= 488.

4. How many different pairs of cards taken from a standard deck are both face cards (Jack, Queen, or King) or both red (♦ or ♥)? Answer.

12 2



+

26 2





6 2



= 376.

5. How many of the integers from 1 to 400 are divisible by 7 or 13? 400 400 Answer. b 400 7 c + b 13 c − b 7·13 c = 83.

6. How many different 7-digit (0 to 9) license plates contain exactly 3 threes or exactly 4 fours? Answer.

7 3



94 +

7 4



93 −

7 3



= 255115.

7. A jury pool contains 10 men and 16 women. A defense attorney believes that, if the jury of 12 people contains at least 8 men, then his client will be found not guilty. (a) How many possible jury selections will satisfy the defense attorney’s desire for at least 8 men? (b) How many possible jury selections will disappoint the defense attorney? Answer.  16    10 16 10 (a) 10 8 4 + 9 3 + 10 (b) 26 12 − 87620 = 9570080.

16 2



= 87620.

230

CHAPTER 3. TEST BANK

Section 6.4 1. If 2 fair 4-sided dice (sides numbered 1,2,3,4) are rolled, then what is the probability that their sum is 5? Answer.

4 16

= 14 .

2. If 3 cards are randomly selected from a standard deck, then what is the probability that 1 diamond and 2 hearts are obtained? Answer.

13 (13 1 )( 2 ) = 52 (3)

39 850 .

3. If 8 fair coins are tossed, then what is the probability of getting at least 2 heads? Answer.

28 −(1+8) 28

=

247 256

≈ .96.

4. If all 6-digit (0 to 9) license plates are equally likely, then what is the probability that a randomly selected one will have 3 digits the same and no other repeats? Answer.

10(63)P (9,3) 106

=

63 625

= .1008.

5. If two fair four-sided dice (sides numbered 1,2,3,4) are rolled, then what is the probability that their sum is divisible by 3? Answer.

5 16 .

6. In the Cash4Life Lottery, a player selects 5 numbers from 1 to 60 and an additional Cash Ball number from 1 to 4, which can duplicate one of the earlier values. (a) What is the probability that a player wins $1,000 per day for life by matching all 6 balls? (b) What is the probability that a player wins $52,000 per year for life by matching just the first 5 balls? (c) What is the probabilty that a player wins more than the price of the ticket by matching at least 2 of the first 5 balls? Answer. (a)

1

(60 5 )4

=

3 1 = 7282016 . (60 5 )4 55 55 +5 ( ) ( ) (c) 1 − 5 60 4 = (5)

1 21846048 .

(b)

1217 23954

≈ 0.0508.

7. Jason has 5 nickels and 3 quarters in his right hand and 2 nickels and 4 quarters in his left hand. Jason accidentally drops one of the coins. Given that a quarter is dropped, what is the probability that is came from Jason’s left hand?

3.6. CHAPTER 6

231 4 14 7 14

Answer.

= 47 .

8. Consider the experiment of rolling two standard fair dice. Let E be the event of rolling a sum of 6, and let F be the event of rolling doubles (a pair). Are E and F independent? Justify your answer. Answer. No, since P (E) = P (E)P (F ).

5 36 ,

P (F ) = 61 , and P (E ∩ F ) =

1 36

6=

9. Sally makes 80% of the layups she shoots with her right hand and 60% of those she shoots with her left hand. In games, she takes 70% of her layups with her right hand. Given that Sally just made a layup in the basketball game, what is the probability that she used her left hand? Answer.

(.6)(.3) (.8)(.7)+(.6)(.3)

= .243.

Section 6.5 Exercises 1 and 2 refer to the following grid of points, and refer to paths from S to F that, at each intersection, can only travel down or to the right. Ss s s s s s s

s

sM

s

s

s

s

s

s

s

sN

s

s

s

s

s

s

s F

1. How many paths pass through M and N?    Answer. 32 32 21 = 18. 2. How many paths pass through M or N?     Answer. 32 53 + 64 21 − 18 = 42. For Exercises 3 through 9, consider 4-Card Stud Poker in which each player is dealt 4 cards. Take the obvious definitions of the hands in this case (e.g. straights are runs of 4 cards). Of course, a Full House is now impossible. Determine the number of ways to get each hand (and the probability to 6 decimal places). 3. Four of a Kind Answer. N = 13 and P ≈ .000048. 4. Straight-Flush

232

CHAPTER 3. TEST BANK Answer. N = 11 · 4 = 44 and P ≈ .000163.

5. Straight Answer. N = 11 · 44 − 44 = 2772 and P ≈ .010239. 6. Flush 13 4



Answer. N = 4

− 44 = 2816 and P ≈ .010402.

7. Three of a Kind 4 3

Answer. N = 13



48 = 2496 and P ≈ .009220.

8. Two Pairs Answer. N =

 4 2

13 2

2

= 2808 and P ≈ .010372.

9. One Pair Answer. N = 13 Hand Straight-Flush Four of a Kind Full House Flush Straight Three of a Kind Two Pairs One Pair Nothing Total

4 2



12 2



42 = 82368 and P ≈ .304250.

Number Possible 44 13 0 2816 2772 2496 2808 82368 177320 270725

Probability (to 6 places) .000163 .000048 0 .010402 .010239 .009220 .010372 .304250 .654982 1

Table 3.4: Likelihood of Poker Hands from 4 cards 10. A player playing Texas Hold’em has two cards of consecutive denominations and of the same suit. If that player does not fold, then what is his probability of getting a straight flush? Answer.

4(47 2)

(50 5)

=

1 490

≈ .0020.

11. How many different types of fruit baskets consisting of 12 pieces of fruit can be made from apples, bananas, and oranges if types are distinguished by the number of each kind of fruit they contain?   Answer. 12+3−1 = 14 12 12 = 91.

3.6. CHAPTER 6

233

12. How many solutions (x, y, z, w) to the equation x + y + z + w = 10 are there with x, y, z, w ∈ N?   Answer. 10+4−1 = 13 10 10 = 286.

Section 6.6 1. A Trivial Pursuit game piece is a circle (or “pie plate”) cut into 6 equalsized sectors. The winner’s pie plate has each of the 6 different colored “pie pieces” filling it. In how many different ways might the winner’s pie plate be filled?   Answer.

6! 6

= 120.

2. How many ways are there to form a necklace (with an invisible knot) using 7 beads from a bag containing 15 distinct beads? Answer.

P (15,7) 7·2

= 2316600.

3. There are 8 colors with which to color the sides of a cube to form a block. How many different blocks are possible with each side a different color? Answer.

P (8,6) 24

= 840.

4. In how many ways can 22 people be split into 4 teams of 3 and 2 teams of 5? Answer.

5 10 13 16 19 (22 3 )( 3 )( 3 )( 3 )( 5 )(5)

4!·2

= 1254751898400.

5. Edith has 16 different solid colored squares with which to make a 4 × 4 reversible quilt. How many different quilts are possible?

Answer.

16! 4·2

= 2615348736000.

6. A certain university has four science programs: biology, chemistry, geology, and physics. It has 100 students that major in biology, 80 that major in chemistry, 90 that major in geology, 60 that major in physics, 30 that major in both biology and chemistry, 10 that major in chemistry and physics. If no student has any other combination of majors in science, then how many science majors attend the university? Answer. 100 + 80 + 90 + 60 − 30 − 10 = 290.

234

3.7

CHAPTER 3. TEST BANK

Chapter 7

Section 7.1 1. A bag contains 5 red, 8 yellow, 7 green, and 6 blue balls. If 4 balls are randomly selected, then what is the probability that not all of the colors will be represented? Answer. Let Acolor be the set of selections missing that color.      18 19 20 |Ared ∪ Ayellow ∪ Agreen ∪Ablue | = 21 4  + 4  + 4  + 4   13 15 11 12 13 − 4 + 14 4 + 4 + 4 +  4 + 4 5 8 7 6 + 4 + 4 + 4 + 4 −0 = 17766 − 4621 + 125 = 13270. The probability is

13270

(26 4)

=

1327 1495

≈ .8876.

2. How many of the integers from 1 to 1400 are relatively prime to 1400? Answer. Note 1400 = 23 52 7. 1400 1400 1400 1400 − [ 1400 2 + 5 + 7 ] + [ 2·5 + = 1400 − 1180 + 280 − 20 = 480.

1400 2·7

+

1400 5·7 ]



1400 2·5·7

3. What is the probability that a 6 card poker hand will contain at least one of each suit? Answer. Let Asuit be the set of hands  missing  that suit. 39 26 13 |Ac♣ ∩ Ac♦ ∩ Ac♥ ∩ Ac♠ | = 52 − 4 + 6 − 4 6 6 6 6 = 8682544. 83486 8682544 p = 52 = 195755 ≈ .4265. (6) 4. How many of the integers from 1 to 5000 are divisible by at least one of 2, 3, 5, or 7? Answer. Let Ap be the set divisible by p. 5000 5000 5000 5000 +b c+ +b c) 2 3 5 7 5000 5000 5000 5000 5000 5000 −(b c+ +b c+b c+b c+b c) 6 10 14 15 21 35 5000 5000 5000 5000 +(b c+b c+b c+b c) 30 42 70 105 5000 −b c 210 = 5880 − 2403 + 403 − 23

|A2 ∪A3 ∪A5 ∪A7 | =

=

(

3857.

3.7. CHAPTER 7

235

5. If 4 children each drop their hat in the snow and then each child randomly retrieves one, what is the probability that some child ends up with their own hat? Answer. 1 −

P4

i=0

(−1)i i!

=1−

3 8

= 85 .

6. Find the chromatic polynomial for the pictured figure. That is, as a function of n, determine the number of ways to color each circle ◦ so that no two circles that are directly joined by a line receive the same color. c1 c2 c c3 Answer. n4 − 3n3 + 3n2 − n = n(n − 1)3 .

Section 7.2 1. How many ways are there to split 10 workers into 2 teams of 3 and 2 teams of 2? Answer.

10 (3,3,2,2 )

2·2

=

25200 4

= 6300.

2. What is the coefficient of x30 y 15 z 25 in (x + 2y − z)70 ?  15  70 70 Answer. 30,15,25 2 (−1)25 = −32768 30,15,25 . 3. What is the coefficient of x25 y 30 z 10 in (x + y 2 + z)50 ?  50 Answer. 25,15,10 . 4. How many nonzero terms are there in the expansion of (2x + 3y − 4z − 5u + 6v)20 ?   Answer. 20+5−1 = 24 20 20 = 10626. 5. How many ways are there to color each of the squares in the pictured figure

so that 3 are red, 2 are yellow, and 2 are blue?  7 Answer. 3,2,2 = 210. 6. How many ways are there to split 18 players into 3 games of 3 on 3 volleyball?

236

CHAPTER 3. TEST BANK

Answer.

18 (6,6,6 )

3!



(63) 2

3 = 2858856000.

7. Prove: For all integers n ≥ 0, X 1 =

(−1)

k1

0 ≤ k1 , k2 , k3 ≤ n k1 + k2 + k3 = n



 n . k1 , k2 , k3

Answer. X

1 = (−1+1+1)n =

(−1)k1 1k2 1k3



0 ≤ k1 , k2 , k3 ≤ n k1 + k2 + k3 = n X

k1

(−1)

0 ≤ k1 , k2 , k3 ≤ n k1 + k2 + k3 = n



n k1 , k2 , k3

 =

 n . k1 , k2 , k3

Section 7.3 1. In how many different ways could you form $25 if you have 13 $1 bills, 4 $5 bills, and 2 $10 bills in your wallet? We distinguish ways strictly by how many of each kind of bill are used. Answer. Note that we only care about using 0, 5, or 10 $1 bills. Use generating function g(x) = (1 + x5 + x10 )(1 + x5 + x10 + x15 + x20 )(1 + x10 + x20 ) = . . . + 7x25 + . . .. There are 7 ways. 2. A bag contains 4 gold, 5 silver, and some bronze coins. We remove 10 coins and are interested in the number of each type obtained. How many different outcomes are possible (a) if there are 8 bronze coins? (b) if there is an unlimited number of bronze coins? Answer. (a) Since (1+x+x2 +· · ·+x4 )(1+x+x2 +· · ·+x5 )(1+x+x2 +· · ·+x8 ) = · · · + 27x10 + · · · , there are 27 possible outcomes. (b) Since (1+x+x2 +· · ·+x4 )(1+x+x2 +· · ·+x5 )(1+x+x2 +· · ·+x10 ) = · · · + 30x10 + · · · , there are 30 possible outcomes.

3.7. CHAPTER 7

237

1 3. What is the coefficient of x10 in (1 + x6 + x12 ) (1−x) 12 ?

Answer. 1 ·

10+12−1 10



+1·

4+12−1 4



=

21 10



+

15 4



= 354081.

4. How many different options are there for a fruit basket to be made by selecting 30 pieces of fruit from a bag containing 18 kiwis, 15 mangos, and unlimited numbers of bananas and apples? Answer. (1+x+x2 +· · ·+x18 )(1+x+x2 +· · ·+x15 )(1+x+x2 +· · · )2 19 1−x16 1 1 19 = 1−x − x16 + x35 ) · (1−x) 4 1−x · 1−x · (1−x)2 = (1 − x  The coefficient of x30 is 30+4−1 − 30    14 17 = 33 − − = 4412. 11 14 30

11+4−1 11





14+4−1 14



5. How many different options are there for a 6-piece fruit basket to be made by selecting pieces of fruit from a bag containing 3 apples, 6 bananas, and 3 oranges? Answer. (1+x+x2 +x3 )(1+x+x2 +x3 +x4 +x5 +x6 )(1+x+x2 +x3 ) = · · · + 16x6 + · · · . So 16. 6. How many different options are there for a fruit basket to be made by selecting 30 pieces of fruit from a bag containing 18 kiwis, 15 mangos, and unlimited numbers of bananas and apples? Find the number without using a polynomial expansion feature on your calculator. Answer. (1+x+x2 +· · ·+x18 )(1+x+x2 +· · ·+x15 )(1+x+x2 +· · · )2 19 1−x16 1 1 19 = 1−x − x16 + x35 ) · (1−x) 4 1−x · 1−x · (1−x)2 = (1 − x  The coefficient of x30 is 30+4−1 − 30    14 17 = 33 − − = 4412. 30 11 14

11+4−1 11





14+4−1 14



Section 7.4 1. In the dihedral group D5 , let fi denote the flip (reflection) of the regular pentagon about the line through vertex i and the center of the pentagon. Find r3 f1 r2 . Answer. f4 . 2. If there are 4 types of horses, then how many different merry-go-rounds consisting of a cycle of 9 horses can be made?

238

CHAPTER 3. TEST BANK Answer. The symmetry group is Z9 . |Fix(r0 )| = 49 . |Fix(ri )| = 4, for i = 1, 2, 4, 5, 7, 8. |Fix(ri )| = 43 , for i = 3, 6. N = 91 [49 + 6(4) + 2(43 )] = 29144.

3. If there are 5 different types of beads, then how many different 4 bead necklaces can be made? Answer. The symmetry group is D4 . Flips f1 and f2 are about lines through opposite corners, and flips f3 and f4 are about lines through opposite sides of a square. |Fix(r0 )| = 54 . |Fix(r1 )| = |Fix(r3 )| = 5. |Fix(r2 )| = 52 . |Fix(f1 )| = |Fix(f2 )| = 53 . |Fix(f3 )| = |Fix(f4 )| = 52 . N = 81 [54 + 2(5) + 52 + 2(53 ) + 2(52 )] = 120. 4. If there are 4 different types of beads, then how many different 6 bead necklaces can be made? Answer. The symmetry group is D6 . Flips f1 , f2 , f3 are about lines through opposite corners, and flips f4 , f5 , f6 are about lines through opposite sides of a regular hexagon. |Fix(r0 )| = 46 . |Fix(r1 )| = |Fix(r5 )| = 4. |Fix(r2 )| = |Fix(r4 )| = 42 . |Fix(r3 )| = 43 . |Fix(f1 )| = |Fix(f2 )| = |Fix(f3 )| = 44 . |Fix(f4 )| = |Fix(f5 )| = |Fix(f6 )| = 43 . 1 N = 12 [46 + 2(4) + 2(42 ) + 43 + 3(44 ) + 3(43 )] = 430. 5. If there are 5 different colors of paint available, then how many different ways are there to paint the faces of a tetrahedron to form a painted block?

Answer.

1 4 12 [5

+ 8(52 ) + 3(52 )] = 75.

6. How many ways are there to make a 6 chair Ferris wheel if there are 4 each of two types of chairs available? Answer. The symmetry   group is Z6 . |Fix(r0 )| = 2 62 + 63 .

3.7. CHAPTER 7

239

|Fix(r1 )| = |Fix(r5 )| = 0. |Fix(r2 )| = |Fix(r  4 )| = 2. |Fix(r3 )| = 2 32 .    N = 16 [(2 62 + 63 ) + 2(2) + 2 32 ] = 10. 7. A mobile in the pictured configuration is to be hung from the central point, and each point • marks a rotational center. If each location ◦ is to be filled with a plane, a bird, or a butterfly, then how many different mobiles are possible? csc c s c

s

c s c

csc Answer. The number of ways to color each of the four outer pairs is 12 [32 + 3] = 6. So N = 14 [64 + 6 + 62 + 6] = 336.

Section 7.5 n X



 n+1 i= . 1. Show: ∀ n ≥ 1, 2 i=1 Hint: Count the number of binary sequences of length n + 1 with exactly 2 ones. How many choices are there once you know where the second one goes? Answer. The number of binary sequences of length n + 1 containing exactly 2 ones is n+1 2 . For each 1 ≤ i ≤ n, if the second one occurs in position i + 1, then there are Pni choices for the position of the first one. Hence, the total is i=1 i. 2. Suppose 1 ≤ k1 , k2 , k3 and k1 + k2 + k3 = n. Use a combinatorial proof to show:         n n−1 n−1 n−1 = + + k1 , k2 , k3 k1 − 1, k2 , k3 k1 , k2 − 1, k3 k1 , k2 , k3 − 1 Answer. Consider the number of ways to split the set {1, 2, . . . , n} into three sets A1 , A2 , A3 with |A1 |= k1 , |A2 | = k2 , and |A3 | = k3 . This number is clearly k1 ,kn2 ,k3 . Now consider what happens to the element n. It must end up in exactly one of the sets A1 , A2 , A3 .  n−1 The number of ways for it to end up in A1 is k1 −1,k . 2 ,k3  The number of ways for it to end up in A2 is k1 ,kn−1 . 2 −1,k3  The number of ways for it to end up in A3 is k1 ,kn−1 ,k −1 . 2 3 n The sum of these three numbers must be k1 ,k2 ,k3 .

240

CHAPTER 3. TEST BANK

3. Suppose 3 ≤ k ≤ n − 3. Use a combinatorial proof to show:           n−3 n−3 n−3 n−3 n +3 +3 + = . k−3 k−2 k−1 k k Answer. Consider the number of binary sequences of length n  with exactly k ones. This number is clearly nk . Now separate such sequences according to the number of ones in the last 3 places.  There are n−3 k−3 sequences with 3 ones in the last 3 places. There are 3 n−3 k−2  sequences with 2 ones in the last 3 places. There are 3 n−3 sequences with 1 one in the last 3 places. k−1  n−3 There are k sequences with 0 ones in the last 3 places.  The sum of these four numbers must be nk . 4. Let 0 ≤ k ≤ n. Use a combinatorial proof to show:    k   X n n 2n = . i k − i k i=0 Answer. Consider paths in Pascal’s triangular grid that travel downward from (0, 0) to (2n, k). The total number of such paths  is 2n . k Now separate paths according to which entry of row n they go through. Each path must go through exactly one point of the form (n, i) for some 0 ≤ i ≤ k. (If they pass to the right of (n, k), then they cannot get “back” to (2n,k).) The number of  n n paths through (n, i) is ni 2n−n = n−i i n−i . The total number  n  Pk of paths can thus also be computed as i=0 ni k−i .

3.8. CHAPTER 8

3.8

241

Chapter 8

Section 8.1 1. In the displayed table, an X denotes the fact that the two different committees corresponding to that row and column have a member in common. A A B C D

B X

X X X

C

D

X

X X

X

Draw the corresponding committee scheduling graph. Answer. qA

qC

q

B

qD

2. Draw (and label) the graph G = (V, E) where V = {1, 2, 3, 4}, E = {a, b, c, d, e}, a 7→ {2, 3}, b 7→ {1, 2}, c 7→ {3, 4}, d 7→ {2, 3}, and e 7→ {4}. Answer. s

1

b

s

2

s

a

3

d

c

s ie

4

3. Let V = {1, 2, 3, 4, 5}, E = {{1, 2}, {1, 4}, {2, 3}, {2, 4}, {2, 5}, {3}}, and G = (V, E). (a) Draw the graph G. (b) Let W = {1, 4, 5} and F = {{1, 4}, {2, 5}}. Does H = (W, F ) form a subgraph of G? Explain. (c) Draw the subgraph of G induced by W = {1, 3, 4}. Answer. (a)

q q1 qi2q q4

5 3

(b) No. The vertex 2 needs to be in W for the edge {2, 5} in F . (c) q1 3q i q4

242

CHAPTER 3. TEST BANK

4. Could the following be a picture of a graph? s s @ s Answer. No. 5. Let G be the pictured graph. 1s

3s

s4

s

s 6

s 5

2 (a) Is G a simple graph?

(b) List the vertices in a trail from 4 to 6 that is not a path. (c) Find dist(1, 5). Answer. (a) Yes. (b) 4, 3, 1, 2, 3, 6. (c) 2. 6. Prove that a walk W from a vertex u to a vertex v of length dist(u, v) must be a path. Answer. Suppose W is not a path. Hence, W contains a repeated vertex x. Say W = u, . . . , e, x, . . . , x, f, . . . v. Then W 0 = u, . . . , e, x, f, . . . v is a shorter path than W from u to v. This contradicts the fact that W was supposed to be a shortest such path. Therefore, W must be a path.

Section 8.2 1. Draw K3 . Answer. 2r

J

J

r Jr 1 3 2. Draw P3 . Answer.

q

1

q

2

q

3

3.8. CHAPTER 8

243

3. Prove or disprove that the pictured graph is bipartite. q q q q

q

  q

q 

Answer. For i = 1, 2, let Vi be the set of vertices labeled i below. 1q 2q 1q 2

q q  2 q q

1

1

The sets V1 , V2 form a bipartition. 4. Prove or disprove that the pictured graph is bipartite. r r r r

r

r

r

r

r

Answer. It is not bipartite, since it contains an odd cycle. r r r r

r

r

r

r

r

5. Draw K2,4 . Answer.

t t (1, 1) H  (2, 1)  @ J HH  tJ@ HHt(2, 2) (1, 2) H J@ @H @ JH @H H @t(2, 3) J @ J @ J @ Jt(2, 4)

6. Draw the Octahedron graph. t

Answer. t

t

t

t t

244

CHAPTER 3. TEST BANK

7. Specify a path in Q5 from 00111 to 01100. Answer. 00111, 00110, 00100, 01100 8. What is the maximum possible distance between two vertices in Qn ? Answer. n

Section 8.3 1. Give the adjacency matrix for the pictured graph using the labels shown. 1r @  @ @r4 2r  r 3 Answer. 1 2 3 4

 1 0  2   0 1

2 2 0 1 1

3 0 1 0 1

4 1 1 1 1

   

2. Give the adjacency lists for P3 . Answer. 1

:

2

2

:

1, 3

3

:

2

3. Let G be a graph with the given adjacency matrix. 1 2 3 4 5

 1 0  0   1   0 1

2 0 1 0 1 0

3 1 0 0 0 2

(a) How many edges does G contain? (b) Is G a simple graph? Explain. (c) Is G connected? Justify your answer. Answer. (a) 6.

4 0 1 0 0 0

5 1 0 2 0 0

     

3.8. CHAPTER 8

245

(b) No. It contains a loop (at 2) and multiple edges (joining 3 to 5). (c) No. Vertices 1, 3, 5 induce one component, and 2, 4 induce another. 4. Let A be the following matrix.  1 0  1   0 1

1 2 3 4

2 1 0 1 1

3 0 1 0 0

4 1 1 0 0

   

(a) Draw the graph G whose adjacency matrix is A. (b) Find the permutation matrix P corresponding to the permutation 3, 1, 4, 2. (c) Compute P AP T . Hint: You can save calculations by using part (a). Answer. (a)

r @ r @r

r

1

3

4



0  1   0 0  0  1   1 1

(b)

(c)

2

0 0 0 1

1 0 0 0

1 0 1 0

1 1 0 0

 0 0   1  0  1 0   0  0

5. Let A denote the adjacency matrix for the graph C6 , using the ordering 1, 2, 3, 4, 5, 6 of its vertices. Without computing all of A3 , find the entry in row 1 and column 4 of A3 . Answer. 2. The only walks are the clockwise path and the counterclockwise path.

Section 8.4 1. Show that the two pictured graphs are isomorphic. q5 q q 4q q3

q q7

1

6

2

8

q q9

q 10

246

CHAPTER 3. TEST BANK Answer. Define f (1) = 10, f (2) = 6, f (3) = 8, f (4) = 7, and f (5) = 9. This answer is not unique.

2. Show that the two pictured graphs are isomorphic. q7 q12 1q q5 

A 8 q Aq11 q3 4q 2q A  q6 q 10 9Aq

Answer. Define f (1) = 7, f (2) = 9, f (3) = 8, f (4) = 11, f (5) = 10, and f (6) = 12. This answer is not unique. 3. Given the two matrices 1 2 3 4

1 2 3 4  0 1 0 1  1 0 1 1     0 1 0 0 =A 1 1 0 0

1 2 3 4

1 2 3 4  0 1 1 0  1 0 1 1     1 1 0 0 =B 0 1 0 0

let G and H be the graphs whose adjacency matrices are A and B, respectively. Prove that G ∼ = H. Answer. 1 7→ 3, 2 7→ 2, 3 7→ 4, 4 7→ 1 gives an isomorphism. 4. Determine the number of automorphisms of the pictured graph. 1 q 4q q q q 5 6 q 2

3

Answer. 3! · 2 = 12. 5. Is the Octahedron graph vertex transitive? Answer. Yes. 6. Is there a graph map from the graph in Problem 4 to K3 ? Justify your answer. Answer. Yes. Let a, b, c be the vertices of K3 . Define f (1) = a, f (2) = b, f (3) = c, f (4) = b, f (5) = c, and f (6) = a.

Section 8.5 1. Give a degree sequence for the pictured graph. t

t2

 t  4

t

1

5

t3

3.8. CHAPTER 8

247

Answer. 5, 4, 3, 2, 2 2. Show that the two pictured graphs are not isomorphic. 1r

3r

r4

r 2

r 6

r 5

7r 9r @ 8 @r @ @r 12

r10 r 11

Answer. The graph on the left has vertices with degree 3, while the graph on the right does not. 3. Show that the two pictured graphs are not isomorphic. r

r2

r

r

1

4

r3

r

r2

r

r

1

5

3

4

5

r

Answer. In the left-hand graph the two degree 3 vertices are adjacent, but in the right-hand graph they are not. Hence, an isomorphism is not possible. Alternatively, the complement of the left-hand graph is connected, while the complement for the right-hand graph is not. 4. Determine whether or not the two pictured graphs are isomorphic. Justify your answer. 1r

3r

r4

r 2

r 6

r 5

7r 9r @ 8 @r @ @r 12

r10 r 11

Answer. An isomorphism is given by f (1) = 11, f (2) = 10, f (3) = 12, f (4) = 8, f (5) = 7, f (6) = 9. 5. Find all nonisomorphic simple graphs on 5 vertices and 3 edges. Answer. K3 + Φ2 , K1,3 + Φ1 , P4 + Φ1 , P3 + P2 . 6. Find all nonisomorphic 3-regular graphs (if any) on 9 vertices. Answer. There are none, since there cannot be an odd number of vertices with odd degree. 7. Find all nonisomorphic graphs (if any) with degree sequence 4, 3, 3, 2, 1, 1. Answer. q

q

q

q

q q

q q

q q

q q

248

CHAPTER 3. TEST BANK

8. Draw the complement of the pictured graph. t 4 1 t

Answer.

2

t

t 5

3

t

t 6

1 2 3

t t H  4 @HH HHt t@ HH@ 5 @ H H@ Ht 6 t

9. Draw C6 + P2 . r  r AAr

Answer.

r AAr r

r

r

10. Regard the pictured graphs G and H as subgraphs of K4 . r r2 @ r @r4 3

H

(a) Draw G ∩ H. (b) Draw G ∪ H. Answer. (a)

(b)

r r2 @ r @r4 3 1

r r2 @ r @r4 3 1

11. Draw C6 × P2 . Answer.

r r2 @ r @r4 3 1

1

G

q q q qA  q q q Aq AAq q q q 

3.8. CHAPTER 8

249

Section 8.6 1. Let G = (V, E) be the directed graph with V = {1, 2, 3} and E = {(1, 2), (1, 1), (2, 1), (2, 3), (3, 1)} (a) Draw G. (b) Does G have multiple edges? (c) List the in- and out-degrees for each vertex. Answer. (a)

  1 ra  aa Ya ar 3 ? 6 !!! * ! r ! 2

(b) No. (c)

vertex 1 2 3

in-degree 3 1 1

out-degree 2 2 1

2. Determine the strong components of the pictured graph. Express your answer by listing the vertex set for each strong component. 1r 2r 3r ? r- 6 r 6 r 4

5

6

Answer. {1, 2, 4, 5}, {3}, {6}. 3. Prove that the two pictured directed graphs are isomorphic. 10 1q- 2q- 3q q 6q ? ?q9 q q6 q q- 6  8 7 5 4 Answer. Define f (1) = 10, f (2) = 8, f (3) = 9, f (4) = 6, and f (5) = 7. Note that this answer is unique. 4. Show that the two pictured directed graphs are not isomorphic. 1 7 9 q- 2q 3q q 8q q R @ ? ? @ @ ? q @ q  @ 6 q6 q @ q Iq I6 4

5

6

10

11

12

Answer. Vertex 3 in the left-hand graph has in-degree 1 and out-degree 1. There is no such vertex in the right-hand graph.

250

CHAPTER 3. TEST BANK

5. Determine whether or not the two pictured directed graphs are isomorphic. Justify your answer. 7q 1q- 2q 5q ? qH R @ ? 8@   6  Y q q @  -H Hq @ q q I 3 4 6 10 9 Answer. An isomorphism is given by f (1) = 10, f (2) = 9, f (3) = 7, f (4) = 6, and f (5) = 8. 6. Give the adjacency matrix for the pictured directed graph.   1t  aa a Ya at3 ?? !! ! * t ! ! 2 Answer. 1 2 3

2 2 0 0

1 1  0 1

3 0 1  0

7. Determine if the given directed graph is a Markov chain graph. If so, then give its transition matrix M . If not, then explain why. at A A 1  ? 1 1 2 AU 6 3  b t 1A QQ 1Q s QA 3  t   Q At c 2 d 3

Answer. It is not a Markov chain graph. The sum of the weights of the edges out of vertex c is 32 and not 1 as required. 8. Playing Pool. An amateur (A) and a professional (P) are playing pool so that, at all times, one of them is shooting. Each shoots until he misses, and then it is the other’s turn. The amateur makes 20% of his shots, and the professional makes 90% of his shots.   .8  A P .2 6A r .9  rP 6 .2 .8 .1  A =M P .1 .9

3.8. CHAPTER 8

251

(a) Assume that the amateur takes shot number 1. What is the probability that the professional takes shot number 3? (b) In the long term, determine the fraction of time that the professional will be shooting. Answer. (a) Since 2



M =

.12 .11

.88 .89

 ,

the probability is .88. (b) Since M∞ = the professional shoots

8 9



1 9 1 9

8 9 8 9

of the time.

 ,

252

3.9

CHAPTER 3. TEST BANK

Chapter 9

Section 9.1 1. Give the following values. No proof is requested. (a) κ(K6 ) (b) λ(K4,3 ) Answer. (a) 5 (b) 3 2. Let G be the pictured graph. 1r s

j k

m r 4

n q

r2

l

o

p

r3

r

r 5

(a) Specify a κ-set. (b) Specify a λ-set. Answer. (a) {2, 4}. (b) {l, p, r}. 3. Let G be the pictured graph. Find the specified values and prove your result. 1r

3r

r4

r 2

r 6

r 5

(a) κ(G) (b) λ(G) Answer. (a) Removing vertices 2 and 3 disconnects G, and there is no one vertex whose removal disconnects G. So κ(G) = 2.

3.9. CHAPTER 9

253

(b) Edges {1, 2} and {1, 3} disconnect G. So 2 = κ(G) ≤ λ(G) ≤ 2. Therefore, it must be that λ(G) = 2. 4. What is the connectivity of the pictured graph? Prove your result. 1 r 4r r r r 5 6 r 2

3

Answer. The set {2, 3, 4} disconnects G. So κ(G) ≤ 3. Since G is vertex transitive, the removal of any one vertex leaves a graph that looks like the following.

r

4r r r

5

r

6

2

3

Since this graph is clearly Hamiltonian, at least 2 more vertices must be removed to disconnect G. So κ(G) ≥ 3. Therefore κ(G) = 3. 5. Give an example, if one exists, of a simple graph G for which λ(G) < δ(G). Justify your answer. Answer. Let G be the pictured graph. r

1

2

r

r3

r

r5

4

r6

Since removing edge {3, 4} disconnects G, we see that λ(G) = 1. Since every vertex has degree at least 2 and deg(1) = 2, we see that δ(G) = 2. So λ(G) < δ(G). 6. Give an example, if one exists, of a graph G for which λ(G) < κ(G). Justify your answer. Answer. No such example exists, since we have a theorem that says κ(G) ≤ λ(G). 7. Let G be the pictured directed graph. 1 2 r r r3 @ ? r @ 6 6 r Ir5 4 6 Determine κ(G) and prove your result. Answer. κ(G) = 1 since G is strongly connected, but G \ {3} is not.

254

CHAPTER 3. TEST BANK

Section 9.2 1. List the edges along an Euler circuit that starts at vertex 1 in the pictured graph. j 1r r2 l r3 s

k

m

n q

r 4

p r 5

Answer. j, l, p, q, n, k, m, s. 2. Find a maximally efficient route for the snow plow to clear both sides of the streets of the pictured neighborhood. Assume that one pass of the plow only clears one side of these two-way streets.

Answer. Start Finish

7

1



-

20

8 6?

19

2 6?

9

18 14

13 6

66 12

610 ?

15

17

11 5

3

?? 16   4

3. Determine if the picture graph has an Euler circuit, an Euler trail, or neither. Justify your answer. s s s s s s s

3.9. CHAPTER 9

255

Answer. It has an Euler trail but not an Euler circuit, since it is connected and has exactly two vertices of odd degree. 4. Determine if the picture graph has an Euler circuit, an Euler trail, or neither. Justify your answer. r r r r HH    H r r r Hr Answer. It has neither, since there are more than two (in fact, 4) vertices of odd degree. 5. Prove or disprove: For any graphs G and H, if G × H has an Euler circuit, then G or H must have an Euler circuit. Answer. It is not true. The graph P2 has no Euler circuit. However, P2 × P2 ∼ = C4 certainly does. 6. Prove or disprove that the pictured directed graph contains an Euler trail. 1 r- 2r 3r @ ? r6r6 @ Ir5 4 6 Answer. It does not, by Euler’s Theorem. Vertex 5 has in-degree 1 and out-degree 3.

Section 9.3 1. List the vertices along a Hamiltonian cycle that starts at vertex 1 in the pictured graph. 1r @

3r

r4

@ @r 6

r 5

@ r 2

Answer. 1, 2, 5, 4, 3, 6, 1 2. Prove or disprove that the pictured graph is Hamiltonian. r

r r @ r @r

r @ r @r

r

256

CHAPTER 3. TEST BANK Answer. A Hamiltonian cycle is shaded. r

r r @ r @r

r @ r @r

r

3. A mailman needs to deliver the mail to each of the mailboxes in the pictured neighborhood. He wants to enter and exit the neighborhood from the same intersection and pass by each mailbox exactly once.

Prove that this is not possible. Answer. Consider the corresponding graph, with a vertex for each mailbox. s s s s s s

s s

When the edges incident with the degree 2 vertices are included, a cycle is formed that skips a vertex. Hence, the corresponding graph is not Hamiltonian. 4. Prove or disprove that the pictured graph is Hamiltonian. t t 4 1 H  HH   H  Ht 5 2 tH H H  HHt 3 t 6

Answer. Since vertices 4, 5, 6 all have degree 2, their incident edges would need to be part of any Hamiltonian cycle. However, that leaves vertex 3 incident with more than two edges of a Hamiltonian cycle. Thus, no Hamiltonian cycle can exist.

3.9. CHAPTER 9

257

5. As subgraphs, how many different Hamiltonian cycles are there in the pictured graph? rH r r r  H  H  r r Hr r Answer. The bold edges must be used. r r r r HH    H r r r Hr There are then exactly 2 ways to complete a Hamiltonian cycle. 6. Prove or disprove that the pictured directed graph contains a Hamiltonian cycle. r2 r3 r1 @ ? r r 6 @ 6 Ir 6

5

4

Answer. It does not. The vertex sequence 5, 6, 3, 2 must be part of any Hamiltonian cycle. Since vertex 5 now has only one remaining edge coming into it, that edge (2, 5) must also be part of the Hamiltonian cycle. We have now formed a cycle on 4 vertices. Hence, a Hamiltonian cycle cannot exist.

Section 9.4 1. Draw the dual of the pictured graph. s @ s

@  @s 

s Answer. s

s s s

s

258

CHAPTER 3. TEST BANK

2. Prove or disprove that the pictured graph is planar. t 2t B @ @  tP B @  @ t3  PB @  A P P tA B P@  Pt4 H @H A H  B  @ At HBt 1

8

7

6

5

Answer. It is not planar, since it has too many edges. It has |E| = 19 and |V | = 8. So it is not true that |E| ≤ 3|V | − 6. 3. Prove or disprove that the pictured graph is planar.

8

7

1 t 2t  B @ t  B  @ t3  B    t  B t4 @  B @t Bt 6

5

Answer. It is not planar. Vertices 1 through 7 induce a subgraph that is a subdivision of K3,3 . 4. Prove or disprove that the pictured graph is planar.

8

7

1 t 2t H @H@ Ht3 tP @H@ APPP@  P@ tA Pt4 @A   @ A t t 6

5

Answer. The pictured planar embedding shows that it is planar. r r

2 r r @ r @r3

r

r

7

8

1

4

6

5

5. Prove or disprove that the pictured graph is planar.

8

7

1 t 2t A  @  A@ t  t3    A  At4 t   @  @t t 6

5

3.9. CHAPTER 9

259

Answer. It is not planar. The subgraph obtained by removing edges {1, 6} and {1, 7} is a subdivision of K5 . 6. Determine ν(G) for the pictured graph G. 1r r2  Q AQ A r A QAr3 6 A A Ar  Ar4 5

Answer. Since vertices 1 through 5 induce a subgraph K5 , G is not planar. The pictured embedding with 1 crossing thus shows that ν(G) = 1. 1 r Z  r6 Z r Zr 2 5   BZ B ZZ   B Z  r B Zr 4

3

7. Does there exist a simple planar graph G = (V, E) with |V | = 7, δ(G) = 3, and no triangles? Justify your answer. Answer. No. The inequality 21 7(3) 1X = ≤ deg(v) = |E| ≤ 2|V | − 4 = 2(7) − 4 = 10 2 2 2 v∈V

is impossible.

Section 9.5 1. Let G be the pictured graph. r

r

r

r

r

r

r

r

Determine χ(G) and display an optimal coloring. You need not prove your result. Answer. χ(G) = 3 r

1

2

r

r2 r

1

3

2

r r

r2

r1

260

CHAPTER 3. TEST BANK

2. Let G be the pictured graph. r

r

r

r

r

Find χ(G) and prove your result. Answer. Displayed is a 4-coloring. 2r

r1

r 3

r 4

r2

Since the vertices excluding the top left one form a clique, at least 4 colors are needed. Therefore, χ(G) = 4. 3. Give an example, if one exists, of a simple graph G for which ω(G) < χ(G). Justify your answer. Answer. Let G = C5 . Since G contains no 3-cycles, ω(G) = 2. Since G is not bipartite, χ(G) ≥ 3. The displayed 3-coloring thus shows that χ(G) = 3. 1s Z Z s Zs2 3  B  B  Bs s 2 1 4. Let G = (V, E) be any graph. Show: If G is bipartite, then α(G) ≥

|V | 2 .

Answer. Suppose G is bipartite, and let (V1 , V2 ) be a bipartition. So, both V1 and V2 are independent sets. Since |V1 | + |V2 | = |V |, we must have |Vi | ≥ |V2 | , for i = 1 or 2. Thus α(G) ≥ max{|V1 |, |V2 |} ≥ |V2 | . 5. Six committees, labeled A through F , need to schedule meetings. In the displayed table, an X denotes the fact that the two different committees

3.9. CHAPTER 9

261

corresponding to that row and column have a member in common. A A B C D E F

B X

C

X

D

E

X X

X

X

X X

X

X

F X X

X X

X X

Assuming that each committee needs to meet for one hour, find a schedule that accomplishes these meetings in the minimum possible number of hours. Justify your answer. Answer. Pictured is the committee scheduling graph G together with an optimal coloring for G. Clearly, χ(G) = 3. As

Bs

sC

1s

2s

s1

s F

s E

s D

3

s

s 1

s 2

The coloring corresponds to the following schedule Time Period 1 2 3

Committee Meeting A, C, E B, D F

which is best possible, since the minimum possible number of meeting times is χ(G) = 3. 6. Apply the Greedy Coloring Algorithm to the pictured graph G using the given ordering of the vertices. r

1

5

Answer.

r r

r2

3

r

r2

1

1

3

r

r

r4 r6 r2 r4

7. Let H be a graph without loops. Let G be a graph obtained from H by adding a new vertex v and making v adjacent to each vertex of H. Show: χ(G) = 1 + χ(H).

262

CHAPTER 3. TEST BANK Answer. Let k = χ(H), and let 1, 2, . . . , k be the colors used in a k-coloring of H. Coloring v with new color k + 1 then gives a (k + 1)-coloring of G. So χ(G) ≤ 1 + χ(H). Now let j = χ(G), and let 1, 2, . . . , j be the colors used in a j-coloring of G. Since v is adjacent to each vertex in H, it must receive a color different from each color in H. We may assume that v has color j. So H uses colors 1, 2, . . . , j − 1. Thus, χ(H) ≤ j − 1 = χ(G) − 1. That is, 1 + χ(H) ≤ χ(G). Therefore, χ(G) = 1 + χ(H).

8. Prove that the pictured graph is not 3-colorable. t

t @

t @

t

t

@ @t

Answer. Try to start a 3-coloring from the top-middle vertex, and it fails. 1t t t @ @ @ @t t t 2 Also, note that is graph is a wheel. 9. Find χ(G) for the pictured graph G and prove your result. t tv2 A t At  Q  Q t t t Qt v@ 1 @ v3 @t @ t t vH 0 H  HH  t  Ht Answer. χ(G) = 4. Suppose to the contrary that we have a 3coloring. If v0 is colored 1, then v1 , v2 , v3 must also be colored 1. Now it is impossible to color the outer three vertices using colors 2 and 3. Since it is easy to give a 4-coloring, χ(G) = 4.

3.10. CHAPTER 10

3.10

263

Chapter 10

Section 10.1 1. Let G = (V, E) be a connected graph containing exactly one cycle (as a subgraph). Show that |E| = |V |. Answer. Since we can remove one edge from G to form a tree, we have |E| = 1 + (|V | − 1) = |V |. 2. Prove that propane C3 H8 is a unique isomer. Answer. Since it is a saturated hydrocarbon with n = 3 carbon atoms, each isomer is completely determined by a tree on 3 vertices. Since P3 is the only tree on 3 vertices, propane has a unique isomer. 3. Shade a spanning tree for the pictured graph. t

t

t

t @

t Answer.

t

t

t

t @

t

t

@t t

@t

4. Let T be the pictured tree, and assign vertex 5 as the root. 1t 2t

t3

4t 5t

t6

7t

t9

t8

(a) Is 5 a child of 2? (b) What vertex is the parent of 6? (c) What is the level of vertex 1? (d) What is the height of T ? (e) Is T a binary tree? Answer. (a) No.

264

CHAPTER 3. TEST BANK (b) (c) (d) (e)

Vertex 5. 2. 3. No.

5. Are full trees necessarily balanced? Justify your answer. Answer. No. The pictured rooted tree with root v1 is a full binary tree that is not balanced. vt1 v2 t v3t

v4 t vt5

v6 t

tv7

6. If T is a full 5-ary tree on 36 vertices, then how many of those vertices are internal, and how many are leaves? Answer. Since, 36 = 5i + 1, there are i = 7 internal vertices, and l = 36 − 7 = 29 leaves. 7. Let T be a full m-ary tree with n vertices, l leaves, and i internal vertices. Express m and n in terms of i and l. Answer. n = i + l and m =

i+l−1 . i

8. Construct the binary search tree for the words in the given sentence. Use the usual dictionary order to compare words. This question is terrific. t

Answer.

This

t

question

is

t

t

terrific

9. Construct the quadtree for the given image. Note that grid lines have been drawn over the image for reference and are not themselves part of the image.

3.10. CHAPTER 10

265 t

Answer. t

B

B

B

W W WB 10. Draw the image that corresponds to the given quadtree. t t

B

W

B

B B W B Answer.

Section 10.2 1. Perform Breadth First Search on the pictured tree starting from vertex 1, and list the vertices in the order in which they are addressed. 1t 2t

t3

4t 5t

t6

7t

t9

t8

Answer. 1, 2, 3, 5, 6, 8, 9, 7, 4. 2. For the given graph G, 1r 2r

r3

4r 5r r6 @ 7 r 8 r @r9 starting from vertex 1, use the Breadth First Search Algorithm to find a spanning tree for G. Shade the edges of that tree, and list the vertices in the order in which they are addressed.

266

CHAPTER 3. TEST BANK Answer.

1r 2r

r3

4r 5r r6 @ @ 7r 8r @ @r9 A = [1, 4, 5, 7, 2, 6, 8, 9, 3]. 3. Perform Depth First Search on the pictured tree starting from vertex 1, and list the vertices in the order in which they are addressed. 1t 2t

t3

4t 5t

t6

7t

t9

t8

Answer. 3, 9, 6, 4, 7, 8, 5, 2, 1. 4. For the given graph G, 1r 2r

r3

4r 5r r6 @ 7 r 8 r @r9 starting from vertex 1, use the Depth First Search Algorithm to find a spanning tree for G. Shade the edges of that tree, and list the vertices in the order in which they are addressed. Answer.

1r 2r

r3

4r 5r r6 @ 7 r 8 r @r9 A = [6, 3, 2, 7, 9, 8, 5, 4, 1]. 5. Construct the tree that represents the expression x + ((y − 1) ÷ 2).

x

+ @ @

y

− @ @

Answer.

÷ @ @ 1

6. Write the expression 2 ÷ (x + 1)) − 3

2

3.10. CHAPTER 10

267

(a) in postfix notation. (b) in prefix notation. (c) in infix notation. Answer. (a) 2 x 1 + ÷ 3 − . (b) − ÷ 2 + x 1 3 . (c) 2 ÷ x + 1 − 3 . 7. Evaluate the postfix expression 4

5

+

2 −

− 1



5

3

∗ .

Answer. 24. 8. Evaluate the prefix expression ÷

3

2 .

Answer. −7. 9. Zack’s favorite colors are stored in the following binary search tree. red @ @ blue green @ @ yellow orange Perform an inorder traversal to determine the ordering of these colors. Answer. Yellow, blue, orange, red, green. 10. We want to determine if the pictured graph G is Hamiltonian. Draw the graph H that would be searched with Depth First Search using a backtrack search from vertex a. as sc se @ @ b s @sd a

Answer. ab

ac acd

ad ace

adc adce

Section 10.3 1. For the given graph G, s 1

s

s

9 3 4

s

8

7

s

2 5

6

s

268

CHAPTER 3. TEST BANK use Kruskal’s Algorithm to find a minimum weight spanning tree. Shade that tree, and list the order in which the edges are added to the tree. Answer.

s 1

s

s

9 3 4

s

8

s

2 6

5

s

7

Order: 1, 2, 3, 5, 7. 2. For the given graph G, s 1

s

s

5 3 4

s

2

s

6 7

8

s

9

use Prim’s Algorithm to find a minimum weight spanning tree. Shade that tree, and list the order in which the edges are added to the tree. Answer.

s 1

s

s

5 3 4

s

2

s

6 7

8

s

9

Order: 1, 3, 2, 5, 7. 3. A business needing to set up a computer network among its departments has determined the costs (in dollars) of the possible network connections between pairs of departments.

Accounting Administration Marketing Personnel Sales

Account.

Admin.

Market.

Personnel

Sales

200 600 300 500

200 100 400

600 700 -

300 100 700 -

500 400 -

Find the cheapest cost of establishing a network that will enable all departments to communicate. Answer. A minimum weight spanning tree.

Pers r

100

Adm r

400

Sale r

@ 700

@ 300 200 @ r 600 @r

Mark

100 + 200 + 400 + 600 = 1300 dollars.

Acc

500

3.10. CHAPTER 10

269

4. For the given graph G, s

v

1

s

s

5 3 4

s

s

6

2

8

7

s

9

use Dijkstra’s Algorithm to find the shortest distance tree starting from the vertex v. Shade that tree. Answer.

s 3

1

s

s

5

v

4

s

s

6

2

8

7

s

9

5. A police station wishes to minimize the response time to each key location in town, based upon the typical travel times (in minutes) on the roadways between pairs of locations.

Police Station Business District Housing Development College Campus Apartment Complex

Police

Bus.

Hous.

College

Apart.

8 3 -

8 4 2 -

3 4 5 9

2 5 3

9 3 -

Find the minimum possible response time to each key location. Answer.

A shortest distance tree from Police.

Camp r

Bus r

@ @ @5 @ 3 4 @ @ @r r 9 @ Apt

Location Police Station Business District Housing Development College Campus Apartment Complex

2

Police

t

8

3

Hous

Response Time (in minutes)

7 3 8 11

6. Will a shortest distance tree for a simple weighted graph always include an edge of the smallest weight? Justify your answer. Answer. No. Weight the edges of a triangle 1, 2, 2 and use the vertex incident with the two edges of weight 2 as the starting vertex. The edge of weight 1 will not appear in the shortest distance tree.

270

CHAPTER 3. TEST BANK

Section 10.4 1. Show the main states of a Binary Search for the value 4 in the array A= 1 3 5 6 8 9 . Answer. location = 0. low = 1, high = 6, mid = 3. low = 1, high = 3, mid = 2. low = 3, high = 3. location = 0. Value not found. 2. What is the worst-case complexity of Binary Search? Answer. 1 + dlog2 ne. 3. Give an example of a value x and an array A of length 3 for which a Sequential Search for x in A will exhibit a worst-case performance. Answer. x = 3 and A = 1

2

3 .

4. Prove that 1 ∈ O(x). Answer. Observe that |1| ≤ 1 · |1|, ∀ x > 1. 5. True or False. x4 − x2 ∈ O(8x3 + 9x + 10). Answer. False. 6. Prove that O(n + 1) = O(n). Answer. (⊆) |n + 1| ≤ 2|n|, ∀ n > 1. (⊇) |n| ≤ |n + 1|, ∀ n > 0. 7. Place the following functions in increasing order of complexity. 2n , log2 n, Answer. log2 n, n log2 n, n3 , 2n .

n3 ,

n log2 n

3.10. CHAPTER 10

271

Section 10.5 1. Make a decision tree for Sequential Search for arrays of length 3.

Answer. i=1

a1 a2 a3 a1 = x ? H F T   HH  Return

i=2

a1 a2 a3 a2 = x ? H F T  HH 

1

Return

i=3

a1 a2 a3 a3 = x ? HHF T  H 

2

Return

Return

3

0

2. Show the main states of Insertion Sort for A = 2

7

5

1

3 .

Answer. i=2: 2 7 5 1 3 i=3: 2 7 5 1 3 i=4: 2 5 7 1 3 i=5: 1 2 5 3 7 end : 1 2 3 5 7

3. Given A = 6 3 9 1 7 4 , make a tree diagram of Merge Sort that shows first how the array is split into pieces and then how the pieces are merged back together in order.

Answer.

272

CHAPTER 3. TEST BANK 6

3

 6

3

9 

7 HH

4 H

9

1

@@ 3 9

6

1

7

4 @@

1

7

4

3

@ @ 9

7

@ @ 4

3

9

7

4

@ @ 3 9

6 @ @ 3 6

@ @ 4 7

1 @ @ 1 4

9 H 1

HH 3

4

7

  6 7 9

4. What is the worst-case complexity of Insertion Sort? Answer. 5. Given A = 3

n(n−1) . 2

5

1

Answer.

4 , show the main states of Bubble Sort.

i = 5, j j j j i = 4, j j j i = 3, j j i = 2, j

Answer.

6. Given A = 3

7

5

1

7

=1: 3 5 1 7 4 =2: 3 5 1 7 4 =3: 3 1 5 7 4 =4: 3 1 5 7 4 =1: 3 1 5 4 7 =2: 1 3 5 4 7 =3: 1 3 5 4 7 =1: 1 3 4 5 7 =2: 1 3 4 5 7 =1: 1 3 4 5 7 end : 1 3 4 5 7

4 , show the main states of Selection Sort.

3.10. CHAPTER 10

273 i=1: 3 5 1 7 4 i=2: 1 5 3 7 4 i=3: 1 3 5 7 4 i=4: 1 3 4 7 5 end : 1 3 4 5 7

7. Give the name of a maximally efficient sorting algorithm in the sense of big-Θ. Answer. Merge Sort. 8. Given A = 3 Answer.

1

8

1

5

6 , show the main states of Quick Sort.

3

8

1

5

1

3

? 8 5

6 6 , mid = 2 @ R @ 8 5

? 3

6 6 5 5

5

6

? 5 8 , mid = 3 ? 8

? 6 , mid = 2 ? 6

A left-to-right reading of the leaves shows the correct order for A. 9. What is the average-case complexity of Quick Sort in the sense of big-Θ? Answer. Θ(n log2 n).

274

CHAPTER 3. TEST BANK

Chapter 4

Answers to All Exercises 4.0

Chapter 0

1. 10. (1)23 + (0)22 + (1)21 + (0)20 = 10. 2. 9. 3. 23. (1)24 + (0)23 + (1)22 + (1)21 + (1)20 = 23. 4. 26. 5. 46. (1)25 + (0)24 + (1)23 + (1)22 + (1)21 + (0)20 = 46. 6. 50. 7. 75. (1)26 + (0)25 + (0)24 + (1)23 + (0)22 + (1)21 + (1)20 = 75. 8. 91. 9. 171. (1)27 + (0)26 + (1)25 + (0)24 + (1)23 + (0)22 + (1)21 + (1)20 = 171. 10. 240.

275

276

CHAPTER 4. ANSWERS TO ALL EXERCISES

11. 111011. 59/2 29/2 14/2 7/2 3/2 1/2

18. 111110100.

= = = = = =

29 14 7 3 1 0

remainder remainder remainder remainder remainder remainder

1 1 0 1 1 1

19. 10000000000. Note that 210 = 1024. 20. 1000000000000. 21. Using T for Tails and H for Heads, we see the 16 possibilities.

12. 1001001. 13. 1010100. 84/2 42/2 21/2 10/2 5/2 2/2 1/2

= = = = = = =

42 21 10 5 2 1 0

remainder remainder remainder remainder remainder remainder remainder

0 0 1 0 1 0 1

58 29 14 7 3 1 0

remainder remainder remainder remainder remainder remainder remainder

1 0 1 0 1 1 1

152 76 38 19 9 4 2 1 0

remainder remainder remainder remainder remainder remainder remainder remainder remainder

0 0 0 0 1 1 0 0 1

14. 1011111. 15. 1110101. 117/2 58/2 29/2 14/2 7/2 3/2 1/2

= = = = = = =

16. 11100110. 17. 100110000. 304/2 152/2 76/2 38/2 19/2 9/2 4/2 2/2 1/2

= = = = = = = = =

T T T T T T T T H H H H H H H H

T T T T T H T H H T H T H H H H T T T T T H T H H T H T H H H H

T H T H T H T H T H T H T H T H

22. There are 16 possibilities. F F F F F F F F T T T T T T T T

F F F F T T T T F F F F T T T T

F F T T F F T T F F T T F F T T

F T F T F T F T F T F T F T F T

4.0. CHAPTER 0

277

23. 115. (1)82 + (6)81 + (3)80 = 115.

29. 3529. (13)162 + (12)161 + (9)160 = 3529.

24. 188.

30. 683.

25. 1679. (3)83 + (2)82 + (1)81 + (7)80 = 1679.

31. 23166. (5)163 + (10)162 + (7)161 + (14)160 = 23166.

26. 1140. 32. 46653. 27. 16712. (4)84 + (0)83 + (5)82 + (1)81 + (0)80 = 33. 50. 16712. (3)161 + (2)160 = 50. 28. 20538.

34. 3862.

35. 73. 59/8 7/8

= =

7 0

remainder remainder

3 7

117/8 14/8 1/8

= = =

14 1 0

remainder remainder remainder

5 6 1

140/8 17/8 2/8

= = =

17 2 0

remainder remainder remainder

4 1 2

59/16 3/16

= =

3 0

36. 124. 37. 165.

38. 346. 39. 214.

40. 5. 41. 3b. remainder remainder

11 3

42. 54. 43. 75. 117/16 7/16

= =

7 0

remainder remainder

5 7

278

CHAPTER 4. ANSWERS TO ALL EXERCISES

44. e6. 45. acdc. 44252/16 2765/16 172/16 10/16

= = = =

2765 172 10 0

remainder remainder remainder remainder

46. abba. 47. (a) 1463. 001 |{z} 100 |{z} 110 |{z} 011 |{z} 1

4

6

3

(b) 333. 0011 | {z} 0011 | {z} |{z } 0011 3

3

3

48. (a) 3431. (b) 719. 49. (a) 54613. 101 |{z} 100 |{z} 110 |{z} 001 |{z} 011 |{z} 5

4

6

1

3

(b) 598b. 0101 |{z } 1001 | {z } 1000 | {z} 1011 |{z } 5

9

8

b

50. (a) 330147. (b) 1b067. 51. 100111. 100 |{z} 111 |{z} 4

7

52. 1110010. 53. 101011001100. 1010 |{z } 1100 | {z} 1100 | {z} a

54. 111111011010. 55. 2m . (1)2m + (0)2m−1 + · · · + (0)20 = 2m . 56. 2m − 1.

c

c

12 13 12 10

4.0. CHAPTER 0

279

57. A one followed by 2n zeros. (1)22n + (0)22n−1 + · · · + (0)20 = 22n = 4n . 58. Adjoin three zeros onto the right end of the number. 59. It is divisible by four if and only if it ends in 00. In the algorithm for converting numbers to binary, the first two divisions by 2 must result in remainder 0. 60. The binary number is divisible by 3 if and only if the alternating sum of its digits is divisible by 3. 61. 8m − 1. m −1 = 8m −1. (7)8m−1 +(7)8m−2 +· · ·+(7)80 = (7)[8m−1 +8m−2 +· · ·+80 ] = (7) 88−1 Alternatively, if 1 is added to this number, then the result in octal is a 1 followed by m zeros. That value is 8m . 62.

8m −1 7 .

63. The number is divisible by 7 if and only if the sum of its digits is divisible by 7. This is the analog of the divisibility by 9 test for base ten. 64. The base 8 number is divisible by 9 if and only if the alternating sum of its digits is divisible by 9. 65. First rewrite the number in binary, and then group the digits into blocks of size 4 to convert to hexadecimal. 66. No. For example, binary 10101 is hexadecimal 15.

280

4.1

CHAPTER 4. ANSWERS TO ALL EXERCISES

Chapter 1

Section 1.1 1. A true statement. 5. Not a statement. See the appendix in the textbook, that It is not a declarative sentence. characterizes the integers. 6. A true statement. 2. A false statement. 7.

3. Not a statement. It is a question. 4. A true statement.

8.

9.

10.

p F F F F T T T T p F F F F T T T T p F F F F T T T T

q F F T T F F T T q F F T T F F T T q F F T T F F T T

r F T F T F T F T r F T F T F T F T r F T F T F T F T

¬p T T T T F F F F ¬p T T T T F F F F ¬q T T F F T T F F

q ∨ ¬r T F T T T F T T q∧r F F F T F F F T p ∨ ¬q T T F F T T T T

p F F T T

q F T F T

¬q T F T F

¬p ∧ (q ∨ ¬r) T F T T F F F F ¬p → (q ∧ r) F F F T T T T T (p ∨ ¬q) → r F T T T F T F T

p ∨ ¬q T F T T

4.1. CHAPTER 1

281

11.

12.

p F F F F T T T T

p→q T T T T F F T T

p F F F F T T T T

q F F T T F F T T

r F T F T F T F T

q F F T T F F T T

r F T F T F T F T

¬q T T F F T T F F

(p → q) ∨ r T T T T F T T T

¬q → r F T T T F T T T

p ∨ (¬q → r) F T T T T T T T

13. They differ in the two rows in which q is true. Use C2 = OR(A2,NOT(B2)) and D2 = OR(NOT(A2),NOT(B2)) to generate the following table.

1 2 3 4 5

A p FALSE FALSE TRUE TRUE

B q FALSE TRUE FALSE TRUE

C p ∨ ¬q TRUE FALSE TRUE TRUE

D p → ¬q TRUE TRUE TRUE FALSE

14. They differ in the two rows in which q is false.

1 2 3 4 5

A p FALSE FALSE TRUE TRUE

B q FALSE TRUE FALSE TRUE

C p ∨ ¬q FALSE TRUE FALSE FALSE

D p → ¬q TRUE TRUE TRUE FALSE

15. They differ in the two rows in which p is true and q is false. Use D2 = OR(NOT(A2),OR(B2,C2)) and

282

CHAPTER 4. ANSWERS TO ALL EXERCISES

E2 = OR(NOT(A2),OR(B2,NOT(C2))) to generate the following table.

1 2 3 4 5 6 7 8 9

A p FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE

B q FALSE FALSE TRUE TRUE FALSE FALSE TRUE TRUE

C r FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE

D p → (q ∨ r) TRUE TRUE TRUE TRUE FALSE TRUE TRUE TRUE

E p → (q ∨ ¬r) TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE

16. They differ in the two rows in which p and q are both false.

1 2 3 4 5 6 7 8 9

A p FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE

17.

B q FALSE FALSE TRUE TRUE FALSE FALSE TRUE TRUE

C r FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE

p F F T T

p∨q F T T T

q F T F T

D p → (q ∨ r) FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE

E p → (q ∨ ¬r) TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE

p→p∨q T T T T

Observe that p → p ∨ q is always true. p F F T T

18.

19. (a)

p F T

¬p T F

q F T F T

¬¬p F T

q ∨ ¬p T T F T

p ∧ (q ∨ ¬p) ∧ ¬q F F F F (b)

t T

¬t F

f F

¬f T

The first two columns show that ¬t is The first and last columns are the a contradiction. The last two columns same. show that ¬f is a tautology.

4.1. CHAPTER 1

283

20. (a)

p∧t F T

t T T

p F T

The first and third columns are (b) p F T

p∨t T T

the same, and the last column is all true. f p∧f p∨f F F F F F T

The third column is all false, and the first and last columns are the same. 21.

p F T

t T T

t→p F T

p→t T T

Columns 1 and 3 are the same, and columns 2 and 4 are the same. 22.

p F T

p→f T F

f F F

¬p T F

f →p T T

t T T

Columns 3 and 4 are the same, and columns 5 and 6 are the same. 23.

p F F T T

q F T F T

¬p T T F F

¬q T F T F

¬p ∧ ¬q T F F F

p∨q F T T T

¬(¬p ∧ ¬q) F T T T

¬p ∨ ¬q T T T F

p∧q F F F T

¬(¬p ∨ ¬q) F F F T

The last 2 columns are the same. 24.

p F F T T

q F T F T

¬p T T F F

¬q T F T F

The last 2 columns are the same. 25.

p F F T T

q F T F T

p∨q F T T T

The last 2 columns are the same.

p→p∨q T T T T

t T T T T

284

CHAPTER 4. ANSWERS TO ALL EXERCISES

26.

p F F T T

p∧q F F F T

q F T F T

p∧q →p T T T T

t T T T T

The last 2 columns are the same. 27.

p F F F F T T T T

q F F T T F F T T

r F T F T F T F T

(p ∧ q) ∧ r F F F F F F F T

p ∧ (q ∧ r) F F F F F F F T

(p ∨ q) ∨ r F T T T T T T T

p ∨ (q ∨ r) F T T T T T T T

Columns 4 and 5 are the same, and columns 6 and 7 are the same. 28.

p F F T T

p∧q F F F T

q F T F T

q∧p F F F T

p∨q F T T T

q∨p F T T T

Columns 3 and 4 are the same, and columns 5 and 6 are the same. 29.

p F F F F T T T T

q F F T T F F T T

r F T F T F T F T

p⊕q F F T T T T F F

q⊕r F T T F F T T F

(p ⊕ q) ⊕ r F T T F T F F T

The last two columns are the same. 30.

p F F T T

q F T F T

The last 2 columns are the same.

p⊕q F T T F

q⊕p F T T F

p ⊕ (q ⊕ r) F T T F T F F T

4.1. CHAPTER 1

31. p F F F F T T T T

q F F T T F F T T

r F T F T F T F T

285

p ∧ (q∨r) F F F F F T T T

(p∧q) ∨ (p∧r) F F F F F T T T

p ∨ (q∧r) F F F T T T T T

(p ∨ q)∧(p ∨ r) F F F T T T T T

Columns 4 and 5 are the same, and columns 6 and 7 are the same. 32.

p F F F F T T T T

q F F T T F F T T

p ∧ (q⊕r) F F F F F T T F

r F T F T F T F T

(p∧q) ⊕ (p∧r) F F F F F T T F

The last 2 columns are the same. 33.

p F F T T

q F T F T

¬(p ∧ q) T T T F

¬p ∨ ¬q T T T F

¬(p ∨ q) T F F F

¬p ∧ ¬q T F F F

Columns 3 and 4 are the same, and columns 5 and 6 are the same. 34. p F F T T

q F T F T

p∧q ↔ p T T F T

p∨q ↔ q T T F T

(p → q) → (p∧q ↔ p) T T T T

The last two columns are all true. 35.

p F F T T

q F T F T

p⊕q F T T F

The last 2 columns are the same.

¬(p ⊕ q) T F F T

p↔q T F F T

(p → q) → (p∨q ↔ q) T T T T

286

CHAPTER 4. ANSWERS TO ALL EXERCISES

36.

p F F T T

¬p T T F F

q F T F T

¬q T F T F

¬p → ¬q T F T T

q→p T F T T

The last two columns are the same. 37. They differ when p is false, q is true, and r is false. p F

q T

(p → q) → r F

r F

p → (q → r) T

This case, for example, shows that the truth tables are different. Hence, (p → q) → r and p → (q → r) are not logically equivalent. 38. They are logically equivalent p F F F F T T T T

q F F T T F F T T

(p ↔ q) ↔ r F T T F T F F T

r F T F T F T F T

p ↔ (q ↔ r) F T T F T F F T

The last 2 columns are the same. 39. They differ when p is true, q is false, and r is true. p T

q F

p ⊕ (q ∧ r) T

r T

(p ⊕ q) ∧ (p ⊕ r) F

This case, for example, shows that the truth tables are different. Hence, p⊕(q∧r) and (p ⊕ q) ∧ (p ⊕ r) are not logically equivalent. 40.

p T

q T

¬(p ⊕ q) T

¬p ∧ ¬q F

This case, for example, shows that the truth tables are different. 41.

p F F T T

q F T F T

p⊕q F T T F

¬p ⊕ ¬q F T T F

4.1. CHAPTER 1

287

The last 2 columns are the same. Hence, p ⊕ q and ¬p ⊕ ¬q are logically equivalent. 42.

p F

q F

¬(p ⊕ q) F

¬p ⊕ q T

This case, for example, shows that the truth tables are different. 43. (a) ¬q → p. (b) ¬¬q → ¬p ≡ q → ¬p. (c) ¬p → ¬¬q ≡ ¬p → q. (d) p ∧ ¬¬q ≡ p ∧ q. 44. (a) ¬q → ¬p. (b) q → p. (c) p → q. (d) ¬p ∧ q. 45. (a) r → p ∧ ¬q. (b) ¬r → ¬(p ∧ ¬q) ≡ ¬r → ¬p ∨ ¬¬q ≡ ¬r → ¬p ∨ q. (c) ¬(p ∧ ¬q) → ¬r ≡ ¬p ∨ q → ¬r. (d) (p ∧ ¬q) ∧ ¬r ≡ p ∧ ¬q ∧ ¬r. 46. (a) q ∨ ¬r → p. (b) ¬q ∧ r → ¬p. (c) ¬p → ¬q ∧ r. (d) p ∧ ¬q ∧ r. 47. (a) If Ted has a failing grade, then Ted’s average is less than 60. (b) If Ted has a passing grade, then Ted’s average is at least 60. (c) If Ted’s average is at least 60, then Ted has a passing grade. (d) Ted’s average is less than 60, and Ted has a passing grade. 48. (a) If Ilia is buying the car, then Ilia can afford the car. (b) If Ilia is not buying the car, then Ilia cannot afford the car. (c) If Ilia cannot afford the car, then Ilia is not buying the car. (d) Ilia can afford the car, but Ilia is not buying the car. 49. (a) If George is going to a movie or going dancing, then George feels well. (b) If George is not going to a movie and not going dancing, then George does not feel well. (c) If George does not feel well, then George is not going to a movie and not going dancing. (d) George feels well, and George is not going to a movie and not going dancing. 50. (a) If Anna is not graduating, then Anna is failing History. (b) If Anna is graduating, then Anna is passing History or Psychology. (c) If Anna is passing History or Psychology, then Anna is not graduating. (d) Anna is failing History and Psychology, but Anna is graduating. 51. ¬(p ∨ ¬q) ≡ ¬p ∧ ¬¬q ≡ ¬p ∧ q.

288

CHAPTER 4. ANSWERS TO ALL EXERCISES

52. p ∨ q. 53. ¬(¬p ∧ (q ∨ ¬r)) ≡ p ∨ ¬(q ∨ ¬r) ≡ p ∨ (¬q ∧ r). 54. ¬p ∧ (q ∨ ¬r). 55. Helen’s average is less than 90, or Helen is not getting an A. 56. Raphael is smiling, or Raphael is not bluffing. 57. (a) p F F F F T T T T

q F F T T F F T T

r F T F T F T F T

p∧q F F F F F F T T

¬p T T T T F F F F

q→r T T F T T T F T

(p ∧ q) → r T T T T T T F T

The last two columns are the same. (b) p ∧ q → r ≡ ¬(p ∧ q) ∨ r ≡ (¬p ∨ ¬q) ∨ r ≡ ¬p ∨ (¬q ∨ r) ≡ ¬p ∨ (q → r) 58. (a)

p F F F F T T T T

q F F T T F F T T

r F T F T F T F T

(p → q) → (p ∧ r) F F F F T T F T

Columns 4 and 5 are the same. (p → q) → (p ∧ r) ≡ (b) ≡ ≡ ≡ 59.

p ∧ (q ∨ r ∨ s)

≡ ≡ ≡ ≡

¬p ∨ (q → r) T T T T T T F T

Example 1.10 De Morgan’s Law Associativity Example 1.10 p ∧ (q → r) F F F F T T F T

¬(p → q) ∨ (p ∧ r) (p ∧ ¬q) ∨ (p ∧ r) p ∧ (¬q ∨ r) p ∧ (q → r)

p ∧ (q ∨ (r ∨ s)) (p ∧ q) ∨ (p ∧ (r ∨ s)) (p ∧ q) ∨ ((p ∧ r) ∨ (p ∧ s)) (p ∧ q) ∨ (p ∧ r) ∨ (p ∧ s)

Example 1.10 Example 1.6 Distributivity Example 1.10 Associativity Distributivity Distributivity Associativity

4.1. CHAPTER 1

60.

289

¬(p ∨ q ∨ r)

61.

≡ ≡ ≡ ≡

¬(p ∨ (q ∨ r)) ¬p ∧ ¬(q ∨ r)) ¬p ∧ (¬q ∧ ¬r) ¬p ∧ ¬q ∧ ¬r

(p∧q∧¬r) ∨ (p∧¬q∧r) ≡ (p∧(q∧¬r)) ∨ (p∧(¬q∧r)) ≡ p ∧ ((q ∧ ¬r) ∨ (¬q ∧ r)) ≡ p ∧ (q ⊕ r)

62. (p∧q∧¬r) ∨ (p∧¬q∧¬r)

63.

64.

Associativity De Morgan’s Law De Morgan’s Law Associativity

p ∧ (¬(q ∧ r))

¬(p ∨ (q ∧ r))

≡ ≡ ≡ ≡ ≡ ≡

≡ ≡ ≡ ≡ ≡

Associativity Distributivity Definition of ⊕

((p ∧ q) ∧ ¬r) ∨ ((p ∧ ¬q) ∧ ¬r) ((p ∧ q) ∨ (p ∧ ¬q)) ∧ ¬r (p ∧ (q ∨ ¬q)) ∧ ¬r (p ∧ t) ∧ ¬r p ∧ ¬r

p ∧ (¬q ∨ ¬r) (p ∧ ¬q) ∨ (p ∧ ¬r)

Associativity Distributivity Distributivity Tautology Rule Tautology Rule

De Morgan’s Law Distributivity

¬p ∧ ¬(q ∧ r) ¬p ∧ (¬q ∨ ¬r) (¬p ∧ ¬q) ∨ (¬p ∧ ¬r) ¬(p ∨ q) ∨ ¬(p ∨ r)

De Morgan’s Law De Morgan’s Law Distributivity De Morgan’s Law

65. Since p ∧ q ∧ r → p ∧ q is a tautology, the result follows from the Absorption Rule. That is, think of the Absorption Rule as: If u → w, then u ∨ w ≡ w. Apply this with u = p ∧ q ∧ r and w = p ∧ q. 66. Since p ∨ q → p ∨ q ∨ r is a tautology, the result follows from the Absorption Rule. 67. (i) Given ¬ and ∧, we have that p ∨ q ≡ ¬(¬p ∧ ¬q) and p → q ≡ ¬(p ∧ ¬q). (ii) Given ¬ and ∨, we have that p ∧ q ≡ ¬(¬p ∨ ¬q) and p → q ≡ ¬p ∨ q. (iii) Given ¬ and →, we have that p ∧ q ≡ ¬(p → ¬q) and p ∨ q ≡ ¬p → q. 68. Yes, p ∨ q ≡ (p ∧ q) ⊕ (p ∧ ¬q) ⊕ (¬p ∧ q). 69. (a) (P ∧ Q) ∨ ¬Q = S, as traced below. P Q

P ∧Q

s

AND

(P ∧ Q) ∨ ¬Q OR

NOT

c ¬Q

S

290

CHAPTER 4. ANSWERS TO ALL EXERCISES

(b)

P 0 0 1 1

Q 0 1 0 1

S 1 0 1 1

(c) Yes, S = P ∨ ¬Q and can be done with two gates. 70. (a) P

NOT

c ¬P

¬P ∧ Q

S

AND

Q shows ¬P ∧ Q = S. (b) P 0 0 1 1

Q 0 1 0 1

S 0 1 0 0

(c) No. A single basic gate is not enough. 71. (a) P ∨ (¬Q ∧ R) = S, as traced below. P Q

P ∨ (¬Q ∧ R) NOT

OR

c ¬Q

S

¬Q ∧ R AND

R (b)

P 0 0 0 0 1 1 1 1

Q 0 0 1 1 0 0 1 1

R 0 1 0 1 0 1 0 1

S 0 1 0 0 1 1 1 1

(c) No. Note that there are not many ways to get a single output from three inputs and two gates, and none of them satisfy this table. 72. (a)P

P ∨Q OR

(P ∨ Q) ∧ ¬Q AND

Q R

s

NOT

c ¬Q

((P ∨ Q) ∧ ¬Q) ∨ R OR

S

4.1. CHAPTER 1

291

shows ((P ∨ Q) ∧ ¬Q) ∨ R = S. (b) P 0 0 0 0 1 1 1 1

Q 0 0 1 1 0 0 1 1

R 0 1 0 1 0 1 0 1

S 0 1 0 1 1 1 0 1

(c) Yes, S = (P ∧ ¬Q) ∨ R and can be done with three gates. 73.

74.

P Q R

AND

NOT

c

P Q R

OR

NOT

NOT

S

c OR

Q

S

AND

R

Q

c

AND

75. P

76. P

S

OR

NOT

c

s s

AND AND OR

R NOT

c

NOT

c

S

AND

77. (a) (P ∨ Q) ∧ ¬(P ∧ Q) = S, a 4 gate circuit. (b) (P ∧ ¬Q) ∨ (¬P ∧ Q) = S, a 5 gate circuit. So, the definition uses fewer gates than the alternative characterization. 78. (a) ¬P ∨ Q = S, a 2 gate circuit. (b) (¬P ∨ Q) ∧ (P ∨ ¬Q) = S, a 5 gate circuit.

292

CHAPTER 4. ANSWERS TO ALL EXERCISES

Section 1.2 1. True. Order does not matter.

7. True. Both are {−1, 1}.

2. False. 3. True. Repetition does not matter. 4. True. 5. False. {−1, 0, 1} = 6 {. . . , −2, −1, 0, 1}.

8. False. {−2, 3} = 6 {−3, 2}. 9. {2, 4, 6}. 10. {0, −1, −4, −9}. 11. {{1}, {4}}.

6. True. Both are {0, 1, 2, 3}.

12. {1, 2, {3}}.

13. {x : x ∈ R and x3 − 4x2 + 5x − 6 = 0}, which happens to equal {3}. Note that x3 − 4x2 + 5x − 6 = (x − 3)(x2 − x + 2). 14. {x : x ∈ Z and x ≥ 100}. 15. {n : n ∈ Z and n < −10} or {n : n ∈ Z and n ≤ −11} = {. . . , −13, −12, −11}. 16. {x : x ∈ R and x4 − x2 − 1 < 0}.

24. (−∞, π).

17. (0, ∞) = {x : x ∈ R and x > 0}.

25. True. √ Note that 2 ≈ 1.414.

18. (−∞, 0). 26. False. 19. [0, 0] = {x : x ∈ R and 0 ≤ x ≤ 27. False. 0}. {1} is a set. 20. [1, 1]. 28. False. 21. (1, ∞) = {x : x > 1}. 29. True. 2 ∈ {1, 2, 3}. 22. [3, 7). 23. (−1, 1) = {x : −1 < x < 1}.

30. False.

4.1. CHAPTER 1

293

31. True. ∅ is listed as an element on the right-hand side. 32. True. 33. ⊂, ⊆. Note that ∈ does not work, since {1} is not listed in {1, 2}, although 1 is. Note that = does not work, since 2 is not in {1}. 34. ∈. 35. ⊆, =. Note that ∈ does not work, since the elements on the right-hand side are 6, 7, and 8. Note that ⊂ does not work, since = holds. 36. ⊂, ⊆. 37. ∈, ⊂, ⊆. Note that = does not work, since ⊂ holds. 38. None. 39. Finite. |A| = 5. 40. Finite. |B| = 2. 41. Infinite. E.g., 5.9, 5.99, 5.999, ... 42. Infinite. 43. Finite. |E| = 9. Namely, E = {0, 1, 2, 3, 4, 5, 6, 7, 8}. 44. Infinite. 45. Finite. |G| = 2. Note that ∅ and {∅} are the two elements. 46. Finite. |H| = 1. 47. If yes, then he should not. If no, then he should. Hence, either way, there is a contradiction. That is, if he shaves himself, then he is shaving someone who shaves himself, and

294

CHAPTER 4. ANSWERS TO ALL EXERCISES

he is not supposed to do that. If he does not shave himself, then he is someone who does not shave himself, and he is supposed to shave such a person. 48. If yes, then it shouldn’t. If no, then it should. Hence, either way, there is a contradiction. 49. False. Use {1,2,{2,1}} == {1,2,{1,2}}. 50. True 51. 2. Use Length[{{},{}}]. 52. A == {} 53. true. Use evalb({1,2,{2,1}} = {1,2,{1,2}}). 54. true 55. 1. Use nops({{},{}}). 56. evalb(A = {})

Section 1.3 1. ∀ x ∈ R, x2 + 1 > 0. See Appendix A, number 11. 2. ∃ n ∈ Z such that 2n = 1024. 3. ∃ n ∈ Z such that E.g., n = 1 works.

1 n

∈ Z.

4. ∀ n ∈ Z, 2n ∈ R. 5. ∃ n ∈ N such that ∀ x ∈ R, xn ≥ 0. E.g., n = 2 works. 6. ∀ x ∈ R, ∃ y ∈ R such that x + y = 0. 7. ∃ x ∈ R such that ∀ y ∈ R, if 2 ≤ y ≤ 3, then 1 ≤ xy < 2. Also, ∃ x ∈ R such that ∀ y ∈ [2, 3], 1 ≤ xy < 2. E.g., x = 21 works.

4.1. CHAPTER 1

295

8. ∀ n ∈ Z− , ∃ m ∈ Z such that mn > 0. 9. ∃ x, y ∈ R such that x + y ∈ Z and xy 6∈ Z. −1 works. E.g., x = √12 and y = √ 2 10. ∀ m, n ∈ N, mn ∈ N. 11. ∀ x, y ∈ R, if x < y, then ex < ey . See Definition 1.15, and use f (x) = ex . 12. ∀ x, y ∈ R, if x < y, then 2−x > 2−y . 13. ∃ x ∈ [−2, 2] such that x3 6∈ [0, 8]. Negation is true. E.g., x = −2 works. 14. ∀ n ∈ Z− , 5n + 2 ≤ 1. Negation is True. 15. ∃ x ∈ R+ such that x2 > 4 and x ≤ 2. Original is true. E.g., x = −3. Note that the contrapositive of the original is ∀ x ∈ R+ , if x ≤ 2, then x2 ≤ 4. 16. ∃ x ∈ (−∞, −4) such that

√ 3

x > 0 and x 6= −5. Original is True.

17. ∀ n ∈ Z, ∃ m ∈ Z such that nm ≥ 1. Original is true. E.g., n = 0 works. 18. ∃ x ∈ R such that ∀ y ∈ R, xy 6∈ Z. Original is True. 19. ∃ m, n ∈ Z such that m + n 6∈ Z. Original is true. See Appendix A, number 1, with S = Z. 20. ∀ m, n ∈ Z, 9m − 7n 6= 1. Original is True. 21. ∀ n ∈ Z, n1 6∈ Z. No integer’s reciprocal is an integer. 22. ∃ n ∈ Z such that 2n 6∈ R. 23. ∃ x ∈ R such that x2 + 1 ≤ 0. There is a real number x such that x2 + 1 ≤ 0. 24. ∀ n ∈ Z, 2n 6= 1024. 25. ∀ n ∈ N, ∃ x ∈ R such that xn < 0. For every natural number n, there is a real number x such that xn < 0.

296

CHAPTER 4. ANSWERS TO ALL EXERCISES

26. ∃ x ∈ R such that ∀ y ∈ R, x + y 6= 0. 27. ∀ x ∈ R, ∃ y ∈ R such that 2 ≤ y ≤ 3 and xy 6∈ [1, 2). For every real number x, there is a real number y such that 2 ≤ y ≤ 3 and xy 6∈ [1, 2). 28. ∃ n ∈ Z− such that ∀ m ∈ Z, mn ≤ 0. 29. ∀ x, y ∈ R, x + y 6∈ Z or xy ∈ Z. For all real numbers x and y, either x + y 6∈ Z or xy ∈ Z. 30. ∃ m, n ∈ N such that mn 6∈ N. 31. There is a student at Harvard University whose age is at most 17. That is, there is a student at Harvard University whose age is not over 17. 32. No planet in our solar system contains intelligent life. 33. There exists a truly great accomplishment that is immediately possible. 34. There is a student without Calculus. 35. There is such a thing as bad publicity. 36. There is something for which there is no season. 37. (a) A real function f is not constant iff ∀ c ∈ R, ∃ x ∈ R such that f (x) 6= c. The definition is ∃ c ∈ R such that ∀ x ∈ R, f (x) = c. (b) ∃ x, y ∈ R such that f (x) 6= f (y). 38. ∃ x ∈ R such that f (x) = 0. 39. ∃ x, y ∈ R such that x < y and f (x) ≥ f (y). Recall that ¬(p → q) ≡ p ∧ ¬q. 40. ∃ x, y ∈ R such that x < y and f (x) ≤ f (y). 41. ∃ x, y ∈ R such that x ≤ y and f (x) > f (y). Note that, in this case, we could replace x ≤ y with x < y. 42. ∃ x, y ∈ R such that x ≤ y and f (x) < f (y). 43. ∀ M ∈ R, ∃ x ∈ R such that f (x) > M . That is, f is unbounded above.

4.1. CHAPTER 1

297

44. ∀ L ∈ R, ∃ x ∈ R such that f (x) < L. 45. True. An if-then statement is true whenever its hypothesis is false. By Appendix A, number 11, x2 < 0 never happens. 46. True, since x2 ≥ 0 is always true. 47. Say U = {a, b}. The statement is equivalent to “p(a) ∧ p(b).” That is, a and b are all of the x’s. 48. Say U = {x, y}. The statement is equivalent to ”p(x) ∨ p(y).” 49. Say U = {a, b}. The logical equivalences are equivalent to ¬[p(a) ∧ p(b)] ≡

¬p(a) ∨ ¬p(b)

¬[p(a) ∨ p(b)] ≡

¬p(a) ∧ ¬p(b),

since, in this case, ∀ x ∈ U, p(x) ≡ p(a) ∧ p(b) ∃ x ∈ U such that p(x) ≡ p(a) ∨ p(b). 50. If the second statement is true, then the first must also be true.

Section 1.4 1. Ac = {4}, B c = {1, 2}, A ∩ B = {3}, A ∪ B = {1, 2, 3, 4}, A \ B = {1, 2}, B \ A = {4}, and A M B = {1, 2, 4}. '$ '$ A 1 B 3 4 2 &% &% 2. Ac = {e}, B c = {a, c, e}, A ∩ B = {b, d}, A ∪ B = {a, b, c, d}, A \ B = {a, c}, B \ A = ∅, and A M B = {a, c}. 3. Ac = (−∞, −1] ∪ [1, ∞), B c = (−∞, 0) ∪ (1, ∞), A ∩ B = [0, 1), A ∪ B = (−1, 1], A \ B = (−1, 0), B \ A = {1}, and A M B = (−1, 0) ∪ {1}. A B

d −1

d 1 t 0

t 1

298

CHAPTER 4. ANSWERS TO ALL EXERCISES

4. Ac = (−∞, −1]∪(2, ∞), B c = (−∞, −2)∪(1, ∞), A∩B = ∅, A∪B = [−2, 2], A \ B = A, B \ A = B, and A M B = [−2, 2]. 5. Ac = Z− , B c = Z− ∪ {0}, A ∩ B = Z+ , A ∪ B = N, A \ B = {0}, B \ A = ∅, and A M B = {0}. A = N = Z+ ∪ {0} = B ∪ {0}. 6. Ac = Z \ {0}, B c = N, A ∩ B = ∅, A ∪ B = {n : n ∈ Z and n ≤ 0}, A \ B = {0}, B \ A = Z− , and A M B = {n : n ∈ Z and n ≤ 0}. 7. Ac = [3, ∞), B c = (0, 2), A ∩ B = [2, 3), A ∪ B = (0, ∞), A \ B = (0, 2), B \ A = [3, ∞), and A M B = (0, 2) ∪ [3, ∞). U

d 0

A

d 0

B

d 3 t 2

-

8. Ac = (−∞, −3]∪(−1, 0), B c = (−∞, −4)∪[−2, 0), A∩B = (−3, −2), A∪B = [−4, −1], A \ B = [−2, −1], B \ A = [−4, −3], and A M B = [−4, −3] ∪ [−2, −1]. 9. Yes. It is impossible to simultaneously have n < 0 and n ≥ 0. 10. No. 11. No, since 3.5 is in the intersection. 12. Yes. 13. {(1, 2), (1, 4), (3, 2), (3, 4)}. Notice that it has 2 · 2 = 4 elements. 14. {(a, 1), (a, 2), (b, 1), (b, 2), (c, 1), (c, 2)}. 15. {(3, 5), (5, 5), (7, 5), (9, 5)}. Notice that it has 4 · 1 = 4 elements. 16. {(a, a), (a, b), (a, c), (a, d), (b, a), (b, b), (b, c), (b, d)}.

4.1. CHAPTER 1

299

21.

17. 3

1 −1 1 2

4 22. The fourth quadrant.

18. 2

1 −1

1

19.

23.

1

−1 −1

1

20.

24. 10 1 0 0

10

25. {(1, 2, 1), (1, 2, 2), (1, 4, 1), (1, 4, 2), (3, 2, 1), (3, 2, 2), (3, 4, 1), (3, 4, 2)}. Notice that it has 2 · 2 · 2 = 8 elements.

300

CHAPTER 4. ANSWERS TO ALL EXERCISES

26. {(a, a, a), (a, a, b), (a, a, c), (a, b, a), (a, b, b), (a, b, c)}. 27. {(a, a, a), (a, a, b), (a, b, a), (a, b, b), (b, a, a), (b, a, b), (b, b, a), (b, b, b)}. Notice that it has 23 = 8 elements. 28. {(a, b, c) : a, b, c ∈ Z}. 29. {∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}. Notice that it has 23 = 8 elements. 30. {∅, {2}}. 31. {∅,{1},{2},{3},{4},{1,2},{1,3},{1,4},{2,3},{2,4},{3,4},{1,2,3},{1,2,4},{1,3,4}, {2,3,4},{1,2,3,4}}. Notice that it has 24 = 16 elements. 32. {∅, {x}, {y}, {x, y}}. 33. 1024. That is, for A = {n : n ∈ Z and 1 ≤ n ≤ 10} = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, we have |A| = 10, and hence |P(A)| = 210 = 1024. 34. 27 = 128. 35. ∅, {π}, (−2, 7], and Z. Many different answers are possible. 36. ∅, {0}, Z+ , and N. 37. False. 1 is not an ordered pair. 38. False. 39. False. 1 6∈ {3, 4}. 40. True. 41. (A M B) M C = A M (B M C). That is, ⊕ corresponds to M. 42. A \ B = B \ A. 43. A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) and A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C). That is, ∧ corresponds to ∩, and ∨ corresponds to ∪.

4.1. CHAPTER 1

301

44. A ∩ (B \ C) = (A ∩ B) \ (A ∩ C). 45.

U '$ '$ A B '$

U '$ '$ A B '$

&% &%

&% &%

&% C

&% C

A ∪ (B ∩ C) is the shaded portion of the left diagram. (A ∪ B) ∩ (A ∪ C) is the doubly shaded portion of the right diagram. Both portions are the same. 46. U '$ '$ A B

U '$ '$ A B

&% &%

&% &%

c

(A ∪ B) is the shaded portion of the left diagram. Ac ∩B c is the doubly shaded portion of the right diagram. Both portions are the same. 47.

'$ B  A  &%

'$ B  A  &%

A∪B is the shaded portion of the left diagram. B is shaded in the right diagram. Both portions are the same. 48. U '$ '$ A B '$

U '$ '$ A B '$

&% &%

&% &%

&% C

&% C

(A ∩ B) ∩ C is the doubly shaded portion of the left diagram. A ∩ (B ∩ C) is the doubly shaded portion of the right diagram. Both portions are the same. The result with unions is handled similarly.

302

CHAPTER 4. ANSWERS TO ALL EXERCISES

49. A ∩ (Ac ∪ B ∪ C)

50.

51.

(A ∪ B ∪ C)

= = = c

(A ∩ Ac ) ∪ (A ∩ B) ∪ (A ∩ C) ∅ ∪ (A ∩ B) ∪ (A ∩ C) (A ∩ B) ∪ (A ∩ C) c

(A ∪ (B ∪ C)) c Ac ∩ (B ∪ C) Ac ∩ (B c ∩ C c ) Ac ∩ B c ∩ C c

= = = =

(A ∩ B ∩ C c ) ∪ (A ∩ B c ∩ C) = (A ∩ (B ∩ C c )) ∪ (A ∩ (B c ∩ C)) = A ∩ ((B ∩ C c ) ∪ (B c ∩ C)) = A ∩ ((B \ C) ∪ (C \ B)) = A ∩ (B M C)

52. (A∩B ∩C c ) ∪ (A∩B c ∩C c )

53.

54.

c

A ∩ ((B ∩ C) )

c

(A ∪ (B ∩ C))

= = = = = =

= = = = =

Distributivity Theorem 1.6 Theorem 1.6

Associativity De Morgan’s Law De Morgan’s Law Associativity

Associativity Distributivity Definition of \ Definition of M

((A ∩ B) ∩ C c ) ∪ ((A ∩ B c ) ∩ C c ) ((A ∩ B) ∪ (A ∩ B c )) ∩ C c (A ∩ (B ∪ B c )) ∩ C c (A ∩ U) ∩ C c A ∩ Cc

A ∩ (B c ∪ C c ) (A ∩ B c ) ∪ (A ∩ C c )

Associativity Distributivity Distributivity Universe Rule Universe Rule

De Morgan’s Law Distributivity

c

Ac ∩ (B ∩ C) Ac ∩ (B c ∪ C c ) (Ac ∩ B c ) ∪ (Ac ∩ C c ) c c (A ∪ B) ∪ (A ∪ C)

De Morgan’s Law De Morgan’s Law Distributivity De Morgan’s Law

55. Since A ∩ B ∩ C ⊆ A ∩ B, the Absorption Rule yields the desired result. The Absorption Rule says: If S ⊆ T , then S ∪ T = T . Apply this with S = A ∩ B ∩ C and T = A ∩ B, after invoking commutativity to conclude that S ∪ T = T ∪ S. That is, (A ∩ B) ∪ (A ∩ B ∩ C) = (A ∩ B ∩ C) ∪ (A ∩ B) = A ∩ B. 56. Since A ∪ B ⊆ A ∪ B ∪ C, the Absorption Rule yields the desired result. 57. Yes, as sets, but not as lists. In[1]:= setEq[x_,y_] := (Union[x] == Union[y]) In[2]:= setEq[{1,2},{2,1}]

4.1. CHAPTER 1

303

Out[2]= True In[3]:= setEq[{1,2,2},{2,1}] Out[3]= True 58. Yes. 59. disjoint[x_, y_] := (Intersection[x, y] == {}) In[1]:= disjoint[x_,y_] := (Intersection[x,y] == {}) In[1]:= disjoint[{1,2},{3,4}] Out[2]= True In[3]:= disjoint[{1,2},{1,4}] Out[3]= False 60. cardSet[x_] := Length[Union[x]] 61. symmDiff[x_, y_] := Union[Complement[x, y], Complement[y, x]] In[1]:= symmDiff[x_,y_] := Union[Complement[x,y], Complement[y,x]] In[2]:= symmDiff[{1,2},{3,4}] Out[2]= {1,2,3,4} In[3]:= symmDiff[{1,2},{1,4}] Out[3]= {2,4} 62. They are equal, by De Morgan’s Law. 63. In both cases, intersect is performed before union. > {1,3} intersect {1,2} union {2,3}; {1, 2, 3} > {1,3} union {1,2} intersect {2,3}; {1, 2, 3} 64. {{},{{}}}

304

CHAPTER 4. ANSWERS TO ALL EXERCISES

65. They test whether A is a subset of B. The first should be more efficient, since the power set can be much larger than the given set and thus expensive to compute. > subset1 := (x,y) -> evalb(x = x intersect y) ; subset1 := (x, y) -> evalb(x = x intersect y) > with(combinat, powerset); [powerset] > subset2 := (x,y) -> member(x,powerset(y)) ; subset2 := (x, y) -> member(x, (combinat:-powerset)(y)) > subset1({1},{1,2}); true > subset2({1},{1,2}); true > subset1({1},{2,3}); false > subset2({1},{2,3}); false

66. Yes. 67. compU := x -> U minus x; > U := {0,1,2,3,4,5,6,7,8,9}; U := {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} > compU := x -> U minus x; compU := x -> U minus x > compU({1,2,3}); {0, 4, 5, 6, 7, 8, 9} > compU({2,3,9,12}); {0, 1, 4, 5, 6, 7, 8}

68. symmDiff := (x,y) -> (x minus y) union (y minus x);

4.1. CHAPTER 1

305

Section 1.5 1.

p F F T T

p→q T T F T

q F T F T

¬q T F T F

¬p T

The first row demonstrates the validity of the argument form p→q ¬q ∴ ¬p. 2.

p F F F F T T T T

q F F T T F F T T

p→q T T T T F F T T

r F T F T F T F T

q→r T T F T T T F T

p→r T T T

T

Rows 1, 2, 4, and 8 demonstrate the validity of the argument. 3.

p F F F F T T T T

q F F T T F F T T

r F T F T F T F T

p→r T T T T F T F T

q→r T T F T T T F T

p∨q F F T T T T T T

r

T T T

Rows 4, 6, and 8 demonstrate the validity of the argument form p→r q→r p∨q ∴ r. 4.

p F F T T

q F T F T

p∨q F T T T

¬q T F T F

q

T

306

CHAPTER 4. ANSWERS TO ALL EXERCISES

The third row demonstrates the validity of the argument. 5.

p F F T T

p∧q F F F T

q F T F T

p

T

The last row demonstrates the validity of the argument form p∧q ∴ p. 6.

p F F T T

q F T F T

p∨q F T T T

The last two rows demonstrate the validity of the argument. 7.

p F F T T

q F T F T

p∧q

T

The last row demonstrates the validity of the argument form p q ∴ p ∧ q. 8.

p F F T T

q F T F T

p↔q T F F T

q

T

The last row demonstrates the validity of the argument. 9. Invalid. Consider when p is false and q is true. p F

q T

p→q T

q T

p F

This row, for example, shows that the argument form is invalid.

4.1. CHAPTER 1

307

10. Valid. q F F T T F F T T

p F F F F T T T T

p→r T T T T F T F T

r F T F T F T F T

q→r T T F T T T F T

p⊕q F F T T T T F F

Rows 4 and 6 demonstrate the validity of the argument. 11. Valid. The third, fourth, sixth, and eighth rows of the truth table p F F F F T T T T

q F F T T F F T T

p∨q F F T T T T T T

r F T F T F T F T

p→r T T T T F T F T

q∨r F T T T F T T T

show that the argument form is valid. 12. Invalid. p T

q F

r F

p∨q T

p∧q →r T

This row, for example, shows that the argument is invalid. 13. Invalid. Consider when p is true and q is true. p T

q T

p∨q T

p T

¬q F

This row, for example, shows that the argument form is invalid. 14. Invalid. p F

q T

r F

p→q T

r→q T

¬(p ∧ r) T

¬q F

This row, for example, shows that the argument is invalid. 15. Valid. The sixth, eighth, eleventh, twelfth, and fifteenth rows of the truth

308

CHAPTER 4. ANSWERS TO ALL EXERCISES

table p F F F F F F F F T T T T T T T T

q F F F F T T T T F F F F T T T T

r F F T T F F T T F F T T F F T T

s F T F T F T F T F T F T F T F T

p∨q F F F F T T T T T T T T T T T T

p→r T T T T T T T T F F T T F F T T

q→s T T T T F T F T T T T T F T F T

r∨s

r→q T F T T T F T T

p ⊕ ¬q T T F F F F T T

¬r T

T T

T T

T

show that the argument form is valid. 16.

p F F F F T T T T

q F F T T F F T T

p → ¬r T T T T T F T F

r F T F T F T F T

T

Rows 1 and 7 demonstrate the validity of the argument. 17. (a)

p F F F F T T T T

q F F T T F F T T

r F T F T F T F T

p→r T T T T F T F T

q→r T T F T T T F T

p∨q →r T T T T T

Rows 1, 2, 4, 6, and 8 demonstrate the validity of the argument form. (b)

4.1. CHAPTER 1

1. 2. 3. 4. 5.

Statement Form p→r q→r p∨q p∨q →r ∴ r

Justification Given Given Given (1), (2), Part (a) (3), (4), Direct Implication

1. 2. 3. 4. 5. 6. 7.

Statement Form p→s q→s r→s p∨q∨r p∨q →s p∨q∨r →s ∴ s

Justification Given Given Given Given (1), (2), Part (a) (3), (5), Part (a) (4), (6), Direct Implication

(c)

18. (a)

309

s F F F F T T T T

q F F T T F F T T

r F T F T F T F T

s∨q F F T T T T T T

r ∨ ¬q T T F T T T F T

s∨r F T F T T T T T

Rows 4, 5, 6, and 8 demonstrate the validity of the argument. (b) ¬p ∨ q ≡ p → q, r ∨ ¬q ≡ q → r, and ¬p ∨ r ≡ p → r. 19. Invalid, since its argument form p∨q ∴ p is invalid. p F

q T

p∨q T

p F

This row, for example, shows that the argument form is invalid. 20. Valid, since its form ‘Obtaining And’ is valid. 21. Invalid, since its argument form p ∨ ¬p ¬p ∴ q

310

CHAPTER 4. ANSWERS TO ALL EXERCISES

is invalid. p F

p ∨ ¬p T

q F

¬p T

q F

This row, for example, shows that the argument form is invalid. 22. Valid, since its form ‘Eliminating a Possibility’ is valid. 23. 1. 2. 3. 4. 5.

Statement Form p→q q→r p p→r ∴ r

Justification Given Given Given (1), (2), Transitivity of → (3), (4), Direct Implication

1. 2. 3. 4.

Statement Form p∨q →r p p∨q ∴ r

Justification Given Given (2), Obtaining Or (1), (3), Direct Implication

1. 2. 3. 4.

Statement Form p→r p∧q p ∴ r

Justification Given Given (2), In Particular (1), (3), Direct Implication

24.

25.

26. 1. 2. 3. 4. 5.

Statement Form p→r p∨q ¬q p ∴ r

Justification Given Given Given (2), (3), Eliminating a Possibility (1), (4), Direct Implication

1. 2. 3. 4. 5.

Statement Form p ∧ (q ∨ r) (p ∧ q) → s (p ∧ r) → s (p ∧ q) ∨ (p ∧ r) ∴ s

Justification Given Given Given (1), Distributivity (2), (3), (4), Two Separate Cases

27.

4.1. CHAPTER 1

28. 1. 2. 3. 4. 5. 6. 29.

Justification Given Given Given (1), (3), Direct Implication (2), (3), Direct Implication (4), (5), Obtaining And

Statement Form p→q p ¬p ∨ q ¬¬p ∴ q

Justification Given Given (1), Substitution of Equivalent (2), Double Negative (3), (4), Eliminating a Possibility

1. 2. 3. 4.

Statement Form p→q ¬q ¬p ∨ q ∴ ¬p

Justification Given Given (1), Substitution of Equivalent (2), (3), Eliminating a Possibility

31. 1. 2. 3. 4. 5. 32. 1. 2. 3. 4. 5.

1. 2. 3. 4. 5. 6. 7.

Statement Form p→q p→r p q r ∴ q∧r

1. 2. 3. 4. 5. 30.

33.

311

Statement Form ∀ x ∈ U, p(x) → q(x) a∈U ¬q(a) p(a) → q(a) ∴ ¬p(a) Statement Form ∀ x ∈ U, p(x) ∨ q(x) a∈U ¬p(a) p(a) ∨ q(a) ∴ q(a) Statement Form ∀ x ∈ U, p(x) → q(x) ∀ x ∈ U, ¬q(x) Let a ∈ U be arbitrary. p(a) → q(a) ¬q(a) ¬p(a) ∴ ∀ x ∈ U, ¬p(x)

Justification Given Given Given (1),(2), Principle of Specification (3),(4), Contrapositive Implication Justification Given Given Given (1),(2), Principle of Specification (3),(4), Eliminating a Possibility Justification Given Given Assumption (1),(3), Principle of Specification (2),(3), Principle of Specification (4),(5), Contrapositive Implication (3),(6), Principle of Generalization

312

CHAPTER 4. ANSWERS TO ALL EXERCISES

34.

Statement Form ∀ x ∈ U, p(x) ∨ q(x) ∀ x ∈ U, ¬p(x) Let a ∈ U be arbitrary. p(a) ∨ q(a) ¬p(a) q(a) ∴ ∀ x ∈ U, q(x)

1. 2. 3. 4. 5. 6. 7. 35.

1. 2. 3. 4. 5. 6. 36. 1. 2. 3. 4. 5. 6. 7. 8. 37.

Statement Form ∀ x ∈ U, p(x) ∀ x ∈ U, q(x) a∈U p(a) q(a) ∴ p(a) ∧ q(a)

Justification Given Given Assumption (1),(3), Principle of Specification (2),(3), Principle of Specification (4),(5), Eliminating a Possibility (3),(6), Principle of Generalization Justification Given Given Given (1),(3), Principle of Specification (2),(3), Principle of Specification (4),(5), Obtaining And

Statement Form ∀ x ∈ U, p(x) → q(x) ∀ x ∈ U, q(x) → r(x) a∈U p(a) p(a) → q(a) q(a) → r(a) q(a) ∴ r(a)

Justification Given Given Given Given (1),(3), Principle of Specification (2),(3), Principle of Specification (4),(5), Direct Implication (6),(7), Direct Implication

1. 2. 3. 4. 5.

Statement Form ∀ x ∈ U, p(x) ∀ x ∈ U, q(x) Let a ∈ U be arbitrary. p(a) ∧ q(a) ∴ ∀ x ∈ U, p(x) ∧ q(x)

Justification Given Given Assumption (1),(2),(3), Exercise 35 (3),(4), Principle of Generalization

1. 2. 3. 4. 5. 6. 7.

Statement Form ∀ x ∈ U, p(x) → q(x) ∀ x ∈ U, q(x) → r(x) Let a ∈ U be arbitrary. p(a) → q(a) q(a) → r(a) p(a) → r(a) ∴ ∀ x ∈ U, p(x) → r(x)

Justification Given Given Assumption (1),(3), Principle of Specification (2),(3), Principle of Specification (4),(5), Transitivity of → (3),(6), Principle of Generalization

38.

4.1. CHAPTER 1

39. 1. 2. 3. 4. 5. 6. 7. 8. 40. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

313

Statement Form ∀ x ∈ U, p(x) ∨ q(x) a∈U q(a) → r(a) p(a) ∨ q(a) p(a) → p(a) ∨ r(a) r(a) → p(a) ∨ r(a) q(a) → p(a) ∨ r(a) ∴ p(a) ∨ r(a)

Statement Form ∀ x ∈ U, p(x) ∧ ¬q(x) ∀ x ∈ U, q(x) ∨ r(x) Let a ∈ U be arbitrary. p(a) ∧ ¬q(a) q(a) ∨ r(a) ¬q(a) r(a) p(a) ∨ r(a) ¬p(a) → r(a) ∴ ∀ x ∈ U, ¬p(x) → r(x)

Justification Given Given Given (1),(2), Principle of Specification Tautology Tautology (3),(6),Transitivity of → (4),(5),(7), Separate Cases Justification Given Given Assumption (1),(3), Principle of Specification (2),(3), Principle of Specification (4), In Particular (5), (6), Eliminating a Possibility (7), Obtaining Or (8), Substitution of Equivalent (3),(9), Principle of Generalization

41. Let U = Z, p(n) = “n2 < 0”, and q(n) = “n2 ≥ 0”. In the resulting argument ∀ n ∈ Z, n2 < 0 or n2 ≥ 0 ∀ n ∈ Z, n2 6< 0 ∴ ∀ n ∈ Z, n2 6≥ 0, all of the premises are true, but the conclusion ∀ n ∈ Z, n2 < 0 is false. 42. Let U = Z, p(n) = r(n) = ”n2 < 0”, q(n) = ”n2 ≥ 0”. In the resulting argument, all of the premises are true, but the conclusion is false. 43. Let U = R, p(x) = “x ≥ 0”, and q(x) = “x ≤ 0”, and a = 0. In the resulting argument ∀ x ∈ R, x ≥ 0 or x ≤ 0 0∈R 0 ≥ 0 or 0 ≤ 0 ∴ ∀ x ∈ R, x ≥ 0 and x ≤ 0, all of the premises are true, but the conclusion is false (since it fails for x = 1).

314

CHAPTER 4. ANSWERS TO ALL EXERCISES

44. Let U = Z, p(n) = ”n = 0”, q(n) = ”n ≥ 0”, and a = 0. In the resulting argument, all of the premises are true, but the conclusion is false, since it fails for x = 1. 45. Invalid. The form of the argument ∀ x ∈ U, p(x) → q(x) r q(2) ∴ p(2) is invalid. Let U = R, p(x) = “x > 2”, q(x) = “x ≥ 2”, and r = “2 ∈ R” to see this. 46. Invalid. The form of the argument ∀ x ∈ U, p(x) → q(x) ¬p(2) ∴ ¬q(2) is invalid. 47. Valid. The form of the argument ∀ x ∈ U, p(x) → q(x) a∈U p(a) ∨ r(a) ∴ q(a) ∨ r(a) is valid. Note that U = Z, p(n) = “n < 0, ” q(n) = “ − n > 0, ” and r(n) = “n = 0.” 1. 2. 3. 4. 8.

Statement Form ∀ x ∈ U, p(x) → q(x) a∈U p(a) ∨ r(a) p(a) → q(a) ∴ q(a) ∨ r(a)

Justification Given Given Given (1),(2), Principle of Specification (3),(4), Exercise 11

48. Invalid. The form of the argument ∀ x ∈ U, p(x) → q(x) ∀ x ∈ U, q(x) → p(x) ∴ ∀ x ∈ U, r(x) → p(x)

4.1. CHAPTER 1

315

is invalid. 49. If ∀ x, y ∈ U, p(x, y) holds and a, b ∈ U, then p(a, b) holds. 50. If a, b ∈ U are arbitrary and p(a, b) holds, then ∀ x, y ∈ U, p(x, y) holds.

Review 1. It is a true statement. An if-then statement is true, when its hypothesis is false. 2.

3.

¬p T T F F

q F T F T

p F F T T

¬q T F T F

q F T F T

p F F T T

¬p ∧ q F T F F

p → ¬q T T T F p∨q F T T T

(¬p ∧ q) ∨ p F T T T

The last two columns are the same. 4.

p F F T T

q F T F T

¬p T T F F

¬q T F T F

p ∧ ¬q F F T F

¬(p ∧ ¬q) T T F T

¬p ∨ q T T F T

The last two columns are the same. 5.

p F F T T

q F T F T

p→q T T F T

q →p T F T T

(p → q)∨(q → p) T T T T

The last column is all T . 6. Yes. p F F T T

q F T F T

¬p T T F F

¬p → q F T T T

p∨q F T T T

316

CHAPTER 4. ANSWERS TO ALL EXERCISES

The last two columns are the same. 7. Yes. p F F F F T T T T

q F F T T F F T T

q∨r F T T T F T T T

r F T F T F T F T

p→q T T T T F F T T

p → (q ∨ r) T T T T F T T T

(p → q) ∨ r T T T T F T T T

The last two columns are the same. 8. (a) p ∨ ¬q → p. (b) ¬(p ∧ ¬q) → ¬p ≡ ¬p ∧ q → ¬p. (c) ¬p → ¬(p ∧ ¬q) ≡ ¬p → ¬p ∧ q. (d) p ∧ ¬(p ∧ ¬q) ≡ p ∧ ¬p ∧ q = f . 9. If the program compiles, then the program does not contain a syntax error. 10. ¬¬p ∧ ¬(q ∧ ¬r) ≡ p ∧ (¬q ∨ r) 11. Steve is not doing his homework and Steve is going to the basketball game. 12.

¬p ∧ (q ∨ ¬r)

13.

≡ ≡

(¬p ∧ q) ∨ (¬p ∧ ¬r) (¬p ∧ q) ∨ ¬(p ∨ r)

(p ∧ q ∧ ¬r) ∨ (¬p ∧ q ∧ ¬r) ≡ (p ∧ (q ∧ ¬r)) ∨ (¬p ∧ (q ∧ ¬r)) ≡ (p ∨ ¬p) ∧ (q ∧ ¬r) ≡ t ∧ (q ∧ ¬r) ≡ q ∧ ¬r

Distributivity De Morgan’s Law

Associativity Distributivity Theorem 1.2 Theorem 1.2

14. ((P ∧ Q) ∨ ¬Q) ∧ R = S, as can be seen by tracing the circuit. P

P ∧Q AND

(P ∧ Q) ∨ ¬Q OR

Q R

s

NOT

c ¬Q

((P ∧ Q) ∨ ¬Q) ∧ R AND

S

4.1. CHAPTER 1 P 0 0 0 0 1 1 1 1 15.

16. P

R Q P

317 Q 0 0 1 1 0 0 1 1

R 0 1 0 1 0 1 0 1

P ∧Q 0 0 0 0 0 0 1 1

¬Q 1 1 0 0 1 1 0 0 AND

(P ∧ Q) ∨ ¬Q 1 1 0 0 1 1 1 1

NOT

c

OR

s

NOT

S 0 1 0 0 0 1 0 1 S

c AND

Q

OR

S

AND

R

17. True. √ √ Both equal (− 2, 2).

23. True. 2 is listed on the right-hand side.

18. True. Order does not matter.

24. False. 1 is not listed on the right-hand side. Instead, {1} is listed.

19. False. {1} is a subset.

25. False. 0 is an element.

20. False. 1 is an element.

26. True. Repetition does not matter, and = is a special case of ⊆.

21. True. {1, 2} is listed on the right-hand side. 22. False. E.g., it contains 0.2, 0.22, 0.222, . . ..

27. False. |{∅}| = 1, since ∅ is the lone element of {∅}. 28. {4, 6, 8, 10, 12}.

29. {x : x ∈ R and x5 + x4 + x3 + x2 + x + 1 = 0}. It happens to be {−1}. Note that x5 + x4 + x3 + x2 + x + 1 = (x + 1)(x2 + x + 1)(x2 − x + 1).

318

CHAPTER 4. ANSWERS TO ALL EXERCISES

30. {x : x ∈ R and − 3 < x ≤ −1}. Or, {x : −3 < x ≤ −1} if we understand that we are working in the context of real numbers. 31. 2. √

−1+ 5 2

and

√ −1− 5 2

are the elements.

32. Read Example 1.22. P = {S : S is a set and S 6∈ S}. If P is a set, then both P ∈ P and P 6∈ P lead to contradictions. 33. ∀ n ∈ Z, 2n ∈ Z. 34. ∃ n ∈ Z such that 2n > 1000. 35. ∀ x, y ∈ R, if y 6= 0, then xy ∈ R. Or, ∀ x ∈ R, ∀ x ∈ R \ {0}, xy ∈ R. 36. ∀ x ∈ R, if x ∈ (1, 4], then Or, ∀ x ∈ (1, 4], x1 ∈ [ 14 , 1).

1 x

∈ [ 14 , 1).

37. ∀ m, n ∈ Z, m + n ∈ Z. 38. ∀ x ∈ R, ∃ y ∈ R such that y 3 = x. 1 ∈ N. 39. ∃ x ∈ N such that x2 6∈ N or 2x 1 2 ∃ x ∈ N such that ¬[x ∈ N and 2x 6∈ N] ≡ 1 ∃ x ∈ N such that x2 6∈ N or 2x ∈ N. De Morgan’s Law is used.

40. ∀ x ∈ R, x2 − x + 1 6= 0. 41. ∃ x ∈ R such that x3 < 0 and x ≥ 0. Recall that ¬(p → q) ≡ p ∧ ¬q. 42. ∃ x, y ∈ R such that (x + y)2 6= x2 + 2xy + y 2 . 43. ∀ n ∈ Z, n < 0 and n2 − 1 ≤ 0. Recall that ¬(p → q) ≡ p ∧ ¬q. 44. ∃ x ∈ R such that ∀ n ∈ Z, xn ≤ 0. ∃ x ∈ R such that ¬[∃ n ∈ Z such that xn > 0] ≡ ∃ x ∈ R such that ∀ n ∈ Z, xn ≤ 0. 45. Truth is always popular, or it is sometimes wrong.

4.1. CHAPTER 1

319

Note that ‘but’ is a form of ‘and’. 46.

'$ '$ A 1 B 2 5 3 &% &%

(a) {2}. (b) {1, 2, 3, 5}. (c) {5}. (d) {1, 3, 5}. (e) {(1, 2), (1, 5), (2, 2), (2, 5), (3, 2), (3, 5)}. Note that it has 3 · 2 = 6 elements. (f) {∅, {2}, {5}, {2, 5}}. Note that it has 22 = 4 elements. 47. (−∞, −1]. (−1, ∞)

d −1

(−∞, −1] 

t −1

-

48. {0}. d −1

(−1, 1)

t 0

d 1

49. {1, 2, 3, 4, 6, 8}. '$ '$ A 1 2 6 B 3 4 8 &% &% 50. [4, 5]. t 3

[3, 5] [2, 4)

t 2

t 5 d 4

51. {a, b, c, d, e}. '$ '$ A a d B f b e c &% &%

320

CHAPTER 4. ANSWERS TO ALL EXERCISES

52. No. 0 is in both. 53. {(x, p), (x, q), (y, p), (y, q), (z, p), (z, q)}. Note that it has 3 · 2 = 6 elements. 54.

1 −1

1

55. {(1, 1)}. Note that it has 1 · 1 = 1 element. 56. {∅, {x}, {y}, {z}, {x, y}, {x, z}, {y, z}, {x, y, z}}. Note that it has 23 = 8 elements. 57.

58.

59.

60.

61.

(Ac ∩ B c )

c

Ac ∩ (B ∪ C c )

c

c

(Ac ) ∪ (B c ) A∪B

= = = =

De Morgan’s Law Double Complement Rule

(Ac ∩ B) ∪ (Ac ∩ C c ) c (Ac ∩ B) ∪ (A ∪ C)

(A ∩ B c ) ∪ (A ∩ B)

= = =

A ∩ (B c ∪ B) A∩U A

(Ac ∩B ∩C c )∪(Ac ∩(B c ∪C)) = (Ac ∩(B ∩C c ))∪(Ac ∩(B c ∪C)) = Ac ∩((B ∩C c )∪(B c ∪C)) c = Ac ∩((B ∩C c )∪(B ∩C c ) ) = Ac ∩U = Ac p F F F F T T T T

q F F T T F F T T

r F T F T F T F T

p∧q F F F F F F T T

p→r T T T T F T F T

Distributivity De Morgan’s Law Distributivity Theorem 1.6 Theorem 1.6

Associativity Distributivity De Morgan’s Law Theorem 1.6 Theorem 1.6 q∧r

T

4.1. CHAPTER 1

321

The validity of the argument can be seen in the last row. 62.

p F F F F T T T T

q F F T T F F T T

p→q T T T T F F T T

r F T F T F T F T

q→r T T F T T T F T

r→p T F T F T T T T

p↔r T

T

The validity of the argument can be seen in the first and last rows. 63. Valid. p F F F F T T T T

q F F T T F F T T

r F T F T F T F T

p∨q F F T T T T T T

q→r T T F T T T F T

p∨r

T T T T

The validity of the argument can be seen in rows 4, 5, 6, and 8. 64. Valid. p F F F F T T T T

q F F T T F F T T

r F T F T F T F T

p ∧ ¬q F F F F T T F F

q∨r F T T T F T T T

¬r → p

T

The validity of the argument can be seen in row 6. 65. Invalid. Consider when p is false, q is true, and r is false. The argument form is invalid as can be seen in this row of the truth table. p F

q T

r F

p→q T

r→q T

q T

p∨r F

322

CHAPTER 4. ANSWERS TO ALL EXERCISES

66. The argument is invalid, since its form p∨q q ∴ ¬p is invalid, as can be confirmed with a truth table. p T 67.

p∨q T

q T

q T

¬p F

1. 2. 3. 4.

Statement Form p → (q ∨ r) ¬q ∧ ¬r ¬(q ∨ r) ∴ ¬p

Justification Given Given (2), De Morgan’s Law (1), (3), Contrapositive Implication

1. 2. 3. 4. 5.

Statement Form ¬r p→q q→r p→r ∴ ¬p

Justification Given Given Given (2), (3), Transitivity of → (1), (4), Contrapositive Implication

68.

69.

Statement Form ∀ x ∈ U, p(x) ∧ q(x) Let a ∈ U be arbitrary. p(a) ∧ q(a) p(a) ∴ ∀ x ∈ U, p(x)

1. 2. 3. 4. 5. 70. 1. 2. 3. 4. 5.

Statement Form ∀ x ∈ U, p(x) ∨ q(x) a∈U ¬q(a) p(a) ∨ q(a) ∴ p(a)

Justification Given Assumption (1),(2), Principle of Specification (3), In Particular (2),(4), Principle of Generalization

Justification Given Given Given (1), (2), Principle of Specification (3),(4), Eliminating a Possibility

4.1. CHAPTER 1

71. 1. 2. 3. 4. 5. 6. 7. 8.

323

Statement Form ∀ x ∈ U, p(x) ∨ ¬q(x) ∀ x ∈ U, q(x) Let a ∈ U be arbitrary. p(a) ∨ ¬q(a) q(a) ¬¬q(a) p(a) ∴ ∀ x ∈ U, p(x)

Justification Given Given Assumption (1),(3), Principle of Specification (2),(3), Principle of Specification (5), Double Negative (4),(6), Eliminating a Possibility (3),(7), Principle of Generalization

72. It has the form ∀ x ∈ U, p(x) ∨ q(x) ∀ x ∈ U, q(x) ∨ r(x) ∴ ∀ x ∈ U, p(x) ∨ r(x) which can be seen to be invalid when U = R, p(x) = “x ≤ 0”, q(x) = “x ≥ 0”, and r(x) = “x ≤ 1”. That is, ∀ x ∈ R, x ≤ 0 ∨ x ≥ 0 is true, and ∀ x ∈ R, x ≥ 0 ∨ x ≤ 1 is true, but ∀ x ∈ R, x ≤ 0 ∨ x ≤ 1 is false.

324

4.2

CHAPTER 4. ANSWERS TO ALL EXERCISES

Chapter 2

Section 2.1 1. Proof. Let L be the line given by the equation y = 3x − 5. Observe that −8 = 3(−1) − 5 , −2 = 3(1) − 5, and 1 = 3(1) − 5. Therefore, each of the points (−1, −8), (1, −2), and (2, 1) lie on the common line L.  2. Use y = x2 − 2x + 3. 3. Proof. Let A = {2, 4}. Observe that {1, 2, 3, 4} \ A = {1, 2, 3, 4} \ {2, 4} = {1, 3}.  4. Let A = R. 5. Proof. Let A = B = {1}. Observe that A ∪ B = {1} ∪ {1} = {1} = A ∩ B.  6. Let A = {1} and B = {2}. So A \ B = {1} and |A \ B| = 1 6= 0 = |A| − |B|. 7. Proof. Let n = −3. Observe that 10n = 10−3 = .001.  8. Proof. Let n = 1. Observe that

1 1

= 1 ∈ Z. 

9. Proof. Let m = −3, n = 2. Observe that 3m + 5n = 3(−3) + 5(2) = 1.  10. Let m = 2 and n = 1. 11. Proof. Let A = B = Z. Observe that A \ B = Z \ Z = B \ A.  12. Let A = {1} and B = {1}. So (A ∪ B) \ B = ∅ = 6 A. 13. Proof. Let x = −5. Observe that x ∈ Z and 3(−5)2 + 8(−5) = 35.  14. Let x = −3. 15. Proof. The polynomial x2 − 1 factors as (x + 1)(x − 1). From the zero multiplication property, the solutions to the equation (x + 1)(x − 1) = 0 occur when x + 1 = 0 or x − 1 = 0. That is, x = −1 and x = 1 are the two distinct real roots of x2 − 1.  16. x2 = −1 has no real solutions. 17. Proof. Observe that x2 − 2x + 1 = (x − 1)2 ≥ 0. So x2 − 2x + 5 = x2 − 2x + 1 + 4 ≥ 0 + 4 = 4 > 0. Hence, the equation x2 − 2x + 5 = 0 has no solution. 

4.2. CHAPTER 2

325

18. Proof. The polynomial x3 − 3x2 + 4 factors as (x − 2)2 (x + 1). From the zero multiplication property, the solutions to the equation (x − 2)2 (x + 1) = 0 occur when x − 2 = 0 or x + 1 = 0. That is, x = 2 and x = −1 are the two distinct real roots of x3 − 3x2 + 4.  19. (a) 6000(1.075)10 = $12,366.19. (b) Let P = 4900, and note that 4900(1.075)10 = 10099.05 > 10000. We used trial and error to find P . Note that P = 4800 gives A = 9892.95 < 10000. 20. (a) $117,902.29. (b) Let R = 650, and note that M = 76636.49 > 75000. 21. Proof. Let A = ∅. Observe that A2 = ∅2 = ∅ = A.  22. False. The left-hand side is not defined when x = −2. 23. (−2, −1) ∪ (1, 2) is not an interval. Note that each type of interval in Definition 1.9 is a set I with the property that, if x, y ∈ I and x ≤ z ≤ y, then z ∈ I. Here, for I = (−2, −1) ∪ (1, 2), we have −1.5, 1.5 ∈ I and −1.5 ≤ 0 ≤ 1.5, but 0 6∈ I. 24. Let x = 2.5. So x2 = 6.25 6∈ Z. 25. Counterexample. Let x = 21 . Observe that x2 = ( 12 )2 =

1 4

6>

1 2

= x. 

26. When x = − 21 , 4x2 + 4x + 1 = 0. 27. Counterexample. Let n = 3. Observe that n2 = 9 6≤ 8 = 2n .  28. 24 − 1 = 3 · 5 is not prime. 29. Proof. Let x = −11. Observe that x = −11 < 10 and x2 = 121 > 100.  30. Let A = ∅ and B = {1}. So A × B = ∅, but B 6= ∅. 31. Counterexample. Let x = 0 and y = 2π. Observe that x < y, but sin(x) 6< sin(y). So the sine function is not increasing. (See Definition 1.15.)  32. cos(0) = 1 and cos( π2 ) = 0 though 0
0. 34. Let x = −1. So



x2 = 1 6= x.

326

CHAPTER 4. ANSWERS TO ALL EXERCISES

35. False. Counterexample. Let A = {1} and B = {2, 3}. Observe that |A| = 1 ≤ 2 = |B|, but A * B.  Recall that ¬[p → q] ≡ p ∧ ¬q. 36. False. Counterexample: A = B = {1}. 37. Counterexample. Let A = {1, 2}, B = {1, 3}, and C = {1}. Observe that A 6= B, and A ∩ C = {1} = B ∩ C.  Recall that ¬[p → q] ≡ p ∧ ¬q. 38. Let A = {1}, B = {2}, and C = {1, 2}. 39. Proof. Observe that ∅∪{3} = {3} = ∅ M {3}, {1}∪{3} = {1, 3} = {1} M {3}, and {1, 2} ∪ {3} = {1, 2, 3} = {1, 2} M {3}.  That is, we checked A ∪ {3} = A M {3}, for each of A = ∅, {1}, and {1, 2}. 40.

6 1

= 6 ∈ Z,

6 2

6 3

= 2 ∈ Z.

18 27 36 45 54 63 72 81

and and and and and and and and

= 3 ∈ Z, and

41. Observe that 9(2) 9(3) 9(4) 9(5) 9(6) 9(7) 9(8) 9(9)

= = = = = = = =

1+8 2+7 3+6 4+5 5+4 6+3 7+2 8+1

= 9, = 9, = 9, = 9, = 9, = 9, = 9, and = 9.

42. True. {1, 2} × {1, 1} = {(1, 1), (1, 2), (2, 1), (2, 2)} and {1, 2} × {3, 4} = {(1, 3), (1, 4), (2, 3), (2, 4)}. 43.

n 19 20 21 22 23 24 25 26 27 28 29

11n 209 220 231 242 253 264 275 286 297 308 319

hundreds - tens + ones 2 − 0 + 9 = 11 = 11(1) 2 − 2 + 0 = 0 = 11(0) 2 − 3 + 1 = 0 = 11(0) 2 − 4 + 2 = 0 = 11(0) 2 − 5 + 3 = 0 = 11(0) 2 − 6 + 4 = 0 = 11(0) 2 − 7 + 5 = 0 = 11(0) 2 − 8 + 6 = 0 = 11(0) 2 − 9 + 7 = 0 = 11(0) 3 − 0 + 8 = 11 = 11(1) 3 − 1 + 9 = 11 = 11(1)

In each case, the relevant alternating sum is seen to be a multiple of 11.

4.2. CHAPTER 2

44.

327

3·4 3·5 3·6 3·7 3·8 3·9

= = = = = =

12 15 18 21 24 27

and and and and and and .. .

1+2 1+5 1+8 2+1 2+4 2+7

= = = = = =

3, 6, 9, 3, 6, 9,

3 · 32 3 · 33

= =

96 99

and and

9+6 1+8

= =

15, 18.

45. Observe that 22 − 1

=

3,

2 −1

=

7,

25 − 1

=

31, and

=

127

3

7

2 −1 are all prime. 46.

52 62 72 82 92 102

= 25 = 36 = 49 = 64 = 81 = 100

< 32 = 25 . < 64 = 26 . < 128 = 27 . < 256 = 28 . < 512 = 29 . < 1024 = 210 .

47. Here are the sequences, each ending in 1. 1, 2 7→ 1, 3 7→ 10 7→ 5 7→ 16 7→ 8 7→ 4 7→ 2 7→ 1, 4 7→ 2 7→ 1, 5 7→ 16 7→ 8 7→ 4 7→ 2 7→ 1, and 6 7→ 3 7→ 10 7→ 5 7→ 16 7→ 8 7→ 4 7→ 2 7→ 1. 48.

6 7→ 3 7→ 5 7→ 8 7→ 4 7→ 2 7→ 1 ↑ 7 7→ 11 7→ 17 7→ 26 7→ 13 7→ 20 7→ 10

Section 2.2 1. Proof. Let x ∈ R+ . So x > 0. Multiplying by −1 gives −x < 0. So −x ∈ R− .  2. Proof. Suppose x ∈ R and x ∈ [−1, 2). That is, −1 ≤ x < 2. Multiplication by −1 gives −2 < −x ≤ 1. Thus, −x ∈ (−2, 1]. 

328

CHAPTER 4. ANSWERS TO ALL EXERCISES

3. Proof. Suppose x ∈ R and x ∈ (2, 4). That is, 2 < x < 4. Multiplication by 2 gives 4 < 2x < 8. Thus, 2x ∈ (4, 8).  4. Proof. Suppose x ∈ R and x ∈ [1, 2]. That is, 1 ≤ x ≤ 2. Multiplication by 3 gives 3 ≤ 3x ≤ 6. Subtracting 1 gives 2 ≤ 3x − 1 ≤ 5. Thus, (3x − 1) ∈ [2, 5].  q 5. Counterexample: When x = 41 , we have 14 6< 14 . q That is, 14 = 21 ≥ 14 . 6. Proof. Suppose x ∈ R+ . So x > 0. Hence x + 2 > 2. Therefore, (x + 2)2 > 22 = 4.  7. Counterexample: When x = −3, we have x < 2 and x2 ≥ 4. Recall that ¬[p → q] ≡ p ∧ ¬q. 8. Proof. Suppose x ∈ R and x < −4. So −x > 4. Hence 4 − 3x > 4 + 3(4) = 16 > 10.  9. Proof. Suppose x ∈ R and x < −2. Since x < 0, multiplication by x gives x2 > −2x. Since −2 < 0, multiplying x < −2 by −2 gives −2x > (−2)2 . Transitivity of > gives x2 > (−2)2 . That is, x2 > 4.  10. Proof. Suppose x ∈ R and x > 2. So x2 > 2 · 2 = 4. Hence, x3 = x2 · x > 4 · 2 = 8.  11. Proof. Suppose 0 < x < y. Since x > 0, we have x2 = x · x < x · y. Since y > 0, we have x · y < y · y = y 2 . Hence, x2 < x · y < y 2 .  12. Proof. Suppose x, y < −1. Since −1 < 0, we have (−1)y > (−1)(−1) = 1. Since x < 0, we have xy > (−1)y. Hence, xy > (−1)y > 1.  13. Proof. Suppose R > 2. So 2I < RI = 10. Division by 2 gives I < 5.  14. Sketch. Suppose t ≥ 15. So A ≥ 1000(1.05)15 ≥ 2078.92 ≥ 2000.  15. Proof. Suppose f is a constant real function. So we have c ∈ R such that ∀ x ∈ R, f (x) = c. Observe that ∀ x ∈ R, (2f )(x) = 2f (x) = 2c. So 2f is constant.  See the definition of constant in Definition 1.15. Also, note that 2f is to be interpreted as an example of a constant multiple as defined in Definition 1.16. 16. Proof. Suppose f is a constant real function. So we have c ∈ R such that ∀ x ∈ R, f (x) = c. Suppose x ≤ y are real numbers. Observe that f (x) ≤ c ≤ f (y). So f is nondecreasing. 

4.2. CHAPTER 2

329

17. Proof. Suppose f is a periodic real function. So we have p ∈ R+ such that ∀ x ∈ R, f (x + p) = f (x). Observe that ∀ x ∈ R, f 2 (x + p) = [f (x + p)]2 = [f (x)]2 = f 2 (x). So f 2 is periodic.  See the definition of periodic in Definition 1.15. Also, the proper way to interpret f 2 is explained in the paragraph after Definition 1.16. 18. Proof. Suppose f is a periodic real function. So we have p ∈ R+ such that ∀ x ∈ R, f (x + p) = f (x). Observe that ∀ x ∈ R, −f (x + p) = −[f (x + p)] = −[f (x)] = −f (x). So −f is periodic.  19. Proof. Suppose f and g are nondecreasing real functions. Suppose x ≤ y are real numbers. Observe that (f +g)(x) = f (x) + g(x) ≤ f (y) + g(y) = (f +g)(y). So f +g is nondecreasing.  See the definition of nondecreasing in Definition 1.15. Also, note that f + g is to be interpreted as a sum as defined in Definition 1.16. 20. Proof. Suppose f and g are constant real functions. So we have c, d ∈ R such that ∀ x ∈ R, f (x) = c and g(x) = d. Observe that ∀ x ∈ R, (f +g)(x) = f (x) + g(x) = c + d. So f +g is constant.  21. Proof. Suppose f and g are constant. So we have c, d ∈ R such that ∀ x ∈ R, f (x) = c and g(x) = d. Observe that ∀ x ∈ R, (f g)(x) = f (x)g(x) = cd. So f g is constant.  Note that f g is to be interpreted as a product as defined in Definition 1.16. 22. Proof. Suppose f and g are real functions that are bounded above. So we have M, N ∈ R such that ∀ x ∈ R, f (x) ≤ M and g(x) ≤ N . Observe that ∀ x ∈ R, (f +g)(x) = f (x) + g(x) ≤ M + N . So f +g is bounded above.  23. Proof. Suppose f is periodic. So we have p ∈ R+ such that ∀ x ∈ R, f (x + p) = f (x). Observe that ∀ x ∈ R, (f + c)(x + p) = f (x + p) + c = f (x) + c = (f + c)(x). So f + c is periodic.  The proper way to interpret f + c is explained in the paragraph after Definition 1.16. In the string of equalities above, the first results from the definition of f + c, the second from the fact that f is periodic, and the third from the definition of f + c (again). 24. Proof. Suppose f is periodic. So we have p ∈ R+ such that ∀ x ∈ R, f (x + p) = f (x). Observe that ∀ x ∈ R, (cf )(x + p) = c[f (x + p)] = c[f (x)] = (cf )(x). So cf is periodic.  25. Proof. Suppose f is increasing. Suppose x < y are real numbers. So f (x) < f (y). Since c > 0, multiplication by c gives cf (x) < cf (y). That is, (cf )(x) < (cf )(y). So cf is increasing.  To show that cf is increasing, we must show that, if x < y are real numbers,

330

CHAPTER 4. ANSWERS TO ALL EXERCISES

then (cf )(x) < (cf )(y). This is accomplished in sentences two through five of the proof. 26. Proof. Suppose f is decreasing. Suppose x < y are real numbers. So f (x) > f (y). Addition of c gives f (x) + c > f (y) + c. That is, (f + c)(x) > (f + c)(y). So f + c is increasing.  27. Proof. Let A be a square. So A is a rectangle. Hence, A is a parallelogram.  By definition, a square is a (special) rectangle. Also, a rectangle is a (special) parallelogram. 28. Proof. Let R be a rhombus. So R is a parallelogram. Hence, R is a 4-gon.  29. Proof. Let A be a rectangle and a rhombus. Hence, A is a rectangle with all sides congruent. That is, A is a square.  30. Proof. Let A be a square. Since A is a rectangle, A is a parallelogram. Since all sides are congruent, A is a rhombus.  31. Proof. Suppose a ∈ Z ∩ R+ . So a ∈ Z and a > 0. Since a ≥ 0, we have a ∈ N.  32. Proof. Suppose x ∈ [2, 3]. So 1 < 2 ≤ x ≤ 3 < 4. Thus, x ∈ (1, 4).  33. Proof. Suppose x ∈ R+ . So x > 0. That is, x ≤ 6 0. In particular, x 6< 0. c Hence, x 6∈ R− . That is, x ∈ (R− ) .  This is a subset proof. Recall that Ac denotes {x : x ∈ U and x 6∈ A}. In this case, the understood universe is U = R. c

34. Proof. Suppose x ∈ R− . So x < 0. Hence, x 6∈ [0, 1]. That is, x ∈ [0, 1] .  35. Proof. Suppose x ∈ A. Hence, x ∈ A or x ∈ B. So x ∈ A ∪ B.  The Obtaining Or argument form from Theorem 1.7 is invoked here with p = “x ∈ A” and q = “x ∈ B”. 36. Proof. Suppose x ∈ A ∩ B ∩ C. So x ∈ A and x ∈ B and x ∈ C. In particular, x ∈ A and x ∈ B. Hence, x ∈ A ∩ B.  37. Proof. Suppose A ⊆ A ∩ B and suppose x ∈ A. It follows that x ∈ A ∩ B. That is, x ∈ A and x ∈ B. In particular, x ∈ B. Therefore A ⊆ B.  The primary structure of the statement is that of an if-then statement. Hence, our proof starts by supposing its hypothesis. However, since its conclusion is the subset fact A ⊆ B, we immediately initiate a proof of that by further supposing

4.2. CHAPTER 2

331

x ∈ A. Note that the In Particular argument form from Theorem 1.7 is invoked here with q = “x ∈ A” and p = “x ∈ B”. 38. Proof. Suppose A ∪ B ⊆ B. Suppose x ∈ A. So x ∈ A ∪ B. Hence, x ∈ B. Thus, A ⊆ B.  39. Proof. Suppose A ⊆ B. Suppose x ∈ A ∩ C. So x ∈ A and x ∈ C. Since x ∈ A and A ⊆ B, we get x ∈ B. So x ∈ B and x ∈ C. Thus, x ∈ B ∩ C.  40. Proof. Suppose A ⊆ B and A ⊆ C. Suppose x ∈ A. So x ∈ B and x ∈ C. That is, x ∈ B ∩ C. Hence, A ⊆ B ∩ C.  41. Proof. Let x ∈ U. From the string of logical equivalences x ∈ (A ∩ B) ∩ C

↔ (x ∈ A ∩ B) ∧ x ∈ C ↔ (x ∈ A ∧ x ∈ B) ∧ x ∈ C ↔ x ∈ A ∧ (x ∈ B ∧ x ∈ C) ↔ x∈A∧x∈B∩C ↔ x ∈ A ∩ (B ∩ C).

it follows that x ∈ (A ∩ B) ∩ C ↔ x ∈ A ∩ (B ∩ C). . 42. Sketch.

x ∈ (A ∪ B) ∪ C

↔ (x ∈ A ∪ B) ∨ x ∈ C ↔ (x ∈ A ∨ x ∈ B) ∨ x ∈ C ↔ x ∈ A ∨ (x ∈ B ∨ x ∈ C) ↔ x∈A∨x∈B∪C ↔ x ∈ A ∪ (B ∪ C).

 43. Proof. Let x ∈ U. From the string of logical equivalences x∈A∩B

↔ x∈A∧x∈B ↔ x∈B∧x∈A ↔ x ∈ B ∩ A.

it follows that x ∈ A ∩ B ↔ x ∈ B ∩ A. . 44. Sketch.

x∈A∪B

↔ x∈A∨x∈B ↔ x∈B∨x∈A ↔ x ∈ B ∪ A.



332

CHAPTER 4. ANSWERS TO ALL EXERCISES

45. Counterexample: Let A = {1} and B = {2}. Since A × B = {(1, 2)} and B × A = {(2, 1)}, we see that A × B 6= B × A. Recall that the elements of a product of two sets are ordered pairs. At the heart of this proof is the fact that order is indeed important. That is (1, 2) 6= (2, 1), as ordered pairs. 46. Sketch.

x∈AMB



x∈A⊕x∈B



x∈B⊕x∈A



x ∈ B M A.

 47. Proof. Let x ∈ U. From the string of logical equivalences x ∈ A ∪ (B ∩ C) ↔ x ∈ A ∨ x ∈ B ∩ C ↔ x ∈ A ∨ (x ∈ B ∧ x ∈ C) ↔ (x ∈ A ∨ x ∈ B) ∧ (x ∈ A ∨ x ∈ C) ↔ (x ∈ A ∪ B) ∧ (x ∈ A ∪ C) ↔ x ∈ (A ∪ B) ∩ (A ∪ C). it follows that x ∈ A ∪ (B ∩ C) ↔ x ∈ (A ∪ B) ∩ (A ∪ C). . 48. Sketch. x ∈ A ∩ (B M C) ↔ x ∈ A ∧ x ∈ B M C ↔ x ∈ A ∧ (x ∈ B ⊕ x ∈ C) ↔ (x ∈ A ∧ x ∈ B) ⊕ (x ∈ A ∧ x ∈ C) ↔ (x ∈ A ∩ B) ⊕ (x ∈ A ∩ C) ↔ x ∈ (A ∩ B) M (A ∩ C).  49. Proof. Let x ∈ U. From the string of logical equivalences c

x ∈ (A ∩ B)

↔ x 6∈ A ∩ B ↔

¬(x ∈ A ∩ B)



¬(x ∈ A ∧ x ∈ B)



¬(x ∈ A) ∨ ¬(x ∈ B)

↔ x 6∈ A ∨ x 6∈ B ↔ x ∈ Ac ∨ x ∈ B c ↔ x ∈ Ac ∪ B c .

4.2. CHAPTER 2

333 c

it follows that x ∈ (A ∩ B) ↔ x ∈ Ac ∪ B c . . 50. Sketch. c

x ∈ (A ∪ B)



x 6∈ A ∪ B



¬(x ∈ A ∪ B)



¬(x ∈ A ∨ x ∈ B)



¬(x ∈ A) ∧ ¬(x ∈ B)



x 6∈ A ∧ x 6∈ B



x ∈ Ac ∧ x ∈ B c



x ∈ Ac ∩ B c .



Section 2.3 1. Proof. (→) Suppose x ∈ R− . So x < 0. Multiplication by −1 gives −x > 0. That is, −x ∈ R+ . (←) Suppose −x ∈ R+ . So −x > 0. Multiplication by −1 gives x = (−1)(−x) < 0. That is, x ∈ R− .  2. Proof. (→) Suppose x ∈ [−1, 2). That is, −1 ≤ x < 2. Multiplication by −1 gives −2 < −x ≤ 1. Thus, −x ∈ (−2, 1]. (←) Suppose −x ∈ (−2, 1]. That is, −2 < −x ≤ 1. Multiplication by −1 gives −1 ≤ x < 2. Thus, x ∈ [−1, 2).  3. Proof. Let x ∈ R. (→) Suppose x = 2x. So 0 = 2x − x. That is, x = 0. (←) Suppose x = 0. Observe that 0 = 2(0).  4. Proof. (→) Suppose x+1 x = 2. So x + 1 = 2x. Hence, x = 1. (←) Suppose 1+1 x = 1. So x+1 x = 1 = 2.  5. Proof. (→) Suppose x3 > 0. Note x 6= 0 (since 03 = 0). So x2 > 0 and 1 1 3 x2 > 0. Multiplying both sides of x > 0 by x2 gives x > 0. (←) Suppose 2 2 x > 0. Since x > 0, multiplication by x gives x3 > 0.  6. Proof. Let x ∈ R+ . That is, x > 0. (→) Suppose x2 < x. Division by x gives x < 1. (←) Suppose x < 1. Multiplication by x gives x2 < x.  7. Proof. Let x ∈ R. (→) Suppose 4 − x < 2. So 4 < 2 + x. Hence, 2 < x. (←) Suppose x > 2. So x + 2 > 4. Thus, 2 > 4 − x.  8. Proof. Let x ∈ R+ . That is, x > 0. (→) Suppose x3 = x. Division by x gives x2 = 1. Since x > 0, it follows that x = 1. (←) Suppose x = 1. Observe that x3 = x.  9. Proof. Let x ∈ R. (→) Suppose x4 − 16 = 0. So (x2 + 4)(x2 − 4) = 0.

334

CHAPTER 4. ANSWERS TO ALL EXERCISES

Since x2 + 4 > 0, it must be that x2 − 4 = 0. (←) Suppose x2 − 4 = 0. So (x2 + 4)(x2 − 4) = 0. That is, x4 − 16 = 0.  √ 10. Proof. (→) Suppose x = √6 − x. So x2 = 6 − x. That is, (x + 3)(x − 2) = x2 + x − 6 = 0. Since −3 6= 9, it follows that x = 2. (←) Suppose x = 2. √ Observe that x = 6 − x.  11. Proof. (→) Done in Exercise 15 from Section 2.2. (←) Suppose 2f is constant. So we have c ∈ R such that ∀ x ∈ R, 2f (x) = c. Therfore, ∀ x ∈ R, f (x) = 2c . So f is constant.  12. Proof. Let f be a real function. (→) Suppose we have c ∈ R such that ∀ x ∈ R, f (x) = c. Suppose x, y ∈ R. So f (x) = c = f (y). (←) Suppose ∀ x, y ∈ R, f (x) = f (y). Let c = f (0). Suppose x ∈ R. So f (x) = f (0) = c.  13. Proof. (→) Suppose f is bounded above. So we have M ∈ R such that ∀ x ∈ R, f (x) ≤ M . Observe that ∀ x ∈ R, (f + 1)(x) = f (x) + 1 ≤ M + 1. So f + 1 is bounded above. (←) Suppose f + 1 is bounded above. So we have M ∈ R such that ∀ x ∈ R, (f + 1)(x) ≤ M . That is, ∀ x ∈ R, f (x) + 1 ≤ M . So ∀ x ∈ R, f (x) ≤ M − 1. Thus, f is bounded above.  14. Proof. (→) Suppose f is increasing. Suppose x, y ∈ R. Since f (x) < f (y), multiplication by 2 gives 2f (x) < 2f (y). Thus, 2f is increasing. (←) Suppose 2f is increasing. Suppose x, y ∈ R. Since 2f (x) < 2f (y), division by 2 gives f (x) < f (y). Thus, f is increasing.  15. Proof. (→) Suppose f is bounded above and below. So we have M, L ∈ R such that ∀ x ∈ R, L ≤ f (x) ≤ M . Let U = max{L2 , M 2 }. It can be shown that ∀ x ∈ R, f 2 (x) ≤ U . (Hint: First argue that ∀ x ∈ R, |f (x)| ≤ max{|L|, |M |}.) So f 2 is bounded above. (←) Suppose f 2 is bounded above.√So we have M√∈ R such that ∀ x ∈ R, f 2 (x) ≤ M . It follows that ∀ x ∈ R, − M ≤ f (x) ≤ M . So f is bounded above and below.  16. Proof. Let f be a nonnegative real function. (→) Suppose f is constant. So we have c ∈ R such that ∀ x ∈ R, f (x) = c. Observe that ∀ x ∈ R, f 2 (x) = c2 . So f 2 is constant. (←) Suppose f 2 is constant. √So we have c ∈ R such that ∀ x ∈ R, f 2 (x) = c. Observe that ∀ x ∈ R, f (x) = c. So f is constant.  17. Proof. (→) Suppose f is periodic. So we have p ∈ R+ such that, ∀ x ∈ R, f (x+p) = f (x). Suppose x ∈ R. So (2f )(x+p) = 2·f (x+p) = 2·f (x) = (2f )(x). Hence, 2f is periodic. (←) Suppose 2f is periodic. So we have p ∈ R+ such that, ∀ x ∈ R, f (x + p) = f (x). Suppose x ∈ R. So f (x + p) = 21 · (2f )(x + p) = 1 2 · (2f )(x) = f (x). Hence, f is periodic.  18. Sketch. If f is periodic with period p, then

4.2. CHAPTER 2

335

(f + 1)(x + p) = f (x + p) + 1 = f (x) + 1 = (f + 1)(x). If f + 1 is periodic with period p, then f (x + p) = (f + 1)(x + p) − 1 = (f + 1)(x) − 1 = f (x).  19. Proof. (→) Suppose 20 points are scored. Let t be the number of touchdowns and f be the number of field goals scored. If t ≥ 3, then 7t ≥ 21 points are scored. So t ≤ 2. If t = 0, then 3f = 20 is impossible. If t = 1, then 7 + 3f = 20 is impossible, since 3f = 13 is impossible. So t = 2, and it must be that f = 2 to give 7t + 3f = 7(2) + 3(2) = 20. (←) Suppose t = 2 touchdowns and f = 2 field goals are scored. Hence, 7t + 3f = 7(2) + 3(2) = 20 points are scored.  20. Sketch. Let n be the number of 39¢ stamps. Consider the contribution made by 24¢ stamps f (n) = 300 − 39n for n = 0, 1, . . . , 7. Only f (4) is divisible by 24.  21. Proof. (⊆) Suppose x ∈ R+ ∩ [−2, 2], So x > 0 and −2 ≤ x ≤ 2. Hence, 0 < x ≤ 2. Thus, x ∈ (0, 2]. (⊇) Suppose x ∈ (0, 2]. So −2 < 0 < x ≤ 2. Hence, x > 0 and −2 ≤ x ≤ 2. Thus, x ∈ R+ ∩ [−2, 2].  22. −2 ≤ x ≤ 2 and x 6> 0 iff −2 ≤ x ≤ 2 and x ≤ 0 iff −2 ≤ x ≤ 0. 23. Proof. (⊆) Suppose x ∈ N \ (−1, 1). So x ∈ Z, x ≥ 0, and x 6∈ (−1, 1). Since x 6≤ −1, it must be that x ≥ 1. Hence, x ∈ Z+ . (⊇) Suppose x ∈ Z+ . So x ∈ Z and x > 0. In particular, x ≥ 1. Thus, x ∈ N and x 6∈ (−1, 1). Hence, x ∈ N \ (−1, 1).  24. n ∈ Z and −1 < n < 1 iff n = 0. 25. Proof. (⊆) Suppose x ∈ [1, 3) ∩ [2, 4). So 1 ≤ x < 3 and 2 ≤ x < 4. Hence, 2 ≤ x < 3. That is, x ∈ [2, 3). (⊇) Suppose x ∈ [2, 3). So 2 ≤ x < 3. Hence, 1 ≤ x < 3 and 2 ≤ x < 4. Thus, x ∈ [1, 3) ∩ [2, 4).  26. x ≤ 1 and x > −1 iff −1 < x ≤ 1. 27. Proof. Suppose A ⊆ B. (⊆) Suppose x ∈ A ∩ B. So x ∈ A and x ∈ B. In particular, x ∈ A. Hence A ∩ B ⊆ A. (⊇) Suppose x ∈ A. Since A ⊆ B, we get x ∈ B. Thus x ∈ A and x ∈ B. So x ∈ A ∩ B. Hence A ⊆ A ∩ B. It follows that A ∩ B = A.  28. Proof. Certainly, A ∩ U ⊆ A. Suppose x ∈ A. Since x ∈ A and x ∈ U, x ∈ A ∩ U. Hence, A ⊆ A ∩ U, as well.  29. Proof. (⊆) Suppose x ∈ (A \ C) ∩ B. So x ∈ A \ C and x ∈ B. Hence x ∈ A, x 6∈ C, and x ∈ B. Since x ∈ B and x 6∈ C, we have x ∈ B \ C. Thus x ∈ A and x ∈ B \ C. That is x ∈ A ∩ B \ C. (⊇) Essentially, reverse the previous argument. 

336

CHAPTER 4. ANSWERS TO ALL EXERCISES

30. Proof. Suppose C ⊆ A ∩ B. (⊆) Suppose x ∈ C ∩ A. So x ∈ C and x ∈ A. Since x ∈ C, x ∈ B. Thus, x ∈ C ∩ B. Therefore, C ∩ A ⊆ C ∩ B. Similarly, C ∩ B ⊆ C ∩ A.  31. Proof. Suppose A ∩ B = A ∩ C. (⊆) Suppose x ∈ A ∩ B ∩ C. So x ∈ A, x ∈ B, and x ∈ C. Since x ∈ A and x ∈ B, we have x ∈ A ∩ B. (⊇) Suppose x ∈ A ∩ B. Since A ∩ B = A ∩ C, we have x ∈ A ∩ C. So x ∈ A and x ∈ B. Also, x ∈ A and x ∈ C. Thus x ∈ A, x ∈ B, and x ∈ C. So x ∈ A ∩ B ∩ C.  32. Proof. Suppose A ⊆ B, A ⊆ C, A ⊆ D, and C ∩ D ⊆ A. (⊆) Suppose x ∈ A. So x ∈ B, x ∈ C, and x ∈ D. Hence, x ∈ B ∩ C ∩ D. (⊇) Suppose x ∈ B ∩ C ∩ D. Since x ∈ C ∩ D, we have x ∈ A.  33. Proof. (⊆) Suppose x ∈ (A \ B) \ C. So x ∈ A \ B and x 6∈ C. So x ∈ A and c x ∈ B c ∩ C c . Since x 6∈ (B c ∩ C c ) , De Morgan’s Law tells us that x 6∈ B ∪ C. Since x ∈ A and x 6∈ B ∪ C, we have x ∈ A \ (B ∪ C). (⊇) Essentially, reverse the previous argument.  34. Sketch. (⊆) Suppose (x, y) ∈ A × (B \ C). So x ∈ A and y ∈ B \ C. That is, y ∈ B and y 6∈ C. Hence, (x, y) ∈ A × B and (x, y) 6∈ A × C. Therefore, (x, y) ∈ (A × B) \ (A × C). (⊇) Similar.  35. Proof. Suppose A ⊆ B and (x, y) ∈ A2 . Since x, y ∈ A and A ⊆ B, it follows that x, y ∈ B. Hence, (x, y) ∈ B 2 .  Recall that A2 = A × A. So elements of A2 are ordered pairs. 36. Sketch. c

(x, y) ∈ (A × U)

↔ (x, y) 6∈ A × U ↔ x 6∈ A ∨ y 6∈ U ↔ x 6∈ A ↔ x ∈ Ac ↔ (x, y) ∈ Ac × U.

 37. Proof. (⊆) Suppose (x, y) ∈ (U × B) \ (A × B). So (x, y) ∈ U × B and (x, y) 6∈ A × B. We have (x ∈ U and) y ∈ B. Since (x, y) 6∈ A × B, it must be that x 6∈ A. That is, x ∈ Ac . Hence (x, y) ∈ Ac ×B. (⊇) Suppose (x, y) ∈ Ac ×B. So x ∈ Ac and y ∈ B. Since x 6∈ A, we get (x, y) 6∈ A × B. Since (x, y) ∈ U × B, we have (x, y) ∈ (U × B) \ (A × B). Thus, (U × B) \ (A × B) = Ac × B.  38. Proof. Suppose A ⊆ B and C ⊆ D. Suppose (x, y) ∈ A × C. So x ∈ A and y ∈ C. Hence, x ∈ B and y ∈ D. Thus, (x, y) ∈ B × D. 

4.2. CHAPTER 2

337

39. Proof. Let x, y ∈ U. From the string of equivalences (x, y) ∈ A × (B ∩ C) ↔

x∈A ∧ y ∈B∩C

↔ ↔

x∈A ∧ y∈B ∧ y∈C x ∈ A, y ∈ B ∧ x ∈ A, y ∈ C



(x, y) ∈ A × B ∧ (x, y) ∈ A × C



(x, y) ∈ (A × B) ∩ (A × C),

it follows that (x, y) ∈ A × (B ∩ C) ↔ (x, y) ∈ (A × B) ∩ (A × C). Hence, A × (B ∩ C) = (A × B) ∩ (A × C).  40. Proof. Suppose (x, y) ∈ (B \ A) × (D \ C). So x ∈ B \ A and y ∈ D \ C. That is, x ∈ B, x 6∈ A, y ∈ D, and y 6∈ C. So (x, y) ∈ B × D and (x, y) 6∈ A × C. Hence, (x, y) ∈ (B × D) \ (A × C).  41. Proof. (→) Suppose A × C = B × C. (⊆) Suppose x ∈ A. Since (x, c) ∈ A × C, it follows that (x, c) ∈ B × C. So x ∈ B. (⊇) Similar. (←) Suppose A = B. (⊆) Suppose (x, y) ∈ A × C. So x ∈ A and y ∈ C. Since A = B, we have x ∈ B. So (x, y) ∈ B × C. (⊇) Similar.  42. Proof. (→) Suppose P(A) = P(B). Since A ∈ P(A) = P(B), we have A ⊆ B. Since B ∈ P(B) = P(A), we have B ⊆ A. Hence, A = B. (←) Suppose A = B. Hence, P(A) = P(B).  43. Proof. Suppose S ∈ P(Ac ) \ {∅}. So S ⊆ Ac and S 6= ∅. Since S 6= ∅, we have some x ∈ S. Since S ⊆ Ac , we have x ∈ Ac . That is, x ∈ S and x 6∈ A. So c S * A. Therefore, S 6∈ P(A). That is, S ∈ P(A) .  44. Sketch. Suppose (C, D) ∈ P(A) × P(B) So C ∈ P(A) and D ∈ P(B). That is, C ⊂ A and D ⊂ B. By Exercise 38, C × D ⊆ A × B. Therefore, C × D ∈ P(A × B). 45. Proof. Suppose S ∈ P(A ∩ B). That is, S ⊆ A ∩ B. Since A ∩ B ⊆ A, we get S ⊆ A. Since A ∩ B ⊆ B, we get S ⊆ B. So S ∈ P(A) and S ∈ P(B). Thus S ∈ P(A) ∩ P(B). Hence P(A ∩ B) ⊆ P(A) ∩ P(B).  46. Proof. Suppose S ∈ P(A \ B) \ {∅}. So S 6= ∅ and S ⊆ A \ B. Hence, S ⊆ A. We have some x ∈ S. Since x 6∈ B, it follows that S * B. Thus, S ∈ P(A) \ P(B).  47. Let r be the average speed over the entire trip, let r1 be the average speed over the first lap, and let r2 be the average speed over the second lap.

338

CHAPTER 4. ANSWERS TO ALL EXERCISES

1 r2 = r = 60 if and only if Observe that 2r = r11 + r12 . (a) r = 48 mph. (b) r2r 1 +r2 30r2 r1 = r2 −30 > 30. That is, let t be time over the entire trip, let t1 be the time over the first lap, and let t2 be the time over the second lap. Note that 2 is the distance over the entire trip, and 1 is the distance over each lap. Now use the fact that rate times time equals distance to substitute for time in the equation t = t1 + t2 . The rest is algebra.

48. (a) R2 = 40. (b) R =

R1 R2 R1 +R2

=

10R2 10+R2

= 10 ·

R2 10+R2

< 10.

Section 2.4 1. Proof. Suppose not. Let s be the smallest element of (1, 2). Observe that s+1 2 is a smaller element of (1, 2). (Think about it.) This is a contradiction.  That is, since 1 < s, it follows that 2 = 1 + 1 < s + 1 < s + s = 2s. So 2s 1 = 22 < s+1 2 < 2 = s. 2. Proof. Suppose not. So there is some smallest element s ∈ R. However, s − 1 is a smaller element of R, a contradiction.  3. Proof. Suppose not. Let L be the largest element of N. However, L + 1 is a larger element of N. This is a contradiction.  4. Proof. Suppose not. So there is some largest element m ∈ (1, 2). Hence, 1 < m < 2. However, m+2 is a larger element of (1, 2), a contradiction.  2 5. Proof. Let A be a set, and suppose A ∩ ∅ = 6 ∅. So we have an element x ∈ A ∩ ∅. Hence, x ∈ A and x ∈ ∅. However, x ∈ ∅ is impossible. This is a contradiction. So it must be that A ∩ ∅ = ∅.  6. Proof. Suppose not. So there some element x ∈ A 6= ∅. Since A ⊆ ∅, we have x ∈ ∅, a contradiction.  7. Sketch. Suppose (0, 1] has finite cardinality n. The list numbers in (0, 1] is then too long.  There cannot be n + 1 elements in a set of cardinality n.

1 1 1 2 , 22 , . . . , 2n+1

of

8. Sketch. Suppose Z × Z has finite cardinality n. The list of elements (1, 1), (1, 2), . . . , (1, n+1) is then too long.  √ 9. Sketch. Suppose {(x, y) : x, y ∈ R and y = x} has finite cardinality n. The list of elements (1, 1), (4, 2), . . . , ((n + 1)2 , n + 1) is then too long.  There cannot be n + 1 elements in a set of cardinality n.

4.2. CHAPTER 2

339

10. Sketch. Suppose that set has finite cardinality n. The list of elements 12 , 22 , . . . , (n + 1)2 is then too long.  11. Proof. Suppose (1, 0) 6= ∅. So there is a real number x such that 1 < x < 0. In particular, 1 < 0. This is a contradiction.  12. Sketch. If x ∈ (0, −1), then 0 < x < −1, which is impossible.  13. Proof. Suppose R+ ∩ R− 6= ∅. So there is a real number x such that x ∈ R+ and x ∈ R− . However, it is impossible to have both x > 0 and x < 0.  14. Sketch. If n ∈ Z− ∩ N, then 0 ≤ n < 0, which is impossible.  15. (a) Sketch. Suppose to the contrary that Tracy wins the election. So every other candidate must have also received fewer than n1 of the votes. However, the total of the fractions of the votes for the n candidates would then be less than n · n1 = 1, which is impossible.  (b) Sketch. Suppose to the contrary that Tracy comes in last. So every other candidate must have also received more than n1 of the votes. However, the total of the fractions of the votes for the n candidates would then be more than n · n1 = 1, which is impossible.  That is, say there are m candidates, and for each 1 ≤ i ≤ m, the fraction of the votes received by candidate i is fi . Hence, 1 = f1 + f2 + · · · + fm . 16. (a) Sketch. Suppose to the contrary that each box contains at most one item. So there must be at least as many boxes as items. That is, m ≥ n, a contradiction.  (b) Sketch. Suppose to the contrary that no box is empty. So there must be at least as many items as boxes. That is, n ≥ m, a contradiction.  17. Proof. Suppose b > a are real numbers. Since (a, b) 6= ∅. 

a+b 2

∈ (a, b), we see that

18. Sketch. Suppose 0 < a < b. Hence, 0 < a2 < ab < b2 .  19. Proof. Suppose A 6= ∅. So we have an element x ∈ A. Thus (x, x) ∈ A2 . Hence A2 6= ∅.  Recall that elements of A2 have the form (x, y). Here, x = y is chosen. 20. Proof. Suppose A = B. (⊆) Suppose (x, y) ∈ A2 . So x, y ∈ A. Since A ⊆ B, we have x, y ∈ B. Thus, (x, y) ∈ B 2 . (⊇) Similar. Hence, A2 = B 2 . 

340

CHAPTER 4. ANSWERS TO ALL EXERCISES

21. Proof. Suppose A ⊆ B. Suppose (x, y) ∈ A2 . Since x ∈ A and y ∈ A and A ⊆ B, we get x ∈ B and y ∈ B. That is, (x, y) ∈ B 2 .  22. Proof. Suppose A ⊆ B. Suppose S ∈ P(A). Since S ⊆ A and A ⊆ B, it follows that S ⊆ B. That is, S ∈ P(B). Hence, P(A) ⊆ P(B).  23. Proof. Suppose A × B 6= ∅. So we have some element (x, y) ∈ A × B. In particular, x ∈ A. So A 6= ∅.  24. Proof. Suppose A = ∅. By Exercise 23, A2 = A × A = ∅.  25. Proof. Suppose A = B. So A ⊆ B and B ⊆ A. In particular A ⊆ B.  26. Proof. Suppose |A| = 0. So A = ∅. Since P(A) = {∅}, we have |P(A)| = 1.  27. The contrapositive “if A = B then P(A) = P(B)” is easy to see. 28. Proof. Suppose C ⊆ A and C ⊆ B. Hence, C ⊆ A ∩ B ⊆ A ∪ B.  29. Proof. Suppose that A is finite and B is finite. Say A has m elements A = {a1 , a2 , . . . , am }, and B has n elements B = {b1 , b2 , . . . , bn }. Observe that A×B = {(a1 , b1 ), (a1 , b2 ), · · · , (a1 , bn ), (a2 , b1 ), (a2 , b2 ), · · · , (a2 , bn ), .. .. . . (am , b1 ), (am , b2 ), · · · , (am , bn )} has mn elements. Thus, A × B is finite.  30. Sketch. Suppose A is finite. Since |Ac | = |U| − |A|, we see that Ac is finite.  31. Proof. Suppose to the contrary that x ∈ A, x 6∈ A ∩ B, and x ∈ B. Thus, x ∈ A ∩ B and x 6∈ A ∩ B, a contradiction.  32. Use the fact that x ∈ A ∪ B iff x 6∈ Ac ∩ B c , and apply Exercise 31. 33. Proof. Suppose to the contrary that there are two distinct lines l and m that intersect in two or more points. That is, we have distinct points P and Q in their intersection. Since both l and m contain P and Q, we must have l = m, by the uniqueness assertion in Euclid’s First Postulate.  34. Proof. Suppose k, l, and m are distinct lines with k parallel to l and l parallel to m. Suppose to the contrary that k is not parallel to m. So we have

4.2. CHAPTER 2

341

a point P common to k and m. Since P is on k, it cannot be on l. So k must be the unique line through P and parallel to l. Similarly m must be the unique line through P and parallel to l. That k = m is a contradiction.  35. (a) Proof. Suppose f is not decreasing. So we have x, y ∈ R with x < y and 0 < f (x) ≤ f (y). Hence, f 2 (x) ≤ f 2 (y). So f 2 is not decreasing.  (b) Yes, by Exercise 18. 36. (a) This is the ( contrapositive of Exercise 17 from Section 2.2. (b) No. 1 if x ≥ 0, Consider f (x) = −1 if x < 0. 37. Proof. Suppose f is bounded above. So we have M ∈ R such that ∀ x ∈ R, f (x) ≤ M . Observe that ∀ x ∈ R, (f + 100)(x) = f (x) + 100 ≤ M + 100. So f + 100 is bounded above.  38. Sketch. Suppose below by 2L. 

1 2f

is bounded below by L. It follows that f is bounded

39. Proof. Suppose f is increasing. (Goal: f is not periodic.) Suppose p ∈ R+ . Since f (0 + p) > f (0), it cannot be that f is periodic.  Note that a direct proof is also straightforward. 40. Sketch. Suppose f is periodic. So we have p ∈ R+ such that f (p) = f (0). Hence, f is not decreasing.  41. The converse, “If f is constant, then f 2 is constant,” is easy to prove. Proof. Suppose f is constant. So we have some c ∈ R such that, ∀ x ∈ R, f (x) = c. Suppose x ∈ R. So f 2 (x) = f (x)f (x) = c2 . Since c2 ∈ R, we see that f 2 is constant.  42. Sketch. Suppose 2f is increasing. Suppose x < y. We have f (x) = 12 2f (x) < 12 2f (y) = f (y).  43. We prove the contrapositive. Proof. Let x ∈ R. Suppose x 6= 0. So x2 > 0. In particular, x2 6= 0.  44. Sketch. If x = 1, then x2 = 1.  45. Proof. Suppose not. So we have some x > 0 with This is a contradiction.  46. Sketch. Suppose contradiction. 

1 x

1 x

< 0. Hence 1 = x· x1 < 0.

< 0 and x ≥ 0. It follows that 1 =

47. Proof. Suppose not. So we have some 0 < x < y with 0
0. |x| x x x = = −1 ↔ x < 0. |x| −x  29. Sketch. 2

2

x + 2ax + a = 0 ↔ x =

−2a ±



4a2 − 4a2 = −a. 2

x + 3 = 0 ↔ x = −3. Either −a = −3 or not.  That is, the only way for there to be exactly one root is to have a = 3. 30. Sketch. Case 1 : a < 0. x2 − a = 0 iff x2 = a < 0, which is impossible.√Case 2 : a = 0. x2 = 0 iff x = 0. Case 3 : a > 0. x2 − a = 0 iff x2 = a iff x = ± a.  31. Proof. If x ≥ 0, then |x|2 = x2 . If x < 0, then |x|2 = (−x)2 = (−1)2 x2 = 1 · x2 = x2 .  32. Sketch. Note that (x + 2)(x − 3) = x2 − x − 6. (x + 2)(x − 3) ≤ 0



2 ≤ x ≤ 3.

(x + 2)(x − 3) > 0



x < −2 or 3 < x.

In the first case, −(x2 − x − 6) = 6 + x − x2 .  33. Sketch. If x, y ≥ 0, then |xy| = xy = |x||y|. If x ≤ 0, y ≥ 0, then |xy| = −xy = (−x)y = |x||y|. If x ≥ 0, y ≤ 0, then |xy| = −xy = x(−y) = |x||y|. If x, y ≤ 0, then |xy| = xy = (−x)(−y) = |x||y|.  In the left-most equalities above, we are using the facts that the product of two positives is positive, the product of two negatives is positive, and the product of a positive with a negative is negative. 34. Proof. Suppose |x| < y. It follows that y > 0. Case 1 : x ≥ 0. So −y < 0 ≤ x = |x| < y. Case 2 : x < 0. So −y < −|x| = −(−x) = x < 0 < y.  35. Proof. (→) We prove the contrapositive. Suppose −1 ≤ x ≤ 1. In both of the cases, x ≥ 0 and x < 0, we get that x2 ≤ 1. Squaring both sides again gives x4 ≤ 1. (←) Suppose x < −1 or x > 1. In both cases, we get x2 > 1. Hence x4 > 1.  36. Sketch. x2 − x − 2 = (x − 2)(x + 1). Consider the three cases, x < −1, −1 ≤ x ≤ 2, and 2 < x. 

4.2. CHAPTER 2

347

37. Proof. Suppose x2 = y 2 . So x2 − y 2 = 0. Hence, (x + y)(x − y) = 0. So x + y = 0 or x − y = 0. Therefore, x = −y or x = y. That is, x = ±y.  38. Proof. (→) Suppose x = y. Certainly, x ≤ y and y ≤ x. (←) Suppose x 6= y. By the Trichotomy Law, x > y or y > x. By De Morgan’s Law, x ≤ y and y ≤ x.  39. Sketch. If xy ≥ 0, then |x + y| = |x| + |y|. If xy < 0, then |x + y| ≤ max{|x|, |y|} ≤ |x| + |y|.  The first case happens when x, y ≥ 0 or x, y ≤ 0. The second case happens when x ≥ 0, y ≤ 0 or x ≤ 0, y ≥ 0. 40. Proof. By the Triangle Inequality, |x| = |(x − y) + y| ≤ |x − y| + |y|. So |x| − |y| ≤ |x − y|. Similarly, |y| = |(y − x) + x| ≤ |y − x| + |x| = |x − y| + |x|. So −(|x| − |y|) = |y| − |x| ≤ |x − y|. Note that ||x| − |y|| is one of |x| − |y| or −(|x| − |y|). Hence, ||x| − |y|| ≤ |x − y|.  . If n ≥ 7, then 128 < An < 180 and no multiple 41. Sketch. Let An = 180(n−2) n of An can equal 360. If n = 5, then no multiple of A5 = 108 can equal 360. Equilateral triangles (n = 3), squares (n = 4), and regular hexagons (n = 6) certainly do tile the floor as shown.  TT qTT  T T   T T

q

HH q H H HH

42. (a) If a > b, then c2 = 4( 12 ab) + (a − b)2 = a2 + b2 . If a = b, then S shrinks to a point and c2 = 4( 21 a · a) = a2 + a2 = a2 + b2 . (b) (a + b)2 = 4( 21 ab) + c2 . So subtract 2ab from both sides.

Review 1. Sketch. x2 + y 2 = 25 fits each point.  Plugging the points into the general form (x − h)2 + (y − k)2 = r2 , we get (3 − h)2 + (4 − k)2 = r2 , so 25 − 6h + h2 − 8k + k 2 = r2 , (4 − h)2 + (−3 − k)2 = r2 , so 25 − 8h + h2 + 6k + k 2 = r2 , (−5 − h)2 + (−k)2 = r2 , so 25 + 10h + h2 + k 2 = r2 . The first equation minus the third equation gives −16h − 9k = 0. The second equation minus the third equation gives −18h + 6k = 0. Hence h = k = 0. Substituting this into any of the equations gives 25 = r2 . So r = 5. 2. Sketch. x4 − 2x2 − 8 = (x2 + 2)(x2 − 4) and x2 + 2 6= 0.  The point is that the roots of x4 − 2x2 − 8 are the roots of x2 + 2 together with the roots of x2 − 4. However, x2 + 2 has no roots. The roots of x2 − 4 are certainly 2 and −2.

348

CHAPTER 4. ANSWERS TO ALL EXERCISES

3. Notice that n = 25 − m. So m(25 − m) = 100. This becomes the quadratic equation 0 = m2 − 25m + 100, which has solutions m = 5 or 20. Proof. Let m = 20, n = 5. Observe that mn = 20 · 5 = 100 and m + n = 20 + 5 = 25.  4. Proof. Let x = 2. Observe that 2x = 22 = x2 .  5. Sketch. Let A = ∅, B = C = Z.  There are infinitely many different answers that will work. In fact, any choice with A ⊂ B ⊆ C will work. 6. Sketch. Let A = {1, 2}.  Note that |P(A)| = 2|A| and |A2 | = |A|2 . So, by Exercise 4, we can pick |A| = 2. Hence, any set A with 2 elements will work. 7. An 85 on the third test yields an average of 75. 3 = 75. This gives t3 = 85. We want 80+60+t 3 ( 1 if x ≥ 0, 8. False. Consider f (x) = −1 if x < 0. ( 12 = 1 if x ≥ 0, 2 Observe that f (x) = . 2 (−1) = 1 if x < 0. Since ∀ x ∈ R, f 2 (x) = 1, we see that f 2 is constant. Certainly, f is not constant. 9. Sketch. Let A = B = Z, C = ∅.  The point is that we can make A ⊆ B ∪ C by just forcing A ⊆ B. As long as we pick A 6= ∅, we can then pick C so that A * C. 10. Sketch. Let A = B = {1}, C = ∅. Observe that A M (B ∩ C) = {1} and (A M B) ∩ (A M C) = ∅.  11. Proof. Observe that (−1)4 = 1 = (−1)2 , 04 = 0 = 02 , and 14 = 1 = 12 .  12. Proof. If A = {1}, then A3 = {(1, 1, 1)} and |A3 | = 1. If A = {2}, then A3 = {(2, 2, 2)} and |A3 | = 1.  13. Proof. Since (−1, 0) ∈ Z × N, and (−1, 0) 6∈ N × Z (because −1 6∈ N), it follows that Z × N 6= N × Z. 14. Proof. Let n ∈ Z+ . So n ≥ 1. Hence, n · n ≥ n · 1. That is, n2 ≥ n.  15. Proof. Suppose x ∈ [2, 4]. So 2 ≤ x ≤ 4. Hence, 4 = 22 ≤ x2 ≤ 42 = 16. That is, x2 ∈ [4, 16]. 

4.2. CHAPTER 2

349

16. Proof. Suppose f is constant. So we have c ∈ R such that ∀ x ∈ R, f (x) = c. Observe that ∀ x ∈ R, (f + 1)(x) = f (x) + 1 = c + 1. So f + 1 is constant.  17. Proof. Suppose f is periodic and g is constant. So we have p ∈ R+ and c ∈ R such that ∀ x ∈ R, f (x + p) = f (x) and g(x) = c. Observe that ∀ x ∈ R, (f +g)(x+p) = f (x+p)+g(x+p) = f (x)+c = f (x)+g(x) = (f +g)(x). So f + g is periodic.  18. Proof. Suppose f is bounded above and g is bounded below. So we have M, L ∈ R such that ∀ x ∈ R, f (x) ≤ M and g(x) ≥ L. Note that ∀ x ∈ R, −g(x) ≤ −L. Observe that ∀ x ∈ R, (f − g)(x) = f (x) − g(x) = f (x) + (−g(x)) ≤ M + (−L) = M − L. So f − g is bounded above.  19. Proof. Let t1 , t2 , t3 represent the test scores, in order. Suppose t1 ≤ 40. = 80.  Since t2 ≤ 100 and t3 ≤ 100, we have an average of at most 40+100+100 3 20. Proof. Suppose A ⊆ C. Suppose x ∈ A ∩ B. So x ∈ A and x ∈ B. Since x ∈ A and A ⊆ C, we get x ∈ C. Thus A ∩ B ⊆ C.  21. Proof. Suppose x ∈ A \ B. So x ∈ A and x 6∈ B. In particular, x ∈ A.  22. Proof. Let x ∈ U. From the string of equivalences c

x ∈ (A \ B)



¬[x ∈ A \ B]



¬[x ∈ A ∧ x 6∈ B]



x 6∈ A ∨ x ∈ B



x ∈ Ac ∨ x ∈ B



x ∈ Ac ∪ B.

it follows that c

x ∈ (A \ B) ↔ x ∈ Ac ∪ B. c

Hence (A \ B) = Ac ∪ B.  23. Proof. Suppose A ⊂ B. Hence, we have x ∈ B with x 6∈ A. That is, x ∈ B \ A. So B \ A 6= ∅.  24. Proof. Let x ∈ R. (→) Suppose x ∈ [1, 2]. So 1 ≤ x ≤ 2. Multiplication by 2 gives 2 ≤ 2x ≤ 4. Hence 2x ∈ [2, 4]. (←) Suppose 2x ∈ [2, 4]. So 2 ≤ 2x ≤ 4. Division by 2 gives 1 ≤ x ≤ 2. Hence x ∈ [1, 2].  25. Sketch. 3x − 2 ∈ (1, 4) iff 1 < 3x − 2 < 4 iff 1 < x < 2 iff 1 < 5 − 2x < 3 iff 5 − 2x ∈ (1, 3).  26. Sketch. x2 = y 2 iff x2 − y 2 = 0 iff (x + y)(x − y) = 0 iff x + y = 0 or x − y = 0

350

CHAPTER 4. ANSWERS TO ALL EXERCISES

iff x = −y or x = y. Since x, y ∈ R+ , it is not possible that x = −y.  Note that when y ∈ R+ , we have −y ∈ R− . Hence x = −y cannot happen when x ∈ R+ . 27. Sketch. The Trichotomy Law in Appendix A tells us that ∀ x, y ∈ R, x = y ⊕ x > y ⊕ y > x. From this it follows that ∀ x, y ∈ R, x 6= y ↔ x > y or y > x. Negating both sides of this equivalence gives the desired result.  It is important to realize that ¬[x > y] ≡ x ≤ y ≡ x < y ∨ x = y ≡ x < y ⊕ x = y. 28. Here it is more convenient to use the characterization of constant functions given in Exercise 37(b) from Section 1.3 (and proven in Exercise 12 from Section 2.3). Proof. (→) Suppose f is constant. Since, ∀ x, y ∈ R, f (x) = f (y), it follows that f is both nondecreasing and nonincreasing. (←) Suppose f is nondecreasing and nonincreasing. So, ∀ x, y ∈ R, if x ≤ y, then f (x) ≤ f (y) and f (x) ≥ f (y). By Exercise 27 it follows that ∀ x, y ∈ R, f (x) = f (y). So, f is constant.  29. Proof. (→) Done in Exercise 17 from Section 2.2. (←) Suppose f 2 is periodic. So we have p ∈ R+ such that ∀ x ∈ R, f 2 (x + p) = f 2 (x). Since f is nonnegative, ∀ x ∈ R, f (x + p) ≥ 0 and f (x) ≥ 0. From Exercise 26 it follows that ∀ x ∈ R, f (x + p) = f (x). So f is periodic.  30. Proof. (→) Suppose A2 = B 2 . (⊆) Suppose x ∈ A. So (x, x) ∈ A2 = B 2 . Hence, x ∈ B. (⊇) Similar. So A = B. (←) Suppose A = B. (⊆) Suppose (x, y) ∈ A2 . So x ∈ A = B and y ∈ A = B. Hence (x, y) ∈ B 2 . (⊇) Similar. So A2 = B 2 .  Recall that A2 = A × A and (u, w) ∈ C × D iff u ∈ C and w ∈ D. 31. Proof. (→) Suppose A \ B ⊆ C. Suppose x ∈ A. Case 1 : x ∈ B. We have x ∈ B ∪ C. Case 2 : x 6∈ B. So x ∈ A \ B. Hence x ∈ C. We have x ∈ B ∪ C. In both cases x ∈ B ∪ C. (←) Suppose A ⊆ B ∪ C. Suppose x ∈ A \ B. So x ∈ A and x 6∈ B. Since x ∈ A, we have x ∈ B ∪ C. Since x 6∈ B, it must be that x ∈ C. Hence A \ B ⊆ C.  32. Proof. Let t1 , t2 , . . . , tn be the test scores. (→) Suppose some test score k n is at most (n−1)100+t < tk is less than 100. Then the average t1 +t2 +···+t n n (n−1)100+100 = 100. (←) Suppose t1 = t2 = · · · = tn = 100. The average is n then n(100) = 100.  n 33. Proof. (⊆) Suppose x ∈ (A ∩ B) \ C. So x ∈ A and x ∈ B and x 6∈ C. Since x ∈ A and x 6∈ C, we have x ∈ A \ C. Since x ∈ B and x 6∈ C, we have x ∈ B \ C. So x ∈ (A \ C) ∩ (B \ C). (⊇) Suppose x ∈ (A \ C) ∩ (B \ C). So

4.2. CHAPTER 2

351

x ∈ A and x 6∈ C and x ∈ B (and x 6∈ C). Since x ∈ A and x ∈ B, we have x ∈ A ∩ B. Since x ∈ A ∩ B and x 6∈ C, we have x ∈ (A ∩ B) \ C.  34. Proof. (⊆) Suppose (x, y) ∈ A × (B ∪ C). So x ∈ A and y ∈ B ∪ C. That is, y ∈ B or y ∈ C. Case 1 : y ∈ B. We get (x, y) ∈ A × B. Case 2 : y ∈ C. We get (x, y) ∈ A × C. In both cases, (x, y) ∈ (A × B) ∪ (A × C). (⊇) Suppose (x, y) ∈ (A × B) ∪ (A × C). So (x, y) ∈ A × B or (x, y) ∈ A × C. Case 1 : (x, y) ∈ A × B. We get y ∈ B. So y ∈ B ∪ C. Thus, (x, y) ∈ A × (B ∪ C). Case 2 : (x, y) ∈ A × C. We get y ∈ C. So y ∈ B ∪ C. Thus, (x, y) ∈ A × (B ∪ C). In both cases, (x, y) ∈ A × (B ∪ C).  35. Proof. Suppose S ∈ P(A) ∪ P(B). So S ∈ P(A) or S ∈ P(B). Case 1 : S ∈ P(A). We have S ⊆ A. Since A ⊆ A ∪ B, we get S ⊆ A ∪ B. Case 2 : S ∈ P(B). We have S ⊆ B. Since B ⊆ A ∪ B, we get S ⊆ A ∪ B. In both cases, S ⊆ A ∪ B. That is S ∈ P(A ∪ B).  36. Sketch. Suppose not. Let L be the largest element. Observe that larger element of R− . (Think about it.) This is a contradiction.  Note that L < L2 < 0, since 2L < L < 0.

L 2

is a

37. Proof. Suppose not. Let s be the smallest element of (−1, 1). However, −1+s is a smaller element of (−1, 1). This is a contradiction.  2 < −1+s < −1+1 = 0 < 1. If −1 < s < 1, then −1 = −1+(−1) 2 2 2 38. Proof. Suppose p ∈ R+ . Observe that f (0 + p) = p 6= 0 = f (0). So f cannot be periodic.  That is, p cannot be its period (and p is arbitrary). 39. Proof. Suppose M ∈ R. Let L = max{M, 2}. Note that L > 1. Observe that f (L) = L2 > L ≥ M . So f cannot be bounded above and therefore cannot be bounded.  That is, M cannot be an upper bound (and M is arbitrary). 40. Proof. Suppose x < 0. Repeated multiplication by x gives x2 > 0, x3 < 0, x4 > 0, and finally x5 < 0.  41. Proof. Suppose A × ∅ = 6 ∅. So we have (x, y) ∈ A × ∅. Thus, in particular, y ∈ ∅. This is a contradiction.  42. Proof. Suppose A∩B 6= ∅. So we have some x ∈ A∩B. Hence, in particular, x ∈ A. So A 6= ∅.  43. Proof. Suppose A 6= ∅ and B 6= ∅. So we have some x ∈ A and y ∈ B. Hence, (x, y) ∈ A × B. Therefore, A × B 6= ∅. 

352

CHAPTER 4. ANSWERS TO ALL EXERCISES

44. Proof. Suppose B = C. (⊆) Suppose (x, y) ∈ A × B. So x ∈ A and y ∈ B = C. Hence, (x, y) ∈ A × C. (⊇) Similar. Therefore, A × B = A × C.  45. We prove the contrapositive. Proof. Let A be a set. Suppose A is finite. So |A| = n for some n ∈ N. Since |P(A)| = 2n ∈ N, we see that P(A) is finite. 46. Proof. Let f be a real function, and suppose that f is constant. Hence, we have c ∈ R such that ∀ x ∈ R, f (x) = c. Observe that ∀ x ∈ R, f 2 (x) = [f (x)]2 = c2 . Since c2 ∈ R and ∀ x ∈ R, f 2 (x) = c2 , it follows that f 2 is constant.  47. Proof. Let t1 , t2 , t3 , t4 be the test grades. Suppose Erik has no test grade of 3 +t4 < 4(60) = 60. at least 60. Since t1 , t2 , t3 , t4 < 60, Erik’s average is t1 +t2 +t 4 4 So Erik does not pass.  48. Proof. Let x ∈ U. From the string of logical equivalences c

x ∈ (A ∩ B ∩ C)

↔ x 6∈ A ∩ B ∩ C ↔

¬(x ∈ A ∩ B ∩ C)



¬(x ∈ A ∧ x ∈ B ∧ x ∈ C)



¬(x ∈ A) ∨ ¬(x ∈ B) ∨ ¬(x ∈ C)

↔ x 6∈ A ∨ x 6∈ B ∨ x 6∈ C ↔ x ∈ Ac ∨ x ∈ B c ∨ x ∈ C c ↔ x ∈ Ac ∪ B c ∪ C c c

it follows that x ∈ (A ∩ B ∩ C) ↔ x ∈ Ac ∪ B c ∪ C c . . 49. Proof. (⊆) Suppose x ∈ (A \ C) ∪ (B \ C). So x ∈ A \ C or x ∈ B \ C. Case 1 : x ∈ A \ C. So x ∈ A and x 6∈ C. Since A ⊆ A ∪ B, we have x ∈ A ∪ B. Thus, x ∈ (A ∪ B) \ C. Case 2 : x ∈ B \ C. So x ∈ B and x 6∈ C. Since B ⊆ A ∪ B, we have x ∈ A ∪ B. Thus, x ∈ (A ∪ B) \ C. (⊇) Suppose x ∈ (A ∪ B) \ C. So x ∈ A ∪ B and x 6∈ C. That is x ∈ A or x ∈ B. Case 1 : x ∈ A. We have x ∈ A \ C. Hence, x ∈ (A \ C) ∪ (B \ C). Case 2 : x ∈ B. We have x ∈ B \ C. Hence, x ∈ (A \ C) ∪ (B \ C).  50. Proof. Suppose x ∈ (A M B) ∩ (A M C). So x ∈ A M B and x ∈ A M C. Case 1 : x ∈ A. It must be that x 6∈ B (and x 6∈ C). In particular, x 6∈ B ∩ C. Case 2 : x 6∈ A. It must be that x ∈ B and x ∈ C. Hence, x ∈ B ∩ C. In both cases, x ∈ A M (B ∩ C).  51. Sketch. Suppose A = ∅ or B = ∅. Case 1 : A = ∅. So A × B = ∅ × B = ∅.

4.2. CHAPTER 2

353

Case 2 : B = ∅. So A × B = A × ∅ = ∅.  OR (contrapositive): Suppose A × B 6= ∅. So we have (x, y) ∈ A × B. Since x ∈ A and y ∈ B, we have A 6= ∅ and B 6= ∅. 52. Proof. (→) Suppose xy > 0. So x 6= 0 and y 6= 0. Case 1 : x > 0. We see xy that y = xy x > 0. Case 2 : x < 0. We see that y = x < 0. Thus, either x, y > 0 or x, y < 0. (←) Suppose x, y > 0 or x, y < 0. Case 1 : x, y > 0. We get xy > 0. Case 2 : x, y < 0. We get xy = (−x)(−y) > 0. In both cases, xy > 0.  53. Since x2 ≥ 0, the definition of absolute value gives that |x2 | = x2 . 54. Sketch. x2 − 1 < 0 iff x2 < 1 iff −1 < x < 1. Also −(x2 − 1) = 1 − x2 .  Recall that |y| = −y if y < 0, and |y| = y if y ≥ 0. Use y = x2 − 1, which is negative when −1 < x < 1 and nonnegative otherwise. √ 55. Sketch. Since |x|2 = x2 and |x| ≥ 0, it follows that |x| = x2 .  √ The point is that, for y ≥ 0, y is the nonnegative number z such that z 2 = y. Here y = x2 and x = |x|. 56. Sketch. x2 − 6x + 8 = (x − 4)(x − 2) and, by Exercise 52, (x−4)(x−2) > 0 ↔ [(x−4) > 0 and (x−2) > 0] or [(x−4) < 0 and (x−2) < 0] ↔ [x > 4 and x > 2] or [x < 4 and x < 2] ↔ x > 4 or x < 2.  In fact, x2 − 6x + 8 = 0 if and only if x = 2 or x = 4. We are simply determining the sign of x2 − 6x + 8 on each of the intervals (−∞, 2), (2, 4), and (4, ∞). 57. Proof. Let x ∈ R. (→) Suppose x = x1 . So x2 = 1. Hence x = ±1. (←) Suppose x = ±1. In both cases, observe that x2 = 1. Hence x = x1 . 

354

4.3

CHAPTER 4. ANSWERS TO ALL EXERCISES

Chapter 3

Section 3.1 1. Proof. Let m be even and n be odd. So m = 2j and n = 2k + 1 for some j, k ∈ Z. Observe that mn = (2j)(2k + 1) = 2(j(2k + 1)). Since j(2k + 1) ∈ Z, we see that mn is even.  2. Proof. Let m be even and n be odd. So m = 2j and n = 2k + 1 for some j, k ∈ Z. Observe that m + n = 2j + 2k + 1 = 2(j + k) + 1 is odd.  3. Proof. Suppose n is odd. So n = 2k + 1 for some k ∈ Z. Observe that n2 = (2k + 1)2 = 4k 2 + 4k + 1 = 2(2k 2 + 2k) + 1. Since 2k 2 + 2k ∈ Z, we see that n2 is odd.  4. Proof. Suppose n is even. So n = 2k for some k ∈ Z. Observe that n3 = 2kn2 is even.  5. Proof. Suppose n is odd. So n = 2k + 1 for some k ∈ Z. Observe that 2k+2 n+1 = k + 1 ∈ Z.  2 = 2 6. Proof. Suppose n is even. So n = 2k for some k ∈ Z. Observe that n − 1 = 2k − 1 = 2(k − 1) + 1. Since k − 1 ∈ Z, n − 1 is odd.  7. Proof. Suppose n is an even integer. So n = 2k for some k ∈ Z. Observe that (−1)n = (−1)2k = ((−1)2 )k = 1k = 1.  8. Proof. Suppose n is odd. So n = 2k + 1 for some k ∈ Z. Observe that (−1)n = (−1)2k+1 = ((−1)2 )k (−1) = 1k (−1) = 1(−1) = −1.  9. On. Off = −1 and On = 1. 10. “He loves me not.” This is −1, while “He loves me.” is 1, and n is the number of petals. 11. Proof. Observe that a · k = 0 when k = 0 ∈ Z. Hence a | 0.  12. Proof. Suppose 0 | a. So a = 0 · k for some k ∈ Z. Hence a = 0.  13. Proof. Suppose a | 1. So 1 = ak for some k ∈ Z. Since a, k ∈ Z, this is only possible if a = k = ±1. (Under any other conditions, |ak| > 1.)  Since 1 = ak, it follows that a, k 6= 0. In particular, |k| ≥ 1. If it were the case that |a| ≥ 2, then |ak| = |a| · |k| ≥ 2 · 1 = 2, which is impossible. Hence, |a| ≤ 1, and it follows that |a| = 1.

4.3. CHAPTER 3

355

14. Proof. ab = a · b and b ∈ Z.  15. (a) Proof. Note that a − 1, a2 − 1 ∈ Z. Observe that a2 − 1 = (a + 1)(a − 1) and (a + 1) ∈ Z. Hence, (a − 1) | (a2 − 1).  (b) R breaks into two (a − 1) × 1 rectangles and an (a − 1) × (a − 1) square, as we see in the case below, when a = 5.

16. (a) Sketch. (a + 2)2 − 4 = a2 + 4a = a(a + 4).  (b) There are four a × 1 rectangles around the outside, and there is one a × a square on the inside. 17. Proof. Suppose a | b and b | a. So b = aj and a = bk for some j, k ∈ Z. So a = bk = a(jk). So 1 = jk. Thus k | 1. By Exercise 13, it follows that k = ±1. Therefore, a = bk = ±b.  18. Proof. (→) Suppose a | b. So b = ak for some k ∈ Z. Since −b = a(−k), we see that a | −b. (←) Suppose a | −b. So −b = ak for some k ∈ Z. Since b = a(−k), we see that a | b.  19. Proof. Suppose n is even. So n = 2k for some k ∈ Z. Observe that n2 = (2k)2 = 4k 2 and k 2 ∈ Z. Hence 4 | n2 .  20. Proof. Suppose 3 | n. So n = 3k for some k ∈ Z. Observe that n2 = 9k 2 and k 2 ∈ Z. So 9 | n2 .  21. No, since 8 - 420. Yes, since 7 | 420. 22. No, since 15 - 275. Add 10 people, since 15 | 285. 23. Proof. Suppose a | b and a | c. So b = aj and c = ak for some j, k ∈ Z. Note that b − c = aj − ak = a(j − k). Since j − k ∈ Z, we see that a | (b − c).  24. Proof. Suppose a | b and a | (b + c). So b = aj and (b + c) = ak for some j, k ∈ Z. Observe that c = (b + c) − b = ak − aj = a(k − j) and k − j ∈ Z. Hence, a | c.  25. Yes, when a = 2, b = c = 1. 26. Yes. −2 | −4 and −2 > −4.

356

CHAPTER 4. ANSWERS TO ALL EXERCISES

27. 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71. 28. 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32. 29. Proof. Let p be a prime with 3 | p. So p = 3k for some k ∈ Z. In fact, k > 0. Since p is prime and 3 6= 1, it must be that k = 1. Thus, p = 3.  30. Proof. Suppose p is prime and 5 | p. So p = 5k for some k ∈ Z. Since p is prime and p = 5k 6= k, it follows that p = 5.  31. Proof. Let p ∈ Z with p > 1. (→) Suppose p is prime. Suppose r > 1 and s > 1. Since the only positive divisors of p are 1 and p, we cannot have rs = p, so rs 6= p. (←) Suppose ∀ r, s ∈ Z, if r > 1 and s > 1, then rs 6= p. Suppose t is a positive divisor of p. So p = tu, for some u ∈ Z. Moreover, u > 0. Since tu = p, we must have t ≤ 1 or u ≤ 1. This forces t = 1 or u = 1. If u = 1, then t = p. So t = 1 or t = p.  32. Proof. Let p > 1. (→) Suppose p is prime. Let d be a divisor of p. If d > 0, then d is 1 or p. If d < 0, then −d is 1 or p. (←) Suppose ±1 and ±p are the only divisors of p. Since 1 and p are the only positive divisors of p, it follows that p is prime.  33. Negate the characterization given in Exercise 31. That is, the proof for Exercise 31 also proves this result, since an integer greater than 1 is composite iff it is not prime. 34. This is ¬q ↔ ¬r to the true q ↔ r from Exercise 32. 35. Proof. Suppose n is composite. So n = √ rs for some r, s ∈ Z with < r, s < n. √ 1√ Suppose to the contrary that both r, s > n. Then n = rs > n · n = n, √a contradiction. Hence, it must be that one of r or s is less than or equal to n.  36. Proof. Suppose n = abc, with a, b, c ∈ Z+ \ {1}. Suppose to the contrary √ √ 3 3 that a, b, c > n. Now n = abc > ( n)3 = n is a contradiction.  37. The first 30 primes are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113. Note in the table that X is used to cross off multiples of 7. The multiples of 2, 3, 5 happen to lie on simpler

4.3. CHAPTER 3

357

lines that cut through the table. 2

3

4

5

6

7

8

9

10

11

12

13

X 14

15

16

17

18

19

20

X 21

22

23

24

25

26

27

X 28

29

30

31

32

33

34

35 X

36

37

38

39

40

41

X 42

43

44

45

46

47

48

X 49

50

51

52

53

54

55

56 X

57

58

59

60

61

62

X 63

64

65

66

67

68

69

70 X

71

72

73

74

75

76

X 77

78

79

80

81

82

83

X 84

85

86

87

88

89

90

91 X

92

93

94

95

96

97

X 98

99

100

101 X 112

102

103

104

105 X

106

107

108

109

110

113

114

115

116

117

118

X 119

120

121

111

√ 38. 3 64 = 4 and the multiples of 2, 3, 4 are the same as the multiples of 2, 3. The triple products are 8, 12, 16, 18, 20, 24, 27, 28, 30, 32, 36, 40, 42, 44, 45, 48, 50, 52, 54, 56, 60, 63, 64. 39. 14. 56 = 23 71 , 42 = 21 31 71 , and 21 71 = 14. 40. 90. 41. 18. −108 = (−1)22 33 , −90 = (−1)21 32 51 , and 21 32 = 18. 42. 10. 43. 15. 2475 = 32 52 111 , −780 = (−1)22 31 51 131 , and 31 51 = 15. 44. 286. 45. (a) 2 = gcd(10, 4).

'$ c s c s ↑ s c k=4 c s & c s &%

(b) 4 = gcd(20, 8).

'$ ∗ s ca ca c ↑ c∗ s s ∗c k=8 cca ca s & s∗ &% ∗ c ca

358

CHAPTER 4. ANSWERS TO ALL EXERCISES

(c) Say d is the answer. Then, both n and k need to be multiples of d. Since we want to pick d as large as possible, we get d = gcd(n, k). 46. (a) 30. (b) 60. (c)

mn gcd(m,n) .

47. Proof. Suppose d1 , d2 ∈ Z both satisfy conditions (i),(ii), and (iii). By conditions (i) and (ii) for d2 and condition (iii) for d1 with c = d2 , we see that d2 ≤ d1 . A similar argument with d1 and d2 switched gives d1 ≤ d2 . Hence, d2 = d1 .  n 48. Proof. Let a = m d and b = d . Suppose k > 1 and k | a and k | b. Now dk | m, dk | n and dk > d, which is a contradiction. 

49. Proof. Let d = gcd(m, n). So d | m and d | n. Also, d | (−m) and d | n. Suppose c | (−m) and c | n. So c | m and c | n. Thus, c | d. Hence, d = gcd(−m, n).  50. Sketch. (i) d > 0. (ii) d | n and d | m. (iii) ∀ c ∈ Z+ , if c | n and c | m, then c ≤ d. if and only if (i)0 d > 0. (ii)0 d | m and d | n. (iii)0 ∀ c ∈ Z+ , if c | m and c | n, then c ≤ d.  51. Sketch. gcd(m, −n) = gcd(−n, m) = gcd(n, m) = gcd(m, n).  The first and third equalities follow from Exercise 50, and the second equality follows from Exercise 49. 52. If m, n > 0, then gcd(|m|, |n|) = gcd(m, n). If m > 0, n < 0, then gcd(|m|, |n|) = gcd(m, −n) = gcd(m, n). If m < 0, n > 0, then gcd(|m|, |n|) = gcd(−m, n) = gcd(m, n). If m, n < 0, then gcd(|m|, |n|) = gcd(|m|, −n) = gcd(|m|, n) = gcd(−m, n) = gcd(m, n). 53. Proof. Let p and q be distinct primes. Suppose d ∈ Z+ with d | p and d | q. Since d | p, we have d = 1 or d = p. If d = p, then p | q, giving p = 1 or p = q. Hence, d 6= p. Therefore, d = 1. Thus, gcd(p, q) = 1.  54. Proof. (i) m > 0. (ii) m | m and m | mk. (iii) Suppose c ∈ Z+ and c | m and c | mk. In particular, c | m.  55. Sketch. Write 1 = 2(n) + 1(1 − 2n), and mimic the argument in the proof of Lemma 3.3. 

4.3. CHAPTER 3

359

56. Sketch. −2(3n + 1) + 3(2n + 1) = 1. If c ≥ 1, c | (3n + 1), and c | (2n + 1), then c | 1 and, by Exercise 13, c = 1.  57. 168. Observe that 168 = 56 · 3 = 42 · 4. Note that 42 - 56 and 42 - (2 · 56). 58. 108. 59. 540. Observe that 540 = (−108)(−5) = (−90)(−6). Note that −90 - (−108)k for k = ±1, ±2, ±3, ±4. 60. 19845. 61. (a) 16 = lcm(4, 16). (b) 30 = lcm(6, 15). (c) Say l is the answer. Both a and b need to divide l, and l should be chosen as small as possible. So l = lcm(a, b). 62. (a) 50. (b) lcm(b, d). (c) No,

5 6

+

17 21

=

35 42

+

34 42

=

69 42

reduces to

23 14 .

63. Proof. Let l = lcm(n, m). We show that lcm(m, n) = l, according to Definition 3.7. Note that l > 0, n | l, and m | l. Also, if k ∈ Z+ , m | k, and n | k, then l ≤ k. Hence, lcm(m, n) = l = lcm(n, m).  64. Sketch. (i) l > 0. (ii) m | l and −n | l. (iii) ∀ k ∈ Z+ , if m | k and −n | k, then l ≤ k. if and only if (i) l > 0. (ii) m | l and n | l. (iii) ∀ k ∈ Z+ , if m | k and n | k, then l ≤ k. 

Section 3.2 1. 3 = 11 − 4(2). Note that 11 − 4n = 2 iff n =

9 4

6∈ Z. Note that 11 − 4n = 1 iff n =

5 2

6∈ Z.

2. 2 = 3(−6) + 20. 3. 4 = 12(2) + 20(−1). Note that 12x + 20y = 4(3x + 5y) is divisible by 4. So 1, 2, and 3 are not in S. 4. 3 = 15(3) + 21(−2).

360

CHAPTER 4. ANSWERS TO ALL EXERCISES

5. 217 − 1 is prime, 219 − 1 is prime, 223 − 1 = 47 · 178481, and 229 − 1 = 233 · 1103 · 2089. > isprime(2^17 - 1); true, and > isprime(2^19 - 1); true, but 223 − 1 = 47 · 178481, and 229 − 1 = 233 · 1103 · 2089. 6. > isprime(2^31 - 1); true, but 237 − 1 = 223 · 616318177. 7. Proof. Suppose not. So every prime has fewer than 108 digits. There are 8 only 10(10 ) natural numbers with at most 108 digits. So there could be at 8 most 10(10 ) primes. However, there are infinitely many primes. This is a contradiction.  8. 10( 108 − 1) is a composite with 100 million digits. 9. (a) Sketch. bn − 1 = (b − 1)(bn−1 + bn−2 + · · · + b + 1). Since b ≥ 3, both factors are larger than 1.  That is, (b − 1) ≥ 2 and bn−1 + bn−2 + · · · + b + 1 ≥ 3 + 1 = 4. (b) Proof. Suppose n ∈ Z+ is not prime. So n = rs for some integers r, s ≥ 2. Since 2r ≥ 3, it follows from part (a) that 2n − 1 = (2r )s − 1 is not prime.  10. Sketch. The integers in the list (n + 1)! + 2, (n + 1)! + 3, (n + 1)! + 4, . . . , (n + 1)! + (n + 1) are divisible by 2, 3, 4, . . . , (n + 1), respectively.  11. (a) 10 remainder 7, since 127 = 12(10) + 7 and 0 ≤ 7 < 12. (b) 14 remainder 6, since 216 = 15(14) + 6 and 0 ≤ 6 < 15. 12. (a) 25 rem 7. (b) 14 rem 8. 13. (a) 45 = 7(6) + 3 and 0 ≤ 3 < 7. (b) −37 = 4(−10) + 3 and 0 ≤ 3 < 4. 14. (a) 17 = 3(5) + 2 and 0 ≤ 2 < 3. (b) −53 = 10(−6) + 7 and 0 ≤ 7 < 10. 15. 7 and 3. Note that 73 = 10(7) + 3. 16. 17 and 2.

4.3. CHAPTER 3

361

17. (a) 5 and 2. Note that 67 = 13(5) + 2. (b) −6 and 11. Note that −67 = 13(−6) + 11. 18. (a) 7 and 1. (b) −8 and 11. 19. 165 div 18 = 9 full rows. 165 mod 18 = 3 extra seats. 20. 375 div 18 = 20 each. 375 mod 18 = 15 left over.

22. (a) 100010. (b) 07106.

21. (a) 100111. k −1 0 1 2 3 4 5

n 39 19 9 4 2 1 0

ak

k −1 0 1 2

n 87 10 1 0

ak

1 1 1 0 0 1

23. n and 0. Note that n2 = n(n) + 0. 24. 2n and 0. 25. Because Z does not have a smallest element and Z is a nonempty subset of Z.

(b) 127. 26. n = 0q + r and 0 ≤ r < 0 is impossible.

7 2 1

27. Proof. Let a ∈ Z, and let S be a subset of Z such that ∀ x ∈ S, x ≥ a. Let T = {t : t = s − a for some s ∈ S}. So T ⊆ N. By the Well-Ordering Principle, T has a smallest element, say τ . Let σ = τ + a. Observe that σ is the smallest element of S. (Think about it.)  If m were an element of S smaller than σ, then m − a would be an element of T smaller than τ . That is, if m < σ, then m − a < σ − a = τ . However, there are no elements of T smaller than τ . 28. Sketch. Let S be a set of integers less than or equal to b. So b − S is a set of nonnegative integers. By the Well-Ordering Principle, b − S has a smallest element m. So m = b − n for some n ∈ S. Moreover, n is the largest element in S. 

362

CHAPTER 4. ANSWERS TO ALL EXERCISES

29. Sketch. n 6k 6k + 1 6k + 2 6k + 3 6k + 4 6k + 5

n3 − n + 2 216k 3 − 6k + 2 216k 3 + 108k 2 + 12k + 2 216k 3 + 216k 2 + 66k + 8 216k 3 + 324k 2 + 156k + 26 216k 3 + 432k 2 + 282k + 62 216k 3 + 540k 2 + 444k + 122

(n3 − n + 2) mod 6 2 2 2 2 2 2

 That is, we consider each case n = 6k + r for r = 0, 1, 2, 3, 4, 5. In each case, we see that n3 − n + 2 = 6q + 2 for some q. Specifically, n 6k 6k + 1 6k + 2 6k + 3 6k + 4 6k + 5

n3 − n + 2 6(36k 3 − k) + 2 6(36k 3 + 18k 2 + 2k) + 2 6(36k 3 + 36k 2 + 11k + 1) + 2 6(36k 3 + 54k 2 + 26k + 4) + 2 6(36k 3 + 72k 2 + 47k + 10) + 2 6(36k 3 + 90k 2 + 74k + 20) + 2

Since (n3 − n + 2) mod 6 6= 0, it follows that 6 - (n3 − n + 2). 30. Sketch. n 6k 6k + 1 6k + 2 6k + 3 6k + 4 6k + 5

n3 + 3n2 + 2n + 1 216k 3 + 108k 2 + 12k + 1 216k 3 + 216k 2 + 66k + 7 216k 3 + 324k 2 + 156k + 25 216k 3 + 432k 2 + 282k + 61 216k 3 + 540k 2 + 444k + 121 216k 3 + 648k 2 + 642k + 211

(n3 + 3n2 + 2n + 1) mod 6 1 1 1 1 1 1

 31. Proof. Suppose n ∈ Z and 3 - n. So n = 3q + r for some q ∈ Z and r = 1 or 2. Case 1 : r = 1. Since n2 = (3q + 1)2 = 3(3q 2 + 2q) + 1, we see that n2 mod 3 = 1. Case 2 : r = 2. Since n2 = (3q + 2)2 = 3(3q 2 + 4q + 1) + 1, we see that n2 mod 3 = 1. In both cases, n2 mod 3 = 1.  32. Proof. Suppose n is odd. Case 1 : n = 4k + 1 for some k ∈ Z. So n2 = 8(2k 2 + k) + 1. Hence, n2 mod 8 = 1. Case 2 : n = 4k + 3 for some k ∈ Z. So n2 = 8(2k 2 + 3k + 1) + 1. Hence, n2 mod 8 = 1.  33. Sketch. If n = 5k + 1, then n4 − 1 = 5(125k 4 + 100k 3 + 30k 2 + 4k).

4.3. CHAPTER 3

363

If n = 5k + 2, then n4 − 1 = 5(125k 4 + 200k 3 + 120k 2 + 32k + 3). If n = 5k + 3, then n4 − 1 = 5(125k 4 + 300k 3 + 270k 2 + 108k + 16). If n = 5k + 4, then n4 − 1 = 5(125k 4 + 400k 3 + 480k 2 + 256k + 51).  Note that n is not divisible by 5 if and only if n = 5k + r for some k ∈ Z and r = 1, 2, 3, 4. (That is, r = 0 is excluded.) In each case, we see that n4 − 1 = 5q for some q ∈ Z. 34. Sketch. Suppose 7 - n. n 7k + 1 7k + 2 7k + 3 7k + 4 7k + 5 7k + 6

n6 − 1 7(16807k 6+14406k 5+5145k 4+980k 3+105k 2+6k) 7(16807k 6+28812k 5+20580k 4+7840k 3+1680k 2+192k+9) 7(16807k 6+43218k 5+46305k 4+26460k 3+8505k 2+1458k+104) 7(16807k 6+57624k 5+82320k 4+62720k 3+26880k 2+6144k+585) 7(16807k 6+72030k 5+128625k 4+122500k 3+65625k 2+18750k+2232) 7(16807k 6+86436k 5+185220k 4+211680k 3+136080k 2+46656k+6665)

 35. (a) 4, since 4 ≤ 4.4 < 5. (b) −5, since −5 ≤ −4.4 < −4. (c) 9, since 8 < 8.6 ≤ 9. (d) −8, since −9 < −8.6 ≤ −8. 36. (a) 3. (b) −4. (c) 7. (d) −6. 37. (a) −5, since −6 < −5 ≤ −5. (b) 3, since 3 ≤ π < 4. (c) 5, since 5 ≤ 17 3 < 6. (d) 11, since 10 < 4e ≤ 11. 38. (a) 9. (b) 2. (c) −3. (d) 10. c 39. (a) d 500 32 e = d15.625e = 16. (b) d m e. Say b is the answer. Hence, we need mb ≥ c. So b ≥ c possible value for b is thus b = d m e.

m c

and b ∈ Z. The smallest

c c. 40. (a) 6. (b) b m

41. Sketch. Note that (i) bxc + n ∈ Z, (ii) bxc + n ≤ x + n, (iii) x + n < 1 + bxc + n.  By Theorem 3.8, byc = k if and only if (i) k ∈ Z, (ii) k ≤ y, and (iii) y < k + 1. We apply this with y = x+n and k = bxc+n to get bx+nc = byc = k = bxc+n. 42. Sketch. (i) (dxe + n) ∈ Z. (ii) x + n ≤ dxe + n. (iii) dxe + n − 1 < x + n. 

364

CHAPTER 4. ANSWERS TO ALL EXERCISES

43. Proof. Suppose n ∈ Z. Case 1 : n = 2k for some k ∈ Z. Observe that k ∈ Z, n2 ≤ k, and k − 1 < n2 . Hence, d n2 e = k = n2 . Case 2 : n = 2k + 1 for some k ∈ Z. Observe that k + 1 ∈ Z, n2 ≤ k + 1, and (k + 1) − 1 < n2 . Hence, d n2 e = k + 1 = n+1 2 .  44. Proof. Let n ∈ Z. We apply Theorems 3.9 and 3.10. Case 1 : n even. So b n2 c + d n2 e = n2 + n2 = n. Case 1 : n odd. n+1 So b n2 c + d n2 e = n−1 2 + 2 = n.  45. Proof. Let n ∈ Z. Case 1 : n = 3k for some k ∈ Z. Note that k = n3 . We then have k ∈ Z, k ≤ n3 , and n3 < k + 1. It follows from Theorem 3.8 that b n3 c = k = n3 . Case 2 : n = 3k + 1 for some k ∈ Z. Note that k = n−1 3 . We then have k ∈ Z, k ≤ n3 , and n3 < k + 1. It follows from Theorem 3.8 that n−2 b n3 c = k = n−1 3 . Case 3 : n = 3k + 2 for some k ∈ Z. Note that k = 3 . n n We then have k ∈ Z, k ≤ 3 , and 3 < k + 1. It follows from Theorem 3.8 that b n3 c = k = n−2 3 .  46. Sketch. Let n ∈ Z. So n = 4q + r for ( some q ∈ Z and r ∈ {0, 1, 2, 3}. Note 2q if r = 0, 1, that 2b n4 c = 2q and b n2 c = 2q + b 2r c = 2q + 1 if r = 2, 3. The result follows.  47. Proof. Let x, y ∈ R. Since bxc ≤ x and byc ≤ y, we have bxc + byc ≤ x + y. Since bxc + byc ∈ Z and bx + yc is the largest integer n such that n ≤ x + y, it follows that bxc + byc ≤ bx + yc.  48. Let x = y = 21 . 49. Counterexample: Let x = 12 . Observe that b2xc = b1c = 1, 2bxc = 2b 12 c = 2(0) = 0, and 1 6= 0. 50. False. Let x = 1. 51. Proof. Let x ∈ R. (→) Suppose x 6∈ Z. Then bxc 6= x, and it must be that bxc < x. Since x ≤ dxe, we get bxc = 6 dxe. (←) Suppose x ∈ Z. It follows that bxc = x = dxe.  52. Sketch. Let n = bxc. (i) n + 1 ∈ Z. (ii) x ≤ n + 1. (iii) n + 1 − 1 < x, since x 6∈ Z.  When x ∈ Z, dxe = bxc. 53. Sketch. Certainly bxc ∈ Z and bxc ≤ bxc < bxc + 1.  By Theorem 3.8, byc = k if and only if k ∈ Z and k ≤ y < k + 1. We apply this

4.3. CHAPTER 3

365

with k = y = bxc. 54. (a) Sketch. (i) −dxe ∈ Z. (ii) −dxe ≤ −x, since x ≤ dxe. (iii) −x < −dxe+1, since dxe − 1 < x.  (b) It follows from part (a) that bxc = −d−xe. n+1 n 55. If n is odd, then b n+1 2 c = 2 = d 2 e. n+1 n n If n is even, then b 2 c = 2 = d 2 e. We simply apply Theorems 3.9 and 3.10.

56. Sketch. We use Theorems 3.9 and 3.10. Case 1 : n even, so n + 1 odd. So b n2 c + 1 = n2 + 1 = (n+1)+1 = d n+1 2 2 e. Case 2 : n even, so n + 1 odd. n+1 n+1 So b n2 c + 1 = n−1 2 + 1 = 2 = d 2 e.  57. round(x) = bx + 21 c. Say x = n + f , where n = bxc and f = x − bxc ∈ [0, 1). If f < 12 , then f + 12 < 1 and round(x) = n = bn + (f + 21 )c = bx + 21 c. If f ≥ 12 , then f + 12 ≥ 1 and round(x) = n + 1 = bn + 1 + (f + 12 − 1)c = bx + 12 c. 58. round(x) = −d−x − 21 e. 59. The statement is equivalent to the fact that 1 is the smallest positive integer. Proof. Suppose there is a smaller positive integer than 1. So the set S = {n : n ∈ Z+ and n < 1} is nonempty. By the Well-Ordering Principle, S must have a smallest element, say s. Since 0 < s < 1, it follows that 0 < s2 < s < 1. Since s2 ∈ Z, this is a contradiction.  60. Proof. Let x ∈ R. By the Archimedean Principle, we have n ∈ Z with n > −x. Observe that −n ∈ Z and −n < x.  61. Proof. Suppose n1 , n2 ∈ Z with n1 ≤ x < n1 + 1 and n2 ≤ x < n2 + 1. Without loss of generality, say n1 ≥ n2 . Adding n2 ≤ x < n2 + 1 to −n1 − 1 < −x ≤ −12 , we get n2 − n1 − 1 < 0 < n2 − n1 + 1. Adding n1 − n2 to this inequality gives −1 < n1 − n2 < 1. So 0 ≤ n1 − n2 < 1. From Exercise 59 it follows that n1 − n2 = 0. That is, n1 = n2 .  62. Proof. Let x ∈ R. By Exercise 60, we have m ∈ Z with m < x. So S = {s : s ∈ Z and x ≤ x} is nonempty. By the Archimedean Principle, we have b ∈ Z with b > x. Hence, S is a nonempty subset of the integers less than or equal to b. By Exercise 28, S has a largest element, say n. So n ∈ Z and n ≤ x. Since n + 1 6∈ S, it must be that x < n + 1.  63. Proof. Let S = {s : n = 2r s where r ∈ N and s ∈ Z+ }. Since n = 20 n, it

366

CHAPTER 4. ANSWERS TO ALL EXERCISES

follows that n ∈ S and thus S is nonempty. By the Well-Ordering Principle, S has a smallest element. Call it b. Since b ∈ S, there is some a ∈ N such that n = 2a b. If b were even (so 2b ∈ Z), then n = 2a+1 2b , whence 2b would be a smaller element of S than b. Therefore, b must be odd.  64. Let S = {s : s = a − bn ≥ 0 and n ∈ Z}. If S = ∅, then a < 0 and 0 > ab . If S 6= ∅, then let m = a−bk ≥ 0 be the smallest element of S. So a−b(k+1) < 0 and k + 1 > ab . 65. Let m and n be integers that are not both zero. We must show that there exists an integer d such that (i) d > 0, (ii) d | m and d | n, and (iii) ∀ c ∈ Z+ , if c | m and c | n, then c ≤ d. Let d = max{a : a > 0, a | m, and a | n}. Sketch. Clearly 1 > 0, 1 | m, and 1 | n. So S = {a : a > 0, a | m, and a | n} is nonempty. By Theorem 3.1, no element of S is bigger than n. By the Generalized Maximum Principle, S must have a largest element. That is the value d that we need.  Conditions (i) and (ii) hold since d ∈ S. Condition (iii) holds since d is the smallest element of S. 66. Proof. Suppose d1 and d2 satisfy conditions (i), (ii), and (iii) in Definition 3.5. Since d1 | m and d1 | n, we get d1 ≤ d2 . Since d2 | m and d2 | n, we get d2 ≤ d1 . Hence, d1 = d2 .  67. 4. Use c for the value of #. We have 3(0+5+0+7+1+6)+(3+0+0+4+2+c) = 66 + c. Note that 10 | (66 + 4). 68. 8. 69. No. 3(0 + 1 + 0 + 8 + 1 + 0) + (6 + 0 + 0 + 1 + 6 + 7) = 50 is divisible by 10. 70. No. With the digits reversed, the calculation results in 40, and 40 mod 10 = 0. 71. 3. Use m for the value of #. We have 10(0)+9(4)+8(4)+7(6)+6(m)+5(1)+4(0)+3(7)+2(8)+6 = 158+6m. Note that 11 | (158 + 6 · 3). 72. 8. 73. No. That is the ISBN for How the Grinch Stole Christmas. 10(0) + 9(3) + 8(9) + 7(4) + 6(8) + 5(0) + 4(0) + 3(7) + 2(9) + 6 = 220 is divisible by 11.

4.3. CHAPTER 3

367

74. Yes. See Exercise 76. 75. Sketch. Let a and b be the consecutive digits. Note that (3a + b) − (3b + a) = 2(a − b) is divisible by 10 if and only if a − b is divisible by 5.  76. Sketch. Let a and b be the consecutive digits. Note that (ka + (k − 1)b) − (kb + (k − 1)a) = a − b can never be divisible by 11.  77. (a) 0110101. The message is 0110. So b5 = (0 + 1) mod 2 = 1, b6 = (1 + 1) mod 2 = 0, and b7 = (1 + 0) mod 2 = 1. Message Code Word (b) 0000 0000000 0001 0001001 0010011 0010 0011 0011010 0100 0100110 0101 0101111 0110101 0110 0111 0111100 1000 1000100 1001 1001101 1010 1010111 1011 1011110 1100 1100010 1101 1101011 1110 1110001 1111 1111000 (c) 2. See the second row of the table. (d) Female, A+ . See the eighth row of the table.

(e) 1010011 is one digit away from both 0010011 and 1010111. Also 0010010 is one digit away from both 0010011 and 0011010. 78. (a) 1010010. (b) Message 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

Code Word 0000000 0001011 0010101 0011110 0100110 0101101 0110011 0111000 1000111 1001100 1010010 1011001 1100001 1101010 1110100 1111111

(c) 3. (d) NW. (e) ESE.

79. “LQ KZMAMHUIAP”. We use y = (x + 8) mod 27. E.g., D = 4 encrypts to (4 + 8) mod 27 = 12 = L. 80. “ELQDUACFRGH”. 81. “SELL IMCLONE”. We use x = (y − 15) mod 27. E.g., G = 7 decrypts to (7 − 15) mod 27 = 19 = S. 82. “DEWEY WINS”.

368

CHAPTER 4. ANSWERS TO ALL EXERCISES

Section 3.3 1. x = 2, y = −5. Note that 5 = 65(2) + 25(−5). 2. x = 1, y = −4. 3. x = 3, y = −4. Note that 15(3) + 11(−4) = 1.

9. 8. gcd(296, 112) = gcd(112, 72) = gcd(72, 40) = gcd(40, 32) = gcd(32, 8) = gcd(8, 0) = 8. 10. 6. 11. 1.

4. x = 3, y = −10. 5. 12. gcd(24, 12) = gcd(12, 0) = 12. 6. 2. 7. 22. gcd(110, 44) = gcd(44, 22) = gcd(22, 0) = 22.

12. 1.

8. 12.

n 63 25 13 12 1

m 25 13 12 1 0

n 70 27 16 11 5 1

m 27 16 11 5 1 0

13. 2 = 14(−1) + 8(2). gcd(14, 8)

= gcd(8, 6) = gcd(6, 2) = gcd(2, 0) = 2

since 14 = 8 + 6 since 8 = 6 + 2 since 6 = (2)3 + 0 by Example 3.8.

So 2 = 8 − 6 = 8 − (14 − 8) = −14 + (2)8 = 14(−1) + 8(2). 14. 56(1) + 42(−1) = 14. 15. 5 = 50(−2) + 35(3). gcd(50, 35)

= gcd(35, 15) = gcd(15, 5) = gcd(5, 0) = 5

since 50 = 35 + 15 since 35 = (15)2 + 5 since 15 = (5)3 + 0 by Example 3.8.

So 5 = 35 − (15)2 = 35 − (50 − 35)2 = 50(−2) + 35(3). 16. 108(−2) + 45(5) = 9.

4.3. CHAPTER 3

369

17. 3 = 81(3) + 60(−4). gcd(81, 60)

= gcd(60, 21) = gcd(21, 18) = gcd(18, 3) = gcd(3, 0) = 3

since 81 = 60 + 21 since 60 = (21)2 + 18 since 21 = 18 + 3 since 18 = (3)6 + 0 by Example 3.8.

So 3 = 21 − 18 = 21 − (60 − (21)2) = −60 + (21)3 = −60 + (81 − 60)3 = 81(3) + 60(−4). 18. 259(3) + 77(−10) = 7. 19. x = −5 and y = 23. gcd(55, 12)

= = = = = =

gcd(12, 7) gcd(7, 5) gcd(5, 2) gcd(2, 1) gcd(1, 0) 1

since 55 = (12)4 + 7 since 12 = 7 + 5 since 7 = 5 + 2 since 5 = (2)2 + 1 since 2 = (1)2 + 0 by Example 3.8.

So 1 = 5−(2)2 = 5−(7−5)2 = −2(7)+3(5) = −2(7)+3(12−7) = 3(12)−5(7) = 3(12) − 5(55 − (12)4) = 55(−5) + 12(23). 20. x = 5 and y = −16. 21. No. For m = 2, n = 3, we can use x = 2, y = −1 or x = −1, y = 1. See Exercise 23. 22. Proof. (→) Suppose m and n are relatively prime. By Theorem 3.13, 1 = gcd(m, n) = mx+ny for some x, y ∈ Z. (←) Suppose x, y ∈ Z and mx+ny = 1. Suppose c ∈ Z+ , c | m, and c | n. Hence, c | (mx + ny), and by Exercise 13 in Section 3.1, c = 1. Therefore, gcd(m, n) = 1. That is, m and n are relatively prime.  23. Proof. Let x0 , y0 be any fixed pair that gives gcd(m, n) = mx0 + ny0 . Observe that, ∀ k ∈ Z, gcd(m, n) = mx0 + ny0 = m(x0 + kn) + n(y0 − km). Therefore, x = x0 + kn and y = y0 − km gives a general solution to gcd(m, n) = mx + ny.  24. Proof. Suppose to the contrary that d = gcd(m, n) = mx + ny and k = gcd(x, y) > 1. So m = da, n = db, x = ki, and y = kj for some a, b, i, j ∈ Z. Hence, d = dk(ai + bj). However, d < dk and dk | d is impossible.  25. No. 6 | (2 · 3) but 6 - 2 and 6 - 3.

370

CHAPTER 4. ANSWERS TO ALL EXERCISES

26. Proof. Suppose p | mn. If p | m, then we are done. So assume p - m. Hence, gcd(p, m) = 1, and, by Euclid’s Lemma, p | n.  27. Corollary 3.19: Let m, n, and p be integers with n > 0 and p prime. If p | mn , then p | m. Proof. Let m, n, and p be integers with n > 0 and p prime. Suppose p | mn . That is, p | m · · · · · m}. By Corollary 3.18, p | m (for one of the m’s).  | · m {z n times

28. Proof. Suppose gcd(a, bn ) = 1. Suppose c ∈ Z+ , c | a, and c | b. So c | bn and hence c ≤ 1. Thus, gcd(a, b) = 1.  29. Sketch. Let p be prime. It follows from Corollary 3.19 that p | a ↔ p | am , and p | b ↔ p | bn .  Let d = gcd(a, b) and c = gcd(am , bn ). So d | a, d | b, c | am , and c | an . We have x, y ∈ Z such that c = am x+bn y = a(am−1 x)+b(bn−1 y). We have u, v ∈ Z such that d = au + bv. (→) Suppose p | d. So p | a and p | b. It follows that p divides a(am−1 x) + b(bn−1 y) = c. (←) Suppose p | c. So p | am and p | an . Hence, p | a, and p | b. It follows that p divides au + bv = d. 30. Sketch. Let a be the largest element of {s : s ∈ Z and ps | m}. So m = pa t for some t ∈ Z, and p - t. Let b = k − a. Since pa pb | pa tn, it follows that pb | tn. Since 1 = gcd(p, t) = gcd(pb , t), it follows that pb | n.  31. Proof. Let d = gcd(m, n). So d | m and d | n. Note that d | m and d | (n − m). If c | m and c | (n − m), then c | m and c | n, whence c ≤ d. So gcd(m, n − m) = d = gcd(m, n).  32. Since d is chosen to represent the smallest element of S and then shown to be the gcd. 33. Sketch. Argue that min{mu1 + nv1 : mu1 + nv1 > 0} = min{nu2 + mv2 : nu2 + mv2 > 0} by using (u2 , v2 ) = (v1 , u1 ).  Let S1 = {mu1 +nv1 : mu1 +nv1 > 0} and S2 = {nu2 +mv2 : nu2 +mv2 > 0}. We in fact show that S1 = S2 . (⊆) Suppose x ∈ S1 . So x = mu1 + nv1 > 0 for some u1 , v1 ∈ Z. Since x = nv1 + mu1 > 0 and v1 , u1 ∈ Z, we see that x ∈ S2 . (⊇) Similar. 34. Sketch. Let v 0 = −v. Since t = mu + nv > 0 iff t = m(u) + (−n)v 0 > 0, the sets {t : t = mu + nv > 0 with u, v ∈ Z} and {t : t = mu + (−n)v 0 > 0 with u, v 0 ∈ Z} are the same. Therefore, their minimums are the same, and gcd(m, −n) = gcd(m, n). 

4.3. CHAPTER 3

371

35. Proof. From the given characterization, we see that gcd(k, 0) = min{ku + 0v : ku + 0v > 0} = min{ku : ku > 0} = k · 1 = k.  36. Sketch. Since mu + nv = mu + (mq + r)v = m(u + qv) + rv, let u0 = u + qv and v 0 = v. So mu + nv = mu0 + rv 0 . Hence, the sets used to define gcd(m, n) and gcd(m, r) are the same.  37. Proof. Suppose c ∈ Z, c | m, and c | n. So m = ca and n = cb for some a, b ∈ Z. By Theorem 3.13, there are x, y ∈ Z such that gcd(m, n) = mx + ny. Since gcd(m, n) = cax + cby = c(ax + by), we see that c | gcd(m, n).  38. Proof. Since d | m and d | n, we can write m = ad and n = bd for some a, b ∈ Z. Write d = mx + ny for some x, y ∈ Z. So d = adx + bdy, and hence 1 = ax + by. It follows that gcd(a, b) = 1.  39. (5n + 3)(7) + (7n + 4)(−5) = 1. So apply Corollary 3.14. 40. (5 − 2n)(−1) + (n − 3)(−2) = 1. 41. (a) ad − bc = 3(2) − 5(1) = 1. (b) If the ad − bc = 1, then Corollary 3.14 tells us that a and b are relatively prime and that c and d are relatively  prime. Similarly, consider the columns. 1 2 (c) No. The counterexample shows that the converse does not hold. 3 1 Note that gcd(1, 2) = gcd(3, 1) = 1, but the determinant is 1(1)−2(3) = −5 6= 1. 42. (a) Each amount not a multiple of gcd(a, b) is unachievable. (b) 1,2,3,5,7,9,11,13,17.

Section 3.4 1. 5 21 =

11 2

and 11, 2 ∈ Z with 2 6= 0.

2. 7 23 =

23 3

and 23, 3 ∈ Z with 3 6= 0.

3. −13 25 =

−67 5

4. −25 14 =

−101 4

5. 5.821 =

5821 1000

6. −3.72 =

−93 25

7. 3.14 =

311 99

and −67, 5 ∈ Z with 5 6= 0. and −101, 4 ∈ Z with 4 6= 0. and 5821, 1000 ∈ Z with 1000 6= 0. and −93, 25 ∈ Z with 25 6= 0.

and 311, 99 ∈ Z with 99 6= 0.

372

CHAPTER 4. ANSWERS TO ALL EXERCISES

Let x = 3.14. So 100x = 314.14. So 99x = 100x − x = 314 − 3 = 311. So x = 311 99 . 8. −2.718 =

−2716 999

and −2716, 999 ∈ Z with 999 6= 0.

9. −4.321 = −713 165 and −713, 165 ∈ Z with 165 6= 0. Let x = −4.321. So 10x = −43.21. So 1000x = −4321.21. So 990x = 1000x − 10x = −4321 + 43 = −4278. −713 So x = −4278 990 = 165 . 10. 17.832 =

16049 900

and 16049, 900 ∈ Z with 900 6= 0.

11. 12.758 =

11483 900

and 11483, 900 ∈ Z with 900 6= 0.

12. 59.1736 =

65091 1100

and 65091, 1100 ∈ Z with 1100 6= 0.

13. Proof. Since r ∈ Q, r = ab for some a, b ∈ Z with b 6= 0. Observe that nr = na b and na, b ∈ Z with b 6= 0. Thus, nr ∈ Q.  14. Proof. Suppose n 6= 0. Write r = ab for a, b ∈ Z with b 6= 0. Observe that r a n = bn and a, bn ∈ Z. By the Zero Multiplication Property, bn 6= 0.  15. (a) Proof. Since s ∈ Q, s = ab for some a, b ∈ Z with b 6= 0. Observe that −s = −a b and −a, b ∈ Z with b 6= 0. Thus, −s ∈ Q.  (b) Proof. Since r, s ∈ Q, r = ab and s = dc for some a, b, c, d ∈ Z with b, d 6= 0. Observe that r − s = ab − dc = ad−bc bd . Since ad − bd, bd ∈ Z with bd 6= 0, we see that r − s ∈ Q.  16. Write r = ab and s = dc for a, b, c, d ∈ Z with b, d 6= 0. (a) rs = ac, bd ∈ Z with bd 6= 0. (b) Suppose s 6= 0. So c = 6 0. Hence, rs = ad, bc ∈ Z with bc 6= 0.

ac bd ad bc

and and

17. Proof. Suppose n ≥ 0. We can write r = ab where a, b ∈ Z with b 6= 0. n Observe that rn = abn and an , bn ∈ Z with bn 6= 0. So rn ∈ Q.  18. Write r = ab for a, b ∈ Z with b 6= 0. Suppose n < 0 and r 6= 0. So −n > 0 −n 1 and a 6= 0. Hence rn = r−n = ab −n and b−n , a−n ∈ Z with a−n 6= 0. 19. 65 39

5 3. = 5·13 3·13

= 35 , gcd(5, 3) = 1, and 3 > 0.

4.3. CHAPTER 3

20.

1 7.

21.

−57 8 . = −57·9 8·9

−513 72

22.

gcd(−57, 8) = 1, and 8 > 0.

−4 1 .

157·2 50·2

=

157 50 ,

gcd(157, 50) = 1, and 50 > 0.

9 200 . −189 500 .

378 25. − 1000 =

26.

−57 8 ,

=

23. 157 50 . 3.14 = 314 100 = 24.

373

−2229 125 .

27. 0.48.

2

5 )

. 2. 0 2 2

1 1

-

-

4 0 0 0 0

8 0 0 0 0

remainder 20 remainder 0 ← END

28. .06. 29. 0.428571.

7 ) -

. 3. 2 -

4 0 8 2 1 -

2 0

8

5

7

1 (remainder 3) I

0 4 6 5 -

remainder 2 0 6 4 3 -

remainder 6 0 5 5 4 -

remainder 4 0 9 1

remainder 5 0 7 3

remainder 1 remainder 3

374

CHAPTER 4. ANSWERS TO ALL EXERCISES

30. .36. 31. 0.53.

1

. 8. 7

5 ) -

5 0 5 5 4

3 0 0 5 5

remainder 5 remainder 5 ← AGAIN

32. .6857142. 33. Yes. 3 6 = 0.5 and 3 | 6. 34. No, since well.

1 4

is in lowest terms, but

35. No. Take a = c = 1, b = d = 2, and get 36. No.

3 5

·

5 9

=

15 45

2 4

ad+bc bd

is not. Not when b = 7 and a = 6, as

= 44 , while

1 1

is in lowest terms.

is not in lowest terms.

37. When p - n. Otherwise gcd(p, n) = p > 1. 38. Proof. n − 1, n ∈ Z with n > 0 and gcd(n − 1, n) = 1.  39. Yes. A fraction b is a power of 2.

a b

in lowest terms has a finite binary decimal expansion iff

40. Yes. Now 2 and 3 are the critical prime divisors. 41. Proof. Since k > 0, 2k + 1 > 0. Since (3k + 1)(−2) + (2k + 1)(3) = 1, we have gcd(3k + 1, 2k + 1) = 1.  42. Write r1 = dc11 and r2 = dc22 for c1 , c2 , d1 , d2 ∈ Z with d1 , d2 > 0. Let b = d1 d2 , a1 = c1 d2 , and a2 = c2 d1 . So b > 0, r1 = ab1 , and r2 = ab2 . 43.



2. It is not in Q.

44. Suppose x < y. We have r ∈ Q such that x < r < y. Write r = a, n ∈ Z with n 6= 0. Since nx < a < ny, we have a ∈ (nx, ny) ∩ Z 6= ∅.

a n

for

4.3. CHAPTER 3

375

√ 45. Proof. Suppose not. So we have a, b ∈ Z such that 3 = ab is in lowest √ terms. So b 3 = a. So b2 3 = a2 . So 3 | a2 . By Corollary 3.19, 3 | a. Write a = 3c for some c ∈ Z. So b2 3 = a2 = 9c2 . So b2 = 3c2 . So 3 | b2 . By Corollary 3.19, 3 | b. So gcd(a, b) ≥ 3. This contradicts the assumption that ab is in lowest terms.  √ √ 46. Sketch. Write 5 = ab in lowest terms. So b 5 = a. So b2 5 = a2 . So 5 | a2 . By Corollary 3.19, 5 | a. Write a = 5c. So b2 5 = a2 = 25c2 . So b2 = 5c2 . So 5 | b2 . By Corollary 3.19, 5 | b. So gcd(a, b) ≥ 5. This is a contradiction.  √ 47. Proof. Suppose not. So we have a, b ∈ Z such that 13 = ab is in lowest √ terms. So b 13 = a. So b2 13 = a2 . So 13 | a2 . By Corollary 3.19, 13 | a. Write a = 13c for some c ∈ Z. So b2 13 = a2 = 132 c2 . So b2 = 13c2 . So 13 | b2 . By Corollary 3.19, 13 | b. So gcd(a, b) ≥ 13. This contradicts the assumption that a b is in lowest terms.  √ √ 48. Sketch. Write p = ab in lowest terms. So b p = a. So b2 p = a2 . So p | a2 . By Corollary 3.19, p | a. Write a = pc. So b2 p = a2 = p2 c2 . So b2 = pc2 . So p | b2 . By Corollary 3.19, p | b. So gcd(a, b) ≥ p. This is a contradiction.  √ 49. Proof. Suppose not. So we have a, b ∈ Z such that 3 2 = ab is in lowest √ terms. So b 3 2 = a. So b3 2 = a3 . So 2 | a3 . By Corollary 3.19, 2 | a. Write a = 2c for some c ∈ Z. So b3 2 = a3 = 23 c3 . So b3 = 22 c3 . So 2 | b3 . By Corollary 3.19, 2 | b. So gcd(a, b) ≥ 2. This contradicts the assumption that ab is in lowest terms.  √ √ 50. Sketch. Write 3 5 = ab in lowest terms. So b 3 5 = a. So b3 5 = a3 . So 5 | a3 . By Corollary 3.19, 5 | a. Write a = 5c. So b3 5 = a3 = 53 c3 . So b3 = 52 c3 . So 5 | b3 . By Corollary 3.19, 5 | b. So gcd(a, b) ≥ 5. This is a contradiction.  √ 51. Proof. Suppose not. So we have a, b ∈ Z such that 3 7 = ab is in lowest √ terms. So b 3 7 = a. So b3 7 = a3 . So 7 | a3 . By Corollary 3.19, 7 | a. Write a = 7c for some c ∈ Z. So b3 7 = a3 = 73 c3 . So b3 = 72 c3 . So 7 | b3 . By Corollary 3.19, 7 | b. So gcd(a, b) ≥ 7. This contradicts the assumption that ab is in lowest terms.  √ √ 52. Sketch. Write 4 2 = ab in lowest terms. So b 4 2 = a. So b4 2 = a4 . So 2 | a4 . By Corollary 3.19, 2 | a. Write a = 2c. So b4 2 = a4 = 24 c4 . So b4 = 23 c4 . So 2 | b4 . By Corollary 3.19, 2 | b. So gcd(a, b) ≥ 2. This is a contradiction.  53. Proof. Suppose not. So we can write log2 3 = ab , for some a, b ∈ Z with a a, b > 0. So 2 b = 3. So 2a = 3b . By the Fundamental Theorem of Arithmetic (uniqueness), a = b = 0. This is a contradiction. 

376

CHAPTER 4. ANSWERS TO ALL EXERCISES a

54. Sketch. Write log5 2 = ab , with a, b > 0. So 5 b = 2. So 5a = 2b . By the Fundamental Theorem of Arithmetic, a = b = 0. This is a contradiction.  55. Proof. Suppose not. So we can write log3 7 = ab , for some a, b ∈ Z with a a, b > 0. So 3 b = 7. So 3a = 7b . By the Fundamental Theorem of Arithmetic (uniqueness), a = b = 0. This is a contradiction.  a

56. Sketch. Write log7 5 = ab , with a, b > 0. So 7 b = 5. So 7a = 5b . By the Fundamental Theorem of Arithmetic, a = b = 0. This is a contradiction.  √



57. No, √2+ √6 = 2 ∈ Z ⊆ Q. 2+ 3





√ √ ( 2+ 6)2 √ 2+ 3 √ √ √2+ √6 = 2. 2+ 3

Observe that ( √2+ √6 )2 = 2+ 3

=

√ 8+4√ 3 2+ 3





= 4. Since √2+ √6 is certainly 2+ 3

positive, it must be that q √ 58. No, 13 + 2 + 3+7√2 = 4 ∈ Z ⊆ Q. 59. √ No. √ 2 + (− 2) = 0. 60. Yes, since r ∈ Q if and only if −r ∈ Q. √ √ 61. Proof. Suppose r = 1+2 5 is rational. So 5 = 2r − 1. However, 2r − 1 is √ rational, and 5 is irrational. This is a contradiction.  52 62. s(1) = 34 , s(2) = 14 9√, s(3) = 27 .√ 2+ 3 Proof. Suppose r = 3 ∈ Q. So 3 = 3r − 2 ∈ Q, a contradiction.  √ √ √ √ √ Since 34 = s(1) = 2+3 3 + 2−3 3 , we see that 2+3 3 = 43 − 2−3 3 . Were 2−3 3 ∈ Q, √ that would make 2+3 3 ∈ Q. √ √ 5 63. Proof. Suppose not. So r = 15+7 is rational. So 5 = 4r−15 4 7 . However, √ 4r−15 is rational, and 5 is irrational. This is a contradiction.  7 √ We cannot have 5 = 4r−15 with the left-hand side irrational and the right7 hand side rational. However, r being rational forces the right-hand side to be rational.

64. Proof. Suppose r =

√ 5(3+ 5) 12

∈ Q. So



5=

12r 5

− 3 ∈ Q, a contradiction. 

√ is rational. So 2 = 7−3r r+1 . It is easy to √ is rational. However, 2 is irrational. This is a

65. Proof. Suppose not. So r =

√ 7−√2 3+ 2

check that r + 1 6= 0. So 7−3r r+1 contradiction.  √ √ √ √2 , then −3 − If −1 = r = 7− 2 = 7 − 2, which is impossible. 3+ 2 66. Proof. Suppose r = 3 −

√ 4

2 ∈ Q. So

√ 4

2 = 3 − r ∈ Q, a contradiction. 

4.3. CHAPTER 3

377

67. − 13 and 32 . 6x4 − 7x3 + 3x2 − 7x − 3 = (3x + 1)(2x − 3)(x2 + 1). 68. None. x6 − 5x4 + 2x2 − 10 = (x2 − 5)(x4 + 2). 69. None. x4 − x3 + 5x2 − 6x − 6 = (x2 − x − 1)(x2 + 6). 70. − 25 and 12 . 10x4 − x3 − 22x2 + 2x + 4 = (5x + 2)(2x − 1)(x2 − 2). √ 71. Sketch. Observe that 10 is a root of f (x) = x2 − 10. However, by the Rational Roots Theorem, f (x) has no rational roots.  The only possible rational roots of f (x) = x2 − 10 are ±1 and ±10. However, f (±1) = −9 6= 0 and f (±10) = 90 6= 0. Any roots of f (x) = x2 − 10 must therefore be irrational. √ 72. Sketch. Observe that 35 is a root of f (x) = x2 − 35. However, by the Rational Roots Theorem, f (x) has no rational roots.  √ √ 73. Sketch. Observe that 6 + 2 is a root of f (x) = x4 − 16x2 + 16. However, by the Rational f (x) has no rational√roots.  √ √ Roots Theorem, √ 2 Let x = 6 + 2. So x = 8 + 2 12. So x2 − 8 = 2 12. So x4 − 16x2 + 64 = √ 2 4 2 (2 12) = 48. That is, x − 16x + 16 = 0. The only possible rational roots of f (x) = x4 − 16x2 + 16 are ±1, ±2, ±4, ±8, and ±16. However, f (±1) = 1, f (±2) = −32, f (±4) = 16, f (±8) = 3088, and f (±16) = 61456. Any roots of f (x) = x4 − 16x2 + 16 must therefore be irrational. √



5 is a root of x4 − 16x2 + 4. p √ 75. Sketch. Observe that 3 − 2 2 is a root of f (x) = x4 − 6x2 + 1. However, by the Rational Roots Theorem, f (x) has no rational roots.  p √ √ √ Let √ x = 3 − 2 2. So x2 = 3 − 2 2. So x2 − 3 = −2 2. So x4 − 6x2 + 9 = (−2 2)2 = 8. That is, x4 − 6x2 + 1 = 0. The only possible rational roots of f (x) = x4 − 6x2 + 1 are ±1. However, f (±1) = −4 6= 0. Any roots of f (x) = x4 − 6x2 + 1 must therefore be irrational. p √ 76. 2 + 3 is a root of x2 − 4x + 1. 74.

3+

√ 4

77. Sketch. Observe that √23 is a root of f (x) = 4x4 − 3. However, by the Rational √ Roots Theorem, f (x) has no rational roots.  4 √ Let x = 23 . So x4 = 34 . Hence, 4x4 − 3 = 0. The only possible rational roots of f (x) = 4x4 − 3 are ±1, ± 21 , ± 14 , ±3, ± 23 , and ± 34 . However, f (±1) = 1,

378

CHAPTER 4. ANSWERS TO ALL EXERCISES

1 191 3 69 3 111 f (± 12 ) = − 11 4 , f (± 4 ) = − 64 , f (±3) = 321, f (± 2 ) = 4 , and f (± 4 ) = − 64 . 4 Any roots of f (x) = 4x − 3 must therefore be irrational.

78.

√ 2 √ 3 5

is a root of 25x6 − 8.

is rational. So π = 2r − 1. However, 2r − 1 is 79. Proof. Suppose r = π+1 2 rational, and π is irrational. This is a contradiction.  80. Proof. Suppose r =

e−1 2

∈ Q. So e = 2r + 1 ∈ Q, a contradiction. 

81. We prove the √ contrapositive. √ Proof. Suppose x is rational. So x = ab for some a, b ∈ Z with b 6= 0. Thus, √ 2 x = ( x)2 = ab2 , and a2 , b2 ∈ Z with b2 6= 0. Hence x is rational.  82. By the Rational Roots Theorem, the rational roots must have denominator ±1 in this case. So they are integers. 83. Proof. Suppose r ∈ Q. So r = ab for some a, b ∈ Z with b 6= 0. Observe that r is a root of f (x) = bx − a and is hence algebraic.  84. Yes. It is a root of x2 − x − 1. It is

√ 1+ 5 2 .

85. Sketch. Let g(x) = rn xn + rn−1 xn−1 + · · · + r1 x + r0 be a polynomial with rational coefficients. For each 0 ≤ i ≤ n, write ri = abii , where ai , bi ∈ Z with Qn bi 6= 0. Define f (x) = g(x) i=1 bi . Observe that f (x) is a polynomial with integer coefficients, and f and g have exactly the same roots. Since the roots of f are algebraic, so are the roots ofQg.  n Notice that multiplying g(x) by i=1 bi clears allQof the denominators from n the coefficients, yielding integer coefficients. Since i=1 bi 6= 0, it follows that Qn g(x) i=1 bi = 0 if and only if g(x) = 0. Since f (x) = 0 if and only if g(x) = 0, we see that f and g have the same roots. By definition, the roots of f are algebraic. 86. Suppose a is algebraic. So a is a root of a√polynomial p(x) with integer coefficients. Let q(x) = p(x2 ). Observe that a is a root of q, and q is a polynomial with integer coefficients. 87. No.



2 is algebraic since it is a root of x2 − 2.

88. No. π + (−π) = 0. 89. Proof. Suppose not. So 2e is algebraic. Thus 2e is a root of some polynomial f (x) = cn xn + cn−1 xn−1 + · · · + c1 x + c0 , where n ∈ Z+ , cn , cn−1 , . . . , c1 , c0 ∈ Z. That is, 0 = f (2e) = cn 2n en + cn−1 2n−1 en−1 + · · · + c1 2e + c0 . Define g(x) = cn 2n xn + cn−1 2n−1 xn−1 + · · · + c1 2x + c0 . Since cn 2n , cn−1 2n−1 , . . . , c1 2, c0 ∈ Z,

4.3. CHAPTER 3

379

and g(e) = 0, we see that e is algebraic. This is a contradiction.  90. Suppose π6 is algebraic. Hence π6 is a root of a polynomial p(x) with integer coefficients. Let q(x) = p(6x). Observe that π is a root of q, and q is a polynomial with integer coefficients. So π is algebraic, a contradiction.

Section 3.5 1. True. 10 | (55 − 15).

1/8/1987 is 284 days before 10/19/1987 and −284 mod 7 = 3. Note that Monday + 3 = Thursday.

2. False. 6. Thursday. 3. False. 6 - (−7 − 21). 4. True.

7. 9 P.M. 279 mod 24 = 15 and 9 P.M. is 15 hours after 6 A.M.

5. Thursday.

8. July.

9. Theorem: (a) a ≡ a (mod n). (b) If a ≡ b (mod n), then b ≡ a (mod n). (c) If a ≡ b (mod n) and b ≡ c (mod n), then a ≡ c (mod n). (a) Sketch. a − a = 0 and n | 0.  (b) Since b − a = −(a − b), if n | (a − b), then n | (b − a). (c) Proof. Suppose a ≡ b (mod n) and b ≡ c (mod n). So n | (a − b) and n | (b − c). That is, a−b = nj and b−c = nk for some j, k ∈ Z. Observe that a−c = (a−b)+(b−c) = nj + nk = n(j + k). So n | (a − c). That is, a ≡ c (mod n).  10. (a) Proof. Suppose a1 ≡ a2 (mod n) and b1 ≡ b2 (mod n). Therefore, n | (a1 − a2 ) and n | (b1 − b2 ). It follows that n | ((a1 − a2 ) + (b1 − b2 )). That is, n | ((a1 + b1 ) − (a2 + b2 )). Hence, a1 + b1 ≡ a2 + b2 (mod n).  (b) Proof. Suppose a1 ≡ a2 (mod n). By Theorem 3.26(a), m ≡ m (mod n). Therefore, by Theorem 3.27(b), we get ma1 ≡ ma2 (mod n).  11. Proof. Suppose a1 ≡ a2 (mod n). So n | a1 − a2 . That is, a1 − a2 = nk for some k ∈ Z. Hence, −a1 − (−a2 ) = −(a1 − a2 ) = −nk = n(−k). Since −k ∈ Z, we see that −a1 ≡ −a2 (mod n).  12. Proof. Suppose a1 ≡ a2 (mod n) and b1 ≡ b2 (mod n). So a1 − a2 = nj and b1 − b2 = nk for some j, k ∈ Z. Since (a1 − b1 ) − (a2 − b2 ) = n(j − k), we see that a1 − b1 ≡ a2 − b2 (mod n).  13. Proof. Suppose a ≡ b (mod n). So a − b = nk for some k ∈ Z. So

380

CHAPTER 4. ANSWERS TO ALL EXERCISES

a2 − b2 = (a + b)(a − b) = (a + b)nk = n(a + b)k. Since (a + b)k ∈ Z, we see that a2 ≡ b2 (mod n).  14. Sketch. Use (a + c) − (b + c) = a − b.  15. Proof. Lemma 3.29 tells us that [n1 mod d] ≡ n1 ( mod d) and that [n2 mod d] ≡ n2 (mod d). (→) Suppose n1 mod d = n2 mod d. Then, [n2 mod d] ≡ n1 (mod d). It now follows from Theorem 3.26 that n1 ≡ [n2 mod d] ≡ n2 (mod d). (←) Suppose n1 ≡ n2 (mod d). So [n1 mod d] ≡ n2 (mod d). Since 0 ≤ n1 mod d < d, it follows from the uniqueness assertion in Lemma 3.29 that n1 mod d = n2 mod d.  16. False. (2 mod 3)(2 mod 3) = 4 6= 1 = (4 mod 3). 17. 8763 + 536 ≡ 13 + 11 ≡ 24 (mod 25). 8763 ≡ 13 (mod 25) and 536 ≡ 11 (mod 25). So 8763 + 536 ≡ 13 + 11 ≡ 24 (mod 25). 18. 1 + 1 = 2. 19. 4. Note that 105379 ≡ 0 (mod 10) and 14 ≡ 4 (mod 10). 20. 0 + 1 = 1. 21. 16. 2517 ≡ (252 )8 25 ≡ (−2)8 25 ≡ 256 · 25 ≡ 9 · 6 ≡ 54 ≡ 16 (mod 19). 22. 1000 = 6(166) + 4. So 1501000 ≡ 71000 ≡ 76(166) 74 ≡ (−1)166 2401 ≡ 1 · 9 ≡ 9 (mod 13). Hence, 9. 23. 1. 2050 ≡ (−1)50 ≡ 1 (mod 3). 24. Note 172 ≡ 289 ≡ −1 (mod 5). So 17100 ≡ 172(50) ≡ (−1)50 ≡ 1 (mod 5). Hence, 1. 25. 1. 13200 ≡ (−1)200 ≡ 1 (mod 7). 26. Note 305 ≡ −1 (mod 11). So 30421 ≡ 305(84) 30 ≡ (−1)84 8 ≡ 8 (mod 11). Hence, 8. 27. Proof. Let n ∈ Z. If n ≡ 0 (mod 3), then n3 − n − 1 ≡ 0 − 0 − 1 ≡ −1 ≡ 2 (mod 3). If n ≡ 1 (mod 3), then n3 − n − 1 ≡ 1 − 1 − 1 ≡ −1 ≡ 2 (mod 3).

4.3. CHAPTER 3

381

If n ≡ 2 (mod 3), then n3 − n − 1 ≡ 8 − 2 − 1 ≡ 5 ≡ 2 (mod 3). In each case, n3 − n − 1 ≡ 2 (mod 3).  28. Proof. Let n ∈ Z. If n ≡ 0 (mod 6), then n3 − 3n2 − 4n ≡ 0 − 0 − 0 ≡ 0 (mod 6). If n ≡ 1 (mod 6), then n3 − 3n2 − 4n ≡ 1 − 3 − 4 ≡ 0 (mod 6). If n ≡ 2 (mod 6), then n3 − 3n2 − 4n ≡ 8 − 12 − 8 ≡ 0 (mod 6). If n ≡ 3 (mod 6), then n3 − 3n2 − 4n ≡ 27 − 27 − 12 ≡ 0 (mod 6). If n ≡ 4 (mod 6), then n3 − 3n2 − 4n ≡ 64 − 48 − 16 ≡ 0 (mod 6). If n ≡ 5 (mod 6), then n3 − 3n2 − 4n ≡ 125 − 75 − 20 ≡ 0 (mod 6). In each case, n3 − 3n2 − 4n ≡ 0 (mod 6).  29. Sketch. If n ≡ 1, 2, or 4 (mod 7), then n3 ≡ 1 (mod 7). If n ≡ 3, 5, or 6 (mod 7), then n3 ≡ −1 (mod 7).  That is, 13 ≡ 1 ≡ 1 (mod 7), 23 ≡ 8 ≡ 1 (mod 7), 33 ≡ 27 ≡ −1 (mod 7), 43 ≡ 64 ≡ 1 (mod 7), 53 ≡ 125 ≡ −1 (mod 7), and 63 ≡ 216 ≡ −1 (mod 7), 30. Proof. Let n ∈ Z. If n ≡ 0 (mod 5), then If n ≡ 1 (mod 5), then If n ≡ 2 (mod 5), then If n ≡ 3 (mod 5), then If n ≡ 4 (mod 5), then

n4 n4 n4 n4 n4

≡ 0 (mod 5). ≡ 1 (mod 5). ≡ 16 ≡ 1 (mod 5). ≡ 81 ≡ 1 (mod 5). ≡ 256 ≡ 1 (mod 5). 

31. (a) Sketch. We have n ≡ 1, 3, 5, or 7 (mod 8). So n2 ≡ 1, 9, 25, or 49 (mod 8), respectively. That is, n2 ≡ 1 (mod 8).  (b) Multiply both sides of n2 ≡ 1 (mod n) by n. 32. Sketch. If n = 2k, then n3 = 4(2k 3 ). If n = 4k + 1, then n3 = 4(16k 3 + 12k 2 + 3k) + 1. If n = 4k + 3, then n3 = 4(16k 3 + 36k 2 + 27k + 6) + 3.  33. Proof. Suppose n ≡ r (mod 3). So 3 | (n − r). That is, n − r = 3k for some k ∈ Z. Observe that 2n − 2r = 2r (2n−r − 1) = 2r (23k − 1) = 2r (8k − 1). Since 8 ≡ 1 (mod 7), we have 8k ≡ 1 (mod 7). That is, 7 | 8k − 1. So 7 | 2n − 2r . Therefore, 2n ≡ 2r (mod 7).  34. Proof. Suppose n ≡ r (mod 4), so n − r = 4k for some k ∈ Z. So 3n ≡ 34k+r ≡ 81k 3r ≡ 1k 3r ≡ 3r (mod 10).  Values: 1, 3, 9, 7. 35. Proof. Suppose a ≡ b (mod m) and a ≡ −b (mod n) So m | (a − b) and n | (a + b). Hence, mn | (a + b)(a − b). That is, mn | (a2 − b2 ). Therefore, a2 ≡ b2 (mod mn) 

382

CHAPTER 4. ANSWERS TO ALL EXERCISES

36. (a) No. Let a = 1, b = 3, m = n = 2. (b) Yes. Let m 6= n be primes. We have a−b = mk for some k. Since n | mk and gcd(n, m) = 1, it must be that n | k. So k = nj for some j. Hence, a − b = mnj. Thus, mn | (a − b). That is, a ≡ b (mod mn). 37. 23. See Exercise 19 from Section 3.3. Since 55(−5) + 12(23) = 1, we see that 12 · 23 ≡ 1 (mod 55). 38. −16. See Exercise 20 from Section 3.3. 39. 7. 18(7) + 25(−5) = 1. 40. 9. 33(9) + 74(−4) = 1. 41. “PZSNQRURHGJUX”. We use y = (2x+8) mod 27. E.g., D = 4 encrypts to (2·4+8) mod 27 = 16 = P . 42. “MUSHLTCRXWA”. 43. “BORAT”. Note that 14 is a multiplicative inverse of 2 modulo 27. Hence, we use x = 14(y − 13) mod 27. E.g., Q = 17 decrypts to 14(17 − 13) mod 27 = 2 = B. 44. “ATTACK NOW”. 45. Proof. Suppose to the contrary that x, y ∈ {0, 1, . . . , n − 1} and x ≡ y ( mod n). Say x > y. Observe that 0 ≤ x − y < n. (In fact, 0 < x − y ≤ n − 1.) However, n | (x − y) and n > x − y is impossible here. This is a contradiction.  46. Suppose ab1 ≡ ab2 (mod n) for some b1 , b2 ∈ Z. By the Modular Cancellation Rule, b1 ≡ b2 (mod n). Since b1 , b2 ∈ {0, 1, . . . , n − 1}, we get b1 = b2 . 47. Sketch. Existence of an inverse is given by Lemma 3.31. That a representative can be chosen in {0, 1, . . . , n − 1} is given by Lemma 3.29. Its uniqueness is then guaranteed by Exercise 45.  48. Sketch. (→) Use y = (1 + b) mod n. A solution x to y = (ax + b) mod n is a solution to 1 ≡ ax (mod n), which is a multiplicative inverse of a modulo n. Hence gcd(a, n) = 1. (←) Let c be a multiplicative inverse of a modulo n, and suppose y ∈ {0, 1, . . . , n − 1}. Let x = c(y − b) mod n. Thus, ax + b ≡ ac(y − b) + b ≡ y − b + b ≡ y (mod n), and hence y = (ax + b) mod n. Now suppose

4.3. CHAPTER 3

383

(ax1 + b) mod n = y = (ax2 + b) mod n. So ax1 + b ≡ ax2 + b (mod n), and it follows that x1 ≡ x2 (mod n). So x1 = x2 , when x1 , x2 ∈ {0, 1, . . . , n − 1}.  49. 6. Use 29 = 16 + 8 + 4 + 1, and 132 ≡ 15, 134 ≡ 71, 138 ≡ 36, 1316 ≡ 64 ( mod 77). 50. 21. Use 9 = 8 + 1, and 112 ≡ 56, 114 ≡ 16, 118 ≡ 61 (mod 65). 51. 79. Use 17 = 16 + 1, and 312 ≡ 4, 314 ≡ 16, 318 ≡ 82, 3116 ≡ 25 (mod 87). 52. 21. Use 19 = 16 + 2 + 1, and 132 ≡ 45, 134 ≡ 41, 138 ≡ 7, 1316 ≡ 49 (mod 62). 53. Note that n = 5 · 11 = 55. (a) y = 2, since xa mod n = 87 mod 55 = 2. (b) y = 14, since xa mod n = 497 mod 55 = 14. (c) Discover, since y c mod n = 123 mod 55 = 23 = Discover. (d) MasterCard, since y c mod n = 353 mod 55 = 30 = MasterCard. 54. (a) y = 42. (b) y = 50. (c) It’s My Turn. (d) A Beautiful Mind. 55. 16. By Fermat’s Little Theorem, 1016 ≡ 1 (mod 17). By hand, we can see that 102 ≡ −2 (mod 17). So 101000 ≡ (1016 )62 108 ≡ 108 ≡ (102 )4 ≡ (−2)4 ≡ 16 (mod 17). 56. Note 36 ≡ 1 (mod 7). So 3400 ≡ 36(66)+4 ≡ 34 ≡ 4 (mod 7). Hence, 4. 57. Corollary: If a, p ∈ Z with p prime, then ap ≡ a (mod p). Sketch. When p | a, ap ≡ 0 ≡ a (mod p). When p - a, multiply both sides of ap−1 ≡ 1 (mod p) by a.  We apply Fermat’s Little Theorem in the case that p - a. 58. It is the contrapositive of Corollary 3.33. 59. Sketch. 2253 ≡ (28 )31 25 ≡ 25631 25 ≡ 331 25 ≡ (35 )6 3 · 25 ≡ 2436 3 · 25 ≡ (−10)6 3 · 25 ≡ 162 6≡ 2 (mod 253).  60. Sketch. 3208 ≡ (35 )41 33 ≡ 3441 33 ≡ (343 )13 342 33 ≡ 1213 342 33 ≡ (123 )4 12 · 71 ≡ 564 · 852 ≡ 16 (mod 209).  61. Sketch. Observe that x ∈ {1, . . . , p − 1} and x2 ≡ 1 (mod p) if and only if x = 1 or p − 1. Hence, the suggested pairing off of values in the product (p − 1)!

384

CHAPTER 4. ANSWERS TO ALL EXERCISES p−3

gives (p − 1)! = (p − 1) · 1 2 · 1 ≡ −1 (mod p).  Note that p divides x2 − 1 = (x − 1)(x + 1) if and only if p | x − 1 or p | x + 1. With x ∈ {1, . . . , p − 1}, this happens only if x − 1 = 0 or x + 1 = p. That is, x = 1 or x = p − 1. 62. Sketch. If r is a divisor of n in {2, . . . , n − 1}, then r divides both (n − 1)! and (n − 1)! + 1. This contradicts Lemma 3.3.  63. 10d1 + 9d2 + 8d3 + 7d4 + 6d5 + 5d6 + 4d7 + 3d8 + 2d9 + d10 = −(d1 + 2d2 + 3d3 + 4d4 + 5d5 + 6d6 + 7d7 + 8d8 + 9d9 + 10d10 )+ 11(d1 + d2 + d3 + d4 + d5 + d6 + d7 + d8 + d9 + d10 ). We appeal to Lemma 3.29, so that we may work with congruence modulo 11. The above equation shows that [10d1 + 9d2 + 8d3 + 7d4 + 6d5 + 5d6 + 4d7 + 3d8 + 2d9 +d10 ] ≡ −[d1 +2d2 +3d3 +4d4 +5d5 +6d6 +7d7 +8d8 +9d9 +10d10 ] ( mod 11). If these are congruent to 0 modulo 11, then so are their negatives. 64. We have ac = 1 + mk and m = (p − 1)u = (q − 1)v. By Fermat’s Little Theorem, p | (xm − 1) and q | (xm − 1). Hence, pq | (xm − 1). Therefore, y c ≡ xac ≡ x1+mk ≡ x1 ≡ x (mod pq). 65. x = 3. Note that 32 ≡ 9 ≡ −1 (mod 10). 66. x = 4. 67. x = 2, y = 5. Note that 2 6≡ 0 (mod 10), 5 6≡ 0 (mod 10), and 2 · 5 ≡ 0 (mod 10). 68. x = 0, y = 4. 69. [2]3 . Note that 8 ≡ 2 (mod 3) and 0 ≤ 2 < 3. 70. [2]10 . 71. [3]4 . Note that 10 + 5 ≡ 15 ≡ 3 (mod 4) and 0 ≤ 3 < 4. 72. [4]10 . 73. [1]10 . Note that 18 + 217 + 3146 ≡ 8 + 7 + 6 ≡ 21 ≡ 1 (mod 10) and 0 ≤ 1 < 10. 74. [9]12 .

4.3. CHAPTER 3

385

75. {k : k ≡ a (mod n)} = {k : k ≡ b (mod n)} if and only if a ≡ b (mod n). Proof. (→) Suppose [a]n = [b]n . Since b ∈ [b]n = [an ], the definition of [a]n gives b ≡ a (mod n). (←) Suppose a ≡ b (mod n). Since it follows that k ≡ a (mod n) if and only if k ≡ b (mod n), we get [a]n = [b]n .  76. Proof. Suppose c ∈ [a]n ∩ [b]n 6= ∅. Thus, c ≡ a (mod n) and c ≡ b (mod n). Hence, a ≡ b (mod n). Moreover, ∀ k ∈ Z, k ≡ a (mod n) if and only if k ≡ b (mod n). Thus, [a]n = [b]b .  77. Proof. (⊆) Suppose k ∈ [a]n + [b]n . So k = s + t for some s ∈ [a]n and t ∈ [b]n . Thus s ≡ a (mod n) and t ≡ b (mod n). Since s + t ≡ a + b (mod n), it follows that k ∈ [a + b]n . (⊇) Suppose k ∈ [a + b]n . So k ≡ a + b (mod n). That is, n | (k − a − b). Note that k = a + (k − a) and k − a ≡ b (mod n). Therefore, k ∈ [a]n + [b]n .  78. −[b]n = {−k : k ≡ b (mod n)} = {j : −j ≡ b (mod n)} = {j : j ≡ −b (mod n)} = [−b]n . 79. Sketch. By Exercises 77 and 78, [a]n − [b]n = [a]n + [−b]n = [a − b]n .  80. (S + T ) + U = {r + u : r ∈ S + T, u ∈ U } = {s + t + u : s ∈ S, t ∈ T, u ∈ U } = {s + v : s ∈ S, v ∈ T + U } = S + (T + U ). 81. Sketch. Any k ≡ a (mod n) can be written as k = 0 + k.  This is also a special case of Exercise 77. 82. [−a]n + [a]n = {k + j : k ≡ −a (mod n) and j ≡ a (mod n)} = {i : i ≡ 0 (mod n)} = [0]n . 83. Note that n = 10(10k−1 ak + 10k−2 ak−1 + · · · + a1 ) + a0 and 10(10k−1 ak + 10k−2 ak−1 + · · · + a1 ) ≡ 0 (mod 5). So n ≡ 0 + a0 ≡ a0 (mod 5). 84. n − m = 10k ak + · · · + 102 a2 = 4(25)(10k−2 ak + · · · + 100 a2 ). So 4 | (n − m). 85. Note that 10k ak + 10k−1 ak−1 + · · · + 100 a0 ≡ 1k ak + 1k−1 ak−1 + · · · + 10 a0 (mod 9). Also, n is divisible by 3 iff n ≡ 0, 3, or 6 (mod 9). Note that 10 ≡ 1 (mod 9). So n ≡

10k ak + 10k−1 ak−1 + · · · + 100 a0



1k ak + 1k−1 ak−1 + · · · + 10 a0



ak + ak−1 + · · · + a0



m (mod 9).

Observe that n is divisible by 3 iff n ≡ 0, 3, or 6 (mod 9).

386

CHAPTER 4. ANSWERS TO ALL EXERCISES

86. n − m = (102j+1 + 1)a2j+1 + 102(j−1)+1 + 1)a2(j−1)+1 + · · · + (10 + 1)a1 . Since, ∀ i ∈ N, 102i+1 + 1 ≡ (−1)2i+1 + 1 ≡ −1 + 1 ≡ 0 (mod 11), we see that 11 | (n − m).

Review 1. Proof. Let m and n be even integers. So m = 2j and n = 2k for some j, k ∈ Z. Observe that mn = 2(2jk). Since 2jk ∈ Z, we see that mn is even.  2. Proof. Suppose n is even. So n = 2k for some k ∈ Z. So n2 = 4k 2 . Hence, 4 | n2 .  3. No, since 6 - 52. 4. Sketch. (a + b)3 − b3 = a(a2 + 3ab + 3b2 ).  (a+b)3 −b3 = a3 +3a2 b+3ab2 +b3 −b3 = a(a2 +3ab+3b2 ) and a2 +3ab+3b2 ∈ Z. 5. Proof. (→) Suppose a | b. So b = ak for some k ∈ Z. Since b = (−a)(−k), we see that −a | b. (←) Suppose −a | b. So b = −ak for some k ∈ Z. Since b = a(−k), we see that a | b.  6. No, 91 = 7 · 13. No, by definition, primes are greater than 1. 7. Yes. gcd(14, 33) = 1. 8. Proof. Suppose a | n and a | (n + 2). So n = aj and n + 2 = ak for some j, k ∈ Z. Observe that 2 = (n + 2) − n = ak − aj = a(k − j). So a | 2.  9. 91. gcd(7 · 11 · 13, 5 · 7 · 13) = 7 · 13 = 91. 10. Proof. Let n ∈ Z with n 6= 0. Case 1 : n > 0. So n > 0, n | n, and n | −n. Also, if c | n and c | −n, then, in particular, c | n, whence c ≤ n. So gcd(n, −n) = n = |n|. Case 2 : n < 0. So −n > 0, −n | n, and −n | −n. Also, if c | n and c | −n, then, in particular, c | −n, whence c ≤ −n. So gcd(n, −n) = −n = |n|.  In each case (d = n or d = −n), we verify that gcd(n, −n) = d by checking the three conditions: (i) d > 0, (ii) d | n and d | −n, and (iii) if c | n and c | −n, then c ≤ d.

4.3. CHAPTER 3

387

11. (a) a = 2, b = 3, m = 2, n = 2. Note that gcd(2, 3) = 1 = gcd(22 , 32 ). (b) Proof. Let d = gcd(a, b). Since d | a and d | b, it follows that d | am and d | bn . Therefore d ≤ gcd(am , bn ).  (c) gcd(a, b) > 1, since if gcd(a, b) = 1, then gcd(am , bn ) = 1. At least one of m > 1 or n > 1, since gcd(a, b) = gcd(a1 , b1 ). Note that gcd(4, 6) < gcd(41 , 62 ). So both m, n > 1 is not forced. 12. 840. 120 = 12 · 10, 84 = 12 · 7, and 12 · 10 · 7 = 840. 13. Sketch. Let i = max{j, k}. So mi > 0, mj | mi , and mk | mi . If c ∈ Z+ , mj | c, and mk | c, then mi | c, whence mi ≤ c.  We verify that lcm(mj , mk ) = l by checking the three conditions: (i) l > 0, (ii) mj | l and mk | l, and (iii) if mj | c and mk | c, then l ≤ c. 14. 5. Observe that 5 = 10(−2) + 25(1). Note that 5 | (10x + 25y). Since 5 does not divide 1, 2, 3, or 4, there is no element smaller than 5. 15. False. 2113 − 1 = 3391 · 23279 · 65993 · 1868569 · 1066818132868207. 16. 12 remainder 5. 101 = 8(12) + 5 and 0 ≤ 5 < 8. 17. (a) 6 and 1, since 43 = 7(6) + 1 and 0 ≤ 1 < 7. (b) −6 and 3, since −51 = 9(−6) + 3 and 0 ≤ 3 < 9. 18. 2 remain, and each have 17. 104 mod 6 = 2. 104 div 6 = 17. 19. Proof. Write n = 3q + r, where r = 0, 1, or 2. So n3 − n = 27q 3 + 9q 2 r + 3qr2 + r3 − (3q + r) = 3(9q 3 + 3q 2 r + qr2 − q) + r3 − r. If r = 0, then r3 − r = 0. If r = 1, then r3 − r = 0. If r = 2, then r3 − r = 3(2). In each case, 3 | (r3 − r), so 3 | (n3 − n). Thus, (n3 − n) mod 3 = 0.  With the tools of Section 3.5, the following argument also works. Sketch. If n ≡ 0 (mod 3), then n3 − n ≡ 0 − 0 ≡ 0 (mod 3). If n ≡ 1 (mod 3), then n3 − n ≡ 1 − 1 ≡ 0 (mod 3). If n ≡ 2 (mod 3), then n3 − n ≡ 8 − 2 ≡ 6 ≡ 0 (mod 3).  20. Proof. Suppose n is odd. So n = 2k + 1 for some k ∈ Z. Thus, n2 = 4k 2 + 4k + 1 = 4(k 2 + k) + 1. Since n2 mod 4 = 1 6= 0, we see that 4 - n2 . 

388

CHAPTER 4. ANSWERS TO ALL EXERCISES

Alternative via contrapositive. Proof. Suppose 4 | n2 . So n2 = 4k for some k ∈ Z. Since n2 = 2(2k), we see that n2 is even. Hence, n is even. That is, n is not odd.  21. (a) 6, since 6 ≤ 6.6 < 7. (b) −7, since −7 ≤ −6.6 < −6. 22. (a) 6, since 5 < 5.4 ≤ 6. (b) −5, since −6 < −5.4 ≤ −5. 23. Proof. Suppose 4 | n. So n = 4k for some k ∈ Z. Thus, n n+2 n+2 n n+2 n 4 ≤ 4 and 4 < 4 + 1. Therefore, b 4 c = 4 . 

n 4

= k ∈ Z. Also,

24. Sketch. Certainly dxe ∈ Z and dxe − 1 < dxe ≤ dxe.  Since dxe is an integer, this is effectively the fact that ∀ n ∈ Z, dne = n. 25. 3. No. Let c = #. So 10(0) + 9(8) + 8(2) + 7(1) + 6(8) + 5(c) + 4(4) + 3(6) + 2(1) + 4 = 183 + 5c. Since 11 | (183 + 5 · 3), we get c = 3. Suppose the check digit 4 was also smudged. Call its now unknown value d. So 179 + 5c + d is divisible by 11 both when c = 3, d = 4 and when c = 2, d = 9. 26. “MDPSZIDXSQ”. Use y = x + 4 mod 27. E.g., I = 9 encrypts to y = 9 + 4 mod 27 = 13 = M . n . 27. gcd(b,n) 27 . In general, let m be the number Note in the given example that 9 = gcd(6,27) of cycles. So mk = n. By using the ideas in Exercise 45(c) from Section 3.1, we see that m = gcd(b, n).

28. x = 3 and y = −2. 35(3) + 49(−2) = 7. 29. Sketch. Let x = −11, y = 24.  Observe that 85(−11) + 39(24) = 1. 30. gcd(110, 88) = gcd(88, 22) = gcd(22, 0) = 22. 31. gcd(810, 245) = gcd(245, 75) = gcd(75, 20) = gcd(20, 15) = gcd(15, 5) = gcd(5, 0) = 5. 32. x = −1, y = 2. Note that gcd(81, 45) = 9, 81 = 45 + 36, and 45 = 36 + 9. So 9 = 45 − 36 = 45 − (81 − 45) = 85(−1) + 45(2).

4.3. CHAPTER 3

389

33. x = 5, y = −16. Note that gcd(77, 24) = 1, 77 = 3(24) + 5, 24 = 4(5) + 4, and 5 = 4 + 1. So 1 = 5 − 4 = 5 − (24 − 4(5)) = 24(−1) + 5(5) = 24(−1) + (77 − 3(24))(5) = 77(5) + 24(−16). 34. Proof. Suppose 5 | am bn . Since 5 is prime, Corollary 3.17 tells us that 5 | am or 5 | bn . By Corollary 3.19, it follows that 5 | a or 5 | b.  35. Sketch. 6 | 52n iff 3 | 26n iff 3 | n, by Euclid’s Lemma.  Note that 52n = 6k iff 26n = 3k. Also, gcd(3, 26) = 1. 36. No. Take a = 2 and b = 5. 37. (a) Since 5 | (25x + 10y) for all integers x, y, only multiples of 5 can be achieved. For example, all values of the form 5k + 1 cannot be achieved. (b) 5¢ and 15¢. (c) n¢, for all odd n < 25. 38. Proof. Observe that 6 34 =

27 4

and 27, 4 ∈ Z with 4 6= 0. Thus, 6 43 ∈ Q. 

39. Proof. Observe that 1.414 = 157 111 and 157, 111 ∈ Z with 111 6= 0. Thus, 1.414 ∈ Q.  √ 24649 24642 2 Since ( 157 2. 111 ) = 12321 > 12321 = 2, it follows that 1.414 > 40. Proof. Observe that 1.625 =

1609 990

and 1609, 990 ∈ Z with 990 6= 0. 

41. Proof. Suppose r ∈ Q. So r = ab for some a, b ∈ Z with b 6= 0. Observe that 3r 3a 3r 4 = 4b and 3a, 4b ∈ Z with 4b 6= 0. So 4 ∈ Q.  42. Proof. Suppose r ∈ Q. So r = ab for some a, b ∈ Z with b 6= 0. Observe that 2 r2 = ab2 and a2 , b2 ∈ Z with b2 6= 0. So r2 ∈ Q.  43. Sketch. Suppose p is a prime such that p | a2 and p | b2 . It follows that p | a and p | b. So p | gcd(a, b). Thus, if gcd(a, b) = 1, then it must also be that gcd(a2 , b2 ) = 1.  44. 0.45. 1

1 ) -

. 5. 4 -

45. Sketch. Write



4 0 4 6 5

7=

5 0 0 5 5 a b

0 remainder 6 remainder 5 ← REPEAT

√ in lowest terms. So b 7 = a. So b2 7 = a2 . So 7 | a2 .

390

CHAPTER 4. ANSWERS TO ALL EXERCISES

By Corollary 3.19, 7 | a. Write a = 7c. So b2 7 = a2 = 49c2 . So b2 = 7c2 . So 7 | b2 . By Corollary 3.19, 7 | b. So gcd(a, b) ≥ 7. This is a contradiction.  √ √ 46. Proof. Suppose r = 5+3 7 is rational. So 7 = 3r − 5. However, 3r − 5 √ √ is rational, and 7 is irrational. This is a contradiction. Therefore, r = 5+3 7 must be irrational.  a

47. Sketch. Write log3 11 = ab with a, b ∈ Z+ . So 3 b = 11. So 3a = 11b . By the Fundamental Theorem of Arithmetic, this is impossible.  2

48. Sketch. (a) Suppose r = e 3−4 ∈ Q. However, we get e2 = 3r + 4 ∈ Q. a (b) Write ln 2 = ab for a, b ∈ Z+ . So e b = 2. However, ea = 2b ∈ Z.  p √ 49. Sketch. Observe that 3 + 2 is a root of f (x) = x4 − 6x2 + 7. By the Rational Roots Theorem, f has no rational roots.  The only possibilities ±1, ±7 are not roots. √ 3

50. Sketch. Observe that √52 is a root of f (x) = 125x6 − 4. By the Rational Roots Theorem, f has no rational roots.  a The only possibilities ± 23b , for 0 ≤ a ≤ 3 and 0 ≤ b ≤ 2, are not roots. q p √ 51. Sketch. Observe that 12 2 + 2 + 2 is a root of f (x) = 256x8 − 512x6 + 320x4 − 64x2 + 2. By the Rational Roots Theorem, f has no rational roots.  The only possibilities ± 21a , for 0 ≤ a ≤ 7, are not roots. 52. No, it equals 4. Call it x, and observe that x2 = 16. 53. Yes, they are the same as the roots of 15x2 − 8x + 12. That is, multiplying the given polynomial by 12 clears the denominators and leaves integer coefficients. 54. Wednesday, since (28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 27) mod 7 = 3 and Sunday + 3 = Wednesday. 55. Proof. Suppose a ≡ b (mod n). So n | (a − b). That is, a − b = nk for some k ∈ Z. So ac − bc = (a − b)c = nkc. Since n | (ac − bc), it follows that ac ≡ bc (mod n).  56. (a) 7. Note that 11 ≡ 2 (mod 9) and 1110 ≡ 210 ≡ 1024 ≡ 7 (mod 9). (b) 11. Note that 23 ≡ −1 (mod 12) and 234321 ≡ (−1)4321 ≡ −1 ≡ 11 (mod 12).

4.3. CHAPTER 3

391

57. Proof. Suppose n is odd. So n ≡ 1 or 3 (mod 4). If n ≡ 1 (mod 4), then n2 ≡ 12 ≡ 1 (mod 4). If n ≡ 3 (mod 4), then n2 ≡ 32 ≡ 9 ≡ 1 (mod 4). In both cases, n2 ≡ 1 (mod 4).  58. Sketch. If n ≡ 1 (mod 3), then n2 ≡ 12 ≡ 1 (mod 3). If n ≡ 2 (mod 3), then n2 ≡ 22 ≡ 4 ≡ 1 (mod 3).  59. “RSA”. Note that c = 7 is a multiplicative inverse of a = 4 modulo 27. Use x = 7(y − 1) mod 27. E.g., S = 19 decrypts to 7(19 − 1) mod 27 = 126 mod 27 = 18 = R. 60. −9, since 11(−9) + 50(2) = 1. 61. 172. Use 49 = 32 + 16 + 1, and 192 ≡ −30, 194 ≡ 118, 198 ≡ 239, 1916 ≡ 35, 1932 ≡ 52 (mod 391). 62. (a) 32. (b) “The package has been received.” is the message that was sent. Note that n = 7 · 13 = 91 and m = lcm(6, 12) = 6. Moreover, c = 5 is a multiplicative inverse of a = 17 modulo 6. 63. 4. By Fermat’s Little Theorem, 910 ≡ 1 (mod 11). So 95432 ≡ 92 ≡ 4 (mod 11). 64. [2]5 , since 7 ≡ 2 (mod 5). 65. [1]3 , since 8 + 2 ≡ 10 ≡ 1 (mod 3). 66. [4]7 , since 17 − 208 + 1343 ≡ 3 − 5 + 6 ≡ 4 (mod 7). 67. Proof. Since a ≡ a (mod n), we have a ∈ [a]n . 

392

CHAPTER 4. ANSWERS TO ALL EXERCISES

4.4

Chapter 4

Section 4.1 1. 3628800. 10 · 9 · 8 · 7 · 6 · 5 · 4 · 3 · 2 · 1 = 3628800. 2. 479001600. 3. 21. 7! 5!2! =

7·6 2

= 21.

4. 56. 5. 126. 9·8·7·6 9! 4!5! = 4·3·2 = 126. 6. 210. 7.

n k

8.

n k−1



= 

n! k!(n−k)!

+

n k



=

=

n! (n−k)!k!

=

n! (n−k)!(n−(n−k))!

n! n! (k−1)!(n−k+1)! + k!(n−k)!

=

=

n n−k



.

n!k+n!(n−k+1) k!(n−k+1)!

9. False. It fails for n = 2, since (22 )! = 24 and (2!)2 = 4. 10. True. 11. False. It fails for n = 4, since 2! 6= 12 =

4! 2.

12. False. Try k = 1, n = 2. 13. 4, 2, 0, −2. 4 − 2(0) = 4, 4 − 2(1) = 2, 4 − 2(2) = 0, 4 − 2(3) = −2. 14. .01, .1, 1, 10. 15. 6, 12, 40, 180. 3! 4! 3−2 = 6, 4−2 = 12,

5! 5−2

= 40,

6! 6−2

= 180.

16. 3, 0, −6, −18. 17. 7, 9, 11, 13. 3 + 2(2) = 7, 3 + 2(3) = 9, 3 + 2(4) = 11, 3 + 2(5) = 13.

=

n!(n+1) k!(n+1−k)!

=

n+1 k



.

4.4. CHAPTER 4

393

18. 20, 35, 56, 84. 19. 47. 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47. 20. 25. 21. ∀ n ≥ 1, tn = 2n. This is an arithmetic sequence with common difference c = 2 and s0 = 2. So ∀ n ≥ 0, sn = 2 + 2n works in addition to the above formula. 22. ∀ n ≥ 1, sn = (−1)n+1 n2 . 23. ∀ n ≥ 0, sn = 3 · 2n . This is a geometric sequence with multiplying factor r = 2 and s0 = 3. 24. ∀ n ≥ 0, sn =

(2n+1)π . 2

25. ∀ n ≥ 0, sn = (−1)n (2n + 1). This is an alternating sequence. Thus the factor (−1)n appears in the formula. If we remove the signs, then the sequence becomes 1, 3, 5, 7, 9, . . .. This is an arithmetic sequence and can also be seen to be the sequence of odd positive integers. √ 26. ∀ n ≥ 0, sn = (5 2)2n . 27. ∀ n ≥ 1, sn = n1 . The terms are fractions with numerator one. The sequence of denominators is 1, 2, 3, 4, 5, . . .. 28. ∀ n ≥ 3, sn =

n 3



.

29. (a) 6000(1.03) = 6180 after 1 period. 6180(1.03) = 6365.40 after 2 periods. (b) 1000(1 + i)2 . No, since i = .02 yields $40.40 in interest and i = .01 yields $20.10. (c) ∀ n ≥ 0, sn = P (1 + i)n . A geometric sequence. Note that s0 = P , s1 = P + P i = P (1 + i), s2 = s1 (1 + i) = P (1 + i)(1 + i) = P (1 + i)2 , etc. This is a geometric sequence with multiplying factor r = i and s0 = P . 30. (a) 70. (b) 5000 + (b − c)3. ∀ n ≥ 0, sn = a + (b − c)n. An arithmetic sequence. 31. ∀ n ≥ 0, tn = 10n−2 . Let m = n − 1. So n = m + 1. Thus, sn = 10n−3 = 10m+1−3 = 10m−2 = tm .

394

CHAPTER 4. ANSWERS TO ALL EXERCISES

32. ∀ n ≥ 0, tn =

(n+3)! n+1 .

33. ∀ n ≥ 0, tn = 7 + 2n. Let m = n − 2. So n = m + 2. Thus, sn = 3 + 2n = 3 + 2(m + 2) = 7 + 2m = tm . 34. ∀ n ≥ 0, tn =

n+6 3



.

n . 35. ∀ n ≥ 0, tn = (−1)n n+2 m+2 m+2−2 Let m = n − 2. So n = m + 2. Thus, sn = (−1)n n−2 n = (−1) m+2 = m 2 m m m (−1) (−1) m+2 = (−1) m+2 = tm .

36. ∀ n ≥ 0, tn =

(−1)n+1 . n!

37. 4, 10, 28, 82. s1 = 4, s2 = 3s1 − 2 = 3(4) − 2 = 10, s3 = 3s2 − 2 = 3(10) − 2 = 28, s4 = 3s3 − 2 = 3(28) − 2 = 82. 38.

1 2 1 2 3, 3, 3, 3.

39. 5, 3, 1, −1. s2 = 5, s3 = s2 −2 = 5−2 = 3, s4 = s3 −2 = 3−2 = 1, s4 = s3 −2 = 1−2 = −1. 40.

π 5π 9π 13π 4, 4 , 4 , 4 .

41. −1, −4, −19, −94. Use s1 = − 41 . In general, sm+1 = 5sm + 1 ≥ sm iff 4sm ≥ −1 iff sm ≥ 42. 2, 3, 8, 63. Use s1 =

−1 4 .

√ 1+ 5 2 .

43. t1 = 2, and ∀ n ≥ 2, tn = 2 + tn−1 . This is an arithmetic sequence with common difference c = 2 and s0 = 2. So t0 = 2, and ∀ n ≥ 1, tn = 2 + tn−1 also works. 44. s1 = 2, ∀ n ≥ 2, sn = sn−1 + 2. 45. s0 = 3, and ∀ n ≥ 1, sn = 2sn−1 . This is a geometric sequence with multiplying factor r = 2 and s0 = 3. 46. s0 =

π 2,

∀ n ≥ 1, sn = sn−1 + π.

47. s0 = 1, and ∀ n ≥ 1, sn = sn−1 + (−1)n 4n. Consider the differences between terms: −3 − 1 = −4, 5 − (−3) = 8, −7 − 5 = −12, 9 − (−7) = 16, etc. So the differences form an alternating sequence of multiples of 4. That is, sn − sn−1 = (−1)n 4n.

4.4. CHAPTER 4

395

√ 48. s0 = 5 2, ∀ n ≥ 1, sn = 2sn−1 . 49. s1 = 1, and ∀ n ≥ 2, sn =

sn−1 1+sn−1 .

50. s1 = 1, s2 = 4, ∀ n ≥ 3, sn = sn−2 + n2 . 51. (a) s2 = 1000(1.05) + 1000 = 2050, s3 = s2 (1 + i) + D = 2050(1.05) + 1000 = 3152.50. (b) s11 = s10 (1.04) + 100 = 1348.63. (c) s0 = 0, and ∀ n ≥ 1, sn = (1 + i)sn−1 + D. Notice the pattern in the previous parts. 52. (a) s2 = 849.39, s3 = 771.82. (b) 79468.05. (c) s0 = M, ∀ n ≥ 1, sn = (1 + i)sn−1 − R. 53. sk+1 = 3s(k+1)−1 − 2 = 3sk − 2. 54. sk+1 = 1 − sk . 55. sk+1 = s(k+1)−1 − 2 = sk − 2. 56. sk+1 = 3sk + π. 57. s2 = 5(1) − 3(−1) = 8, s3 = 5(−1) − 3(8) = −29, sk+1 = 5s(k+1)−2 − 3s(k+1)−1 = 5sk−1 − 3sk . 58. sk+1 = s2k − s2k−1 . 59. ∀ n ≥ 2, sn = sn−1 − 2. Let m = n + 1. So ∀ m ≥ 2, sm = sm−1 − 2. 60. ∀ n ≥ 1, sn = 3sn−1 + π. 61. ∀ n ≥ 2, sn = 5sn−2 − 3sn−1 . Let m = n + 2. So ∀ m ≥ 2, sm = 5sm−2 − 3sm−1 . 62. sn = s2n−1 − s2n−2 . 63. (a) In Mathematica, use In[1]:= AppRt2[n_] := 1 + 1/(1 + AppRt2[n - 1]) In[2]:= AppRt2[0] := 1 (b) 1.41421. (c) The 12th. You should play with this in Mathematica or some other mathematical software. 64. (a) In Mathematica, use

396

CHAPTER 4. ANSWERS TO ALL EXERCISES

In[1]:= Gold[n_] := Sqrt[1 + Gold[n - 1]] In[2]:= Gold[0] := 1 (b) 1.6180323. (c) The 11th.

Section 4.2 65 24

1. 1 0!

+

≈ 2.708. 1 1 + 2! + 3! +

1 1!

1 4!

65 24 .

=

2. 35. 25·26·51 6

3. 4.

= 5525.

 15·16 2 2

= 14400.

P10 3 5. i=1 i = 3025. Apply Theorem 4.2(d) with n = 10, since 103 = 1000. 6.

P1000 i=1

1000(1001) 2

i=

= 500500.

P10 i 7. i=1 2 = 2047. Note 1 = 20 and 1024 = 210 . Apply Theorem 4.3 with r = 2 and n = 10. 8.

P10

i=0

3i =

311 −1 3−1

= 88573.

P9 i 9. i=1 (−2) = −342. Theorem 4.3 with r = −2 and n = 9 gives 1 − 2 + 4 − 8 + 16 − · · · − 512 = −341. From this we must subtract the extraneous 1 = (−2)0 . 10.

P500

i=2 (2i

− 1] + 499 = 250997. + 1) = 2[ 500(501) 2

Pn n(n+1)(2n+1) 2 11. − 3. i=2 3i = 2 The last term 3n2 gives us a clue. Note that 3i2 works for the general term and that the first term is when i = 2. 12.

Pn

i=1

i3 = [ n(n+1) ]2 . 2

Pn 13. i=1 4i = 43 (4n − 1). Note that 4 = 41 , so our sum starts with i = 1. Since the formula in Theorem 4.3 requires starting at i = 0, we must subtract the n+1 i = 0 term from that sum. That is, 4 4−1−1 − 40 = 43 (4n − 1). 14.

Pn

15.

Pn

i=1

2 · 3i = 2[ 3

i i=2 (−3)

=

n+1

2

−1

− 1] = 3n+1 − 3.

9−(−3)n+1 . 4

4.4. CHAPTER 4

397 (−3)n+1 −1 . −3−1

Theorem 4.3 with r = −3 gives extraneous (−3)0 + (−3)1 . 16.

Pn

i=1 (−1)

i+1

From this we must subtract the

2i = 2(−1)n+1 b n+1 2 c. See pattern.

17. (a) s2 = D(1 + i) + D, s3 = s2 (1 + i) + D = [D(1 + i) + D](1 + i) + D = D(1 + i)2 + D(1 + i) + D. s4 = s3 (1 + i) + [D(1 + i)2 + D(1 + i) + D](1 + i) + D = D(1+i)3 +D(1+i)2 +D(1+i)+D. (b) 100(1.01)3 +100(1.01)2 +100(1.01)+100 = Pn−1 406.04. (c) sn = D(1+i)n−1 +D(1+i)n−2 +· · ·+D(1+i)+D = j=0 D(1+i)j = n 12 Pn−1 −1 (1+i)n −1 −1 D j=0 (1 + i)j = D (1+i) . (d) 10000 = D (1.01) gives (1+i)−1 = D i .01 n

(1+i) .01 D = 1000 (1.01) 12 −1 = 788.49. (e) Since F = D i

−1

, deposit D =

iF . (1+i)N −1

18. (a) s1 = M (1 + i) − R, s2 = [M (1 + i) − R](1 + i) − R = M (1 + i)2 − R(1 + i) − R. s3 = M (1 + i)3 − R(1 + i)2 − R(1 + i) − R. (b) 79907.06. n Pn−1 (c) sn = M (1 + i)n − j=0 R(1 + i)j = M (1 + i)n − R (1+i)i −1 . (d) 806.80. (e) Pay R =

iM (1+i)N (1+i)N −1

=

iM 1−(1+i)−N

.

Pn Pn Pn 19. 4 i=1 i3 − 6 i=1 i − i=1 1 = 4[ n(n+1) ]2 − 6 n(n+1) −n= 2 2 4 3 2 2 n + 2n − 2n − 4n = n(n + 2)(n − 2). 20. 4n3 + 7n2 . 21. Let j = i − 1. So

Pn−1 j=0

j2 =

Pn−1 j=1

j2 =

(n−1)n[2(n−1)+1] 6

=

n(n−1)(2n−1) 6

=

2n3 −3n2 +n . 6

22.

n4 +6n3 +13n2 +12n . 4

3−( 31 )n . 2 1−( 31 )n+1 = 33 1− 31

23.

24.

·

1−( 13 )n+1 1− 13

=

3−( 13 )n . 2

5n+1 −1 . 4

25. 2101 − 210 . P100 P100 P9 Note 1024 = 210 . We have i=10 2i = i=0 2i − i=0 2i = 2101 − 210 . 26.

3401 −3100 . 2

27. 53 (465 − 16). P64 P1 465 −1 5 65 i i − 16). i=0 5 · 4 = 5 4−1 − (5 + 20) = 3 (4 i=0 5 · 4 −

2101 −1 2−1



210 −1 2−1

=

398

CHAPTER 4. ANSWERS TO ALL EXERCISES

28. 3 − 341 . 1 ). 29. 2(1 − 3100 P100 1 i P100 1 i P100 1 ( 13 )101 −1 − 1] = 2(1 − 1 i=1 ( 3 ) = 4[( i=0 ( 3 ) ) − 1] = 4[ i=1 4 3i = 4 −1 3

30.

3 2



1 3100 ).

3 250 .

Pn Pn Pn n(n+1) 31. − 3n = 2n(n + 1) − 3n = i=1 (4i − 3) = 4 i=1 i − 3 i=1 1 = 4 2 2 2n − n = n(2n − 1). 32.

Pn

− 2n = − 2) = 3 n(n+1) 2

i=1 (3i

33.

Pn

34.

Pn

n(3n−1) . 2

Pn 2 Pn n(n+1)(2n+1) 2 i=1 (3i − i) = 3 i=1 i − i=1 i = 3 6 n(n+1)(2n+1)−n(n+1) n(n+1) 2 = (2n + 1 − 1) = n (n + 1). 2 2 i=1 (4i

3

]2 − − 2i) = 4[ n(n+1) 2

2n(n+1) 2

P2n

i=1

Pn

i=1

m(m+1) 2

to get

22i+1 = 2

Pn

i=1

Pn

i=1 (2i+1)

=2

Pn

i=1

i+

Pn

i=1

n+1

4i = 2( 4 4−1−1 ) = 23 (4n+1 − 1).

k | · k{z· · · k} = n times

Qn

i=k+1

Qn−k i=1

i

i

n(n+1)

41. 2 2 That is,

n Y

k.

i=1

.

. Pn

21 · 22 · 23 · · · 2n = 21+2+3+···+n = 2 42. (n!)2 .

P2n

i=1

i =

+n = 1 = 2 n(n+1) 2

Qn 39. i=1 k. That is,

40.

=

]2 = n2 (2n + 1)2 . i3 = [ 2n(2n+1) 2

37. 3+5+7+· · ·+(2n+1) = n(n + 1) + n = n(n + 2). 38.

n(n+1) 2

= n(n + 1)(n2 + n − 1).

P2n 35. i=1 i = 2n(2n+1) = n(2n + 1). 2 Pm We substitute m = 2n into the formula i=1 i = 2n(2n+1) = n(2n + 1). 2 36.



i=1

i

=2

n(n+1) 2

.

4.4. CHAPTER 4

n X

399



n Y



x − xj  . x i − xj i=1 j=1,j6=i Qn−1 44. ∀ n ≥ 1, sin 2n θ = 2n sin θ i=0 cos 2i θ. 43. L(x) =

yi

45. Since 2S = (n + 1) + (n + 1) + · · · + (n + 1) = n(n + 1), it follows that | {z } n times

S = n(n+1) . 2 Organize the sum of the two equations as follows. S S 2S

= = =

1 n (n + 1)

+ + +

2 (n − 1) (n + 1)

+ + +

··· ··· ···

+ + +

(n − 1) 2 (n + 1)

+ + +

n 1 (n + 1)

46. S(r−1) = rS−S = (r+r2 +· · ·+rn +rn+1 )−(1+r+· · ·+rn−1 +rn ) = rn+1 −1. n+1 So S = r r−1−1 . 2

2

2

+2n−1) 47. n (n+1) (2n . 12 By Theorem 4.4, n X

i5 =

(n + 1)((n + 1)5 − 1) −

P4

j=1

h P n 6 j

j i=1 i

6

i=1

i .

Note that "  n #   n  X  X  X n n n 4 X 6 6 6 6 X 6 X j 3 2 i4 . i + i + i+ i = 4 3 2 1 j i=1 i=1 i=1 i=1 i=1 j=1 By Example 4.17, n X

i4 =

i=1

n(n + 1)(2n + 1)(3n2 + 3n − 1) . 30

Also see the formulas in Theorem 4.2. After substitutions we get 2

2

2

n (n+1) (2n +2n−1) . 12

48.

n(n+1)(6n5 +15n4 +6n3 −6n2 −n+1) . 42

49. (a)

s6

Pn

i=1

i5 =

400

CHAPTER 4. ANSWERS TO ALL EXERCISES

1 1 85 (b) The area of s4 is 1 + 14 + 16 + 64 = 64 = 1.32815. The area of s5 is 1 341 85 + = = 1.33203125 > 1.33. 64 256 256 Pn−1 (c) an = 1 + 14 + ( 14 )2 + · · · + ( 14 )n−1 = i=0 ( 41 )i .

(d) an =

1−( 14 )n 1− 14

50. (a)

= 34 (1 −

1 4n ).

s5 1 1 2

(b) s11 . (c)

1 3 1 4 1 5

TABLE

Pn

1 i=1 i .

Section 4.3 1. Proof. Base case: (n = 3). Note that 32 + 1 ≥ 3(3). Inductive step: Suppose k ≥ 3 and k 2 + 1 ≥ 3k. (Goal: (k + 1)2 + 1 ≥ 3(k + 1).) Observe that (k+1)2 +1 = k 2 +2k+1+1 = (k 2 +1)+(2k+1) ≥ 3k+(2k+1) ≥ 3k+3 = 3(k+1).  2. Proof. Base case: (n = 3). Note that 32 − 2 = 7 ≥ 6 = 2(3). Inductive step: Suppose k ≥ 3 and k 2 − 2 ≥ 2k. (Goal: (k + 1)2 − 2 ≥ 2(k + 1).) Observe that (k + 1)2 − 2 = (k 2 − 2) + 2k + 1 ≥ 2k + 2k + 1 ≥ 2k + 2 = 2(k + 1).  3. Proof. Base case: (n = 3). Note that 32 ≥ 2(3) + 1. Inductive step: Suppose k ≥ 3 and k 2 ≥ 2k + 1. (Goal: (k + 1)2 ≥ 2(k + 1) + 1 = 2k + 3.) Observe that (k + 1)2 = k 2 + 2k + 1 = k 2 + (2k + 1) ≥ 2k + 1 + (2k + 1) = 2k + (2k + 2) ≥ 2k + 3 = 2(k + 1) + 1.  4. Proof. Base case: (n = 3). Note that 2(33 ) = 54 ≥ 37 = 3(32 ) + 3(3) + 1. Inductive step: Suppose k ≥ 3 and 2k 3 ≥ 3k 2 + 3k + 1. (Goal: 2(k + 1)3 ≥ 3(k + 1)2 + 3(k + 1) + 1.) Observe that 2(k + 1)3 = 2k 3 + 6k 2 + 6k + 2 ≥ 3k 2 + 3k + 1 + 6k 2 + 6k + 2 = 3k 2 + 9k + (3 + 6k 2 ) ≥ 3k 2 + 9k + 7 = 3(k + 1)2 + 3(k + 1) + 1.  5. Proof. Base case: (n = 4). Note that 24 ≥ 42 . Inductive step: Suppose k ≥ 4 and 2k ≥ k 2 . (Goal: 2k+1 ≥ (k + 1)2 .) Observe that 2k+1 = 2 · 2k ≥ 2 · k 2 = k 2 + (k 2 ) ≥ k 2 + (2k + 1) = (k + 1)2 . The last inequality follows from Exercise 3.  6. Proof. Base cases: (n = 0, 1, 2, 3). Note that 30 ≥ 03 , 31 ≥ 13 , 32 ≥ 23 , and 33 ≥ 33 . Inductive step: Suppose k ≥ 3 and 3k ≥ k 3 . (Goal: 3k+1 ≥ (k + 1)3 .) Observe that 3k+1 = 3 · 3k ≥ 3k 3 = k 3 + 2k 3 ≥ k 3 + 3k 2 + 3k + 1 = (k + 1)3 . The last inequality follows from Exercise 4. 

4.4. CHAPTER 4

401

7. Proof. Base case: (n = 4). Note that 4! ≥ 42 . Inductive step: Suppose k ≥ 4 and k! ≥ k 2 . (Goal: (k + 1)! ≥ (k + 1)2 .) Observe that (k+1)! = (k+1) · k! ≥ (k+1) · k 2 ≥ (k+1) · (k+1) = (k+1)2 . The last inequality holds since k 2 ≥ k + 1 for k ≥ 4.  8. Proof. Base case: (n = 6). Note that 6! = 720 > 432 = 2 · 63 . Inductive step: Suppose k ≥ 6 and k! > 2k 3 . (Goal: (k + 1)! > 2(k + 1)3 .) Observe that (k + 1)! = (k + 1)k! > (k + 1)2k 3 = 2k 3 + k(2k 3 ) ≥ 2k 3 + k(2k 3 ) ≥ 2k 3 + k(3k 2 + 3k + 1) ≥ 2k 3 + 2(3k 2 + 3k + 1) = 2(k + 1)3 . The second to last inequality follows from Exercise 4.  9. Proof. Base case: (n = 4). Note that 4! > 24 . Inductive step: Suppose k ≥ 4 and k! > 2k . (Goal: (k + 1)! > 2k+1 .) Observe that (k + 1)! = (k + 1) · k! > (k + 1) · 2k ≥ 2 · 2k = 2k+1 .  10. Proof. Base case: (n = 7). Note that 7! > 37 . Inductive step: Suppose k ≥ 7 and k! > 3k . (Goal: (k + 1)! > 3k+1 .) Observe that (k + 1)! = (k + 1) · k! > (k + 1) · 3k ≥ 3 · 3k = 3k+1 .  11. Proof. Base case: (n = 0). Note that 3 | (40 − 1). Inductive step: Suppose k ≥ 0 and 3 | (4k − 1). So, 4k − 1 = 3c for some c ∈ Z. (Goal: 3 | (4k+1 − 1).) Observe that 4k+1 −1 = 4·4k −1 = (3+ 1)4k −1 = 3·4k + (4k −1) = 3 ·4k + 3c = 3(4k + c). Thus, 3 | (4k+1 − 1).  12. Proof. Base case: (n = 0). Note that 5 | (60 − 1). Inductive step: Suppose k ≥ 0 and 5 | (6k − 1). So, 6k − 1 = 5c for some c ∈ Z. (Goal: 5 | (6k+1 − 1).) Observe that 6k+1 −1 = 6·6k −1 = (5+ 1)6k −1 = 5·6k + (6k −1) = 5 ·6k + 5c = 5(6k + c). Thus, 5 | (6k+1 − 1).  13. Proof. Base case: (n = 0). Note that 4 | (60 − 20 ). Inductive step: Suppose k ≥ 0 and 4 | (6k −2k ). So, 6k −2k = 4c for some c ∈ Z. (Goal: 4 | (6k+1 −2k+1 ).) Observe that 6k+1 − 2k+1 = 6 · 6k − 2 · 2k = 4 · 6k + 2(6k − 2k ) = 4 · 6k + 2(4c) = 4(6k + 2c). Thus, 4 | (6k+1 − 2k+1 ).  14. Proof. Base case: (n = 0). Note that 5 | (90 − 40 ). Inductive step: Suppose k ≥ 0 and 5 | (9k −4k ). So, 9k −4k = 5c for some c ∈ Z. (Goal: 5 | (9k+1 −4k+1 ).) Observe that 9k+1 − 4k+1 = 9 · 9k − 4 · 4k = 5 · 9k + 4(9k − 4k ) = 5 · 9k + 4(5c) = 5(9k + 4c). Thus, 5 | (9k+1 − 4k+1 ).  15. Proof. Base case: (n = 0). Note that 6 | (03 − 0). Inductive step: Suppose k ≥ 0 and 6 | (k 3 − k). So, k 3 − k = 6c for some c ∈ Z. (Goal: 6 | ((k + 1)3 − (k + 1)).) Observe that (k + 1)3 − (k + 1) = k 3 + 3k 2 + 2 3k + 1 − k − 1 = (k 3 − k) + 3k 2 + 3k = 6c + 3(k 2 + k) = 6(c + k 2+k ). Since 2 k 2 and k have the same parity, it follows that k 2 + k is even, whence k 2+k ∈ Z.

402

CHAPTER 4. ANSWERS TO ALL EXERCISES

Thus, 6 | ((k + 1)3 − (k + 1)).  16. Proof. Base case: (n = 0). Note that 6 | (03 + 5(0)). Inductive step: Suppose k ≥ 0 and 6 | (k 3 + 5k). So, k 3 + 5k = 6c for some c ∈ Z. (Goal: 6 | ((k+1)3 +5(k+1)).) Observe that (k+1)3 +5(k+1) = k 3 +5k+3(k 2 +k)+6 = 6(c + 1) + 3(k 2 + k). Since k 2 and k have the same parity, it follows that k 2 + k 2 is even, whence k 2+k ∈ Z. Thus, 6 | ((k + 1)3 + 5(k + 1)).  17. Proof. Base case: (n = 1). Note that 31 + 1 = 4. Inductive step: Suppose k ≥ 1 and sk = 3k + 1. (Goal: sk+1 = 3k+1 + 1.) Observe that sk+1 = 3sk − 2 = 3(3k +1) − 2 = 3k+1 + 1.  18. Proof. Base case: (n = 0). Note that s0 = π4 = 4(0)+1 π. Inductive step: 4 4(k+1)+1 π. (Goal: s = π.) Observe that Suppose k ≥ 0 and sk = 4k+1 k+1 4 4 4(k+1)+1 4k+1 sk+1 = sk + π = 4 π + π = π.  4 19. Proof. Base case: (n = 2). Note that 9 − 2(2) = 5. Inductive step: Suppose k ≥ 2 and sk = 9 − 2k. (Goal: sk+1 = 9 − 2(k + 1).) Observe that sk+1 = sk − 2 = 9 − 2k − 2 = 9 − 2(k + 1).  1 1 2 20. Proof. Base cases: (n = 0, 1). Note ( that s0 = 3 and s1 = 1 − 3 = 3 . 1 if k is even, Inductive step: Suppose k ≥ 1 and sk = 32 . if k is odd. 3 ( ( 1 if k + 1 is even, 1 − 23 if k is odd, = 32 .  Observe that sk+1 = 1 − sk = 2 1 − 3 if k is even. if k + 1 is odd. 3

21. (a) s0 = 0 = D (1+i)i

2 (i + 2)D = D (1+i)i −1 . n−1 (b) (1 + i)(D (1+i) i −1 )

0

−1

1

, s1 = D = D (1+i)i

+ D = D( (1+i)

n

−(1+i) i

−1

n

+ ii ) = D (1+i)i 0

(c) Proof. Base case: (n = 0). Note that D (1+i)i Suppose k ≥ 0 and sk = D (1+i)i k

(1 + i)[D (1+i)i −1 ] + D = D[(1 + 24 −1 (d) 200 (1.0075) = $5237.69. .0075

k

−1

, s2 = (1 + i)D + D =

−1

−1

.

= 0. Inductive step:

. Observe that sk+1 = (1 + i)sk + D =

k i) (1+i)i −1

0

22. (a) s0 = M = M (1 + i)0 − R (1+i)i

−1

k+1

+ ii ] = D (1+i) i

−1

. 

, s1 = (1 + i)M − R = (1+i) −1 M (1 + i) − R , s2 = (1 + i)((1 + i)M − R) − R = (1 + i)2 M − (i + 2)R = i 2 n−1 M (1 + i)2 − R (1+i)i −1 . (b) (1 + i)(M (1 + i)n−1 − R (1+i) i −1 ) − R = n M (1 + i)n − R (1+i)i −1 . 0 (c) Proof. Base case: (n = 0). Note that M (1 + i)0 − R (1+i)i −1 = M . Inductive k step: Suppose k ≥ 0 and sk = M (1 + i)k − R (1+i)i −1 . Observe that sk+1 = k (1 + i)sk − R = (1 + i)[M (1 + i)k − R (1+i)i −1 ] − R = 1

1

4.4. CHAPTER 4

403

M (1 + i)k+1 − R[(1 + i) (1+i)i (d) $59,141.80.

k

−1

k+1

+ ii ] = M (1 + i)k+1 − R (1+i) i

−1

. 

23. (a) A ∩ (B1 ∪ B2 ∪ B3 ) = A ∩ ((B1 ∪ B2 ) ∪ B3 ) = (A ∩ (B1 ∪ B2 )) ∪ (A ∩ B3 ) = ((A ∩ B1 ) ∪ (A ∩ B2 )) ∪ (A ∩ B3 ) = (A ∩ B1 ) ∪ (A ∩ B2 ) ∪ (A ∩ B3 ). (b) Proof. Base case: (n = 1). Let B1 be any set. Note that A∩(B1 ) = (A∩B1 ). Inductive step: Suppose k ≥ 1 and, for all sets B1 , B2 , . . . , Bk , A ∩ (B1 ∪ B2 ∪ · · ·∪Bk ) = (A∩B1 )∪(A∩B2 )∪· · ·∪(A∩Bk ). Let B1 , B2 , . . . , Bk+1 be any sets. Observe that A ∩ (B1 ∪ B2 ∪ · · · ∪ Bk+1 ) = A ∩ ((B1 ∪ B2 ∪ · · · ∪ Bk ) ∪ Bk+1 ) = (A ∩ (B1 ∪ B2 ∪ · · · ∪ Bk )) ∪ (A ∩ Bk+1 ) = ((A ∩ B1 ) ∪ (A ∩ B2 ) ∪ · · · ∪ (A ∩ Bk )) ∪ (A ∩ Bk+1 ) = (A ∩ B1 ) ∪ (A ∩ B2 ) ∪ · · · ∪ (A ∩ Bk+1 ).  (c) Reverse ∩ and ∪ in part (b). 24. (a) p ∧ (q1 ∨ q2 ∨ q3 ) ≡ p ∧ ((q1 ∨ q2 ) ∨ q3 ) ≡ (p ∧ (q1 ∨ q2 )) ∨ (p ∧ q3 ) ≡ ((p ∧ q1 ) ∨ (p ∧ q2 )) ∨ (p ∧ q3 ) ≡ (p ∧ q1 ) ∨ (p ∧ q2 ) ∨ (p ∧ q3 ). (b) Proof. Base case: (n = 1). Let q1 be any statement form. Note that p ∧ (q1 ) ≡ (p ∧ q1 ). Inductive step: Suppose k ≥ 1 and, for all statement forms q1 , q2 , . . . , qk , p ∧ (q1 ∨ q2 ∨ · · · ∨ qk ) ≡ (p ∧ q1 ) ∨ (p ∧ q2 ) ∨ · · · ∨ (p ∧ qk ). Let q1 , q2 , . . . , qk+1 be any statement forms. Observe that p ∧ (q1 ∨ q2 ∨ · · · ∨ qk+1 ) ≡ p ∧ ((q1 ∨ q2 ∨ · · · ∨ qk ) ∨ qk+1 ) ≡ (p∧(q1 ∨q2 ∨· · ·∨qk ))∨(p∧qk+1 ) ≡ ((p∧q1 )∨(p∧q2 )∨· · ·∨(p∧qk ))∨(p∧qk+1 ) ≡ (p ∧ q1 ) ∨ (p ∧ q2 ) ∨ · · · ∨ (p ∧ qk+1 ).  (c) Reverse ∧ and ∨ in part (b). 25. (a) ¬(p1∨ p2∨ p3 ) ≡ ¬((p1∨ p2 )∨ p3 ) ≡ ¬(p1∨ p2 ) ∧¬p3 ≡ (¬p1 ∧ ¬p2 ) ∧ ¬p3 ≡ ¬p1 ∧ ¬p2 ∧ ¬p3 . (b) Proof. Base case: (n = 1). Let p1 be any statement form. Note that ¬(p1 ) ≡ ¬p1 . Inductive step: Suppose k ≥ 1 and, for all statement forms p1 , p2 , . . . , pk , ¬(p1 ∨ p2 ∨ · · · ∨ pk ) ≡ ¬p1 ∧ ¬p2 ∧ · · · ∧ ¬pk . Let p1 , p2 , . . . , pk+1 be any statement forms. Observe that ¬(p1 ∨ p2 ∨ · · ·∨ pk+1 ) ≡ ¬((p1 ∨ p2 ∨ · · ·∨ pk )∨ pk+1 ) ≡ ¬(p1 ∨ p2 ∨ · · ·∨ pk ) ∧¬pk+1 ≡ (¬p1 ∧ ¬p2 ∧ · · · ∧ ¬pk ) ∧ ¬pk+1 ≡ ¬p1 ∧ ¬p2 ∧ · · · ∧ ¬pk+1 .  (c) Reverse ∧ and ∨ in part (b). c

c

c

26. (a) (A1 ∪ A2 ∪ A3 ) = ((A1 ∪ A2 ) ∪ A3 ) = (A1 ∪ A2 ) ∩ A3 c = (A1 c ∩ A2 c ) ∩ A3 c = A1 c ∩ A2 c ∩ A3 c (b) Proof. Base case: (n = 1). Let c A1 be any set. Note that (A1 ) = A1 c . Inductive step: Suppose k ≥ 1 and, c for all sets A1 , A2 , . . . , Ak , (A1 ∪ A2 ∪ · · · ∪ Ak ) = A1 c ∩ A2 c ∩ · · · ∩ Ak c . Let c A1 , A2 , . . . , Ak+1 be any sets. Observe that (A1 ∪ A2 ∪ · · · ∪ Ak+1 ) = c c c ((A1 ∪ A2 ∪ · · · ∪ Ak ) ∪ Ak+1 ) = (A1 ∪ A2 ∪ · · · ∪ Ak ) ∩ Ak+1 = (A1 c ∩ A2 c ∩ · · · ∩ Ak c ) ∩ Ak+1 c = A1 c ∩ A2 c ∩ · · · ∩ Ak+1 c .  (c) Reverse ∩ and ∪ in part (b). 27. (a) Proof. Base case: (m = 1). Obvious. Inductive step: Suppose k ≥ 1 and, ∀ a1 , a2 , . . . , ak , b1 , b2 , . . . , bk ∈ Z, if a1 ≡ b1 (mod n), a2 ≡ b2 (mod n), . . .,

404

CHAPTER 4. ANSWERS TO ALL EXERCISES

Pk Pk ak ≡ bk (mod n), then i=1 ai ≡ i=1 bi (mod n). Let a1 , a2 , . . . , ak+1 , b1 , b2 , . . . , bk+1 be any integers. Suppose a1 ≡ b1 (mod n), a2 ≡ b2 (mod n), . . ., ak+1 ≡ bk+1 (mod n). By the induction hypothesis, Pk Pk Pk ≡ i=1 bi (mod n). By Theorem 3.27(i), we thus have ( i=1 ai ) + i=1 ai P Pk+1 Pk+1 k ak+1 ≡ ( i=1 bi ) + bk+1 (mod n). So i=1 ai ≡ i=1 bi (mod n).  (b) Proof. Base case: (m = 1). Obvious. Inductive step: Suppose k ≥ 1 and, ∀ a1 , a2 , . . . , ak , b1 , b2 , . . . , bk ∈ Z, if a1 ≡ b1 (mod n), a2 ≡ b2 (mod n), . . ., Qk Qk ak ≡ bk (mod n), then i=1 ai ≡ i=1 bi (mod n). Let a1 , a2 , . . . , ak+1 , b1 , b2 , . . . , bk+1 be any integers. Suppose a1 ≡ b1 (mod n), a2 ≡ b2 (mod n), . . ., ak+1 ≡ bk+1 (mod n). By the induction hypothesis, Qk Qk Qk Qk n). We therefore have ( i=1 ai ) · ak+1 ≡ ( i=1 bi ) · i=1 bi (mod i=1 ai ≡ Qk+1 Qk+1 bk+1 (mod n). That is, i=1 ai ≡ i=1 bi (mod n).  28. Proof. Base case: (m = 0). Note that 1 ≡ 1 (mod n). Inductive step: Suppose k ≥ 0 and ak1 ≡ ak2 (mod n). Since ak1 ≡ ak2 (mod n) and a1 ≡ a2 (mod n), it follows from Theorem 3.27(b) that ak1 a11 ≡ ak2 a12 (mod n). That is, a1k+1 ≡ ak+1 (mod n).  2 29. Proof. Base case: (|S| = 1). If S = {s1 }, then max(S) = s1 . Inductive step: Suppose k ≥ 1, and any set S with |S| = k has a maximal element. (Goal: Any set S with |S| = k + 1 has a maximal element.) Suppose s1 , s2 , . . . , sk+1 are distinct real numbers and S = {s1 , s2 , . . . , sk+1 }. By the induction hypothesis, the set {s1 , s2 , . . . , sk } has a ( maximal element, say sj . Observe that {sj , sk+1 } sj if sj > sk+1 has a maximal element m = Note that m is the maximum sk+1 otherwise. element of S.  30. Sketch. Base case: (n = 1). Note that p | m1 . Inductive step: Suppose k ≥ 1 and the result holds. Suppose p | (m1 · · · mk · mk+1 ). So p | (m1 · · · mk ) or p | mk+1 . By the inductive hypothesis, p | m1 or . . . or p | mk or p | mk+1 . That is, p | mi for some 1 ≤ i ≤ k + 1.  31. Proof. Base case: (n = 1). Obvious. Inductive step: Suppose k ≥ 1 and  k    k+1   k 1 1 1 k 1 1 1 1 1 1 = . Observe that = = 0 1 0 1 0 1 0 1 0 1      1 1 1 k 1 k+1 = .  0 1 0 1 0 1 32. Proof. Base case: (n = 1). Obvious. Inductive step: Suppose k ≥ 1  k    k+1 −1 1 −1 1 −1 1 k−1 and = (−2) . Observe that = 1 −1 1 −1 1 −1    k     −1 1 −1 1 −1 1 −1 1 · = · (−2)k = 1 −1 1 −1 1 −1 1 −1

4.4. CHAPTER 4 (−2)k+1



−1 1

1 −1

405  . 

33. Proof. Base case: (n = 1). Obvious. Inductive step: Suppose k ≥ 1 and    k  k+1   k 1 1 1 2k −1 1 1 1 1 1 1 = . Observe that = = 0 2 0 2 0 2 0 2 0 2k      1 1 1 2k −1 1 2k+1 −1 = .  k 0 2 0 2 0 2k+1 34. Proof. Base"case: (n = 1). step: Suppose k ≥ 1 and # Obvious. Inductive  k+1    k k 1−(−2) 1 1 1 1 1 1 1 3 . Observe that = · = 0 −2 0 −2 0 −2 0 (−2)k # " #  k   " 1−(−2)k+1 1−(−2)k 1 1 1 1 1 1 3 3 = = .  · 0 −2 0 −2 0 (−2)k 0 (−2)k+1 35. Proof. Base case: (n = 1). Obvious. Inductive step: Suppose k ≥ 1 and  k    k+1 cos θ sin θ cos kθ sin kθ cos θ sin θ = . Observe that = − sin θ cos θ − sin kθ cos kθ − sin θ cos θ   k    cos θ sin θ cos θ sin θ cos θ sin θ cos kθ sin kθ = = − sin θ cos θ − sin θ cos θ − sin θ cos θ − sin kθ cos kθ     cos(θ + kθ) sin(θ + kθ) cos(k + 1)θ sin(k + 1)θ = .  − sin(θ + kθ) cos(θ + kθ) − sin(k + 1)θ cos(k + 1)θ √



3 2π 1 36. (a) − 12 + i 23 . Note (cos 2π 3 , sin 3 ) = (− 2 , 2 ). (b) Sketch. The case in which n = 1 is obvious. In the inductive step, (cos θ + i sin θ)k+1 = (cos kθ + i sin kθ)(cos θ + i sin θ) = (cos kθ cos θ − sin kθ sin θ) + i(sin kθ cos θ + cos kθ sin θ) = cos(k + 1)θ + i sin(k + 1)θ. 

37. (a) sin(2θ) = sin(θ + θ) = sin θ cos θ + cos θ sin θ = 2 sin θ cos θ. (b) sin 4θ = 2 sin 2θ cos 2θ = 2 · 2 sin θ cos θ cos 2θ = 4 sin θ cos θ cos 2θ. (c)Proof. Base case: (n = 1). By the double angle identity, sin 2θ = 2 sin θ cos θ. Qk−1 Inductive step: Suppose k ≥ 1 and sin 2k θ = 2k sin θ i=0 cos 2i θ. Now, Q k−1 sin 2k+1 θ = sin(2(2k θ)) = 2 sin 2k θ cos 2k θ = 2(2k sin θ i=0 cos 2i θ) cos 2k θ = Q k 2k+1 sin θ i=0 cos 2i θ.  38. Sketch. The case in which n = 0 is obvious. In the inductive step, (1+x)k+1 = (1+x)(1+x)k ≥ (1+x)(1+kx) = 1+(k +1)x+kx2 ≥ 1+(k +1)x.  39. ∀ n ≥ 0, n ≥ 1. Obviously, 0 ≥ 1 does not hold. However, suppose k ≥ 0 and k ≥ 1. Then k + 1 ≥ k ≥ 1. So the inductive step holds. 40. ∀ n ≥ 0, n ≥ 2n.

406

CHAPTER 4. ANSWERS TO ALL EXERCISES

41. Proof. Suppose ∀ n ≥ a, P (n). Suppose k ≥ a and P (k) holds. Since k + 1 ≥ a, it follows that P (k + 1) also holds.  42. The Principle of Specialization. 43. Proof. Base case: (n = 0). 80 = 1. Inductive step: Suppose k ≥ 0 and 8k ≡ 1 (mod 7). Observe that 8k+1 ≡ 8 · 8k ≡ 1 · 1 ≡ 1 (mod 7).  44. Proof. Base case: (n = 0). 90 = 40 . Inductive step: Suppose k ≥ 0 and 9k ≡ 4k (mod 5). Observe that 9k+1 ≡ 9 · 9k ≡ 4 · 4k ≡ 4k+1 (mod 5).  45. (a) C0 = 1, C1 = 2(2·1−1) 1+1 C0 = 1, C2 = C3 =

2(2·2−1) 2+1 C1 2(2·3−1) 3+1 C2 2(2·4−1) 4+1 C3

= 2, = 5,

= 14. C4 =  0 1 (b) Base case: (n = 0). C0 = 1 = 0+1 0 . Inductive step: Suppose k ≥ 0   2(2(k+1)−1) 2k 2k 1 1 and Ck = k+1 Ck = 2(2k+1) · k+1 k . Observe that Ck+1 = k = k+2 k+2 2(2k+1)(2k)! 2(k+1)(2k+1)(2k)! (k+2)(k+1)k!k! = (k+2)(k+1)k!(k+1)k!  2(k+1) 1 k+2 k+1 . 

=

(2k+2)(2k+1)(2k)! (k+2)(k+1)!(k+1)!

=

1 k+2

·

(2k+2)! (k+1)!(k+1)!

=

(c) n = 0: a. n = 1: ab. n = 2: (ab)c or a(bc). n = 3: (ab)(cd), ((ab)c)d, (a(bc))d, a((bc)d), or a(b(cd)). n = 4: ((ab)c)(de), (a(bc))(de), (ab)((cd)e), (ab)(c(de)), a((bc)(de)), a(((bc)d)e), a((b(cd))e), a(b((cd)e)), a(b(c(de))), ((ab)(cd))e, (((ab)c)d)e, ((a(bc))d)e, (a((bc)d))e, (a(b(cd)))e. That is, (abc)(de) in two ways, (ab)(cde) in two ways, a(bcde) in five ways, (abcd)e in five ways. 46. k > b iff k − 1 ≥ b. Of course, (k − 1) + 1 = k.

Section 4.4 P1 1. Proof. Base case: (n = 1). Note that i=1 0 = 0. Inductive step: Suppose Pk Pk+1 k ≥ 1 and i=1 0 = 0. (Goal: i=1 0 = 0.) Pk+1 Pk Observe that i=1 0 = ( i=1 0) + 0 = 0 + 0 = 0.  P1 2. Proof. Base case: (n = 1). Note that i=1 1 = 1. Inductive step: Suppose Pk Pk+1 Pk+1 1 = k + 1.) Observe that i=1 1 = k ≥ 1 and i=1 1 = k. (Goal: i=1 Pk ( i=1 1) + 1 = k + 1. 

4.4. CHAPTER 4

407

P1 . Inductive 3. (a) Proof. Base case: (n = 1). Note that i=1 i = 1 = 1(1+1) Pk Pk+1 2 (k+1)(k+2) k(k+1) step: Suppose k ≥ 1 and . (Goal: .) i=1 i = i=1 i = 2 2 Pk+1 Pk (k+1)(k+2) Observe that i=1 i = i=1 i + (k + 1) = k(k+1) + (k + 1) = .  2 2 Pn Pn (b) i=1 2i = 2 i=1 i = 2 n(n+1) = n(n + 1). 2 . (c) n2 ( n2 + 1) = n(n+2) 4 n−1 n2 −1 (d) n−1 2 ( 2 + 1) = 4 . P1 ]2 . Inductive 4. (a) Proof. Base case: (n = 1). Note that i=1 i3 = 1 = [ 1(1+1) 2 Pk 3 P k+1 3 (k+1)(k+2) 2 step: Suppose k ≥ 1 and i=1 i = [ k(k+1) ]2 . (Goal: ] .) i=1 i = [ 2 2 Pk+1 3 Pk 3 k(k+1) Observe that i=1 i = i=1 i +(k +1)3 = [ 2 ]2 +(k +1)3 = [ (k+1)(k+2) ]2 . 2  (b) 9. (c) 13. P1 5. Proof. Base case: (n = 1). Note that i=1 (3i2 −i) = 2 = 12 (1 + 1). Inductive Pk step: Suppose k ≥ 1 and i=1 (3i2 − i) = k 2 (k + 1). Pk+1 2 Pk+1 2 (Goal: (3i − i) = (k + 1)2 (k + 2).) Observe that i=1 i=1 (3i − i) = Pk 2 2 2 1) + 3(k + 1)2 − (k + 1) = i=1 (3i − i) + (3(k + 1) − (k + 1)) = k (k + Pk+1 2 2 2 (k+1)[k +3(k+1)−1] = (k+1) (k+2). That is, i=1 (3i −i) = (k+1)2 (k+2).  P1 6. Proof. Base case: (n = 1). Note i=1 (4i3 − 2i) = 2 = 1(1 + 1)(12 + 1 − 1). Pk 3 2 Inductive step: Suppose k ≥ 1 and i=1 (4i − 2i) = k(k + 1)(k + k − 1). Pk+1 3 2 (Goal: (4i − 2i) = (k + 1)(k + 2)((k + 1) + (k + 1) − 1).) Observe that Pk+1 3 i=1 Pk 3 3 i=1 (4i − 2i) = i=1 (4i − 2i) + 4(k + 1) − 2(k + 1) = 2 3 k(k + 1)(k + k − 1) + 4(k + 1) − 2(k + 1) = (k + 1)(k + 2)((k + 1)2 + (k + 1) − 1).  P1 3 7. Proof. Base case: (n = 1). Note Inductive i=1 (2i) = 8 = 2(1)(4). Pk Pk+1 3 2 2 3 step: Suppose k ≥ 1 and (2i) = 2k (k + 1) . (Goal: i=1P i=1 (2i) = P k+1 k 2(k + 1)2 (k + 2)2 .) Observe that i=1 (2i)3 = i=1 (2i)3 + (2(k + 1))3 = 2k 2 (k + 1)2 + (2(k + 1))3 = 2(k + 1)2 (k + 2)2 .  P1 2 8. Proof. Base case: (n = 1). Note Inductive i=1 (6i) = 36 = 6(2)(3). Pk Pk+1 2 2 step: Suppose k ≥ 1 and i=1 (6i) = 6k(k + 1)(2k + 1). (Goal: i=1 (6i) = Pk+1 P k 6(k + 1)(k + 2)(2k + 3).) Observe that i=1 (6i)2 = i=1 (6i)2 + (6(k + 1))2 = 6k(k + 1)(2k + 1) + (6(k + 1))2 = 6(k + 1)(k + 2)(2k + 3).  P1 9. Proof. Base case: (n = 1). Note that i=1 (4i−3) = 1 = 1(2(1)−1). Inductive Pk step: Suppose k ≥ 1 and i=1 (4i − 3) = k(2k − 1). Pk+1 Pk+1 (Goal: i=1 (4i − 3) = (k + 1)(2(k + 1) − 1).) Observe that i=1 (4i − 3) = Pk 2 (4i − 3) + (4(k + 1) − 3) = k(2k − 1) + (4k + 1) = 2k + 3k + 1 = i=1 Pk+1 (k + 1)(2(k + 1) − 1). That is, i=1 (4i − 3) = (k + 1)(2(k + 1) − 1). 

408

CHAPTER 4. ANSWERS TO ALL EXERCISES

Pn n(3n−1) . 10. i=1 (3i − 2) = 2 P1 Proof. Base case: (n = 1). Note that i=1 (3i − 2) = 1 = 1(3−1) . Inductive P2k+1 Pk . (Goal: step: Suppose k ≥ 1 and i=1 (3i − 2) = k(3k−1) i=1 (3i − 2) = 2 Pk+1 Pk (k+1)(3(k+1)−1) .) Observe that i=1 (3i − 2) = i=1 (3i − 2) + 3(k + 1) − 2 = 2 k(3k−1) + 3(k + 1) − 2 = (k+1)(3(k+1)−1) .  2 2 Pn 11. We prove i=1 (2i + 1) = n(n + 2). P1 Proof. Base case: (n = 1). Note that i=1 (2i + 1) = 3 = 1(1 + 2). Inductive Pk Pk+1 step: Suppose k ≥ 1 and i=1 (2i + 1) = k(k + 2). (Goal: i=1 (2i + 1) = Pk+1 Pk (k + 1)(k + 3).) Observe that (2i + 1) = (2i + 1) + (2(k + 1) + 1) i=1 i=1 Pk+1 2 = k(k + 2) + 2(k + 1) + 1 = k + 4k + 3 = (k + 1)(k + 3). That is, i=1 (2i + 1) = (k + 1)(k + 3).  Pn 12. i=0 22i+1 = 32 (4n+1 − 1). P0 Proof. Base case: (n = 0). Note that i=0 22i+1 = 2 = 23 (4 − 1). Inductive Pk+1 2i+1 Pk 2i+1 step: Suppose k ≥ 0 and = = 32 (4k+1 − 1). (Goal: i=0 2 i=0 2 Pk+1 2i+1 Pk 2 k+2 2i+1 2(k+1)+1 − 1).) Observe that i=0 2 = i=0 2 +2 = 3 (4 2 k+1 − 1) + 4k+1 · 2 = 23 (4k+2 − 1).  3 (4 Pn 13. We prove i=0 2i = 2n+1 − 1. P0 Proof. Base case: (n = 0). Note that i=0 2i = 1 = 20+1 − 1. Inductive step: Pk Pk+1 i k+2 Suppose k ≥ 0 and i=0 2i = 2k+1 − 1. (Goal: − 1.) Observe i=0 2 = 2 Pk+1 i Pk i k+1 k+1 k+1 k+1 that i=0 2 = i=0 2 + 2 =2 −1 + 2 = 2·2 −1 = 2k+2 −1. That Pk+1 is, i=0 2i = 2k+2 −1.  Pn 14. i=0 3i = 21 (3n+1 − 1). P0 Proof. Base case: (n = 0). Note that i=0 3i = 1 = 12 (3 − 1). Inductive step: Pk Pk+1 i 1 k+2 Suppose k ≥ 0 and i=0 3i = 12 (3k+1 − 1). (Goal: − 1).) i=0 3 = 2 (3 Pk+1 i Pk 1 k+2 1 k+1 k+1 i k+1 Observe that i=0 3 = i=0 3 + 3 − 1) + 3 = 2 (3 − 1).  = 2 (3 P2 15. Proof. Base case: (n = 2). Note that i=2 i2i = 8 = (2 − 1)22+1 . Inductive Pk Pk+1 i k+2 step: Suppose k ≥ 0 and i=2 i2i = (k − 1)2k+1 . (Goal: .) i=2 i2 = k2 Pk+1 i Pk i k+1 k+1 k+1 Observe that i=2 i2 = i=2 i2 + (k + 1)2 = (k − 1)2 + (k + 1)2 = Pk+1 2k2k+1 = k2k+2 . That is, i=2 i2i = k2k+2 .  P1 16. Proof. Base case: (n = 1). Note that i=1 i3i = 3 = 43 [(2 − 1)3 + 1]. InducPk Pk+1 i tive step: Suppose k ≥ 0 and i=1 i3i = 34 [(2k − 1)3k + 1]. (Goal: i=1 i3 = P P k k+1 3 k+1 i i + 1].) Observe that i=1 i3 = i=1 i3 + (k + 1)3k+1 = 4 [(2(k + 1) − 1)3 3 k k+1 = 34 [(2(k + 1) − 1)3k+1 + 1].  4 [(2k − 1)3 + 1] + (k + 1)3

4.4. CHAPTER 4

409

P1 17. Proof. Base case: (n = 1). Note that i=1 i2 2i = 2 = (12 −2 · 1+3)21+1 −6. Pk Inductive step: Suppose k ≥ 1 and i=1 i2 2i = (k 2 − 2k + 3)2k+1 − 6. Observe Pk+1 2 i Pk 2 i that i=1 i 2 = i=1 i 2 +(k+1)2 2k+1 = (k 2 −2k+3)2k+1 −6+(k + 1)2 2k+1 = [k 2 − 2k + 3 + (k + 1)2 ]2k+1 − 6 = ((k + 1)2 − 2(k + 1) + 3)2k+2 − 6.  P1 18. Proof. Base case: (n = 1). Note that i=1 i2 3i = 3 = 23 [(1 − 1 + 1)3 − 1]. Pk Inductive step: Suppose k ≥ 0 and i=1 i2 3i = 23 [(k 2 − k + 1)3k − 1]. (Goal: Pk+1 2 i Pk+1 3 2 k+1 − 1].) Observe that i=1 i2 3i = i=1 i 3 = 2 [((k + 1) − (k + 1) + 1)3 Pk 2 i 2 k+1 = 23 [(k 2 − k + 1)3k − 1] + (k + 1)2 3k+1 = i=1 i 3 + (k + 1) 3 3 2 k+1 − 1].  2 [((k + 1) − (k + 1) + 1)3 P1 19. Proof. Base case: (n = 1). Note that i=1 (i · i!) = 1 = (1 + 1)! − 1. Pk Inductive step: Suppose k ≥ 1 and i=1 (i · i!) = (k + 1)! − 1. Observe that Pk+1 Pk i=1 (i · i!) = i=1 (i · i!) + (k + 1) · (k + 1)! = (k + 1)! − 1 + (k + 1) · (k + 1)! = [1 + (k + 1)](k + 1)! − 1 = (k + 2)! − 1.  P1 20. Proof. Base case: (n = 1). Note that i=1 (2i − 1) = 1 = 12 . Inductive Pk Pk+1 2 step: Suppose k ≥ 1 and i=1 (2i − 1) = k 2 . (Goal: i=1 (2i − 1) = (k + 1) .) Pk+1 Pk Observe that i=1 (2i − 1) = i=1 (2i − 1) + 2(k + 1) − 1 = k 2 + 2(k + 1) − 1 = k 2 + 2k + 1 = (k + 1)2 .  P2 21. Proof. Base case: (n = 1). Note that i=1 i = 3 = 1(2 · 1 + 1). Inductive P2k P2(k+1) step: Suppose k ≥ 1 and i = i=1 i = k(2k + 1). Observe that i=1 P2k i=1 i+(2k +1)+(2k +2) = k(2k +1)+(2k +1)+(2k +2) = (k +1)(2(k +1)+1).  Notice how the proof is affected by the last index in the sum being i = 2n. In the inductive step, effectively two terms are split off: the i = 2k + 1 term and the i = 2k + 2 term. P2 22. Proof. Base case: (n = 1). Note that i=1 i3 = 9 = 12 (2 + 1)2 . Inductive P2k P2(k+1) step: Suppose k ≥ 1 and i=1 i3 = k 2 (2k + 1)2 . Observe that i=1 i3 = P2k 3 3 3 2 2 3 3 i=1 i + (2k + 1) + (2k + 2) = k (2k + 1) + (2k + 1) + (2k + 2) = (k + 2 2 1) (2(k + 1) + 1) .  P1 1 1 = 12 = 1+1 . Inductive 23. Proof. Base case: (n = 1). Note that i=1 i(i+1) Pk P k+1 1 k 1 k+1 step: Suppose k ≥ 1 and i=1 i(i+1) = k+1 . (Goal: i=1 i(i+1) = k+2 .) Pk+1 1 Pk 1 1 k 1 Observe that i=1 i(i+1) = i=1 i(i+1) + (k+1)(k+2) = k+1 + (k+1)(k+2) = k+1 k+2 .  P1 2 5 24. Proof. Base case: (n = 1). Note that i=1 i(i+2) = 23 = 32 − (2)(3) . Inductive Pk P k+1 2 3 2k+3 2 step: Suppose k ≥ 1 and i=1 i(i+2) = 2 − (k+1)(k+2) . (Goal: i=1 i(i+2) = Pk+1 2 Pk 2(k+1)+3 3 2 2 3 i=1 i(i+2) = i=1 i(i+2) + (k+1)(k+3) = 2 − 2 − (k+2)(k+3) .) Observe that

410 2k+3 (k+1)(k+2)

CHAPTER 4. ANSWERS TO ALL EXERCISES +

2 (k+1)(k+3)

=

3 2



2(k+1)+3 (k+2)(k+3) .



P1 25. Proof. Base case: (n = 1). Note that i=1 21i = 12 = 1 − 211 . Inductive step: Pk Pk+1 1 Suppose k ≥ 1 and i=1 21i = 1− 21k . Observe that i=1 21i = (1− 21k )+ 2k+1 = 1 1 − 2k+1 .  P0 26. Proof. Base case: (n = 0). Note that i=0 (3i+1 − 3i = 2 = 3 − 1. Inductive Pk Pk+1 step: Suppose k ≥ 0 and i=0 (3i+1 − 3i ) = 3k+1 − 1. (Goal: i=1 (3i+1 − 3i ) = P k+1 3k+2 − 1.) Observe that i=1 (3i+1 − 3i ) = Pk i+1 − 3i ) + (3k+2 − 3k+1 ) = 3k+1 − 1 + 3k+2 − 3k+1 = 3k+2 − 1.  i=1 (3 Q1 2 i 27. Proof. Base case: (n = 1). Note that i=1 i+2 = 13 = (1+1)(1+2) . InQk Q k+1 i i 2 ductive step: Suppose k ≥ 1 and i=1 i+2 = (k+1)(k+2) . (Goal: i=1 i+2 = Qk+1 i Qk 2 i k+1 2 k+1 i=1 i+2 = ( i=1 i+2 )( k+3 ) = ( (k+1)(k+2) )( k+3 ) = (k+2)(k+3) .) Observe that 2 (k+2)(k+3) .  Q1 i 28. Proof. Base case: (n = 1). Note that i=1 i+1 = 12 = Qk Q k+1 i 1 i Suppose k ≥ 1 and i=1 i+1 = k+1 . (Goal: i=1 i+1 = Qk+1 i Qk k+1 1 k+1 1 i = ( )( ) = ( )( ) = .  i=1 i+1 i=1 i+1 k+2 k+1 k+2 k+2

1 1+1 . Inductive step: 1 k+2 .) Observe that

Q1 29. Proof. Base case: (n = 1). Note that i=1 r2i = r2 = r1(1+1) . Inductive Qk Qk+1 step: Suppose k ≥ 1 and i=1 r2i = rk(k+1) . (Goal: i=1 r2i = r(k+1)(k+2) .) Qk+1 Qk Observe that i=1 r2i = ( i=1 r2i )(r2(k+1) ) = (rk(k+1) )(r2(k+1) ) = r(k+1)(k+2) .  Q1 30. Proof. Base case: (n = 1). Note that i=1 im = 1 = (1!)m . Inductive step: Qk m Qk+1 Suppose k ≥ 1 and i=1 i = (k!)m . (Goal: i=1 im = ((k + 1)!)m .) Observe Qk+1 Qk that i=1 im = ( i=1 im )((k + 1)m ) = (k!)m (k + 1)m = ((k + 1)!)m .  31. Proof. Base case: (n = 0). Obvious. Inductive step: Suppose k ≥ 0 and Qk−1 i k k i x2 − y 2 = (x − y) i=0 (x2 + y 2 ). k+1 k+1 k k k k Observe that x2 − y2 = (x2 − y 2 )(x2 + y 2 ) = Qk−1 2i Q i k k i i k ((x − y) i=0 (x + y 2 ))(x2 + y 2 ) = (x − y) i=0 (x2 + y 2 ).  Q1 2! . Inductive 32. Proof. Base case: (n = 1). Note that i=1 (4i − 2) = 2 = 1! Qk Qk+1 (2k)! step: Suppose k ≥ 1 and i=1 (4i − 2) = k! . (Goal: i=1 (4i − 2) = (2k+2)! (k+1)! .) Qk+1 Qk (2k)! Observe that i=1 (4i − 2) = ( i=1 (4i − 2))(4(k + 1) − 2) = k! 2(2k + 1) = (2k+2)! (k+1)! .  33. Proof. Base case: (n = 0). We have s1 ≥ 2s0 ≥ s0 . Inductive step: Suppose Pk k ≥ 0 and sk+1 ≥ i=0 si . Observe that sk+2 ≥ 2sk+1 = sk+1 + sk+1 ≥

4.4. CHAPTER 4 sk+1 +

Pk

i=0 si

=

411

Pk+1 i=0

si . 

P2k+1 P2k+1 1 k+2 34. (a) Sketch. Inductive step: i=2k +1 i=1 i ≥ 2 + P22n 1 (k+1)+2 2n+2 . (b) i=1 i ≥ 2 = n + 1 > n. 2

1 i



k+2 2

1 + 2k 2k+1 =

P1 35. Proof. Base case: (n = 1). Note that i=1 i12 = 1 = 32 − 21 . Inductive step: Pk+1 1 Pk 1 3 1 . (Goal: Suppose k ≥ 1 and i=1 i12 ≥ 32 − k+1 i=1 i2 ≥ 2 − k+2 .) Observe Pk+1 1 Pk 1 1 3 1 1 3 1 that i=1 i2 = i=1 i2 + (k+1) 2 ≥ 2 − k+1 + (k+1)2 ≥ 2 − k+2 .  k 1 2 2 2 Note that k(k + 2) = k + 2k ≤ k + 2k + 1 = (k + 1) . So (k+1) 2 ≤ k+2 , and 1 hence − k+1 +

1 (k+1)2

=

−(k+1)+1 (k+1)2

k 1 = − (k+1) 2 ≥ − k+2 .

Pk+1

i i=1 2i

36. In the inductive step,

= (2 −

k+2 ) 2k

+

k+1 2k+1

=2−

k+3 . 2k+1

P1 37. Proof. Base case: (n = 1). Note that i=1 i12 = 1 = 2 − 1. Inductive step: Pk+1 Pk 1 1 .) Observe that Suppose k ≥ 1 and i=1 i2 ≤ 2 − k1 . (Goal: i=1 i12 ≤ 2 − k+1 Pk+1 1 Pk 1 1 1 1 1 i=1 i2 = i=1 i2 + (k+1)2 ≤ 2 − k + (k+1)2 ≤ 2 − k+1 .  1 1 Since k(k + 2) = k 2 + 2k ≤ k 2 + 2k + 1 = (k + 1)2 , we have (k+1) 2 + k+1 = k+2 1 1 1 1 (k+1)2 ≤ k . Hence − k + (k+1)2 ≤ − k+1 . 38. In the inductive step, 1 2 (3



(k+1)3 −2k2 k2 (k+1) (k+1)2

Pk+1

) = 12 (3 −

1 i=1 i3

1 1 1 2 ≤ 21 (3 − k12 ) + (k+1) 3 = 2 (3 − k 2 + (k+1)3 ) =

1+ k23k+1 (k+1) (k+1)2

) ≤ 12 (3 −

1 (k+1)2 ).

Pb Pb Pb 39. Theorem: i=a (si ± ti ) = i=a si ± i=a ti . Since both sides are 0 when b < a, it suffices to consider b ≥ a. We can consider a fixed, and so our proof is by induction on b. The base case b = a is also easy to check. Sketch. We Pbfocus on + since Pb − is handled Pb similarly. Pb+1 Suppose i=a (si + ti ) = i=a si + i=a ti . Then, i=a (si + ti ) = Pb Pb Pb Pb+1 Pb+1 i=a (si +ti )+sb+1 +tb+1 = i=a si + i=a ti +sb+1 +tb+1 = i=a si + i=a ti .  Pk+1 Pk Pk 40. In the inductive step, i=a csi = i=a csi + csk+1 = c i=a si + csk+1 = Pk Pk+1 c( i=a si + sk+1 ) = c i=a si .

Section 4.5 1. Proof. Base cases: (n = 0, 1). Note that 0 = 20 − 1 and 1 = 21 − 1. Inductive step: Suppose k ≥ 1 and that, for each 0 ≤ i ≤ k, si = 2i − 1. (Goal: sk+1 = 2k+1 − 1.) Observe that sk+1 = 3sk − 2sk−1 = 3(2k − 1) − 2(2k−1 − 1) = 3 · 2k − 3 − 2k + 2 = 2 · 2k − 1 = 2k+1 − 1.  2. Proof. Base cases: (n = 0, 1). Note that 2 = 20 (20 + 1) and 6 = 21 (21 + 1).

412

CHAPTER 4. ANSWERS TO ALL EXERCISES

Inductive step: Suppose k ≥ 1 and that, for each 0 ≤ i ≤ k, si = 2i (2i + 1). (Goal: sk+1 = 2k+1 (2k+1 + 1).) Observe that sk+1 = 6sk − 8sk−1 = 6(2k (2k + 1)) − 8(2k−1 (2k−1 + 1)) = 3(2k+1 (2k + 1)) − 2(2k+1 (2k−1 + 1)) = 2k+1 (3(2k + 1) − 2(2k−1 + 1)) = 2k+1 (2k+1 + 1).  3. Proof. Base cases: (n = 0, 1). Note that 2 = 1 + 1 and 11 = 4 + 7. Inductive step: Suppose k ≥ 1 and that, for each 0 ≤ i ≤ k, si = 4i + 7i . (Goal: sk+1 = 4k+1 + 7k+1 .) Observe that sk+1 = 11sk − 28sk−1 = 11(4k + 7k ) − 28(4k−1 +7k−1 ) = 11(4k )+11(7k )−7(4k )−4(7k ) = 4(4k )+7(7k ) = 4k+1 +7k+1 .  4. Proof. Base cases: (n = 0, 1). Note that 6 = 5 + 1 and 8 = 5 + 3. Inductive step: Suppose k ≥ 1 and that, for each 0 ≤ i ≤ k, si = 5 + 3i . (Goal: sk+1 = 5+3k+1 .) Observe that sk+1 = 4sk −3sk−1 = 4(5+3k )−3(5+3k−1 ) = 5+3k+1 .  5. Proof. Base cases: (n = 0, 1). Note that 1 = 20 and 2 = 21 . Inductive step: Suppose k ≥ 1 and that, for each 0 ≤ i ≤ k, si = 2i . (Goal: sk+1 = 2k+1 .) Observe that sk+1 = 4sk−1 = 4 · 2k−1 = 2k+1 .  6. Proof. Base cases: (n = 0, 1). Note that 0 = 3(0) and 3 = 3(1). Inductive step: Suppose k ≥ 1 and that, for each 0 ≤ i ≤ k, si = 3i. (Goal: sk+1 = 3(k + 1).) Observe that sk+1 = sk−1 + 6 = 3(k − 1) + 6 = 3(k + 1).  7. Proof. Base cases: (n = 0, 1, 2). Note that −1 = 50 −30 −20 , 0 = 51 −31 −21 , and 12 = 52 − 32 − 22 . Inductive step: Suppose k ≥ 2 and that, for each 0 ≤ i ≤ k, si = 5i − 3i − 2i . (Goal: sk+1 = 5k+1 − 3k+1 − 2k+1 .) Observe that sk+1 = 10sk − 31sk−1 + 30sk−2 = 10(5k − 3k − 2k ) − 31(5k−1 − 3k−1 − 2k−1 ) + 30(5k−2 − 3k−2 − 2k−2 ) = 250·5k−2−90·3k−2−40·2k−2−155·5k−2+93·3k−2+62·2k−2+30·5k−2−30·3k−2−30·2k−2 = 125 · 5k−2 − 27 · 3k−2 − 8 · 2k−2 = 5k+1 − 3k+1 − 2k+1 .  8. Proof. Base cases: (n = 0, 1, 2). Note that 2 = 20 +2·50 −70 , 5 = 21 +2·51 −71 , and 5 = 22 + 2 · 52 − 72 . Inductive step: Suppose k ≥ 2 and that, for each 0 ≤ i ≤ k, si = 2i + 2 · 5i − 7i . (Goal: sk+1 = 2k+1 + 2 · 5k+1 − 7k+1 .) Observe that sk+1 = 14sk − 59sk−1 + 70sk−2 = 14(2k + 2 · 5k − 7k ) − 59(2k−1 + 2 · 5k−1 − 7k−1 ) + 70(2k−2 + 2 · 5k−2 − 7k−2 ) = 2k+1 + 2 · 5k+1 − 7k+1 .  9. Proof. Base cases: (n = 0, 1). Note that 1 and 3 are odd. Inductive step: Suppose k ≥ 1 and that, for each 0 ≤ i ≤ k, si is odd. (Goal: sk+1 is odd.) Since sk−1 is odd, we have c ∈ Z such that sk−1 = 2c + 1. Observe that sk+1 = 3sk−1 − 2sk = 3(2c + 1) − 2sk = 6c − 2sk + 2 + 1 = 2(3c − sk + 1) + 1. Since 3c − sk + 1 ∈ Z, we see that sk+1 is odd.  10. (a) Sketch. Inductive step: Suppose, for each 0 ≤ i ≤ k, that si is even, so

4.4. CHAPTER 4

413

si = 2ci for some ci ∈ Z. Observe that sk+1 = sk−2 − sk−1 + sk = 2(ck−2 − ck−1 + ck ) is even.   0 if n ≡ 0 (mod 4),   2 if n ≡ 1 (mod 4), (b) 4. (c) ∀ n ≥ 0, sn =  6 if n ≡ 2 (mod 4),    4 if n ≡ 3 (mod 4). Sketch. Base cases: s0 = 0, s1 = 2, s2 = 6, and s3 = 0 − 2 + 6 = 4. Inductive step: Suppose k ≥ 3 and the result holds up to k. If k + 1 ≡ 0 (mod 4), then sk+1 = 2 − 6 + 4 = 0. If k + 1 ≡ 1 (mod 4), then sk+1 = 6 − 4 + 0 = 2. If k + 1 ≡ 2 (mod 4), then sk+1 = 4 − 0 + 2 = 6. If k + 1 ≡ 3 (mod 4), then sk+1 = 0 − 2 + 6 = 4.  (d) 4 both times. 11. (a) s2 = −6(−1) + 5(0) = 6, s3 = −6(0) + 5(6) = 30, s4 = −6(6) + 5(30) = 114. (b)Proof. Base cases: (n = 0, 1). Note that −1 = 2·30 −3·20 and 0 = 2·31 −3·21 . Inductive step: Suppose k ≥ 1 and that, for each 0 ≤ i ≤ k, si = 2 · 3i − 3 · 2i . (Goal: sk+1 = 2 · 3k+1 − 3 · 2k+1 .) Observe that sk+1 = −6sk−1 + 5sk = −6(2 · 3k−1 − 3 · 2k−1 ) + 5(2 · 3k − 3 · 2k ) = −4 · 3k + 9 · 2k + 10 · 3k − 15 · 2k = 6 · 3k − 6 · 2k = 2 · 3k+1 − 3 · 2k+1 .  (c) Since sn+1 − sn = (2 · 3n+1 − 3 · 2n+1 ) − (2 · 3n − 3 · 2n ) = 2 · 3 · 3n − 3 · 2 · 2n − 2 · 3n + 3 · 2n = 4 · 3n − 3 · 2n ≥ 3(3n − 2n ) ≥ 0, we have sn+1 ≥ sn for all n ≥ 0. 12. (a) 1, 3, 4, 7, 11, 18, 29. (b) The sequence would simply be 1, 2, 3, 5, 8, 13, . . ., the Fibonacci sequence absent its initial term. (c) Sketch. Inductive step: Lk+1 = Lk−1 + Lk =  √ k  √ k+1  √ k+1  √ k−1  √ k−1  √ k 1− 5 1+ 5 1− 5 1+ 5 + + + = 1+2 5 + 1−2 5 . 2 2 2 2  13. (a) s2 = 2(1) + 1 = 3, s3 = 2(3) + 1 = 7, s4 = 2(7) +√3 = 17. √ (b) Proof. Base cases: (n = 0, 1). Note that 1 = 12 ((1 + 2)0 + (1 − 2)0 ) and √ √ 1 = 21 ((1 + 2)1 + (1 −√ 2)1 ). Inductive step: Suppose k ≥ 1 and that, for each √ 0 ≤ i ≤ k,√si = 12 ((1 + √ 2)i + (1 − 2)√i ). Observe that = 2sk + sk−1 = √ sk+1 1 k k k−1 k−1 2( 21 )[(1 + 2) + (1 − 2) ] + ((1 + 2) + (1 − 2) ) 2√ √ √ k−1 √ k−1 √ k−1 = √ 1 ((2 + 2 2)(1 + 2) + (2 − 2 2)(1 − 2) + (1 + 2) + (1 − 2)k−1 ) = 2 √ √ √ √ 1 + √ 2)k−1 + (3 − √ 2 2)(1 − √ 2)k−1 ) = 2 ((3 + 2 √ 2)(1 1 2 k−1 2) √ + (1 − 2)2 (1 − 2)k−1 ) = 2 ((1 + √2) (1 + 1 k+1 2) + (1 − 2)k+1 ).  2 ((1 + (c) Here is a trace of the function call. Encode(3, [5, 2, 7])

414

CHAPTER 4. ANSWERS TO ALL EXERCISES Encode(2, [2, 7]), Encode(1, [7]), Print 7, Encode(0, [7]), Print 0, Encode(1, [2]), Print 2, Encode(1, [2, 7]), Print 2, Encode(2, [5, 2]). Encode(1, [2]), Print 2, Encode(0, [2]), Print 0, Encode(1, [5]), Print 5.

In sequence, it prints 7, 0, 2, 2, 2, 0, 5. 14. ( Sketch. In the inductive ( step, sk+1 = 3 − sk = 3 − 1 if k is odd, 2 if k + 1 is even, =  3 − 2 if k is even. 1 if k + 1 is odd. Strong induction is not needed. 15. This can be proven with regular induction. However, the ability to refer back two previous cases instead of just one is helpful. Sketch. Base cases: (n = 0, 1). These are easy(to check. Inductive step: Suppose k ≥ 1 and, for each 0 ≤ m ≤ k, Pm 1 if m is even, i . i=0 (−1) = 0 if m is odd. Pk+1 Pk−1 Pk−1 Observe that i=0 (−1)i = i=0 (−1)i + (−1)k + (−1)k+1 = i=0 (−1)i . Since k + 1 and k − 1 have the same parity, the result follows.  The point is that (−1)k + (−1)k+1 is either (−1) + (1) or (1) + (−1). Also, the Pk−1 inductive hypothesis applies to i=0 (−1)i . Moreover, k + 1 is even iff k − 1 is even. √ √ 16. √Proof. Base (n√= 0, 1). Note that 3 = 2(1 + 2)0 + (1 − 2)0 and √ cases: 3+ 2 = 2(1+ 2)1 +(1− 2)1 . √ Inductive step: Suppose k√ ≥ 1 and that,√for each √ 0 ≤ i ≤ k, si = 2(1+ 2)i +(1− 2)i . (Goal: sk+1 = 2(1+ 2)k+1 +(1− 2)k+1 .) Observe√that sk+1 =√ 2sk + sk−1 = √ √ k−1 k−1 2(2(1 +√ 2)k + (1 − √2)k ) + 2(1 + 2)√ + (1 − √ 2) = (2(1 +√ 2) + 1)2(1 +√ 2)k−1 + (2(1 − 2) + 1)(1 − 2)k−1 = 2(1 + 2)k+1 + (1 − 2)k+1 .  17. (a) We prove that, for all n ≥ 4, it is possible to attain $n with $2 bills and $5 bills.

4.4. CHAPTER 4

415

Proof. Base cases: (n = 4, 5). We see that $4 = 2 × $2, and $5 = 1 × $5. Inductive step: Suppose k ≥ 5 and that, for each 4 ≤ i ≤ k, it is possible to attain $i with $2 bills and $5 bills. By the induction hypothesis, $(k − 1) = a × $2 + b × $5, for some a, b ∈ N. Observe that $(k + 1) = a × $2 + b × $5 + $2 = (a + 1) × $2 + b × $5.  (b) Increase. All odd amounts would be unachievable. 18. Sketch. Base cases: 44¢ = 4(5¢) + 2(12¢), 45¢ = 9(5¢), 46¢ = 2(5¢) + 3(12¢), 47¢ = 5(5¢) + 1(12¢), and 48¢ = 1(12¢). Inductive step: Use (k + 1)¢ = (k − 4)¢ + 5¢.  At most 4¢ extra is needed, e.g. for 1¢ or 6¢ or 31¢. 19. Proof. Base cases: (n = 25, 26, 27, 28). We see that 25 inches = 6 × 4 inches + 0 × 9 inches + 1, 26 inches = 4 × 4 inches + 1 × 9 inches + 1, 27 inches = 2 × 4 inches + 2 × 9 inches + 1, and 28 inches = 0 × 4 inches + 3 × 9 inches + 1. Inductive step: Suppose k ≥ 28 and that, for each 25 ≤ i ≤ k, it is possible to attain i inches from 4-inch bricks and 9-inch bricks and a sheet of plywood 1 inch thick. By the induction hypothesis, (k − 3) inches = a × 4 inches + b × 9 inches + 1, for some a, b ∈ N. Observe that (k + 1) inches = (a + 1) × 4 inches + b × 9 inches + 1.  20. 3¢ = 1 (3¢), 5¢ = 1 (5¢), and 6¢ = 2 (3¢). It then suffices to show that all values of 8¢ or greater can be obtained. Base cases: (n = 8, 9, 10). 8¢ = 5¢ + 3¢, 9¢ = three 3¢, and 10¢ = two 5¢. Inductive step: Suppose k ≥ 10 and that, for each 8 ≤ i ≤ k, it is possible to attain i¢ from 3¢ and 5¢ stamps. By the induction hypothesis, (k − 2) = a × 3 + b × 5, for some a, b ∈ N. Observe that (k + 1) = (a + 1) × 3 + b × 5. 21. (a) Sketch. Base cases: 4(5¢) = 20¢ = 2(10¢) and 5(5¢) = 25¢ = 1(25¢). Inductive step: Use (k + 1)(5¢) = (k − 1)(5¢) + 10¢.  (b) 5, 6, 7, 8, 9, 15, 16, 17, 18, 19¢. We are showing that, for each k ≥ 4, we can achieve (5k)¢ (i.e., k(5¢)). 22. Sketch. Base cases: 4 = 1(4) and 6 = 1(6). Inductive step: Use 2(k + 1) = 2(k − 1) + 4.  23. 1260 = 22 · 32 · 5 · 7. 24. 2 · 5 · 112 . 25. 3549 = 3 · 7 · 132 . 26. 3 · 53 · 11 · 17. 27. 12! = (22 3)(11)(2 · 5)(32 )(23 )(7)(2 · 3)(5)(22 )(3)(2)(1) = 210 · 35 · 52 · 7 · 11.

416

CHAPTER 4. ANSWERS TO ALL EXERCISES

28. 24 · 3 · 17. 29. (a) Proof. Base case: (n = 2). Note that 22 | 22 . Inductive step: Suppose k ≥ 2 and that each integer i with 2 ≤ i ≤ k has a squared prime divisor. (Goal: k + 1 has a squared prime divisor.) Case 1: k + 1 is prime. Clearly, (k + 1)2 | (k + 1)2 . Case 2: k + 1 is composite. Write k + 1 = rs, where 2 ≤ r ≤ k and 2 ≤ s ≤ k. So, there exists a prime p such that p2 | r2 . That is, r2 = p2 t for some integer t. It follows that (k + 1)2 = r2 s2 = p2 ts2 .  (b) Sketch. Write n = pe11 ·pe22 · · · · ·pemm . So, n2 = (p21 )e1 ·(p22 )e2 · · · · ·(p2m )em . Take p = p1 .  Effectively, the Fundamental Theorem of Arithmetic gives us, in particular, that a prime p divides n. It then immediately follows that p2 | n2 . 30. (a) Proof. Base case: (n = 2). Note that 23 | 23 . Inductive step: Suppose k ≥ 2 and that each integer i with 2 ≤ i ≤ k has a cubed prime divisor. (Goal: k+1 has a cubed prime divisor.) Case 1: k+1 is prime. Clearly, (k+1)3 | (k+1)3 . Case 2: k + 1 is composite. Write k + 1 = rs, where 2 ≤ r ≤ k and 2 ≤ s ≤ k. So, there exists a prime p such that p3 | r3 . That is, r3 = p3 t for some integer t. It follows that (k + 1)3 = r3 s3 = p3 ts3 .  (b) Sketch. Write n = pe11 ·pe22 · · · · ·pemm . So, n3 = (p31 )e1 ·(p32 )e2 · · · · ·(p3m )em . Take p = p1 .  31. Sketch. By reordering if necessary, we may assume that p1 < p2 < · · · < pm . min{e1 ,f1 } min{e2 ,f2 } min{e ,f } Let d = p1 p2 · · · pm m m , let a = pe11 pe22 · · · pemm , and let b = pf11 pf22 · · · pfmm . Observe that d ≥ 1 > 0, d | a, and d | b. Suppose c ∈ Z+ and c | a and c | b. By the Fundamental Theorem of Arithmetic, we have a unique standard factorization c = q1g1 q2g2 · · · qngn for some primes q1 , q2 , . . . , qn and natural numbers g1 , g2 , . . . , gn . Since c | a, we have q1 | a. Since q1 is prime, it must be that q1 = p1 . Moreover, since q1g1 | a, it must be that q1g1 | pe11 , whence g1 ≤ e1 . Similarly, g1 ≤ f1 . Hence, g1 ≤ min{e1 , f1 }. Repeating this argument, we conclude that, for each i, we have gi ≤ min{ei , fi }. Therefore, c | d, and it follows that c ≤ d.  mn . By Exercise 31, we can write 32. Assume that m, n > 0. Let l = gcd(m,n) ej s1 e1 e2 s2 m = p1 · p2 · · · · · pj q1 · q2 · · · · · qksk and b = pe11 · pe22 · · · · · e pj j r1t1 · r2t2 · · · · · rhth , where p1 , . . . , pj , q1 , . . . , qk , r1 , . . . , rh are primes and e {q1 , . . . , qk } ∩ {r1 , . . . , rh } = ∅. So gcd(m, n) = pe11 · pe22 · · · · · pj j and e

l = pe11 · pe22 · · · · · pj j q1s1 · q2s2 · · · · · qksk · r1t1 · r2t2 · · · · · rhth Argue that l satisfies the three properties in the definition of the least common multiple. 33. Sketch. Write a = pe11 · pe22 ·

···

· pemm and b = pf11 · pf22 ·

···

· pfmm ,

4.4. CHAPTER 4

417

where e1 , e2 , . . . , em , f1 , f2 , . . . , fm are nonnegative integers. Let d = gcd(a, b), and write d = pc11 · pc22 · · · · · pcmm , where, for each 1 ≤ i ≤ m, ci = min{ei , fi }. 2f1 2 2 2 1 m m · · · · · p2f · p2f · · · · · p2e · p2e Note that a2 = p2e m , and m , b = p1 2 2 1 2c1 2c2 2 2cm d = p1 · p2 · · · · · pm . Since, for each 1 ≤ i ≤ m, 2ci = min{2ei , 2fi }, we see that d2 = gcd(a2 , b2 ).  34. Sketch. By Exercise 31, we can write a = pe11 · pe22 · · · · · pemm q1s1 · q2s2 · · · · · qusu and b = pe11 · pe22 · · · · · pemm r1t1 · r2t2 · · · · · rvtv , where p1 , . . . , pm , q1 , . . . , qu , r1 , . . . , rv are primes and {q1 , . . . , qu } ∩ {r1 , . . . , rv } = ∅. So gcd(a, b) = pe11 ·pe22 · · · · ·pemm and gcd(q1s1 ·q2s2 · · · · ·qusu , r1t1 ·r2t2 · · · · ·rvtv ) = 1.  35. (a) Proof. Existence: The base case n = 1 is obvious, so we focus on the inductive step. Suppose k ≥ 1 and each 1 ≤ i ≤ k has a binary representation. By the Division Algorithm, k + 1 = 2j + r for some r = 0 or 1 and some positive integer j ≤ k. Write j = bm 2m + bm−1 2m−1 + b1 2 + b0 . Observe that k + 1 = 2j + r = bm 2m+1 + bm−1 2m + b1 22 + b0 2 + r. Thus, k + 1 has a binary representation. Uniqueness: Suppose to the contrary that some n > 1 has two different binary representations. If necessary, by padding the shorter one with zeros on the left, we may assume that they have the same number of digits. Say, bm 2m + bm−1 2m−1 + b1 2 + b0 = am 2m + am−1 2m−1 + a1 2 + a0 .

(4.1)

Let j be the largest index where bj 6= aj , say bj = 1 and aj = 0. Since, Pj−1 i j i=0 ai 2 < 2 , equation (4.1) is impossible. Thus we have a contradiction.  (b) Proof. Existence: The base case n = 1 is obvious, so we focus on the inductive step. Suppose k ≥ 1 and each 1 ≤ i ≤ k has a base s representation. By the Division Algorithm, k + 1 = sj + r for some 0 ≤ r < s and some positive integer j ≤ k. Write j = bm sm + bm−1 sm−1 + b1 s + b0 . Observe that k + 1 = sj + r = bm sm+1 + bm−1 sm + b1 s2 + b0 s + r. Thus, k + 1 has a base s representation. Uniqueness: Suppose to the contrary that some n > 1 has two different base s representations. If necessary, by padding the shorter one with zeros on the left, we may assume that they have the same number of digits. Say, bm sm + bm−1 sm−1 + b1 s + b0 = am sm + am−1 sm−1 + a1 s + a0 .

(4.2)

Pj−1

ai si < sj ,

Let j be the largest index where bj 6= aj , say bj > aj . Since, equation (4.2) is impossible. Thus we have a contradiction. 

i=0

36. This can be proven by strong induction on n. In the inductive step, write n + 1 = sq + r, where q = n + 1 div s and r = n + 1 mod s. Since q < n + 1, the inductive hypothesis gives q = aj sj + aj−1 sj−1 + · · · + a0 s0 . Observe that n + 1 = sq + r = aj sj+1 + aj sj + · · · + a0 s1 + r. 37. Proof. The base case is Theorem 4.2(b). Suppose k ≥ 1 and that, for each

418

CHAPTER 4. ANSWERS TO ALL EXERCISES

n X i=1

ik+1 =

Pn

ij . By Theorem 4.4,  Pn j i Pk h (n + 1)((n + 1)k+1 − 1) − j=1 k+2 i=1 i j

1 ≤ j ≤ k, n(n + 1) is a factor of

i=1

k+2

.

Since n is a factor P of (n + 1)k+1 − 1 and, by the inductive hypothesis, n(n + 1) n is a factor of each i=1 ij , it follows that n(n + 1) is a factor of the numerator above as asserted.  That n is a factor of (n + 1)k+1 − 1 can be proven here by induction on k or can be seen by the Binomial Theorem in the next section. P0 Pk+1 2 38. Sketch. Base case: i=0 12 = 1 · 1. Inductive step: i=0 Fi = Pk 2 2 2 i=0 Fi + Fk+1 = Fk Fk+1 + Fk+1 = Fk+1 (Fk + Fk+1 ) = Fk+1 Fk+2 .  39. Note that only regular induction is needed here. Proof. Base case: (n = 0). Pk Note that F0 = F2 − 1. Inductive step: Suppose k ≥ 0 and i=0 Fi = Fk+2 − 1. Pk+1 Observe that i=0 Fi = (Fk+2 − 1) + Fk+1 = Fk+3 − 1.    P0 P0 40. Sketch. Base cases: 1 = i=0 0−0 and 1 = i=0 1−0 . Inductive step: 0 0 P(k−1) div 2 k−1−i Pk div 2−1 k−1−i Fk+1 = Fk−1 + Fk = i=0 + 1 + i=0 i i+1 . Now use    k−1−i k−1−i (k+1)−(i+1) + i+1 = .  i i+1 41. Note that only regular induction is needed here.  2     1 1 2 1 F2 F1 Proof. Base case: (n = 2). Note that = = . 1 0 1 1 F1 F0  k   1 1 Fk Fk−1 Inductive step: Suppose k ≥ 2 and = . Observe that 1 0 Fk−1 Fk−2  k+1    1 1 Fk Fk−1 1 1 = = Fk−1 Fk−2 1 0   1 0 Fk + Fk−1 Fk Fk+1 Fk = .  Fk−1 + Fk−2 Fk−1 Fk Fk−1 42. Sketch. Base cases: 4 = 3 + 1 and 7 = 5 + 2. Inductive step: Lk+1 = Lk−1 + Lk = Fk−1 + Fk−3 + Fk + Fk−2 = (Fk−1 + Fk ) + (Fk−3 + Fk−2 ) = Fk+1 + Fk−1 .  43. Proof. Base case: (n = 0). Note that gcd(F0 , F1 ) = gcd(1, 1) = 1. Inductive step: Suppose k ≥ 0 and gcd(Fk , Fk+1 ) = 1. Suppose to the contrary that gcd(Fk+1 , Fk+2 ) > 1. So we have some integer c > 1 such that c divides Fk+1 and Fk+2 . That is, we have a, b ∈ Z such that Fk+1 = ca and Fk+2 = cb. Hence, Fk = Fk+2 −Fk+1 = cb−ca = c(b−a). Now c divides Fk and Fk+1 , which contradicts the fact that gcd(Fk , Fk+1 ) = 1. So we conclude that gcd(Fk+1 , Fk+2 ) = 1. 

4.4. CHAPTER 4

419

44. Use Exercise 42 to get Ln+1 = Fn+1 + Fn−1 = Fn+1 + Fn−1 + Fn − Fn = 2Fn+1 − Fn . Hence, Fn + Ln+1 is even. 45. Proof. Assume conditions (i) and (ii) in the hypotheses of the theorem. Suppose it is not true that P (n) holds ∀ n ≥ a. Let S be the set of those integers n ≥ a for which P (n) does not hold. By our assumptions, S is nonempty. Hence, by the Generalized Well-Ordering Principle, S has a smallest element, say s. Since P (a), P (a + 1), . . . , P (b) all hold, it must be that s > b. Therefore, s − 1 ≥ b. Since a, . . . , s − 1 ∈ / S, it follows that P (a), . . . , P (s − 1) all hold. However, for k = s − 1, by condition (ii), P (k + 1) must also hold. That is, P (s) holds. This contradicts the fact that s ∈ S.  46. Proof. Suppose to the contrary that there is a smallest positive integer n that has no standard factorization. By Theorem 3.5, there is a prime p | n. Since np is a smaller positive integer than n, it has a standard factorization np = pe11 · · · pemm . By throwing p into this product, we obtain a standard factorization of n and a contradiction.  47. Sketch. Attempting to write 23 = 5t + 2c for t = 0, . . . , 4 shows that it is impossible. Now observe that 24, . . . , 28 are achievable. For any number of points k ≥ 29, we can always score (k − 5) points first and then score another try.  The requirement that t ≥ c forces us to consider 5 base cases instead of just choosing the smaller number 2. 48. (a) Proof. Suppose to the contrary that there are x, y ∈ N such that ax+by = (a−1)(b−1)−1 = ab−a−b. So ax = a(b−1)−b(y+1), and a(b−x−1) = b(y+1). Since a | b(y + 1), it must be that a | (y + 1). Hence, y + 1 = ak for some k ∈ Z. Moreover, k ≥ 1. So 0 ≤ ax = a(b − 1) − bak ≤ a(b − 1) − ba = −a < 0, a contradiction.  (b) Proof. We have integers u, v such that au+bv = 1. Without loss of generality, we may assume that u > 0, and consequently v < 0. Since ∀ i ∈ Z, a(u − ib) + = a(b−u)+1 > b(v + ia) = 1, we may also assume that u < b. So a + v = a + 1−au b b 0, and hence y = (a + v − 1) ∈ N. Since u > 0, we have x = (u − 1) ∈ N. Finally, observe that a(u − 1) + b(a + v − 1) = ab − a − b + au + bv = ab − a − b + 1 = (a − 1)(b − 1).  For more on this problem see: J. J. Sylvester, Mathematical questions with their solutions, Educational Times, 41 (1884), 171-178.

420

CHAPTER 4. ANSWERS TO ALL EXERCISES

Section 4.6 (n−1)! (n+1)! (n−1)! (n+1)! n! n! 1. (k−1)!(n−k)! (k+1)!(n−1−k)! k!(n+1−k)! = k!(n−1−k)! (k−1)!(n+1−k)! (k+1)!(n−k)! . The numerators are the same. In the denominators, the factors on the righthand side are the same as those on the left-hand side. They just appear in a different order.

  n−2 n−2 2. n−2 = k−2 +2 k−1 + k The shape is a triangle.

n−2 k−2



+

n−2 k−1



+

n−2 k−1



+

n−2 k

3 2 2 3 3. x5 + 5x4 y + y +5xy 4 + y 5.  10x y 5+ 10x 5 5 0 4 1 5 (x + y) = 0 x y + 1 x y + 52 x3 y 2 + 53 x2 y 3 + x5 + 5x4 y + 10x3 y 2 + 10x2 y 3 + 5xy 4 + y 5 .



5 4



=

n−1 k−1

x1 y 4 +



+

5 5



n−1 k



=

n k



.

x0 y 5 =

4. x7 + 7x6 y + 21x5 y 2 + 35x4 y 3 + 35x3 y 4 + 21x2 y 5 + 7xy 6 + y 7 . 5 4 2 3 3 5. 729x6 + 1458x y  + 135x2 y 4 +18xy 5 + y 6 .   y 6+ 01215x6 y +5 540x 6 1 6 (3x + y) = 0 (3x) y + 1 (3x) y + 62 (3x)4 y 2 + 63 (3x)3 y 3 + 64 (3x)2 y 4 +   6 6 1 5 0 6 6 5 4 2 3 3 2 4 5 (3x) y + 6 (3x) y = 729x + 1458x y + 1215x y + 540x y + 135x y + 5 6 18xy + y .

6. x5 + 10x4 y + 40x3 y 2 + 80x2 y 3 + 80xy 4 + 32y 5 . 2 3 7. 32x5 − 80x4 y + 80x3 y 2 − 40x 10xy 4 − y5 .  y +  5 5 5 5 (2x − y) = (2x + (−y)) = 0 (2x) (−y)0 + 51 (2x)4 (−y)1 + 52 (2x)3 (−y)2 +    5 5 5 2 3 1 4 0 5 5 4 3 2 3 (2x) (−y) + 4 (2x) (−y) + 5 (2x) (−y) = 32x − 80x y + 80x y − 40x2 y 3 + 10xy 4 − y 5 .

8. x6 − 18x5 y + 135x4 y 2 − 540x3 y 3 + 1215x2 y 4 − 1458xy 5 + 729y 6 .   n 9. xn − nxn−1 + n2 xn−2 − n3 xn−3 + · · · + (−1)  .  n n n n−1 n n 0 (x− 1) = (x + (−1)) = 0 x (−1) + 1 x (−1)1 + n2 xn−2 (−1)2 +  n n−3 (−1)3 +· · ·+ nn x0 (−1)n = xn −nxn−1 + n2 xn−2 − n3 xn−3 +· · ·+(−1)n . 3 x 10. xn + 2nxn−1 + 4

n 2



xn−2 + · · · + 2i

n i



xn−i + · · · + 2n .

    n n−2 1 2 n n−3 1 3 1 1 11. (a) (x + 12 )n = n0 xn ( 12 )0 + n1 xn−1 ( ) + x ( ) + x (2) + 2 2 2 3   n 0 1 n 1 1 n n−2 1 n n−3 1 n n−1 · · · + n x ( 2 ) = x + 2 nx + 4 2 x +8 3 x + · · · + 2n . (b) The  n n 5 n 1 1 x . So the coefficient of x5 is 2n−5 relevant term is n−5 x5 ( 12 )n−5 = 2n−5 5 5 . 12.

Pn

i=0

n i



n−i xi ( −1 . So, 3 )

n 6



n−6 ( −1 . 3 )

8 13. x8 + 4x6 y 2 + 6x4 y 4 + 4x2 y 6 +  y 2. 3 2 1  4 4 2 2 4 2 4 2 0 (x + y ) = 0 (x ) (y ) + 1 (x ) (y ) + 42 (x2 )2 (y 2 )2 +  4 2 0 2 4 8 6 2 4 4 2 6 8 4 (x ) (y ) = x + 4x y + 6x y + 4x y + y .

4 3



(x2 )1 (y 2 )3 +

4.4. CHAPTER 4

421

14. x10 + 5x8 y 2 + 10x6 y 4 + 10x4 y 6 + 5x2 y 8 + y 10 . 8 3 6 6 15. 243x10 + 405x y + 90x4 y 9 + 15x2y 12 + y 15 .  y2 5+ 270x  5 2 3 5 3 0 (3x +y ) = 0 (3x ) (y ) + 51 (3x2 )4 (y 3 )1 + 52 (3x2 )3 (y 3 )2 + 53 (3x2 )2 (y 3 )3 +   5 5 2 1 3 4 2 0 3 5 = 243x10 + 405x8 y 3 + 270x6 y 6 + 90x4 y 9 + 4 (3x ) (y ) + 5 (3x ) (y ) 15x2 y 12 + y 15 .

16. x12 + 8x9 y 2 + 24x6 y 4 + 32x3 y 6 + 16y 8 .     17. (a) (x2 + 1)n = n0 (x2 )n 10 + n1 (x2 )n−1 11 + n2 (x2)n−2 12 + n3 (x2 )n−3 13 + n · · · + n−1 (x2 )1 1n−1 + nn (x2 )0 1n = x2n + nx2n−2 + n2 x2n−4 + n3 x2n−6 + · · · +  2 4 n−4  n nx2 + 1. (b) The relevant term is n−4 (x ) 1 = n4 x8 . So the coefficient of  x8 is n4 . 18.

Pn

n i

i=0



x2(n−i) y 2i . So,

n 5



x2n−10 .

  19. n2 nn−2 − n3 nn−3 + · · · + (−1)n−1 n2 + (−1)n . In Exercise 9, substitute x = n. Note that the first two terms nn − n · nn−1 cancel. 20.

Pn

n i

i=0



ni .

1 1 1 100 ) ≈ 2.7048, (1 + 1000 )1000 ≈ 2.7169, (1 + 10000 )10000 ≈ 2.7181. 21. (a) (1 + 100  P P P n n n (n−1)(n−2)···(n−i+1) n 1 n! 1 (b) (1+ n1 )n = i=0 i 1n−i ( n1 )i = i=0 i!(n−i)! . i=0 i! ni = ni−1

22. (a) .3660, .3670, .3672. (b)

Pn

i=0

(−1)i (n−1)(n−2)···(n−i+1) . i! ni−1

 60 40 23. 100 40 3 2 .  Note that 60 + 40 = 100 and (3x + 2y)100 = · · · + 100 (3x)60 (2y)40 + · · · = 40   60 40 60 40 60 40 · · · + 100 + · · · . So 100 is the coefficient of x60 y 40 . 40 3 2 x y 40 3 2 24. −

500 7



27 .

 10 25. 400 10 2 . Note that(x2 )10 (y 3 )390 = x20 y 1170 , that 10+390 = 400 and, that (2x2+y 3 )400 =  400 400 10 20 1170 2 10 3 390 10 + · · · . So 400 is the · · · + 10 (2x ) (y ) + · · · = · · · + 10 2 x y 10 2 20 1170 coefficient of x y . 26.

300 20



220 .

27. 0. Note that (x2 )30−i (y 2 )i = x60−2i y 2i can never be x50 y 50 , since there is no value of i for which both 60 − 2i = 50 and 2i = 50.

422

CHAPTER 4. ANSWERS TO ALL EXERCISES

28. 0. 29. (a) (x + x−1 )10 = x10 + 10x8 + 45x6 + 120x4 + 210x2 + 252 + 210x−2 + 15 . 120x−4 + 45x−6 + 10x−8 + x−10 and 2110 · 120 = 128 2 −2 10 20 16 12 8 (b) (x +x ) = x +10x +45x +120x +210x4 +252+210x−4 +120x−8 + 45x−12 + 10x−16 + x−20 and 2110 · 210 = 105 512 . (c) (x3 + x−1 )10 = x30 + 10x26 + 45x22 + 120x18 + 210x14 + 252x10 + 210x6 + 120x2 + 45x−2 + 10x−6 + x−10 and 2110 · 0 = 0. 30. (a)

(12 4) 4096

=

495 4096 .

(b)

(12 6) 4096

31. Proof. 9n = (1 + 8)n = 32.

Pn

i=0

n i



=

231 1024 .

Pn

i=0

34. Proof. 4n = (3 + 1)n =

Pn

i=0

n i



Pn

Pn

i=0

n i



8i . 



Pn

i=0

n i



n i



3n−i . 

10n−i 2i . 

3n−i 1i =

Pn

i=0

n i



Pn

i=0

5n−i 3i . 

22i 3n−i = (22 + 3)n = 7n .

37. Proof. 2n = (3 − 1)n = 38.

1n−i 8i =

n i

i=0

35. Proof. 23n = 8n = (5 + 3)n = Pn



2n−i 3i = (2 + 3)n = 5n .

33. Proof. 12n = (10 + 2)n =

36.

n i

i=0 (−1)

i n i



Pn

i=0

n i



3n−i (−1)i =

Pn

i=0 (−1)

i n i



3n−i . 

2n−i 3i = (2 − 3)n = (−1)n .

 Pn Pn 39. (a) Proof. 6n = (2+4)n = i=0 ni 2n−i 4i = i=0  P  n (b) i=0 ni 2i = 3n . Consider (1 + 2)n = 3n .

n i



2n−i 22i =

Pn n n−i Pn i i 40. (a) (−2)n = (2 − 4)n = 2 (−4) = i=0 i=0 (−1) i  Pn P n n n i n+i . (b) i=0 (−1)i i 2i = (−1)n . i=0 (−1) i 2 41. Proof. ( 32 )n = (1 − 31 )n = Pn i n 1 i i=0 (−1) i ( 3 ) .  42.

Pn

i=0

n i



( 21 )i =

Pn

i=0

n i



Pn

i=0

n i



1n−i (− 13 )i =

Pn

i=0

n i



Pn

n i

i=0



n i



2n+i .

2n−i 22i =

(−1)i ( 13 )i =

1n−i ( 12 )i = (1 + 21 )n = ( 32 )n .

43. Proof. Suppose a and b are relatively prime. By Corollary 3.14, we get n 2 2 n ax+ by = 1, for some x, y ∈ Z. So, bn y n = x −  (1 − ax)  = 1 − nax + n2 na n−1 n 3 3 n 2 n 3 2 n n n a x +· · ·+(−1) a x = 1+x(−na+ a x− a x +· · ·+(−1) a x ). 3 2 3   With c = −na + n2 a2 x − n3 a3 x2 + · · · + (−1)n an xn−1 , we have bn y n = 1 − xc. That is, cx + bn y n = 1. By Corollary 3.14, a and bn are relatively prime. 

4.4. CHAPTER 4

423

44. 1. By the Binomial Theorem, Pm−1 (i + 1)m+1 = im+1 + j=1 m+1 ij + (m + 1)im . j 2. The sum of the left-hand side is a telescoping sum. 3. Simple algebra gives the desired formula.

Review 1. 23 24 25 26 27

8,64, 320, 1280, 4480. 3 3 = 8, 4 3 = 64, 5 3 = 320, 6 3 = 1280, 7 3 = 4480.

2. s1 s2 s3 s4 s5

3, 5, 21, 437, 190965. = 3, = 32 − 4 = 5, = 52 − 4 = 21, = 212 − 4 = 437, = 4372 − 4 = 190965.

3. ∀ n ≥ 1, sn = 2nn . Note that these are fractions. The numerators form the sequence 1, 2, 3, 4, 5, . . .. The denominators are the powers of two 21 , 22 , 23 , 24 , 25 , . . .. 4. s0 = −6, and ∀ n ≥ 1, sn = sn−1 + 12. This is an arithmetic sequence. The difference between consecutive terms is always 12. 5. ∀ n ≥ 0, sn = −2(−3)n . This is a geometric sequence. The multiplying factor is −3. 2 6. (a) 500(1 + .06 12 ) = 505.01. (b) Note that 2 years is 24 months and 500(1 +

 7. ∀ n ≥ 0, sn = 8 · 2n n+3 3 .  Let m = n − 3. So 2n n3 = 2m+3

n+3 3



= 2m 23

.06 24 12 )

n+3 3



= 563.58.

= 8 · 2m

m+3 3



.

8. s2k − 4. Let n = k + 1. So sk+1 = s2(k+1)−1 − 4 = s2k − 4. Pn i−1 9. . i=3 3 · 2 The last term suggests that the general term might be 3 · 2i−1 . Note that the first term is 12 = 3 · 23−1 . 10. 125250. P500 500(501) = 125250. i=1 i = 2 11

−1 3 . 410+1 −1 i i=0 4 = 4−1

11. 4 P10

=

411 −1 3 .

424

12. (a)

CHAPTER 4. ANSWERS TO ALL EXERCISES

P20

i=1

i=

20(21) 2

= 210. (b)

P20

i=1

i2 =

20(21)(41) 6

13. P1010200. P100 P100 100 3 i=1 i2 − i=1 i + i=1 2 = 3 100(101)(201) − 6

100(101) 2

= 2870.

+ 2(100) = 1010200.

2

14. n(2n −9n+13) . 6 Pn Pn 2 Pn Pn 2 i=1 (i −4i+4) = i=1 i −4 i=1 i+ i=1 4 = n(2n2 −9n+13) . 6

1−(−2)n+1 . 3 (−2)n+1 −1 1−(−2)n+1 = 1−(−2) −2−1

n(n+1)(2n+1) −4 n(n+1) +4n 6 2

=

15.

=

1−(−2)n+1 . 3

16. 1 · 3 · 5 · 7 · 9 = 945. P12(10)−1 17. (a) s10 = 80000(1.05)12(10) − i=0 500(1.05)i = 63, 612.07 and s20 = P 12(20)−1 12(20) i 80000(1.05) − i=0 500(1.05) = 83, 395.81. P359 360 −1 12(30) . So M = (b) We want M (1.005) = 500 i=0 (1.005)i = 500 1.005 0.005 $83,395.81. P198 P198 2 = 325 j=0 ( 13 )j . 18. (a) Let j = i − 5. So j=0 3j+5 P198 1−( 1 )199 1−( 13 )199 (b) j=0 ( 13 )j = 325 1−3 1 = . 34 3

19. Proof. Base case: (n = 9). Note that 9! > 49 . Inductive step: Suppose k ≥ 9 and k! > 4k . (Goal: (k + 1)! > 4k+1 .) Observe that (k + 1)! = (k + 1)k! > (k + 1)4k ≥ 4 · 4k = 4k+1 . That is, (k + 1)! > 4k+1 .  20. Proof. Base case: (n = 6). Note that 62 > 4(6 + 2). Inductive step: Suppose k ≥ 6 and k 2 > 4(k + 2). (Goal: (k + 1)2 > 4(k + 3).) Observe that (k + 1)2 = k 2 + 2k + 1 > 4(k + 2) + 2k + 1 = 4k + 2k + 9 > 4k + 12 = 4(k + 3).  21. Proof. Base case: (n = 0). Note that 30 ≥ 02 + 1. Inductive step: Suppose k ≥ 0 and 3k ≥ k 2 + 1. (Goal: 3k+1 ≥ (k + 1)2 + 1.) Observe that 3k+1 = 3 · 3k ≥ 3(k 2 + 1) = 3k 2 + 3 = k 2 + (2k 2 + 3) ≥ k 2 + (2k + 2) = (k + 1)2 + 1.  22. Proof. Base case: (n = 0). Clearly, 3 | 6. Inductive step: Suppose k ≥ 0 and 3 | (k 3 − 4k + 6). So k 3 − 4k + 6 = 3c for some c ∈ Z. Observe that (k + 1)3 − 4(k + 1) + 6 = (k 3 − 4k + 6) + (3k 2 + 3k − 3) = 3(c + k 2 + 3k − 1). So 3 | ((k + 1)3 − 4(k + 1) + 6).  23. Proof. Base case: (n = 0). Clearly, 6 | 0. Inductive step: Suppose k ≥ 0 and 6 | (7k − 1). So 7k − 1 = 6c for some c ∈ Z. Observe that 7k+1 − 1 = 7 · 7k − 1 = 6 · 7k + 7k − 1 = 6(7k + c). So 6 | (7k+1 − 1). 

4.4. CHAPTER 4

425

24. Proof. Base case: (n = 0). Clearly, 3 | 0. Inductive step: Suppose k ≥ 0 and 3 | (5k − 2k ). So 5k − 2k = 3c for some c ∈ Z. Observe that 5k+1 − 2k+1 = 5 · 5k − 2 · 2k = 3 · 5k + 2(5k − 2k ) = 3(5k + 2c). So 3 | (5k+1 − 2k+1 ).  25. (a) s1 = 1.005(0) + 300 = 300, s2 = 1.005(300) + 300 = 601.50, s3 = 1.005(601.50) + 300 = 904.51. (b) Proof. Base case: (n = 0). Note that 0 = 60000(1.0050 − 1). Suppose k ≥ 0 and sk = 60000(1.005k − 1). Observe that sk+1 = 1.005sk + 300 = (1.005)60000(1.005k − 1) + 300 = 60000(1.005k+1 ) − 60300 + 300 = 60000(1.005k+1 − 1).  26. Proof. The base case is the Distributive Law. Suppose k ≥ 2 and a(x1 + · · · + xk ) = ax1 + · · · + axk . Observe that a(x1 + · · · + xk + xk+1 ) = a((x1 + · · · + xk ) + xk+1 ) = a(x1 + · · · + xk ) + axk+1 = ax1 + · · · + axk + axk+1 .  27. Proof. Base case: (|S| = 1). If S = {s1 }, then min(S) = s1 . Inductive step: Suppose k ≥ 1 and, any set S with |S| = k has a minimal element. (Goal: Any set S with |S| = k + 1 has a minimal element.) Suppose s1 , s2 , . . . , sk+1 are distinct real numbers and S = {s1 , s2 , . . . , sk+1 }. By the induction hypothesis, the set {s1 , s2 , . . . , sk } has a(minimal element, say sj . Observe that {sj , sk+1 } sj if sj < sk+1 has a minimal element m = Note that m is the minimum sk+1 otherwise. element of S.  P1 1 1 1 1 28. Proof. Base case: (n = 1). Note that i=1 ( i − i+1 ) = 2 = 1 − 1+1 . Pk 1 1 1 Inductive step: Suppose k ≥ 1 and i=1 ( i − i+1 ) = 1 − k+1 . Observe that Pk+1 1 P k 1 1 1 1 1 1 1 1 1 i=1 ( i − i+1 ) = i=1 ( i − i+1 )+( k+1 − k+2 ) = 1− k+1 + k+1 − k+2 = 1− k+2 .  Pn n 29. We prove ∀ n ≥ 1, i=1 (3i + 1) = 2 (3n + 5). Proof. Base case: (n = 1). Note that 4 = 12 (3 + 5). Inductive step: Suppose Pk Pk+1 k ≥ 1 and i=1 (3i + 1) = k2 (3k + 5). Observe that i=1 (3i + 1) = Pk k(3k+5)+2(3k+4) k = i=1 (3i + 1) + (3(k + 1) + 1) = 2 (3k + 5) + (3k + 4) = 2 2 (k+1)(3k+8) 3k +11k+8 k+1 = = 2 (3(k + 1) + 5).  2 2 30. Proof. Base case: (n = 1). Note that 31 = 32 (31 − 1). Inductive step: Pk Pk+1 Pk Suppose k ≥ 1 and i=1 3i = 32 (3k − 1). Now, i=1 3i = i=1 3i + 3k+1 = 3 k 2 (3

− 1) + 3k+1 =

3(3k −1)+2(3k+1 ) 2

=

3(3k+1 )−3 2

= 32 (3k+1 − 1). 

P0 31. Proof. Base case: (n = 0). Note that i=0 (i + 1)2i = 1 = 0 · 20+1 + 1. Pk Inductive step: Suppose k ≥ 0 and i=0 (i + 1)2i = k2k+1 + 1. Observe that

426 Pk+1

CHAPTER 4. ANSWERS TO ALL EXERCISES Pk = i=0 (i+1)2i + (k+2)2k+1 = k2k+1 + 1 + (k+2)2k+1 = + 1 = (k+1)2k+2 + 1. 

i i=0 (i+1)2 k+1

(2k+2)2

32. Proof. Base case: (n = 1). Note that 3 + 5 = 1(2)(4). Inductive step: Pk Pk+1 Suppose k ≥ 1 and i=1 (3i2 + 5i) = k(k + 1)(k + 3). Now, i=1 (3i2 + 5i) = Pk 2 2 i=1 (3i + 5i) + (3(k + 1) + 5(k + 1)) = k(k + 1)(k + 3) + (k + 1)(3(k + 1) + 5) = (k + 1)((k + 1) + 1)((k + 1) + 3).  P1 33. Proof. Base case: (n = 1). Note that i=1 i4i = 4 = 94 [4(2) + 1]. Inductive Pk step: Suppose k ≥ 1 and i=1 i4i = 94 [4k (3k − 1) + 1]. Observe that Pk+1 i Pk i k+1 = 94 [4k (3k − 1) + 1] + (k + 1)4k+1 = i=1 i4 + (k + 1)4 i=1 i4 = 4 k 4 k 4 k k 9 [4 (3k − 1) + 1 + 9(k + 1)4 ] = 9 [4 (3k − 1 + 9k + 9) + 1] = 9 [4 (12k + 8) + 1] = 4 k+1 (3k + 2) + 1].  9 [4 34. Sketch. The case when n = 1 is obvious, and the case when n = 2 is one ofPthe Laws P of Exponents from Appendix A. In the inductive step, we have Pn Qn Qn+1 n+1 n b i=1 ai = b( i=1 ai )+an+1 = b( i=1 ai ) ban+1 = ( i=1 bai )ban+1 = i=1 bai .  35. Proof. Base cases: (n = 0, 1). Note that 3 | 6 and 3 | 3. Inductive step: Suppose k ≥ 1 and that, for each 0 ≤ i ≤ k, 3 | si . (Goal: 3 | sk+1 .) Since 3 | sk−1 and 3 | sk , we have c, d ∈ Z such that sk−1 = 3c and sk = 3d. Observe that sk+1 = 2sk−1 + sk = 2(3c) + 3d = 3(2c + d). Thus, 3 | sk+1 .  36. Proof. Base cases: (n = 0, 1). Note that 3 | 6 and 3 | 3. Inductive step: Suppose k ≥ 1 and that, for each 0 ≤ i ≤ k, si = 4 · 5i + 3 · 4i . (Goal: sk+1 = 4 · 5k+1 + 3 · 4k+1 .) Observe that sk+1 = −20sk−1 + 9sk = −20(4 · 5k−1 + 3 · 4k−1 ) + 9(4 · 5k + 3 · 4k ) = −16 · 5k − 14 · 4k + 36 · 5k + 27 · 4k = 20 · 5k + 12 · 4k = 4 · 5k+1 + 3 · 4k+1 .  37. Proof. Base cases: (n = 0, 1). Note that 5 = 21 + 3 · 20 and 16 = 22 + 3 · 22 . Inductive step: Suppose k ≥ 0 and that, for 0 ≤ i ≤ k, si = 2i+1 + 3 · 22i . Now, sk+1 = 6sk − 8sk−1 = 6(2k+1 + 3 · 22k ) − 8(2k + 3 · 22(k−1) ) = 3 · 2k+2 + 9 · 22k+1 − 2 · 2k+2 − 3 · 22k+1 = 2k+2 + 6 · 22k+1 = 2(k+1)+1 + 3 · 22(k+1) .  38. (a) Four 3¢ stamps and one 8¢ stamp. (b) Sketch. 14 = 2(3) + 1(8), 15 = 5(3), and 16 = 2(8). Further, k + 1 = (k − 2) + 1(3). Therefore, if, for some k ≥ 16, we can obtain (k − 2)¢, then an additional 3¢ stamp will yield (k + 1)¢.  Three base cases suffice, since 3¢ is the smallest value for a single stamp. 39. 1001 = 7 · 11 · 13. 40. 78408 = 23 · 34 · 112 .

4.4. CHAPTER 4

427

41.22 · 52 · 72 · 11 · 23 · 43 · 47. 50 50·49·48·47·46·45·44·43·42 = 22 · 52 · 72 · 11 · 23 · 43 · 47. 9 = 9·8·7·6·5·4·3·2 Pk 42. Sketch. Note that 1 = 4 − 3. If k ≥ 1 and i=1 Li = Lk+2 − 3, then Pk+1 Pk L = ( L ) + L = (L − 3) + L i k+1 k+2 k+1 = (Lk+1 + Lk+2 ) − 3 = i=1 i=1 i Lk+3 − 3.  43. Proof. Base cases: (n = 0, 1). Note that s0 = 0 = 30 (30 − 1) and s1 = 6 = 31 (31 − 1). Inductive step: Suppose k ≥ 1 and that, for each 0 ≤ i ≤ k, si = 3i (3i − 1). (Goal: sk+1 = 3k+1 (3k+1 − 1).) Observe that sk+1 = 3(4sk − 9sk−1 ) = 3(4[3k (3k − 1)] − 9[3k−1 (3k−1 − 1)] = 3·3k−1 (4·3(3k −1)−9(3k−1 −1)) = 3k (4·3k+1 −12−3k+1 +9) = 3k (3·3k+1 −3) = 3k+1 (3k+1 − 1).  44. x4 + 4x3 y + 6x2 y 2 + 4xy 3 + y 4. (x + y)4 = 40 x4 y 0 + 41 x3 y 1 + 42 x2 y 2 + x4 + 4x3 y + 6x2 y 2 + 4xy 3 + y 4 .

4 3



4 4



x1 y 3 +

x0 y 4 =

45. 6561x8 −69984x7 y+326592x6 y 2 −870912x5 y 3 +1451520x4 y 4 −1548288x3 y 5 + 8 1032192x2 y 6 − 393216xy 7 + 65536y .    (3x−4y)8 = (3x+(−4y))8 = 80 (3x)8 (−4y)0 + 81 (3x)7 (−4y)1 + 82 (3x)6 (−4y)2 +     8 8 8 8 5 3 4 4 3 5 2 6 3(3x) (−4y) +  4 (3x) (−4y) + 5 (3x) (−4y) + 6 (3x) (−4y) + 8 8 1 7 0 8 8 7 6 2 5 3 7 (3x) (−4y) + 8 (3x) (−4y) = 6561x −69984x y+326592x y −870912x y + 4 4 3 5 2 6 7 8 1451520x y − 1548288x y + 1032192x y − 393216xy + 65536y . 4 6 2 8 10 46. x10 − 5x8 y 2 + 10x6 y 4 − 10x  y2 5+ 5x 2y0 − 5y . 2 4  5 2 2 5 2 2 5 (x −y ) = (x +(−y )) = 0 (x ) (−y ) + 1 (x ) (−y 2 )1 + 52 (x2 )3 (−y 2 )2 +  2 2  2 1  2 0 5 5 5 2 3 2 4 2 5 3 (x ) (−y ) + 4 (x ) (−y ) + 5 (x ) (−y ) = 10 8 2 6 4 4 6 2 8 10 x − 5x y + 10x y − 10x y + 5x y − y . Be careful that −y 2 does not mean (−y)2 .

 90 10 47. 100 = (x + (−2))100 = · · · + 10 2 . Since (x − 2)  90 100 10 90 coefficient of x is 10 (−2) = 100 10 2 .

100 90



 25 100 100 48. − 100 = · · ·+ 25 3 . Since (3x−y)  = (3x+(−y))  25 100 25 25 75 75 the coefficient of x y is 75 3 (−1) = − 100 25 3 .

x10 (−2)90 + · · · , the

100 75



(3x)25 (−y)75 +· · · ,

49. 0. Since the exponents 30 and 40 do not add up to 80, there will be no nonzero coefficient of x30 y 40 . 50. Proof. 6n = (1 + 5)n =

Pn

n i

51. Proof. 5n = (1 + 4)n =

Pn

n i

i=0



i=0

52. Proof. (−1)n = (3 − 4)n =



Pn

i=0

1n−i 5i =

Pn

n i



5i . 

1n−i 4i =

Pn

n i



4i =

n i



i=0

i=0

3n−i (−4)i =

Pn

Pn

i=0

i=0 (−1)

i n i

n i





22i . 

3n−i 4i . 

428

4.5

CHAPTER 4. ANSWERS TO ALL EXERCISES

Chapter 5

Section 5.1 1. (a) False. 5 - 1. (b) True. 3 | 6. (c) False. 2 - 7. 2. (a) True. (b) True. (c) False. 3. (a) True. ∅ ⊆ Z, by Theorem 1.3. (b) False. 0 6∈ X = P(R), since 0 is not a subset of R. (c) True. {1, 2} ⊆ R+ , since 2 > 1 > 0. 4. (a) True. (b) False. (c) False. 5. True. B ⊇ A if and only if A ⊆ B. 6. True. 7. False. The y-axis is perpendicular to the x-axis, but the x-axis is not parallel to the y-axis. 8. False. 9. (a) No. (b) Brazil, Colombia, Guyana. A = Guinea

D C B A

E

B = Suriname C = Guyana

F M

D = Venezuela E = Colombia

G

F = Ecuador H G = Peru J

I

H = Bolivia I = Chile

K L

J = Paraguay K = Argentina L = Uruguay M = Brazil

10. (a) No. (b) Maple 9.5, Windows NT, Wolfram Research. 11. The “is a son of” relation. That is, B “is a son of” A if and only if A “is the father of” B. 12. >.

4.5. CHAPTER 5

429

13. ⊇. That is, B ⊇ A if and only if A ⊆ B. 14. Itself. 15. ⊥. That is, l2 ⊥ l1 if and only if l1 ⊥ l2 . 16. The “has zero” relation, f “has zero” a if and only if f (a) = 0. 17. R itself. That is, y 2 + x2 = 1 if and only if x2 + y 2 = 1. 18. y R−1 x if and only if y = x − 1. 19. (a) GameCo. (b) No. (c) Yes. 20. (a) Susan Brower and Charles Murphy. (b) Yes. (c) No. t {0, 1, 2}

21.

  3 7    1   3     t   2  Q  3 Q     Q   t 1 Q Q 1 Q QQ  s  t Q  0  Q Q QQ Q s Q Q QQ s

t {1, 2} t {0, 2} t {0, 1} t {2} t {1} t {0} t ∅

22.

y = −3

t - t x2 + y 2 = 1 P 1 PP  P PP q t x2 + (y + 1)2 = 4  t  1     t 

y=3

t

y=1 y = −1

23.

NBA Dunkfest

t

Rx Tracker

t

Skate Rats

 t

- t GameCo 3   - t MediComp 

430

24.

CHAPTER 4. ANSWERS TO ALL EXERCISES t

hammer

- t Susan Brower

t P 1 t Richard Kelley PP  P PP q t Charles Murphy t  

wrench pliers

q  q6 @ 6 q4 q-@ 2 I6

25.

8

R 15 AK R A 6 A 10 3 6 A 6 A R 2 5

26.

27.

R {1, 2, 3} *    6

 R  {1, 2} Y H 6 HH {1} I

{2, 3} 6 HH {2} I

28. y =t−x 1P iP  6 PP    PP t t? ) qt y=x

y =x−1

y =x+1

29. 0 1 2

 0 1  1 1

3 0 1 0

6 0 1 1

9  0 1  0

30. −4 −2 −1 1 2 4

 −4 0  0   0   0   0 0

−2 0 0 0 0 0 1

−1 0 0 0 1 0 0

1 0 0 0 1 0 0

2 0 0 0 0 0 1

4 0 0   0   0   0  0

4.5. CHAPTER 5

431

31. 

∅ {1} {2} {1, 2} 32. C(−1,−1) C(−1,1) C(1,−1) C(1,1)

  

∅ 1 0 0 0

C (−1,−1) 0  1   1 0

{1} 1 1 0 0

{2} 1 0 1 0

C(−1,1) 1 0 0 1

{1, 2} 1 1 1 1 C(1,−1)

1 0 0 1

0 1 1 0

    C(1,1)    

33. (a)

y

(b)

y

x

x

We reflect the picture from (a) about the line y = x. 34. (a)

y

(b)

y

x

x

35. (a)

y

(b)

x

We reflect the picture from (a) about the line y = x.

y

x

432

CHAPTER 4. ANSWERS TO ALL EXERCISES

36. (a)

y

(b)

x

y

x

37 through 54. Exercise 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

Reflexive F T T F F F F T F T T F T F T T T T

Symmetric T F T T T T F T F F T F F F F T F T

Antisymmetric F T F T T F T F T F F T F T F F T F

Transitive F T F T T F T T F F T F F T T F T F

37. Not reflexive, since 0 6 R 0. Symmetric, since x1 = y implies y1 = x. Not 1 antisymmetric, since 21 = 1/2 and 1/2 = 2, but 2 6= 1/2. Not transitive, since 1 1 1 = 1/2 and = 2, but = 6 2. 2 1/2 2 39. Reflexive, since a line (being nonempty) always intersects itself. Symmetric, since l1 intersects l2 implies l2 intersects l1 . Not antisymmetric, since the x-axis and y-axis intersect each other but are not equal to each other. Not transitive, since y = 0 intersects x = 0, and x = 0 intersects y = 1, but y = 0 and y = 1 are distinct lines. √ 6 −1. Symmetric, since 41. Not reflexive, since −1 √ √∈ R but −1 6∈ R. So −1√R √ √ √ √ √ x = y implies y = x. Antisymmetric, since x = y and y = x

4.5. CHAPTER 5 implies √x = y (and x, y > 0). Transitive, since √ x = z.

433 √

x=



y and



y=



z implies

43. Not reflexive, since no set is a proper subset of itself. Not symmetric, since A ⊂ B and B ⊂ A is impossible. Antisymmetric, since A ⊂ B and B ⊂ A is impossible, and an if-then statement is true when its hypothesis is false. Transitive, by the same argument as the transitivity of ⊆ (Example 2.14). 45. Not reflexive, since 0 + 1 6= 0. Not symmetric, since 0 + 1 = 1 and 1 + 1 6= 0. Antisymmetric, since the hypothesis x + 1 = y and y + 1 = x can never hold. Not transitive, since 0 + 1 = 1 and 1 + 1 = 2, but 0 + 1 6= 2. 46 Not Transitive: x = 1, y = 21 , z = 0. 47. Reflexive, since a and a are equal. Symmetric, since, if a and b are divisible by the same primes, then so are b and a. Not antisymmetric, since 2 and 4 are divisible by the same primes, as are 4 and 2, but 2 6= 4. Transitive, since, if a and b are divisible by the same primes and so are b and c, then so are a and c. 49. Reflexive, since x ≤ |x|. Not symmetric, since 1 ≤ |2| but 2 6≤ |1|. Not antisymmetric, since 1 ≤ | − 1| and −1 ≤ |1| but 1 6= −1. Not transitive, as can be seen for x = 2, y = −2, z = 1. 51. Reflexive, since A ⊆ A ∪ Z. Not symmetric, since ∅ ⊆ R ∪ Z but R * ∅ ∪ Z. Not antisymmetric, since ∅ ⊆ Z ∪ Z and R * ∅ ∪ Z but ∅ = 6 Z. Transitive, since, if A ⊆ B ∪ Z and B ⊆ C ∪ Z, then A ⊆ B ∪ Z ⊆ C ∪ Z ∪ Z = C ∪ Z. 53. Reflexive, since A ⊆ A. Not symmetric, since ∅ ⊆ {1} but {1} * ∅. Antisymmetric, since A ⊆ B and B ⊆ A implies A = B (see Section 2.3). Transitive, by Example 2.14. 55. Symmetric. Two countries must share a border with each other. Counterexamples to the other properties exist in the South America example in Exercise 9. 56. Antisymmetric, since, if one folder is a subfolder of another, then the reverse cannot be true. Counterexamples to the other properties exist in the C:\ drive example in Figure 5.5. 57. Proof. (→) Suppose R is symmetric. Since, ∀ x, y ∈ X, x R y ↔ y R x and x R−1 y ↔ y R−1 x, it follows that R−1 = R. (←) Suppose R−1 = R. Suppose x, y ∈ R. Since x R y ↔ x R−1 y ↔ y R x, it follows that R is symmetric.  58. x R x if and only if (x, x) ∈ R. 59. Proof. (→) Suppose R is antisymmetric. Suppose (x, y) ∈ R ∩ R−1 . Since

434

CHAPTER 4. ANSWERS TO ALL EXERCISES

(x, y) ∈ R and (x, y) ∈ R−1 , we have x R y and x R−1 y. That is, x R y and y R x. Hence x = y, and we see that (x, y) = (x, x) ∈ ∆. Thus, R ∩ R−1 ⊆ ∆. (←) Suppose R ∩ R−1 ⊆ ∆. Suppose x R y and y R x. Hence, x R y and x R−1 y. So (x, y) ∈ R and (x, y) ∈ R−1 . Since (x, y) ∈ R ∩ R−1 ⊆ ∆, we see that x = y. Thus, R is antisymmetric.  60. Sketch. (→) Suppose R is symmetric and antisymmetric, and suppose x R y. Thus, y R x, and hence x = y. (←) Suppose R ⊆ ∆. If x R y, then x = y and hence y R x. If x R y and y R x, then x = y. 

Section 5.2 1. Proof. Reflexive: Let a ∈ Z+ . Since a = a · 1, we see that a | a. That is, a R a. Antisymmetric: Let a, b ∈ Z+ . Suppose a | b and b | a. By Exercise 17 of Section 3.1, we have a = ±b. Since a, b > 0, it must be that a = b. Transitive: Let a, b, c ∈ Z+ . Suppose a | b and b | c. By Example 3.4 of Section 3.1, we have a | c.  2. Appeal to the analysis of the relation ≤ given for Exercise 38 of Section 5.1. 3. Proof. Let x, y, z be arbitrary elements of X. Reflexive: Since x R x, we have x R−1 x. Antisymmetric: Suppose x R−1 y and y R−1 x. That is, y R x and x R y. Hence, x = y. Transitive: Suppose x R−1 y and y R−1 z. That is, y R x and z R y. Thus, z R x, and we have x R−1 z.  4. ∀ x, y ∈ X, since y R x, we have x R−1 y. 5. Just the one in Exercise 53. That is the only one of those relations that is reflexive, antisymmetric, and transitive. See the answers to the odd numbered exercises in Exercises 37 through 54 from Section 5.1 6. Just Exercise 38. 7. No. It is not antisymmetric. Note that {1, 3} R {1, 2, 3} and {1, 2, 3} R {1, 3}, but {1, 3} = 6 {1, 2, 3}. 8. No. It is not reflexive. 9. No. It is not reflexive. Note that Algebra R 6 Algebra. 10. No. It is not antisymmetric, since Cerf R Dago and Dago R Cerf, but

4.5. CHAPTER 5

435

Cerf 6= Dago. 11. Yes.

    r -  r  @ R @ @ 6 @ r r   1

2

4

15.

72 @ 24 36 @ @ 8 12 18   4 6 9 @ @ 2 3 @ 1

3

    12. No. It is not reflexive, since 3 R 6 3. 13. {a, b} @ {b}

{a} @

14.

16.

72    24 36     8 12 18       4 6 9      



12 6 10 H H H   H HH 2

3

5

2

3

17. (a) No. (b) O− , O+ , A− , A+ . (c)

R AB + *  YH H   I HH   6@  @ R  @ HR + − A AB B+ YH  H * YH @ H *   6@ 6  H H @ I  6 HH  HH @ @ R + − @ A− H O Y * B HH @   I I HH @ 6  H @  O− I

(d)

AB + 

A+

 

HH HH H

AB − B+ HH  HH   H  H  HH  HH

A− H HH

O+ HH  H  O−

B 

In (a), note that A+ contains the antigen Rh and A− does not. In (b), note that O− , O+ , A− , A+ are the types that contain fewer antigens than A+ .



436

CHAPTER 4. ANSWERS TO ALL EXERCISES

18. (a) Yes. (b) Bagger, Cashier, Deli. (c)

R f 

 6 ] J  COC J

Rd  C e  C 6 COC C  6 C R C b C  c ] JC 

JC

 a I

(d)

f

J

J d e

b

c J

J

a

19. Proof. Suppose to the contrary that a Hasse diagram contains a triangle. Since there can be no horizontal lines, the three elements involved must be at distinct heights. The line from the lowest element to the highest element follows from transitivity from the other two lines. This is a contradiction.  20. Sketch. Let S be a finite totally ordered set. Proceed by induction on n = |S|. Apply the idea in Exercise 29 from Section 4.3 to get a maximum element m in S, and use the induction hypothesis on S \ {m}.  21. b12vitamin C b6vitamin. Note that 1 < 6. Do not be fooled by the twelve. 22. dog8cat C doggy2. 23. (2, −3, 1, 0) C (2, −1, 5, 3). Note that −3 < −1. 24. (2, 7) C (3, 1). 25. an−1 an−2 · · · a0 < bn−1 bn−2 · · · b0 iff an−1 2n−1 + an−2 2n−2 + · · · + a0 < bn−1 2n−1 + bn−2 2n−2 + · · · + b0 iff an−1 = bn−1 , . . . , ak = bk and ak−1 < bk−1 . Regard an−1 an−2 · · · a0 and bn−1 bn−2 · · · b0 as integers represented in binary. So we have an−1 an−2 · · · a0 < bn−1 bn−2 · · · b0 iff an−1 2n−1 + an−2 2n−2 + · · · + a0 < bn−1 2n−1 + bn−2 2n−2 + · · · + b0 . Let k ≥ 1 Pk−2 i k−1 , we must be the largest index where ak−1 6= bk−1 . Since, i=0 bi 2 < 2 equivalently have an−1 = bn−1 , . . . , ak = bk and ak−1 = 0 < 1 = bk−1 . This characterizes the lexicographic ordering. 26. We must establish comparability. Given distinct words ~x = x1 x2 · · · xm and ~y = y1 y2 · · · yn , let k be the largest index such that x1 x2 · · · xk = y1 y2 · · · yk . If k = m < n, then ~x C ~y . If k = n < m, then ~y C ~x. Otherwise, k < m, n.

4.5. CHAPTER 5

437

Since xk+1 6= yk+1 and C is totally ordered, we must have either xk+1 ≺ yk+1 or yk+1 ≺ xk+1 . That is, ~x C ~y or ~y C ~x. 27. Proof. Let x, y, z ∈ R. Reflexive: Of course, bxc = bxc. Symmetric: Suppose bxc = byc. So byc = bxc. Transitive: Suppose bxc = byc and byc = bzc. Hence, bxc = byc = bzc.  28. Reflexive: cos x = cos x and sin x = sin x. Symmetric: If cos x = cos y and sin x = sin y, then cos y = cos x and sin y = sin x. Transitive: Suppose cos x = cos y, sin x = sin y, cos y = cos z, and sin y = sin z. By the transitivity of =, cos x = cos z and sin x = sin z. 29. Sketch. Reflexive: m1 − n1 = m1 − n1 . Symmetric: m1 − n1 = m2 − n2 → m2 − n2 = m1 − n1 . Transitive: m1 − n1 = m2 − n2 , m2 − n2 = m3 − n3 → m1 − n1 = m2 − n2 = m3 − n3 .  30. It follows from the fact that = is an equivalence relation on R. 31. Proof. Let (x1 , y1 ), (x2 , y2 ), (x3 , y3 ) ∈ R2 \ {(0, 0)}. Reflexive: Since 1x1 = x1 and 1y1 = y1 , we have (x1 , y1 ) R (x1 , y1 ). Symmetric: Suppose (x1 , y1 ) R (x2 , y2 ). So we have c 6= 0 with cx1 = x2 and cy1 = y2 . Hence, 1c x2 = x1 and 1c y2 = y1 . Thus, (x2 , y2 ) R (x1 , y1 ). Transitive: Suppose (x1 , y1 ) R (x2 , y2 ) and (x2 , y2 ) R (x3 , y3 ). So we have c, d 6= 0 such that cx1 = x2 , cy1 = y2 , dx2 = x3 , and dy2 = y3 . Since cd 6= 0, cdx1 = x3 , and cdy1 = y3 , it follows that (x1 , y1 ) R (x3 , y3 ).  32. It follows from the fact that = is an equivalence relation on R. 33. For example, it is not reflexive. Note that (1, 0) R 6 (1, 0) since 1 + 1 6= 0 + 0. 34. It is not reflexive, since 1 · 0 6= 1 + 0, so (1, 0) R 6 (1, 0). 35. Just the one in Exercise 47. That is the only one of those relations that is reflexive, symmetric, and transitive. See the answers to the odd numbered exercises in Exercises 37 through 54 from Section 5.1. 36. Just Exercise 44. 37. Proof. Suppose x, y ∈ X and x ∈ [y]. So x R y. Since R is symmetric, y R x. Thus y ∈ [x]. The converse is handled similarly.  38. Proof. Suppose x ∈ [y] and y ∈ [z]. So x R y and y R z. Hence, x R z. By

438

CHAPTER 4. ANSWERS TO ALL EXERCISES

Lemma 5.2, [x] = [z].  39. (m1 − n1 , 0) if m1 ≥ n1 , and (0, n1 − m1 ) if m1 < n1 . Note that both coordinates must be greater than or equal to zero. If m1 ≥ n1 , then m1 − n1 ≥ 0. Also, (m1 , n1 ) R (m1 − n1 , 0) since m1 − n1 = (m1 − n1 ) − 0. 40. (

p x21 + y12 , 0).

41. ( √

x1 , x21 +y12



y1 ). x21 +y12

Here, we use c = √ x21 x21 +y12

+

y12 x21 +y12

1 . x21 +y12

 Also, note that



x1 x21 +y12

2

 +



y1 x21 +y12

2 =

= 1.

42. (0, y1 − x1 ). 43. Yes. Each element of {1, 2, 3, 4, 5, 6} is present in exactly one of the sets Ai . 44. No. The axes are not covered. So A1 ∪ A2 ∪ A2 ∪ A4 6= X. 45. No. The element 1 ∈ R+ appears in no set Ai . 46. No. 6 ∈ A1 ∩ A2 6= ∅. 47. No. Halmos is on two subcommittees. 48. Yes. Each team is in exactly one division. 49. Each integer is either odd or even, and not both. Sketch. Since no integer can be both odd and even, A1 and A2 are disjoint. Since each integer is either odd or even, A1 ∪ A2 = Z.  50. Sketch. Since each point (x, y) is on the vertical line through (x, 0), we have ∪a∈R Aa = R × R. If (x, y) ∈ Aa ∩ Ab 6= ∅, then (a, 0 = (x, 0) = (b, 0) so a = b. Thus, distance partition sets are disjoint.  51. Proof. (Disjoint) Suppose r1 , r2 ∈ Q with r1 6= r2 and Ar1 ∩ Ar2 6= ∅. So we (Union) Suppose have some (a, b) ∈ Ar1 ∩ Ar2 and r1 = ab = r2 , a contradiction. S (a, b) ∈ Z × Z∗ . Let r = ab . Then, (a, b) ∈ Ar ⊆ r∈Q Ar .  52. Sketch. If n ∈ Z, then n ∈ A|n| . If k ∈ Ai ∩ Aj 6= ∅, then i = |k| = j.  53. ∀ n ∈ Z, let An = [n, n + 1).

4.5. CHAPTER 5

439

Recall that bxc = n if and only if n ∈ Z and n ≤ x < n + 1 (i.e. x ∈ [n, n + 1)). 54. ∀ x ∈ [0, 2π), let Ax = {y : y = x + 2πk for some k ∈ Z}. 55. ∀ b ∈ Z, let Ab = {(m, n) : m, n ∈ N and m − n = b}. We simply group together elements (m, n) according to the difference m − n that characterizes the equivalence relation. 56. ∀ r ≥ 0, let Ar = {(x, y) : s2 + y 2 = r}, the circle of radius r centered at the origin. 57. ∀ m ∈ R, let Am = {(x, y) : y = mx}. Additionally, let A∞ = {(x, y) : x = 0}. Notice that, for a fixed point (x1 , y1 ), the set of points of the form (cx1 , cy1 ) lie on a line through the origin. Hence, each equivalence class corresponds to a line through the origin. Since the y-axis cannot be described by an equation of the form y = mx, we need a separate description for that line. 58. ∀ b ∈ R, let Ab = {(x, y) : y − x = b}. 59. (a) {apple}, {eat, ear}, {peace}, {car, call}. (b) {apple, peace}, {call}, {eat, car, ear}. (c) {apple, eat, peace, ear}, {car, call}. 60. (a) {20, 80}, {500, 176, 605}, {5}. (b) {20, 500, 80}, {5}, {176}, {605}. (c) {20, 500, 80}, {5, 605}, {176}. 61. m R n ↔ m − n is even. Notice that m − n is even precisely when m and n are both even or both odd. 62. (x1 , y1 ) R (x2 , y2 ) if and only if x1 = x2 . 63. (a1 , b1 ) R (a2 , b2 ) ↔ ab11 = ab22 . That is, we want (a1 , b1 ) and (a2 , b2 ) to be in the same equivalence class precisely when ab11 and ab22 are the same rational number. 64. m R n if and only if |m| = |n|. 65. (a) “has the same suffix as” or “has the same file type as.” (b) “has the same base (or file) name as.” We are adopting here the usual naming conventions of name.suffix. 66. (a) ‘has the same first digit as’. (b) ‘has the same last digit as’. 67. Theorem: Let X be a set, R be an equivalence relation on X, and A be a partition of X. Then, A is the partition of X corresponding to R if and only if

440

CHAPTER 4. ANSWERS TO ALL EXERCISES

R is the equivalence relation on X corresponding to A. Proof. (→) Suppose A is the partition of X corresponding to R. Let R0 be the equivalence relation on X corresponding to A. So, x R0 y if and only if ∃ A ∈ A such that x, y ∈ A if and only if ∃ z ∈ X such that x, y ∈ [z]R if and only if ∃ z ∈ X such that x R z and y R z if and only if x R y. Hence R = R0 . (←) Suppose R is the equivalence relation on X corresponding to A. So x R y if and only if ∃ A ∈ A such that x, y ∈ A. Let A0 be the partition of X corresponding to R. So A0 = {[x]R : x ∈ X}. Suppose A ∈ A. Since A 6= ∅, we have some y ∈ A. We claim that A = [y]R . (⊆) Suppose x ∈ A. Since x, y ∈ A, we have x R y. Hence x ∈ [y]R . (⊇) Suppose x ∈ [y]R . So x R y. Hence, we have some A0 ∈ A with x, y ∈ A0 . Since y ∈ A, and A0 and A are either identical or disjoint, it must be that A0 = A. So x ∈ A. Therefore, A ∈ A0 . We have shown that A ⊆ A0 . Since A and A0 are both partitions (each with union X), it must be that A = A0 .  68. Let A1 , . . . , Ak be the corresponding partition sets for the finite set X. Order the elements of X so that the elements of A1 come first, then A2 , and so forth. Use this ordering for both the rows and columns in forming the matrix.   S S 69. Proof. (⊆) Suppose x ∈ A ∪ A . In the case that x ∈ A∈A A∈A 1 2 S A, we have x ∈ A for some A ∈ A . Since A 1 1 1 ∈ A1 ∪ A2 , we have A∈A S1 S1 x ∈ A∈A1 ∪A A. The case in which x ∈ A is handled similarly. (⊇) A∈A2 S2 Suppose x ∈ A∈A1 ∪A2 A. So x ∈ A0 for some A0 ∈ A1 ∪ A2 . If A0 ∈ A1 , then  S S S x ∈ A∈A1 A. If A0 ∈ A2 , then x ∈ A∈A2 A. In any case, x ∈ A∈A1 A ∪  S A∈A2 A .   S S 70. Proof. (⊆) Suppose x ∈ B ∩ A∈A A . So x ∈ B and x ∈ S A∈A A. Hence 0 x ∈ A0 for some AS ∈ A. Thus, x ∈ B ∩ A0 , and we see that x ∈ A∈A (B ∩ A). (⊇) Suppose x ∈ A∈A (B ∩ A). So x ∈ B ∩ A0 for some A0 ∈ A. Thus, x ∈ B S S and x ∈ A0 . Therefore, x ∈ A∈A A. So x ∈ B ∩ A∈A A . 

Section 5.3 1. No. The range can be a proper subset of the codomain. 2. Yes. 3. It is not. f (0) =

1 2

6∈ Z+ .

4. No. f (0) = −2 6∈ Z+ . √ 5. It is not. ± x does not specify a unique output value. 6. (a) Yes. (b) Yes.

4.5. CHAPTER 5

441

7. (a) It is not, since f (1) =

1 2

6∈ Z. (b) It is. If n ∈ Z, then 2n ∈ Z.

8. (a) Yes. (b) No, since f (0) =

1 0

is not defined.

9. It is. ∀ n ∈ Z, 2n − 1 6= 0. 10. No, since f ( −2 3 )= 11. (a) It is not. 0 (c) It is. If m n0 =

−5 3

0

is not defined.

1 2 1 1 = 2 , but f ( 1 ) = m 0 n then, m = 0 iff

12. (a) No, since f ( 12 ) =

2 2

6=

3 4

1 6= 2 = f ( 22 ). (b) It is not. See part (a). n0 n 0 m = 0, and m 0 = m when m , m 6= 0.

= f ( 24 ), so f is not well-defined.

13. (a) It is not. [0]5 = [5]5 but [0]10 6= [5]10 . (b) It is. If [a0 ]5 = [a]5 then 5 | (a0 − a), and hence 10 | (2a0 − 2a). So [2a0 ]10 = [2a]10 . 14. (a) Yes. (b) No, since f ([1]10 ) = [ 21 ]5 is not defined. 15. Yes. It is a constant function. 16. No. Two people of the same height could have different weights. 17. Domain = {−3, −2, . . . , 3} and range = {0, 1, 4, 9}. Note that {f (−3), f (−2), f (−1), f (0), f (1), f (2), f (3)} = {9, 4, 1, 0, 1, 4, 9} = {0, 1, 4, 9}. 18. Domain = {−4, −2, . . . , 4}, range = {−2, −1, 0, 1, 2}. 19. Domain = {0, 1, . . . , 4} and range = {1, 2, 4, 8, 16}. Note that {f (0), f (1), f (2), f (3), f (4)} = {20 , 21 , 22 , 23 , 24 } = {1, 2, 4, 8, 16}. 20. Domain = {0, 1, . . . , 4}, range = {1, 2, 6, 24}. 21. Domain = R and range = [−1, ∞). 23. Domain = [1, ∞), range = [0, ∞). y y

-1

x

22. Domain = R \ {0}, range = R+ .

-1

24. Domain = [−1, ∞).

x

[0, ∞), range =

442

CHAPTER 4. ANSWERS TO ALL EXERCISES

25. Domain = R \ {−1} and range = R \ {0}. y

-1

x

26. Domain = R, range = (0, 1]. 27. f (0) = f (4) = 4, f (1) = f (3) = 1, f (2) = 0, f (5) = 9, f (6) = 16. That is, {y : f (x) = y for some x ∈ {0, 1, 2, 3, 4, 5, 6}} = {f (0), f (1), f (2), f (3), f (4), f (5), f (6)} = {4, 1, 0, 1, 4, 9, 16} = {0, 1, 4, 9, 16}. 28. f (0) = 4, f (1) = 3, f (2) = f (6) = 2, f (3) = f (5) = 1, f (4) = 0. 29. Sketch. 0 ≤ x ≤ 2 iff 0 ≤ 3x ≤ 6 iff −2 ≤ 3x − 2 ≤ 4.  That is, x ∈ [0, 2] = domain(f ) if and only if f (x) = 3x − 2 ∈ [−2, 4]. 30. 1 ≤ x < 4 if and only if −8 < −2x ≤ −2 if and only if −5 < 3 − 2x ≤ 1. 31. Proof. Suppose x ∈ [0, 2]. So 0 ≤ x ≤ 2. Hence 0 ≤ x2 ≤ 4. That is, √ x2 ∈ [0, 4]. Now suppose y ∈ [0, 4]. Let x = y. Observe that 0 ≤ x ≤ 2 and √ 2 f (x) = ( y) = y.  32. −8 ≤ y 3 ≤ 0 if and only if −2 ≤ y ≤ 0. Hence, −8 ≤ x ≤ 0 if and only if 1 −2 ≤ x 3 ≤ 0. 33. (g ◦ f )(n) = g(f (n)) = g(n!) = (n!)2 . 34.

2n +1 2



.

35. (g ◦ f )(x) = g(f (x)) = g(1 + 3x) = 1 − 3(1 + 3x) = −2 − 9x. 36. 1 + (1 − x2 )2 = 2 − 2x2 + x4 . 37. (g ◦ f )(x) =

1 |x| .

g ◦f : R\{0} −→ [0, ∞) is defined by (g ◦f )(x) = g(f (x)) = g( x12 ) = 38. (x2 + 1)e .

q

1 x2

=

1 |x| .

4.5. CHAPTER 5

443

39. (a) Yes, they both toggle the bit from the value it has to the only other possible value. (b) 4. The constant 0, the constant 1, the identity, and the toggle map (0 7→ 1 and 1 7→ 0). 40. No. The domain of f excludes 2, while the domain of g is all of R. 41. The “is the grandfather of” relation. That is, the father of the father is the grandfather. 42. a (R ◦ R) b if and only if a | b and

b a

is composite.

43. (a) Proof. (→) Suppose R is transitive and suppose x (R ◦ R) z. So, there is some y such that x R y and y R z. By transitivity, x R z. Hence, R ◦ R ⊆ R. (←) Suppose R ◦ R ⊆ R and x R y and y R z. Since x (R ◦ R) z and R ◦ R ⊆ R, it follows that x R z. Hence, R is transitive.  (b) Proof. Suppose R is reflexive and transitive, and suppose x R y. Since x R x and x R y, it follows that x (R ◦ R) y. Thus, R ⊆ R ◦ R. Part (a) finishes the job.  44. Sketch. x ((T ◦ S) ◦ R) w if and only if ∃ y ∈ Y such that x (T ◦ S) y and y R w if and only if ∃ y ∈ Y, z ∈ Z such that x T z and z S y and y R w if and only if ∃ z ∈ Z such that x T z and z (S ◦ R) w if and only if x (T ◦ (S ◦ R)) w. 45. (a) No. (b)

Artist MandM Fifty Percent MandM M.C. Escher

Music Company Aristotle Records Bald Boy Records Bald Boy Records Aristotle Records

(c) Aristotle Records and Bald Boy Records. 46. (a) Yes. (b)

Traveler Steve Terry Tony Nistler

Travel Agent Fly by Night Riding High

(c) Only Fly By Night. 47. (a)

(b) Only GameCo.

Programmer Martha Lang Megan Johnson Charles Murphy

Client GameCo MediComp GameCo

444

CHAPTER 4. ANSWERS TO ALL EXERCISES

Vendor Stanley Maxtool Stanley Stanley Maxtool

48. (a)

Customer Richard Kelley Richard Kelley Susan Brower Charles Murphy Susan Brower

(b) Richard Kelley, Susan Brower, Charles Murphy. 49. (a)

y y

52. (a) 1

x

(b) Yes. Domain = R. (c) Range = (−∞, 1]. 50. (a)

s

x

(b) Yes, Domain = {0}. (c) Range = {0}.

y

y

53.(a) x

x

(b) Yes, Domain = R. = (−∞, 0]. 51. (a)

(c) Range (b) No. (c) None.

y '$ x &%

y

54. (a) I @

 @ @ x

@ @ @ @

(b) No. (c) None.

@ (b) No. (c) None.

55. The relation is a function iff each row has at most one 1. If some row x were to have two or more 1’s in it, then that x would relate to two or more values, and so the relation would not be a function.

4.5. CHAPTER 5

445

56. An element is in the range if and only if its column contains a 1. 57. (a) ∀ x ∈ R, ((f + g) ◦ h)(x) = (f + g)(h(x)) = f (h(x)) + g(h(x)) = (f ◦ h)(x) + (g ◦ h)(x) = (f ◦ h + g ◦ h)(x). (b) Define f (x) = x2 and g(x) = h(x) = 1. So (f ◦(g +h))(1) = f ((g +h)(1)) = f (2) = 4, and f (g(1))+f (h(1)) = 1+1 = 2. 58. (a) ((f · g) ◦ h)(x) = (f · g)(h(x)) = f (h(x))g(h(x)) = (f ◦ h)(x) · (g ◦ h)(x) = ((f ◦ h) · (g ◦ h))(x). (b) f (x) = 2, g(x) = h(x) = x, at any x, e.g. x = 0. 59. (a) ∀ x ∈ R, (c(f ◦ g))(x) = c((f ◦ g)(x)) = c(f (g(x))) = (cf )(g(x)) = ((cf ) ◦ g)(x). (b) Let c = 2, f (x) = x, and g(x) = 1. In this case, (f ◦ (cg))(x) = 4 and (c(f ◦ g))(x) = 2. 60. (a) Suppose y ∈ Range(f + g). So y = (f + g)(x) = f (x) + g(x) ∈ Range(f ) + Range(g). (b) ∀ x ∈ R, f (x) = x and g(x) = −x. Note that (f + g)(x) = 0. 61. Yes. Any constant function has this property. Also, f (x) = |x|. 62. No. Let f (x) = x and g(x) = −x.

Section 5.4 1. Proof. Suppose x31 + 8 = x32 + 8. So x31 = x32 . Taking the cube root of both sides gives that x1 = x2 .  2. Proof. Suppose f (x1 ) = f (x2 ). So (x1 +2)3 = (x2 +2)3 . Hence, x1 +2 = x2 +2. Thus x1 = x2 .  3. Proof. Suppose n1 , n2 ∈ Z− and 1 − n21 = 1 − n22 . So n21 = n22 . Since n1 , n2 ∈ Z− , we have n1 = n2 .  4. Proof. Suppose n1 , n2 ∈ Z+ and n1 − n21 = n2 − n22 . So n1 − n2 = n21 − n22 = (n1 − n2 )(n1 + n2 ). Since n1 , n2 ∈ Z+ , we have n1 + n2 6= 0. Hence, n1 − n2 = 0. That is, n1 = n2 .  5. f (0) = f (1), but 0 6= 1. 6. f (0) = f (−1), but 0 6= −1. 7. Proof. Suppose y ∈ (1, ∞). (Goal: y = x2 + 1.) Let x = √ that f (x) = ( y − 1)2 + 1 = y − 1 + 1 = y. 



y − 1. Observe

446

CHAPTER 4. ANSWERS TO ALL EXERCISES

8. Sketch. Suppose y ∈ R+ . Let x = 1 +



y + 1. So f (x) = y. 

9. Proof. Observe that 21 ∈ R+ . However, f (x) = has no solution in R. 

1 2

is impossible, since x2 = − 12

10. x2 + x = −1 has no solution in R. 11. Sketch. Suppose y ∈ R+ . Let x = x2 + x = y.  12. Proof. Suppose y ∈ R− . Let x = −(−y) = y. 

√ −1+ 1+4y . 2



Observe that x ∈ R+ and

√ 2 −y. Observe that f (x) = − −y =

13. (a) Let k ∈ Z. Observe that f (k, 1) = k. (b) f (2, 1) = 2 = f (1, 2) but (2, 1) 6= (1, 2). 14. (a) f (1) =

1 2

= f (2). (b) f (n) = 1 has no solution.

15. Proof. Suppose x1 , x2 ∈ R and f (x1 ) = f (x2 ). Suppose to the contrary that x1 6= x2 . We may assume that x1 < x2 . However, since f is increasing, f (x1 ) < f (x2 ). This is a contradiction.  16. The function f in Example 5.48. Or, f (x) = tan−1 x. 17. (a) Suppose [n0 ] = [n]. Since n0 ≡ n (mod 6),we have 6 | (n0 − n). So 6 | (2n0 − 2n). That is, 2n0 ≡ 2n (mod 6). Hence, [2n0 ] = [2n]. (b) f ([0]) = [0] = f ([3]), but [0] 6= [3]. (c) It is not the case that gcd(2, 6) = 1 (as would be needed of a = 2 and n = 6 in Lemma 3.30). 18. (a) If n1 ≡ N2 (mod 6), then 5n1 ≡ 5n2 (mod 6). (b) [0] 7→ [0], [1] 7→ [5], [2] 7→ [4], [3] 7→ [3], [4] 7→ [2], [5] 7→ [1]. (c) gcd(5, 6) = 1. 19. (a) 1600081160 mod 625 = 535. (b) 0000000003216 and 0000000009461. Note that 321 mod 625 = 946 mod 625 = 321. Also [3(3 + 1) + 2 + 6] mod 10 = [3(9 + 6) + 4 + 1] mod 10 = 0. 20. (a) 153. (b) 0-00000123-6 and 0-00000373-5. 21. (a) Suppose x ∈ X. Observe that p(x, y0 ) = x. So x ∈ range(p). (b) Suppose x1 , x2 ∈ X and i(x1 ) = i(x2 ). So (x1 , y0 ) = (x2 , y0 ). Thus, x1 = x2 . (c) ∀ x ∈ X, (p ◦ i)(x) = p(i(x)) = p(x, y0 ) = x. (d) ∀ x ∈ X, y ∈ Y, (i ◦ p)(x, y) = i(p(x, y)) = i(x) = (x, y0 ).

4.5. CHAPTER 5

447

22. (a) Suppose y ∈ R. Let p(x) = y. So f (p) = y. (b) Suppose g(c1 ) = g(c2 ). So c1 = g(c1 )(0) = g(c2 )(0) = c2 . (c) idR . (d) (g ◦ f )(p) = g(p(0)) the constant function with value p(0). 23. Suppose i(a1 ) = i(a2 ). Then a1 = a2 . That is, a1 = i(a1 ) = i(a2 ) = a2 . 24. Proof. Suppose [x] ∈ Y . Observe that p(x) = [x].  25. Proof. Suppose B ∈ P([0, 1]). That is, B ⊆ [0, 1]. Observe that B ⊆ R (so B ∈ P(R)) and f (B) = B.  26. Neither are onto. Both are one-to-one. 27. f and g are onto. f and g are not one-to-one. Note that f ((A, A)) = g((A, A)) = A. Also, f (({0}, ∅)) = ∅ = f ((∅, ∅)) and g(({0}, ∅)) = {0} = g(({0}, {0})). 28. Neither are onto. Both are one-to-one. 29. One-to-one. Two guests cannot share a seat, and all the seats need not be filled. 30. Onto, since each region must be hit, but regions may be hit more than once. 31. Lemma: Let f : X −→ Y be any function. Then, f ◦ idX = f and idY ◦ f = f . ∀ x ∈ X, (f ◦ idX )(x) = f (idX (x)) = f (x) and (idX ◦ f )(x) = idX (f (x)) = f (x). 32. Sketch. x1 = x2 if and only if id(x1 ) = id(x2 ).  33. Since Exercise 1 established that f is one-to-one, it remains to show that 1 1 f is onto. Suppose y ∈ R. Observe that (y − 8) 3 ∈ R and f ((y − 8) 3 ) = 1 ((y − 8) 3 )3 + 8 = y − 8 + 8 = y. 34. Since Exercise 12 established that f is onto, it remains to show that f is one-to-one. Suppose x1 , x2 ∈ R+ and −x21 = −x22 , so x21 = x22 . Since x1 , x2 > 0, it follows that x1 = x2 . 35. Sketch. −2 7→ 0, −1 7→ 2, 0 7→ 4, 1 7→ 6, 2 7→ 8.  Observe that all elements of the codomain are in the range. So f is onto. It is also clear that, if k1 6= k2 , then f (k1 ) 6= f (k2 ). So f is one-to-one.

448

CHAPTER 4. ANSWERS TO ALL EXERCISES

36. One-to-one: Suppose f (k1 ) = f (k2 ). So 2n − k1 = 2n − k2 . Hence k1 = k2 . Onto: Suppose 0 ≤ m ≤ 3n. Let k = 2n − m. So f (k) = 2n − (2n − m) = m. 37. Proof. (Onto) Let j ∈ Z with −n ≤ j ≤ n. Hence 1 ≤ j + 1 + n ≤ 2n + 1 and f (j + 1 + n) = j. So j ∈ range(f ). (One-to-one) Suppose f (k1 ) = f (k2 ). Since k1 − 1 − n = k2 − 1 − n, we have k1 = k2 . So f is one-to-one.  38. Note Zd = {[0], [1], . . . , [d − 1]}. 39. (a) Suppose [k 0 ] = [k]. So [mk 0 ] = [mk] and [m + k 0 ] = [m + k]. That is, mk 0 ≡ mk (mod n) and m + k 0 ≡ m + k (mod n), by Theorem 3.26. (b) Proof. (→) Suppose f is a bijection. Since f is onto, there is some k ∈ Z such that f ([k]) = [1]. That is, [1] = [mk]. Since 1 ≡ mk (mod n), there is j ∈ Z such that nj = 1 + mk. Since km + jn = 1, it follows from Corollary 3.14 that gcd(m, k) = 1. (←) Suppose gcd(m, k) = 1. So there are j, k ∈ Z such that mk + nj = 1. That is, f ([k]) = [mk] = [1]. Hence, for each y ∈ Z, f ([ky]) = [y]. Thus f is onto. Now suppose f ([k1 ]) = f ([k2 ]). So [mk1 ] = [mk2 ]. That is, mk1 ≡ mk2 (mod n). By the Modular Cancellation Rule (Lemma 3.30), k1 ≡ k2 (mod n). That is, [k1 ] ≡ [k2 ]. So f is one-to-one.  (c) For any choice of m, the function g is a bijection. 40. (a) If k1 ≡ k2 (mod mn), then k1 ≡ k2 (mod n). If k1 ≡ k2 (mod n), then mk1 ≡ mk2 (mod mn). (b) Both are multiplication by m. (c) Suppose [mk1 ]mn = [mk2 ]mn . That is, mk1 − mk2 = mnj for some j ∈ Z. Since k1 − k2 = nj, we see that [k1 ]n = [k2 ]n . (d) None, since m > 1. 41. If every column contains at most one 1, then f is one-to-one. Each column represents a possible output value y. If there are two 1’s in a column y, then two input values are mapped to y and f is not one-to-one. 42. If every column contains at least one 1, then f is onto. 43. Theorem: Suppose f : X −→ Y and g : Y −→ Z. (a) If f and g are one-to-one, then g ◦ f is one-to-one. (b) If f and g are onto, then g ◦ f is onto. (c) If f and g are bijective, then g ◦ f is bijective. Proof of (b). Proof. Suppose f and g are onto. Suppose z ∈ Z. We have y ∈ Y such that g(y) = z. We have x ∈ X such that f (x) = y. That is, (g ◦ f )(x) = g(f (x)) = g(y) = z. Thus g ◦ f is onto.  Proof for (c). Proof. Suppose f and g are bijective. Since f and g are one-toone, g ◦ f is one-to-one, by (a). Since f and g are onto, g ◦ f is onto, by (b). Hence, g ◦ f is bijective.  44. By Theorem 5.9(c), f ◦ f is a bijection. Applying Theorem 5.9(c) again gives that f ◦ f ◦ f is a bijection.

4.5. CHAPTER 5

449

45. Proof. (→) Suppose f is symmetric and x ∈ X. Let f (x) = y. Since x f y, it follows that y f x. That is f (y) = x. Now, (f ◦ f )(x) = f (f (x)) = f (y) = x. Thus f ◦ f = idX . (←) Suppose f ◦ f = idX and x f y. That is, f (x) = y. Observe that x = (f ◦ f )(x) = f (f (x)) = f (y). Hence y f x. Thus f is symmetric.  46. ∀ x ∈ X, x f x if and only if f (x) = x = idX (x). 47. (a) Proof. Suppose x1 , x2 ∈ X and f (x1 ) = f (x2 ). Thus, (g ◦ f )(x1 ) = g(f (x1 )) = g(f (x2 )) = (g ◦ f )(x2 ). Since g ◦ f is one-to-one, it follows that x1 = x2 . So f is one-to-one.  √ 2 (b) X = Y = Z = (0, ∞), f (x) √= 1 + x,√g(x) = 2(x − 1) . Note that (g ◦ f )(x) = g(1 + x) = (1 + x − 1) = x. It follows that g ◦ f is one-to-one. However, g(2) = g(0). So g is not one-to-one. 48. (a) Proof. Suppose z ∈ Z. So we have some x ∈ X such that z = (g◦f )(x) = g(f (x)). Let y = f (x). So g(y) = z.  (b) X = Z = {0}, Y = {0, 1}, f (x) = g(y) = 0. 49. (a) Since g ◦ f is one-to-one, the result follows from Exercise 47(a). (b) Since g ◦ f is onto, the result follows from √ Exercise 48(a). (c) For X = Y = Z = [0, ∞), f (x) = 1 + x is not onto (since 0 6∈ range(f )) and g(x) = (x − 1)2 is not one-to-one (since g(2) = g(0)). 50. See Exercise 48(b). 51. (a) Proof. Suppose f and g are increasing. Suppose x < y. Since f is increasing f (x) < f (y). Since g is increasing, g(f (x)) < g(f (y)). Hence g ◦ f is increasing.  (b) f (x) = g(x) = −x gives (g ◦ f )(x) = x. Both f and g are decreasing here. 52. (a) If f has constant value c, then g ◦ f has constant ( value g(c). If g has −1 if x > 0, constant value d, then so does g ◦ f . (b) f (x) = g(x) = 0 if x ≤ 0. 53. ∀ x ∈ R, g(f (x)) = g(2x + 5) = 2( x−5 2 ) + 5 = x. That is, g ◦ f = idR and f ◦ g = idR .

2x+5−5 2

= x and f (g(x)) = f ( x−5 2 ) =

√ √ √ 54. g(f (x)) = g( 3 x + 1) p = ( 3 x + 1 − 1)3 = ( 3 x)3 = x and f (g(x)) = f ((x − 1)3 ) = 3 (x − 1)3 + 1 = x − 1 + 1 = x. 55. ∀ x ∈ R, g(f (x)) = g(4 − 2x) = 2 − 12 (4 − 2x) = 2 − 2 + x = x and f (g(x)) = f (2 − 12 x) = 4 − 2(2 − 12 x) = 4 − 4 + x = x. That is, g ◦ f = idR and f ◦ g = idR .

450

CHAPTER 4. ANSWERS TO ALL EXERCISES

56. g(f (x)) = 3( x3 +1)−3 = x+3−3 = x and f (g(x)) =

3x−3 3 +1

= x−1+1 = x.

57. g(f (2)) = g(1) = 2, g(f (3)) = g(3) = 3, g(f (4)) = g(6) = 4, and g(f (5)) = g(10) = 5. One similarly shows that g ◦ f = id. For a small domain (and codomain), it is reasonable to directly check every possible input value. In fact, the formulas given for f and g are too awkward to deal with generally here. 58. g(f (1)) = g(2) = 1, g(f (2)) = g(4) = 2, g(f (3)) = g(8) = 3. f (g(2)) = f (1) = 2,f (g(4)) = f (2) = 4, f (g(8)) = f (3) = 8. 59. ∀ r ∈ Q+ , (f ◦ f )(r) = f ( 1r ) = 11 = r. r That is, f ◦ f = idR (and f ◦ f = idR ). 60. f (f (n)) = f (−n) = −(−n) = n. 61. f −1 (x) =

q 3

x−1 4 .

Let y = 4x3 + 1. So 4x3 = y − 1. So x3 = q f −1 (y) = 3 y−1 4 . 62. f −1 (x) = 63.

y−1 4 .

So x =

q 3

y−1 4 .

Thus,

5x−3 2 .

Phone Number 555-3148 555-3992 555-4500 555-6301

Name Blair, Tina Walsh, Carol Tillman, Paul Jennings, Robert

The function need not be one-to-one and need not be onto. The function would not be one-to-one, if two people from one household are both listed with the same phone number. It is unlikely that the function is onto, since there would then be no room for new phone numbers. 64.

Term even intersection odd relation tautology

Page Number 106 42 106 224 13

4.5. CHAPTER 5

451

Neither relation need be a function. A page could contain multiple terms, and a term could occur on multiple pages. 65. Proof. Suppose f : X −→ Y is a bijection. By Theorem 5.10(a), f −1 is a function. Also, f and f −1 and f are inverses of one another. By Theorem 5.10(b) (applied to g = f ), f −1 is a bijection.  66. Reversing the order, we can say that g and f are inverses of each other too. Now, reapply Theorem 5.10(b). 67. (a) Proof. Suppose f1 and f2 are one-to-one. Suppose that (f1 ×f2 )((x01 , x02 )) = (f1 × f2 )((x1 , x2 )). Since (f1 (x01 ), f2 (x02 )) = (f1 (x1 ), f2 (x2 )), we have f1 (x01 ) = f1 (x1 ) and f2 (x02 ) = f2 (x2 ). Thus, x01 = x1 and x02 = x2 . That is, (x01 , x02 ) = (x1 , x2 ).  (b) Proof. Suppose f1 and f2 are onto. Suppose (y1 , y2 ) ∈ Y1 × Y2 . We have x1 ∈ X1 such that f1 (x1 ) = y1 and x2 ∈ X2 such that f2 (x2 ) = y2 . That is, (f1 × f2 )((x1 , x2 )) = (f1 (x1 ), f2 (x2 )) = (y1 , y2 ).  (c) Proof. Suppose f1 and f2 are bijective. Since f1 and f2 are one-to-one, f1 × f2 is one-to-one, by part (a). Since f1 and f2 are onto, f1 × f2 is onto, by part (b). Thus, f1 × f2 is bijective.  68. (a) False. Let X1 = Y = {0}, X2 = {1}, f1 (0) = f2 (1) = 0. (b) True. Suppose f1 or f2 is onto. Say f1 is onto. Suppose y ∈ Y . So we have x1 ∈ X1 ⊆ X such that f (x1 ) = f1 (x1 ) = y1 . (c) If f1 (x) = f2 (x) for all x ∈ X1 ∩ X2 . 69. (a) On the following picture of N×N, at each point (m, n), we plot the value of f ((m, n)). Indeed, compute several specific values of f ((m, n)) to confirm this pattern. Note that each point (m, n) is assigned a unique value from N. n 6 9 5

8

2

4

7

0

1

3

6 -m

(b) Sketch. ∀ m ∈ N, g(m + 1) = m. So g is onto. If n1 − 1 = n2 − 1, then n1 = n2 . So g is one-to-one.  (c) This follows from part (b) and Exercise 67(c). That is, since g and g are bijective, so is g × g. (d) This follows from part (c), part (a), Exercise 65, and Theorem 5.9(c). Since g is bijective, so is g −1 . Since g × g and f are bijective, so is f ◦ (g × g). Since f ◦ (g × g) and g −1 are bijective, so is g −1 ◦ f ◦ (g × g).

452

CHAPTER 4. ANSWERS TO ALL EXERCISES

70. Theorem 3.22 shows that f is well-defined and one-to-one. Suppose (a, b) ∈ P . Let r = ab ∈ Q. So f (a) = (a, b). Hence f is onto. 71. (b) (c) (d)

(a) −2, since 2−2 = 14 . 4, since 34 = 81. √ 1 4 1 4 16 = 2. 4 , since 16 = 1 −1 −1, e = 3 . Recall that ln has base e.

72. (a) −2. (b) 2. (c) 32 . (d) 12 . 73. log2 3. Let T be the tripling time. So a2T = p(T ) = 3p(0) = 3a. Since 2T = 3, it follows that T = log2 3. 74. log5 2. 75. (a) Since b0 = 1. (b) Since blogb y+logb z = blogb y blogb z = yz. (c) Since ba logb y = (blogb y )a = y a . In each case, we simply use the characterization of logarithms given in Equation (5.4) and the basic Laws of Exponents from Appendix A. 76. (a) Since b1 = b. (b) Since blogb (y)−logb (z) = clogc (b)·logb (y) = (clogc (b) )logb (y) = blogb (y) = y.

blogb (y) blogb (z)

=

y z.

(c) Since

77. If a, b ∈ Z+ and 2a = 2b , then the Fundamental Theorem of Arithmetic tells us that a = b. That is, if f (a) = f (b), then a = b. So f is one-to-one. 78. Suppose f (n1 ) = f (n2 ). So n2 − n1 = 2πk for some k ∈ Z. If k 6= 0, then −n1 π = n22k ∈ Q, which is impossible. Hence it must be that k = 0, and therefore n2 = n1 .

Section 5.5 1. (a) f ({0, 1, 2, 3}) = {f (0), f (1), f (2), f (3)} = {1, 1, 2, 6} = {1, 2, 6}. (b) No. f ({3}) = {6}. The image of a set is a set. 2. (a) {2, 83 }. (b) No, f (2) = 2. 3. {10, −5, −6, −5} = {−6, −5, 10}. 4. {0, −3, 0, 15} = {−3, 0, 15}. 5. f ([−2, 2]) = [−3, 5].

4.5. CHAPTER 5

453

f ([−2, 2]) = {t : t ∈ R and f (s) = t for some s ∈ [−2, 2]} = {t : t ∈ R and 2s + 1 = t for some − 2 ≤ s ≤ 2} = t−1 {t : t ∈ R and s = t−1 2 for some − 2 ≤ s ≤ 2} = {t : t ∈ R and − 2 ≤ 2 ≤ 2} = {t : t ∈ R and − 4 ≤ t − 1 ≤ 4} = {t : t ∈ R and − 3 ≤ t ≤ 5} = [−3, 5]. 6. f ([−1, 2]) = [0, 4]. Suppose −1 ≤ x ≤ 2. So −1 ≤ x ≤ 0 or 0 ≤ x ≤ 2. Hence, 0 ≤ x2 ≤ 1 or 0 ≤ x2 ≤ 4. That is, 0 ≤ x2 ≤ 4. 7. f ([1, 3]) = [2, 10]. Proof. (⊆) Suppose t ∈ f ([1, 3]). So s2 + 1 = t for some 1 ≤ s ≤ 3. So 2 = 12 + 1 ≤ t ≤ 32 + 1 = 10. That is, t ∈ [2, 10].√ (⊇) Suppose t ∈ [2, 10]. So √ t − 1 ≤ 9. Thus, 1 ≤ t − 1 ≤ 3. Observe that √ 2 ≤ t ≤ 10. Hence, 1 ≤ ( t − 1)2 + 1 = t and 1 ≤ t − 1 ≤ 3. Therefore, t ∈ f ([1, 3]).  8. f ([−2, 3]) = [−8, 27], since −2 ≤ x ≤ 3 if and only if −8 ≤ x3 ≤ 27. 9. Proof. (⊆) Suppose z ∈ g(range(f )). So we have y ∈ range(f ) such that g(y) = z. We must also have x ∈ X such that f (x) = y. Since z = g(y) = g(f (x)) = (g ◦ f )(x), we see that z ∈ range(g ◦ f ). (⊇) Suppose z ∈ range(g ◦ f ). So we have x ∈ X such that (g ◦ f )(x) = z. Let y = f (x). So y ∈ range(f ). Since z = g(f (x)) = g(y), we see that z ∈ g(range(f )).  10. Proof. Suppose y ∈ f (S). So we have s ∈ S such that f (s) = y. Since S ⊆ X, we see that s ∈ X. Hence y ∈ Range(f ).  11. (a) {0, 1, 2, 4}, since f (0) = f (1) = 1, f (2) = 2, and f (4). (b) {3}, since f (3) = 6 and there is no value n such that f (n) = 10. (c) No. f −1 ({120}) = {5}. The inverse image of a set is a set. 12. (a) {1, 2, 4}. (b) No, since f is not one-to-one, there is no inverse function f −1 . However, f −1 ({ 38 }) = {3}. 13. {−2, −1, 1, 2}. The set of x for which x4 − 6 = −5 or 10. That is, x4 = 1 or 16. 14. {−2, 0, 2, 3}. 15. f −1 ({−1}) = O, the set of odd integers. If n is even, then f (n) = 1. If n is odd, then f (n) = −1. Thus, f (n) = −1 iff n is odd. 16. {n : n ≡ 0, 1 (mod 4)}. 17. The set of relatively prime pairs of positive integers. Recall that m and n are relatively prime if and only if gcd(m, n) = 1.

454

CHAPTER 4. ANSWERS TO ALL EXERCISES

18. dZ = {dn : n ∈ Z}. 19. f −1 ([1, 4]) = [−2, −1] ∪ [1, 2]. Proof. (⊇) Suppose x ∈ [−2, −1] ∪ [1, 2]. So −2 ≤ x ≤ −1 or 1 ≤ x ≤ 2. Equivalently, 1 ≤ −x ≤ 2 or 1 ≤ x ≤ 2. Since (−x)2 = x2 , in either case we have x2 ∈ [1, 4]. (⊆) We prove the contrapositive. Suppose x 6∈ [−2, −1] ∪ [1, 2]. So x ∈ (−∞, −2) ∪ (−1, 1) ∪ (2, ∞). By considering each possible case, we see that x2 ∈ [0, 1) ∪ (4, ∞). That is, f (x) = x2 6∈ [1, 4]. Hence, x 6∈ f −1 ([1, 4]).  20. f −1 ([−1, 8]) = [−1, 2], since −1 ≤ x3 ≤ 8 if and only if −1 ≤ x ≤ 2. 21. Proof. (⊆) Suppose (x, y) ∈ f (R). So, we have some z ∈ R such that (x, y) = f (z) = (z, z). Thus, y = z = x. Hence, g(x, y) = x − y = 0, and we see that (x, y) ∈ g −1 ({0}). (⊇) Suppose (x, y) ∈ g −1 ({0}). Since x−y = g(x, y) = 0, we get y = x. Thus, f (x) = (x, x) = (x, y). That is, (x, y) ∈ f (R).  22. g −1 ({0}) = dZ = f (Z), as in Exercise 18. 23. (a) Eagles and Huskies. Image. (b) KSU, Northwestern, UNH, and Villanova. Inverse Image. The function given by the table maps colleges to nicknames. 24. (a) NBA Dunkfest, Skate Rats, Claim Pro. Inverse Image. (b) GameCo, Playbox. Image. 25. (a) The set E of even integers, since R({2}) = {n : 2 R n} = {n : 2 | n} = E. (b) {3, 5, 7}, since 3, 5, and 7 are the primes p such that p | 15 or p | 35. 26. (a) 0, x − 1, x2 − 1, (x − 1)2 . In general, (x − 1)p(x) for any polynomial p. (b) {1, 3, 4}. 27. (a) {0}, {1}, and {0, 1}. Of course, each of these sets contains 0 or 1 as an element. R({0, 1}) = {A : A ⊂ Z, A ∩ {0, 1} = 6 ∅} is the set of sets that contain 0 or 1 as an element. (b) {0, 1, 2, 3, 4, 6}. An integer n is in this set if and only if n ∈ {0, 1, 2, 3, } or n ∈ {0, 2, 4, 6}. 28. (a) (1, ∞). (b) (−∞, 5). 29. (a) No. Two customers ordered a wrench. (b) A wrench and pliers. Inverse image. (c) Susan Brower and Abe Roth. Image. The function given by the table maps parts to customers.

4.5. CHAPTER 5

455

30. (a) No, since Martha Lang has more than one project. (b) NBA Dunkfest, Skate Rats. Image. (c) Martha Lang, Abe Roth. Inverse Image. 31. (a) Proof. Suppose S1 ⊆ S2 . Now suppose y ∈ f (S1 ). So y = f (x) for some x ∈ S1 . Since S1 ⊆ S2 , we have x ∈ S2 and f (x) = y. Thus y ∈ f (S2 ).  (b) Proof. Suppose T1 ⊆ T2 . Now suppose x ∈ f −1 (T1 ). So f (x) ∈ T1 . Since T1 ⊆ T2 , we have f (x) ∈ T2 . Thus x ∈ f −1 (T2 ).  32. (a) Proof. Suppose x ∈ S. Since f (x) ∈ f (S), x ∈ f −1 (f (S)).  (b) Proof. Suppose y ∈ f (f −1 (T )). So y = f (x) for some x ∈ f −1 (T ). Since x ∈ f −1 (T ), y = f (x) ∈ T .  (c) Proof. Suppose f is one-to-one. (⊇) Suppose x ∈ f −1 (f (S)). So we have y ∈ f (S) such that f (x) = y. So we have z ∈ S such that f (z) = y. Thus, x = z ∈ S.  (d) Proof. Suppose f is onto. (⊇) Suppose y ∈ T . So we have some x ∈ X such that f (x) = y. So x ∈ f −1 (T ). Thus, y = f (x) ∈ f (f −1 (T )).  33. (a) (⊇) By the definition of f −1 (Y ), we have f −1 (Y ) ⊆ X. (⊆) Suppose x ∈ X. Since f (x) ∈ Y , we have x ∈ f −1 (Y ). (b) Since Y is the codomain, this follows from the definition of f (X). (c) Let X = Y = R and f (x) = x2 . So f (X) = [0, ∞) 6= Y . 34. (a) Proof. Suppose not. So we have some y ∈ f (∅). That is, y = f (x) for some x ∈ ∅, a contradiction.  (b) Proof. Suppose not. So we have some x ∈ f −1 (∅). That f (x) ∈ ∅ is a contradiction.  35. (a) Sketch. (⊆) Suppose x ∈ f −1 (T1 ∪ T2 ). So f (x) ∈ T1 ∪ T2 . For i = 1, 2, if f (x) ∈ Ti , then x ∈ f −1 (Ti ). Hence, x ∈ f −1 (T1 ) ∪ f −1 (T2 ). (⊇) By Exercise 31(b), for i = 1, 2, f −1 (Ti ) ⊆ f −1 (T1 ∪T2 ). Hence, f −1 (T1 )∪f −1 (T2 ) ⊆ f −1 (T1 ∪ T2 ).  (b) Sketch. By Exercise 31(b), for i = 1, 2, f −1 (T1 ∩ T2 ) ⊆ f −1 (Ti ). So f −1 (T1 ∩ T2 ) ⊆ f −1 (T1 ) ∩ f −1 (T2 ). Now suppose x ∈ f −1 (T1 ) ∩ f −1 (T2 ). So for i = 1, 2, f (x) ∈ Ti . Since f (x) ∈ T1 ∩ T2 , x ∈ f −1 (T1 ∩ T2 ).  The proofs here rest mainly on the definition of the inverse image of a set. However, some work is saved by appealing to the result in Exercise 31(b). 36. (a) Sketch. By Exercise 31(a), f (S1 ) ⊆ f (S1 ∪ S2 ) and f (S2 ) ⊆ f (S1 ∪ S2 ). Hence, f (S1 ) ∪ f (S2 ) ⊆ f (S1 ∪ S2 ). No suppose y ∈ f (S1 ∪ S2 ). So y = f (x) for some x ∈ S1 ∪ S2 . Since x ∈ S1 or x ∈ S2 , it follows that f (x) ∈ f (S1 ) or f (x) ∈ f (S2 ).  (b) Sketch. By Exercise 31(a), f (S1 ∩ S2 ) ⊆ f (S1 ) and f (S1 ∩ S2 ) ⊆ f (S2 ). Hence f (S1 ∩ S2 ) ⊆ f (S1 ) ∩ f (S2 ).  (c) X = {0, 1}, Y = {0}, f (x) = 0, S1 = {0}, S2 = {1}.

456

CHAPTER 4. ANSWERS TO ALL EXERCISES

37. (a) Proof. Suppose x ∈ S ∩ f −1 (T ). Since x ∈ S, f (x) ∈ f (S). Since x ∈ f −1 (T ), f (x) ∈ T . Hence, f (x) ∈ f (S) ∩ T .  (b) Proof. Suppose x ∈ S ∩ f −1 (T ). So f (x) ∈ f (S ∩ f −1 (T )). By part (a), f (x) ∈ f (S) ∩ T . Hence, x ∈ f −1 (f (S) ∩ T ).  38. (a) Sketch. By Exercises 31(a) and 32(a), f (S) ⊆ f (f −1 (f (S))). By Exercise 32(b) with T = f (S), we get f (f −1 (f (S))) ⊆ f (S).  (b) Sketch. By Exercises 31(b) and 32(b), f −1 (f (f −1 (T ))) ⊆ f −1 (T ). By Exercise 32(a) with S = f −1 (T ), we get f −1 (T ) ⊆ f −1 (f (f −1 (T ))).  39. (a) Proof. (→) Suppose f is one-to-one. Suppose F (A1 ) = F (A2 ). So f (A1 ) = f (A2 ). We claim that A1 = A2 . Suppose x ∈ A1 . So f (x) ∈ f (A1 ) = f (A2 ). Hence f (x) = f (x0 ) for some x0 ∈ A2 . Since f is one-to-one, x = x0 ∈ A2 . Thus A1 ⊆ A2 , and a symmetric argument gives that A2 ⊆ A1 . Therefore, F is one-to-one. (←) Suppose F is one-to-one. Suppose f (x1 ) = f (x2 ). Since F ({x1 }) = f ({x1 }) = f ({x2 }) = F ({x2 }), it follows that {x1 } = {x2 } and hence x1 = x2 . Therefore, f is one-to-one.  (b) Proof. (→) Suppose f is onto. Let B ∈ P(Y ), and let A = f −1 (B). Since f is onto, F (A) = f (A) = B. Thus F is onto. (←) Suppose F is onto. Let y ∈ Y . We have some A ⊆ X such that f (A) = F (A) = {y}. Note that we must have A 6= ∅. Pick x ∈ A. Then f (x) = y. Thus f is onto.  40. (a) Sketch. Both sides are {(y1 , y2 ) : (f1 × f2 )(x1 , x2 ) = (y1 , y2 ) for some (x1 , x2 ) ∈ X1 × X2 } = {(y1 , y2 ) : f1 (x1 ) = y1 and f2 (x2 ) = y2 for some x1 ∈ X1 , x2 ∈ X2 }.  (b) True. Sketch. {(x1 , x2 ) : (f1 × f2 )(x1 , x2 ) ∈ B1 × B2 } = {(x1 , x2 ) : f1 (x1 ) ∈ B1 and f2 (x2 ) ∈ B2 }.  41. {0}. Note that 0 is in every interval (−r2 , r2 ).√ √ For any other value x ∈ R \ {0}, we have x 6∈ (−( x)2 , ( x)2 ). 42. (0, ∞). 43. [1, ∞). Note that 1 is the smallest element of Z+ . For any x ∈ [1, ∞), we have x ∈ [bxc, bxc + 2). 44. ∅. 45. [0, 1]. Note that [0, 1] is one of the sets and ∀ n ∈ Z+ , [0, 1] ⊆ [0, n]. 46. [0, 1). 47.

S

x∈[3,4)

48. S =

T

Ax .

t∈E

At .

4.5. CHAPTER 5

49.

T

α is a vowel

50. S =

S

n≤200

457

Aα . An .

51. Sketch. (⊆) Suppose y ∈ f (

[

Ai ). So y = f (x) for some x ∈ Ai for some

i∈I

i ∈ I. Note y ∈ f (Ai ). (⊇) Suppose y ∈

[

f (Ai ). So for some i ∈ I, y = f (x)

i∈I

for some x ∈ Ai . Note Ai ∈

[

Ai . 

i∈I

S S 52. Proof. (⊆) Suppose x ∈ f −1 ( i∈I Ai ). So f (x) ∈ i∈I Ai . Hence, f (x) ∈ S −1 −1 Aj for some j ∈ I. Since x ∈ f (A ), it follows that x ∈ f (Ai ). j i∈I S (⊇) Suppose Sx ∈ i∈I f −1 (Ai ). SSo x ∈ f −1 (Aj ) for some j ∈ I. Thus, f (x) ∈ Aj ⊆ i∈I Ai . So x ∈ f −1 ( i∈I Ai ).  \

53. Sketch. (⊆) Suppose x ∈ f −1 (

Ai ). So f (x) ∈ Ai for each i ∈ I. So

i∈I

x ∈ f −1 (Ai ) for each i ∈ I. (⊇) Suppose x ∈

\

f −1 (Ai ). So, for each i ∈ I,

i∈I

x ∈ f −1 (Ai ). So f (x) ∈ Ai for each i ∈ I.  T T 54. Proof. Suppose y ∈ f ( i∈I Ai ). So T y = f (x) for some x ∈ i∈I Ai . Thus, y ∈ f (Ai ) for each i ∈ I. Hence, y ∈ i∈I f (Ai ).  S 55. (a) Sketch. Suppose x ∈ i∈J Ai . So x ∈ Ai0 for some i0 ∈ J ⊆ I. [ \ Thus, x ∈ Ai . (b) Sketch. Suppose x ∈ Ai . Since J ⊆ I, in particular, i∈I

i∈I

∀ i ∈ J , x ∈ Ai . Thus, x ∈

\

Ai . 

i∈J

These are generalizations of the proofs that A ⊆ A ∪ B and A ∩ B ⊆ A. In Section 2.2, see Exercise 35 and Example 2.13. S 56. (a) Proof. Suppose S x ∈ i∈I Bi . So x ∈ Bj for some j ∈ I. Since x ∈ Aj , it follows that x ∈ i∈I A Ti .  (b) Proof. Suppose x ∈ i∈I BTi . So x ∈ Bi for each i ∈ I. Since x ∈ Ai , for each i ∈ I, it follows that x ∈ i∈I Ai .  57. (a) Proof. (⊆) Suppose x ∈ B ∪

\

Ai . If x ∈ B, then, ∀ i ∈ I, x ∈ B ∪ Ai .

i∈I

So x ∈

\ i∈I

x ∈

\ i∈I

(B ∪ Ai ). If x ∈

\

Ai , then ∀ i ∈ I, x ∈ Ai ⊆ B ∪ Ai . So

i∈I

(B ∪ Ai ). (⊇) Suppose x ∈

\ i∈I

(B ∪ Ai ). So, ∀ i ∈ I, x ∈ B ∪ Ai . If

458

CHAPTER 4. ANSWERS TO ALL EXERCISES

x 6∈ B, then it must be that, ∀ i ∈ I, x ∈ Ai . So x ∈

\

Ai . In any case,

i∈I

x∈B∪

\

Ai . 

i∈I

(b) Proof. (⊆) Suppose x ∈ B ∩

[

Ai . So x ∈ B and x ∈ Ai0 for some i0 ∈ I.

i∈I

Thus x ∈ B ∩ Ai0 ⊆

[

(B ∩ Ai ). (⊇) Suppose x ∈

i∈I

[

(B ∩ Ai ). So x ∈ B ∩ Ai0

i∈I

for some i0 ∈ I. Hence, x ∈ B and x ∈ Ai0 ⊆

[

Ai . Thus x ∈ B ∩

i∈I

[

Ai . 

i∈I

S 58. (a) Sketch. xT6∈ i∈I Ai if and only if x 6∈ Ai for each i ∈ I.  (b) Sketch. x 6∈ i∈I Ai if and only if x 6∈ Aj for some j ∈ I.  59. [ It follows from [ Exercise 57(b) [ that [ ( Ai ) \ B = ( Ai ) ∩ B c = (Ai ∩ B c ) = (Ai \ B). i∈I

i∈I

i∈I

i∈I

60. Sketch. Both sides consist of elements (b, a) such that b ∈ B and a ∈ Ai for each i ∈ I.  61. Yes. Use Exercises 33(a), 53, and 52. 62. No. Consider X = {0, 1}, Y = {0}, f (x) = 0, A1 = {0}, A2 = {1}.

Section 5.6 1. 76. Note that 10 − (−65) + 1 = 76. 2. 12. 3. 3. Note that {

4 0



,

4 1



,

4 2



,

4 3



,

4 4



} = {1, 4, 6, 4, 1} = {1, 4, 6}.

4. 3. 5. 3. The set is {0, 2, −2}. 6. 2. The set is {−1, 2}. 7. 4. The set of clients is GameCo, MediComp, HealthCorp, PlayBox. 8. 3. 9. The function f : {0, 1, . . . , n} −→ {1, 2, . . . , n + 1} given by f (k) = k + 1 is a bijection. It has inverse g : {1, 2, . . . , n + 1} −→ {0, 1, . . . , n} given by g(k) = k − 1.

4.5. CHAPTER 5

459

10. The function f : {m : m is even and 1 ≤ m ≤ 2n} −→ {1, . . . , n} given by f (m) = m 2 is a bijection. 11. The function f : {n2 , n2 + 1, . . . , (n + 1)2 } −→ {1, 2, . . . , 2n + 1} given by f (k) = k − n2 + 1 is a bijection. It has inverse g : {1, 2, . . . , 2n + 1} −→ {n2 , n2 + 1, . . . , (n + 1)2 } given by g(k) = k + n2 − 1. 12. The function f : {−n, −n + 1, . . . , n} −→ {1, 2, . . . , 2n + 1} given by f (k) = k + n + 1 is a bijection. 13. The function f : N −→ Z− given by f (n) = −n − 1 is a bijection. It has inverse g : Z− −→ N given by g(n) = −n − 1. 14. The function f : Z+ −→ {n : n = 2k for some k ∈ Z+ } given by f (k) = 2k is a bijection. 15. The function f : Z+ −→ {k 2 : k ∈ Z+ } given by f (m) = m√2 is a bijection. It has inverse g : {k 2 : k ∈ Z+ } −→ Z+ given by g(m) = m. Note that √ m ∈ Z+ for all m ∈ {k 2 : k ∈ Z+ }. 16. The function f : Z −→ O given by f (n) = 2n + 1 is a bijection. 17. The function f (x) = 2(x − 3) + 1 is a bijection from [3, 8] to [1, 11]. It has inverse given by g(x) = 12 (x − 1) + 3. 18. The function f (x) = 4(x + 1) is a bijection from [−1, 1) to [0, 8). 19. For (a), (b), and (c), the function given by f (x) = It has inverse given by g(x) = (b − a)x + a.

x−a b−a

is a bijection.

20. For all parts, the function f (x) = x − a is a bijection. 21. f (x) = b−x b−a gives a bijection. It has inverse given by g(x) = (a − b)x + b. 22. For (a) and (b), the function f (x) = a − x is a bijection. 23. For (a) and (b), f (x) = x−a b−x gives a bijection. It has inverse given by g(x) = bx+a x+1 . 24. Sketch. ( The function f : [0, 1] −→ [0, 1) given by 1 if x = n1 for some n ∈ Z+ , f (x) = n+1 x otherwise

460

CHAPTER 4. ANSWERS TO ALL EXERCISES

is a bijection.  (b) Sketch. Define g : (0, 1] −→ (0, 1) by g(x) = f (x).  ( x−a if x ∈ [a, b), 25. f (x) = 12(b−a)x−c gives a bijection. if x ∈ [c, d) 2 + 2(d−c) ( 2(b − a)x + a if x ∈ [0, 21 ), It has inverse given by g(x) = 1 1 1 2 + 2(d − c)(x − 2 ) + c if x ∈ [ 2 , 1). 26. Sketch. [a, c] \ {b} = [a, b) ∪ (b, c] has the same cardinality as [a, b) ∪ [b, c) = [a, c). Now apply Exercise 19(b).  27. Theorem: If A has the same cardinality as B, then B has the same cardinality as A. Proof. Suppose A has the same cardinality as B. So we have a bijection f : A −→ B. Since f −1 : B −→ A is also a bijection, B has the same cardinality as A.  28. Proof. Suppose A has the same cardinality as B and B has the same cardinality as C. So we have bijections f : A −→ B and g : B −→ C. By Theorem 5.9(c), (g ◦ f ) : A −→ C is a bijection. So A has the same cardinality as C.  29. Corollary: Let A have cardinality n 6= m. Then, A does not have cardinality m. Proof. We can assume that 0 ≤ m < n. Suppose to the contrary that A has cardinality m. So m ∈ N, and we have a bijection f : A −→ {1, 2, . . . , m}. In particular, f is one-to-one. By the Pigeon Hole Principle, we cannot have n > m. Note that f −1 : {1, 2, . . . , m} −→ A is also a bijection and is, in particular, one-to-one. Hence, by the Pigeon Hole Principle (applied to f −1 ) we cannot have n < m. Therefore, it must be that m = n, a contradiction. We conclude that A does not have cardinality m.  30. (a) Proof. Suppose n > m and there is an onto function f : B −→ A. So, for each a ∈ A, there is an element g(a) ∈ B such that f (g(a)) = a. Since g : A −→ B defines a bijection, n = |A| = |B| = m, a contradiction.  (b) This is the contrapositive of part (a). 31. Apply the contrapositive of Corollary 5.13. The contrapositive says that, if n 6= m, then there is no bijection f : A −→ B. This was argued in Exercise 29. 32. This is the contrapositive of the Pigeon Hole Principle. 33. There are 216 possible integers, and 70000 > 216 . Since the set of indices has size greater than 216 = 65536, there must be two or more indices assigned the same value.

4.5. CHAPTER 5

461

34. (a) Yes, there are 5! = 120 orders. (b) Since 132 > 120, there would be no one-to-one function from the set of games to the set of orders of the starters. 35. Sketch. The bijections f : A −→ C and g : B −→ D can be used to form a bijection f × g : A × B −→ C × D, by Exercise 67(c) from Section 5.4.  36. The bijections f : A −→ C and g : ( B −→ D can be used to define a bijection f (x) if x ∈ A, h : A ∪ B −→ C ∪ D given by h(x) = g(x) if x ∈ B. 37. Assume m ≥ 1 and A = {1, . . . , m}. By induction on n, we can prove that, for any n ≥ 1, |A × {1, . . . , n}| = mn. Sketch. When n = 1, we have |A × {1}| = |{(1, 1), . . . , (m, 1)}| = m = m · 1. Suppose k ≥ 1 and |A × {1, . . . , k}| = mk. Observe that A × {1, . . . , k, k + 1} = (A × {1, . . . , k}) ∪ (A × {k + 1}), a disjoint union. So |A × {1, . . . , k, k + 1}| = mk + m = m(k + 1).  38. Sketch. Suppose k ≥ 1 and |P({1, . . . , k})| = 2k . Observe that P({1, . . . , k, k + 1}) = P({1, . . . , k}) ∪ {S : S = A ∪ {k + 1} where A ∈ P({1, . . . , k})}, a disjoint union. Moreover, the second set in this union has the same cardinality as the first. So |P({1, . . . , k, k + 1})| = 2k + 2k = 2 · 2k = 2k+1 .  39. Exercise 69(c) from Section 5.4 gives a bijection Z+ × Z+ −→ Z+ . Hence, Z+ × Z+ has the same cardinality as Z+ . That is, Z+ × Z+ is countably infinite. 40. f : Z+ −→ E + given by f (n) = 2n and g : Z+ −→ O+ given by g(n) = 2n+1 are bijections. 41. Sketch. Let C1 and C2 be countable sets. So we have bijections f : C1 −→ Z+ and g : C2 −→ Z+ . By Exercise 67(c) from Section 5.4, we know that f × g : C1 × C2 −→ Z+ × Z+ is a bijection. Exercise 39 gives a bijection h : Z+ × Z+ −→ Z+ . The composite h ◦ (f × g) is the desired bijection.  That is, h ◦ (f × g) establishes that C1 × C2 has the same cardinality as Z+ . 42. Sketch. Suppose C1 and C2 are countably infinite sets. So we have bijections h1 : C1 −→ Z+ and h2 : C2 −→ Z+ . The map h ∪h

f ∪g

1 2 C1 ∪ C2 −→ Z+ ∪ Z+ −→ E + ∪ O+ = Z+

is a bijection, where f and g are defined in Exercise 40. 43. h(1) = z and ∀ k ≥ 2, h(k) = g(k − 1).

462

CHAPTER 4. ANSWERS TO ALL EXERCISES

Since z 6∈ G and g is one-to-one, it follows that h is one-to-one. Since h(1) = z and range(g) = G, it follows that range(h) = G ∪ {z}. That is, h is onto. So h is a bijection. 44. Let [a, b]×[c, d] be any rectangle in R2 . We have bijections f : [a, b] −→ [0, 1] and g : [c, d] −→ [0, 1]. Note that f × g : [a, b] × [c, d] −→ [0, 1] × [0, 1] is a bijection. 45. (a) We show ∀ n ∈ N, for any set B with cardinality n and any subset A ⊆ B, that A is finite. The proof is by induction on n. Proof. Base case: n = 0. The only set with cardinality 0 is B = ∅. If A ⊆ B, then A = ∅. So A has cardinality 0 and is finite as well. Inductive step: Let k ≥ 0 and suppose, for any set B of cardinality k and any subset A ⊆ B, that A is finite. Let B be a set with cardinality k + 1, and suppose A ⊆ B. If A = B, then A has cardinality k + 1 and is finite as well. If A ⊂ B, then we have some element b ∈ B \ A. Define B 0 = B \ {b}. So A ⊆ B 0 . We claim that B 0 has cardinality k and thus the inductive hypothesis finishes the proof. Let f : B −→({1, 2, . . . , k + 1} be a bijection, and define f 0 : B 0 −→ {1, 2, . . . , k} by f (b0 ) if f (b0 ) < f (b), f 0 (b0 ) = 0 f (b ) − 1 if f (b0 ) > f (b). Thus f 0 is a bijection showing that B 0 has cardinality k.  (b) This is the contrapositive of part (a). 46. We claim that, for each n ≥ 1, there is a function fn : {1, . . . , n} −→ A such that fn (k) = fn−1 (k) for each 1 ≤ k ≤ n−1 and fn (n) ∈ A\fn−1 ({1, . . . , n−1}). Since fn−1 cannot be onto, we can pick fn (n) = an as desired. The function f : Z+ −→ A given by f (n) = fn (n) gives the desired sequence with an = f (n). (a) f ({1, . . . , n}) has cardinality n. (b) f (Z+ ) is countably infinite. 47. (a) Proof. Suppose A ⊆ Z+ , and define the function f : Z+ −→ A by f (n) = min(A \ {f (1), f (2), . . . , f (n − 1)}). In fact, f is an increasing function. Hence, f is one-to-one. Now suppose a ∈ A ⊆ Z+ . Let m be the cardinality of {k : k ∈ A and k ≤ a}. In fact, f (m) = a. So f is onto. Therefore, f is a bijection.  (b) Proof. Suppose g : A −→ Z+ is one-to-one. Let A0 = g(A), and define g 0 : A −→ A0 by g 0 (a) = g(a). Since g 0 is a bijection, A0 is an infinite subset of Z+ . By part (a), A0 is countably infinite. Hence, A is countably infinite.  48. Sketch. The bijection g : A −→ Z+ is, in particular, one-to-one.  49. Proof. Suppose B is countable. If A is finite, then A is countable. So it suffices to assume that A is infinite. We have a bijection f : B −→ Z+ . Let i : A −→ B be the inclusion. So g = f ◦ i is a one-to-one map A −→ Z+ . By Exercise 47, A is countably infinite, hence countable. 

4.5. CHAPTER 5

463

50. Suppose A and B are countable. By Exercise 49, B \ A is also countable. Since A and B \ A are disjoint, Exercise 42 tells us that A ∪ B = A ∪ (B \ A) is countable. ( n if n is even 2 51. Proof. The bijection b : Z+ −→ Z given by b(n) = 1−n if n is odd, 2 together with the results in Exercise 69 from Section 5.4, enables us to construct a bijection g : Z+ −→ Z×Z+ . Since h : Z×Z+ −→ Q defined by h((m, n)) = m n is onto, the composite h ◦ g is an onto map Z+ −→ Q. By Exercise 48, Q is countably infinite.  52. Apply Cantor’s diagonal argument using bi = 1 − ai,i . 53. Proof. Since B is countable, we have a bijection g : Z+ −→ B. For each b ∈ B, since Ab is countable, we have a bijection fb : Z+ −→ Ab . We claim that S + + h : ZS × Z −→ b∈B Ab defined by h((m, n)) = fg(m) (n) is onto. Suppose a ∈ b∈B Ab . So a ∈ Ab0 for some b0 ∈ B. Since g is onto, we have m ∈ Z+ such that g(m) = b0 . Since fb0 is onto, we have n ∈ Z+ such that fb0 (n) = a. Thus, h((m, n)) = fb0 (n) = a. So h is onto. Since Exercise 69 from Section 5.4 + guarantees a bijection w : Z+ −→ Z+ × ZS , we have an onto map S h ◦ w : Z+ −→ b∈B Ab . By Exercise 48, b∈B Ab is countable.  54. (a) ∀ i, let Ai = {0, 1}. Now apply Exercise 52. (b) Yes. ∀ i, let Ai = {0}, or ∀ i, let Ai = ∅.

Review 1. (a) Yes, since 2 = 21 . (b) No, since 0 6= 20 . (c) No, since 1 6= 22 .

ercise 2. 0 1 2

2. 0 1 2 3 4

 0 0  1   0   0 0

1 0 0 1 0 0

2 0 0 0 0 1

 0 0  0 0

1 1 0 0

2 0 1 0

3 0 0 0

4  0 0  1

     

3. x R−1 y iff y = 2x . Recall that x R−1 y iff y R x. 4. The transpose of the matrix in Ex-

5. (a) No. (b) Yes. (c) Computer Science and Mathematics. 6.

r {a, b} 1  3   b r - r {b} - r {a} a r r∅

464

CHAPTER 4. ANSWERS TO ALL EXERCISES

7. (a) NNSE. Let R be the given relation. First, we can move N to (0, 1). Since N R N , we can move N to (0, 2). Next, since N R S, we can move S back to (0, 1). Since S R E, we can move E to (1, 1). (b) No. There is no way to move south without moving north first. Hence, our initial position cannot be lowered.  (c) Nm r a aa ar ? Y Wr !! E 6* ! Y ! r S √ √ 8. (a) No, since ( 2)2 − ( 3)2 = −1 6= 1. (b) Yes, since (−1)2 − 02 = 1. (c) No, since 02 − 12 = −1 6= 1. 9.

y 1 -1

x

This is a hyperbola, with asymptotes y = ±x. 10. x R−1 y iff x2 − y 2 = 1. That is, x R−1 y iff y R x. 11. Reflect the graph from Exercise 9 about the line y = x. y -1

1

x

12. Not reflexive, since 1 R 6 1. Symmetric, since x2 + y 2 = y 2 + x2 . −1 Not antisymmetric, as can be seen with x = √12 and y = √ . 2 Not transitive, as can be seen with x = 1, y = 0, and z = 1. 13. Not reflexive, since a | a but a = a. Not symmetric, since 1 | 2 and 2 - 1. Antisymmetric, since a | b, b | a, and a 6= b can never happen. Transitive by Example 3.4 from Section 3.1. 14. Proof. Let x, y, and z represent arbitrary elements of X. Reflexive: Since

4.5. CHAPTER 5

465

x R1 x and x R2 x, we automatically have x R x. Antisymmetric: Suppose x R y and y R x. In particular, x R1 y and x R2 y. Hence, x = y. Transitive: Suppose x R y and y R z. That is, x R1 y, x R2 y, y R1 z, and y R2 z. Hence, x R1 z and x R2 z. Thus, x R z.  15. =. We need a relation R with all of the properties: reflexive, symmetric, antisymmetric, and transitive. If x R y, then y R x (by symmetry), whence x = y (by antisymmetry). 16.

30  

H HH  H 6 10 15 H  H  H H  H  H  H  H 2H 3  5  HH H  1 arrow

R 30 * YH H   6@  I  H  @ HH R  R @ 6 10 15 @ YH  H * YH  H * 6@ 6 @  H  H I H  6 @ HR  HH@ @ 2 3 5 *  Y H HH @  I I 6 @  HH @  H 1 I

Hasse

30 

  

HH H

6

H H

10 HH   H  HH 2

15 HH   H  HH

3 H HH HH

H  1

5    

17. (6, −1, −3, 5, 2)  (6, −1, 2, −4, 7), since −3 < 2. 18. (a) (40, 16, 4) ≺ (40, 18, 2) in the lexicographic ordering, but (40, 16, 4) is a better record than (40, 18, 2). (b) Use triples (W, T, L) instead. If two teams have played the same number of games and they both have the same number of wins, then the team with fewer losses should be considered better. 19. Proof. Let x, y, and z represent arbitrary elements of X. Reflexive: Since x2 = x2 , we automatically have x R x. Symmetric: Suppose x R y. That is, x2 = y 2 . Since the symmetry of equality gives y 2 = x2 , we have y R x. Transitive: Suppose x R y and y R z. That is, x2 = y 2 and y 2 = z 2 . From the transitivity of equality it follows that x2 = z 2 . Therefore, x R z. 

466

CHAPTER 4. ANSWERS TO ALL EXERCISES

20. (a) [x] = {x, −x}, since x2 = y 2 iff x = ±y. Note that {0, −0} = {0}. (b) |x|. The choices are x or −x, and |x| is the nonnegative choice. Recall that ( 0 ≤ |x| =

x −x

if x ≥ 0, if x < 0.

21. ∀ S m, n ∈ Z, if m 6= n, then (m − 1, m] ∩ (n − 1, n] = ∅. Also, n∈Z (n − 1, n] = R. In particular, ∀ x ∈ R, x ∈ (dxe−1, dxe] = Adxe , and each x has a unique ceiling. 22. (a) A vertical line through (x, 0). (b) Each point (x, y) lies on a unique vertical line {x} × R. ∀ x1 , xS 2 ∈ R, if x1 6= x2 , then ({x1 } × SR) ∩ ({x2 } × R) = ∅ since {x1 } ∩ {x2 } = ∅. Since x∈R {x} = R, it follows that x∈R ({x} × R) = R2 . 23. No. The sets An are not disjoint, since 1 ∈ A1 ∩ A2 . 24. ∀ x ∈ [0, ∞), let Ax = {−x, x}. In Exercise 20, we saw that [x] = {−x, x}. Since [−x] = [x], it suffices to use {−x, x} when x ≥ 0. 25. x R y iff dxe = dye. Note that, for each n ∈ Z, we have x ∈ An if and only if n − 1 < x ≤ n. By definition, n = dxe. So x, y ∈ An if and only if dxe = n = dye. 26. (x1 , y1 ) R (x2 , y2 ) iff x1 = x2 . For each x ∈ R, we have (x1 , y1 ), (x2 , y2 ) ∈ Ax = {x} × R if and only if x1 = x = x2 . 27. f (1) is not defined uniquely. f (1) is defined both as 1 and 2. That is, x = 1 fits in both pieces of the definition. However, 2 − x = 2 − 1 = 1 6= 2 = 1 + 1 = x + 1. 28. No. f (−1) =

1 2

6∈ Z.

29. Domain = {2, 3, 4, 5} and range = {1, 3, 6, 10}. Note that range(f ) = {f (2), f (3), f (4), f (5)} = { 22 ,

3 2



,

4 2



,

5 2



} = {1, 3, 6, 10}.

30. Proof. (⊆) Suppose y ∈ range(f ). So y = 2 − x for some −1 ≤ x ≤ 2. Hence, 0 ≤ y = 2 − x ≤ 3. That is, y ∈ [0, 3]. (⊇) Suppose y ∈ [0, 3]. Observe that 2 − y ∈ [−1, 2] and f (2 − y) = y. So y ∈ range(f ). 

4.5. CHAPTER 5

467

31. Domain = R \ {2} and range = R \ {1}. y

1 2

x

32. g ◦ f : Z+ −→ R is given by (g√◦ f )(n) = n√− 2. That is, (g ◦ f )(n) = g(f (n)) = g( n − 1) = ( n − 1)2 − 1 = n − 1 − 1 = n − 2. Also, note that the domain is adopted from f , and the codomain is adopted from g. 33. (a) Of Mice and Cats and Raisins of Wrath. (b) Publisher Customer Book Farm Raul Cortez Authority Pubs Mary Wright Word Factory Mary Wright Book Farm David Franklin (c) Raul Cortez and David Franklin. 34. Observe that x R y and y S z if and only if z S −1 y and y R−1 x. Hence, x (S ◦ R) z if and only if z (R−1 ◦ S −1 ) x. By Definition 5.16 in the exercises from Section 5.3, x (S ◦ R) z

if and only if

∃ y ∈ Y such that x R y and y S z.

if and only if

∃ y ∈ Y such that z S −1 y and y R−1 x.

Consequently, z (R−1 ◦ S −1 ) x

In fact, we can apply the same value y in both instances. 35. Proof. Suppose n1 , n2 ∈ Z and f (n1 ) = f (n2 ). So 3n1 − 2 = 3n2 − 2. It follows that n1 = n2 .  36. f (0) = f (1) but 0 6= 1. Namely, f (0) = 03 − 0 = 0 = 13 − 1 = f (1). So two distinct input values have the same output value. 37. f (−1) = 0, f (2) = 3, and f (−3) = f (3) = 8.

468

CHAPTER 4. ANSWERS TO ALL EXERCISES

We have explicitly displayed that each element of the codomain {0, 3, 8} is actually in the range. 38. f (x) = −11 is impossible. ∀ x ∈ R, x2 − 10 ≥ −10. So, there is no x ∈ R for which f (x) = −11. 39. (a) 84. (b) 036−77−5484 and 036−77−5709. Note that 5484 mod 225 = 84 and 5709 mod 225 = 84. 40. Proof. (One-to-one) Suppose f (r1 ) = f (r2 ). So rn1 = rn2 . Hence r1 = r2 . (Onto) Suppose s ∈ Q. Let r = ns, and observe that f (r) = s.  Alternatively, s 7→ ns is the inverse of f . 41. Proof. (One-to-one) Suppose f (n1 ) = f (n2 ). Since the second coordinate of the output is 0 for even input and 1 for odd input, it must be that n1 and n2 have the same parity. In both the even and odd cases, it is easy to then see that n1 = n2 . (Onto) Suppose (m, i) ∈ Z × {0, 1}. Let n = 2m + i. Observe that f (n) = (m, i).  42. Sketch. If f 0 (x1 ) = f 0 (x2 ), then f (x1 ) = f (x2 ), and hence x1 = x2 . So f 0 is one-to-one. If y 0 ∈ Y 0 , then there is some x ∈ X such that f 0 (x) = f (x) = y 0 . So f 0 is onto. Thus, f 0 is a bijective.  43. (a) Proof. Suppose f : [0, 2] −→ [0, 1]. Let x ∈ [0, 2]. Since f (x) ∈ [0, 1], it follows that g(f (x)) = f (x). Hence g ◦ f = f .  (b) Define f (x) = x2 . So (f ◦ g)(2) = f (1) = 12 and f (2) = 1. Thus, f ◦ g 6= f . 44. We confirm that ∀ x ∈ R, f (g(x)) = x and g(f (x)) = x. ∀ x ∈ R, (f ◦ g)(x) = f (g(x)) = f (2 − 3x) = 2−(2−3x) = x and 3 2−x (g ◦ f )(x) = g(f (x)) = g( 2−x ) = 2 − 3( ) = x. 3 3 45. Proof. Suppose f : X −→ Y . Let g1 : Y −→ X and g2 : Y −→ X be inverses of f . That is, g1 ◦ f = idX , f ◦ g1 = idY , g2 ◦ f = idX , and f ◦ g2 = idY . It follows that g2 = g2 ◦ idY = g2 ◦ (f ◦ g1 ) = (g2 ◦ f ) ◦ g1 = idX ◦ g1 = g1 .  46. 3, since 53 = 125. 47. 1, since e1 = e and the base of ln is e. 48. (a) f ({−1, 0, 1, 2}) = {f (−1), f (0), f (1), f (2)} = {−1, 0, −1, 4} = {−1, 0, 4}. (b) {−1, 0, 1, 2}. Note that f (−1) = f (1) = −1; f (0) = 0; there is no n such that f (n) = 1; f (2) = 4; and there is no n such that f (n) = 9.

4.5. CHAPTER 5

469

√ √ 49. (a) [0, 4]. (b) [− 3, 3]. 2 2 Observe that, √ if −1 ≤ x ≤ 2, then 0 ≤ 4 − x ≤ 4. And, if 1 ≤ 4 − x ≤ 4, then √ − 3 ≤ x ≤ 3. y

4

x

50. S {1} [0, 1] (−1, 0)

f (S) {−1} [−1, 1] (1, 3)

T {1} [1, 4) (−4, −2)

f −1 (T ) {0} [−1, 0] ∅

Note the graph of the function and some of its individual function values. y (-1,3) q A x f (x) Aq(0,1) −1 3 A x 0 1 Aq (1,-1) 1 −1

Hence, note that there are no values of x ∈ [−1, 1] = domain(f ) such that 3 < f (x) < 4 or −4 < f (x) < −1. That is, range(f ) = [−1, 3] ⊂ (−4, 4). Consequently, f −1 ([1, 4)) = f −1 ([1, 3]) and f −1 ((−4, −2)) = ∅. 51. (a) Megan Johnson, Martha Lang, and Abe Roth. (b) Inverse image. Student Abe Roth Megan Johnson Richard Kelley Martha Lang Abe Roth

Major Computer Science Mathematics Computer Science Physics Mathematics

52. (a) True. See Exercise 35 from Section 5.5. (b) False. See Exercise 36 from Section 5.5. 53. (a) False. Let f (x) = 0, S1 = {−1}, and S2 = {1}. So f (S1 M S2 ) =

470

CHAPTER 4. ANSWERS TO ALL EXERCISES

f ({−1, 1}) = {0}, but f (S1 ) M f (S2 ) = {0} M {0} = ∅. (b) True. f −1 (T1 M T2 ) = f −1 ((T1 \ T2 ) ∪ (T2 \ T1 )) = f −1 (T1 \ T2 ) ∪ f −1 (T2 \ T1 ) = f −1 (T1 ∩ T2 c ) ∪ f −1 (T2 ∩ T1 c ) = (f −1 (T1 ) ∩ f −1 (T2 c )) ∪ (f −1 (T2 ) ∩ f −1 (T1 c )) = c c (f −1 (T1 ) ∩ (f −1 (T2 )) ) ∪ (f −1 (T1 ) ∩ (f −1 (T2 )) ) = −1 −1 −1 −1 (f (T1 ) \ f (T2 )) ∪ (f (T2 ) \ f (T1 )) = f −1 (T1 ) M f −1 (T2 ). 54. (0, 5). Note that (0, 3) ∪ (2, 5) = (0, 5) and ∀ r ∈ [0, 2], (r, r + 3) ⊆ (0, 5). 55. {0}. Note that {m : m = nk for some n ∈ Z} is the set of multiples of k. Hence, to be in the desired intersection, an integer would have to be a multiple of every integer k. Of course, only 0 has that property. S 56. S = r∈[80,115] Ar . Also, S = A80 ∪ A90 ∪ A100 ∪ A110 ∪ A115 . Note that $115,000 + $10,000 = $125,000. [ 57. Proof. Since I 6= ∅, we have some j ∈ I. (⊆) Suppose x ∈ (B ∪ Ai ). So i∈I

we have some i0 ∈ I such that x ∈ B ∪ Ai0 . If x 6∈ B, then x ∈ Ai0 ⊆

[

Ai .

i∈I

In any case, x ∈ B ∪

[

Ai . (⊇) Suppose x ∈ B ∪

i∈I

x ∈ Ai0 for some i0 ∈ I, and thus x ∈ B ∪ Ai0 ⊆

[

Ai . If x 6∈ B, then

i∈I

[

(B ∪ Ai ). If x ∈ B, then

i∈I

x ∈ B ∪ Aj ⊆

[

(B ∪ Ai ). 

i∈I

58. 3. The set is {4, 5, 6}. 59. f : {−100, −99, . . . , 200} −→ {1, 2, . . . , 301} defined by f (n) = n + 101 is a bijection. Its inverse is given by g(n) = n − 101. 60. 3. Namely, Computer Science, Mathematics, and Physics. 61. f : [−1, 0) −→ (1, 7] defined by f (x) = 1 − 6x is a bijection. Its inverse is given by g(x) = 1−x 6 . 62. f : {2k : k ∈ Z, 0 ≤ k ≤ n} −→ {1, 2, . . . , n + 1} defined by f (m) = m 2 +1 is a bijection. Its inverse is given by g(m) = 2m−2. Be sure to note that m 2 ∈N for each m ∈ {2k : k ∈ Z, 0 ≤ k ≤ n}. So the definition of f is valid. 63. f : Z −→ T defined by f (n) = 10n is a bijection. Its inverse is g(n) =

10 n.

4.5. CHAPTER 5

471

64. The function f : A × B −→ B × A defined by (a, b) 7→ (b, a) is a bijection. The function g : B × A −→ A × B defined by (b, a) 7→ (a, b) is its inverse. 65. False. Let A = B = C = (0, 1) and D = (0, 2). Then B \ A = ∅ and D \ C = [1, 2) do not have the same cardinality. 66. Proof. Suppose to the contrary that, for some m ∈ N, there is a bijection f : [1, 2] −→ {1, 2, . . . , m}. Let i : {1 + n1 : 1 ≤ n ≤ m + 1} −→ [1, 2] be the inclusion of a set of cardinality m + 1. The composite f ◦ i is a one-to-one map that contradicts the Pigeon Hole Principle.  67. f : {3k : k ∈ Z+ } −→ Z+ defined by f (n) = Its inverse is given by g(n) = 3n.

n 3

is a bijection.

68. Proof. Suppose to the contrary that R2 is countable. Then the subset R×{0} is countable. Since R and R × {0} have the same cardinality, R is countable. This is a contradiction. 

472

4.6

CHAPTER 4. ANSWERS TO ALL EXERCISES

Chapter 6

Section 6.1 1. 6 · 8 = 48.

3. 31 · 3 · 4 = 372.

2. 192. 4. 120.

5. The possibilities are: AA, AB, AC, AD, BB, BC, BD, CC, CD, DD. So, 10. The number of choices for the second letter depends on the first letter. 6. 44. The number of choices for the second digit depends upon the choice of the first digit. 7. (a) The possible outcomes are: 2H, 2T , 4H, 4T , 6H, 6T , 1♣, 1♦, 1♥, 1♠, 3♣, 3♦, 3♥, 3♠, 5♣, 5♦, 5♥, 5♠. So, 18. (b) No. There are 6 outcomes involving a coin and 12 involving a card. More outcomes involve a card. 8. (a) 1 + 26 + 262 = 703. (b) 1 + 8 + 82 = 73. 9. (a) 263 ·103 = 17576000. (b) 263 ·(103 −1) = 17558424. (c) (263 −1)·(103 −1) = 17557425. 2

4

10. (a) 2660·10 = 16900 ≈ 1878 hours. (b) 2 9 (c) Approximately 1806 hours.

26·104 602

=

650 9

≈ 72 hours.

11. 5040/3 = 1680 days.

19. 26 · 25 · 24 · 104 = 156000000.

12. 366 · 5 seconds ≈ 345.13 years.

20. 262 · 10 · 9 · 8 · 7 · 6 = 20442240.

13. 26 · 25 · 53 = 81250.

21. 46 = 4096.

14. 56 = 15625.

22. 4(10 ) .

15. 26 · 364 · 10 = 436700160.

23. 1610 = 1099511627776.

16. 9 · 103 · 9 = 81000.

24. 25 = 32.

17. 104 = 10000.

25. 5 · 4 · 3 = 60.

8

18. 103 = 1000 total, and 9 · 102 = 900 26. 73 = 343. without a leading zero. 27. 3 · 2 · 52 = 312.

4.6. CHAPTER 6

473

28. 2 · 4 · 13 = 104.

39.

776 2

29. 850 − 85 + 1 = 766.

40.

3003−30+1 2

30. 1700 − 17 + 1 = 1684.

41. 86. Note that 0 is included. 8 b 23 c + 1 = 86.

31.

100 10

+ 1 = 11.

32. 287 − 236 = 51. 33.

7000 28

= 250.

34.

3000 20

= 150.

35. |{84, 91, . . . , 7994}| = 7994 84 7 − 7 + 1 = 1131. 36. b 2000 13 c − 1 = 152. 37. |{204, 210, . . . , 1998}| = 204 1998 6 − 6 + 1 = 333. 150 38. b 1515 8 c − b 8 c = 171.

18 2



+ 1 = 380. = 1487.

We have

6

42. b 34 c + 1 = 183. 43. 365(59)+15+24+243+11 = 21828. 44. 103(365) + 25 − 10 = 37610. 45. 365(65) + 17 + 14 + 181 + 120 = 23957. 46. 50(365) + 11 − 10 − 28 − 5 = 18218. 47. 365(86)+20+27+153+1 = 31591. 48. 58(365) + 14 + 26 + 19 = 21229.

Section 6.2 1. 4! = 24.

10. P (5, 4) = 120.

2. 3! = 6.

11.

3. 6! = 720.

12. 5005.

4. 52!.

13.

5. 200 · 199 · · · · · 191 = P (200, 10).

14. 264 ·

6. P (40, 7) = 93963542400.

15.

7. 20 · 19 · 18 · 17 = 116280.

16. 6 · 75 = 100842.

8. 3603600.

17.

8 2

9. P (8, 3) = 336.

18.

12 3

20·19·18·17 4·3·2·1

6 3



10 5

253 = 312500.





= 4845.

4 2



· 92 .

155 = 191362500.

10 2



20 2



= 239400.

 9 6 3 3

3

3

= 369600.

474

CHAPTER 4. ANSWERS TO ALL EXERCISES

19.

8 3

 6

20.

10 4

21.

26 6

= 230230.

22.

10 4

= 210.

2

 6 3 2

 

 24. (a) 24 1307504. 9 =   8 6 (b) 10 = 117600. 4 2 3

= 840. 1

= 9450.

25.

8 2

 6

144 = 16134720.

5 2

· 23 = 480.



26. 6 ·

 23. (a) 12 5 = 792.   (b) 31 52 42 = 180.

2

27.

10 4

P (7, 6) = 1058400.

28.

8 4

= 70.





29. (a) P (15, 5)P (15, 5)P (15, 4)P (15, 5)P (15, 5) = P (15, 5)4 P (15, 4). (b) i. There are 5! possibilities for the column with BINGO. So, 5!P (15, 5)3 P (15, 4). ii. Since the free cell starts with a chip, there are 4! possibilities for the column with BINGO. So, 4!P (15, 5)4 .

30. (a) 19!. (b) 20!.

37. 3. The run could start with a 1, a 2, or a 3. So, 3.

31. P (6, 5) = 720. 32.

6 5

33.

5 2

34.

5 3

  

35. 6 ·

38. 6 · 5 = 30. = 6. 3

5 = 1250. = 10. 5 3



39.

6 4

= 15.

40.

5 2

= 10.

 

41. 6 ·

· 5 = 300.

36. 5.

42.

6 2



5 2



= 60.

= 15.

43. 21090-9000. | {z } | {z} |{z } |{z } | {z} |{z } |{z } | {z} |{z } |{z } 2

1

0

9

0

9

0

0

0

9

44. 20077-7334. | {z } | {z} |{z } |{z } | {z} |{z } |{z } | {z} |{z } |{z } 2

0

0

7

7

7

3

3

4

4

45. (a) The first number in Pascal’s triangle greater than or equal to 16 is 20 = 63 . So each digit will use a total of 6 bars. (b) 3 bars will be long. 46. (a) 4 bars suffice, since bars only.

4 1



+

4 2



= 10. (b) Yes, use either one or two long

4.6. CHAPTER 6

475

47. (a) P (6, 4) = $360. (b) P (20, 4) = $116280. (c) When the horses favored to win do well, the superfecta payoff is less than $116,280. E.g., if the four most highly favored horses finish in the top four, then that pays off much less than if the four least highly favored horses do so. That is, long shots give a higher payoff. 48. (a) $20. (b) 2

14 2



= 364.

12 2



= 69300.

Section 6.3 1.

10 5

2.

 8



 6 

6 3

7.

6 4

 

 35 9. 12 − [ 834222844.

= 84.

3

6 5



· 92 + 10 1



5. 1 + 6.



· 92 = 2430.

4

6 4

10 6

+

 8

+

2

3. 2 4.

12 3



6 4



· 43 + 6 5



+



10 3

+

8. 55 + 5 · 54 +

6 6

17 12



11.

5 0

+

5 2

8 5

+

8 6



+

10 2



18 1



17 11



) = 968.



+

5 4



= 16.



+

8 7



+ 1 = 93.

= 176.

12.



· 4 + 1 = 1545.

13. (1000 − 333) − (499 − 166) = 334.



= 22.

14. (999 − 10 + 1) − ( 999 9 − 1) = 880.



15. 166 + 71 − 23 = 214.

 5 2

· 53 = 7500.

5000 5000 500 500 500 16. b 5000 11 c + b 13 c − b 11·13 c − (b 11 c + b 13 c − b 11·13 c) = 724.

17. (1000 + 400 − 200) − (99 + 39 − 19) = 1081. 3500 3500 18. b 3500 3 c + b 11 c − b 33 c = 1378.

19. (a) 68 = 1679616. (b) 68 = 1679616. (c) 68 + 68 − 28 = 3358976. 5 2

20. (a) 21. 2 22.



2

= 10. (b) 0. (c)

· 35 −

  4 8

23. 2 24.

8 3



3

+

 13

 39

2

3

12 4



8 3

 5 3

  3 9 2



· 40 +

3

2



5 2



+

3 2

 5 4

22 = 24976.



 13 2 12 5

] =



6 5

· 42 +

+



10. 210 − (1 + 10 +

· 9 + 1 = 1270.

10 2

+

18 0

   4 3 5 2

2

1

= 498.

· 26 = 1267500.

= 20592.

= 25. 25.

39 5

+

13 1

39 4

26.

12 5

+

13 5

= 2079.











= 1645020.

27. 144 − (72 + 48 − 24) = 48. 28. 245 −

245 5



245 7

+

245 35

= 168.

476

CHAPTER 4. ANSWERS TO ALL EXERCISES

29. [1000 − (500 + 200 − 100)] − [99 − (49 + 19 − 9)] = 360. 30. 1125 −

1125 3



1125 5

+

1125 15

− 25 +

25 5

25 + b 25 3 c − b 15 c = 587.

31. (a) “MEET ME.” That is, we have the decodings: y = A 7→ x = M , y = W 7→ x = E, y = B 7→ x = T , y = C 7→ x =‘ ’. (b) y = 4x+3 and 4 is relatively prime to 27. Note, e.g., that ‘ ’ = 0, 4·0+3 = 3, and C = 3. (c) 486. Observe that, if kx ≡ j (mod d) for all x, then k ≡ j ≡ 0 (mod d). This follows by plugging in first x = 1 and then x = 0. Hence, if (a1 x + b1 ) ≡ (a2 x + b2 ) (mod d) for all x, then a1 ≡ a2 (mod d) and b1 ≡ b2 (mod d). This holds since (a1 − a2 )x ≡ (b2 − b1 ) ( mod d) for all x. Consequently, we need only consider a and b values in {0, . . . , 26}. Since, there are 18 choices for a that are relatively prime to 27, there are only 18 · 27 = 486 different linear ciphers. 32. (a) 8, 134, 1, 94. (b) 209 = 11 · 19 and 5 is not relatively prime to 90 = lcm(11 − 1, 19 − 1). (c) m = 90 and the number of possible a relatively prime to 90 is 24. 33. [1771 − (885 + 354 − 177)] − [170 − (85 + 34 − 17)] = 641. 5432 5432 34. 5432 − b 5432 3 c − b 7 c + b 21 c − 543 +

543 3

543 + b 543 7 c − b 21 c = 2794.

35. Theorem: If A1 , A2 , . . . , An are disjoint sets, then |A1 ∪ A2 ∪ · · · ∪ An | = |A1 | + |A2 | + · · · + |An |. Sketch. (By induction) The Addition Principle handles the case in which n = 2 (also check when n = 1). So suppose k ≥ 2 and A1 , . . . , Ak+1 are disjoint sets. Observe that |A1 ∪ A2 ∪ · · · ∪ Ak ∪ Ak+1 | = |(A1 ∪ A2 ∪ · · · ∪ Ak ) ∪ Ak+1 | = |A1 ∪ A2 ∪ · · · ∪ Ak | + |Ak+1 | = |A1 | + |A2 | + · · · + |Ak | + |Ak+1 |. The first equality follows from associativity of unions. The second follows from the Addition Principle (Check that A1 ∪ A2 ∪ · · · ∪ Ak and Ak+1 are disjoint). The inductive hypothesis gives the last.  36. Given disjoint subsets A1 , . . . , Ak of a finite universal set U, |A1 c ∩ A2 c ∩ · · · ∩ Ak c | = |U| − |A1 | − |A2 | − · · · − |Ak |. c Proof. |A1 c ∩ A2 c ∩ · · · ∩ Ak c | = |(A1 ∪ A2 ∪ · · · ∪ Ak ) | = |U| − |A1 ∪ A2 ∪ · · · ∪ Ak | = |U| − (|A1 | + |A2 | + · · · + |Ak |). 

4.6. CHAPTER 6 5 2



37. 5 +

477

= 15. 45. 5 + 1 = 6.

38.

65 2

= 3888. 46. 15. 5 2



39. 1 + 5 + (5 + 5 3

40.



2

·5 +

5 4



41. 6

5 4

 5 1

· 5 + 1 = 276.

· 54 = 6250.

43. P (6, 5) + 6 5 2

47. 2(1 + 5) = 12.

· 5 + 6 = 156.

42. 55 +

44.



) = 21.

 3 2

 5 2

·4+

5 2

P (5, 3) = 4320.



+

5 3



= 140.

5 2

48. 6



= 60.

49.

6 2

= 15.

50.

6 2

+ 6 · 5 + 6 = 51.

51.

6 4



+6

5 2

= 75.

5 2



6 2

+ 6 · 5 + 6 = 111.

 

52. 6

+





Section 6.4 1. (a)

250 1000

2. (a)

1 38 .

3.

6 36

= .25. (b) (b)

18 38

=

119+63 1000

9 19 .

= .182.

4.

1 6.

5.

10 36

=

6.

16 36

= 49 .

= 16 .

5 18 .

7. (a) {T T T, T T H, T HT, T HH, HT T, HT H, HHT, HHH}. These are equivalent to binary sequences of length 3. (b) 48 = 12 . 8. (a) {T T T T, T T T H, T T HT, T T HH, T HT T, T HT H, T HHT, T HHH, HT T T, 6 HT T H, HT HT, HT HH, HHT T, HHT H, HHHT, HHHH}. (b) 16 = 83 . 9. (a) {00, 01, 02, 03, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33}. This is equiva6 = 83 . lent to {0, 1, 2, 3} × {0, 1, 2, 3}. (b) 16 10. (a) {aaa, aab, aac, aba, abb, abc, aca, acb, acc, baa, bab, bac, bba, bbb, bbc, bca, bcb, 2 bcc, caa, cab, cac, cba, cbb, cbc, cca, ccb, ccc}. (b) 18 27 = 3 . 11.

4·3! 63

= 19 .

14.

6·3·5 63

12.

6 63

1 36 .

15.

30 (20 5 )( 7 ) = 50 (12)

24279264 93384347

13.

6·5·4 63

≈ .2600.

16.

30 (20 8 )( 4 ) = 50 (12)

757727 26681242

≈ .0284.

=

=

5 9.

=

5 12 .

478

CHAPTER 4. ANSWERS TO ALL EXERCISES

30 (30 (20 12) 12)+(12) 1332603 ≈ .0007. (b) No. It is 20 = 1867686940 ≈ 687 times more 50 (12) (12) 1332603 likely. (c) 1 − 1867686940 = 1866354337 1867686940 ≈ .9993.

17. (a)

30 P12 (20i )(12−i P12 (30)( 20 ) ) 239666 9133869 ≈ .1258. (b) i=7 i 5012−i = 13340621 ≈ = 1905803 50 i=7 (12) (12) .6847. (c) It is additionally possible to have the same number of women as men.

18. (a)

19. 20.

8·7 18·17 2(26 2) 52 2

( )

28 153 .

=

24. 25 51 .

= 8 2

21.

1+8+( 28

)

22.

54 +4·53 64

= =

(10 5)

37 256 . 125 144 .

(26 5) = (52 5) (26 6)

253 9996

1 720 .

25.

P (26,6)

26.

26(62)P (25,4) 266

=

34 +(42)34 +34 64

= 12 .

23. (a) 210 = ≈ .2461. (b) Bet 27. against it, since it happens only about 28. one fourth of the time. 63 256

134

(52 4)

=

=

≈ .025.

2197 20825

284625 742586

≈ .383.

≈ .105.

29. Probability Complement Principle: If E is an event in a sample space S, then P (E) = 1 − P (E c ). We assume: The outcomes in S are equally likely. c |S|−|E c | | c = 1 − |E Proof. P (E) = |E| |S| = |S| |S| = 1 − P (E ).  | 30. Proof. P (E ∪ F ) = |E∪F |S| = P (E) + P (F ) − P (E ∩ F ). 

31.

3·8! 9!

32.

4·5+5·4 81

|E|+|F |−|E∩F | |S|

=

|E| |S|

+

|F | |S|



|E∩F | |S|

=

= 31 . =

40 81 .

33. There are 365n possible birthday values for n people. The complementary event is that no two people have the same birthday, and there are 365 · 364 · · · · · (365 − n + 1) = P (365, n) possible outcomes of that type. If we let p(n) be the probability that at least two of n people have the same birthday, then p(n) = 1 − P (365,n) 365n . (a) p(15) ≈ .253. (b) p(30) ≈ .706. (c) n = 23, since p(22) ≈ .476 and p(23) ≈ .507. 34. (a) 1/3. (b) 2/3. (c) Switching is wiser.

4.6. CHAPTER 6

3 36

35.

6 36

36.

8+8·5·7 85

+

37. 1 −

32 52



1 36

479

= 29 .

=

9 1024

=

16 25 .

≈ .0088.

38.

52 102

39.

1 2

40.

65 +65 −25 105

+

= 14 . 1 3



1 6

= 32 .

=

97 625 .

41. Proof. The assertion is certainly true for k = 1 die. So assume k ≥ 1 and the assertion is true for k dice. Suppose we have k + 1 dice, and pretend that one is red and the remaining k are green. The red die is equally likely to come up even or odd. By our induction hypothesis, the sum of the green dice is equally likely to be even or odd. The total sum is even if and only if either the red die is even and the green sum is even or the red die is odd and the green sum is odd. Hence, the probability that the total sum is even is 21 · 12 + 12 · 12 = 12 · 12 .  42. Yes, since {1, 2, 3, 4, 5, 6} splits evenly {3, 6}, {1, 4}, {2, 5} among the congruence classes modulo 3. 43. 44.

1

1

(26 2)

1 575757 .

=

(39 5) 2

=

1 105625 .

36 36 (36 5 )5+5( 4 )5+( 5 ) 253937 = 1498796 ≈ .1694. 41 6 (5) 27 5 (27)+5(27 (53)(27 4 )+(2)( 3 ) 2 )+5·27+1 1823 =1− 5 = 100688 ≈ .0181. 32 32 (5) (5) 70 5 70 14((70 5 )+5( 4 )+(2)( 3 )) 2933734 (a) 1 − = 43148475 ≈ .068. 15(75 5) 70 (5) 2017169 ≈ .0467. = 43148475 15(75 5) 54 5 54 34((54 5 )+5( 4 )+(2)( 3 )) 78602 1 (a) 1 − = 2503193 ≈ .0314. (b) 59 = 35(59 (5) 5)

45. 1 − 46. 47. (b) 48. 49. 50.

53.

3·4! 64

(42) 64

7 27 .

=

1 18 .

=

1 63

=

6(42)·5·4 64

= 59 .

52.

6+4·6·5 64

=

1 216 .

7 72 .

 4 4 · 53 7 54 2 = . 2(1 − 4 − 4 ) − 4 6 6 6 27 | |{z} {z } at least 2 sixes

or

51.

2 of each

      4 4 4 7 2 2( · 5 + |{z} 1 ) + (2 ·5 − )= . 3 2 2 27 | {z } 4 sixes | {z } 3 sixes

2 fives or 2 sixes

1 5006386 .

480

CHAPTER 4. ANSWERS TO ALL EXERCISES

54. 1 −

P (6,4) 64

55.

1 4 3 4

56.

3 63 62 63

=

57.

4 16 10 16

= 25 .

58.

4 14 7 14

= 47 .

=

13 18 .

= 13 . 1 12 .

3 59. (a) Yes. P (E ∩ F1 ) = 52 = P (E) · P (F1 ), since P (E) = 14 , P (F1 ) = 1 (b) No. P (E ∩ F2 ) = 4 6= P (E) · P (F2 ), since P (F2 ) = 12 .

3 13 .

7 60. (a) No. P (E) = 13 , P (F1 ) = 29 , and P (E ∩ F1 ) = 99 6= P (E) · P (F1 ). 2 2 1 2 (b) Yes. P (F2 ) = 3 and P (E ∩ F2 ) = 9 = 3 · 3 = P (E) · P (F2 ).

61. Sketch. (→) Suppose E and F are independent. So P (E | F ) = P (E)P (F ) P (F )

P (E∩F ) P (F )

=

= P (E). Similarly, P (F | E) = P (F ). (←) Suppose P (E | F ) = P (E). So P (E ∩ F ) = P (E | F )P (F ) = P (E)P (F ).  Note Definitions 6.5 and 6.6. 62. Suppose E ∩ F = ∅ and P (E) and P (F ) are positive. Then, P (E)P (F ) 6= 0 = P (E ∩ F ). 63. (a) 26%, since p = (.1)(.5) + (.3)(.4) + (.9)(.1) = .26. 6 (b) (.3)(.4) = 13 ≈ .4615. .26 64. (a) .325(.15) + .285(.85) = .291. (b) 65.

(.95)(.8) (.95)(.8)+(.1)(.2)

66.

(.06)(.96) (.06)(.96)+(.9)(.04)

=

38 39

.285(.85) .291

≈ .832.

≈ .974.

≈ .615. So, 61.5%.

67. (a) 4(.5) + 3(.3) + 2(.1) + 1(.05) + 0(.05) = 3.15 stars. (b) .4(.5) + .2(.3) + .5(.1) + .8(.05) + .9(.05) = 0.395. (c) We use Bayes’ Formula. Number of Stars Probability of Ranking on Website .4(.5) 40 4 .395 = 79 .2(.3) 12 3 .395 = 79 .5(.1) 10 2 .395 = 79 .8(.05) 8 1 .395 = 79 .9(.05) 9 0 .395 = 79 40 12 10 8 9 (d) 4( 79 ) + 3( 79 ) + 2( 79 ) + 1( 79 ) + 0( 79 ) = 224 79 ≈ 2.84 stars.

4.6. CHAPTER 6

481

68. (a) 5(.7) + 4(.12) + 3(.09) + 2(.03) + 1(.06) = 4.37 stars. (b) .16(.7) + .10(.12) + .38(.09) + .85(.03) + .92(.06) = 0.2389. So 23.89% (c) We use Bayes’ Formula. Number of Stars Percentage of Submissions 5 46.88% 4 5.02% 3 14.32% 2 10.67% 1 23.11% (d) 3.42 stars. 69. Bayes’ Formula: If S = F1 ∪ · · · ∪ Fn is a disjoint union, then P (E | Fk )P (Fk ) P (Fk | E) = Pn . i=1 P (E | Fi )P (Fi ) Proof. P (Fk | E) =

P (Fk ∩E) P (E)

=

P (E|Fk )P (Fk ) P (E)

PnP (E|Fk )P (Fk ) . i=1 P (E|Fi )P (Fi )

=



70. P (E) + P (F ) − P (E ∩ F ) = P (E ∪ F ) ≤ 1 is equivalent.

Section 6.5 1.

 4 4 2

= 1296.

10.

2.

10 6

= 210.

3.

10 6

1 , 14 , 38 , 14 , 11. (a) 16 1 (b) p = 8 .

= 210.

4.

  4 6

5.

  7 3 4

2

6.

7 3

= 35.

7.

4 3

1

8.

 4

9.

4 3

 

3



12. 3

3

4 3



n−m k−j





= 31. 1 16 .

.

13 5



13. 4 ·

− 40 = 5108.

= 105. 14. 13 · 48 = 624.

2

[1 +

 6



= 80.

 3 3

3

7 3

+

15. 13 ·

4 3

· 12 ·

16. 13 ·

4 3

·



4 2



= 3744.

= 36.

  3 3 2

1 7 4



12 2



· 42 = 54912.

+ 1] = 44. 17. 10 · 25 − 10 · 2 = 300.

 3 2

− 36 = 149. 18. 4[

13 5





     52 4 12 19. ( − 1302540) − 9 · 43 = 536100. 5 2 3 | {z } | {z } something

at best a pair of tens

8 5



] − 5 · 4 = 4904.

482

CHAPTER 4. ANSWERS TO ALL EXERCISES

20. (40 + 624 + 3744 + 5108 + 10200) − (6 · 45 − 6 · 4) = 13596. Exercise 21 24 26 23 22 27 25 28

Hand Straight-Flush Four of a Kind Full House Flush Straight Three of a Kind Two Pairs One Pair Nothing Total

Number Possible 1280 87360 244608 261840 326400 3075072 5374512 40909440 41682008 91962520

Probability (to 8 places) .00001392 .00094995 .00265987 .00284725 .00354927 .03343832 .05844242 .44484905 .45324995 1

Table 4.1: Likelihood of Poker Hands from 5 cards using two decks

21. N = 10 · 4 · 25 = 1280 and p ≈ .00001392. 22. N = 10 · 85 − 1280 = 326400 and p ≈ .00354927. 23. N = 4

26 5





1280 |{z }

= 261840 and p ≈ .00284725.

See Exercise 21

24. N = 13

8 4

26. N = 13

8 3

· 12

27. N = 13

8 3

12 2

· 82 = 3075072 and p ≈ .03343832.

28. N = 13

8 2

12 3

· 83 − 13 · 4



· 96 = 87360 and p ≈ .00094995.     13 13 8 2 25. N = 2 2 · 88 − · 4 · 11 · 2 = 5374512 and p ≈ .05844242. 2 | {z } Two Pair Flush

 



29.

10+3−1 10

30.

 20+5−1

31.

 12+4−1



8 2







=

12 10

=

 24

=

 15



= 244608 and p ≈ .00265987.

12 3



· 23 = 40909440 and p ≈ .44484905.

= 66. 33.

8+3−1 8

=

10 8

= 45.

34.

8+5−1 8

=

12 8

= 495.

35.

4+6−1 4

=

9 4

32. Consider the distribution of what  was taken. 14+3−1 = 120. 36. 14

4+3−1 4

= 15.

20

12

20

12





= 10626. 



= 455.  



= 126.

4.6. CHAPTER 6

483

  37. (a) 8+4−1 = 11 8 8 = 165. (b) No. 1 penny, 3 nickels, and 4 dimes is worth the same as 6 pennies and 2 quarters.  38. (a) 100+3−1 = 5049. (b) A runoff occurs when the top two tie and the 100 number of votes going to the third place candidate is some even number from 0 to 32. Since there are 3 possible third place candidates, there are 3 · 17 = 51 possible tallies warranting a runoff. 39.

(32)(21)(41)+(31)(22)(41)+(31)(21)(42) = (94)

72 126

=

4 7

or 1 −

(54)+(74)+(64)−(44) = 74 . (94)

2

(42)(13 2) 2808 = 20825 ≈ .135. (52 4)  = 252. 41. 5+6−1 5 40.

42.

6+10−1 6



Exercise 45 43 44 46 49 47 48 51 50

=

15 6



= 5005.

Hand Straight-Flush Four of a Kind Full House Flush Straight Three of a Kind Two Pairs One Pair Nothing Total

Number Possible 41584 224848 3473184 4047644 6180020 6461620 31433400 58627800 23294460 133784560

Probability (to 8 places) .00031083 .00168067 .02596102 .03025494 .04619382 .04829870 .23495536 .43822546 .17411920 1

Table 4.2: Likelihood of Poker Hands from 7 cards 43. N = 13

48 3



= 224848 and p ≈ .00168067.

  44. N = 13 43 · 12 42 p ≈ .02596102.

11 2

· 42 +

45.

4[

47 2

N =

9· |{z}





 42

13 2



non-Ace high

3

46 |{z}

· 11 · 4 + 13

] + |{z} 4

not new high

4 3



 4 2

12 2

47 2



2

= 3473184 and

= 41584 and p ≈

Ace high

.00031083. 13 7



13 6



+

· 39 +

13 5



39 2



] − 41584 = 4047644 and p ≈ .03025494.           4 13 3 3 4 4 + 4 · 5 − 10 · 4 · 5 ] = 6461620 47. N = 13 43 12 ·4 −[10 · 5 · 4 4 5 2 2 3 {z } | {z } | {z } | 46. N = 4[

straight

and p ≈ .04829870.

flush

both

484

CHAPTER 4. ANSWERS TO ALL EXERCISES

48. N =

  3   2   13 4 13 4 11 · 10 · 4 + · 43 3 2 2 2 3 | {z } | {z } 3-pair

2-pair

       2 13 5 5 5 4 · 43 + 4 · 32 − 10 · 4 · 32 ] −[10 5 2 2 2 2 | {z } | {z } | {z } straight

flush

both

= 31433400 and p ≈ .23495536.    + 9 72 )(47 − 75 · 4 · 32 − 76 · 4 · 3 − 4)+   2 2  2 6(8 + 7 · 9)(45 42 − 42 · 2 · 5 · 3 − 42 − 42 ) + 10 52 (43 42 − 4 · 32 )+   5 · 10(44 43 − 4 32 ) = 6180020 and p ≈ .04619382.

49. N = (

8 2



 50. N = ( 13 7 − p ≈ .17411920.

8 2



−9

7 2



)(47 − 4

7 5



  5 4 51. N = (6 13 6 − 6(8 + 7 · 9))(4 2 − p ≈ .43822546.

32 − 4 4 2



7 6



3 − 4) = 23294460 and

·2·5·3−

 4 2 2



 4 2 2 )

= 58627800 and

52. Perhaps One Pair should be considered less valuable than Nothing. The same for Two Pairs. 53. Consider each of the 44 remaining cards. P (A wins) ≈ .3864 and P (B wins) ≈ .6136. 54. Consider each of the 44 remaining cards. P (A wins) ≈ .2045 and P (B wins) ≈ .7955. 55. If at least one more 2 is drawn, then player B wins. If no more 2’s are drawn, then Player 2 wins iff no more K’s or 7’s are drawn. P (A wins) ≈ .2828 and P (B wins) ≈ .7172. 56. Player 2 wins iff no A’s are drawn and either a K or a Q is drawn. P (A wins) ≈ .7101 and P (B wins) ≈ .2899. 57. An exhaustive analysis using software gives P (A wins) ≈ .4754, P (B wins) ≈ .5211, and P (tie) ≈ .0035. 58. An exhaustive analysis using software gives P (A wins) ≈ .1151, P (B wins) ≈ .8723, and P (tie) ≈ .0126.

Section 6.6

4.6. CHAPTER 6

485

1. (a) 40! 40 = 39! (b) 39! . 2

13.

5! 2·3

= 20. = 504.

2.

6! 6·2

= 60.

14.

7! 2·5

3.

4! 4·2

= 3.

15.

6! 4

= 180.

4.

P (10,6) 6

16.

6! 5

= 144.

= 25200.

5. (a) 8! 8 = 5040. (b) 2 · 6! = 1440. (c) 6! = 720.

17.

(63)

18.

(42)

= 10.

2

= 3.

2

20 5

7. 8.

P (14,8) 8·2

(62)4!

9. 5 ·

4! 4

= 30 or

20.

10.

4! 12

11.

20! 20·3

12.

14! 24

6! 24

21.

= 30.

22.

= 2. =

19! 3 .

23. 24.

= 3632428800.

3-person scrambles



10 5

 5

4! {z

|

teams

5

· |{z} 3 }

=

games

1466593128.

= 7567560.

= 30.

6·2

15 5



13! 6. (a) 12! 12 = 39916900. (b) 13 = 19. 14! 479001600. (c) 14·2 = 3113510400.

4 8 (12 4 )(4)(4)

3!

= 5775,

5 10 15 (21 6 )( 5 )( 5 )(5)

3!

= 6844101264.

12 10 8 6 3 (14 2 )( 2 )( 2 )(2)(3)(3)

4!2! 14 12 2 (16 2 )( 2 )( 2 )···(2)

8! 13 8 4 (18 5 )( 5 )(4)(4)

2·2

= 3153150.

= 2027025.

= 192972780.

2-person scrambles

}|  { z 20 18}|  { 23 2 20 18 2 · · · · · · (50)(47)···(23 3 2 3 )( 2 )( 2 )···(2) · 2 2 = 3 3 . 25. 3 2 (10!) 10! 10! (30)(25)(20)(15)(10)(5) (6)(4)(2) 26. 5 5 5 6! 5 5 5 · 2 3!2 2 = 1850680126245590640. z  50

27. 28. 29.

47 3

6 5! 5! 54 5! (60 6 ) 2 ( 6 ) 2 ·····(6) 2

10! 10 5 15 (20 5 )( 5 )( 5 )(5)

4! 9! 4

=

54 6 5! 10 (60 6 )( 6 )···(6)( 2 )

10!

.

5! 4 ( 5·2 ) = 10137091700736.

= 90720. 32.

30.

10! 5·2

12 3

 9 6 3 3

3

3

= 369600.

= 362880. 33. 60 + 40 + 50 + 40 − 3(20) = 130.

22 2 (24 2 )( 2 )···(2)

= 31. 12 12623055048283680000.

34. 60+40+50+40−10−12−8 = 160.

486

CHAPTER 4. ANSWERS TO ALL EXERCISES

35. 20 + 10 + 30 + 20 − 6 − 10 = 64.

38.

36. 30 + 20 + 50 − 2(15) = 70.

39.

6! 2!3!

= 60.

(62)(42)(22)

= 30.

3

40.

6! 2!2!2

1. 9! = 362880.

1 2 (n

+ 1) hours.

2. 35 82 = 15552.

5. b 1000 7 c=

3. 262 10 · 9 · 8 = 486720.

6.

4. 13 hours. In general, n loads take

7. 26 · 25 · 24 · 23 · 22 = 7893600.

37.

6! 6

= 120.

= 90.

Review

3999 3



994 7

201 3

= 142.

+ 1 = 1267.

8. 4(365) + 1 + 8 + 31 + 31 + 29 + 31 + 30 + 31 + 5 = 1657. 9. 6! = 720. 10. (a) 100 · 99 · 98 = 970200. (b) 100 · 98 · 96 = 940800. 11.

6 1



20 4



22 5



= 765529380.

12. {a, b}, {a, c}, {a, d}, {a, e}, {a, f }, {b, c}, {b, d}, {b, e}, {b, f }, {c, d}, {c, e}, {c, f }, {d, e}, {d, f }, {e, f }. 21. 13

13. P (14, 4) = 24024. 14.

6 3

 4

15.

26 2



13 2



+

= 403.

16. 28 − [1 + 8 + 17.

5 2

 7

8

3

22.

= 120.

2

+ 8

3 2

8 2

 9 3



12 · 4 + 13 = 2509.

=

1 18 .



(50 12) 2900135 = 254154182 ≈ .0114. So, (70 12) approximately yes.

23. p =

] = 219.



2 36

4 3

5 2

 3 2

· 4 = 482.

8

18. 3 + 3 − 2 = 12866. 19. 101 + 72 − 14 = 159. 20. 10000 − (5000 + 2000 − 1000) = 4000.

24. 1 −

1+6+(62) 26

=

21 32 .

4(13 4)

44 = 4165 . (52 4) (5)+(5)+(5) 26. 3 245 5 = 12 .

25.

27. 28.

6 8 (10 3 )(3)(3) = 24 (9)

1

(53 6)

=

8400 81719

1 22957480 .

≈ .10.

4.6. CHAPTER 6

487

38 (38 (5)·(38)+(53)(38 5 )+5( 4 ) 2 )+5·38+1 4361 ≈ .0951. = 2 3 = 45838 43 (5) (43 5) 4 3·( ) 2 (52 2) 3 30. (a) 12 = 11 . (2) 52 (2) 13·(4) (12 3·(4) 2) (b) No. P (E) · P (F ) = 522 · 52 6= 522 = P (E ∩ F ). (2) (2) (2)

29. 1 −

31. (a) 83%, since p = (.7)(.2) + (.8)(.3) + (.9)(.5) = .83. (b) (.9)(.5) = 45 .83 83 ≈ .5422. 10 6



32. No. There are 33.

4 2

 6

34.

4 3

 6

37.

= 90.

4



4 4

 6

+

3

13 5

= 210 routes and 5 · 48 = 240 days.

2

4 2

 6

36.

13 2

4

= 90.

= 95.

· 45 − 10 · 45 −

13 5



 4 4 3

2

= 1872.

· 4 + 40 = 1302540.

Hand Straight-Flush Four of a Kind Full House Flush Straight Three of a Kind Two Pairs One Pair Nothing Total

Exercise 42 38 41 43 44 39 40 45 46

35.

Number Possible 1844 14664 165984 205792 365772 732160 2532816 9730740 6608748 20358520

Probability (to 8 places) .00009058 .00071931 .00815305 .01010897 .01796653 .03596332 .12441062 .47796893 .32461927 1

Table 4.3: Likelihood of Poker Hands from 6 cards 38. 13

48 2

39. 13

4 3

40.



= 14664. 12 3





 43

13 3

2

41. 13

4 3

42.

9· |{z}



43 = 732160.  42

13 2

+

· 12

4 2

non-Ace high



2

11 2



· 11 · 4 +

· 42 = 2532816. The first summand counts three pair.  42

13 2

3

= 165984.

4 · 46 + |{z} 1· 4 · 47 = 1844 or 10 · 4 · 47 − Ace high

9·4 |{z}

6-card straight

= 1844.

488

CHAPTER 4. ANSWERS TO ALL EXERCISES

13 5

 · 39 + 4 13 6 − 1844 = 205792.   4 44. 10 · 5 · 44 + 9 · 45 · 7 · 4 + 1 · 45 · 8 · 4 −1844 = 365772. | {z } 2 {z } | non-pair 

43. 4

pair

45. 13

4 2



12 4



· 44 − 10 · 5 · 44

4 2



−4

13 5



· 5 · 3 + 40 · 5 · 3 = 9730740.

46.6608748. See Exercises 38 through 45 and Table 4.3. 52 6 −[1844+14664+165984+205792+365772+732160+2532816+9730740] = 6608748. 47. 236 495 ≈ .4768. Daniel wins under any of the following conditions on his down cards: a King, a Queen, a Jack, a 10, two Aces, two 9’s, two 2’s, or a 2 and a 9.   32 [ 45 169 2 − 2 ]+3+1+3+3·2  = P (Daniel wins) = ≈ .5121. 45 330 2   48. 100+5−1 = 104 100 100 = 4598126.  59. 28 + 8 · 27 + 82 · 26 = 3072. 26+5−1 ( 5 ) 5481 49. = 456976 ≈ .0120. 265 60. 36!. What matters is a number’s position relative to 0 on the wheel. 50. (a) 20! = 19!. (b) 20. In each case, 20 the first spin determines the way.  (c) P (40 or more) = 13 61. 10 20 . 5 = 252. 51. 52. 53.

8! 24 22 11

= 1680.

( ) 2 24 8

62. (769 + 588 − 45) − (76 + 58 − 4) = 1182.

= 352716. 16 8

8 4

4 4

( )( )( )( ) 2·2

63. = 165646455975.

(82)(62)(42)(22) 4

= 630.

10 5

58. 729 −



= 252. (b)

729 3

= 486.

210 −252 2

2(26 3)

4 = 17 . (52 3) 4 13( ) 1 . (b) 523 = 425 (3)

65. (a)

56. (a) P (20, 4) =  116280. (b) P (20, 3) · 17 3 = 4651200. 57. (a)

905 3876 .

64. 12 . Odd and even sums are equally likely. See Exercise 41 from Section 6.4.

54. 30 + 40 + 25 − 3(10) = 65. 55.

(82)(62)+8·6·(52)+5 = (19 4)

= 386.

66. 69729 1059380

39 11 11 13 (11 3 )( 2 )+( 4 )39+( 5 )+3( 5 ) (50 ) 5 ≈ .0658.

=

4.7. CHAPTER 7

4.7

489

Chapter 7

Section 7.1 1. 3 · 25 − 3 = 93. 2.

13 12 6 5 7 (11 4 )+( 4 )+( 4 )−(4)−(4)−(4) = 18 (4)

33 68 .

3. Let Abar contain those missing a specified type of candy bar. c c c |Asnickers ∩ ∩A | =   Amounds   butterfingers   24 18 14 16 6 10 8 5 − [ 5 + 5 + 5 ] + [ 5 + 5 + 5 ] = 27880. 4 2



4. 46 − 4 · 36 +

· 26 − 4 = 1560.

5. Let Afruit contain those missing a certain  type  of fruit.  15 13 6 |Abanana ∪ Aapple ∪ Aorange | = [ 16 + + 6 6 6 ]−[ 6 + 6. (a) 7. (a) 8.

23 6





15 6



18 6



=

2536 4096





4·36 −(42)·26 +(43) 46

13 6



40 44 48 (52 5 )−3·( 5 )+3·( 5 )−( 5 ) = 52 (5)

=

+

10 6

317 512

≈ .62. (b)

1293 54145



+

8 6





=

9 6



+

(18 6) = (23 6)

= 75900. (b) 1+6·2+(62) 46

7 6

7 1024

] = 14637.

884 4807

≈ .184.

≈ .0068.

≈ .024.

9. Let Asuit contain those missing a specified suit. 4 26 4 13 (52)−4(39 |A♣ c ∩A♦ c ∩A♥ c ∩A♠ c | 7 )+(2)( 7 )−(3)( 7 ) 63713 = 7 = 111860 ≈ .5696. 52 52 (7) (7) 10.

4 26 13 4·(39 5 )−(2)( 5 )+4·( 5 )

=

(52 5)

6133 8330

≈ .736.

11. Let Acoin contain those missing a specified coin type. |Aquarter ∪Adime ∪Anickel ∪Apenny | = (27 5) 19 22 23 17 14 15 12 13 8 5 10 [( 5 )+( 5 )+( 5 )+( 5 )]−[( 5 )+( 5 )+(95)+(18 5 )+( 5 )+( 5 )]+[(5)+(5)+( 5 )] = 27 (5) 271 351 ≈ .7721. 12.

4·37 −(42)·26 +4 47

=

523 1024

≈ .511.

300 300 300 300 300 300 13. 300−( 300 2 + 3 + 5 ) +( 2·3 + 2·5 + 3·5 )− 2·3·5 = 300−310 +100 −10 = 80.

14. 616 −

616 2



616 7



616 11

+

616 2·7

+

616 2·11

+

616 7·11

1100 1100 1100 15. 1100 − ( 1100 2 + 5 + 11 ) + ( 2·5 + 1100 − 870 + 180 − 10 = 400.

16. 7000 −

7000 2



7000 5



7000 7

+

7000 2·5

+



1100 2·11

7000 2·7

+

616 2·7·11

+

= 240.

1100 5·11 )

7000 5·7





1100 2·5·11

7000 2·5·7

=

= 2400.

490

CHAPTER 4. ANSWERS TO ALL EXERCISES

2100 2100 2100 2100 2100 17. 2100 − ( 2100 2 + 3 + 5 + 7 ) + ( 2·3 + 2·5 + 2100 2100 2100 2100 2100 2100 5·7 ) − ( 2·3·5 + 2·3·7 + 2·5·7 + 3·5·7 ) + 2·3·5·7 = 480.

2100 2·7

+

2100 3·5

+

2100 3·7

+

2100 2100 2100 2100 18. φ(2100) = 2100 − 2100 2 − 3 − 5 − 7 + 6 + 2100 2100 2100 2100 2100 2100 2100 21 + 35 − 30 − 42 − 70 − 105 + 210 = 480 and 2100(1 − 12 )(1 − 13 )(1 − 51 )(1 − 17 ) = 480.

2100 10

+

2100 14

+

2100 15

+

19. Proof. Write n as a product of powers of primes pk11 · · · pkmm . So φ(n)

φ(pk11 )φ(pk22 ) · · · φ(pkmm ) by (7.2) 1 1 1 = pk11 (1 − )pk22 (1 − ) · · · pkmm (1 − ) by (7.1) p1 p2 pm 1 1 1 ) by commutativity = pk11 pk22 · · · pkmm (1 − )(1 − ) · · · (1 − p1 p2 pm Y = n (1 − p1 ) by substitution =

p|n

That is, (7.3) holds.  20. Proof. Among the pk integers in S = {1, 2, . . . , pk }, only the pk−1 integers {p, 2p, 3p, . . . , pk−1 p} have a factor in common with pk . So pp −pk−1 = pk (1− p1 ) of the integers in S are relatively prime to pk .  21. Proof. Let p and q be the only prime divisors of n. n n 1 So φ(n) = n−( np + nq )+ pq = n− np − nq + pq = n(1− p1 − 1q + pq ) = n(1− p1 )(1− 1q ).  That is, let Ap contain the numbers in {1, 2, . . . , n} that are divisible by p, and define Aq similarly. So φ(n) = |Ap c ∩ Aq c |. 22. Proof. Let p, q, r be the three prime divisors of n. n n n n 1 1 1 1 + pr + qr − pqr = n(1− p1 − 1q − 1r + pq + pr + qr − pqr )= So φ(n) = n− np − nq − nr + pq 1 1 1 n(1 − p )(1 − q )(1 − r ).  23. 10500 − (5250 + 3500 + 2100) + (1750 + 1050 + 700) − 350 = 2800. 24. (a) 26. (b) 26 + 4 = 30. Of course, {2, 3, 5, 7} = 4. 10000 10000 10000 10000 10000 10000 10000 25. (b 10000 3 c+b 13 c+b 23 c+b 43 c)−(b 3·13 c+b 3·23 c+b 3·43 c+b 13·23 c+ 10000 10000 10000 10000 10000 10000 10000 b 13·43 c + b 23·43 c) + (b 3·13·23 c + b 3·13·43 c + b 3·23·43 c + b 13·23·43 c) − b 3·13·23·43 c = 4768−537+19−0 = 4250. 2222 2222 2222 2222 2222 2222 2222 2222 26. b 2222 7 c + 11 + b 17 c + b 31 c − b 7·11 c − b 7·17 c − b 7·31 c − b 11·17 c − b 11·31 c − 2222 2222 b 17·31 c + b 7·11·17 c = 644.

27.

53 144

= .3680¯ 5 agrees with

1 e

to 2 decimal places.

4.7. CHAPTER 7

491

1 1 1 1 − 1 + 12 − 16 + 24 − 120 + 720 = places.

53 144

= .3680¯5, which agrees with

1 e

to 2 decimal

28. S = {1234, 1243, 1324, 1342, 1423, 1432, 2134, 2143, 2314, 2341, 2413, 2431, 3124, 3142, 3214, 3241, 3412, 3421, 4123, 4132, 4213, 4231, 4312, 4321}, 9 = 83 . E = {2143, 2341, 2413, 3142, 3412, 3421, 4123, 4312, 4321}, P (E) = 24 11 30

29. (a) 1 −

=

19 30

≈ .633. (b)

1 5!

=

1 120 .

(c)

(53)+1 120

=

11 120 .

(6)·2 1 53 . (b) 36! = 18 . (c) Let n be the number who select themselves. 30. (a) 144 n = 1 person cannot re-select. n = 2 could only switch names, and they would know it. n = 3 would mean the other 3 are permuted in one of two ways, and each can tell which way by his or her own selection. n = 4 would mean the other 2 knew they switched. n = 5 is impossible. n = 6 is obvious. 31. .36787944. See the paragraph following Example 7.3. 32. 1 −

1 e

≈ .63212056.

Pn 33. Corollary: |A1 c ∩ A2 c ∩ · · · ∩ An c | = i=0 (−1)i Si . c c c c |A1 ∩P A2 ∩ · · · ∩ An | = |(A1 ∪PA2 ∪ · · · ∪ An ) P | = |U| − |A1 ∪ A2 ∪ · · · ∪ An | = n n n |U| − i=1 (−1)i−1 Si = |S0 | + i=1 (−1)i Si = i=0 (−1)i Si . 34. |A1 ∪ A2 ∪ A3 | = |(A1 ∪ A2 ) ∪ A3 | = |A1 ∪ A2 | + |A3 | − |(A1 ∪ A2 ) ∩ A3 | = |A1 | + |A2 | − |A1 ∩ A2 | + |A3 | − |(A1 ∩ A3 ) ∪ (A2 ∩ A3 )| = |A1 | + |A2 | + |A3 | − (|A1 ∩ A2 | + |A1 ∩ A3 | + |A2 ∩ A3 |) + |A1 ∩ A2 ∩ A3 | = S1 − S2 + S3 . 35. |A1 ∩A2 ∩A3 |+|A1 ∩A2 ∩A4 |+|A1 ∩A2 ∩A5 |+|A1 ∩A3 ∩A4 |+|A1 ∩A3 ∩A5 |+ |A1 ∩ A4 ∩ A5 | + |A2 ∩ A3 ∩ A4 | + |A2 ∩ A3 ∩ A5 | + |A2 ∩ A4 ∩ A5 | + |A3 ∩ A4 ∩ A5 |. 36. |A1 ∩ A2 | + |A1 ∩ A3 | + |A1 ∩ A4 | + |A1 ∩ A5 | + |A1 ∩ A6 | + |A2 ∩ A3 | +|A2 ∩ A4 | + |A2 ∩ A5 | + |A2 ∩ A6 | + |A3 ∩ A4 | + |A3 ∩ A5 | + |A3 ∩ A6 | +|A4 ∩ A5 | + |A4 ∩ A6 | + |A5 ∩ A6 |. 37. |A1 ∩ A2 ∩ A3 | = |U| − (|A1 c | + |A2 c | + |A3 c |)+ (|A1 c ∩ A2 c | + |A1 c ∩ A3 c | + |A2 c ∩ A3 c |) − |A1 c ∩ A2 c ∩ A3 c |. That is, we use the fact that A1 c c = Ai . 38. |U| − |A1 | − |A2 | − |A3 | + |A1 ∩ A2 | + |A1 ∩ A3 | + |A2 ∩ A3 | − |A1 ∩ A2 ∩ A3 |. 39. 510 − 5 · 410 + 35+4−1 35  27 35 − 4 24

40.  38

5 2



· 310 +

5 3



· 210 +

5 4



   − 4 24+4−1 + 42 13+4−1 − 24 13   5 + 6 16 − 4 = 56. 13 2



· 110 = 510 − 4662625 = 5103000. 4 3



2+4−1 2



=

492

CHAPTER 4. ANSWERS TO ALL EXERCISES

6n −6·5n +(62)·4n −(63)·3n +(64)·2n −(65) . 41. Let p(n) = 6n 5 38045 (a) p(6) = 324 ≈ .0153. (b) p(10) = 139968 ≈ .2718. (c) Use 13 dice. Note that p(12) ≈ .4378 and p(13) ≈ .5139.

42. (a)  Let  Ai contain the results in which child i gets a matching pair. |U| = 8 6 4 2 2 2 2 2 = 2520.         |A1 ∪ A2 ∪ A3 ∪ A4 | = 4[4 62 42 22 ] − 42 [4 · 3 · 42 22 ] + 43 [4 · 3 · 2 22 ] − 1 · 4! = 1440 − 432 + 96 − 24 = 1080. So p = 37 ≈ .4286. (b) Let Bi contain the results in which i gets his or her   child   own pair. |B1 ∪ B2 ∪ B3 ∪ B4 | = 4[ 62 42 22 ] − 42 [ 42 22 ] + 43 − 1 = 327. p = 109 840 ≈ .1298. 43. n4 − 4n3 + 6n2 − (3n + n2 ) = n4 − 4n3 + 5n2 − 2n = n(n − 1)2 (n − 2). 44. n5 − 5n4 + 10n3 − (n3 + 9n2 ) + (2n2 + 2n) − n = n5 − 5n4 + 9n3 − 7n2 + 2n = n(n − 1)3 (n − 2). 45. n5 − 6n4 + 15n3 − (n3 + 19n2 ) + (4n2 + 11n) − 6n + n = n5 − 6n4 + 14n3 − 15n2 + 6n = n(n − 1)(n − 2)(n2 − 3n + 3). 46. n4 −5n3 +10n2 −(2n2 +8n)+5n−n = n4 −5n3 +8n2 −4n = n(n−1)(n−2)2 .

Section 7.2 1.

7! 3!2!2!

= 210. 10.

2. 6930. 3.

15! 2!3!6!4!

= 6306300.

12.

4. 277200. 5.

12 4,3,5

= 27720.

6.

9 3,3,3

= 1680.

 

11.

16 (5,5,6 )

2

22 ) (5,5,6,6

22

15 7. (a) 5,3,4,3 = 12612600.   14 14 (b) 4,3,4,3 + 5,3,3,3 = 7567560.  14 (c) 4,3,4,3 = 4204200.

8. (a) 413 =  67108864.   13 13 13 (b) 13 4 3 3 3 = 16726464040. 13 (c) 4,3,3,3 = 1201200. 9.

12 (4,4,4 )

3!

= 5775.

= 37642556952.

40 (8,8,8,8,8 )

5!

.

( 16 ) 4 · 3 = 212837625. 13. (a) 4,4,4,4 4! 4 16 (b) 4,4,4,4 · 3 = 5108103000. 14. (a)



= 1009008.

30 ) (5,5,5,5,5,5

23

. (b)

30 (5,5,5,5,5,5 )

23 3!

.

 18 15. (a) 6,6,6 (5!)3 = 29640619008000. 18 ( ) 3 (b) 6,6,6 3! (5!) = 4940103168000. 18 ( ) (c) 6,6,6 = 2858856. 3! ( 20 ) 16. (a) 5,5,5,5 = 488864376. 4! 20 (b) 5,5,5,5 = 11732745024.  4 20 (c) 5,5,5,5 · 5 = 7332965640000.

4.7. CHAPTER 7

493

17. (0, 0, 3), (0, 1, 2), (1, 0, 2), (0, 2, 1), (1, 1, 1), (2, 0, 1), (0, 3, 0), (1, 2, 0), (2, 1, 0), (3, 0, 0). Note that there are 3+3−1 = 10 of them. See Remark 7.1. 3 18. (3, 0, 0, 0), (2, 1, 0, 0), (2, 0, 1, 0), (2, 0, 0, 1), (1, 2, 0, 0), (1, 0, 2, 0), (1, 0, 0, 2), (1, 1, 1, 0), (1, 1, 0, 1), (1, 0, 1, 1), (0, 3, 0, 0), (0, 2, 1, 0), (0, 2, 0, 1), (0, 1, 2, 0), (0, 1, 0, 2), (0, 1, 1, 1), (0, 0, 3, 0), (0, 0, 2, 1), (0, 0, 1, 2), (0, 0, 0, 3). 19. x2 − 2xy + 2xz + y 2 − 2yz P + z2.  2 The sum in (x + (−y) + z) = T k1 ,k22 ,k3 xk1 (−y)k2 z k3 is indexed over T = {(k1 , k2 , k3 ) : k1 , k2 , k3 ∈ N and k1 + k2 + k3 = 2} = {(2, 0, 0), (1, 1, 0), (1, 0, 1), (0, 2, 0), (0, 1, 1), (0, 0, 2)}. So (x+ (−y) + z)2 =   1  0 2 2 2 2 2 0 0 1 1 0 0 1 2 0 2,0,0 x (−y) z + 1,1,0 x (−y) z + 1,0,1 x (−y) z + 0,2,0 x (−y) z 2 2 + 0,1,1 x0 (−y)1 z 1 + 0,0,2 x0 (−y)0 z 2 = x2 − 2xy + 2xz + y 2 − 2yz + z 2 . 20. x3 + 3x2 y + 3x2 z + 3xy 2 + 6xyz + 3xz 2 + y 3 + 3y 2 z + 3yz 2 + z 3 . 21. x4 + 4x3 y + 4x3 + 6x2 y 2 + 12x2 y + 6x2 + 4xy 3 + 12xy 2 + 12xy + 4x + y 4 + 4y 3 + 6y 2 + 4y + 1.   P P The sum in (x + y + 1)4 = T k1 ,kn2 ,k3 xk1 y k2 1k3 = T k1 ,kn2 ,k3 xk1 y k2 is indexed over T = {(k1 , k2 , k3 ) : k1 , k2 , k3 ∈ N and k1 + k2 + k3 = 4} = {(4, 0, 0), (3, 1, 0), (0, 3, 1), (2, 2, 0), (2, 1, 1), (2, 0, 2), (1, 3, 0), (1, 2, 1), (1, 1, 2), (1, 0, 3), (0, 4, 0), (0, 3, 1), (0, 2, 2), (0, 1, 3), (0, 0, 4)}. 22. 9x2 + 12xy − 6xz + 4y 2 − 4yz + z 2 . 23. 4x2 + 4xy − 4xz + y 2 − 2yz +P z2.  2 The sum in ((2x) + y + (−z)) = T k1 ,k22 ,k3 (2x)k1 y k2 (−z)k3 is indexed over T = {(k1 , k2 , k3 ) : k1 , k2 , k3 ∈ N and k1 + k2 + k3 = 2} = {(2, 0, 0), (1, 1, 0), (1, 0, 1), (0, 2, 0), (0, 1, 1), (0, 0, 2)}. So ((2x) + y + (−z))2 = 4x2 + 4xy − 4xz + y 2 − 2yz + z 2 . 24. x2 + 8xy + xz + 16y 2 + 4yz + 41 z 2 . 25. (2w)2 +2(2w)x+2(2w)y+2(2w)(2z)+x2 +2xy+2x(2z)+y 2 +2y(2z)+(2z)2 = 4w2 + 4wx + 4wy + 8wz + x2 + 2xy + 4xz + y 2 + 4yz + 4z 2 . 26. w2 − 2wx + 2wy − 2wz + x2 − 2xy + 2xz + y 2 − 2yz + z 2 . 27.

300 100,50,40,60,20,30

28.

70 20,10,30,10





.

.

29. 0, since 10 + 20 + 30 6= 80.

494

30.

CHAPTER 4. ANSWERS TO ALL EXERCISES

100 30,20,50,0



· 220 350 .

 100 31. − 25,10,40,25 .  25 100 The relevant term is 25,10,40,25 x (−y)10 z 40 (−w)25 =  25  25 10 40 100 100 10 10 40 25 25 = 25,10,40,25 x 1y z (−1)w25 = 25,10,40,25 x (−1) y z (−1) w 100 25 10 40 25 − 25,10,40,25 x y z w . 32. 0.  14 33. −25 4,2,5,3 = −80720640.  4 2  4 2 14 14 The relevant term is 4,2,5,3 x y (−2z)5 w7 = 4,2,5,3 x y (−2)5 z 5 w7 =  4 2 5 7 14 5 4 2 5 7 (−2) 4,2,5,3 x y z w = −80720640x y z w . 34.

20 6,8,6

35.

14+4−1 14

=

17 14

= 680.

36.

20+3−1 20

=

22 20

= 231.



· 38 .  

 

37. There are n! ways to order the n items. We shall understand that the first k1 go into category 1, the next k2 go into category 2, and so forth. Since, within each category, order is not important, we must divide n! by k1 !k2 ! · · · km !, the number of different orderings  leaving items within their categories. We get n n! , which is k1 !k2 !···km ! k1 ,k2 ,...,km . 38. Inductive Step: Suppose m ≥ 2 and the result holds for any m real numbers and any integer n ≥ 1. Suppose a1 , a2 , . . . , am , am+1 ∈ R and n ≥ 1. Observe that (a1 + a2 + · · · + am + am+1 )n = ((a1 + a2 + · · · + am ) + am+1 )n = X 0 ≤ j, km+1 ≤ n j + km+1 = n



 n km+1 (a1 + a2 + · · · + am )j am+1 j, km+1

and



  X  n  n j j (a1 +a2 +· · ·+am ) = ak1 ak2 · · · akmm j, km+1 j, km+1 k1 , k2 , · · · km 1 2 0 ≤ k1 , k2 , . . . , km ≤ j k1 + k2 + · · · + km = j =

X 0 ≤ k1 , k2 , . . . , km ≤ j k1 + k2 + · · · + km = j



 n ak1 ak2 · · · akmm . k1 , k2 , · · · km , km+1 1 2

So,

4.7. CHAPTER 7

495

 n km+1 ak1 ak2 · · · am+1 k1 , k2 , · · · km+1 1 2 0 ≤ j, km+1 ≤ n 0 ≤ k1 , k2 , . . . , km ≤ j j + km+1 = n k1 + k2 + · · · + km = j   X n km+1 . ak1 ak2 · · · am+1 = k1 , k2 , · · · km+1 1 2 0 ≤ k1 , k2 , . . . , km+1 ≤ n k1 + k2 + · · · + km+1 = n

(a1 +a2 +· · ·+am+1 )n =

X

X

39. Consider 3n = (1 + 1 + 1)n . We get X



0 ≤ k1 , k2 , k3 ≤ n k1 + k2 + k3 = n

n k1 , k2 , k3



· 1k1 · 1k2 · 1k3 .

Of course, 1k1 · 1k2 · 1k3 = 1, in each term. X  n n 40. 0 = (−1 − 1 + 1 + 1) =

 n (−1)k1 (−1)k2 1k3 1k4 k1 , k2 , k3 , k4 0 ≤ k1 , k2 , k3 , k4 ≤ n k1 + k2 + k3 + k4 = n   X n k1 +k2 = (−1) . k1 , k2 , k3 , k4 0 ≤ k1 , k2 , k3 , k4 ≤ n k1 + k2 + k3 + k4 = n 41. Consider 6n = (3 + 2 + 1)n . We get      X X n n n − k1 ·3k1 ·2k2 ·1k3 = ·3k1 ·2k2 . k1 , k2 , k3 k1 k2 0 ≤ k1 , k2 , k3 ≤ n 0 ≤ k1 , k2 ≤ n k1 + k2 + k3 = n k1 + k2 ≤ n 42.

(x + y + y)n {z } |

Multinomial Theorem

=

(x + 2y)n | {z }

Binomial Theorem

Section 7.3 P∞ 1. 1 + 2x + 3x2 + 4x3 + · · · = i=0 (i + 1)xi . Notice that xi occurs in the product (1 + x + x2 + x3 + · · · )(1 + x + x2 + x3 + · · · ) via products of the form xj xi−j , where j = 0, 1, . . . , i. Since there are i + 1 such products, the coefficient of xi is (i + 1). 2. 1 + x + x2 + 2x3 + 2x4 + 2x5 + 3x6 + 3x7 + 3x8 + · · · = 3. 1 + x2 + x4 + x6 + · · · =

P∞

i=0

x2i .

P∞

i+3 i i=0 b 3 cx .

496

CHAPTER 4. ANSWERS TO ALL EXERCISES

Notice that xk occurs in the product (1+x+x2 +x3 +· · · )(1−x+x2 −x3 +· · · ) = (1 + x + x2 + x3 + · · · )(1 + (−x) + (−x)2 + (−x)3 + · · · ) via products of the form xj (−x)k−j = xj (−1)k−j xk−j = (−1)k−j xj xk−j = (−1)k−j xk , where j = Pk 0, 1, . . . , k. That is, the coefficient of xk is the alternating sum j=0 (−1)k−j . If k is odd, then this alternating sum is 0. If k = 2i is even, then this alternating sum is 1. 4. 1 − 2x + 3x2 − 4x3 + 5x4 − 6x5 + · · · =

P∞

i i=0 (−1) (i

+ 1)xi .

5. 1 · 1 + 1 · x2 + 1 · x4 + x · 1 + x · x2 + x · x4 + x2 · 1 + x2 · x2 + x2 · x4 = 1 + x2 + x4 + x + x3 + x5 + x2 + x4 + x6 = 1 + x + 2x2 + x3 + 2x4 + x5 + x6 . 6. 1 + x + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12 + x13 + x14 . 7. (1 · x + 1 · x2 + x · x + x · x2 )(1 + x3 ) = (x+x2 +x2 +x3 )(1+x3 ) = x·1+x·x3 +x2 ·1+x2 ·x3 +x2 ·1+x2 ·x3 +x3 ·1+x3 ·x3 = x + x4 + x2 + x5 + x2 + x5 + x3 + x6 = x + 2x2 + x3 + x4 + 2x5 + x6 . 8. 1 + x10 + x20 + x25 + x35 + x45 + x5 + x15 + x25 + x30 + x40 + x50 = 1 + x5 + x10 + x15 + x20 + 2x25 + x30 + x35 + x40 + x45 + x50 . 9. c0 = 1, c5 = 1, c10 = 2, c15 = 2, c20 = 2, c25 = 1, c30 = 1, and, otherwise, ci = 0. Note that (1+x10 )(1+x5 +x10 +x15 +x20 ) = 1+x5 +2x10 +2x15 +2x20 +x25 +x30 . 10. (1 + x5 + x10 )(1 + x + x2 + x3 + x4 + x5 ). 0 1

i ci

1 1

2 1

3 1

4 1

5 2

6 1

7 1

8 1

9 1

10 2

11 1

12 1

13 1

14 1

15 1

11. i ci

0 1

1 1

2 1

3 1

4 1

5 2

6 1

7 1

8 1

9 1

10 2

11 1

12 1

13 1

14 1

i ci

16 1

17 1

18 1

19 1

20 2

21 1

22 1

23 1

24 1

25 2

26 1

27 1

28 1

29 1

30 1

15 2

That is, ci is the coefficient of xi in the expansion of (1 + x10 + x20 )(1 + x5 )(1 + x + x2 + x3 + x4 + x5 ). 12. (1 + x10 )(1 + x5 + x10 + x15 )(1 + x + x2 + x3 + x4 + x5 ). i ci

0 1

1 1

2 1

3 1

4 1

5 2

6 1

7 1

8 1

9 1

10 3

11 2

12 2

13 2

14 2

i ci

16 2

17 2

18 2

19 2

20 3

21 1

22 1

23 1

24 1

25 2

26 1

27 1

28 1

29 1

30 1

15 4

4.7. CHAPTER 7

13.

i ci

0 1

497

5 1

10 2

15 2

20 2

25 3

30 2

35 3

40 2

45 2

50 2

55 1

40 2

45 1

50 2

60 1

That is, ci is the coefficient of xi in the expansion of (1 + x25 )(1 + x10 + x20 )(1 + x5 + x10 + x15 ). 14. (1 + x10 + x20 + x30 + x40 )(1 + x5 + x10 ). i ci

0 1

5 1

10 2

15 1

20 2

25 1

30 2

35 1

15. 11. (1 + x + x2 + x3 )(1 + x + x2 + x3 + x4 )(1 + x + x2 ) = · · · + 11x5 + · · · . 16. (1 + x + x2 + x3 + x4 )(1 + x + x2 + x3 )2 = · · · + 10x7 + · · · . So, 10. 17. 29. (1+x+x2 +· · ·+x6 )(1+x+x2 +· · ·+x6 )(1+x+x2 +x3 +x4 ) = · · ·+29x8 +· · · . 18. (a) (1 + x + x2 + x3 + x4 )2 (x + x2 + x3 ) = · · · + 13x6 + · · · . So, 13. (86) (86) (76) 31 1 (b) 1 − 11 = 33 . (c) 11 + 2 · 11 = 11 . (6) (6) (6) 19. (a) 18. (x + x2 + · · · + x10 )(x + x2 + · · · + x8 )(x + x2 + x3 + x4 ) = · · · + 18x8 + · · · . 8 10 18 14 (22)−(12 8 )−( 8 )−( 8 )+( 8 )+(8) = 27256 (b) 8 22 31977 ≈ .8524. (8) 8 10 ( )+( ) 23 (c) 8 22 8 = 159885 ≈ .00014. (8) 20. (1+x+x2 +· · ·+x8 )(1+x+x2 +· · ·+x6 )(1+x+x2 +· · ·+x7 ) = · · ·+45x12 +· · · . So, 45.  21. ci = ni ai , for i = 0, 1, . . . , n.  Pn By the Binomial Theorem, (1+ax)n = i=0 ni ai xi . If a ∈ Z+ , then ci = is the number of n-digit base (a + 1) sequences with exactly i zeros. 22. ci =

n i



n i



ai

an−i , for 0 ≤ i ≤ n.

 2 4 23. ∀ i ≥ 0, ci = i+3 i . The generating function is (1 + x + x + · · · ) . Thus, ci counts the number of ways to i identical items in 4 distinct categories. 24. ci = 1, for 0 ≤ i ≤ 8, and ci = 0 otherwise. 25. c100 = 26. c50 =

100+50−1 100



50+100−1 50



=

=

149 100



149 50



.

.

498

CHAPTER 4. ANSWERS TO ALL EXERCISES

 148 1 100 100 27. 149 in (1−x) 50 plus the coefficient of x 100 + 99 . It is the coefficient of x x 1 99 in (1−x) in (1−x) 50 . Note that the latter is the same as the coefficient of x 50 . 28.

149 50



29.

119 40

+2

118 39

+

30.

129 70

+3

128 69

+3

  

147 48



.  

117 38



.

127 68



+

126 67



.

31. 6175. Use g(x) = (1 + x + x2 + x3 + x4 )13 = · · · + 6175x5 + · · · . What matters here is how many (anywhere from 0 to 4) cards of each denomination are in a hand. 32. (1 + x + x2 + x3 )3 = · · · + 10x6 + · · · . So, 10. 33. 15805. 2 +x3 +x4 . (1 + x + x2 + x3 + x4 )(1 + x + x2 + · · · )3 = 1+x+x (1−x)3      81 80 79 78 The coefficient of x80 is 82 + + + + = 15805. Or, 78 77 76 80 79 1+x+x2 +x3 +x4 1−x5 1 1−x5 = 1−x · (1−x)3 = (1−x)4 . (1−x)3   78 The coefficient of x80 is 83 80 − 75 = 15805. 34. (1 + x + x2 + x3 )2 (1 + x + x2 + · · · )2 =    69 65 of x70 is 73 70 − 2 66 + 62 = 1088.

(1−x4 )2 (1−x)4

=

1−2x4 +x8 (1−x)4 .

The coefficient

35. (a) 351. 6 1 (1 + x + x2 + x3 + x4 + x5 )(1 + x + x2 + · · · )2 = 1−x 1−x · (1−x)2 =   56 The coefficient of x60 is 62 60 − 54 = 351. (b) 56, since from 0 to 55 white might be purchased. (c) 3, since 0, 2, or 4 bottles of champagne would be purchased.

1−x6 (1−x)3 .

36. (a) (1 + x + x2 + · · · + x8 )(1 + x + x2 + · · · + x10 )(1 + x + x2 + · · · )2 =    9 (1−x9 )(1−x11 ) 44 42 −x11 +x20 = 1−x(1−x) . The coefficient of x50 is 53 4 (1−x)4 50 − 41 − 39 +    52 41 33 1−x11 50 in (1−x) 3 is 50 − 39 = 506. (c) 30 = 4158. (b) The coefficient of x (x+x2 +x3 +· · ·+x8 )(x+x2 +x3 +· · ·+x10 )(x+x2 +x3 +· · · )2 =    41 39 x4 −x12 −x14 +x22 . The coefficient of x50 is 49 (1−x)4 46 − 38 − 36 + 37. 81. 9 2 ( 1−x 1−x ) ·

1 1−x

=

1−2x9 +x18 (1−x)3 .

The coefficient of x40 is

38. (1 + x + x2 + x3 + x4 )(1 + x + x2 + · · · )2 =   32 27 30 − 25 = 145.

42 40

1−x5 (1−x)3 .



−2

x4 (1−x8 )(1−x10 ) 4  (1−x) 31 = 3120. 28

33 31



+

24 22



=

= 81.

The coefficient of x30 is

4.7. CHAPTER 7

499

1 3 39. 1602. Use g(x) = (1+x+x2 +· · · )3 (1+x)3 = (1−x) 3 (1+x) . The coefficient         20 3 21 3 22 3 3 of x20 is 19 17 3 + 18 2 + 19 1 + 20 0 = 1602.

40. Use g(x) = (1 + x + x2 + · · · )4 (1 + x)2 =  2     12 2 13 2 x10 is 11 8 2 + 9 1 + 10 0 = 891.

1 (1−x)4 (1

+ x)2 . The coefficient of

41. When there are finitely many items, say n, in general, the number of ways of selecting n −  i is the  same as the number of ways of de-selecting i. n Recall that ni = n−i . Pn 42. (1 − x) i=0 xi = (1 − x)(1 + x + x2 + · · · + xn−1 + xn ) = 1 + x + x2 + · · · + xn−1 + xn − x − x2 − · · · − xn − xn+1 = 1 − xn+1 . 43. ∀ i ≥ 0, ci = (−1)i 44. ci = (−1)i

n i



i+n−1 i



, since

1 (1+x)n

=

1 (1−(−x))n .

, for 0 ≤ i ≤ n.

Section 7.4 1.

c c c cb` cb` cb` s s s c cb` cb` c s s cb` c c s c c cb` s s s cb` cb` c cb` s

cb` cb` c s s c c c cb` c c s s s cb` cb` cb` s cb` s c

cb` c b`c s c s c cb` c c s c s cb` s cb` s cb` s c cb`

c s b`c

cb` c s

s cb` c

500

CHAPTER 4. ANSWERS TO ALL EXERCISES

2.

pf pf pf pf pf pf pf pf pf pf pf pf Z pf  pv Z pf f p Z pf v p Z pf pf p Z pf pf pv Z pf pf p Z pv pf   Z pf v  Z pf   Z pv v  Z pv BBpf pf  BBpf pf  BBv  BBpf pv  BBf  BBpf pf p pf  BBv p pf p pv  BBpv pv  BBpv pv  BBf p pf  BBpv pf  pf pf pf pf pf pv pv pv pv pv pv pv Z pv  pf Z pv v p Z pv f p Z pv pv p Z pf pv pf Z pf pv p Z pf pv   Z pv f  Z pf   Z pf f  Z pf BBpv pf  BBpf pv  BBf  BBpv pv  BBf  BBpv pf p pv  BBv p pv p pf  BBpf pf  BBpv pf  BBf p pv  BBpf pv  pv pv pv pv pv pv pv pv pv pv pv Z pf f p Z pv v p Z pv pf p Z pv pf pv Z pv pf p Z pv pf Z pf    Z pv v  Z pv   Z pv v BBpv pv  BBpv pv  BBf  BBpv pf  BBv  BBpv pv p pf  BBf p pf p pf  BBpf pv  BBpf pv  BBv p pv 

3.

◦ r0 r1 r2 r3 r4 r5

4.

◦ r0 r1 r2 r3

r0 r0 r1 r2 r3

r1 r1 r2 r3 r0

r2 r2 r3 r0 r1

r3 r3 r0 r1 r2

r0 r0 r1 r2 r3 r4 r5

r1 r1 r2 r3 r4 r5 r0

r2 r2 r3 r4 r5 r0 r1

r3 r3 r4 r5 r0 r1 r2

r4 r4 r5 r0 r1 r2 r3

r5 r5 r0 r1 r2 r3 r4

5. (a) f1 . (b) r2 f4 = f3 . (c) No. r1 f2 = f4 6= f3 = f2 r1 . ◦ r0 r1 r2 r3 f1 f2 f3 f4 6.

r0 r0 r1 r2 r3 f1 f2 f3 f4

r1 r1 r2 r3 r0 f3 f4 f2 f1

r2 r2 r3 r0 r1 f2 f1 f4 f3

r3 r3 r0 r1 r2 f4 f3 f1 f2

f1 f1 f4 f2 f3 r0 r2 r3 r1

f2 f2 f3 f1 f4 r2 r0 r1 r3

f3 f3 f1 f4 f2 r1 r3 r0 r2

◦ r0 r1 r2 f1 f2 f3

r0 r0 r1 r2 f1 f2 f3

r1 r1 r2 r3 f2 f3 f1

r2 r2 r3 r4 f3 f1 f2

f1 f1 f3 f2 r0 r2 r1

f2 f2 f1 f3 r1 r0 r2

f3 f3 f2 f1 r2 r1 r0

f4 f4 f2 f3 f1 r3 r1 r2 r0

(a) f1 . (b) r2 . (c) No, f3 6= f2 . 7. G = D4 and N = 81 [24 + 2 + 2 + 22 + 23 + 23 + 22 + 22 ] = 6.

4.7. CHAPTER 7

501

8. G = D4 and N = 18 [44 + 4 + 4 + 42 + 43 + 43 + 42 + 42 ] = 55. 9. 10. For each g ∈ D6 , we need to count |Fix(g)|. Case 1 : g = r0 the identity. Since r0 moves nothing, each network is fixed. So |Fix(r0 )| = 33 = 27. Case 2 : g = ri for i = 1 or 2. The only networks unchanged by such a rotation are those in which each computer has the same type (from 3 choices). So |Fix(ri )| = 3. Case 3 : g = fi for i = 1, 2, or 3. Such a flip fixes one computer and switches the other two. The networks unchanged by this can have any type of computer at the fixed computer, but the two that are switched must have the same type. So |Fix(fi )| = 32 = 9. Let N be the number of orbits of X. Invoking Theorem 7.8 we get N

=

1 X |Fix(g)| |G| g∈G

= =

1 (|Fix(r0 )|+|Fix(r1 )|+|Fix(r2 )|+|Fix(f1 )|+|Fix(f2 )|+|Fix(f3 )|) 6 1 60 (27 + 3 + 3 + 9 + 9 + 9) = = 10. 6 6

Thus, there are 10 different network types. 10. G = D5 and N =

1 5 10 [3

+ 4(3) + 5(33 )] = 39.

11. (a) G = Z2 and N = 12 [63 + 62 ] = 126. (b) 126 − 6 − 6 · 5 = 90. (c)  90 − 6 · 5 = 60 or 63 · 3 = 60. 12. (a) G = Z6 and N = 61 [36 + 2(3) + 2(32 ) + 33 ] = 130. 1 (b) G = D6 and N = 12 [36 + 2(3) + 2(32 ) + 33 + 3(34 ) + 3(33 )] = 92. 1 6 (c) 92 − 3 · 12 [2 + 2(2) + 2(22 ) + 23 + 3(24 ) + 3(23 )] + 3 = 56. 13. N =

1 6 24 [1(3 )

+ 6(33 ) + 3(34 ) + 6(33 ) + 8(32 )] = 57.

14. G = D3 and N = 61 [35 + 2(33 ) + 3(33 )] = 63. 15. 280. Let M be the number of ways to color the non-base faces and G = Z4 . So M = 41 [44 + 4 + 4 + 42 ] = 70. Since there are then 4 ways to color the base, N = 4(70) = 280. 16. N =

1 7 10 [3

+ 4(33 ) + 5(34 )] = 270.

17. N =

1 4 12 [4

+ 8(42 ) + 3(42 )] = 36.

18. N =

1 8 24 [2

+ 6(22 ) + 3(24 ) + 8(24 ) + 6(24 )] = 23.

502

CHAPTER 4. ANSWERS TO ALL EXERCISES

19. 834. G = Z8 and N = 18 [38 + 3 + 32 + 3 + 34 + 3 + 32 + 3] = 834. 20. G = D6 and N =

1 6 12 [4

+ 2(4) + 2(42 ) + 43 + 3(44 ) + 3(43 )] = 430.

21. 34. G = Z4 and N = 14 [

9 5



+2+

4 2



+ 2] = 34.

22. G = Z4 and N = 14 [316 + 2(34 ) + 38 ] = 10763361.     1 23. 8. G = D8 and N = 16 [ 84 +0+2+0+ 42 +0+2+0+4 42 +4 42 ] = 8. They are 11112222, 11121222, 11122122, 11211222, 11221122, 11212122, 11212212, 12121212. 24. G = D12 and N =

12 1 24 [ 6



+ 2(2) + 2

4 2



6 3



+

+6

6 3



5 2



+2

] = 50.

1 25. (a) G = D5 and N = 10 [35 + 3 + 3 + 3 + 3 + 5(33 )] = 39. 1 5 (b) G = Z2 and N = 2 [3 + 33 ] = 135. (c) 3 + 3 · 21 [(25 − 2) + (23 − 2)] = 57.

26. (a) G = Z8 and N = 18 [48 + 4(4) + 2(42 ) + 44 ] = 8230. (b) 37 = 2187. (c) G = Z8 and N = 18 [38 + 4(3) + 2(32 ) + 34 ] = 834. 27. G = Z4 and N = 14 [54 + 5 + 52 + 5] = 165. 28. G = Z5 and N = 15 [55 + 4(5)] = 629. 29. 5 · ( 13 [53 + 5 + 5])( 12 [52 + 5]) = 3375. 30.

1 2 2 [5

+ 5]( 13 [53 + 2(5)])2 = 30375.

31. 1135. The number of ways to color each of the three outer pairs is 21 [52 +5] = 15. So N = 31 [153 + 15 + 15] = 1135. 32.

1 1 2 2 [( 2 [5

+ 5])2 · 52 + 12 [52 + 5] · 5] = 2850.

33. Proof. Let g ∈ G. (⊆) Suppose x ∈ Fix(g). So gx = x. Hence, g −1 gx = g −1 x. So x = g −1 x. Thus, x ∈ Fix(g −1 ). (⊇) Similar.  34. Proof. Suppose x ∈ Fix(g1 ) ∩ Fix(g2 ). So g1 x = x = g2 x. Hence, g1 g2 x = g1 x = x. Thus, x ∈ Fix(g1 g2 ).  35. N =

12 1 24 [ 4,4,4

36. N =

8 1 16 [ 2,2,2,2

37. 2420.



+ 8(0) + 2(3!) + 

6 2,2,2



+6

6 2,2,2



+6

+ 6(0) + 4! + 4(4!) + 4(4!)] = 171.

6 2,2,2



] = 1493.

4.7. CHAPTER 7

503

   10  11 12 10 |Fix(r0 )| = 12 6 + 2 · 12 5 + 2 [2 4 + 5 ] = 56364, |Fix(r1 )| = |Fix(r5 )| = |Fix(r7 )| = |Fix(r11 )| = 0, |Fix(r2 )| = |Fix(r10 )| = 2, |Fix(r3 )| = |Fix(r9 )| = 0,  |Fix(r4 )| = |Fix(r8 )| = 42 = 6,   |Fix(r6 )| = 63 + 6[2 52 ] = 140,      |Fix(f1 )| = 2 52 + 5[2 43 + 2 42 + 2 · 2 52 + 63 ] = 180, and   |Fix(f5 )| = 6 52 + 63 = 80. 1 [56364 + 4(0) + 2(2) + 2(0) + 2(6) + 140 + 6(180) + 6(80)] = 2420. So N = 24      38. |Fix(r0 )| = 84 + 2 · 8 73 + 82 [2 62 + 63 ] = 2030, |Fix(r1 )| = |Fix(r  3 )| = |Fix(r5 )| = |Fix(r7 )| = 0, |Fix(r2 )| = |Fix(r6 )| = 2, |Fix(r4 )| = 42 + 4[2 · 3] = 30,  |Fix(f1 )| = 2(3) + 3[2 + 2 · 2] + 2 · 2 · 3 + 42 = 42, and  |Fix(f2 )| = 4 · 3 + 42 = 18. 1 [2030 + 4(0) + 2(2) + 30 + 4(42) + 4(18)] = 144. So N = 16 39. N =

6 1 24 [( 4

+

40. N =

4 1 12 [( 3

·2+

 

6 3



+ 4 2



6 4



) + 6(2) + 3(2 + 23 ) + 6(2 · 3) + 8(2)] = 6.

) + 8(2) + 3(2)] = 3.

Section 7.5 1. Each subset of {1, 2, . . . , n} of size k can be uniquely represented by a binary sequence of length n with k ones, as in Example 7.20(a). For example, {1, 2, 6, 8, . . .} is represented by 11000101 . . .. For each i, group together those that start with i ones followed by a zero 11 · · · 1} 0 . . . . | {z i times

  The size of this group is n−(i+1) = n−i−1 k−i k−i . The sum of the sizes of the groups   Pk n−i−1 must be the total number nk of relevant sequences. i=0 k−i 2. For each 0 ≤ k ≤ n, the number of subsets of {1, 2, . . . , 2n} of size n that  n  2 contain k elements of {1, 2, . . . , n} is nk n−k = nk . The total number of  subsets of {1, 2, . . . , 2n} of size n is, of course, 2n n .  3. The nk subsets of {1, 2, . . . , n} of size k can be broken into three groups.  (i) The n−2 that contain both 1 and 2. k−2  n−2 (ii) The 2 k−1 that contain exactly one of 1 or 2.  (iii) The n−2 that contain neither 1 nor 2. k 4. The number of ways to split n distinct items into m distinct categories of

504

CHAPTER 4. ANSWERS TO ALL EXERCISES

 sizes k1 , k2 , . . . , km is k1 ,k2n,...,km . For each 1 ≤ i ≤ m, the number that put  the nth item into category i is k1 ,...,kn−1 . i −1,...,km  5. Of the 3n n paths from S = (0, 2n) to F = (n, 0) in the (2n + 1) by (n + 1) rectangular grid of points ([0, n] × [0, 2n]) ∩ (Z × Z), Ss

s

s

s

s

s

s

s

sdn

s

sd1

s

sd0

s

s F

for each 0 ≤ i ≤ n, the number that pass through di = (i, i) is  Pn 2n n  Pn 2n n we have 3n i=0 i i=0 i n−i = i . n =

2n i



n n−i



. So,

6. Recall that the binomial coefficient notation specifies locations in Pascal’s triangle, and the value of the binomial coefficient counts the number of paths  from 00 to that location. For each 0 ≤ i ≤ k, the number of paths from 00 to     m+n n that pass through position mi is mi k−i , and no such path can pass k  m through position j for j > k. 7. A Canadian doubles tournament that starts with 3n players will ultimately have 3n − 1 losers (and one champion). For each 1 ≤ k ≤ n, round k has 3n−k+1 competitors and its completion leaves behind 23 3n−k+1 = 2 · 3n−k losers. Thus, Pn Pn−1 the total number of losers is k=1 2 · 3n−k = 2 k=0 3k . 8. Consider a poker tournament for 4n players, in which each game consists of 4 players with one being declared the winner. There will be n rounds 1, 2, . . . , n. For each 1 ≤ j ≤ n, in round j, there will be 4n+1−j players competing in 4n−j games. Since each game yields 3 losers, there will 3 · 4n−j losersPin round j. Pbe n n−1 n So the total number of losers 4 − 1 is given by j=1 3 · 4n−j = 3 k=0 4k . 9. Let U be the set of base-3 sequences of length n, and let A be the subset of those that contain at least one 2. For each 1 ≤ j ≤ n, let Aj be the subset of those that have a 2 in position j. So A = ∪ni=1 Ai . First, observe that |A| = |U|− n−i |Ac | = 3n −2n . For each 1 ≤ j1 <  j2 < · · · < ji ≤ n, |Aj1 ∩Aj2 ∩· · ·∩Aji | = 3 . n n−i So, for each 1 ≤ i ≤ n,  Si = i 3 . By the Principle of Inclusion-Exclusion, Pn |A| = i=1 (−1)i−1 ni 3n−i . 10. Let U be the set of base 4 sequences of length n, and let A be the subset of those which contain at least one 3. For each 1 ≤ j ≤ n, let Aj be the subset of those which have a 3 in position j. So A = ∪ni=1 Ai . First, observe

4.7. CHAPTER 7

505

that |A| = |U| − |Ac | = 4n − 3n . For each 1 ≤ j1 < j2 < ·· · < jk ≤ n, |Aj1 ∩ Aj2 ∩ · · · ∩ Ajk | = 4n−k . So, for each 1 ≤ k ≤ n, Sk = nk 4n−k . By the Pn Principle of Inclusion-Exclusion, |A| = i=k (−1)k−1 nk 4n−k .  11. Let n ≥ 1. For each 1 ≤ k ≤ n, there are nk choices for a team of size k and Pnthen k choices for its captain (one member of the team). In sum, there are k=1 nk k possible teams with a specified captain. All together, there are n choices for a team captain and then 2n−1 choices for the remaining team members. Hence, there are n2n−1 possible teams with a specified captain. 12. From n players, we choose a team containing a captain and a van driver. The number of possibilities in which the captain and the van driver are distinct is n(n − 1)2n−2 . The number in which they are the same is n2n−1 . So the total is n(n − 1)2n−2 + n2n−1 . For each 1 ≤ k ≤ n, the number in  Pn of possibilities which the team has size k is nk k 2 . So the total is also k=1 k 2 nk . 13. Assume that you are one of 2n people to be split into 2 teams of size n. The (2n) number of ways to split 2n people into 2 teams of size n is n2 . The division  by 2 strips away the implied ordering of the teams in the computation 2n n . On the other hand, the number of ways for you to pick your n − 1 teammates is  2n−1 . n−1 14. The number of ways to split 3n players into 3 teams of size n is

3n ) (n,n,n

. From 3! 3n−1 ) (n−1,n,n . the point of view of one of the players, this can also be counted as 2

15. The 3n base-3 sequences of length n can be partitioned according to triples (k0 , k1 , k2 ), where k0 is the number of zeros, k1 is the number of ones, and k2  is the number of twos in the sequence. Of course, there are k0 ,kn1 ,k2 sequences that correspond to (k0 , k1 , k2 ). Also note that it must be the case that 0 ≤ k0 , k1 , k2 ≤ n and k0 + k1 + k2 = n. 16. For each 0 ≤ i ≤ n, the number of ways to form a monomial an−i bi from the n-fold product (a + b)(a + b) · · · (a + b) is the number  of ways to choose i of those factors to contribute a b, namely ni . Hence, ni must be the coefficient of an−i bi in the expansion of (a + b)n .  17. (a) a+b+c a,b,c , since we count the number of (a + b + c)-step paths containing a right-, b downward-, and c frontward-steps. (b) Consider an (i + 1) by (j + 1) by (k + 1) rectangular grid of points. In a path from S to F , the final position before reaching F must be exactly one of the 3 pictured points x, y, or z. s s  s  s y sz s  s x F

506

CHAPTER 4. ANSWERS TO ALL EXERCISES

  n−1 n−1 By part (a), the number of paths to x is i−1,j,k , the number to y is i,j−1,k ,  n−1 and the number to z is i,j,k−1 . Hence, the sum of these three values must be  n the total number of paths to F , namely i,j,k . 18. Consider paths that only move right, down, or forward through an (n + 1) × (n + 1) × (n + 1) block of points. The total number of paths  from the 3n top back left corner S to the bottom front right corner F is n,n,n . For each position k1 right, k2 down, and k3 forward from S with k + k + k 3 =  1 2n2  n, the number of paths from S to F through there is k1 ,kn2 ,k3 n−k1 ,n−k . Since 2 ,n−k3 each path from S to F goes through exactly one such position, the total number is also    X n 2n . k1 , k2 , k3 n − k1 , n − k2 , n − k3 0 ≤ k1 , k2 , k3 ≤ n k1 + k2 + k3 = n 19. The identity permutation of {1, 2, . . . , n} moves none of its elements. The size of the set P of nonidentity permutations of {1, 2, . . . , n} is n! − 1. For each 1 ≤ i ≤ n − 1, let Pi be the set of non-identity permutations for which i + 1 is the largest position moved. Since, under these conditions, there are i positions to which i + 1 may be moved, and then i! ways to place {1, 2, . . . , i}, we see that |Pi | = i · i!. Since P = P1 ∪ P2 ∪ · · · ∪ Pn−1 is a disjoint union, its cardinality Pn−1 must be i=1 (i · i!). ( 2n ) . Now imagine 20. The number of ways to split 2n players into n pairs is 2,...,2 n! that we line up the 2n players. The number of choices of a partner for the first player is (2n − 1), the number of choices of a partner for the next un-partnered player is (2n − 3), and so on. Hence, (2n − 1)(2n − 3) · · · 3 · 1 also counts the number of possible pairings. 21. If a fair coin is tossed n times, then the probability that at least one head will occur is 1 − 21n . For each 1 ≤ k ≤ n, the probability that the first Pn head occurs on toss k is ( 12 )k−1 ( 21 ) = 21k . Hence, the total probability is k=1 21k . This must therefore equal 1 − 21n . 22. ((xi ), (yi )) −→ (yi + 3xi ). 23. Assume that you are one of the 6 people. Of the other 5 people, there must be either 3 whom you have met before or 3 whom you have not met before. (That follows from the Pigeon Hole Principle.) Assume that there are 3 whom you have met before. If two of them have met each other before, then you and those two are a set of 3 who have met each other before. Otherwise, those 3 are a set who have never met each other before. The case in which there are 3 whom you have not met before is handled similarly.

4.7. CHAPTER 7 24.

n(n−1)···(n−k+1) k!

507 =

n k



∈ Z.

25. 2. We see that there are 2 ways to triangulate a square. @ @ 26. 14. 27. (a) List the n − 1 terms on the non-base sides of the n-gon. Parentheses go around any pair that sits on a common triangle. Collapse each such triangle to its interior side, write the resulting product from the exterior sides on that interior side, and regard it as a single term. Now repeat this process on the resulting smaller polygon. For example, p (bc) cp pb @ a d a @ ((bc)d) ap @ @ p d a((bc)d) This establishes a one-to-one correspondence between triangulations of the ngon and parenthesizations of a product of n − 1 terms.  2m 1 (b) According to Exercise 45 from Section 4.3, Cm = m+1 counts the m number of ways of parenthesizing a product consisting of m+1 factors. Here, we   2(n−2) 2n−4 1 1 = use m+1 = n−1. So m = n−2, and Tn = Cn−2 = n−2+1 n−2 n−1 n−2 . 28. The mapping described in the hint is a bijection. There are Tn (n − 1) pairs consisting of a triangulation of an n-gon followed by a non-base outer edge selection. There are Tn−1 (2n − 5)2 triples consisting of a triangulation of an (n − 1)-gon followed by an edge selection followed by an end of that edge selection. 29. The coins are on squares of the same color. That leaves 30 squares of that color and 32 of the other color. Since each domino covers one square of each color, they cannot be used to fill the rest of the board. That is, at best, after placing 30 dominos, there will be 2 squares of the other color left. No one domino can then cover those 2 (necessarily nonadjacent) squares of the same color. 30. The positions in the 3 × 3 grid can be alternately colored black and white, as on a chess board. Assuming that the corners are black, the player starts on a black card and then moves to a white card. We then remove a black card. Since the player then moves to a black card, we next remove two white cards. By always removing a card of the opposite color to the player’s position, we gradually reduce the cards down to a single card, where the player must be. 31. The first re-deal leaves the selected card within the first 3 rows. This holds, since there are nine cards in the column containing the selected card, and these

508

CHAPTER 4. ANSWERS TO ALL EXERCISES

cards will then fill up three rows. The second re-deal leaves the card in the first row. This holds since, the card must be among the first three cards in its column. Once we know the card is in the first row, the column specifies its location. 32. The number will always be the sum of the first digits on the announced cards. Effectively, the player divulges the binary representation of the chosen number.

Review 1. 92903176. Let Ai contain those plates without i’s. So |A0 ∪ A3 ∪ A6 ∪ A9 | = 4 · 98 − 6 · 88 + 4 · 78 − 68 = 92903176. 2. 9100 − (4550+1820+1300+700) + (910+650+350+260+140+100)− (130+70+50+20) + 10 = 2880. 4000 4000 4000 4000 4000 4000 3. (b 4000 7 c + b 11 c + b 13 c) − (b 77 c + b 91 c + b 143 c) + b 1001 c = 1241 − 121 + 3 = 1123.

4. p = 2197 8330 ≈ .2637. Let Asuit contain those missing a specified suit. |A♣ c ∩ A♦ c ∩ A♥ c ∩ A♠ c | =    52 39 26 13 2197 685464 5 − 4 5 + 6 5 − 4 5 = 685464. So p = (52) = 8330 ≈ .2637. 5 887 5. p = 2907 ≈ .3051. Let Acolor contain those missing a specified color. Containing at most two colors is the ∪ Ablue | =  same  as excluding  at least  one  color. |Ared ∪ Awhite 14 13 6 7 8 6209 887 [ 15 + + ] − [ + + ] = 6209. So p = = 2907 ≈ .3051. 5 5 5 5 5 5 (21 5)

6. 31150. Let Afruit contain those missing a specified type of fruit. c c c |Aapple ∩A |= orange   banana  ∩A    20 12 15 13 8 7 − [ + + ] + [ 6 6 6 6 6 + 6 ] = 38760 − 7645 + 35 = 31150. 7.

P4

8.

6! 2!1!3!

9. 10.

(−1)i i!

i=0

= 38 .

= 60.

10 1,2,5,2 8 3,3,2



= 7560.



· 82 = 35840.

 18 11. (a) 6,5,4,3 = 514594080. 18 ( ) (b) 6,6,6 = 2858856. 3! 18 (4,4,5,5 ) (c) 2·2 = 192972780.

4.7. CHAPTER 7

509

12. x2 + 2xy + 2xz + 2xw + y 2 + +z 2 + 2zw + w2 . P2yz + 2yw 2 2 The sum in (x + y + z + w) = T k1 ,k2 ,k3 ,k4 xk1 y k2 z k3 wk4 is indexed over T = {(k1 , k2 , k3 , k4 ) : k1 , k2 , k3 , k4 ∈ N and k1 + k2 + k3 + k4 = 2} = {(2, 0, 0, 0), (1, 1, 0, 0), (1, 0, 1, 0), (1, 0, 0, 1), (0, 2, 0, 0), (0, 1, 1, 0), (0, 1, 0, 1), (0, 0, 2, 0), (0, 0, 1, 1), (0, 0, 0, 2)}. So (x + y + z + w)2 = x2 + 2xy + 2xz + 2xw + y 2 + 2yz + 2yw + z 2 + 2zw + w2 . 13. 8x3 − 12x2 y + 12x2 z + 6xy 2 − 12xyz + 6xz 2 − y 3 + 3y 2 z − 3yz 2 + z 3 .  80 14. 320 250 20,50,10 .  80 The relevant term is 20,50,10 (3x)20 (−2y)50 z 10 = Note that (−2)50 = 250 . 15.

20 5,4,5,6



80 20,50,10



320 (−2)50 x20 y 50 z 10 .

= 9777287520.

16. 1 − x + 2x2 − 2x3 + 3x4 − 3x5 + · · · has ci = (−1)i d i+1 2 e. Notice that xk occurs in the product (1−x+x2 −x3 +· · · )(1+x2 +x4 +x6 +· · · ) = (1 + (−x) + (−x)2 + (−x)3 + · · · )(1 + x2 + x4 + x6 + · · · ) via products of the form (−x)k−2j x2j , where j = 0, 1, . . . , b k2 c. Computing the first several coefficients displays the resulting pattern in the product. 17.

i ci

0 1

5 1

10 2

15 1

20 2

25 2

30 3

35 3

40 3

45 3

i ci

55 3

60 3

65 3

70 3

75 2

80 2

85 1

90 2

95 1

100 1

50 3

Use the generating function (1 + x25 + x50 )(1 + x10 + x20 + x30 + x40 )(1 + x5 + x10 ). Expand it with a calculator or mathematical software, and read off the coefficients. 18. 17. (1 + x + x2 + x3 + x4 + x5 )(1 + x + x2 + x3 )(1 + x + x2 + x3 + x4 ) = · · · + 17x5 + · · · . So 17. 19. 49. (1+x+x2 )(x+x2 +x3 +x4 )(x2 +x3 +x4 +x5 +x6 )(x3 +x4 +x5 +x6 +x7 +x8 ) = · · · + 49x12 + · · · . So 49. 1−x8 1 2 1−x ( 1−x )

20. 44. Use 21.

20+10−1 20

=

7+5−1 7

+3

22. 1





29 20



=

1−x8 (1−x)3 .

Now,

10 8





2 0



= 44.

= 10015005. See Theorem 7.6(b).

5+5−1 5



−1

3+5−1 3



=

11 7



+3

9 5





7 3



= 673.

510

CHAPTER 4. ANSWERS TO ALL EXERCISES

23. 7211. 1 3 ) . (1 + x + x2 + x3 + x4 + x5 )(1 + x + x2 + · · · )3 = (1 + x + x2 + x3 + x4 + x5 )( 1−x       52 51 50 49 48 47 The coefficient of x50 is 50 + 49 + 48 + 47 + 46 + 45 = 7211. ◦ r0 r1 r2

24.

r0 r0 r1 r2

r1 r1 r2 r0

r2 r2 r0 r1

25. r4 . 6

1p p T5p

26. 13. G = D6 and N =

p2 T p3 p4 f

5

4p p T6p

p3 T p2  p1 r2

1

6p p T2p

p5 T p4  p3 f

1 6 2 3 4 3 12 [2 +2(2)+2(2 )+2 +3(2 )+3(2 )]

2

3p  p T1p

p4 T p5  p6

= 13.

27. 217045. G = Z9 and N = 91 [59 + 6(5) + 2(53 )] = 217045. 28.

1 6 3 4 3 2 24 [4 +6(4 )+3(4 )+6(4 )+8(4 )]

= 240.

29. 4995. G = Z4 and N = 14 [39 + 33 + 35 + 33 ] = 4995. 30. Proof. Let g1 , g2 ∈ G. Suppose Fix(g2 ) = X. (⊆) Suppose x ∈ Fix(g2 g1 ). So x = g2 g1 x = g1 x. Hence x ∈ Fix(g1 ). (⊇) Suppose x ∈ Fix(g1 ). So g2 g1 x = g2 x = x. Hence x ∈ Fix(g2 g1 ).  31. 4624. The number of ways to color each of the outer triples is 31 [43 +4+4] = 24. So N = 13 [243 + 24 + 24] = 4624. 32. 94. G = D9 and N =

9 1 18 [ 3,3,3



+ 6(0) + 2(3!)] = 94.

33. Paths from c0,0 to cn+1,k must pass through exactly one of cn,k−1 or cn,k . These are the two points The number  above cn+1,k in the preceding nrow.   of n paths to cn,k−1 is k−1 . The number of paths to cn,k is k . Hence, n+1 , the k   n number of paths to cn+1,k , must be k−1 + nk .  34. There are nk subsets of size k from {1, 2, . . . , n}. For each k −1 ≤ i ≤ n−1,  i there are k−1 for which i + 1 is the largest element. The point is that, if i + 1 is the largest element selected, then the remaining  k − 1 elements must be chosen i from the set {1, 2, . . . , i}, and there are k−1 ways to make such a choice.

4.7. CHAPTER 7

511

35. We consider paths through Pascal’s triangular grid from S = c0,0 to F = c3n,k . Note that such a path must go through exactly one point c2n,i in the 2nth row. For i = 0, 1, .. . , k, the number of paths from S = c0,0 to F = c3n,k  n through c2n,i is 2n from c0,0 to c2n,i is 2n i k−i . That is, the number of ways i ,   n and the number of ways from c2n,i to c3n,k is 3n−2n = k−i . k−i 36. Here R = “(” and D = “)”. Our binary sequences never have more D’s than R’s at any point. That is, since we want balanced parentheses, as we read from left to right, we can never have more occurrences of “)” than “(”. Of course, in the end we must have the same number of each. 37. Note that |A M {n}| = |A| ± 1. So |A| is even iff |A M {n}| is odd. The same formula A 7→ A M {n} defines both a function and its inverse, since (A M {n}) M {n} = A. This bijection therefore establishes the asserted equality. 100

1 3 3 100 + 3x200 − x300 ). The coefficient of 38. 4371. Use ( 1−x 1−x ) = ( 1−x ) (1 − 3x  107 7 x205 is 207 205 − 3 105 + 3 5 = 4371.

39.

205 202,3,0



= 1414910.

 52 40. 13,13,13,13 . The players are ordered North, East, South, West. We are placing 13 items into each of 4 distinct categories. So we employ the multinomial coefficient. 41. N =

8 1 16 [ 2,2,4



+ 6(0) +

4 1,1,2



+4

4 1,1,2



4 1,1,2



+4

] = 33.

42. (a) (1 + x + x2 + · · · + x10 )(1 + x + x2 + · · · + x8 )(1 + x + x2 + · · · + x12 ) = (10)(83)(12 3) 896 = 8671 ≈ .1033. · · · + 54x9 + · · · . So N = 54. (b) 3 30 (9) (c) The outcomes based on numbers of colors are not equally likely. 1 43. Let ck be the coefficient of xk in (1 + x + x2 )4 = (1 − x3 )4 (1−x) 4 , and suppose k ≥ 12. From the left-hand side, it is obvious that ck = 0. Since 1 the right-hand side equals (1 − 4x3 + 6x6 − 4x9 + x12 ) (1−x) 4 , we see also that      k+3 k k−3 k−6 k−9 ck = k − 4 k−3 + 6 k−6 − 4 k−9 + k−12 .

 16 44. (a) 4,4,4,4 = 63063000.  16 + 2(4!) + (b) G = Z4 and N = 14 [ 4,4,4,4

8 2,2,2,2



] = 15766392.

45. 17. (x+x2 +x3 +x4 +x5 +x6 )(x+x2 +x3 +x4 )(x+x2 +x3 +x4 +x5 ) = · · ·+17x8 +· · · . 46. 10. (x2 + x4 + · · · + x24 )(x3 + x6 + · · · + x24 )(x4 + x8 + · · · + x24 ) = · · · + 10x25 + · · · .

512

4.8

CHAPTER 4. ANSWERS TO ALL EXERCISES

Chapter 8

Section 8.1 s @ @ @sL

1.

N

C

A s sB 

4.

@  B@ H sP s C  P  P A  B @ P  P @ Ps  sA GH B  D B@  @

s @ @ @s

H  AH B s FAs H E

S

r r r

2.

3.

qA  F q AAq E

Ridgeway

qB AAqC qD Bradley

6. Comstock

Winter

r Fairmont r Kenmore r @ r Milton Colby r @ r Rosewood @ Lyme r @ r @ @ r r Clay Berwick @Brockton @ Salmon@r @r Connor @r Blake @r Rockport

5.

u Market @ u South@

u @ @uDaniels

u Park u @ @ @u Center u Main@ @ @ @uHawk u Anselm@u @ @ @ @uFern

7. The graph is simple. It has no loops and no multiple edges. q2 q 1 @3q @q 4 5 q 8. Not simple, since it has a loop.

r

3

r

4

r

2

r

5

r h r

1

6

9. The graph is not simple, because it has multiple edges. Edges a and b are multiple edges, since they both join 1 with 3. 1

q b 2 q a 3q e b @ c q 4

4.8. CHAPTER 8 10.

r

1 a

r

3

c

r

513

16. {{2, 3}, {2, 4}, {2, 5}, {3, 4}, {4, 5}}.

b

2

17. E = {{1, 3}, {3, 5}, {1, 5}}. 11. Yes. The endpoints of {2, 4} and {4, 6} are in W . q 4q

q @3q 5 q 1

2

q6 18. {{6}, {2, 4}}.

12. No, since {2, 4} is not an edge in (f).

19.

qA

qB

 F q

13. No. Edge e needs vertex 4, and 4 6∈ W .

qD

14. Yes.

As

20. 15. E = {{1, 2}, {2, 3}, {2, 5}}. q1 A2 5q Aq   q3

B  s C   B  G s H HH B  HB sE Hs

B

21. No. An endpoint is missing. Alternatively, the flat line might be a loop that is squashed flat and thus intersects itself illegally. 22. No, there is an edge with no vertices. 23. Yes. The drawing has an allowed crossing of two edges. 24. Yes. 25. No. Two edges intersect in infinitely many points. Alternatively, there may be vertices missing from the two places where three curves meet. 26. Yes. 27. Yes. 1, 3, 4. 28. No. 29. Let e 7→ {u, v} be an edge. The walk u, e, v, e, u is not a path. It repeats the vertex u.

514

CHAPTER 4. ANSWERS TO ALL EXERCISES

30. A loop is a cycle. If a and b are two parallel edges, then a, b forms a cycle. 31. Yes. 1, 3, 5, 1. 32. Yes, a loop. 33. 2. The path 1, 3, 4 has length 2, and there is no shorter path from 1 to 4. That is, 1 and 4 are not directly joined by an edge. 34. 2. 35. 2. The path 1, a, 3, e, 4 has length 2, and there is no shorter path from 1 to 4. That is, 1 and 4 are not directly joined by an edge. 36. 1. 37. 5. The path: Berwick, Lyme, Clay, Rosewoood, Brockton, Conner has length 5, and there is no shorter path from Berwick to Conner. 38. 4. 39. Yes. There are no vertex repetitions, and {5, 1}, {1, 2}, {2, 3} are all edges in the graph. 40. No. 41. No. It is a circuit, but vertex 1 is repeated. 42. Yes. 43. (a) Colby, Lyme, Clay, Rosewood. (b) Yes. It has 7 vertices. 44. (a) Main, Market, Fern, Hawk, Center, Park, Main. (b) No. 45. Proof. Suppose d = dist(u, w) ≥ 1. Let P be a path of length d from u to w. Let v be the last vertex on P before w. Let Q be the path from u to v obtained by truncating P . Since Q has length d − 1, it follows that dist(u, v) ≤ d − 1. We claim that dist(u, v) = d − 1. So suppose to the contrary that dist(u, v) < d − 1. Hence, there is a path Q0 of length l < d − 1 from u to v. Form P 0 from Q0 by adding the edge from v to w. So P 0 is a path of length l + 1 < d from u to w. However, there should be no path of length less than d from u to w. From this contradiction it follows that dist(u, v) = d − 1.  46. (a) u forms a path of length 0. (b) Let P be a walk from u to v of length dist(u, v). Since the reverse of P is a walk from v to u of length dist(u, v), it

4.8. CHAPTER 8

515

follows that dist(v, u) ≤ dist(u, v). By symmetry, the opposite inequality also holds. (c) Let P be a walk from u to v of length dist(u, v), and let Q be a walk from v to w of length dist(v, w). The length of the concatenated walk P, Q from u to w is dist(u, v) + dist(v, w). Hence, dist(u, v) ≤ dist(u, v) + dist(v, w). 47. Proof. Let P and Q be distinct paths from u to v. We can find a portion of P followed by a portion of Q that forms a cycle. t u t

t x@ @t y

Q P

zt tv

Since P and Q must be different at some point after u, let y be the first vertex in P that is not in Q. So the vertex x in P immediately preceding y must also be in Q. Since P and Q become different after vertex x but both end up at vertex v, let z be the first vertex in P that is after x (and y) and is common to P and Q. Notice that the portion of P strictly between x and z has nothing in common with Q. Therefore, the walk which follows P from x to z and then follows Q backwards from z to x forms a cycle in G.  48. (a) u is a path. (b) The reverse of a path is a path. (c) Let P denote a path from u to v, and let Q denote a path from v to w. Let P 0 be P with v removed from its end. So the concatenation of P and Q, namely P 0 , Q is a walk from u to w. By Lemma 8.1 we now have a path from u to w. 49. Sketch. By symmetry, we must start along edge 3 or edge 4. Case 1 : If we take edge 3, then without loss of generality, we take edge 1. We must then, without loss of generality, take edge 5. We then finish with 7, 4, 2 or 7, 4, 6 or 6, 2 or 6, 4, 7 and get stuck without hitting every edge. Case 2 : If we take edge 4, then without loss of generality, we take edge 1. Subcase 2a: Take edge 3 next, then 7, and, without loss of generality, 5. After taking 2 or 6 we get stuck. Subcase 2b: Take edge 2 next, and then, without loss of generality, 5. If we take 6, then we get stuck. Otherwise, we take edge 7, then take 3, and get stuck.  At @ 1 @3 2 @ 4 t @tC B 6 7 5 t D 50. 5.

516

CHAPTER 4. ANSWERS TO ALL EXERCISES

51. (a) n = 2, 3, 4, 5, or 6. (b) 2. L s ondon

Chicagos

s New York sRome

s L.A.

s Honolulu

s Houston

n = 2: Honolulu, Chicago, London. n = 3: Honolulu, L.A., New York, London. n = 4: Honolulu, L.A., Houston, New York, London. n = 5: Honolulu, L.A., Houston, New York, Rome, London. n = 6: Honolulu, L.A., Chicago, Houston, New York, Rome, London. Of course, 2 is the length of the shortest path. 52. Chicago, Houston, L.A., New York. 53. Calculus and Discrete Math. They are the only classes that are not joined to Astronomy by an edge. Astr s sBio  A  A   As Fr s  Calc   A A   As  s Eng Disc

54. No.

Section 8.2 1.

q 2q 3q 4q

1

4. 2.

3.

r A r Ar  q1  6 q

q2 AAq3

AAq 5

q4

5.

r

r

r

r

q1 q2  J

A 6 3 q J

Aq AAq Jq  5

6.

r

4

r  r r HHr

r

4.8. CHAPTER 8 (1, 1) rH r(2, 1) HHr r  (1, 2)   (2, 2) r  (1, 3) 

7.

r H  rH J r C H  B@ H C J  H 

H rB @  C Jr P r   @BP @ PCr

8.

517

9.

q 1q

0

There are two binary sequences of length one. 10.

r

r

r

r

11. (a) P7 . Colby, Ridgeway, Milton, Rosewood, Brockton, Connor, Blake. (b) Yes. The blue line is P7 , the black line is P7 , and the gray line in P4 . (c) Colby, Lyme, Milton. Parts of both the gray line and the blue line are used. 12. (a) C6 . (b) No. (c) Main, Park, Center, Anselm, Main. 13. (a) No. Nord is not adjacent to Sud. (b) Just exclude Sud. That is, consider the subgraph induced by the other three vertices. 14. (a) Yes. Every pair of vertices is joined by at least one edge. (b) No. Edges 1 and 4 are multiple edges. 15. (a) No. C4 is a subgraph of K4 that is not complete. (b) Yes. Suppose u and v are vertices in the induced subgraph. Since there is an edge joining u and v in the complete graph, that edge must be present in the induced subgraph. 16. Yes. 17.

Calculus Diff Eq Discrete Math Linear Algebra Group Theory

rC.S. r H @HH

rMath rJ HJ @



r @ H r H Physics J 



J rChemistry r 

r

18.

Albert Bob Charles David

rAlice r @ J

r r Beth HJ@

@rCindy r H JH  J rDorothy r



19. Yes. Let V1 contain the odd-numbered vertices, and V2 the even. In Pn , each vertex k can only be adjacent to k − 1 and k + 1. Since k − 1 and k + 1 do not have the same parity as k, every edge must join an odd-numbered vertex to an even-numbered vertex. 20. Apply Theorem 8.4. Note that the only cycle in Cn is Cn itself. 21. Proof. Let H be a subgraph of a bipartite graph G. Let V1 , V2 bipartition G, and let W be the vertex set of H. We claim that W ∩ V1 , W ∩ V2 bipartition

518

CHAPTER 4. ANSWERS TO ALL EXERCISES

H. Suppose e is an edge of H. Since e is an edge of G, e must have one end v1 in V1 and the other end v2 in V2 . Since v1 and v2 must be vertices of H, we have v1 ∈ W ∩ V1 and v2 ∈ W ∩ V2 . This establishes our claim.  22. False. C3 is not bipartite, but the subgraph P2 is bipartite. 23. It is not bipartite, because it contains a 3-cycle. r r r r r 24. {1, 3, 5} and {2, 4, 6} form a bipartition. 25. |V | = n and |E| = n − 1. Note V = {1, 2, . . . , n} and E = {{1, 2}, {2, 3}, . . . , {n − 1, n}}. 26. |V | = n and |E| = n. n 2

27. |V | = n and |E| =



. Note V = {1, 2, . . . , n} and E = P2 (V ).

28. |V | = m + n and |E| = mn. 29. |V | = 8 and |E| = 12. r r r

32. |V | = 12 and |E| = 30.

r r

33. |V | = 16 and |E| = 32.

r

r

r

r

r r

30. |V | = 6 and |E| = 12. 31. |V | = 20 and |E| = 30. t r r r r r r r r r r

r

r r

r t

r

r

r r

r r

r r

r r

r r r

r

r

r

r 34. |V | = 32 and |E| = 80.

35. No. They differ by more than one digit. See the fourth and fifth digits. 36. 4.

4.8. CHAPTER 8

519

37. (a) 1101. The nearest code word is 1101010 and corresponds to the message 1101. (b) Male, A+ . See message 1101 in Table 8.2. 38. (a) 1000. (b) S. 39. n − 1. No two vertices are farther apart than 1 and n. 40. b n2 c. 41. 1, for n ≥ 2. No two vertices are farther apart than 1 and 2. 42. 2. 43. 3. No two vertices are farther apart than 000 and 111. 44. 2. 45. 5. No two vertices are farther apart than the two displayed large in the above answer to Exercise 31. 46. 3. 47. 4. No two vertices are farther apart than 0000 and 1111. 48. 5.

Section 8.3 A

1.

2.

A B C D E F       A=     

       0 1 0 1 1 1 0 0

0 1 1 0 1 1

1 0 1 0 0 1 0 1

B C D E 1 1 0 1 0 1 1 0 1 0 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 1 0

1 0 1 0 0 0 1 1

1 0 1 0 0 1 1 0

1 1 0 0 1 0 0 1

1 1 0 1 1 0 0 0 1 1 1 0 0 1

F        0 1 0 1 0 1 1 0

           

520 3. 1 2 3 4 5 6

CHAPTER 4. ANSWERS TO ALL EXERCISES

 1 0  0   0   1   0 0

4.

    A=   

2 0 0 0 1 0 0 0 1 1 0 0 0

3 0 0 0 1 0 0 1 0 1 0 0 0

4 1 1 1 0 1 1 1 1 0 1 0 0

5 0 0 0 1 0 1 0 0 1 0 1 1

6 0 0 0 1 1 0 0 0 0 1 0 1

7.



2 5 1 4 6 3

   = A    

0 0 0 1 1 0

8.



 2 0  0   0   1   0 0     A=   

      

1 2 3 4 5 6 6.

       

1 0 1 0 0 0 1

2 1 0 1 0 1 0 

  A=  

0 1 1 1 0

3 0 1 0 1 0 0 1 0 1 1 1

11. (1, 1) (1, 2) (2, 1) (2, 2) (2, 3) (2, 4) 12.

4 0 0 1 0 1 0 1 1 0 1 0

5 0 1 0 1 0 1 1 1 1 0 1

6 1 0 0 0 1 0 0 1 0 1 0

 (1, 1) 0  0   1   1   1 1

    = A    

10.

     A=     

     

(1, 2) 0 0 1 1 1 1  0  1  A=  0  0 1

1 2 3 4 5 

(2, 1) 1 1 0 0 0 0 1 0 1 0 0

0 1 0 1 0

0 1 1 0 0 1

1 0 0 0 1 0 0

0 1 1 0 1 0 0 0

1 0 0 1 0 1 0 0

4 1 1 1 0 1 1

1 0 0 1 1 0

 1 0  1   1   1 1

9.

5.

5 0 0 0 1 1 0

1 0 0 0 0 1 2 1 0 1 1 1

1 0 0 1 0 0 1 0

(2, 2) (2, 3) 1 1 1 1 0 0 0 0 0 0 0 0  0 1 0 0   1 0   0 1  1 0

6 0 1 0 1 0 0 0 1 0 0 1 0 3 1 1 0 1 1

0 1 1 0 0 0 0 1

3 0 0 0 1 0 0

(2, 4) 1 1 0 0 0 0

   = B    

0 1 0 1 0 0 4 1 1 1 0 1

1 0 0 0 0 1 1 0



1 0 1 0 0 0 5 1 1 1 1 0

0 1 0 0 1 0 0 1

       

       

      0 0 1 0 1 0 0 1

0 0 0 1 0 1 1 0

           

4.8. CHAPTER 8

521

13. r

r2

hr

r

1

4



16 18

13 9





26 10

14 5 



15. 16.  17. 

7 6

6 7

0 19.  1 8

2 0 3



23.

r2

r

r

r3

5

4

5

3(4) + 2(2) = 16, 3(1) + 2(5) = 13, 4(4) + 1(2) = 18, 4(1) + 1(3) = 9.

20.  



21.   7 4  0

   P =   

r

1





(a)

14.

5 8

8 5

18.

r3

0 0 1 0 0 0

 22. 

1 0 0 0 0 0

0 0 0 0 0 1

0 0 0 1 0 0

0 1 0 0 0 0

0 0 0 0 1 0



P AP T



    (b)   



(c)

 7 5 0 9 0 1  0 3 6  0 24 9 8 4 10  30 5 35  16 8 20 0 56 21  36 6 42

   =   

0 0 0 1 0 0

0 0 0 1 1 0

   PA =    

0 0 0 1 0 0

1 1 1 0 1 1

0 1 0 1 0 0

0 0 0 1 0 0

0 0 0 1 0 0

0 0 0 1 0 0



0 0 0 1 0 0

1 1 1 0 1 1

0 0 0 1 1 0

0 1 0 1 0 0

       

      

(a) Note that the rows of the identity matrix I6 have been permuted according to the permutation 2, 5, 1, 4, 6, 3. (b) Note that the rows of A have been permuted according to the permutation 2, 5, 1, 4, 6, 3. (c) This is the same as the answer from Exercise 7. 24.



(a)

   P =   

0 0 1 0 0 0

0 0 0 0 0 1

1 0 0 0 0 0

0 1 0 0 0 0

0 0 0 0 1 0

0 0 0 1 0 0

     (b)   

    PA =    

1 0 0 0 0 1

1 0 1 0 0 0

0 1 1 0 0 1

1 0 0 1 1 0

0 1 0 1 0 0

0 1 0 0 1 0

       

522

CHAPTER 4. ANSWERS TO ALL EXERCISES  P AP T

(c)

   =   

0 1 1 0 0 0

1 0 1 0 0 0

1 1 0 1 0 0

0 0 1 0 1 1

0 0 0 1 0 1

0 0 0 1 1 0

       

The same as the answer from Exercise 4. 25.

    2 A =   

1 1 1 0 1 1

1 1 1 0 1 1

1 1 1 0 1 1

0 0 0 5 1 1

1 1 1 1 2 1

1 1 1 1 1 2

    .   

For example, for each 1 ≤ i ≤ 6, the entry of A2 in position (i, i) is the number of edges incident with vertex i.   2 1 1 1 0 0 26.  1 2 1 1 0 0     1 1 3 0 1 1  2   A =   1 1 0 3 1 1   0 0 1 1 2 1  0 0 1 1 1 2

27.

    2 A =   

2 0 1 0 2 0

0 3 0 2 0 2

1 0 2 0 2 0

0 2 0 2 0 1

2 0 2 0 3 0

0 2 0 1 0 2

    .   

For example, the two of length 2 from vertex 1 to vertex 5 are 1, 2, 5 and 1, 6, 5.   3 2 2 2 2 28.  2 4 2 3 1     A2 =   2 2 3 2 2   2 3 2 4 1  2 1 2 1 2

29. 0, 6, and 0, respectively. E.g. The number of walks from 1 back to 1 of length 4 is 2 + 2 + 2 = 6. 30. 0, 6, and 2, respectively. E.g. The number of walks from 1 back to 1 of length 4 is 3(2) = 6. 31. 2, 0, and 5, respectively. E.g. The number of walks from 1 back to 1 of length 6 is 1 + 1 + 3 = 5. 32. 6, 30, and 186, respectively. E.g. The number of walks from 1 back to 1 of length 3 is 6(5) = 30, and those of length 4 is 6(6 + 5 + 5 · 3) = 186. 33. Proof. Let i, j be vertices. (→) Suppose there is a path from i to j. So, for some 0 ≤ k ≤ n − 1, there is a path of length k from i to j. So Ak has a positive value in entry i, j. So I + A + · · · + Ak + · · · + An−1 has a positive value in entry i, j. (←) The previous argument is reversible.  34. Let G be any graph on n vertices, and let A be an adjacency matrix for G. Two vertices i and j are in the same component if and only if the (i, j)-entry of I + A + A2 + · · · + An−1 is nonzero.

4.8. CHAPTER 8

523

35. 1 : 4; 2 : 4; 3 : 4; 4 : 1, 2, 3, 5, 6; 5 : 4, 6; 6 : 4, 5. 36. 1 : 2, 3; 2 : 1, 3; 3 : 1, 2, 4; 4 : 3, 5, 6; 5 : 4, 6; 6 : 4, 5. 37. 1 : 2, 6; 2 : 1, 3, 5; 3 : 2, 4; 4 : 3, 5; 5 : 2, 4, 6; 6 : 1, 5. 38. 1 : 2, 3, 4; 2 : 1, 3, 4, 5; 3 : 1, 2, 4; 4 : 1, 2, 3, 5; 5 : 2, 4. 39. 000 : 001, 010, 100; 001 : 000, 011, 101; 010 : 000, 011, 110; 011 : 001, 010, 111; 100 : 000, 101, 110; 101 : 001, 100, 111; 110 : 010, 100, 111; 111 : 011, 101, 110. 40. (1, 1) : (2, 1), (2, 2), (2, 3); (1, 2) : (2, 1), (2, 2), (2, 3); (1, 3) : (2, 1), (2, 2), (2, 3); (2, 1) : (1, 1), (1, 2), (1, 3); (2, 2) : (1, 1), (1, 2), (1, 3); (2, 3) : (1, 1), (1, 2), (1, 3). 41. 3r r @ @2r @r r @

1

7

6

42.

r4 r

5

r1

r2

r3

r

r

r

q

(1,1)

q

(2,2)

4

5

6

Section 8.4 1. Define f (1) = 3, f (2) = 4. q

1

q

2

q

3

q

4

2. 1 7→ 4, 2 7→ 5, 3 7→ 6 gives an isomorphism. 3. Define f (1) = (2, 1), f (2) = (1, 1), f (3) = (2, 2). q q (2,1) 1 2 3 (1,1) H q q q Hq (2,2)

(2,1)

q

4. 1 7→ (1, 1), 2 7→ (2, 1), 3 7→ (1, 2), 4 7→ (2, 2) gives an isomorphism. 5. Define f (1) = 7, f (2) = 8, f (3) = 9, f (4) = 6, f (5) = 10. Also match up the parallel edges connecting 1 and 4 with those connecting 6 and 7. 7q 8q 1q 2q 3q 9q q

4

q

5

q

6

q

10

6. 1 7→ 9, 2 7→ 8, 3 7→ 7, 4 7→ 6, 5 7→ 10, and pair the parallel edges joining 2 and 3 with those joining 8 and 7.

524

CHAPTER 4. ANSWERS TO ALL EXERCISES

7. Define f (1) = 9, f (2) = 6, f (3) = 10, f (4) = 7, f (5) = 8.             1

2

  

  

3

  

4

5

9

6

  

  

10

  

7

8

8. 1 7→ 10, 2 7→ 7, 3 7→ 8, 4 7→ 9, 5 7→ 6 gives an isomorphism. 9. Define f (1) = 8, f (2) = 9, f (3) = 6, f (4) = 7, f (5) = 10. 8 9 1 2 e e e e e 4

e

e

e

3

e

7

5

e

6

10

10. 1 7→ 10, 2 7→ 6, 3 7→ 7, 4 7→ 9, 5 7→ 8 gives an isomorphism. 11. (a) We can define f (A) = G, f (B) = J, f (C) = H, f (D) = K, f (E) = I, and f (F ) = L. qA  F q AAq E

qB AAqC q D

qG  L q AAq I

qJ AAqH q K

(b) Time Period 1 2 3

Study Group Meeting German, Kuwait Indochina, Japanese History, Latin

We simply use the isomorphism to make substitutions in the given schedule. 12. (a) We can define f (A) = J, f (B) = O, f (C) = I, f (D) = K, f (E) = P , f (F ) = L, f (G) = M , and f (H) = N . Time Period Committee Meeting (b) 1 I, J, N 2 K, O, P 3 L, M 13. Define f (1, 1) = 1, f (1, 2) = 3, f (1, 3) = 5, f (2, 1) = 2, f (2, 2) = 4, and f (2, 3) = 6. q q(1,1)  J

AAq(2,1) (1,3) q

J AAq Jq  (2,3)

(2,2)

(1,2)

q6 q1  J

A 5 q Aq2

 J AA

q Jq 4

3

4.8. CHAPTER 8

525

14. Take the inner 5-cycle with the top-most vertex and stretch it to become an outer 5-cycle. 15. Define f (0) = 15, f (1) = 12, f (2) = 14, f (3) = 13, f (4) = 11, f (5) = 8, f (6) = 10, f (7) = 9.

5

q

4

q

1

0

q q

q7 q6

q3 q2

12

q

15

q

8

q

11

q

q 13

q9 q 10

q 14

16. 1 7→ 7, 2 7→ 8, 3 7→ 9, 4 7→ 11, 5 7→ 12, 6 7→ 10 gives an isomorphism. 17. From the first graph to the second graph, define ∀ i, f (i) = i + 10. The same formula works from the second to the third. 1s Z  s Z 6 Z 2 5X  Zs s Xs C  s L 10l  C , 7 L , lCCs8 sl L 9 , A LLs A s 4 3

11 s Z  s Z 16 Z 12  15X Zs s s Xs C  L 20l  C , 17 L , lCCs18 sl L 19 , A LLs A s 14 13

21 s Z  s Z 26 Z 22 25 s s X Xs C sZ L 30l  C , 27 L , lCCs28 sl L 29 , A LLs A s 24 23

18. a 7→ 10, b 7→ 4, c 7→ 6, d 7→ 2, e 7→ 5, f 7→ 3, g 7→ 1, h 7→ 11, i 7→ 8, j 7→ 7, k 7→ 9, l 7→ 12 gives an isomorphism. 19. 3! · 2 = 12. The vertices {1, 2, 3} can be permuted in any of 3! ways. Vertex 4 must stay put. Vertices {5, 6} can be permuted in either of 2 ways. 20. 2 · 2 · 2 = 8. 21. 2 · 2 = 4. There is a vertical line of symmetry and a horizontal line of symmetry. For each line of symmetry, we have the 2 choices: reflect or not. 22. 2 · 2 = 4. 23. |Dn | = 2n. We have the n rotations, and the n reflections. See Definition 7.3 for the description of the dihedral group Dn . 24. 2. 25. 2(n!)2 . Let V1 = {(1, 1), . . . , (1, n)} and V2 = {(2, 1), . . . , (2, n)}. The set V1 can be permuted in any of n! ways, the set V2 can be permuted in any of n! ways, and we can either switch V1 with V2 or not (2 choices).

526

CHAPTER 4. ANSWERS TO ALL EXERCISES

26. m!n!. 27. Proof. Suppose that v0 , e1 , v1 , . . . , vn is a path in a graph G and that f : G −→ H is an isomorphism. Since v0 , e1 , v1 , . . . , vn is a walk in G, it follows that f (v0 ), f (e1 ), f (v1 ), . . . , f (vn ) is a walk in H. Since there are no vertex repetitions in the list v0 , v1 , . . . , vn and fV is a bijection, there cannot be any repetitions in the list f (v0 ), f (v1 ), . . . , f (vn ). Hence, f (v0 ), f (e1 ), f (v1 ), . . . , f (vn ) is a path in H.  28. The restriction of f to K gives the desired isomorphism. 29.

1s Z  s Z 6 Z 2  5X Zs s Xs C  s L 10l  C , 7 L , lCCs8 sl L 9, A LLs As 4 3

{3, 4}

{1, 2} s Z  s Z {3, 5}Z  s X s{4, 5} Xs C sZ L{1, 5}l  C ,{2, 3} L{1, 4} l lCCs{2, 4} , L s, A LLs A s

{2, 5}

{1, 3}

30. Use the description of the Petersen graph given in Exercise 29. Given any two vertices {a, b} and {c, d}, extend the assignments a 7→ c and b 7→ d to an automorphism of the set {1, 2, 3, 4, 5}. This then determines an automorphism on P2 ({1, 2, 3, 4, 5}) and hence on the Petersen graph. 31. Sketch. It suffices to show that the cycles 6, 8, 10, 7, 9, 6 and 1, 2, 7, 10, 5, 1 and 6, 8, 3, 4, 9, 6 all work. Rotations handle the rest.  1s Z  s Z 6 Z 2 5X  Zs s s Xs C  L 10l  C , 7 L , lCCs8 sl L 9, A LLs A s 4 3 To send 1, 2, 3, 4, 5, 1 to 6, 8, 10, 7, 9, 6, define f (1) = 6, f (2) = 8, f (3) = 10, f (4) = 7, f (5) = 9, f (6) = 1, f (7) = 3, f (8) = 5, f (9) = 2, f (10) = 4. To send 1, 2, 3, 4, 5, 1 to 1, 2, 7, 10, 5, 1, define g(1) = 1, g(2) = 2, g(3) = 7, g(4) = 10, g(5) = 5, g(6) = 6, g(7) = 3, g(8) = 9, g(9) = 8, g(10) = 4. To send 1, 2, 3, 4, 5, 1 to 6, 8, 3, 4, 9, 6, define h(1) = 6, h(2) = 8, h(3) = 3, h(4) = 4, h(5) = 9, h(6) = 1, h(7) = 10, h(8) = 2, h(9) = 5, h(10) = 7. 32. Sketch. It suffices to consider the paths 1, 2, 3 and 6, 8, 10 and 1, 6, 8 and 1, 6, 9. Rotations handle the rest. 

4.8. CHAPTER 8

527

33. Proof. Note that the vertex set of Cn is {1, 2, . . . , n}. Among the automorphisms of Cn are the rotations rk for k ∈ Z. Let i and j be arbitrary vertices in Cn . The rotation rj−i moves i to j. That is, rj−i (i) = i + (j − i) = j.  34. It suffices to show that (1, 1) can be mapped to any vertex (a, b). If a = 1, then switch (1, 1) and (1, b) and leave all remaining vertices fixed. If a = 2, first switch (2, c) with (1, c) for each 1 ≤ c ≤ n, and then switch (1, 1) and (1, b) as above. 35. Proof. Let G = (V, E) and H = (W, F ) be graphs. Suppose G ∼ = H. So we have an isomorphism f : G −→ H. Define f −1 : H −→ G by taking fV−1 : VH −→ VG to be the inverse of fV : VG −→ VH and fE−1 : EH −→ EG to be the inverse of fE : EG −→ EH . The point is that fV and fE are bijections. So the inverses fV−1 and fE−1 exist and satisfy fV−1 ◦fV = idV and fE−1 ◦fE = idE . (See Theorem 5.10.) To see that f −1 is a graph isomorphism, it suffices to check that f −1 is a graph map. So suppose w1 , w2 ∈ W and e is an edge joining w1 and w2 . Since fV is a bijection, we have v1 , v2 ∈ V such that f (v1 ) = w1 and f (v2 ) = w2 . Since f (v1 ) and f (v2 ) are joined by the edge e, vertices v1 and v2 must be joined by an edge d such that fE (d) = e. Thus, fE−1 (e) = d joins fV−1 (w1 ) to fV−1 (w2 ). We conclude that H ∼ = G.  36. Sketch. Suppose f : G −→ H and g : H −→ K are isomorphisms. Define h : G −→ K by taking hV = gV ◦ fV and hE = gE ◦ fE . Observe that h is an isomorphism.  37. Proof. (→) Suppose G is vertex transitive. Let u be a vertex of G. For every vertex v in G, there is an automorphism f of G such that f (u) = v (by the definition of vertex transitive). (←) Suppose there is a vertex u such that, for all vertices v, there is an automorphism f of G such that f (u) = v. Suppose v1 , v2 ∈ V . So there exist automorphisms f1 and f2 such that f1 (u) = v1 and f2 (u) = v2 . Let f = f2 ◦ f1−1 . Observe that f is an automorphism and f (v1 ) = v2 . Since v1 and v2 are arbitrary, G is vertex transitive.  38. False. C4 is vertex transitive, but the subgraph P3 induced by {1, 2, 3} is not vertex transitive. 39. Sketch. (→) Suppose f : G −→ H is an isomorphism, and let D : H −→ R2 be any drawing of H. Then D ◦ f : G −→ R2 is a drawing of G with the same image.  The point is that a drawing provides a map from the vertex set of a graph to a set of points in the plane R2 . Also, each edge is assigned to a curve in R2 . Using fV and fE , we can therefore construct a drawing for G from a drawing for H.

528

CHAPTER 4. ANSWERS TO ALL EXERCISES

40. The point is that {f (vi ), f (vj )} is an edge if and only if f (vj ) is in the adjacency list of f (vi ). 41. Define f (1) = f (2) = f (3) = f (5) = 5, f (4) = 4, f (6) = 6. q

q q5 q 4q 3q q6

1

1 2

q

2

q3

q

q5

4

q6

42. 1 7→ 1, 2 7→ 2, 3 7→ 1, 4 7→ 3, 5 7→ 4, 6 7→ 3. 43. Sketch. Suppose there is one. Without loss of generality, say f (1) = 1 and f (2) = 2. If f (3) = 3, then {1, 3} needs to be an edge of C4 . If f (3) = 4, then {2, 4} needs to be an edge of C4 . Thus, f cannot exist.  q

1

3

q

1

q

q2

q

q3

q2 4

44. Proof. Suppose to the contrary that there is a graph map f : C5 −→ K2 . We may assume that f (1) = 1. It follows that f (2) = 2, f (3) = 1, f (4) = 2, and f (5) = 1. Since {1, 5} is an edge in C5 and there is no loop at 1 in K2 , we cannot have f (1) = f (5). So, this is a contradiction.  45. No. Triangle 1, 2, 3 has no place to go. There is no triangle in graph (c). 46. No. The subgraph K4 of (d) has no place to go in (a). 47. ∀ i, define f (1, i) = 1 and f (2, i) = 2. Recall that Km,n has bipartition V1 , V2 , where V1 = {(1, i) : 1 ≤ i ≤ n} and V2 = {(2, i) : 1 ≤ i ≤ n}. Also, P2 has vertex set {1, 2}. We map V1 to 1 and V2 to 2. Since all edges of Km,n join V1 to V2 , this is a graph map. 48. If n is even, map Cn onto the subgraph K2 of K3 . If n is odd, then map {1, . . . , n − 1} onto K2 and map n to 3. 49. m ≤ n. When m ≤ n, we can map Km into Kn as a subgraph. If m > n, then we are forced to map two vertices of Km to the same vertex of Kn . However, there is no place to put the edge joining those two vertices in Km . That is, there are no loops. 50. All m,n.

Section 8.5 1. (a) has 6 vertices, whereas (d) has only 5. So apply the contrapositive of Theorem 8.8(i).

4.8. CHAPTER 8

529

2. (a) has 6 edges and (b) has 7 edges. 3. (a) has 6 edges, whereas (c) has 7. So apply the contrapositive of Theorem 8.8(ii). 4. (b) has 6 vertices and (d) has 5 vertices. 5. 5, 2, 2, 1, 1, 1. That is, deg(4) = 5, deg(5) = 2, deg(6) = 2, deg(1) = 1, deg(2) = 1, and deg(3) = 1. We happened to use the ordering 4, 5, 6, 1, 2, 3 for the vertices (which gave us a nonincreasing degree sequence), but any ordering suffices. 6. 3, 3, 2, 2, 2, 2. 7. 3, 3, 2, 2, 2, 2. That is, deg(2) = 3, deg(5) = 3, deg(1) = 2, deg(3) = 2, deg(4) = 2, and deg(6) = 2. We happened to use the ordering 2, 5, 1, 3, 4, 6 for the vertices (which gave us a nonincreasing degree sequence), but any ordering suffices. 8. 4, 4, 3, 3, 2. 9. δ((b)) = 2 and δ((g)) = 1. So (b) 6∼ = (g) by Theorem 8.11(iii) (its contrapositive). 10. Different ∆. 11. They do not have a common degree sequence. So Theorem 8.11(i) tells us that they are not isomorphic. 12. Different degree sequences. 13. The subgraph induced by the degree 3 vertices is P2 on the left graph and Φ2 on the right graph. See Exercise 28 in Section 8.4. A graph isomorphism would have to map the degree 3 vertices from the left graph to the degree 3 vertices on the right graph. However, the right graph is then missing a needed edge. 14. The vertices of degree 2 are adjacent in the graph on the left but not in the graph on the right. 15. The computers of degree 3 are adjacent in the left configurations, but not in the right. See Exercise 28 in Section 8.4. A graph isomorphism would have to map the degree 3 vertices from the left graph to the degree 3 vertices on the right graph. However, the right graph is then missing a needed edge.

530

CHAPTER 4. ANSWERS TO ALL EXERCISES

16. The graph on the left has a vertex of degree 4 and the graph on the right does not. 17. The grid on the left has a power station of degree 4, and that on the right does not. The graphs therefore have different degree sequences. In particular, they have different maximum degrees. So Theorem 8.11 tells us that they are not isomorphic. 18. The graph on the left has δ = 3, while that on the right has δ = 2. 19. All vertices in the first graph have degree 4, while vertex “German” in the second graph has degree 3. The graphs therefore have different degree sequences. In particular, they have different maximum degrees. So Theorem 8.11 tells us that they are not isomorphic. 20. All vertices in the first graph have degree 4, while vertex J in the second graph has degree 5. 21. Group them according to the numbers of vertices n and edges m. q,

n=1

q q,

n=2 n=3 n = 4, m ≤ 2 n = 4, m = 3 n = 4, m ≥ 4

q q q, q q q q, q q @ q q, q q @ q q,

q q q q q q q

q

q q, q, q q, q q, q q,

q qAq , q q q q, q q q q, q q q q,

q qAq , q q q q, q q @ q q.

22. Φ5 , P2 + Φ3 , P3 + Φ2 , P2 + P2 + Φ1 , C3 + Φ2 , K1,3 + Φ1 , P4 + Φ1 , P3 + P2 , C4 + Φ1 , K1,4 , P5 , C3 + P2 , C5 , K4 + Φ1 , K5 , and the pictured graphs q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q , q q , q@q , q q , q q , @ q q , q q , q q , @ q q , q q , q q q qHq q qHq q qH q  q q H q q q q q q q q q q q q q q q q , q Hq , q Hq , q Hq ,  q Hq , @ q q , q@q , @ q q , q@q . 23.

q q q q@q q ,

q q q q q q,

q q q q q q,

q q q q q q,

q q q q q q.

We have grouped them according to how many vertices are isolated. Within that, we see that there are two possibilities with two vertices isolated. Those are distinguished by their maximum degrees. 24. C4 + Φ2 , K1,4 + Φ1 , P5 + Φ1 , C3 + P2 + Φ1 , K1,3 + P2 , P4 + P2 , P3 + P3 , and the pictured graphs q q q q q q q q q , @ q q q .

4.8. CHAPTER 8

531

25.

q q @q Aq q Aq There are 6 vertices. So the degree 5 vertex must be adjacent to each of the other vertices. When the vertex of degree 5 is removed, it leaves a graph with degree sequence 2, 1, 1, 1, 1. There is only one possibility for this, as shown in Exercise 26. So we have only one possible graph here. 26. None. 27. None. An odd number of odd-degree vertices is not possible. See Corollary 8.14. q q 28. q@q 29.

q q q q @q Aq @ q Aq q Aq q Aq , There are 6 vertices. First form the vertex of degree 4. Note that exactly one vertex v is not a neighbor of the degree 4 vertex. Now, there are two edges left to place, and there are only two different ways to place them. Either one or both will be adjacent to v. q q q H @q q @q

30.

and

q q q q q q . @

31. Proof. P Suppose not. So there is an P odd number of odd-degree vertices. Hence, v∈V deg(v) is odd. However, v∈V deg(v) = 2|E|, and 2|E| is even. This is a contradiction.  32. 2|E| =

P

v∈V

deg(v) =

P

v∈V

r = r|V |.

33. |V | = 2n and |E| = n2n−1 . Recall that V is the set of binary P sequences of length n. Observe that each vertex has degree n. So 2|E| = v∈V deg(v) = n2n . P

deg(v)

2m 2m = 2|E| 34. δ(G) ≤ v∈V|V | |V | = n and δ(G) ∈ Z, so δ(G) ≤ b n c. The bound is achievable, e.g. for G = Cn .

35.

q q5  4q q@ H 3q @q6 H 1 2

The edges appear here exactly where they do not appear in graph (a).

532

CHAPTER 4. ANSWERS TO ALL EXERCISES q 1q 5q 3q @@ q q

4

36.

2

37.

6

q6 q1 J

2 5q

q J 4 q Jq 3

The edges appear here exactly where they do not appear in graph (c). q2 1 q 38. 5 q q4 3 q 39. Define f : C5 c −→ C5 by f (1) = 1, f (2) = 3, f (3) = 5, f (4) = 2, f (5) = 4. 1s 1s Z  B  Z s2 Zs2 5 s  B 5 s  Z B    B Z B  Z B   s ZBs Bs s 4 3 4 3 40. 1 7→ 2, 2 7→ 4, 3 7→ 1, 4 7→ 3 gives an isomorphism. 41. C6 . 6

q1  q AAq 2

q5 AAq3 q 4

The vertices are in a different order, but the graph is isomorphic to C6 . 42. P5 . 43. The complements C6 and C3 + C3 , respectively, are not isomorphic. One is connected, and the other is not. Exercise 27 from Section 8.4 can also be used to see C6 ∼ 6 C3 +C3 , since the path = 1, 2, 3, 4 in C6 cannot be mapped to a path in C3 + C3 , under any isomorphism. 44. The complements are C4 + C4 and C5 + C3 are not isomorphic. Exercise 28 from Section 8.4 can be used to see this, since the cycle A, B, C, H in C4 + C4 cannot be mapped to a cycle in C5 + C3 , under any isomorphism. 45. Proof. Suppose G ∼ = H. So we have an isomorphism f : G −→ H. Thus, fV : VG −→ VH and fE : EG −→ EH are bijections. Note that the bijection fV determines a bijection between P2 (VG ) and P2 (VH ). Hence, we have a bijection fE c : P2 (VG ) \ EG −→ P2 (VH ) \ EH . The bijections fV and fE c thus determine an isomorphism f : Gc −→ H c . Hence Gc ∼ = H c. 

4.8. CHAPTER 8

533

46. E = EG c ∪ EG = P2 (V ). 47. The idea is in the proof for Exercise 45. Let G = (V, E) be a simple graph. The point is that a bijection f : V −→ V determines a bijection f : E −→ E mapping edges to edges iff it determines a bijection f : E c −→ E c mapping non-edges to non-edges. 48. Since graph isomorphisms respect adjacencies, they also respect non-adjacencies. Adjacency in Gc is non-adjacency in G. 49. True. Proof. Let G be vertex transitive and v, w ∈ V . So we have an automorphism f with f (v) = w. By Lemma 8.10, deg(w) = deg(v). Since v, w are arbitrary, G must be regular.  50. False. Take 8 cycle, add a diameter, then perpendicular to that one add three parallel. q q

q q q q q q

51.

q q

q

This is one graph with two components. 52.

q

1

q

q3

q

4

2

53.

q5

q6  5 q AAq 4

q6

q12  11 q AAq 10

q7 A q8 A  q 9

q1 q2 q3

Note that both (a) and (c) have vertex set {1, 2, 3, 4, 5, 6}. The edges they have in common are {3, 4}, {4, 5}, and {5, 6}. q6 q1 54. 

AAq2 5 q

AA

q 3 4 q 55.

q6  5 q AAq 4

q1 AAq2 q3

Note that edges {1, 3} and {4, 6} are the only edges in (b) that are not already in (c).

534

CHAPTER 4. ANSWERS TO ALL EXERCISES

56. P6 . t(1,3) t(2,3) t(3,3)

57.

t(1,2) t(2,2) t(3,2) t(1,1) t(2,1) t(3,1) We have three copies of P3 that are connected in a path (like P3 ). q q q q 58. q q q q t t t t B t B t B B BBt BBt

59.

Note that the dotted line is not part of the graph. On each side of the dotted line is a copy of K1,3 . Corresponding vertices in the two copies are then connected by an edge (like the vertices in P2 are connected by an edge). q q H q q H q q H q q H 60.     q q q q 61. (a) The graph G ∩ (H ∪ K) has vertex set VG ∩ (VH ∪ VK ) and edge set EG ∩(EH ∪EK ). The graph (G∩H)∪(G∩K) has vertex set (VG ∩VH )∪(VG ∩VK ) and edge set (EG ∩ EH ) ∪ (EG ∩ EK ). By the distributive laws for sets, VG ∩ (VH ∪ VK ) = (VG ∩ VH ) ∪ (VG ∩ VK ) and EG ∩ (EH ∪ EK ) = (EG ∩ EH ) ∪ (EG ∩ EK ). So the graphs G ∩ (H ∪ K) and (G ∩ H) ∪ (G ∩ K) must be the same graph. (b) Similar. c

c

62. (a) E(G∩H)c = (EG∩H ) = (EG ∩ EH ) = EG c ∪ EH c = EGc ∪ EH c = EGc ∪H c . c c (b) E(G∪H)c = (EG∪H ) = (EG ∪ EH ) = EG c ∩ EH c = EGc ∩ EH c = EGc ∩H c . 63. Define f (1) = (1, 1), f (2) = (1, 2), f (3) = (1, 3), f (4) = (2, 1), f (5) = (2, 2), f (6) = (2, 3). 4 q q(1,3) q(2,3) 1q Aq(1,2) Aq(2,2) q q q(1,1) q(2,1) 3 2 6q q5 64. Sketch. Use {0, 1} for the vertex set for P2 . The map b1 b2 · · · bn−1 bn 7→ (b1 b2 · · · bn−1 , bn ) then defines an isomorphism Qn −→ Qn−1 × P2 . 

4.8. CHAPTER 8

535

65. Proof. Since VG 6= ∅ and VH 6= ∅, we have vertices v ∈ VG and w ∈ VH . Let G0 be the subgraph of G induced by {v}, and let H 0 be the subgraph of H induced by {w}. Observe that G0 × H ∼ = G, via the maps = H and G × H 0 ∼ (v, h) 7→ h and (g, w) 7→ w, respectively.  66. Proof. (→) Suppose G and H are bipartite. Say (V1 , V2 ) is a bipartition for G and (W1 , W2 ) is a bipartition for H. Observe that ((V1 × W1 ) ∪ (V2 × W2 ), (V1 × W2 ) ∪ (V2 × W1 )) is a bipartition for G × H. (←) Suppose G × H is bipartite. Since G and H are each isomorphic to subgraphs of G × H, they are both bipartite. 

Section 8.6 1.

s - s

-

s ? s

6 s - s6- s? ? 6 6 s  s ? 6 ? ? 6 6  s s s Each two-way street is represented by two edges in opposite directions to each other. Each one-way street is represented by an edge with no corresponding opposite. 2. Add the two different directions on the doubled edges below. s

s

s

s

s6  s-

s

 s

s

3.

s ? s  s

q-

2 q- 3q @ @ ? 6 Iq q @ 4 5

1

Each computer is represented by a vertex. The two-way communication line is represented by two edges, one in each of the two possible directions of communication.

536

4.

CHAPTER 4. ANSWERS TO ALL EXERCISES u @ R @ u Park u @uDaniels Comstock @ @ I @ @u Center I @ @u Main @ @ @ I @uHawk I @ u Market uAnselm @u Winter @ @ R @ @ u R @ South@  @ @uFern Bradley

5. A simple directed graph. q 1H q 2 jH3 H   q ? H j HH6 q  q4 5 r 1r 2r ? @ @ R r @ r @6 r I-

6

6.

5

4

from each edge in (a). q q 1H 2 3 H  q H Hq 4 q 5 14.

r 1r 2r @ @ r @r @r

6

5

7. Not a simple directed graph, q  q 2k 1 @ R ?6 @ 6@q 3 4q 

9. Yes. 2, 1, 3, 4.

3

15. We simply remove the directions from each edge in (c). q 2k q @ @q 3 4q 1

since there is a loop edge incident with vertex 2. 1 r 2r 16. R 8. @ ? ? 6 r @r 4

4

3

r 2r @ r @r

1

4

3

3

17. Three strong components. q q 1 2 3  qH  jH6 H q4 5q

10. No. Notice that 1 forms an isolated strong 11. 1, 2, 3, 5 and 1, 2, 4, 5. Those are component since there are no edges the shortest such paths, and the only into 1, and 5 forms an isolated strong ones that do not repeat a vertex. component since there are no edges out of 5. Vertices that sit in a circuit, 12. South, Market, Main, Park, like 2, 3, 4 here, always sit in the same Bradley, Daniels, Center or strong component. South, Market, Fern, Hawk, Center. 6 r 1r 2r ? 18. @ @ R r @ r Ir @6 13. We simply remove the directions 5

4

3

4.8. CHAPTER 8

537 r 2r ? 6 r r

19. Two strong components.

1

20. q q 2k 6 @ R @ 6@q 3 4q 

4

1

Notice that 2 forms an isolated strong component since there are no edges from other vertices into 2. Vertices that sit in a circuit, like 1, 3, 4 here, always sit in the same strong component.

3

21. Yes. The point is that this graph has just one strong component. That is, the graph is strongly connected. 22. No. The interior block and the exterior block each form separate strong components. 1r- 2r- 3r

23. Define f (1) = 6, f (2) = 5, f (3) = 4.

6r- 5r- 4r

24. 1 7→ 4, 2 7→ 6, 3 7→ 5 gives an isomorphism. 25. Define f (1) = 7, f (2) = 5, f (3) = 8, f (4) = 6. 5r- 6r

J J]

J 



r - Jr 7 8

2r- 4r

J J]

J 

r - Jr 1 3

26. 1 7→ 5, 2 7→ 7, 3 7→ 6, 4 7→ 8 gives an isomorphism. 27.

28.

29.

vertex 1 2 3 4 5

indeg 0 1 2 1 2

outdeg 2 1 2 1 0

vertex 1 2 3 4 5 6

indeg 2 1 2 1 1 1

outdeg 1 1 1 2 1 2

vertex 1 2 3 4

indeg 2 1 2 1

outdeg 1 3 1 1

30.

31.

32.

vertex 1 2 3 4

indeg 1 1 2 1

outdeg 3 1 0 1

vertex 1 2 3 4

indeg 0 2 1 1

outdeg 2 1 1 0

vertex 1 2 3 4

indeg 0 3 2 0

outdeg 2 0 1 2

538

CHAPTER 4. ANSWERS TO ALL EXERCISES

33. In the left graph, vertex 2 has in-degree 3, and no vertex in the right graph has that. We appeal to the directed version of Lemma 8.10. That is, in-degrees and out-degrees must be preserved by isomorphisms. 34. The graph on the left has a vertex with in-degree 2, while the graph on the right does not. 35. In the right graph, vertex 5 has in-degree 3, and no vertex in the left graph has that. We appeal to the directed version of Lemma 8.10. That is, in-degrees and out-degrees must be preserved by isomorphisms. 36. The graph on the right has a vertex with out-degree 2, while the graph on the left does not. 37. The left graph has one vertex (namely, 1) with in-degree 1, and the right graph has more (namely, 6, 7, 8). Hence, they are not isomorphic. We appeal to the directed version of Theorem 8.11. That is, in-degree sequences and outdegree sequences must be preserved by isomorphisms. 38. 1 7→ 4, 2 7→ 3 gives an isomorphism. 39. Define f (1) = 4, f (2) = 3. 1 2 r r 

r 

4

r

3

40. Not isomorphic. An isomorphism would have to send 2 7→ 8 and 4 7→ 7, but this cannot be completed. 41.

q q q q q q q, , q, 6 q , q q, q q q q q q? , q q , q q , q q q , A Kq , 6

q q Kq , A q UAq , q 

q q q q q U q , A q U q , q Kq , A A q , q A q q q qK U q ,q UAI UAI q ,q UAI q ,q  q, qA 

Group them according to the numbers of vertices n and edges m. n=1

q, q q,

q q q6 , 6 q? , q q q q, n = 3, m ≤ 1 q q q , q q q q U q , q q , q Kq , A q U q , A n = 3, m = 2 A q q q q q , q q q , q q , q Kq , A A n = 3, m = 3 K  q q q q UAq , Uq q, q  qA , q UAI q, n = 3, m = 4 qA  K   q q UAI q UAI q ,q  q, n = 3, m ≥ 5 n=2

42. Ten of them are obtained from the digraphs in Exercise 41 by adding an

4.8. CHAPTER 8

539

isolated vertex. Those remaining are pictured. q q q q q q q q q q q q q q q q q q q q R ? ?? ?q , q ? @ q q, q q , R q@q , R q@ q q, 6 q@ q. Iq , q q , q 6 6q , 6 6q , q66 43. These graphs are distinguished by their in-degree and out-degree sequences. q q q q ? A? qA Aq6 A? qAU qA U U A U A  -@Aq , R R q @ Aq , q  @Aq , q  @Aq . q I I   indeg outdeg indeg outdeg indeg outdeg indeg outdeg 3 0 3 0 2 1 2 1 2 1 1 1 1 2 2 2 1 2 1 2 2 1 1 2 2 3 3 2 1 0 0 1 q q @ qI q  R @q , q @ q q Iq R @q ,

q q q q q q @ R q @ q q q qI q @ q q q q@ q q q q q q @ q@  I I Iq, I R , R q q @q , R @q , R @q , R @q , @ @ I  q q q q q R R R R q q q q q@ q q q q q  q@ q  @ q  @ q q @ I , R , @ @q , R @ q , @ @ q . Iq Iq I  45. Proof. Suppose G is strongly connected. Let u, v be vertices in G. We have a path P from u to v in G. The underlying path P is a path from u to v in G. So G is connected.  44.

46. Each edge contributes exactly 1 to the in-degree of its head and exactly 1 to the out-degree of its tail. 47. Proof. Suppose G ∼ = H. So we have an isomorphism f : G −→ H. In particular, fV and fE are bijections. Define f : G −→ H by f V (v) = fV (v) and f E (e) = fE (e) for all vertices v and edges e in G. Since G and G have the same vertex set, we see that f V is a bijection. Since the map e 7→ e gives a one-to-one correspondence between the edges of G and the edges of G, we see that f E is a bijection. Since f is a graph map, so is f . Hence, f is an isomorphism. Therefore G ∼ = H.  The converse does not hold. In Exercise 43 for example, we see four different directed graphs with underlying graph K4 . 48. Suppose x and y are in the same weak component. Say there is a path P from x to y. By using the specified condition to reverse the direction of each edge in P , we can form a path from y to x. So x and y are in the same strong component. 49. 1 2 3

 1 2 3  0 0 1  1 0 0  = A, 0 1 0

1 2 3

 1 0  0 1

2 1 0 0

3  0 = A2 . 1  0

540

CHAPTER 4. ANSWERS TO ALL EXERCISES

0(0) + 0(1) + 1(0) = 0, 0(0) + 0(0) + 1(1) = 1, 0(1) + 0(0) + 1(0) = 0, 1(0) + 0(1) + 0(0) = 0, 1(0) + 0(0) + 0(1) = 0, 1(1) + 0(0) + 0(0) = 1, 0(0) + 1(1) + 0(0) = 1, 0(0) + 1(0) + 0(1) = 0, 0(1) + 1(0) + 0(0) = 0. 50.



0  0  A= 0 0

1 0 0 1

1 1 0 1

 0 0  , 0  0



0  0 2  A = 0 0

0 0 0 0

1 0 0 1

 0 0   0  0

51. A + AT . Let B be the adjacency matrix for G. Let u and v be any vertices in the common vertex set for G and G. The number of edges from u to v in G plus the number of edges from v to u in G equals the number of edges joining u to v in G. That is, the (u, v) entry of A plus the (v, u) entry of A equals the (u, v) entry of B (which is the same as the (v, u) entry of B). Of course, the (v, u) entry of A equals the (u, v) entry of AT . 52. ∀ u, v ∈ V, (u, v) ∈ E ↔ (v, u) ∈ E. 53. Let A = [ai,j ] be an adjacency Pn matrix for a loopless directed Pn graph G. Then, for each 1 ≤ k ≤ n, we have j=1 ak,j = outdeg(vk ) and i=1 ai,k = indeg(vk ). Pn Pn Moreover, i=1 j=1 ai,j = |E|. The point is that, for each 1 ≤ k ≤ n, the sum of the entries in row k is outdeg(vk ) and the sum of the entries in column k is indeg(vk ). 54. r-in-regular implies r|V | = |E|. The same is true for out-regular. 55. No. p(1, 3) + p(1, 2) = .5 6= 1. That is, the sum of the values assigned to the edges with tail 1 is not 1, as required. 56. No. The sum of the weights exiting vertex 3 is 0, not 1. 57. 1 2 3 4 58.

 1 0  0   0 0 

2 3 4  .4 .6 0 0 1 0   = M, 0 1 0  .2 .8 0

0  0 M =  1 0

.2 0 0 0

.8 .6 0 1

 0 .4  , 0  0

 1 0  0   0 0

1 2 3 4 

.8  .6 M2 =   0 1

2 0 0 0 0 0 0 .2 0

3 1 1 1 1 .12 .4 .8 0

4 0 0 0 0

  = M 2.  

 .08 0   0  0

4.8. CHAPTER 8

541

59. (a)

(40,0)

s @

j @ R   (30,0) @s - s - s s - (30,15) sH -@  WS AS  6 H (40,15) *  (15,0)  HH sH j ?  H H jH  * H (0,0)  HHs6 Hs(15,15) s HH   D jH  * @   s ?  @ H * R  6 (0,15) H  jH H  (15,40) AR @ Hs - @ s - s - s - WR s  6 (0,30)@ (15,30) @ R  * @ @s (0,40) (b) There are 17 states. The three states AS, D, and AR form one class. Each of the other states forms a class by itself. Hence there are 14 single state classes and 1 three state class, for a total of 15. (c) The 2 states/classes WS and WR are absorbing. The other 13 are transient. 60. (a)

1

(0,3) .5 q - ?i .5

(0,2)

q

.5  .5

(0,1)

.5 q - .5

(0,0)

q

.5  .5

(1,0)

.5 q -

(2,0)

q

.5  -

.5

.5

(3,0)

q i1 6

(b) (0, 3) and (3, 0). (c) 1. (d) 32 . E.g. the ((1, 0), (3, 0))-entry of M 30 is .659985. 61. For a fixed i, the sum of the weights of the edges of the form (i, j) must be 1, by the definition of a Markov chain graph. The column sums need not be 1. See Exercise 57, for example. The point is that, for each state i, the sum of the values assigned to the edges with tail i must be 1. In fact, none of the columns in the matrix in Exercise 57 add up to 1. 62. The (i, j)-entry of M k is positive if and only if it is possible to transition from state i to state j in k steps. Hence, the (i, j)-entry of I + M + M 2 + · · · + M n−1 is positive if and only if it is possible to transition from state i to state j in at most n − 1 steps. 63. (a) 0.173 after two at bats, and 0.266 after three at bats.

0 1 2 3 4 5

0 0  0   0   0   0 0

1 .110 .303 0 0 0 0

2 .058 .150 .423 0 0 0

3 .045 .163 .068 .490 0 0

4 .056 .173 .343 .425 1 0

5 .731 .213 .168 .085 0 1

     ≈ M2   

542

CHAPTER 4. ANSWERS TO ALL EXERCISES 0 0  0   0   0   0 0

0 1 2 3 4 5

1 .061 .166 0 0 0 0

2 .051 .135 .275 0 0 0

3 .048 .159 .068 .343 0 0

4 .087 .266 .444 .548 1 0

5 .753 .273 .213 .110 0 1

     ≈ M3   

(b) 0.590. Start matters, since the values in column 4 of M ∞ vary.

0 1 2 3 4 5

0 0  0   0   0   0 0

64. (a)

1 0 0 0 0 0 0

2 0 0 0 0 0 0

3 0 0 0 0 0 0

4 .198 .590 .690 .833 1 0

C D A B .6 .1 .1 .2  0 .7 0 .3  = M    0 0 .2 .8  0 0 .1 .9   .216 .127 .13 .1 .41  .343 .49 .03 .48   M3 =  0  0 0 0 .12 .88  0 0 0 .11 .89

5 .802 .410 .310 .167 0 1

     ≈ M 30   

A B C D

(b)



.36  0 M2 =   0 0

.41 after two years, and .56 afterthree years. (c) 0 0 .111  0 0 .111 M 30 ≈   0 0 .111 0 0 .111

.097 .054 .112 .111

 .56 .603   .888  .889

 .889 .889   .889  .889

The likelihood is .889, regardless of the starting island. 65. (a)

r @ .3 ? .2@I @ @  .1 @rCalc-.6 r WD  r ? .8 16 1 Pass 6   Alg

Trig

.5 .5 6 r

(b) Calc, Trig, and Algebra have period 3. WD and Pass have period 1. Note that WD and Pass are absorbing states, while Alg, Trig, Calc forms a cycle

4.8. CHAPTER 8

543

of length 3. (c) 68.2% go from Calc to  0 0  0 0  M 20 ≈   0 0  0 0 0 0

Pass. 72.7% go from Alg to WD.  0 .318 .682 0 .659 .341   0 .727 .273   0 1 0  0 0 1

66. (a)

rB

Ar

.3  .2

R.8 .6I

.7 R .5I

.5  .4

b

M even

a

 .41 .59 0 0  .32 .68 0 0   M2 =   0 0 .54 .46  0 0 .45 .55   0 .6484 0 0  0 .6484 0 0  odd  M ≈  .3516 0 .4945 .5055  .3516 0 .4945 .5055 

(b)

(c)

r

r



.3516  .3516 ≈  0 0

67. (a)

0 0 .6484 .6484

.4945 .4945 0 0

-1 riWin .3 @ .2 .2 @@ .4  .2 I r @r iCheck i Bet 6  @ R .3 6 @ .1@ @r .3 -iFold 1

(b) Bet Check Fold Win

   

Bet 0 0 0 0

Check Fold 0 .333 0 .5 0 1 0 0

Win .667 .5 0 1

  ≈ M∞  

(c) If the computer bets on the first turn, then the computer probably wins. If the computer checks on the first turn, then there is an even chance of winning and losing. (d) No. Unless, the computer folds on the first turn, the odds are not in Keith’s favor.

 .5055 .5055   0  0

544

CHAPTER 4. ANSWERS TO ALL EXERCISES  a0r 1  .3 6 rB

68. (a)

.2   .1 A  r r 0 16 A .2  .6 R .3I

R.6 .4I .4  .2

 .4 r r1 B0 6 a 

r b? .3 r  b0 1 



(b)

M∞

     ≈     

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

.268 .039 .050 .096 1 0 0 0

.283 .630 .406 .337 0 1 0 0

.165 .201 .437 .130 0 0 1 0

.283 .130 .106 .437 0 0 0 1

           

.039. (c) If Team A serves, then Team B probably wins. If Team B serves, then Team A probably wins. So it matters which team serves.

Review s

1.

Nord

West

s @ @ @s

sOst

(b) ∅. There are no edges among 1, 2, 3. (c) 2. 2, 4, 3 is a shortest path. (d) Yes. V1 = {4}, V2 = {1, 2, 3}. That is, G∼ = K1,3 . 4. (a)

S¨ ud

r1 a A r Ar 3

b

c

4

2. Buff

qH Roch q q Syr A H H Aq Hq Ith

Bing

3. (a) 1 4

q q2 q q3

e

d

r2 r5

(b) 1, a, 3, e, 4, b, 1. The only repetition is that the start equals the end. (c) No. There is no path from 1 to 2, for example. (d) The subgraph induced by {1, 3, 4} and the subgraph induced by {2, 5}. The two components are shown separated in the picture for part (a).

4.8. CHAPTER 8

545

5. (a) Yes. There are two parallel edges between two vertices. (b) Yes. Again, there are two parallel edges between two vertices. 6. (a) Yes. The are no loops and no multiple edges. (b) Yes. The only repetition is that the start equals the end, and there are indeed edges {3, 4}, {4, 5}, {5, 6}, {6, 3} that join consecutive vertices in the given list. (c) Yes. There are no vertex repetitions, and there are indeed edges {4, 5}, {5, 2}, {2, 3} that join consecutive vertices in the given list. q (1,1) q  (2,1) 7. (1,2) q 10. (a) See Figure 8.19. (b) 2, since (1,3) q they differ in two places. (c) Yes, 0101, a left-handed male. (d) 0001 is equidis1q 2q 3q 4q 5q 6q 8. tant from 0000 and 0101. r 9.

(a) s (b) 1,2,3,1,4. T ,4slT , l  Ts s 3

r r

1

r

2

It is a trail, since no edges are repeated. It is not a path, since the vertex 1 is repeated. It is not a cycle, since it does not start and end at the same vertex.

r r

r r

r

r r

r r r

r r

11. Proof. Suppose G is complete. Let u, v be vertices in W . Since G is complete, there is an edge e 7→ {u, v} in G. Since u and v are vertices in W , it follows that e is an edge of H. Hence, H is complete.  12. (a) No. A loop edge cannot possibly connect vertices from two disjoint sets V1 and V2 . (b) Yes. q 2q

1

This graph has bipartition {1}, {2}. (c) Yes. In fact, Cn is bipartite whenever n is even. 13. Let V1 = {111, 100, 001, 010} and V2 = {000, 011, 110, 101}. r001 r101

r

r111

000

100

r

r

110

r

011

r010

rH r  000  @H J

 H Hr011  100 r HJ@

  @ H J @

H @r H  r 001 H @ J 110 H  @ J r101 @ H

H  010 r 111

546

CHAPTER 4. ANSWERS TO ALL EXERCISES

14. No. It contains 5-cycles.

r

r r r

r

r r

r r

r

r r

r r

r

r r

r

r

r

Recall that a graph is bipartite iff it contains no cycles of odd length. 15. No. It could contain 3-cycles. For example, if the class contains a group of three mutual friends.   1 0 0 1 16. (a)  0 1 1 1   1 2 3 4   (b)  0 1 1 0 1  1 0 0 1  = P A. E.g., the   2  1 0 0 1  0 1 1 0 3  1 0 0 1  entry in the second row and third col0 1 1 1 4 umn of P A is 0(1)+0(0)+0(0)+1(1) = 1. (c) It is the adjacency matrix rela(b) tive to the vertex ordering 2, 4, 3, 1. 1 : 2, 3 2 : 1, 4  2 4 3 1  3 : 1, 4 0 1 0 1 2 T  4 : 2, 3, 4 4   1 1 1 0  = P AP   0 1 0 1 3   3 7 1 0 1 0 1 17. . 6 0   0 1 0 0 19. 3. There are 3 walks of length 4  0 0 0 1  from 1 to 3.   18. (a)  = P. 0 0 1 0  qNW qNE 1 0 0 0 20.  J W q J AAqE The rows of I4 are permuted according AAq Jq SW SE to the permutation 2, 4, 3, 1.

21. Define f (1) = 5, f (2) = 6, f (3) = 8, f (4) = 7. q q 1 5 Q Q Qq4 q 3 Qq7    q q  2 6 22. Define f (1) = 2, f (a) = c, f (b) = d.   r a 1 b  

c

q8

  r 2 d  

4.8. CHAPTER 8

547

23. Define f (1) = 3, f (2) = 6, f (3) = 5, f (4) = 4, f (5) = 1, f (6) = 2. c6 c1 c2 c3  J

A  J

A 5 1 Ac2 Ac6 c J c J A  A 

Jc5 c Jc3 4A

4Ac 24. Proof. For each vertex b1 b2 · · · bn in Qn , we define an automorphism fb1 b2 ···bn of Qn such that fb1 b2 ···bn (00 · · · 0) = b1 b2 · · · bn . That is, for each vertex a1 a2 · · · an in Qn define fb1 b2 ···bn (a1 a2 · · · an ) = c1 c2 · · · cn , where ci = ai + bi mod 2, for each 1 ≤ i ≤ n. Now given any two vertices u1 u2 · · · un and v1 v2 · · · vn in Qn , observe that the automorphism fv1 v2 ···vn ◦ fu−1 sends u1 u2 · · · un to 1 u2 ···un v1 v2 · · · vn .  25. No. They are not regular. Vertex transitive graphs must be regular. 26. No. The Petersen graph has 10 vertices, not 12. 27. Define f (1) = f (4) = a, f (2) = b, f (3) = c. q2 qb 1q  aq  4q q3 qc 28. 2. The identity and the automorphism switching b and c are the only automorphisms. 29. 8 · 6 = 48. There are only 24 automorphism of a die, since we cannot take the mirror image of the die as an automorphism. Note that 48 = 24 · 2. 30. No. There is no K4 in the octahedron. Note that the Tetrahedron is isomorphic to K4 . That whole graph must map into a subgraph H of the Octahedron with H ∼ = K4 . However, no such H exists. P P 31. It follows from Corollary 8.14. We have 2|E| = v∈V deg(v) = v∈V r = r|V |. Since 2 divides r|V | and gcd(2, r) = 1, it follows that 2 divides |V |. That is, |V | is even. 32. The graph on the left has maximum degree 4, while that on the right has maximum degree 5. Isomorphic graphs must have the same maximum degree, and these two do not. 33. The degree sequences are different. A degree sequence for the graph on the left is 5, 3, 3, 3, 3, 3, 2, and a degree sequence for the graph on the right is 5, 5, 3, 3, 2, 2, 2. Isomorphic graphs must have a common degree sequence, and these two do not. 34. Let U be the set of vertices in the left graph of degree 2 or 3, and similarly

548

CHAPTER 4. ANSWERS TO ALL EXERCISES

define W for the right graph. The subgraphs induced by U and W are not isomorphic, so the graphs cannot be isomorphic. The subgraph induced by U is P1 + P3 , and the subgraph induced by W is P2 + P2 . 35. No. The left graph has a vertex of degree 4 and the right graph does not. q @q q q , q

36.

q q @q q @q

Let v be the vertex of degree 3. The vertex not adjacent to v is adjacent to either 1 or 2 neighbors of v. q q @ q q A q @ Aq

q q @q @q q q,

37.

The two degree 4 vertices are either adjacent or not. 38. This is the complement of the left graph. q

1

q

3

q5

q

q6

2

q4

Define f (1) = 1, f (2) = 4, f (3) = 2, f (4) = 6, f (5) = 3, f (6) = 5. c

39. Proof. Observe that (Gc ) and G have the same vertex sets and the same c c edge sets. Namely, V(Gc )c = VGc = VG and E(Gc )c = (EGc ) = (EG c ) = EG . c Since the edge sets are subsets of P2 (V ), the graphs (Gc ) and G are the same.  40. (a)

q q q

q q q

(b)

q q q q

q

q q

q

q

Part (a) is a disjoint union of the path P3 and the cycle C3 . Part (b) is the product of the path P3 with the cycle C3 . That is, we have 3 copies of C3 , with corresponding vertices connected in a path (namely, P3 ). 41. (a) The subgraph induced by {000, 010}. (b) The subgraph induced by {000, 001, 010, 011, 100, 110}.

4.8. CHAPTER 8

549

That is, G ∩ H is isomorphic to P2 , and G ∪ H is the following graph. r001 r000 r

r

011

r010

r

100

110

42. Sketch. For all u ∈ VG , v ∈ VH , d ∈ EG , and e ∈ EH , define f (u, v) = (v, u), f (d, v) = (v, d), and f (u, e) = (e, u). This gives an isomorphism f : G × H −→ H × G.  Recall that G × H has vertex set VG × VH and edge set (EG × VH ) ∪ (VG × EH ). We have defined f on each of the sets VG × VH , EG × VH , and VG × EH . It is easy to see that fV and fE are bijections. Also, f is a graph map. 43. Buff

q Roch q q Syr H A HH Y ? AKq Hq Ith

Bing

44. q q 2 (b) 1 q (a) 1 ? q6 4 q 3 4 q

q2 q3

(c) All of G is one.

(d) 1 q

q2

q

q3

4

(e)

vert. 1 2 3 4

in. 0 2 0 2

out. 2 0 2 0

45. Yes. The two edges that are parallel in the underlying graph have distinct directions in the directed graph. So there are no loops and no multiple edges. 46. Define f (1) = 7, f (2) = 11, f (3) = 9, f (4) = 10, f (5) = 8, f (6) = 12. 1 7 11 9 s s s s- 2s- 3s @ ? ? @ ? ? s  s s @  @ s Is5 6 Is8 6 10 12 4 6 47. The left graph has a vertex with out-degree 3, and the right graph does not. The out-degree of a vertex must be preserved by an isomorphism. So no isomorphism is possible. 48. They are not. The left graph has a vertex with out-degree 0, and the right graph does not. The out-degree of a vertex must be preserved by an isomorphism. So no isomorphism is possible.

550

CHAPTER 4. ANSWERS TO ALL EXERCISES

q q q q, 6 q, 6 q? .

49.

They are distinguished by the number of edges. q q q q q q q q q q q q q q q q R R ? ? ? ? ? q q q, q Iq , R q q , q? q q, q Iq . q? @ q , ? @ @ @ @ @ q , R @ @ Iq , I

50.

The edge incident with the pendant vertex in G can be assigned two possible directions. For each such choice, there are four ways that the remaining triangle in G can be directed. 51. 1 2 3 4 5 6

 1 0  0   0   0   1 0

2 1 0 0 0 0 0

3 0 1 0 0 0 1

4 1 1 0 0 1 0

5 0 1 0 0 0 1

6 0 0 0 0 0 0

53. No. The only edge out of vertex 3 has value .2 and not 1 as required.

       

54.

52. No, its strong components are two isolated vertices and the subgraph induced by the other three. r r @ R @I @r r r6@  55. (a)

1 2 3 4

 1 2 3 4  0 1 0 0  0 0 0 1     0 .2 .8 0  .3 0 .7 0

  .6 B .2 r -  @ R .8 ? .4 .3 @ 6.5 @ r  @r  D .2 C  1  A r

(b) 0.08 is the relevant value in M 2 . (c) Irreducible, since M 3 has all nonzero entries. Regular, since all states are aperiodic. (d) 94 ≈ 0.4444.     0 .12 .8 .08 .24 .072 .24 .448  0 .36 .4 .24   .12 .216 .32 .344  2 3      .06 .06 .54 .34  = M  .162 .048 .448 .342  = M .3 0 .2 .5 .06 .06 .54 .34   .1333 .0666 .4444 .3555  .1333 .0666 .4444 .3555  30   to 4 decimal places.  .1333 .0666 .4444 .3555  = M .1333 .0666 .4444 .3555

4.9. CHAPTER 9

4.9

551

Chapter 9

Section 9.1 1.

r

r3

1

vertex leaves a connected graph, and {2, 4} disconnects it.

r

5

9. κ = 1. Proof. Since (e) is connected, Since each edge is incident with vertex κ ≥ 1. Since {4} is a disconnecting set 2 or vertex 4, all edges get removed. of size 1, κ ≤ 1. Therefore, κ = 1.  2.

1q a d g hq4

q2 f q 5

q3

r2

r3

10. κ = 2. The removal of any one vertex leaves a connected graph, and {2, 5} disconnects it. 11. κ = 3.

3.

f

r

5

Note that edge c is removed since it is in F and not due to any of the vertex removals from W . 4.

1q d q 4

q3

r

r r

r

r

r

r

r r

r

r r

r r

r

r

r

r

r

r

Proof. The graph resulting from the removal of the topmost pictured vertex cannot be disconnected by the removal of only one more vertex. q q 5. κ = 1. Proof. Since (a) is conq q q q q nected, κ ≥ 1. Since {4} is a disconq q necting set of size 1, κ ≤ 1. Therefore, q q q q q κ = 1.  q q q q q 6. κ = 1. It is connected, and {3} disconnects it. Since the dodecahedron is vertex transitive, this shows that no two vertices 7. κ = 2. Proof. Observe that (c) is can form a disconnecting set. Hence, connected and that the removal of any κ ≥ 3. Since κ ≤ δ = 3, it follows that one vertex leaves a connected graph κ = 3.  (check all 6 cases). Hence, κ ≥ 2. Since {1, 5} is a disconnecting set of 12. κ = 3. Note that δ = 3. A case size 2, κ ≤ 2. Therefore, κ = 2.  analysis shows that the removal of 2 or fewer vertices will not disconnect the 8. κ = 2. The removal of any one Petersen graph.

552

CHAPTER 4. ANSWERS TO ALL EXERCISES

13. (a) K3,3 . See Exercise 13 from Section 8.4. (b) κ = 3, by Theorem 9.4. That is, κ(K3,3 ) = min{3, 3} = 3. (c) No. That makes κ = δ = 2 < 3. No matter what cable is removed, the resulting graph will have minimum degree 2. 14. (a) κ = 2. See the argument in Exercise 8. (b) Yes. The 3 edges {1, 4}, {2, 3}, and {2, 4} can be removed. (c) C5 . 15. Proof. Suppose G is connected and δ(G) = 1. So 1 ≤ κ(G) ≤ δ(G) = 1. Hence, κ(G) = 1.  Since G is connected, 1 ≤ κ(G). Whenever we have an inequality x ≤ y ≤ z ≤ x with the same number on both ends, all of the inequalities are forced to be equalities. 16. Each had κ = 3. Pictured is a 3-regular graph with κ = 1. r r r r r r@ @ r@r r@r 17. (a) Proof. Suppose G has n vertices and n edges. Then, X nδ(G) ≤ deg(v) = 2|E| = 2n. v∈V

Thus, κ(G) ≤ δ(G) ≤ 2. Since κ(Cn ) = 2, connectivity.  (b) See Theorem 9.3. q q (c)  q q q q  BBq q BBqq

the cycle Cn has the highest possible q q q  Z BBq Zq

q q q  Z BBq Zq

(d) Probably the last, since the greatest number of components can be left by removing a single vertex. P 18. (a) nδ(G) ≤ v∈V deg(v) = 2|E| = 2(n − 1). Thus, κ(G) ≤ δ(G) ≤ 1. (b) κ(K1,n−1 ) = 1 too. (c) K1,4 . 19. Proof.PSuppose a graph G = (V, E) has |V | = n and |E| < d 3n 2 e. Hence, 2 3n nδ(G) ≤ v∈V deg(v) = 2|E| < 2d 3n 2 e. That is, δ(G) < n d 2 e. In both the case that n is even and the case that n is odd, we see that δ(G) < 3. Since δ(G) is an integer, it follows that κ(G) ≤ δ(G) ≤ 2.  20. G is obtained from Kn by removing 2 edges. If the edges are incident, then κ = n − 3. Otherwise, κ = n − 2. 21. Proof. Suppose G is a 2-regular graph. By Theorem 9.3, each component of G must be a cycle. Of course, G is the disjoint union of its components. So G is a disjoint union of cycles. 

4.9. CHAPTER 9

553

22. Each component is K2 . 23. Sketch. Let D be a κ-set for G, and let v ∈ D. Suppose v is not adjacent to some component of G \ D. Then, D0 = D \ {v} disconnects G. Thus, κ(G) ≤ |D0 | < |D|, a contradiction.  Let C1 be a component of G \ D to which v is not adjacent, and let C2 be a different component. The point is that C1 and C2 ∪ {v} cannot be joined by a path in G \ D0 . Hence, G \ D0 will have at least two components. 24. Proof. Suppose H is a subgraph of G and VH = VG . Let S be a κ-set for G. Since H \ S must be disconnected, κ(H) ≤ |S| = κ(G).  25. Let H and J be two disjoint copies of Kd+1 . Let u be a vertex from H, and let v be a vertex from J. Make a new graph G from the disjoint union of H \ {u} and J \ {v} by adding a new single vertex w. Connect w to all of the neighbors of u from H and all of the neighbors of v from J, so w will have degree 2d. Note that δ(G) = d, and {w} is a κ-set. Hence, κ(G) = 1. 26.

r r r r r H  HH @H  @ H H  Hr r @r H r r @

27. Note that G×P2 contains subgraphs G×{1} and G×{2} that are isomorphic copies of G. Let D be a κ-set for G × P2 . At least one of the copies of G must be disconnected in (G × P2 ) \ D. Moreover, D must contain at least one vertex in each copy of G. So at least one of the vertices of D was not needed to disconnect the copy of G that got disconnected. Hence, κ(G) ≤ κ(G × P2 ) − 1. Say G × {1} is a copy of G that gets disconnected by the removal of D. There must be at least one vertex v in both G × {2} and D. So in fact, G × {1} is disconnected by D \ {v}, a set of size κ(G × P2 ) − 1. 28. Sketch. It is easy to see that κ(Q1 ) = 1 and κ(Q2 ) = 2. So suppose m ≥ 2 and κ(Qm ) = m. Let S be a κ-set for Qm+1 ∼ = Qm × P2 . It must be that S ∩ (Qm × {i}) disconnects Qm × {i} for either i = 1 or i = 2. Say it does so for i = 1. So |S ∩ (Qm × {1})| ≥ m. Since we must have |S ∩ (Qm × {2})| ≥ 1, it follows that |S| ≥ m + 1. So m + 1 ≤ κ(Qm+1 ) ≤ δ(Qm+1 ) = m + 1, and hence κ(Qm+1 ) = m + 1.  29. λ = 1. Proof. Observe that (a) is connected. Hence, λ ≥ 1. Since {{1, 4}} is a disconnecting set of edges of size 1, λ ≤ 1. Therefore, λ = 1.  30. λ = 1. The graph is connected, and edge {3, 4} disconnects it. 31. λ = 2. Proof. By the result in Exercise 7, 2 = κ ≤ λ. Since {{6, 1}, {1, 2}} is a disconnecting set of edges of size 2, λ ≤ 2. Therefore, λ = 2. 

554

CHAPTER 4. ANSWERS TO ALL EXERCISES

32. λ = 2. The removal of a single edge will not disconnect the graph, yet {{2, 5}, {4, 5}} will. 33. λ = 2. Proof. Observe that (e) is connected and the removal of a single edge will not disconnect the graph. Hence, λ ≥ 2. Since {{4, 5}, {5, 6}} is a disconnecting set of edges of size 2, λ ≤ 2. Therefore, λ = 2.  34. λ = 3. The removal of any single edge leaves a 2-connected graph. So 3 ≤ λ ≤ δ = 3. 35. λ = 3. The graph is 3-regular. It follows from Theorem 9.6 and Exercise 11 that 3 = κ = λ. 36. λ = 3. It follows from Exercise 12 that 3 = κ ≤ λ ≤ δ = 3. 37. λ = 3. There are multiple λ-sets. The graph is 3-regular. It follows from Theorem 9.6 and Exercise 13(b) that 3 = κ = λ. For each vertex, the set of edges incident with it forms a λ-set. 38. λ = 2. It follows from Exercise 14(a) that 2 = κ ≤ λ ≤ δ = 2. Yes, {{2, 5}, {4, 5}} is the unique λ-set. 39. Proof. Suppose λ(G) ≤ 1. If G is connected, then 1 ≤ κ ≤ λ ≤ 1. So κ = λ = 1. If G is not connected, then κ = λ = 0.  40. False. The example given for Exercise 26 has κ = 2 < 4 = λ. 41. n − 1 = κ(Kn ) ≤ λ(Kn ) ≤ δ(Kn ) = n − 1. See Remark 9.1 and Theorem 9.5. Note that the inequalities force λ(Kn ) = n−1. 42. The graph is connected and the central vertex disconnects it, so κ = 1. The removal of a single edge will not disconnect the graph, but the removal of 2 edges incident with the central vertex will. So λ = 2. By inspection, δ = 3. 43.

qH q 2 3 H  q H Hq 4 q 5 1

κ = 1 and λ = δ = 2 for the pictured graph. 44. The example given for Exercise 16 has κ = λ = 1 < 3 = δ. 45. (a) κ = 1. (b) λ = 1.

4.9. CHAPTER 9

555

The graph is strongly connected, {3} is a κ-set, and {(1, 3)} is a λ-set. qH q 2 jH3q H  H  jHq6 H 6 q  5 4 1

Note that the resulting graph (after removal of {3} or {(1, 3)}) is not strongly connected. 46. (a) κ = 1. (b) λ = 2. 47. (a) κ = 1. (b) λ = 1. The graph is strongly connected, {1} is a κ-set, and {(2, 1)} is a λ-set. q  q 2k ? @ R @ 6@6 q3 4q  1

Note that the resulting graph (after removal of {1} or {(2, 1)}) is not strongly connected. 48. (a) κ = 2. (b) λ = 2. 49. κ = λ = 1. G is strongly connected, so something must be removed to disconnect it. The unique east-west one-way street is the key. Removing it or one of its ends causes the graph to no longer be strongly connected. So κ = λ = 1. 50. G is not strongly connected so κ = λ = 0. 51. If S disconnects G, then S disconnects G. This works for both a disconnecting set S and a disconnecting set of edges S. 52. Yes, κ ≤ λ ≤ δ when δ(G) = δ(G).

Section 9.2 1. Neither. There are four vertices of odd degree. Namely, 1, 2, 4, 5. We must have none for an Euler circuit, and two for an Euler trail. 2. An Euler circuit. 1, 4, 5, 6, 4, 3, 6, 2, 3, 1, 2, 7, 1. 3. An Euler trail. 1, c, 3, f, 4, d, 2, a, 1, b, 2, e, 5, h, 5, g, 4. Since vertices 1 and 4 have odd degree, there is no Euler circuit. 4. An Euler trail. 2, 1, 3, 2, 5, 4, 3, 6, 5.

556

CHAPTER 4. ANSWERS TO ALL EXERCISES

5. An Euler trail. 5, 6, 1, 2, 3, 4, 5, 2. Since vertices 2 and 5 have odd degree, there is no Euler circuit. 6. An Euler trail. 1, 2, 5, 4, 2, 3, 4, 1, 3. 7. An Euler circuit. 6, n, 8, l, 7, j, 6, k, 7, o, 10, q, 9, p, 9, m, 6. Note that each vertex has even degree. 8. Neither. There are four vertices of odd degree. 9. An Euler circuit. The graph is 4regular. q1 3

q4

q

q

q2

5

q6

An Euler circuit is specified that starts and ends at the upper-left vertex in this graph. It corresponds to a route that covers each side of each street exactly once. 14.

s

1

s

1, 2, 3, 6, 5, 4, 1.

s

2

4

3 29 28

s

5 32

10. Neither. All 20 vertices have odd degree.

21 20 27

s

26 30 25

s

31 10

6 9

s

22

s

17 23 16

24

s

18 19

11 12 15

11. A (romantic) Euler trail. The 8 s s 14 s graph is connected and has exactly 2 13 7 vertices of odd degree (Nord and Sud). Starting at Nord the following se15. Yes. Connect the two odd-degree quence of bridge crossings ends at Sud: vertices with an edge. The degrees of 9, 10, 11, 8, 7, 12, 13, 6, 5, 15, 14, 1, 4, 3, 2. these two vertices now become even, and the remaining vertices retain their 12. An Euler trail. The graph is even degrees. Thus, Euler’s Theorem connected and has exactly 2 vertices applies to this new graph. of odd degree. The bridge sequence 1, 2, 3, 4 forms an Euler trail. 16. No. Let G be graph (b) from the Exercises in Section 9.1, and let 13. e = {3, 4}. G \ {e} is not connected. 2 s 1 s s 5

29

32

28

s

30 31 23

6

s

3

s

7 22 12

27

s

24 13

s

25 26

11

21

9

s

16 18 19 14

10

s

17

20

4

s

8

17. No. c. Since a component is a graph, it cannot have an odd number of odd degree vertices. Pick one vertex in each component and form a cycle with those vertices.

15

s

18. At least c edges must be added. Pick one vertex in each component, and form a cycle with them.

4.9. CHAPTER 9

557

19. The layout of the hallways determines a graph in which vertices represent intersections (cross ways) or corners and edges represent hallways. Since each hallway must be both mopped and waxed, each edge is doubled. Thus, every vertex has even degree and Euler’s Theorem applies. Note that, since we are in a single building, we assume that this graph is connected. 20. The layout of the hallways determines a graph in which vertices represent intersections (cross ways) or corners and edges represent walls. Since each hallway has two opposing walls, each edge is doubled. Thus, every vertex has even degree and Euler’s Theorem applies. 21. Vertex repetitions in an Euler circuit determine where to begin and end the cycles. Each cycle will use two edges at each of its vertices. See the proof of Euler’s Theorem and its preceding example. An Euler circuit is built by pasting together cycles. 22. Sketch. (→) If G has an Euler trail, then it connects G and its initial and final vertices will be the only vertices of odd degree. (←) If G is connected and u and v are the only vertices of odd degree, then the graph G0 obtained by adding a new edge e between u and v is connected with every vertex of even degree. Moreover, we can find an Euler circuit in G0 that ends in e. Removing e gives an Euler trail in G.  23. Even n. In Qn , the degree of each vertex is n, and we need these degrees to be even. 24. n odd. 25. Both m and n even. In Km,n , some vertices have degree n and some have degree m. We need all degrees to be even. 26. For each vertex v, degG (v) + degGc (v) = |V | − 1 is even, and hence degG (v) is even if and only if degGc (v) is even. Therefore, all of the vertices of G have even degree if and only if all of the vertices of Gc have even degree. 27. 2. There is an Euler trail between the two vertices of degree 3. Then two more edges are required to return to the start. 28. 2.

558

CHAPTER 4. ANSWERS TO ALL EXERCISES

29. (a) 2. (b) 2. Nord 9 8  Seine

7

6

Ile de la Cit´ e



5  15

4

3

Ile St-Louis



10 11 12 13 14

1



2

Sud

In (a), you can double bridges 9 and 10. In (b), double bridges 9 and 1. 30. (a) 3. (b) 2. 31. Neither. outdeg(1) = 2 + indeg(1). See Theorem 9.8. 32. An Euler trail. v2 , d, v1 , c, v2 , e, v3 , b, v1 , a, v1 . 33. An Euler circuit. Observe that the graph is strongly connected and each vertex v has outdeg(v) = indeg(v).  r r r ? ? 6 r  r r  34. An Euler circuit. 35. Neither. outdeg(a) = 3 + indeg(a). See Theorem 9.8. 36. Neither. Both 1 and 2 have out-degree 3 and in-degree 1. 37. For each edge e, the addition of the edge e0 forces a balance between inand out-degrees in G0 . Let u and v be two vertices in G. Since G is weakly connected, there is a path from u to v, say. Using the the new edges in G0 , we can ‘reverse’ that path to form a path from v to u. Hence G0 is strongly connected. 38. Since G is strongly connected G is connected. For every vertex of G, since indeg(v) = outdeg(v), it follows that deg(v) = indeg(v)+outdeg(v) = 2·indeg(v) is even. 39. Mimic the proof of Theorem 9.7(a). We must travel along edges in their correct direction, but that does not restrict us in our argument. 40. Apply Theorem 9.8(a) to the graph obtained from G by adding the edge (vn , v1 ). 41. Use a directed graph. That is, make each side of the street a directed edge

4.9. CHAPTER 9

559

that points in the legal direction of travel. Theorem 9.8 now does the work for us and guarantees an Euler circuit. 42. At least 2 edges must be added to the K¨onigsberg Bridge graph to obtain a graph whose vertices all have even degree. For example, add a new edge joining A and B and one joining C and D.

Section 9.3 r

1.

r

r

r

r 7.

r

r r r r r r r

2.

r A r  r @Ar

3.

q

q

q

q2

4

s

s

s

s

s

s

s

s

s

s

s

8. Follow the edges in order 1, . . . , 13. Start and Finish

5

q6

s

s

1

2

s

s

s

13

3

s

rr r r rr rr r r rrrrr r r rr r

5.

s

s

4. Follow the vertices in the order 1, 2, 3, 6, 5, 4, 1. q1 3

s

s

12

9

10

s

s

11

8

4

s

s

7

5

s

s

6

6. Follow the vertices in the order 1, 3, 10, 12, 11, 4, 6, 7, 2, 5, 9, 8, 1. q

q10 q

12

q

3

q

5

q

4

1

q9

8

q2 q

q

q6

q11

9. The edges incident with degree-2 vertices must be included. However, premature 3-cycles are then formed. r r

r

r

r r

7

10. When the edges incident with degree-2 vertices are included, a premature 4-cycle is formed.

560

CHAPTER 4. ANSWERS TO ALL EXERCISES

11. Since the edges incident with degree-2 vertices must be included, all edges get included. However, a Hamiltonian cycle is not formed. (1, 1) (1, 2) (1, 3)

r r(2, 1) H   r HHr(2, 2)   r 

12. By including all of the edges incident with degree-2 vertices, we include all of Pn . However, Pn is not a cycle. 13. After all of the edges incident with degree-2 vertices get included, the bottom middle vertex is then incident with 3 edges of the cycle, which is impossible. r r r r r r r r r

14. When the edges incident with degree-2 vertices are included, a premature 6-cycle is formed. 15. It is not Hamiltonian. After all of the edges incident with degree-2 vertices get included, the result is a Hamiltonian path that cannot be completed to a Hamiltonian cycle. 1

3s s @ 2 @s @ @s s

7

s4 s

6

5

16. Yes. 1, 3, 2, 5, 4, 1. 17. It is not Hamiltonian. Since vertex 1 has degree 2, the two parallel edges must be included, and form a premature 2-cycle. 1

s

s2

s

s

4

5

s3

18. No. Every edge is incident with a degree-2 vertex. However, the entire graph is not a cycle.

4.9. CHAPTER 9

561

19. Yes. Syracuse, Rochester, Ithaca, Buffalo, Binghamton, Syracuse. Buff

q Roch q q Syr H A H H Aq Hq Ith

Bing

20. No. The graph is not Hamiltonian by Theorem 9.10. 21. Km,n is Hamiltonian iff m = n. Notice that a Hamiltonian cycle must alternate between the sets V1 and V2 of a bipartition. If m 6= n, so |V1 | 6= |V2 |, then it will be impossible to end in the same set from which you started, while covering every vertex. 22. Outer cycles in Example 8.23 show n = 5, 6, 9. The cycle 1, 2, 7, 9, 4, 3, 8, 6, 1 in the left-most picture there gives n = 8. 23. There are 3. Namely, 1, 2, 3, 4, 5, 6, 7, 1 and 1, 2, 7, 6, 5, 4, 3, 1 and 1, 3, 4, 5, 6, 2, 7, 1. Notice that the different Hamiltonian cycles 1

7

3r r @ 2 @r @ @r r

r4 r

6

5

are distinguished by the choice of edges that pass through vertex 2. 24. There are 5. Namely, 2, 10, 7, 5, 4, 1 and 3, 9, 5, 7, 11, 1 and 3, 9, 5, 7, 12, 1 and 2, 3, 4, 5, 7, 11 and 2, 3, 4, 5, 7, 12. 25. ∀ n ≥ 3, (n−1)! . Fix a vertex to be considered the starting vertex for the 2 Hamiltonian cycles. There are n − 1 choices for the second vertex, n − 2 choices for the third vertex, and so on. Multiplication gives (n − 1)!. However, we must divide this count by 2, since each sequence counted above gives the same Hamiltonian cycle as its reverse. 26.

n((n−1)!)2 . 2

27. Note that κ(Kk+1,k ) = k but Kk+1,k is not Hamiltonian, by Exercise 21. 28. n − 3. 29. Suppose n2 ≤ κ(G). By Theorem 9.2, rem 9.11 says that G must be Hamiltonian.

n 2

≤ κ(G) ≤ δ(G). Hence, Theo-

30. The pictured non-Hamiltonian graph G has δ ≥

|V | 2 .

r

r

r

562

CHAPTER 4. ANSWERS TO ALL EXERCISES

31. See Example 8.23, and take advantage of the symmetries. We may assume that 1, 2, 3 is part of a Hamiltonian cycle. If the cycle further contains 1, 2, 3, 4, then it suffices to assume that it contains 1, 2, 3, 4, 5, and we see that this cannot be extended to a Hamiltonian cycle. If the cycle instead contains 1, 2, 3, 8, then it suffices to assume that it contains 6, 1, 2, 3, 8, and we see that this cannot be extended to a Hamiltonian cycle. 1t Z  t Z  6 Z 2 5X Zt  t Xt C t   C , L l C 7  , L 10 l t lCt8 L 9, L  A Lt A t 4 3

r r  r rA r r r Ar AA r r  r r

32. It is Hamiltonian.

33. (1, 1), (1, 2), . . . , (1, n), (2, n), (2, n − 1), . . . , (2, 1), (1, 1) is a Hamiltonian cycle. For a concrete example, consider the case in which n = 3. q(1,3) A q(1,2) q(1,1)

q(2,3) A q(2,2) q(2,1)

34. (1, 1), (2, 1), . . . , (n, 1), (n, 2), (n − 1, 2), . . . , (1, 2), (1, 1) is a Hamiltonian cycle. 35. (1, 1), (1, 2), . . . , (1, n), (2, n), (2, n − 1), . . . , (2, 2), (3, 2), (3, 3), . . . , (3, n), (3, 1), (2, 1), (1, 1) is a Hamiltonian cycle. For a concrete example, consider the (q1,3) case in which n = 4. q(2,3) (q1,2) q (2,2) q(1,1) q (2,1) q

q

q

(4,1)

(4,2)

(4,3)

q

q

(3,1)

q

(3,2) (3,3)

36. (1, 1), (2, 1), . . . , (n, 1), (n, 2), (n, 3), (n − 1, 3), (n − 1, 2), (n − 2, 2), (n − 2, 3), . . . , (1, 1) is a Hamiltonian cycle.

4.9. CHAPTER 9

563

37. 1, 2, 5, 6, 3, 4, 1.  1 r- 2 r r3 ? r- r6 r6 -   4 5 6

Notice that each edge is traversed in its correct direction. 40. 5, 2, 3, 1, 4.

Notice that each edge is traversed in its correct direction. 41. The lower-right vertex has outdegree zero. 38. 1, 3, 2, 4. r r R r r ? 39. 1, 4, 3, 2. 6 r - R r 1r - r2 @ R ? @ 6 That vertex can be entered but not exr @r 3 4 ited.

42. The edges incident with the top-left and top-right vertices must be in a Hamiltonian cycle. However, this causes a problem at the top-middle vertex. 43. (a) No. Ann defeated everyone else. (b) Yes. Ed, Ann, Bob, Cari, Dan. (c) Yes. There is a Hamiltonian cycle, whose start can be freely chosen. 44. (a) Dee, Beth, Alice, Ceil. (b) Yes. (c) Yes. 45. Sketch. Let v be a vertex with the maximum possible out-degree. Let Aout be the set of heads of edges with tail v. Let Ain be the set of tails of edges with head v. Let u be any vertex in Ain . If there is no edge with tail in Aout and head u, then u has higher out-degree than v, a contradiction. Hence, u is distance 2 from v.  46. The one in Exercise 40, since indeg(5) = 0.

Section 9.4 1.

   1

  

  

  

3

2.

2

4

   5

e

1

e 4

e

2

e 3

e 5

564

CHAPTER 4. ANSWERS TO ALL EXERCISES

3. Monitor Speakers

Printer Keyboard

Mouse

Tower Power Strip

4. Gas Electric Water Sewer

rH rBathrooms H r Hr Sleeping Quarters H r HHr Mess Hall  r

q q @ q q @q

5.

6. Place (2, 1), (2, 2), . . . , (2, n) is a row, and place (1, 1) and (1, 2) on opposite sides of that row. Use straight lines for all edges. 7.

r

r

r

10.

t

r t

r r b b@ bA r @rA b A @ @ @r @ Ar

9.

t d

r r r @  J r

J@r

J

r

8.

t

t @@t

t

d

11. r

t

r

t t

t @ @ d d@  t @t d 

t

t t

d t

t t

d

t @

d

@ d@  t @t d 

r

r

r

r q b

q

b

q

q

b b b q b q q q

4.9. CHAPTER 9

565

12. The face labels shown correspond to the vertex labels in Exercise 18 from Section 8.4. qq 12 q q 10q q4 q11q q q 1 6 3 q q 8 q q7 q qq 9 5q 2 q q 13. |R| = 8, since |V | − |E| + |R| = 2 gives 10 − 16 + |R| = 2. 14. 22. 15.

q @  @q P qq qP

versus

 qq

q @

@ qq

These two graphs are clearly isomorphic. The dual of the embedding on the left has a vertex with two loops, while the dual of the embedding on the right does not. So the duals are not isomorphic. 16. Proof. Let G = (V, E) with regions R. Note that each edge is a loop at the only vertex. If |E| = 0, then |R| = 1. So suppose k ≥ 0 and the result holds whenever the graph has k or fewer loops. Suppose |E| = k + 1 and let e ∈ E. Let H = G \ {e}, and note that H has |E| − 1 edges and |R| − 1 regions. By the inductive hypothesis, |R| − 1 = (|E| − 1) + 1. Hence |R| = |E| + 1.  17. |V | − |E| + |R| = c + 1. For 1 ≤ i ≤ c, the ith component by itself satisfies |Ri | = |Ei | − |Vi | + 2. Since they all share the same outer region, adding these equations gives |R| + (c − 1) = |E| − |V | + 2c. 18. Use induction on n. Build n, m, r from n − 1, m − 1, r. 19. Proof. Suppose G contains a subdivision H of K5 or K3,3 . Suppose to the contrary that G is planar. Then H is planar, and hence K5 or K3,3 is planar. This is a contradiction.  20. Proof. It suffices to assume that G is connected, because a disconnected graph has fewer edges than the connected graph obtained by joining its components with additional edges. Since theX dual graph D(G) has vertex set R and edge set E, Theorem 8.12 tells us that deg(r) = 2|E|. Since G is simple and r∈R

triangle-free, it has no regions bounded by three or fewer edges. That is, for each r ∈ R, deg(r) ≥ 4. Hence, 4|R| ≤ 2|E|. Theorem 9.13 then gives that 2 1 2 = |V | − |E| + |R| ≤ |V | − |E| + |E| = |V | − |E|. 4 2 Thus, 4 ≤ 2|V | − |E|, and the result follows. 

566

CHAPTER 4. ANSWERS TO ALL EXERCISES

21. ∀ n ≥ 5, Kn contains K5 as a subgraph. By Kuratowski’s Theorem, Kn is therefore not planar. 22. Sketch. (→) Consider the contrapositive. Suppose m, n ≥ 3. Since K3,3 is a subgraph of Km,n , it follows from Kuratowski’s Theorem that Km,n is not planar. (←) Use the result in Exercise 6.  23. It is not planar, since it contains a K3,3 subdivision. ta

t aa

t

+

-

t

aa a

t aa a t

aa at

24. It is planar. Stretch the middle horizontal wire around the bottom of the figure, and stretch the long diagonal wire around the top of the figure. 25. It is planar, as shown. q q q q q q

29. It is planar, as shown. q

q

q

q

q

q

q

q

26. It is planar as shown. q q q q q q 27. This is K3,3 , which is not planar. (2,3) q q(1,1) J  A

(1,3)  q J Aq(2,1) A J  q Jq (1,2) (2,2)A

28. It is K5 , which is not planar.

30. It is not planar. Deleting the diagonal edge incident with the bottom left vertex leaves a K3,3 -subdivision. 31. It is not planar. Deleting the bottom right vertex leaves a K5 subdivision. q q q q H    H H    H   q q Hq

32. It is not planar. Deleting the interior edge incident with the left-most vertex leaves a K5 -subdivision. 33. K5 is the only one. It is the only one that contains a subdivision of K5 , and a subdivision of K3,3 is not possible on 5 vertices.

4.9. CHAPTER 9

34.

567

q q A Q A Q Aq q A Q   A A   Aq  Aq

q q Q A Q A Aq q A Q Q A QA  Aq  Q Aq

q q A QA Q Aq q A Q AQQ A  A q QAq

35. Proof. Let G be a planar P graph. Suppose to the contrary that δ(G) ≥ 6. = |E| ≤ 3|V | − 6, a contradiction.  Then 3|V | = 21 (6|V |) ≤ 12 v∈V deg(v)P Note that ∀ v ∈ V, deg(v) ≥ 6. Hence, v∈V deg(v) ≥ 6|V |. 36. Proof. Let G be a planar graph. Suppose to the contrary that δ(G) ≥ 4. Apply Corollary 9.16. So, 2|V | =

1 1X (4|V |) ≤ deg(v) = |E| ≤ 2|V | − 4, 2 2 v∈V

a contradiction.  37. Let V = {0, 1, . . . , n − 1}, E0 = {{0, 1}, {0, 2}, . . . , {0, n − 2}}, E1 = {{1, 2}, {2, 3}, . . . , {n − 3, n − 2}, {n − 2, 1}}, E2 = {{n − 1, 1}, {n − 1, 2}, . . . , {n − 1, n − 2}}, E = E0 ∪ E1 ∪ E2 , and G = (V, E). Draw the cycle induced by {1, 2, . . . , n − 2} in the unit circle, put 0 at the origin, and put n + 1 outside of the unit circle. So G can be seen to be planar. Note that |V | = n and |E| = 3(n − 2) = 3n − 6. Note that, when n = 6, the graph G is the Octahedron. 38. K2,n−2 . 39. A planar embedding is pictured. q  q AAq

q AAq q 

A single edge added must be a diameter across the picture. The resulting graph then contains K3,3 as a subgraph. So it is not planar. c c  A c Ac A  Ac c 40. No. Number top row 5,4,2 and bottom row 6,3,1 to get a 6 cycle with diameters (which is the graph K3,3 ). 41. ν = 0 by Exercise 25. The graph is planar. 42. ν = 0, by Exercise 26.

568

CHAPTER 4. ANSWERS TO ALL EXERCISES

43. ν = 1 by Exercise 27 and Example 9.19. The graph is not planar, and there exists a drawing with one crossing. 44. ν(K5 ) = 1. 45. ν = 0 by Exercise 29. The graph is planar. 46. ν = 1, by Exercise 30 and the pictured embedding. qP q q q PP @P q q @P q Pq

See Example 8.23. q q q qA q q q Aq AAq q q q 

50.

47. ν = 1, q q q HH H q q Hq

q q

51.

q S S

by Exercise 31 and the pictured drawing. 48. ν = 1, by Exercise 32 and the pictured embedding. q q AQQA q A Q  Aq Q A QA  Aq QAq 49. This drawing has two crossings. 21 t 25t! !!aaat22  T  TTt 24 t 23 t D  "b " 26 b D "  b Dt bt28 29 " @ t @t 27 30

q

q

q

q  S  S q



q B@  qP B@  qPq @BqPP  @ q @PP B q @ @B  @Bq

52.

53. q

q

q

q

q

q

q q

q q

q

q

q

q

q

q

54. For 1 ≤ i ≤ n, plot vertex (2, i) at point (0, i − 1). Plot (1, 1) at (−3, 2), plot (1, 2) at (3, 2), and plot (1, 3) at (−1, 1). Use straight lines for all of the edges.

4.9. CHAPTER 9

569

55. One crossing is possible as shown. Now apply the result in Exercise 39. q q  AAq q AAq q An edge has been added to the graph from Exercise 39. So, at least one crossing is necessary. 56. One crossing is needed by Exercise 40. Bring top two corners down inside to obtain one horizontal that crosses the vertical middle. 57. True. The properties of being connected and having only even degrees are preserved in subdivisions. Subdividing edges simply introduces new vertices of degree 2. 58. False. The graph on the left is Hamiltonian, but the other is not. q q q q q q q q q

Section 9.5 1. No. Two adjacent vertices are both That is, 3 = ω ≤ χ ≤ 3. So, equalities colored with color 2. must hold throughout. 2. Yes.

6. Since ω = 4 and a 4-coloring is pictured, χ = 4.

3. χ = 2.

q 2q 1q

1

q 2q 1q

1

q 4q 3q

q 1q 2q

3

2

We see that a 2-coloring exists. The presence of an edge makes 2 colors nec- 7. χ = 2. This graph is K3,3 . (2,3) q q(1,1) essary. J  A

(1,3)  q J Aq(2,1) 4. Since ω = 3 and a 3-coloring is picA J  q Jq (1,2) (2,2)A

tured, χ = 3. q 2q 3q

1

q 1q 2q

3

See Theorem 9.19. 8. Since ω = 4 and a 4-coloring is pictured, χ = 4.

5. Since ω = 3 and a 3-coloring is pictured, χ = 3. q q2 3 q 1q 2q q3 2

q q2

1

3

q q4

q1

570

CHAPTER 4. ANSWERS TO ALL EXERCISES

9. Let (V1 , V2 ) be a bipartition. Use color 1 on the vertices in V1 and color 2 on V2 . Since edges only join V1 to V2 , no edge will join vertices of the same color. 10. Coloring G with 1, . . . , χ(G) and H with 1, . . . , χ(H) shows that χ(G + H) ≤ max{χ(G), χ(H)}. Since G requires χ(G) colors, χ(G + H) ≥ χ(G). Since H requires χ(H) colors, χ(G + H) ≥ χ(H). Hence, χ(G + H) ≥ max{χ(G), χ(H)}. 11. 2.

15. 2

12. 2

16. 3

13. 6

17. 1

14. 2 18. 4 19. Sketch. The outer 5-cycle is “uniquely” 3-colorable. This then forces all three colors to be used on the 5 neighbors of the center vertex. Now, the center vertex requires a fourth color.  1q Z  1q Z 2 q q 4 q Zq2 q 2 L2 L q q 3 L1 Lq q 1 3

20. Suppose to the contrary that a 3-coloring exists. Say the topmost vertex is assigned color 1. Since its neighbors need colors 2 and 3, both bottom vertices will need to be assigned color 1. However, they are adjacent. 21. By symmetry, it suffices to consider three cases. 1q Z  q1 Z 2 2 q q q2Zq L 2 L 3 q q1 L Lq q 3

1

1q Z  q1 Z 2 q q 3 q Zq2 q 2 L 2 L q1 L Lq q 3

1

2

q3 q q 1 q q1 q 3 L 3 L 3 q q3 L Lq q 1

None is bipartite, and each has a 3-coloring. 22. Apply Theorem 9.19 and Exercise 20 from Section 8.2.

2

4.9. CHAPTER 9

23.

571

Time Period 1 2 3

Committee Meeting German, Japanese History, Kuwait Indochina, Latin

Note that German, History, and Indochina form a clique requiring three colors. qG  q AAq

L

K

qH AAqI qJ

24. Since A, C, and E forms a K3 subgraph of the scheduling graph, the following schedule is best possible. Time Period 1 2 3

Committee Meeting A, B, F C, G, H D, E

25. Since C5 is not bipartite, 3 colors are needed. One color class must be of size 1. The other color classes are then forced. Let G and H be graphs isomorphic to C5 that have been colored. Let v in G and w in H be the vertices comprising the color classes of size one. Note that the neighbors of v must receive different colors (think about this). Similarly, the neighbors of w receive different colors. Map v to w and map the neighbors of v to the neighbors of w (in either of two possible ways). This determines the rest of an isomorphism from G to H as well. 26. For n even, χ(Cn ) = 2. The odd vertices must form one color class, and the even vertices must form the other. 27. The sizes of the color classes do not match up in the pictured colorings. q q2 q q2 1 1 @q 1 @q 1 q3 q3 1 q 2 q The left coloring has a color class of size 3, and the right coloring does not. Hence, no isomorphism from the left graph to the right can send the color class of size 3 to another color class of size 3. 28. There can be one color class of size 4 and the other of size 2, or there can be two color classes of size 3.

572

CHAPTER 4. ANSWERS TO ALL EXERCISES

29. χ = 3. The 5-cycles need 3 colors, 3-coloring is pictured, χ = 3. 1 and a 3-coloring is easily found. r r2 1q 1r 1 r qZ r2 3 r r 2r 3 r r 2 3 3 Z 2  2q Z q X  Xq C  q3 2 1 L 1l , r r 3r r r 2 1 C  , l C q q 1 L 1 2 r3 r 3r A q Lq r r1 3 1 2 30. Since ω = 3 and a 3-coloring is 33. χ = 4. Try starting a 3-coloring pictured, χ = 3. from the middle vertex, and observe q1 that it fails. q2 q3 r q q2 3 b r r q1 r 31. χ = 4. A 4-coloring is easily found. A 3-coloring is seen to be impossible, by trying to construct one. q

q2 q

1

q

3

q

2

q

1

q

4

3

q1 q

q3

4

q

q2

r

r

1 r

r

r c

r

r

rd

r

Observe that vertices b, c, and d must also receive color 1. It is now impossible to color the outer triangle. 34. Since ω = 3 and a 3-coloring is pictured, χ = 3.

4

Color the vertices of a triangle with three colors. This forces the colors on adjacent triangles. Further extending this process leads to a conflict. 32. Since C5 requires 3 colors and a

r r r3 2

r3

1

2

r

r r r1 2

3

r

1

3

r

r

r

r2

3

2

35. For any subset W of V , the set W is independent in Gc iff W induces a clique in G. Hence, an independent set W in Gc of largest possible size will also be a clique in G of largest possible size. That is, α(Gc ) = ω(G). Since Gc c ∼ = G, we also have α(G) = α(Gc c ) = ω(Gc ). 36. Since distinct vertices in Kn are always adjacent and Kn has no loops, a graph map from G to Kn is an assignment of the vertices of G to {1, . . . , n} in such a way that adjacent vertices of G are assigned distinct values. 37. The graph with vertices {acid, bleach, sulfides, ammonia, hydrogen peroxide}, whose edges reflect potential dangerous chemical reactions, has chromatic num-

4.9. CHAPTER 9

573

ber 2. Putting acids and ammonia in cabinet 1 and bleach, sulfides and hydrogen peroxide in cabinet 2 is safe. t sulfides acid tH @H @HH ammonia tH @ Ht hydrogen peroxide HH @ H@ Ht bleach

38. The graph with vertices Amy, Betty, Cindy, Kelly, Mary, Sally, and Wendy whose edges reflect personality conflicts has chromatic number 3. Putting Amy, Cindy, and Kelly in group 1, Betty and Wendy in group 2, and Mary and Sally in group 3 will avoid conflicts. 39.

40.

41.

1 q 2 q q1 2q 1q 3q @ @q2

1r 3r

1q

3q

q1

q 2

q 1

q 3

42.

r1

1r @

3r 2r @ 1r @r1

3r

r2

@2r @ r @r 3 4

r 1

43. Proof. (→) Suppose G and H are bipartite. So χ(G), χ(H) ≤ 2, by Theorem 9.19. Thus, χ(G × H) ≤ 2, by Theorem 9.28. Hence, G × H is bipartite, by Theorem 9.19. (←) Suppose G × H is bipartite. So χ(G), χ(H) ≤ max{χ(G), χ(H)} = χ(G × H) ≤ 2. Hence, G and H are bipartite.  44. No. K3,3 is 2-colorable but not planar. 45. (a)

r r @ r @ @r r

(b) Use the result from Exercise 22, together with the observation that vertex n must receive a color different from those of 1, 2, . . . , n − 1. That is, χ(Wn ) = 1 + χ(Cn−1 ). 46. (a)

q q

@

q q q

@

q

574

CHAPTER 4. ANSWERS TO ALL EXERCISES

(b) Use the result from Exercise 22 together with the observation that Cn is a subgraph of the n-prism. 47. Use the Greedy Coloring Algorithm, and color the highest-degree vertex first. At most d2 + 1 colors will be used. That is, when coloring a particular vertex, no more than d2 colors can ever be adjacent to it. So some color in {1, 2, . . . , d2 + 1} must suffice. 48. Order the vertices so that v1 and v2 are first and second. The Greedy Coloring Algorithm will use at most d2 colors. 49. (a) Say v1 and v2 are combined to form v. A χ(G0 )-coloring of G0 gives a χ(G0 )-coloring of G with v1 and v2 the same color. (b) Let G be C6 and identify two opposite vertices (such as 1 and 4). 50. (a) Take a χ(G)-coloring of G and recolor the two vertices to be identified with color χ(G) + 1. This new coloring will transfer to G0 . (b) Let G = C8 and identify vertices 1 and 5. 51. Sketch. Let v be a vertex such that G \ {v} is disconnected, and let H1 , . . . , Hc be the components of G \ {v}. Argue that, for each 1 ≤ i ≤ c, the subgraph induced by Hi ∪ {v} can be colored with at most ∆(G) colors. Further, all of these colorings can be arranged to give v the same color.  52. Apply the Greedy Coloring Algorithm using the ordering from the hint. 53. 3. 1

3 3 @ @ 2 @ 1@ 2@ @ @ @

2 1

54. Needs 4 colors. 1

2 3 @ @ @ @ 4 3 @ @ 1@ 2 @ @

@

55. Refer to an atlas. (a) By the Four Color Theorem, the map can be colored using only four colors. (b) 4. (c) The states PA, MD, VA, KY, and OH form a 5-cycle that requires 3 colors by Exercise 22. Since WV is adjacent to each of these, a fourth color is required. See Exercise 45 as well. 56. Refer to an atlas. (a) By the Four Color Theorem, the map can be colored using only four colors. (b) 4. (c) The countries Malawi, Mozembique, Tanzania, and Zambia form a 4-clique needing four colors.

4.9. CHAPTER 9

575

Review 1. (a) G is connected, and the removal of the central vertex disconnects it. (b) No single edge disconnects G, but two do. Note that δ = 2 and λ ≤ δ. 2. 5 = min{5, 7}. See Theorem 9.4. 3. 4, since 4 = κ ≤ λ ≤ δ = 4. See Remark 9.1 and Theorem 9.5. Note that the inequalities are forced to be equalities. 4. κ = 1 for all paths on 2 or more vertices. See Theorem 9.1. 5. 2, since 2 = κ ≤ λ ≤ δ = 2. See Theorems 9.1 and 9.5. Note that the inequalities are forced to be equalities. 6. κ(G) = 2, since the top-middle and bottom-middle vertices form a disconnecting set, and no single vertex does. c t c c c

c t

c

7. False. κ(G) ≤ λ(G). See Theorem 9.5. 8. True.

s s s Q  QA  sAAAQ As A  Q AAsQ Q A sAs

The pictured graph G has κ(G) = 2 and λ(G) = 4. The top-middle and bottommiddle vertices form a κ-set. The edges incident with the left-most vertex form a λ-set. 9. Proof. Let u and v be the unique pair of vertices not joined by an edge. Then V \ {u, v} is the only disconnecting set for G, and its size is n − 2. Thus κ(G) = n − 2.  10. Since κ(G) ≤ λ(G) ≤ δ(G) = 3, it suffices to observe that no two vertices disconnect G. Observe that the graph is vertex transitive. The graph obtained by removing any one vertex cannot be disconnected by the removal of just one more vertex. Hence, disconnecting sets for the original graph have size at least 3. 11. λ = min{m, n}, since min{m, n} = κ ≤ λ ≤ δ = min{m, n}. The inequalities are forced to be equalities. See Theorems 9.4 and 9.5.

576

CHAPTER 4. ANSWERS TO ALL EXERCISES

12.

Start 14

10

r

r

1

r

12 13

r

6 9

r

3

r

4

r

7 8

r

r

2

11

5

13. There are four vertices of odd degree. There need to be exactly two vertices of odd degree for an Euler trail to exist. 14. An Euler circuit exists, since each vertex has even degree and the graph is connected. Nord s West

s @

sOst @ @s S¨ ud

15. There is no Euler circuit, since two vertices have odd degree. There is an Euler trail (1, 1), (2, 1), (1, 2), (2, 2), (1, 1), (2, 3), (1, 2). (1, 1) rH r(2, 1)  @ rHHHr(2, 2) (1, 2)  @ HH @r(2, 3)

16. Neither. There are eight vertices of degree 3. q q q q q q q q 17. 1, 2, 3, 4, 1, 3, 5, 2, 4, 1 is an Euler circuit. 1s Z B 5 s  B Zs2 Z  Z BB  B Z   B s ZBs 4 3 18. There is no Euler circuit, since two vertices have odd degree. There is an Euler trail 1, 2, 3, 4, 5, 6. s1

s2

s3

s4

s5

s6

4.9. CHAPTER 9

577

19. An Euler circuit is shown.

r @1r

Start

r

12

8 9

11 4

r

2

10

r

7

r

5

3

r

6

r

Since there are no vertices of odd degree, there is no Euler trail. 20. An Euler circuit is shown. r 1 r-2 r 11 ? 3? 14 12 r136 r 7 r 8 ? 10 6 4 r 96 6 r 5r

Start

Since each vertex has outdeg = indeg, there is no Euler trail. 21. An Euler trail is shown.

r 10 Fr 14r ? 9 11 13 12 r-2 rr 6 6 ? 8 3 1 4 5 7 r 6 r 6r 6 S

Since vertex S has outdeg = indeg + 1, there is no Euler circuit. 22. Odd n ≥ 5, since Cn c is (n − 3)-regular and n − 3 is even iff n is odd. 23. Start 24

23

r r r

r

1 7

6

9

8 19 20 18 21 22

r r

2 5 10 4 11 12 13 15 14 17

6  ss

24.

r

7

r

3

r

16

1 32 12 13

s

11  2

?6 ?6 5 3 ?10 6 4  s  ss 8 9 14 ?31 20 ?19 6  30 25  s6 s s29 24 15 ?28 26 ?23 21 ?18 6  622 27  s6 s s16

17

25. (1,1), (2,1), (1,2), (2,2), (1,3), (2,3), (1,4), (2,4), (1,1). (1, 1) rH r(2, 1) J @ HH

r(2, 2) (1, 2) r HJ @

 @ H Hr(2, 3) r J@ (1, 3)  H @ H J r(2, 4) @ H

 r (1, 4) = 6. There are 8 choices for the first vertex, 3 for the second, 2 for 26. 8·3·2·2 8·2 the third, 2 for the fourth, and then a Hamiltonian cycle is uniquely completed.

578

CHAPTER 4. ANSWERS TO ALL EXERCISES

However, we must then divide out for the choice of the first vertex and the choice of the direction in which to traverse the cycle. 27. The edges incident with the degree-2 vertices form a cycle prematurely. r r r r

r

r

r

r

r

28. No. Edges incident with the degree-2 vertices form a cycle prematurely. r r @r r r r

r

r

29. Proof. Suppose G is Hamiltonian with Hamiltonian cycle C. Since C is a subgraph of G, we have 2 = δ(C) ≤ δ(G).  30. No. The corresponding graph does not have a Hamiltonian cycle. In fact, the graph is that in Exercise 27. 31. A Hamiltonian cycle is shown. Start 8

7

r 1 r r ? 5 2 6 6 r r 6

4

6 r r 3 6 r

32. (a) Zed. (b) Zed, Xia, Quo, Jack. (c) Yes, the Hamiltonian path is unique. 33. From any one vertex, you can follow the Hamiltonian cycle to any other. Let G be a directed graph with a Hamiltonian cycle C. Let u and v be any two vertices in G. Starting at u, follow C until v is reached. This gives a path from u to v. 34. |V | = 15, since |V | − |E| + |R| = 2 gives |V | − 23 + 10 = 2. 35. The subgraph obtained by deleting the center vertex is a subdivision of K5 . r Z r Z  rr rZr L L r r Lr r

4.9. CHAPTER 9

579

36. Proof. Suppose G = (V, E) is a planar graph all of whose cycles have length at least 5. It suffices to assume that G is connected, because a disconnected graph has fewer edges than the connected graph obtained by joining its components with additional edges. Since the X dual graph D(G) has vertex set R and edge set E, Theorem 8.12 tells us that deg(r) = 2|E|. Since each region of r∈R

G must have at least 5 edges, for each r ∈ R, deg(r) ≥ 5. Hence, 5|R| ≤ 2|E|. Theorem 9.13 then gives that 3 2 2 = |V | − |E| + |R| ≤ |V | − |E| + |E| = |V | − |E|. 5 5 Thus, 35 |E| ≤ |V | − 2, and the result follows.  37. The values |V | = 10 and |E| = 15 do not satisfy the inequality in Exercise 36. That is, all cycles in the Petersen graph have length at least 5. However, 15 6≤ 5 3 (10 − 2). 38. K4 is planar, and all others are subgraphs of K4 . That is, subgraphs of a planar graph are planar. Each graph on 4 or fewer vertices is a subgraph of the planar graph K4 . 39.

r @r r

r

r

r

r

r @r

The middle vertex shown here corresponds to the outer region in the embedding from Exercise 13. 40. The face labels on the left correspond to the vertex labels on the right. 1 s s s l , T l1,   T sT s ,4l T 3 2 4 T s, l s  Ts 3

2

41. No. Subdivide an edge of K5 . The result contains neither K5 nor K3,3 . The correct statement (Kuratowski’s Theorem) is that every nonplanar graph contains a subdivision of K5 or K3,3 . 42. A planar embedding is pictured. r

r

r r

r r

r

r

580

CHAPTER 4. ANSWERS TO ALL EXERCISES

43. The following graph is isomorphic planar. A drawing with 1 crossing is to K3,3 , and the circuit board contains pictured. a subgraph that is a subdivision of it. r r r r r @r r r @r r r r r r 44. It is not planar. It is a subdivision of K3,3 . The pictured graph is isomorphic to K3,3 , and the power grid is a subdivision of it. r r r r

47. χ = 4. Try starting a 3-coloring from the middle vertex, and observe that it fails. Observe that vertices b, c, and d must also receive color 1. It is now impossible to color the outer triangle. r rb

r r

r

45. ν = 1. By Exercise 43, it is not planar. A drawing with 1 crossing is pictured. r r @r @r r r

r

r r

r

r r r

rd

r

r @ r   @ rHr HH r @@ AH r @ Ar

48.

r

cr

1 r

46. ν = 1. By Exercise 44, it is not

49. ω = 3, α = 3, χ = 3. 2r 1r r @ @ r @ @r3 3 @ @ r @r @r2 2 1

1

The upper-left triangle colored 1, 2, 3 forms a clique of maximum size. The three vertices colored 1 form an independent set of maximum size. The displayed 3coloring uses the fewest colors possible. 50. ω = 3, α = 3, χ = 3. r @2r @r1

1

3

r

r 2

r

2

r1 r3

4.9. CHAPTER 9

581

The lower-right triangle colored 1, 2, 3 forms a clique of maximum size. The three vertices colored 1 form an independent set of maximum size. The displayed 3-coloring uses the fewest colors possible. 51. 3 sessions are needed since Chess, Math, and NHS form a 3-clique. It is possible by the schedule: (1) Archery, NHS (2) Chess, Student Council (3) Math. Math Chess s s s NHS

s StCo

s Arch

52. The Greedy Coloring Algorithm gives the 4-coloring on the left, while the 3-coloring on the right is optimal. 4r 1r 1r 3r @ @ @ r @r @r @r 3 4 2 2

1r 2r 1r 3r @ @ @ r @r @r @r 3 2 3 2

Note that ω = 3. 53. ∆(G) + δ(Gc ) = n − 1. For every vertex v, degG (v) + degGc (v) = n − 1. A vertex in G incident to the largest number of edges will be a vertex in Gc incident to the smallest number of edges. 54.

1@ @3 @ @ 2 @ 3@

3

2 1

55. Refer to an atlas. (a) It is easy to do in three colors. (b) Three. (c) The regions Alberta, Northwest Territories, and Saskatchewan form a 3clique that requires three colors.

582

4.10

CHAPTER 4. ANSWERS TO ALL EXERCISES

Chapter 10

Section 10.1 1. No. It contains a cycle of length 3.

5. No. It has multiple edges.

2. Yes.

6. Yes.

3. min{m, n} = 1. If m, n ≥ 2, then Km,n contains a cycle of length 4.

7. No. A loop forms a cycle of length 1.

4. Yes. 8. No. 9. Yes. It is a forest but not a tree (unless n = 1). It consists of n disjoint copies of T . 10. Only if G is an empty graph and H is a forest, or vice versa. r r r r r r

r r r r r r

11. 5.

r r r r r r

r r r r r r

r r r r r r

These are the possible carbon trees. 12. 9. r r r r r r r

r r r r r r r

r r r r r r r

r r r r r r r

r r r r r r r

r r r r r r r

r r r r r r r

r r r r r r r

r r r r r r r

These are the possible carbon trees. 13. (a) Yes. There are other walks but only one path. (b) No. Hawk, Center, Park and Hawk, Center, Anselm, Main, Park are two different paths. (c) No. Center, Park, Main and Center, Anselm, Main are distinct shortest paths from Center to Main. 14. (a) Yes. (b) Leaves. (c) Internal vertices. 15. Converse: Let G be a graph. If there is a unique path between any pair of vertices in G, then G is a tree.

4.10. CHAPTER 10

583

Proof. Suppose that between any pair of vertices in G there is a unique path. The existence of paths shows that G is connected. So suppose G contains a cycle C. Let u and v be distinct vertices of C. Then C provides two distinct paths from u to v. This contradiction shows that G contains no cycles. Hence, G must be a tree.  16. Proof. Suppose |E| = |V | − 1 and G is connected. Let H = (V, F ) be a spanning tree for G. Since F ⊆ E and |F | = |V | − 1 = |E|, it must be that F = E. So G = H is a tree.  17. Proof. (→) Suppose G has a unique spanning tree T . So VT = VG . Suppose that outside of T there is some edge e 7→ {u, v}. Hence, in T there is a path P from u to v. If we let d be the first edge on P , then (T \ {d}) ∪ {e} is a spanning tree, different from T . So it must be that ET = EG , and hence T = G. (←) If G is a tree, then only G itself can be its own spanning tree.  18. There are none. 19. Proof. Suppose G is connected and |E| = |V | − 1. Let T be a spanning tree for G. So VT = V and ET ⊆ E. By Theorem 10.3, |ET | = |VT | − 1. Since |ET | = |VT | − 1 = |V | − 1 = |E|, it follows that ET = E and thus G = T is a tree.  P 20. Proof. Let G = (V, E) be a tree. So 21 v∈V deg(v) P= |E| = |V |−1. If G has at most one vertex of degree 1, then 1 + 2(|V | − 1) ≤ v∈V deg(v) = 2(|V | − 1). This is impossible.  21. Proof. (→) Suppose T is a tree with exactly 2 leaves, and let P be a longest path in T . Note that the two ends of P must be leaves. Suppose that there are vertices outside of P , and let v be one of greatest possible distance from P . Then, v must be a third leaf. Since there can be no vertices outside of P , it follows that T = P . (←) Obvious.  22. 3, 2, . . . , 2, 1, 1, 1. At least 4 vertices are required. 23. n − c. For each 1 ≤ i ≤ c, let ni be the number of vertices in component i. The number of edges in component i is thus ni − 1. Now, |E| =

c X i=1

c X (ni − 1) = ( ni ) − c = n − c. i=1

24. Each component, being a tree on two or more vertices, must have at least 2 leaves. Hence, all together, there will be at least 2c leaves. 25. Just K1,n . All n − 1 leaves must be joined to the only other vertex.

584

CHAPTER 4. ANSWERS TO ALL EXERCISES

26. Such a tree contains a path u, v, w, x and every other vertex is adjacent to one of v or w. 27. Theorem: If G = (V, E) is a tree, then |E| = |V | − 1. We prove by induction that: If G = (V, E) is a tree, then G is planar. Proof. Base case: |V | = 1. So |E| = 0 and G is planar. Inductive step: Suppose k ≥ 1 and any tree on k vertices is planar. Let T be a tree on k + 1 vertices, and let v be a leaf of T . Since T \ {v} is a tree on k vertices, it must be planar. The leaf v can now be added to give a planar embedding of T .  By Euler’s Formula, |V | − |E| + 1 = 2. So the theorem follows. P 6 |V | − 1, G is not 28. If δ(G) ≥ 2, then |V | = 12 v∈V deg(v) = |E|. Since |E| = a tree. Therefore, G must contain a cycle.  29. n2 +n. There are n subgraphs isomorphic to P1 . Every  other path subgraph corresponds to the pair of vertices it joins. There are n2 pairs of vertices. 30. Since trees contain no cycles, they contain no odd cycles. Apply Theorem 8.4. 31. ET = {{1, 2}, {2, 3}, . . . , {n − 1, n}}. That is, Pn is a spanning tree for Cn . 32. E = {{1, 2}, {1, 3}, . . . , {1, n}}. 33. Remove an edge from the Hamiltonian cycle guaranteed in Example 9.13. (u, 1)s

s(v, 1) s(v, 2)

(u, 2) s ?

6 s(x, 1)

(w, 1)s ? 6 (w, 2)s



s(x, 2)

34. E = {{(1, 1), (2, 1)}, . . . , {(1, 1), (n, 1)}, {(1, 2), (2, 1)}, . . . , {(1, m), (2, 1)}}. 35. Converse: If a graph G has a spanning tree, then G is connected. Proof. Suppose G has a spanning tree T . Let u and v be vertices in G. The path from u to v in T is also a path in G. So G is connected.  36. Each component has a spanning tree. Together these form a spanning forest. 37. (a) 3, 5. (b) 2. (c) 2. (d) 3. (e) Yes. (f) Yes.

4.10. CHAPTER 10

585

38. (a) 1, 3. (b) 7. (c) 3. (d) 5. (e) Yes. (f) No. 39. (a) 4. (b) 2. (c) 2. (d) 3. (e) No. Note that 2 has three children. (f) No. Note that 2 and 4 have different numbers of children. 40. (a) 3, 5. (b) 4. (c) 4. (d) 5. (e) Yes. (f) No. 41. (a) No, grandchild. (b) Parent. (c) Leaves. (d) 3. (e) Yes. 42. (a) 6. (b) Internal vertices. (c) Not 3-ary, but 4-ary. (d) Yes. 43. No. The tree in Figure 10.9 is balanced with v2 as the root, but not with v1 as the root. vt1 v2t v3 t

vt4 v5 t tv6

44. No. 45. False. The pictured graph is a counterexample. r r r r r r r r No matter which vertex is chosen to be the root, the resulting rooted tree will not be balanced. 46. False. Subdivide one edge in K1,4 . 47. Theorem: If T is a full m-ary tree with n vertices, l leaves, and i internal vertices, then n = i + l = mi + 1. Proof. Suppose T is a full m-ary tree with n vertices, l leaves, and i internal vertices. Since each vertex is either internal or a leaf, n = i + l. Make T a directed graph by directing each edge from parent to child. There are n − 1 vertices other than the root (and there are n − 1 edges). Each non-root vertex is the head (child) of a unique edge with internal tail (parent). Each internal vertex is the tail of m edges, and there are i internal vertices. So mi = n − 1.  48. i =

n−1 m ,l

49. n =

ml−1 m−1

=n−

n−1 m .

and i =

l−1 m−1 .

586

CHAPTER 4. ANSWERS TO ALL EXERCISES

Note that l − 1 = n − i − 1 = mi + 1 − i − 1 = (m − 1)i. Note that n(m − 1) = nm − n = nm − mi − 1 = m(n − i) − 1 = ml − 1. 50. n = mi + 1, l = mi + 1 − i. 51. 31. A full 3-ary tree with i = 10 internal vertices has n = 3(10) + 1 = 31 vertices. 52. 15. 53. Proof. Our proof is by induction on h. If h = 0, then l = 1 and we have equalities in our desired results, for any choice of m. So suppose that h ≥ 1, that T is a full m-ary tree of height h with l leaves all at level h, and suppose that our desired results hold for all trees with smaller height. Let v0 be the root of T , and let v1 , . . . , vm be its children. If we remove v0 , then there remain m rooted trees. For each 1 ≤ j ≤ m, let Tj be the tree with root vj , height hj , and lj leaves. So hj = h − 1, and the inductive hypothesis applies to Tj . Hence, l = l1 + · · · + lm = mh−1 + · · · + mh−1 = m · mh−1 = mh .  54. Sketch. For 0 ≤ k ≤ h − 1, the number of vertices at level k is mk . Since each vertex at level h − 1 is adjacent to some leaf, and at least one vertex at level h − 1 has m children, we must have mh−1 < l. Since h − 1 < logm l ≤ h, we see that h = dlogm le.  55.

all

eat

57.

t t

t

and

t

take

t

t

merry

t

students calculus

t

drink

be

t 56.

three

t

58. is

long

t

live king

t

t

t the

t

the

t

magic

t number

t

4.10. CHAPTER 10

587 t

59. t B

t

t

B B

t

t t

B B B

WWW B WW B W

t

B B W

B WW B

B

t

W B

WB B W

t

60. t t WB B B

t t

B

B

B

t

B

t

t

t

B B B W

B B W B

B WWW B W B B W B WW

t

61. t

t t

B B

W

WB B W

B B W

t t

t

W W

t

W

t t

W

B WW B B WW B B WW B W B B WW B B W

t

62. t B W

t t

B

WW B B

W B B

t t

WW B B

t

B B W

B B WW

63. L. 65. V.

64. O.

t

66. E.

t B

t

W B

B B WW

588

CHAPTER 4. ANSWERS TO ALL EXERCISES

Section 10.2 1. [1, 2, 4, 3, 5, 6, 7]. The following picture better reflects the order in which the vertices are encountered. 1s 2s 4s 3s

5 s

s6

s7

2

q1 q3  

A q Aq4

 AAA

q q 5

6

9. [5, 4, 3, 7, 6, 2, 1]. The following picture better reflects the order in which the vertices are encountered. s1 s2

2. [1, 2, 6, 3, 7, 4, 5].

r3

3s 4s

4r 5r @ 6r @r7

10. [3, 7, 5, 2, 6, 4, 1].

3. [1, 2, 4, 6, 5, 3, 7]. 1r 2r

4. [1, 2, 4, 5, 6, 3, 7]. 3r 6r

6. [1, 2, 4, 3, 5, 6]. 1q 2q 3q q q q

4

5

6

5s

11. [7, 6, 3, 5, 4, 2, 1]. r7

4r 2r @ 5r @r1 5. [1, 3, 4, 5, 2, 6]. 1q q2 3 q 4q 5q q6

s6 @ @s7

3r 6r

4r 2r @ 5r @r1 12. [7, 3, 5, 6, 4, 2, 1]. 1r 2r

13. [4, 6, 5, 3, 2, 1]. q 2q 3q q q q

q1   2q

q3 AAq4

AAq 5

q 6

8. [1, 2, 3, 4, 5, 6].

r3

4r 5r @ 6r @r7

1

7. [1, 2, 3, 5, 4, 6].

r7

4

5

6

14. [6, 2, 5, 4, 3, 1]. 1q q2 3 q 4q 5q q6

4.10. CHAPTER 10

589

15. [6, 5, 3, 4, 2, 1]. 16. [3, 5, 6, 4, 2, 1]. q1  2q 

q q

AAA q4 2 q

AA

q  q 1

5

3

AAq 5

6

q3 AAA q4 q 6

17. Yes. K3 with labels 1, 2, 3 is the smallest example. BFS s1 2s

DFS s1 s2

3s

s3 18. Yes. P2 with labels 1, 2 (or any other tree). 19. Yes. For C4 , input orderings 1, 2, 3, 4 and 1, 4, 2, 3 give different trees (from root 1). 1q 1q q2 q2 4q

q3

4q

q3

20. Yes. Cyclically label C4 first 1, 2, 3, 4 and then 1, 4, 2, 3. Different trees result from root 1. 21. No. K1,3 with the degree-3 vertex labeled 1 and the others 2, 3, 4 yields the same list L as does P4 with consecutive labels 2, 3, 1, 4. They both yield the list [2, 3, 4, 1]. 22. No. K1,3 with the degree three vertex labeled 1 and the others 2, 3, 4 yields the same list L as does P4 with consecutive labels 2, 3, 4, 1. 23. 1, 2, 4. No; 1, 3, 4 is another. q1  2 q AAq 5

q3 AAq4 q6

24. 1, 2, 4, 6. No, 1, 2, 5, 6 is another. 25. True. From each vertex, the path in the breadth-first search tree to the root is a shortest such path. That is, its level in the tree is its distance in the graph from the root. For the vertices at the highest level, there can be no shorter path to the root as would need to exist in a tree of smaller height. 26.

False.

A depth first search of the pictured graph using the ordering

590

CHAPTER 4. ANSWERS TO ALL EXERCISES

1, 2, 3, 4, 5, 6, 7 gives a tree of height 4. However, 1, 7, 6, 3, 5, 4 is a path of length 5 that extends to a spanning tree. q 2q 4q

1

q 6q 3q 5q

7

27. Yes. (V, F ) is connected at each stage, and has no cycles at the end. 28. No. It will be connected, but could contain cycles. For example let v and w be two distinct vertices on a cycle and form G by attaching two new vertices u1 and u2 to w. There are now paths Pi from v to ui such that P1 and P2 are edge disjoint. Yet their edges together form a cycle. 29.

Let v be a vertex of G = (V, E). Perform Depth-First Search for G starting at v to obtain edge set F . If |F | = |V | − 1, then G is connected. Otherwise G is not.

30.

Let W = ∅. Let c = 0. While there is a vertex v ∈ V \ W , \begin Perform Depth First Search of G starting at v to obtain edge set F . Add the ends of the edges of F to W . Let c = c + 1. \end. The graph has c components.

31. Yes. The first m vertices in L are the children of the (m + 1)st , the next m are the children of the 2(m + 1)st , and so on. The truth of this fact in the case m = 2 makes postfix notation work. 32. No. The two pictured trees have the same L. vr1

vr1

v2 r v4r

v3 r

v2 r

vr 5

v4r ∗

33.

v3 r

@ @

P 1

+ @ @ n

∗ @ @

i

vr 5

4.10. CHAPTER 10

591

34. ∗ @ @

n

n 35. (a) S L − n (c) S − L ÷ n

1 − ÷ . − 1 .

(((( ( −  PPP S L

÷ @ @

2

− @ @

1

(b) ÷

− S

L − n

1 .

hhhh (( ÷ h

h h −  PP  P1 n

36. (a) R1 R2 ∗ R1 R2 + ÷ . (c) R1 ∗ R2 ÷ R1 − R2 .

(b) ÷



R1

R2

+ R1

37. 4. 41. 3. 6 6 3 4

5 2 1

3 − ÷ 1 +

÷ 1 +

+

− − − 3

38. 1.

42. 6.

39. 7.

43. −6.

40. 0.

44. 8.

5 5 5

÷ + 8 6 ÷ 14 7 2

45. Boston, New York, Toronto, Baltimore, Tampa Bay. 46. Rome, Venice, Cannes, Paris, London. 47. Hamiltonian cycle adcbe is found. a, ad, adb, adbc, adbe, adc, adcb, adcbe. 48. Depth First Search completes finding no Hamiltonian cycle. 49. Depth-First Search completes finding no Hamiltonian cycle. a, ab, abc, abcd, abcde, abced, acb, acd, acde, aced, failure. 50. Hamiltonian cycle abedca is found.

7

R2 .

592

CHAPTER 4. ANSWERS TO ALL EXERCISES

51. Colorings 1 1 2 ? realizing none can be found.

and 1

2

1 t

52.

1t

2 t

53. Coloring 1

2

?

1

?

are attempted, before

t2 t1

is attempted, before realizing none can be found.

54. Colorings 1 1 2 2 realizing none can be found.

? and 1

2

?

are attempted, before

55. Consider a graph H in which the vertices are paths of length at most k in Kn . Also add a trivial vertex to H that connects to each path of length 0. The graph H will be a tree with leaves corresponding to permutations of size k. So Depth-First Search will find each of these leaves. 56. Apply the techniques from Exercise 55 using the tournament on Kn such that (i, j) ∈ E if and only if i < j.

Section 10.3 1.(a)

q 3 1

q 4

q 2 3

q 2

q 1 1

q 3

q 2

2.(a) v q1 2 vq2 1 vq3 2 vq4 3

q

1 vq

1

5

(b) $120,000.

1 (b) $140,000

3.(a)

vq 5 2 4

q 3

q 3 1

q 2

q 2

q

1 3 q 1 q 1 q (b) $130,000.

4.(a)

vq 1 4 4

q 2

qv 1 6 q 4 v9

2 3

q 1 4

q 3

qv 2 7 q v10

q 2

q

4 2 q 1 q 1 q (b) $130,000

3

qv 8

4.10. CHAPTER 10

593

6.(a) v q1 1 vq2 2 vq3 1 vq4

5.(a) v q1 3 vq2 3 vq3 2

2 2 4 q 4 q q v4 v5 v6 3 @ 1 1 1 @ @q 4 q v7 v8 (b) $120,000.

7.(a)

vq

3

q

1

q

2

2

q

1

3 vq 2

1

2

3

q

q

q

3

3

1

3

q q 3 q 5 The answer depends on an edge ordering. (b) $270,000.

9.(a) v q1 2 vq2 1 vq3 2 vq4 3

1 vq

1

5

qv 1 6

1

q 4 v9 (b) $140,000.

11.(a)

vq 1

4 4

q 2

2 3

q 1 4

q 3

qv 2 7 q v10

q 2

q

4 2 q 1 q 1 q (b) $130,000.

3

8.(a)

vq

qv 8

1

qv 1 6 q 3 v10

2

q

2

q

5

q

3

q 2

v9 (b) $200,000

3

q

1

4

5

q

5

2

q

5

5 1

qv 2 7 q 5 v11

1

q

2

1

3

qv 8 q v12

q

4

6

q

5

1 2

q

6

q

3

1

2

q

q

q

6

1

2

q q 2 q 4 The answer depends on an edge ordering. (b) $250,000

Order: 1,1,1,1,1,2,2,2,3

10.(a)

q 3 1

q 4

q 2 3

q 2

q

q 1 1

q 3

(b) $120,000

Order: 12.(a) vq 5 q 3 q 1,1,2,2,1,1,3,2 Assuming the top left 2 1 2 edge of weight 1 is q 3 q 2 q added first. 4 1 3 q 1 q 1 q (b) $130,000

2

q

594

CHAPTER 4. ANSWERS TO ALL EXERCISES

13.(a) v q1 1 vq2 2 vq3 1 vq4 5

3 vq

4

5

2

1

q 3 v9 v10 (b) $200,000.

15.(a)

q 2

qv 1 6

vq

2

q

2

q

5

1

qv 2 7 q 5 v11

4

6

q 1

q 1

5

2

2

q

6

5 3

qv 8 q v12

Order: 16.(a) q 1,1,2,2,1,2,4,2,1,2,1,4,2 vq 1 Assuming the bottom 2 q left edge of weight 1 q is added first.

3

1

2

q

q

q

6

1

2

14.(a) v Order: q1 3 vq2 3 vq3 1,2,1,4,1,1,1,2,2,2,3 Assuming the top left 2 2 2 edge of weight 1 is 4 q 4 q q v4 v5 v6 3 added first. @ 1 1 1 @ @q 4 q v7 v8 (b) $120,000

q q 2 q 4 The answer depends on an edge ordering. (b) $250,000.

3

q

1

q

2

2

q 3

q

5

1

3 1

q

3

q

1

2

3

q

q

q

3

3

1

q q 3 q 5 The answer depends on an edge ordering. (b) $270,000

17. Certainly not if it is a loop, but yes otherwise. If the minimum weight edge is not in the tree, then that edge forms a cycle with the tree. So use that edge in place of the one of higher weight in the tree. 18. No. 19. True. Sketch. Let T be the tree produced by Kruskal’s algorithm, and suppose T is not the unique minimum spanning tree. Let T 0 be a minimum spanning tree with the maximum possible number of edges in common with T . Now follow the proof of Theorem 10.8 to obtain a contradiction.  20. Let case (a) be the case in which a constant c is added to each weight, and let case (b) be the case in which each weight is multiplied by d > 0. For any spanning tree T for G, the weight of T satisfies the relation ωG0 (T ) = ωG (T ) + c(n − 1) in case (a), and ωG0 (T ) = cωG (T ) in case (b). Consequently, a tree T that minimizes ωG will also minimize ωG0 .

4.10. CHAPTER 10

595

21. $18,500.

Bt

5

3

Et

2 Mt

5

Gt

2 2 9

t P

tW

3.5

4.5 tT

6

22. $14,000. 23. Sketch. With the ordering of the edges, we may as well regard the weights as distinct. Hence, this result follows from Exercise 19.  24. Kruskal’s Algorithm is easier. So refer to Exercise 23.

25.(a) v q 3 1

q 4 (b) 8 PSI.

q 2 3

q 2

q 1 1

q 3

q 2

q

26.(a) v q1 2 vq2 1 vq3 2 vq4 3

1 vq

1

5

1

qv 1 6 q 4 v9

2 3

qv 2 7

3

qv 8

q v10

(b) 7%

27.(a)

28.(a) vq 5 2

q 3

4

q 1 (b) 8 PSI.

q 3 1 1

q 2 q 1

q 2 3

2

4

q

4

q

29.(a) v q1 3 vq2 3 vq3 2 2 4 q 4 q q v4 v5 v6 3 @ 1 1 1 @ @q 4 q v7 v8 The answer is not unique since any of the three edges incident with the right middle vertex may be chosen. (b) 8 PSI.

vq 1 q 2 q 1

q 1 4 4

q 3 q 1

q 2 2

(b) 8%

30.(a) v q1 1 vq2 2 vq3 1 vq4 5

3 vq

4

5

2

q 2

v9

(b) 11%

1

qv 1 6 q 3 v10

5 1

qv 2 7 q 5 v11

5 3

qv 8 q v12

q q

596

31.(a)

CHAPTER 4. ANSWERS TO ALL EXERCISES

vq

q

3

2

q

5

2

q 2

q

1

1

q

q

3

1

2

3

q

q

q

3

3

1

3

q

vq

2

q

2

q

q

4

3

q

1

32.(a)

q

5

5

1

q

q

3

6

q

2

q

6

3

1

2

q

q

2

6

q

4

q

1 2

(b) 11%

33. False. Let G = C4 with each edge of weight 1, and v any vertex. 34. dist = Dist. 35. Take C4 with three edges of weight 1 and one of weight 2, and let v be an endpoint of the weight-2 edge. vr

r

2

1

1 r

1

vr 1

r

r

2 1

r

1

q

q

1

(b) 11 PSI.

1 2

r

The shortest path tree is on the left, and the minimum spanning tree is on the right. 36. No, there may be no single tree that gives longest distances for all vertices. For example, consider C3 with each edge of weight 1. For a fixed vertex, the longest distance to each of the other vertices is 2. 37. No. Label the edges of C3 with 1,2,3, and put v incident to 2 and 3. 38. Yes, the edge of largest weight could be the only edge incident with v, for example. 39. True. The distance function has merely been multiplied by a constant. 40. False. Let G be a square with three edges weight 1 and one weight 4, and v is an endpoint of the weight-4 edge. Form G0 by adding 1 to each weight.

q

4.10. CHAPTER 10

597

41. Adams 12, Johnson 7, Kennedy 5, Lincoln 7, Nixon 6, Polk 18. t 6 N@

Sv 8 Jt 6 t A @ 12 6@ 7 @5 2 7 @ @ 10 @t @ Pt Lt K 42. Columbia 10, Elwell 7, Lycoming 3, Smith 4, Wells 6. 43. Let G = C4 with three edges of weight 1 and one of weight 2. Suppose v1 is an endpoint of the weight-2 edge, and v2 is not. 2 2 r r v1 r v1 r 1 v2 r

1 1

1 r

v2 r

1 1

r

The shortest path tree from v1 is on the left, and the shortest path tree from v2 is on the right. 44. No. It does not matter. Label the edges of a square 1-4 and put v incident to 1 and 2. 45. Yes. It can be proven by induction on the number of cycles. 46. No. It could contain cycles. See Exercise 28 from Section 10.2. 47. A shortest path tree, since the commander wants the shortest message path to each unit. 48. A minimum spanning tree, since it will minimize the total length of cable.

Section 10.4 1. 3. 2. 6. 3. location = 0. low = 1, high = 6, mid = 3. low = 4, high = 6, mid = 5. low = 4, high = 5, mid = 4. low = 4, high = 4. location = 4.

598

CHAPTER 4. ANSWERS TO ALL EXERCISES

4. location = 0. low = 1, high = 7, mid = 4. low = 1, high = 4, mid = 2. low = 3, high = 4, mid = 3. low = 3, high = 3. location = 3. 5. location = 0. low = 1, high = 7, mid = 4. low = 1, high = 4, mid = 2. low = 3, high = 4, mid = 3. low = 4, high = 4. location = 0. Value not found. 6. location = 0. low = 1, high = 6, mid = 3. low = 4, high = 6, mid = 5. low = 4, high = 5, mid = 4. low = 5, high = 5. location = 0. Value not found. 7. The first. Sequential Search moves through the array in order. As soon as the desired value is found, that location is returned. 8. The smallest index. 9. (a) For an array of length n = 106 , at most 1 + dlog2 ne = 21 comparisons 21 are done. That would take 2×10 9 = 0.0000000105 seconds. (b) For an array of length n = 106 , at most n2 = 1012 comparisons are done. 1012 That would take 2×10 9 = 500 seconds. 10. (a) .00033 seconds. (b) 6.33 seconds. 11. n. 12. d n2 e. 13. Proof. Certainly, dlog2 (k + 2)e ≥ dlog2 (k + 1)e. So suppose, to the contrary, that dlog2 (k + 1)e = n < dlog2 (k + 2)e. Hence, log2 (k + 1) ≤ n < log2 (k + 2). That is, k + 1 ≤ 2n < k + 2. Since 1 ≤ 2n − k < 2, it follows that 2n − k = 1. However, k = 2n − 1 is now odd, a contradiction.  14. By the definition of ceiling, log2 x ≤ dlog2 xe < 1 + log2 x. Now add 1 to everything.

4.10. CHAPTER 10

15.

Maximum. Let max = 1. For i = 2 to n, If A[i] > A[max], then Let max = i. Return max.

16.

Count. Let number = 0. For i = 1 to n, If A[i] = x, then Let number = number + 1. Return number.

599

17. n − 1. A comparison is done for each value of i from 2 to n. There are n − 1 such values. 18. n, based on the algorithm in Exercise 16. 19. ∀ x > 0, |g(x)| ≤ |g(x)|. That is, C = 1 and d = 0 works in Definition 10.8. Here f = g. 20. ∀ x > 0, |0| ≤ 0|g(x)|. 21. ∀ x > 0, |cg(x)| ≤ |c||g(x)| and |g(x)| ≤ | 1c ||cg(x)|. Here we show that cg(x) ∈ O(g(x)) and g(x) ∈ O(cg(x)) to conclude that O(cg(x)) = O(g(x)). In this case, both required inequalities are actually equalities given by properties of absolute value. 22. Proof. (→) Suppose f (x) ∈ O(g(x)). So we have C, d > 0 such that ∀ x > d, |f (x)| ≤ C|g(x)|. Suppose h(x) ∈ O(f (x)). So we have C 0 , d0 > 0 such that ∀ x > d0 , |h(x)| ≤ C 0 |f (x)|. Let C 00 = C · C 0 and d00 = max{d, d0 }. Since ∀ x > d00 , |h(x)| ≤ C 00 |g(x)|, we have h(x) ∈ O(g(x)). Hence O(f (x)) ⊆ O(g(x)). (←) Suppose O(f (x)) ⊆ O(g(x)). By Exercise 19, f (x) ∈ O(f (x)). Hence f (x) ∈ O(g(x)).  23. False. By Exercise 21, O( 23 x) = O(x). 3 By Lemma 10.15, since 1 < 32 , we have x 2 6∈ O(x). 24. True. 25. True. Apply Theorem 10.12 with m = 4 together with Lemma 10.10. 26. False.

600

CHAPTER 4. ANSWERS TO ALL EXERCISES

27. Sketch. Say, for i = 1, 2, that ∀ x > di , |fi (x)| ≥ Ci |g(x)|. Let C = C1 + C2 and d = max{d1 , d2 }. So ∀ x > d, |f1 (x) + f2 (x)| ≤ |f1 (x)| + |f2 (x)| ≤ C1 |g(x)| + C2 |g(x)| = C|g(x)|.  The Triangle Inequality gives |f1 (x)+f2 (x)| ≤ |f1 (x)|+|f2 (x)|. When x > d, we have both x > d1 and x > d2 . Thus, |f1 (x)| ≤ C1 |g(x)| and |f2 (x)| ≤ C2 |g(x)|. Of course, C1 |g(x)| + C2 |g(x)| = (C1 + C2 )|g(x)| = C|g(x)|. 28. We have C1 , C2 , d1 , d2 > 0 such that ∀ x > d1 , |f1 (x) ≤ C1 |g1 (x)| and ∀ x > d2 , |f2 (x) ≤ C2 |g2 (x)|. Let C = C1 C2 and d = max{d1 , d2 }. Since ∀ x > d, |f1 (x)f2 (x) ≤ C|g1 (x)g2 (x)|, we have f1 (x)f2 (x) ∈ O(g1 (x)g2 (x)). 29. Sketch. Suppose f (x) ∈ O(g(x)). By Exercise 19, g(x) ∈ O(g(x)). So Exercise 27 finishes the job.  That is, we have f (x), g(x) ∈ O(g(x)). So f (x) + g(x) ∈ O(g(x)). 30. By Exercise 28, f (x)g(x) ∈ O(1 · g(x)) = O(g(x) and g(x) = 1 · g(x) ∈ O(f (x)g(x)). Now apply Lemma 10.10. 31. Sketch. c = c · 1 ∈ O(g(x)) by Exercise 21. So Exercise 27 finishes the job.  That is, since c, g(x) ∈ O(g(x)), we have c + g(x) ∈ O(g(x)). 32. We can write dg(x)e = g(x) + f (x), where ∀ x ∈ R, 0 ≤ f (x) < 1. So f (x) ∈ O(1) ⊆ O(g(x)). By Exercise 29, O(dg(x)e) = O(g(x)+f (x)) = O(g(x)). 33. (a) Asimple = P (1 + .04(60)) = 3.4P . Acompound = P (1.02)60 ≈ 3.28P . So simple interest is better. (b) Asimple = P (1 + .04(72)) = 3.88P . Acompound = P (1.02)72 ≈ 4.16P . So compound interest is better. (c) Acompound = Asimple iff P (1.02)n = P (1 + .04n) iff n = 0 or n ≈ 64.2787. Use n ≥ 65. 34. (a) Option 1. (b) Option 2. (c) Option 1 has a higher total over the first four years. 35. Sketch. (⊆) ∀ n > 0, log2 n ≤ 1 + dlog2 ne. (⊇) ∀ n > 0, 1 + dlog2 ne ≤ 2dlog2 ne ≤ 4 log2 n.  Note that ∀ n ≥ 2, 1 ≤ log2 n ≤ dlog2 ne ≤ log2 n + 1 ≤ 2 log2 n. Since log2 n ∈ O(1 + dlog2 ne), we have O(log2 n) ⊆ O(1 + dlog2 ne). Since 1 + dlog2 ne ∈ O(log2 n), we have O(1 + dlog2 ne) ⊆ O(log2 n). Hence, O(log2 n) = O(1 + dlog2 ne). 36. Sketch. (⊆) ∀ n > 2, n + n log2 n ≤ 2n log2 n. (⊇) ∀ n > 0, n log2 n ≤ n + n log2 n. 

4.10. CHAPTER 10

601

37. Sketch. (⊆) ∀ n > 0, n2 log2 n2 ≤ n log2 n. (⊇) ∀ n > 3, n log2 n ≤ n log2 n + n(log2 n − 2) = 2n(log2 n − 1) = 4( n2 log2 n2 ).  The first inequality holds since n2 ≤ n, and the second inequality holds since ∀ n ≥ 4, log2 n − 2 ≥ 0. 38. Sketch. (⊆) ∀ n > 0, 100 + 3 · 2n ≤ 64 · 2n . (⊇) ∀ n > 0, 2n ≤ 100 + 3 · 2n .  39. Proof. (→) Suppose f (x) ∈ O(g(x)) and g(x) ∈ O(f (x)). So we have C10 , d1 , C20 , d2 > 0 such that ∀ x > d1 , |f (x)| ≤ C10 |g(x)| and ∀ x > d2 , |g(x)| ≤ C20 |f (x)|2. Let d = max{d1 , d2 }, C1 = C10 , and C2 = C10 . So ∀ x > d, C1 |g(x)| = 2

≤ |f (x)| ≤ C10 |g(x)| = C2 |g(x)| (←) Suppose there exist positive constants C1 , C2 , and d for which ∀ x > d, C1 |g(x)| ≤ |f (x)| ≤ C2 |g(x)|. Let d1 = d2 = d, C10 = C2 , and C20 = C11 . Observe that ∀ x > d1 , |f (x)| ≤ C10 |g(x)| and ∀ x > d2 , |g(x)| ≤ C20 |f (x)|. So f (x) ∈ O(g(x)) and g(x) ∈ O(f (x)).  1 C20 |g(x)|

40. (→) Suppose f (x) ∈ Θ(g(x)). By Exercise 39, we have C1 , C2 , d > 0 such that ∀ x > d, C1 |g(x)| ≤ |f (x)| ≤ C2 |g(x)|. Since ∀ x > d, C12 |f (x)| ≤ |g(x)| ≤ C11 |f (x)|, we see that g(x) ∈ Θ(f (x)). (←) Similarly. 41. Apply Exercise 39. Lemma: f (x) ∈ Θ(g(x)) iff Θ(f (x)) = Θ(g(x)) iff O(f (x)) = O(g(x)). The symmetry in Definition 10.9 gives that f (x) ∈ Θ(g(x)) iff g(x) ∈ Θ(f (x)). Observe that C1 |g(x)| ≤ |f (x)| ≤ C2 |g(x)| iff C12 |f (x)| ≤ |g(x)| ≤ C11 |g(x)|. 42. (→) Suppose f (x) ∈ O(g(x)) and g(x) 6∈ O(f (x)). So O(f (x)) ⊆ O(g(x)) and O(g(x)) * O(f (x)). Since O(f (x)) 6= O(g(x)), it follows that O(f (x)) ⊂ O(g(x)). (←) Suppose O(f (x)) ⊂ O(g(x)). So O(f (x)) ⊆ O(g(x)) and O(f (x)) 6= O(g(x)). Hence f (x) ∈ O(g(x)), and it must be that g(x) 6∈ O(f (x)). 43. False. By Theorem 10.16, O(n) ⊂ O(n logb n). 44. True. 45. True. log2 (n2 ) = 2 log2 n. Now apply Exercise 21. 46. False. 47. (a) The second. (b) The first. (c) The first. Let f (x) = 64blog2 xc + 108x + 18 and g(x) = 2x2 + 4x + 8. Observe that f (55) = 6278 = g(55). Graph f (x) and g(x) on the same set of axes (for x ≥ 1). Observe that f (x) > g(x) for x < 55 and f (x) < g(x) for x > 55. Note that Θ(f (n)) = Θ(n) and Θ(g(n)) = Θ(n2 ). Also, n is a smaller order of growth than n2 .

602

CHAPTER 4. ANSWERS TO ALL EXERCISES

48. (a) The first. (b) 101. (c) The second. 49. Apply Exercise 21. The equation logb n = log1 b log2 n shows that logb n is 2 a constant multiple of log2 n. Here, c = log1 b 6= 0. 2

50. No. If 1 < b1 < b2 , then O(bn1 ) ⊂ O(2n ). 51. Sketch. (i) For 2 ≤ n, we have 1 = log2 2 ≤ log2 n. (ii) Let C be given. For any choice of n > 2C , we have log2 n > C.  By Lemma 10.14, it suffices to show that 1 ∈ O(log2 n) and log2 n 6∈ O(1). In (i), we see that 1 ∈ O(log2 n) by using C = 1 and d = 1. In (ii), we see that there is no value of C such that log2 n ≤ C(1) eventually. Hence, log2 n 6∈ O(1). 52. Sketch. (a) By induction, we see that ∀ n ≥ 0, n ≤ 2n . So ∀ n ≥ 1, log2 n ≤ n. (b) Let C be given. It suffices to consider C ∈ Z with C ≥ 4. By induction, C 2 C we see that ∀ C ≥ 4, 2C > C 2 . Hence, 22 > 2C = 2C log2 2 . Thus, 2C > C log2 2C . That is, for n = 2C , n > C log2 n.  53. Sketch. This follows from Exercise 51 by multiplying by n.  (i) For 2 ≤ n, we have n = n log2 2 ≤ n log2 n. (ii) Let C be given. For any choice of n > 2C , we have n log2 n > Cn. 54. Sketch. This follows from above (O(log2 n) ⊂ O(n)) by multiplying by n.  55. Sketch. (i) By induction, we see that ∀ n ≥ 4, n2 ≤ 2n . (ii) Let C be given. It suffices to consider C ∈ Z with C ≥ 10. By induction, we see that ∀ C ≥ 10, 2C > C 3 . That is, for n = C, 2n > Cn2 .  By Lemma 10.14, it suffices to show that n2 ∈ O(2n ) and 2n 6∈ O(n2 ). In (i), we see that n2 ∈ O(2n ) by using C = 1 and d = 3. In (ii), we see that there is no value of C such that eventually 2n < Cn2 . Hence, 2n 6∈ O(n2 ). 56. Sketch. (a) By induction, we see that ∀ n ≥ 4, 2n ≤ n!. (b) Let C be given. For any integer n > 4 + 2C, we can see by the grouping (n)(n − 1)(n − 2) · · · (5)(4!) > (2C)(2)(2) · · · (2)(24 ) that n! > C2n . 

4.10. CHAPTER 10

603

Section 10.5 1.

l = 1, m = 2, h = 4

a1

a2 a3 a4 a2 < x ?  HHF T  H l = m = 3, h = 4

l = m = 1, h = 2

a3 a4 a3 < x ?

a1 a2 a1 < x ?

@ @

@ @

l=h=4

l=h=3

l=h=2

l=h=1

a4 a4 = x ?

a3 a3 = x ?

a2 a2 = x ?

a1 a1 = x ?

@ @

@ @

@ @

@ @

Return

Return

Return

Return

Return

Return

Return

Return

4

0

3

0

2

0

1

0

2. l = 1, m = 3, h = 5

a1

a2 a3 a4 a5 a3 < x ?  HHF T   H l = m = 4, h = 5

l = 1, m = 2, h = 3

a4 a5 a4 < x ?

a1 a2 a3 a2 < x ?

@ @

@@

l=h=5

l=h=4

l=h=3

l = m = 1, h = 2

a5 a5 = x ?

a4 a4 = x ?

a3 a3 = x ?

a1 a2 a1 < x ?

@@

@ @

@@

@ @

Return

Return

Return

Return

Return

Return

5

0

4

0

3

0

l=h=2

l=h=1

a2 a2 = x ?

a1 a1 = x ?

@ @

@ @

Return

Return

Return

Return

2

0

1

0

604

CHAPTER 4. ANSWERS TO ALL EXERCISES

3. A[2] > A[1]? H F  T HH  A[3] > A[1]?

A[3] > A[2]?

@ @

@ @ A[4] > A[3]?

A[4] > A[2]?

@ @

@ @

Return

Return

Return

Return

Return

Return

Return

4

3

4

2

4

3

4

1

count=0

A[1] = x?  HHF T  H

count=1

A[2] = x?

A[3] = x?

count=0

A[2] = x?

@@

count=2

@ @

count=1

count=1

A[3] = x?

A[3] = x?

@ @

6.

@ @

@ @

Return

4.

5.

A[4] > A[1]?

A[4] > A[3]?

@ @

@ @

count=0

A[3] = x? @ @

Return

Return

Return

Return

Return

Return

Return

Return

3

2

2

1

2

1

1

0

i=2: i=3: i=4: end: i=2: i=3: i=4: i=5: i=6: i=7: i=8: end:

3 3 3 1 1 1 1 1

8 8 4 3 2 2 2 2

7 5 3 1

5 7 5 3

3 3 7 5

1 1 1 7

4 4 8 4 3 3 3 3

1 1 1 8 4 4 4 4

2 2 2 2 8 6 5 5

6 6 6 6 6 8 6 6

7. 5 5 5 5 5 5 8 7

7 7 7 7 7 7 7 8

9.

8.

i=2: i=3: i=4: i=5: i=6: end:

4 2 2 1 1 1

i=2: i=3: i=4: i=5: end:

2 4 4 2 2 2

3 3 3 1 1

8 8 6 3 3

a b ab?

25.

T   b a c a>c?

HHF

H a b c b>c?

@@

@ @

b c a b>c?

b a c b>a?

a c b a>c?

a b c a>b?

@ @

@ @

@ @

@ @

Return

Return

cba

bca

Impossible

Return

Return

Return

bac

cab

acb

Return Impossible

abc

26.

T



a b a>b?  H

27.

a b b