This action might not be possible to undo. Are you sure you want to continue?

Discrete Mathematics, 3e

By

Edgar G. Goodaire and Michael Parmenter

Both of Memorial University of Newfoundland

This manual contains complete solutions to all exercises in Discrete Mathematics with Graph Theory, Third Edition, by Edgar G. Goodaire and Michael M. Parmenter. It is intended solely for the use of instructors whom, we trust, will not make it available to students.

The solutions here have been read many times. We think that the number of errors is small, but are always grateful for help in improving accuracy. Our mailing address is below and our email addressesareedgar@math.mun.ca and michael1@math.mun. ca. Please feel free to contact either of us at any time about any aspect of our book or this solutions manual, both of which have been improved substantially by comments received since the first edition of this book appeared in 1998.

Edgar G. Goodaire and Michael M. Parmenter Department of Mathematics and Statistics, Memorial University of Newfoundland

St. John's, NL

Canada A1C 5S7

August 2005

Solutions to Exercises

Exercises 0.1

1. (a) [BB] True (e) True

(b) [BB] Not valid (f) Not valid

(c) [BB] False (02 is not positive.) (g) False

(d) Not valid

2. (a) [BB] True, because both 4 = 2 + 2 and 7 < J50 are true statements. (b) False, because one of the two statements is false.

(c) [BB] False, because 5 is not even.

(d) True, because 16-1/4 = !.

(e) [BB] True, since 9 = 32 is true (or because 3.14 < 71'). (f) True, because (_4)2 = 16 is true.

(g) [BB] True, because both hypothesis and conclusion are true. (h) False, because the hypothesis is true but the conclusion is false. (i) [BB] Not a valid mathematical statement.

(j) True, because both statements are true.

(k) True, because this is an implication with false hypothesis.

(1) False, because one of the statements is false while the other is true. (m) False, because the hypothesis is true but the conclusion is false.

(n) [BB] False, because the area of a circle of radius r is not 271'r and its circumference is not 71'r2. (0) False, because the hypothesis ofthis implication is true, but the conclusion is false.

(p) [BB] This is true: The hypothesis is true only when a ;::: band b ;::: a, that is, when a = b, and then the conclusion is also true.

(q) This implication is true because the hypothesis is always false. 1

3. (a) [BB] If x > 0, then - > O.

x

(b) If a and b are rational numbers, then ab is a rational number.

(c) If f is a differentiable function, then f is continuous,

(d) [BB] If g is a graph, then the sum of the degrees of the vertices of g is even. (e) [BB] If A is a matrix and A =1= 0, then A is invertible.

(f) If P is a parallelogram, then the diagonals of P bisect each other. (g) If n is an even integer, then n < O.

(h) If two vectors are orthogonal, then their dot product is O. (i) If n is an integer, then n~1 is not an integer.

(j) If n is a natural number, then n + 3 > 2.

4. (a) [BB] True (the hypothesis is false).

(b) True (hypothesis and conclusion are both true).

1

2

Solutions to Exercises

(c) [BB] True (the hypothesis is false).

(d) False (hypothesis is true, conclusion is false).

(e) [BB] False (hypothesis is true, conclusion is false: v'4 = 2).

(f) True (g) [BB] True (h) True (i) [BB] True (the hypothesis is false: H = Ixl)

G) True (k) [BB] False (I) True

5. (a) [BB] a2 ::; 0 and a is a real number (more simply, a = 0).

(b) x is not real or x2 + 1 =I- 0 (more simply, x is any number, complex or real). (c) [BB] x =I- 1 and x =I- ~ 1.

(d) There exists an integer which is not divisible by a prime.

(e) [BB] There exists a real number x such that n ~ x for every integer n. (f) (ab)c = a(bc) for all a, b, c.

(g) [BB] Every planar graph can be colored with at most four colors.

(h) Some Canadian is a fan of neither the Toronto Maple Leafs nor the Montreal Canadiens. (i) There exists x > 0 and some y such that x2 + y2 ::; O.

G) x :::::: 2 or x s -2.

(k) [BB] There exist integers a and b such that for all integers q and r, b =I- qa + r. (I) [BB] For any infinite set, some proper subset i~ not finite.

(m) For every real number x, there exists an integer n such that x ::; n < x + 1. (n) There exists an integer n such that n~l is an integer.

(0) a> x or a> y or a> z.

(p) There exists a vector in the plane and there exists a normal to the plane such that the vector is not orthogonal to the normal.

6. (a) [BB] Converse: If ~ is an integer, then ~ and ~. are also integers.

Contrapositive: If ~ is not an integer, then ~ is' not an integer or ~ is not an integer. (b) Converse: x = ±1 ~ x2 = 1.

Contrapositive: x =I- 1 and x =I- -1 ~ x2 =I- 1.

(c) Converse: If x = 1 + v'5 or x = 1- v'5, then x2 = x + 1.

Contrapositive: If x =I- 1 + v'5 and x =I- 1 - v'5, then x2 =I- x + 1. (d) Converse: If n 2 + n - 2 is an even integer, then n is an odd integer.

Contrapositive: If n2 + 2 - 2 is an odd integer, then n is an even integer. (e) [BB] Converse: A connected graph is Eulerian:

Contrapositive: If a graph is not connected, then it is not Eulerian.

(f) Converse: a = 0 or b = 0 ~ ab = O.

Contrapositive: a =I- 0 and b=l- 0 ~ ab =I- O. (g) Converse: A four-sided figure is a square.

Contrapositive: If a figure does not have four sides, then it is not a square. (h) [BB] Converse: If a2 = b2 + c2, then /::"BAC is a right triangle.

Contrapositive: If a2 =I- b2 + c2, then 6.BAC is not a right triangle.

Section 0.1

3

(i) Converse: If p( x) is a polynomial with at least one real root, then p( x) has odd degree.

Contrapositive: If p(x) is a polynomial with no real roots, then p(x) has even degree. (j) Converse: A set of at most n vectors is linearly independent.

Contrapositive: A set of more than n vectors is not linearly independent.

(k) Converse: If f is not one-to-one, then, for all real numbers x and y, x ¥=- y and x2 + xy + y2 + x+y = o.

Contrapositive: If f is one-to-one, then there exist real numbers x and y such that x = y or x2 + xy + y2 + X + Y ¥=- o.

(I) [BB] Converse: If f is not one-to-one, then there exist real numbers x and y with x ¥=- y and x2 + xy + y2 + X + y = o.

Contrapositive: If f is one-to-one, then for allreal numbers x and y either x = y or x2 + xy + y2 +x+y = o.

7. (a) [BB] There exists a continuous function which is not differentiable. (b) 2x ~ 0 for all real numbers x.

(c) [BB] For every real number x, there exists a real number y such that y > x. (d) For every set of primes PI ,P2, ... ,Pn, there exists a prime not in this set.

(e) [BB] For every positive integer n, there exist primes PI, P2, ... ,Pt such that n = PIP2 ... Pt· (f) For every real number x > 0, there exists a real number a such that a2 = x.

(g) [BB] For every integer n, there exists an integer m such that m < n.

(h) For every real number x > 0, there exists a real number y > 0 such that y < x. (i) [BB] There exists a polynomial P such that for every real number x, p(x) ¥=- o.

(j) For every pair of real numbers x and y with x < y, there exists a rational number a such that x < a < y.

(k) For every polynomial p( x) of degree 3, there exists a real number x such that p( x) = o. (I) There exists a matrix A¥=-O such that A is not invertible.

(m) There exists a real number x such that x ~ o.

(n) For any integer n, n is not both even and odd.

(0) For all integers a, b, c, a3 + b3 ¥=- c3.

8. If a given implication "A - '13" is false, then A is true and '13 is false. The converse, "'13 - A" is then true because its hypothesis, '13, is false. It is not possible for both an implication and its converse to be false.

9. First we remember that x and y is true if x and y are both true and false otherwise. Now P ~ q means P - q and q - p. Also

A. P - q is true if P is false or if P is true and q is true.

B. q - P is true if q is false or if q is true and P is true.

If P and q are both false, both statements A and B are true, so P ~ q is true. Similarly, if both P and q are true, then statements A and B are again true, so P ~ q is true. Thus P ~ q is true if P and q have the same truth values. Suppose P and q have different truth values. To be specific, say P is true and q is false. If P is true and q is false, we see that statement A is false, so A and B is false. Similarly, if P is false and q is true, then statement B is false, so A and B is false. This verifies statement (*).

4

Solutions to Exercises

Exercises 0.2

1. (a) [BB] Hypothesis: a and b are positive numbers.

Conclusion: a + b is positive.

(b) Hypothesis: T is a right angled triangle with hypotenuse of length c and the other sides of lengths a and b.

Conclusion: a2 + b2 = c2.

(c) [BB] Hypothesis: p is a prime.

Conclusion: p is even.

(d) Hypothesis: n > 1 is an integer.

Conclusion: n is the product of prime numbers.

(e) Hypothesis: A graph is planar.

Conclusion: The chromatic number is 3.

2. (a) [BB] a and b are positive is sufficient for a + b to be positive; a + b is positive is necessary for a and b to be positive.

(b) A right angled triangle has sides of lengths a, b, c, c the hypotenuse, is sufficient for a2 + b2 = c2; a2 + b2 = c2 is necessary for a right angled triangle to have sides of lengths a, b, c, c the hypotenuse.

(c) [BB] p is a prime is sufficient for p to be even; p is even is necessary for p to be prime.

(d) n > 1 an integer is sufficient for n to be the product of primes; n a product of primes is necessary for n to be an integer bigger than 1.

(e) A graph being planar is sufficient for its chromatic number to be 3. Chromatic number 3 is necessary for a graph to be planar.

3. (a) [BB] x = -2 (d) 8,9,11,12

(b)a=b=-l 1 (e) v'2 and v'2

(c) [BB] x = 4 (f) x = 5, y = 2

4. A can easily be proven false with the counterexample O. No single counterexample can disprove a statement claiming "there exists" so we prove 13 directly. 13 is false because the square of a real number is nonnegative.

5. [BB] This statement is true. Suppose the hypothesis, x is an even integer, is true. Then x = 2k for some other integer k. Then x + 2 = 2k + 2 = 2(k + 1) is also twice an integer. So x + 2 is even. The conclusion is also true.

6. The converse is "x + 2 is an even integer --+ x is an even integer." This is true, for suppose that the hypothesis, x + 2 is an even integer, is true. Then x + 2 = 2k for some integer k, so x = 2k - 2 = 2( k - 1) is also twice an integer. The conclusion is also true.

7. This is true. Let A be the statement "x is an even integer" and let 13 be the statement x + 2 is an even integer". In Exercise 5, we showed that A --+ 13 is true and, in Exercise 6, that the converse 13 --+ A is also true. Thus A ~ 13 is also true.

8. (a) A is false: n = 0 is a counterexample.

Section 0.2

5

(b) Converse: If n~1 is not an integer, then n is an integer. This is false: n = ! is a counterexample

( n _ 1) n+1 - "3 •

Contrapositive: If n~1 is an integer, then n is not an integer. This is false: n = 0 is a counterexample.

Negation: There exists an integer n such that n~1 is an integer. This is true: Take n = O.

9. (a) n prime ---+ 2n - 1 prime.

(b) n prime is sufficient for 2n - 1 to be prime.

(c) A is false. For example, n = 11 is prime, but 211 - 1 = 2047 = 23(89) is not. The integer n = 11 is a counterexample to A.

(d) 2n - 1 prime ---+ n prime.

(e) The converse of A is true. To show this, we establish the contrapositive. Thus, we assume n is not prime. Then there exists a pair of integers a and b such that a > 1, b > 1, and n = abo Using the hint, we can factor 2n - 1 as

2n -1 = (2a)b -1 = (2a _1)[(2a)b-1 + (2a)b-2 + + 2a + 1].

Since a> 1 and b > 1, we have 2a -1> 1 and (2a)b-1 + (2a)b-2 + + 2a + 1 > 1, so 2n-1

is the product of two integers both of which exceed one. Hence, 2n - 1 is not prime.

10. [BB] The converse is the statement, "A continuous function is differentiable." This is false. The absolute value function whose graph is shown to the right is continuous, but not differentiable at x = O.

11. (a) 2(n -1) (b) n

12. [BB] A is true. It expresses the fact that every real number lies between two consecutive integers.

Statement '13 is most definitely false. It asserts that there is a remarkable integer n with the property that every real number lies in the unit interval between nand n + 1.

13. A is false; '13 is true. There can be no y with the property described since y is not bigger than y + 1; x = Y + 1 provides a counterexample. To prove '13, we note that for every real number x, we have x + 1 > x and so x + 1 is a suitable y.

14. (a) This is false. Suppose such an n exists. Then q = ~1 is rational but nq is not an integer. n+

(b) This is true. Given a rational number q, there exist integers m and n, n i= 0, such that q = m. n Then nq = m is an integer.

15. (a) Since n is even, n = 2k for some integer k. Thus n2 + 3n = 4k2 + 6k = 2(2k2 + 3k) is even too. (b) The converse is the statement n2 + 3n even ---+ n even. This is false and n = 1 is a counterexample.

16. (a) [BB] Case 1: a is even. In this case, we have one of the desired conclusions.

Case 2: a is odd. In this case, a = 2m + 1 for some integer m, so a + 1 = 2m + 2 = 2(m + 1) is even, another desired result.

(b) [BB] n2 + n = n(n + 1) is the product of consecutive integers one of which must be even; so n2 + n is even.

6

Solutions to Exercises

17. n2 - n + 5 = n(n - 1) + 5. Now either n - 1 or n is even, since these integers are consecutive. So n( n - 1) is even. Since the sum of an even integer and the odd integer 5 is odd, the result follows.

18. [BB] 2X2 - 4x + 3 = 2(x2 - 2x) + 3 = 2[(x - 1)2 - 1] + 3 = 2(x - 1)2 + 1 is the sum of 1 and a nonnegative number. So it is at least 1 and hence positive.

19. For a2 - b2 to be odd, it is necessary and sufficient for one of a or b to be even while the other is odd.

Here's why.

Case i: a, b even.

In this case, a = 2n and b = 2m for some integers m and n, so a2 - b2 = 4n2 - 4m2 = 4(n2 - m2) is even.

Case ii: a, b odd.

In this case, a = 2n + 1 and b = 2m + 1 for some integers m and n, so a2 - b2 = (4n2 + 4n + 1) - (4m2 + 4m + 1) = 4(n2 + n - m2 - m) is even.

Case iii: a even, b odd.

In this case, a = 2n and b = 2m+1 for some integers n and m, so a2 _b2 = 4n2 - (4m2+4m+ 1) = 4(n2 - m2 - m) - 1 is odd.

Case iv: a odd, b even.

This is similar to Case iii, and the result follows.

20. [BB] ( ----+) To prove this direction, we establish the contrapositive, that is, we prove that n odd implies n2 odd. For this, if n is odd, then n = 2m + 1 for some integer m. Thus n2 = 4m2 + 4m + 1 = 2(2m2 + 2m) + 1 is odd.

(+---) Here we assume that n is even. Therefore, n = 2m for some integer m. So n2 = (2m)2 = 4m2 = 2(2m2) which is even, as required.

21. We assert that x + !. ;:::: 2 if and only if x > O. x

Proof. ( ----+) We offer a proof by contradiction. Suppose x + !. ;:::: 2 but x > 0 is not true; thus x

x :::; O. If x = 0, !. is not defined, so x < O. In this case, however, x + !. < 0, a contradiction.

x x

(+---) Conversely, assume that x > O. Note that (x:'_ 1)2 ;:::: 0 implies x2 - 2x + 1 ;:::: 0, which in tum implies x2 + 1 ;:::: 2x. Division by the positive number x gives x + !. ;:::: 2 as required. • x

22. [BB] Since n is odd, n = 2k + 1 for some integer k.

Case 1: k is even.

In this case k = 2m for some integer m, so n = 2(2m) + 1 = 4m + 1.

Case 2: k is odd.

In this case, k = 2m + 1 for some integer m, so n = 2(2m + 1) + 1 = 4m + 3. Since each case leads to one of the desired conclusions, the result follows.

Section 0.2

7

23. By Exercise 22, there exists an integer k such that n = 4k + 1 or n = 4k + 3.

Case 1: n = 4k + 1.

If k is even, there exists an integer m such that k = 2m, so n = 4(2m) + 1 = 8m + 1, and the desired conclusion is true. If k is odd, there exists an integer m such that k = 2m + 1, so n = 4(2m + 1) + 1 = 8m + 5, and the desired conclusion is true.

Case 2: n = 4k + 3.

If k is even, there exists an integer m such that k = 2m, so n = 4(2m) + 3 = 8m + 3, and the desired conclusion is true. If k is odd, there exists an integer m such that k = 2m + 1, so n = 4(2m + 1) + 3 = 8m + 7, and the desired conclusion is true. In all cases, the desired conclusion is true.

24. [BB] If the statement is false, then there does exist a smallest positive real number r, Since ~r is positive and smaller than r, we have reached an absurdity. So the statement must be true.

25. We give a proof by contradiction. If the result is false, then both a > Vii and b > Vii. (Note that the negation of an "or" statement is an "and" statement.) But then n = ab > ViiVii = n, which isn't true.

26. [BB] Since ° is an eigenvalue of A, there is a nonzero vector x such that Ax = 0. Now suppose that A is invertible. Then A-I (Ax) = A-10 = 0, so x = 0, a contradiction.

27. (a) The given equation is equivalent to (b - 5)V2 = 3 - a. If b i= 5, then V2 = t~ is a rational number. This is false. Thus b = 5, so a = 3.

(b) Note that (a + bV2)2 = (a2 + 2b2) + 2abV2. Thus, if (a + bV2)2 = 3 + 5V2, then a2 + 2b2 = 3 and 2ab = 5, by part (a). The second equation says a i= ° and b i= 0. Since a and b are integers, it follows that a2 2: 1 and b2 2: 1 and a2 + 2b2 2: 3 with equality if and only a = ±1 = b. But then 2ab i= 5.

28. [BB] Observe that (l+a)(l+b) = l+a+b+ab = 1. Thus l+a and l+b are integers whose product is 1. There are two possibilities: 1 + a = 1 + b = 1, in which case a = b = 0, or 1 + a = 1 + b = -1, in which case a = b = -2.

29. We offer a proof by contradiction. Suppose ~ is not irrational. Then it is rational, so there exist integers a

m and n, n i= 0, such that ~ = m. Since ~ i= 0, we know also that m i= 0. Now ~ = m implies

a n a a n

a = ..:: is a rational number, a contradiction.

m

30. We give a proof by contradiction. Assume that a is rational, b is irrational and a + b is rational. Then a + b = ~ for integers m and n, n i= 0. Since a is rational, a = ~ for integers k and £, £ i= 0. Thus

b = m _ a = m _ ~ = m£ - kn

n n £ n£

is the quotient of integers with nonzero denominator. This contradicts the fact that b is not rational.

31. [BB] We begin by assuming the negation of the desired conclusion; in other words, we assume that there exist real numbers x, y, z which simultaneously satisfy each of these three equations. Subtracting the second equation from the first we see that x + 5y - 4z = -2. Since the third equation we were given says x + 5y - 4z = 0, we have x + 5y - 4z equal to both ° and to -2. Thus, the original assumption has led us to a contradiction.

8

Solutions to Exercises

32. (a) [BB] False: x = y = 0 is a counterexample. (b) False: a = 6 is a counterexample.

(c) [BB] False: x = 0 is a counterexample.

(d) False: a = V2, b = -V2 is a counterexample. (e) [BB] False: a = b = V2 is a counterexample.

-b± .../b2 - 4ac

(f) The roots of the polynomial ax2 + bx + c are x = 2a . If b2 - 4ac > 0, .../b2 - 4ac

-b+ Vb2 - 4ac

is real and not 0, so the formula produces two distinct real numbers x = and

2a

-b- .../b2 -4ac

x=

2a

(g) False: x = ! is a counterexample.

(h) True: If n is a positive integer, then n 2:: 1, so n2 = n(n) 2:: n.

33. The result is false. A square and a rectangle (which is not a square) have equal angles but not pairwise proportional sides.

34. (a) [BB] Since n2+1 is even, n2 is odd, son must also be odd. Writingn = 2k+l, then n2+1 = 2m says 4k2 + 4k + 2 = 2m, so m = 2k2 + 2k + 1 = (k + 1)2 + k2 is the sum of two squares as required.

(b) [BB] We are given that n2 + 1 = 2m for n = 4373 and m = 9561565. Since n = 2(2186) + 1, our solution to (a) shows that m = k2 + (k + 1)2 where k = 2186. Thus, 9561565 = 21862 + 21872.

35. (a) 24n+2 + 1 = 4(24n) + 1 = 4(2n)4 + 1. Applying the given identity with x = 2n, we get

(2. 22n + 2n+1 + 1)(2 . 22n - 2n+1 + 1) (22n+1 + 2n+1 + 1)(22n+1 _ 2n+1 + 1).

With n = 4, we get 218 + 1 = (29 + 25 + 1)(29 - 25 + 1) = 545(481).

(b) 236 -1 = (218 - 1)(218 + 1) = (29 -1)(29 + 1)(545)(481) (using the result of part (a)) = 511(513)(545)(481).

36. If the result is false, then f(n) = ao + a1n + ... + atnt for some t 2:: 1. Since f(O) = ao = p is prime, f(n) = p + ng(n) for g(n) = a1 + a2n + ... + atnt-1. Replacing n by pn, we have f(pn) = p + npg(pn). The right hand side is divisible by the prime p, hence f(pn) is divisible by p. But f(pn) is prime, by hypothesis, so f(pn) = p. This means g(pn) = 0, contradicting the fact that a polynomial has only finitely many roots.

37. We offer a proof by contradiction. Suppose all the digits occur just a finite number of times. Then there is a number n1 which has the property that after n1 digits in the decimal expansion of tt, the digit 1 no longer occurs. Similarly, there is a number n2 such that after n2 digits, the digit 2 no longer occurs, and so on. In general, for each k = 1,2, ... ,9, there is a number nk such that after nk digits, the digit k no longer occurs. Let N be the largest of the numbers n1, n2, ... , nk. Then after N digits in the decimal expansion of 7r, the only digit which can appear is O. This contradicts the fact that the decimal expansion of 7r does not terminate.

Chapter 0

9

38. We have proven in the text that J2 is irrational. Thus, if J2V2 is rational, we are done (with a = b = J2). On the other hand, if J2V2 is irrational, then let a = J2V2 and b = J2 in which case ab = J22 = 2 is rational.

Chapter 0 Review

1. (a) This implication is true because the hypothesis is always false: a - b > 0 and b - a > 0 give a > band b > a, which never holds.

(b) This implication is false: When a = b, the hypotheses are true while the conclusion is false.

2. (a) x is a real number and x :::; 5.

(b) For every real number x, there exists an integer n such that n :::; x. (c) There exist positive integers x, y, z such that x3 + y3 = z3.

(d) There exists a graph with n vertices and n + 1 edges whose chromatic number is more than 3. (e) There exists an integer n such that for any rational number a, a =f n.

(f) a =f 0 or b =f O.

3. (a) Converse: If ab is an integer, then a and b are integers.

Contrapositive: If ab is not an integer, then either a or b is not an integer. Negation: There exist integers a and b such that ab is not an integer.

(b) Converse: If x2 is an even integer, then x is an even integer.

Contrapositive: If x2 is an odd integer, then x is an odd integer. Negation: There exists an even integer x such that x2 is odd.

(c) Converse: Every graph which can be colored with at most four colors is planar.

Contrapositive: Every graph which cannot be colored with at most four colors is not planar. Negation: There exists a planar graph which cannot be colored with at most four colors.

(d) Converse: A matrix which equals its transpose is symmetric.

Contrapositive: If a matrix does not equal its transpose, then it is not symmetric. Negation: There exists a symmetric matrix which is not equal to its transpose. (e) Converse: A set of at least n vectors is a spanning set.

Contrapositive: A set of less than n vectors is not a spanning set. Negation: There exists a spanning set containing less than n vectors. (f) Converse: If x> -2 and x < 1, then x2 + x - 2 < O.

Contrapositive: If x :::; -2 or x 2:: 1, then x2 + x - 2 2:: O.

Negation: There exists an x :::; -2 or x 2:: 1 such that x2 + x - 2 < O.

4. (a) A is false: a = u = b = 1, v = -1 provides a counterexample.

(b) Converse: Given four integers a, b, u, v with u =f 0, v =f 0, if a = b = 0, then au + bv = O.

Negation: There exist integers a, b, u, v, u =f 0, v =f 0, with au + bv = 0 and a =f 0 or b =f O. Contrapositive: Given four integers a, b, u, v with u =f 0 and v =f 0, if a =f 0 or b =f 0, then au + bv =f O.

10

Solutions to' Review Exercises

(c) The converse is certainly true since Ou + Ov = O.

(d) The negation is true: Take a = u = b = 1 and v = -1.

The contrapositive of A is false since A is false.

5. (a) There exists a countable set which is infinite. (b) For all positive integers n, 1 s n.

6. (a) This is true. If x is positive, x + 2 is positive. In addition, if x is odd, x + 2 is odd. (b) This is false. When x = -1, x + 2 = + 1 is a positive odd integer, while x is not.

7. (a) This statement expresses a well-known property of the real numbers. It is true.

(b) This is false. The conclusion would have us believe that every two real numbers are equal.

8. The desired formula is ab = (a + b)2 ~ (a - b)2 which holds because (a + b)2 _ (a _ b)2 = (a2 + 2ab + b2) - (a2 - 2ab + b2) = 4ab.

9. (----+) Assume n3 is odd and suppose, to the contrary, that n is even. Thus n = 2x for some integer x.

But then n3 = 8x3 = 2(4x3) is even, a contradiction. This means that n must be odd.

( f--) Assume n is odd. This means that n = 2x + 1 for some integer x. Then n3 = (2x + 1) 3 = 8x3 + 12x2 + 6x + 1 = 2(4x3 + 6x2 + 3x) + 1 is odd.

10. (a) a2 - 5a + 6 = (a - 2)(a - 3) is the product of two consecutive integers, one of which must be even.

(b) The sum (a2 - 5b) + (b2 - 5a) is (a2 - 5a) + (b2 - 5b) = (a2 - 5a + 6) + (b2 - 5b + 6) - 12 is the sum of three even integers [using the result of part (a)] and hence even. Thus b2 - 5a is the difference of even integers and hence even as well.

11. The sum of the angles of a triangle is 180°, so LC = 45° and LD = 75°. Since triangles ABC and DEF are similar, ~~ = ~;, so the length of AC is IABI x ~; = 12 x ~ = 16.

12. The rectangle that remains has dimensions 1 by 7 - 1. These are in ratio

1 7+1 7+1 7+1

--= =--=--=7

7-1 (7-1)(7+1) 72-1 7

using twice the fact that 72 = 7 + 1.

13. If the result is false, then x ~ -1 and x ::; 2, so x + 1 ~ 0 and x - 2 ::; O. But then x2 - x - 2 = (x + l)(x - 2) ::; 0, a contradiction.

14. Suppose, to the contrary, that -::. is the largest negative rational number, where x and yare positive y

. Th x. . I d x x x x S' x . .. I b

mtegers. en -2 IS rationa an -2 < -, so --2 > --. mce --2 IS a negative rationa num er,

y y y y y y

we have a contradiction.

15. We use a proof by contradiction which mimics that proof of the irrationality of v'2 given in Problem 8.

Thus, we suppose that V3 = % is rational and hence the quotient of integers a and b which have no factors in common. Squaring gives a2 = 3b2 and so a = 3k is a multiple of 3. But then 9k2 = 3b2, so 3k2 = b2. This says that b is also a multiple of 3, contradicting our assumption that a and b have no factors in common.

Section 1.1

11

16. Let the rational numbers be % and~. We may assume that a, b, c, d are positive integers and that a C Th d b Th hi th Q±£' bad C d hi . h . a Q±£ b < d' us a < c. e mt suggests at b+d IS etween band' an t IS 18 t e case. b < b+d

is equivalent to a(b + d) < b(a + c) and m < ~ is equivalent to (a + c)d < (b + d)c, both of which are true because ad < be.

17. On a standard checker board, there are 32 squares of one color and 32 of another. Since squares in opposite comers have the same color, the hint shows that our defective board has 32 squares of one color and 30 of the other. Since each domino covers one square of each color, the result follows.

18. (a) We leave the primality checking of f(1), ... , f(39) to the reader, but note that f(40) = 412.

(b) f(k2 + 40) = 402 + 80k2 + k4 + 40 + k2 + 41 = k4 + 81k2 + 412 = (k2 + 41)2 - k2 = (k2 + 41 + k)(k2 + 41 - k).

19. The answer is no, since 333333331 = 19607843 x 17.

Exercises 1.1

1. (a) [BB]

p q --'q (--,q) V P pA«--,q)Vp)

T T F T T

T F T T T

F T F F F

F F T T F (b)

p q --,p (--,p)-+q pAq (PAq) V «--,p) -+ q)

T T F T T T

T F F T F T

F T T T F T

F F T F F F (c)

**p q qVp pA(qVp) --,(pA(qVp)) --,(pA(qVp)) ..... p
**

T T T T F F

T F T T F F

F T T F T F

F F F F T F (d) [BB]

p q r --'q p V (--,q) --, (pv (--,q)) --,p (--,p) V r (--, (p V (--,q))) A «--,p) V r)

T T T F T F F T F

T F T T T F F T F

F T T F F T T T T

F F T T T F T T F

T T F F T F F F F

T F F T T F F F F

F T F F F T T T T

F F F T T F T T F 12

Solutions to Exercises

(e)

p q r q-+r p -+ (q -+ r) pl\q (pl\q)Vr (p -+ (q -+ r)) -+ ((p 1\ q) Vr)

T T T T T T T T

T F T T T F T T

F T T T T F T T

F F T T T F T T

T T F F F T T T

T F F T T F F F

F T F F T F F F

F F F T T F F F 2. (a) If p -+ q is false, then necessarily p is true and q is false. (This is the only situation in which p -+ q is false.) We construct the relevant row of the truth table for (p /\ (-,q)) V (( -,p) -+ q).

I (pl\(-,q)) ~ ((-,p) -+q) I

(b) [BB] There are three situations in which p -+ q is true. The question then is whether or not the truth value of (p /\ ( -,q)) V (( -,p) -+ q) is the same in each of these cases. We construct a partial truth table.

p q -,q pl\ (-,q) -,p (-'p)-+q lpl\ (-,q)) V ((-,p) -+ q)

T T F F F T T

F F T F T F F As shown, (p /\ (-,q)) V (( -,p) -+ q) has different truth values on two occasions where p -+ q is true, so it is not possible to answer the question in this case.

3. [BB]

~~~--+-~--~~~~~~~~~~-+~~~

T

4.

5. (a) [BB]

p q p/\q pVq (p /\ q) -+ (p V q)

T T T T T

T F F T T

F T F T T

F F F F T The final column shows that (p /\ q) -+ (p V q) is true for all values of p and q, so this statement is a tautology.

Section 1.1

13

(b) [BB]

p q -,p (-,p) 1\ q -,q P v (-,q) ((-,p) 1\ q) 1\ (p V (-,q))

T T F F F T F

T F F F T T F

F T T T F F F

F F T F T T F The final column shows that ((-,p) 1\ q) 1\ (p V (-,q)) is false for all values of p and q, so this statement is a contradiction.

6. (a)

(b)

p q p--+q q --+ (p --+ q)

T T T T Since q -t (p -t q

T F F T all values of p and

F T T T statement is a tauto

F F T T

p q pl\q -,p -'q «-,p) V (-,q)) (p 1\ q) 1\ [( -,p) V (-,q))

T T T F F F F

T F F F T T F

F T F T F T F

F F F T T T F ) is true for q, this logy.

Since (p 1\ q) 1\ (( -,p) V (-,q)) is false for all values of p and q, this statement is a contradiction. 7. (a) [BB]

p q r p--+q q--+r (p --+ q) 1\ (q --+ r) p--+r

T T T T T T T

T F T F T F T

F T T T T T T

F F T T T T T

T T F T F F F

T F F F T F F

F T F T F F T

F F F T T T T

[(p --+ q) 1\ (q --+ r)) --+ [p --+ r)

T Since [(p -t q) 1\ (q -t r)]

T values of p, q, and r, this stat

T

T

T

T

T

T -t [p -t r] is true for all ement is a tautology.

(b) [BB] If p implies q which, in turn, implies r, then certainly p implies r,

8. We must show that the given "or" statement can be both true and false. We construct truth tables for each part of the "or" and show that certain identical values for the variables make both parts T (so that the "or" is true) and other certain identical values for the variables make both parts F (so that the "or" is false).

p r s -,r -,s ( -,r) --+ (-,s) p V [( -,r) --+ (-,s))

T T T F F T T

F F T T F F F 14

Solutions to Exercises

p q r 8 t -,t (-,t) v P 8 -+ [(-,t) Vp]

T T T T T F T T

F F F T T F F F -'q (-,q) -+ r [8 -+ ((-,t) v p)] v [(-,q) -+ r]

F T T

T F F 9. We are given that A is false for any values of its variables.

(a) [BB] An implication p ---t q is false only if p is true and q is false. Since A is always false, A ---t 13 is always true. So it is a tautology.

(b) An implication p ---t q is false only if p is true and q is false. Since A is false and the tautology 13 is true for any values of the variables they contain, 13 ---t A is always false. So it is a contradiction.

10. (a) The tables below show that when all three variables p, q and r are false, p ---t (q ---t r) is true, whereas (p ---t q) ---t r is false. Thus these statements have different truth tables and hence are not logically equivalent.

I ; I ; I ~ I q; rip -+ ~ -+ r) I

(b) The compound statement is false.

11. (a) [BB]

(b)

p q pVq

T T F

T F T

F T T

F F F

p q -,p (-,p) 1\ q P V ((-,p) 1\ q) (p V ((-,p) 1\ q)) V q

T T F F T T

T F F F T T

F T T T T T

F F T F F F (c) [BB]

p q pVq pVq (p V q) -+ (p V q)

T T F T T

T F T T T

F T T T T

F F F F T. The truth table shows that

(p y: q) ---t (p V q) is true for all values of p and q, so it is a tautology.

(d)

p q pVq p<->q -, (p <-> q)

T T F T F

T F T F T

F T T F T

F F F T F Columns three and five are the same. So the truth values of p y: q and

-, (p +-+ q) are the same for all values of p and q. Thus these statements are logically equivalent.

Section 1.2

15

Exercises 1.2

1. 1. [BB] (Idempotence) The truth tables at the right show that p V P ~ P and pl\p ~ p.

2. (Commutativity) The truth tables show that p V q

liliJWlJ

~ qVpandpl\q ~ ql\p.

p q pVq qVp

T T T T

T F T T

F T T T

F F F .,; F p q pAq qAp

T T T T

T F F F

F T F F

F F F F 3. [BB] (Associativity) The equality of the fifth and seventh columns in the truth table shows that ((pVq)Vr) ~ (pV(qVr)).

**p q r pVq (p V q) V r qVr pV(qVr)
**

T T T T T T T

T F T T T T T

F T T T 'T T T

F F T F T T T

T T F T T T T

T F F T T F T

F T F T T T T

F F F F F F F The equality of the fifth and seventhcolumnsin the truth table shows that ((p 1\ q) 1\ r) ~ (p 1\ (q 1\ r)).

**p q r pAq (p f... q) A r qAr pA(qAr)
**

T T T T T T T

T F T F F F F

F T T F F T F

F F T F F F F

T T F T F F F

T F F F F F F

F T F F F F F

F F F P F F F 4. (Distributivity) The equality of the fifth and eighth columns in the truth table shows that p V (q 1\ r) ~ (pVq) 1\ (pVr)).

**p q r qAr pV(qAr) pVq pVr (pVq)A(pVr)
**

T T T T T T T T

T F T F T T T T

F T T T T T T T

F F T F F F T F

T T F F T T T T

T F F F T T T T

F T F F F T F F

F F F F .F F F F 16

Solutions to Exercises

The equality of the fifth and eighth columns in the truth table shows that p 1\ (q V r) <===? (p 1\ q) V (p 1\ r)).

p q r qVr pl\(qVr) pl\q pl\r (p 1\ q) V (p 1\ r)

T T T T T T T T

T F T T T F T T

F T T T F F F F

F F T T F F F F

T T F T T T F T

T F F F F F F F

F T F T F F F F

F F F F F F F F 5. [BB] (Double negation) The equality of the first and third columns in the truth table shows that p <===? -, (-,p).

p -'p -, (-,p)

T F T

F T F 6. (The Laws of De Morgan) The equality of the fourth and seventh columns of the truth table shows that -,(p V q) <===? (( -,p) 1\ (-,q)).

p q pVq -,(p V q) -'p -'q (-,p) 1\ (-,q)

T T T F F F F

T F T F F T F

F T T F T F F

F F F T T T T The equality of the fourth and seventh columns of the truth table shows that -,(p 1\ q) <===? ((-,p) V (-,q)).

p q pl\q -,(p 1\ q) -'p -,q (-,p) V (-,q)

T T T F F F F

T F F T F T T

F T F T T F T

F F F T T T T 7. [BB] The two truth tables show, respectively, that p VI<===? 1 and p 1\ 1 <===? p.

8. The two truth tables show, respectively, that p V 0 <===? P and p 1\ 0 <===? O.

p 1 pVl

T T T

F T T p 1 pl\l

T T T

F T F

p D pl\D

T F F

F F F p D pVD

T F T

F F F 9. [BB] The two truth tables show, respectively, that

(p V (-,p)) <===? 1 and (p 1\ (-,p)) <===? O.

10. The truth tables show, respectively, that (-,1) <===? 0 and (-,0) <===? 1.

p -'p pV (-,p) 1

T F T T

F T T T p -'p p 1\ (-,p) D

T F F F

F T F F Section 1.2

11. [BB] The third and sixth columns of the truth table show that

(p ~ q) <===? ((...,q) ~ (-,p)).

12. The third and sixth columns of the truth table show that (p +-t q) <===? ((P ~ q) A (q ~ p)).

13. [BB] The third and fifth columns 0 the truth table show that

(p~q) <===? ((...,p)Vq).

2. (a) We construct a truth table.

Since p V [-,(p A q)] is true for all values of p and q, this statement is a tautology.

17

p q p-+q .. q -,p ( .. q) -+ ( .. p)

T T T F F T

T F F T F F

F T T F T T

F F T T T T

p q p .... q p-+q q-+p (p -+ q) 1\ (q -+ p)

T T T T T T

T F F F T F

F T F T F F

F F T T T T

f p q p-+q .. p ( .. p) V q

T T T F T

T F F F F

F T T T T

F F T T T p q pAq ...,(p A q) P V [...,(p A q)]

T T T F T

T F F T T

F T F T T

F F F T T (b) By one of the laws of DeMorgan, the negation is (...,p) A (p A q). By associativity, this is logically equivalent to [(...,p) A p] A q <===? 0 A q <===? O. So the negation is a contradiction.

3. (a) [BB] Using one of the laws of De Morgan and one distributive property, we obtain

[(p A q) V (...,(( ...,p) V q))] <===? [(p A q) V (p A (-,q))]

<===? [PA(qV(...,q))] <===? (pAl) <===? p.

(b) The given compound statement is of the form x ~ (y ~ z) which is equivalent to x ~ ((...,y) V z) <===? (...,x) V (...,y) V z. (By associativity, no further parentheses are required here.) So the given statement is equivalent to (..., (p V r)) V ((...,q) A r) V (p V r). By commutativity, this is (...,(p V r)) V (p V r) V (( .. q) A r) <===? 1 V (( -.q A r) <===? 1. The given statement is a tautology!

(c) Using associativity to avoid extra parentheses, the left side of the given statement is

[(p ~ q) V (q ~ r)] <===? (...,p) V q V (...,q) V r <===? (...,p) V 1 V r <===? 1.

4. (a) [BB]

The given statement is equivalent to [1 A (r ~ s)] which is logically equivalent to r ~ s.

(b)

p q pVq pl\(pVq)

T T T T

T F T T

F T T F

F F F F p q pl\q p V (p 1\ q)

T T T T

T F F T

F T F F

F F F F 5. (a) [BB] Distributivity gives [(pVq)A( ...,p)] <===? [(pA( ...,p))V(qA( ...,p))] <===? [OV( (...,p) Aq)] <===? [(...,p) Aq].

18

Solutions to Exercises

(b) We have (p - (q - r)) ~ (p - ((-,q) V r)) ~ (-,p) V (-,q) Vr ~ (-,p) V r V (-,q) ~ -,(p /\ (-,r)) V (-,q) ~ (p /\ (-,r)) - (-,q).

(c) (-,(p f-+ q)) ~ (-,((p _ q) /\ (q _ p))) ~ (-,(((-,p) V q) /\ ((-,q) V p)))

~ ( (p /\ (-,q)) V (q /\ (-,p)))

~ ((p /\ (-,q)) V q) /\ ((p /\ (-,q)) V (-,p))

~ ((p V q) /\ (( -,q) V q)) /\ ((p V (-,p)) /\ (( -,q) V (-,p))) ~ ((p V q) /\ 1) /\ (1 /\ ((-,q) V (-,p)))

~ (p V q) r. ((-,q) V (-,p))

~ ((-,p) V (-,q)) /\ (q V p)

~ (p _ (-,q)) /\ ((-,q) _ p) ~ (p f-+ (-,q)).

(d) [BB]-,[(pf-+q)V(p/\(-,q))] ~ [-'(pf-+q)/\-,(p/\(-,q))]

~ [(p f-+ (-,q)) /\ ((-,p) V q)], using Exercise 5(c).

(e) This is an immediate application of absorption law 4(b) with p /\ (-,q) in place of p and q /\ (-,r) in place of q.

(f) Using property 12 and associativity, [p - (q V r)] ~ [(-,p) V q V r] ~ [-,(p /\ (-,q))] V r (by De Morgan) ~ [p /\ (-,q) - r] using 12 again.

(g) -,(p V q) V [(-,p) /\ q] ~ [(-,p) /\ (-,q)] V [(-,p) /\ q] (DeMorgan) ~ (-,p) /\ [(-,q) V q] (distributivity) ~ (-,p) V 1 ~ -,p

6. [(p/\(-,q))-q] ~ [(-,(p/\(-,q)))Vq] ~ [((-,p)Vq)Vq] ~ [(-,p)Vq].

[(p /\ (-,q)) - (-,p)] ~ [(-,(p /\ (-,q))) V (-,p)] ~ [(-,p) V q V (-,p)] ~ [(-,p) V q]. So these are both logically equivalent to (-,p) V q.

7. (a) We must show that A V e and ~ V e have the same truth tables, given that A and ~ have the same truth tables. This requires four rows of a truth table.

A ~ e AVe ~ve

T T T T T

T T F T T

F F T T T

F F F F F The last two columns establish our claim.

(b) We must show that A /\ e and ~ /\ e have the same truth tables, given that A and ~ have the same truth tables. This requires four rows of a truth table.

A ~ e A/\e ~/\e

T T T T T

T T F T T

F F T F F

F F F F F The last two columns establish our claim.

Section 1.2

19

8. 1. [BB] The truth table shows that idempotence fails.

2. Commutativity still holds.

p q pVq qVp

T T F F

T F T T

F T T T

F F F F 3. [BB] Associativity holds.

p q r pVq (p V q) V r qVr pY._(qY._r)

T T T F T F T

T P T T F T F

F. T T T F F F

F F T F T T T

T T F F F T F

T F F T T F T

F T F T T T T

F F F F F F F 4. Just one distributive law holds. The table which follows shows that p y_ (q 1\ r) is not logically equivalent to (p y_ q) 1\ (p y_ r),

(pY._q) 1\ (pY._ r)

F

On the other hand, (p 1\ (q y_ r)) ~. (p 1\ q) y_ (p 1\ r) as shown.

p q r qY._r pl\(qY._r) pl\q pl\r (pl\q) Y._ (pl\r)

T T T F F T T F

T F T T T F T T

F T T F F F F F

F F T T F F F F

T T F T T T F T

T F F F F F F F

F T F T F F F F

F F F F F F F F The next table shows that --,(p 1\ q)is not logically equivalent to (--,p) y_ (--,q).

7. [BB] The truth table shows that p y_ 1 is no longer 1:

20

Solutions to Exercises

8. The truth table shows that p y.. 0

p 0 pyo

<==> p: T F T

F F F

p ...,p p V (...,p) 1

p y.. C--,p)) <==> 1: T F T T

F T T T 9. [BB] The truth table shows that (

12. [BB] This is no longer true:

Finally, neither law of absorption holds: p y.. (p 1\ q) is not logically equivalent to p and p 1\ (p y.. q) is not logically equivalent to p.

I ~ I ; I p; q Ip V ~ 1\ q) I I ~ I ; I p ~ q I p 1\ (; V q) I

9. (a) (p V q) 1\ ((--,p) V (--,q)) is notin disjunctive normal form because the terms are not joined by V. (b) [BB] (p 1\ q) V ((--,p) 1\ (--,q)) is in disjunctive normal form.

(c) [BB] p V ((--,p) 1\ q) is notin disjunctive normal form: not all variables are included in the first term.

(d) (p 1\ q) V (( --,p) 1\ (--,q) I\.r) is not in disjunctive normal form: not all variables are included in the first term.

(e) (p 1\ q 1\ r) V (( --,p) 1\ (--,q) 1\ (--,r» isin disjunctive normal form.

10. (a) [BB] This is already in disjunctive normal form! The definition permits just a single midterm.

(b) [BB] One of the laws of De Morgan gives immediately that (p 1\ q) V (--, (( --,p) V q» <==>

(p 1\ q) V (p 1\ (--,q».

(c) (p--tq) <==> ((--,p)Vq) <==> [((--,p)l\q)V((--,p)I\(--,q»V(ql\p)V(ql\(--'p»].

(d) [(p V q) 1\ (( --,p) V (--,q»] <==> [(p 1\ ((--,p) V (--,q»] V [q 1\ (( --,p) V (--,q»] <==> [(p 1\ (--,p» V (p 1\ (( --,q))] V [( q 1\ ((op» V (q 1\ ((.,-,q»] <==> [(p 1\ (--,q» V (C--,p) 1\ q»]

(e) [(p --t q) 1\ (q 1\ r)] <==> [((--,p) V q) 1\ (q 1\ r)] <==> [((--,p) 1\ q 1\ r) V (q 1\ q 1\ r)] <==> [( ( --,p) 1\ q 1\ r) V (p 1\ q 1\ r) V (( --,p) 1\ q 1\ r) ) ] <==> [ ( ( --,p) 1\ q 1\ r) V (p 1\ q 1\ r ) l- omitting the repeated minterm at the final step.

(f) (PV[ql\(Pv(--,r»]) <==> (PV[(ql\p)v(ql\(--,r))]) <==> (PV(ql\p)v(ql\(--,r») <==> ((p 1\ q) V (p 1\ (--,q» V (p 1\ q) V (q t\ (--,r») <==> ((p 1\ q) V (p 1\ (--,q» V (q 1\ (--,r») <==> ((pl\ql\r )V(pl\ql\( --,r» V (pl\( --,q)l\r)V(pl\( --,q) 1\ ( --,r) )V(pl\qV( --,r) )V( (--,p)l\ql\( --,r») <==> ((p 1\ q 1\ r) V (p 1\ q 1\ (--,r» V (p 1\ (;,q) 1\ r) V (p 1\ (--,q) r; (--,r» V (( --,p) 1\ q 1\ (--,r»), omitting the repeated minterm at the final step.

11. August De Morgan was born in India in 1806, died in England in J 871 and lived his life without the sight of his right eye, which was damaged at birth. He was the first Professor of Mathematics at University College, London, founded the London Mathematical Society and was its first president. He was apparently quite a man of principle. He refused to study for the MA degree because of a required theological exam and twice resigned his chair at University College, on matters of principle. He was

Section 1.3

21

never a Fellow of the Royal Society because he refused to let his name be put forward and, similarly, refused an honorary degree from the University of Edinburgh.

De Morgan's mathematical contributions include the definition and introduction of "mathematical induction", the most important method of proof in mathematics today. See Section 5.1. His definition of a limit was the first attempt to define the idea in precise mathematical terms. Nonetheless, it is the area of mathematical logic with which De Morgan's name is most closely associated. The "Laws of De Morgan" introduced in this section, together with their set theoretical analogues-(AUB)C = AcnBc, (A n B)C = AC U BC (see Section 2.2)-are used extensively and of fundamental importance. De Morgan also developed a system of notation for symbolic logic that could denote converses and contradictions.

Exercises 1.3

1. (a) [BB] Since [p ---+ (q ---+ r)] {::::::} [p ---+ ((...,q) V r)] {::::::} [(...,p) V (...,q) V r], the given argument can be rewritten

[(...,p) V r] V (...,q) q

(...,p) V r

which is valid by disjunctive syllogism.

(b) [BB] We analyze with a truth table. In row one, the premises are true but the conclusion is not. The argument is not valid.

(c) We analyze with a truth table.

In row three, the premises are true but the conclusion is not. The argument is not valid.

p q r p-+q qVr ...,q r -+ (,q)

T T T T T F F

T F T F T T T

F T T T T F F

F F T T T T T

T T F T T F T

T F F F F T T

F T F T T F T

F F F T F T T

p q r p-+q r-+q r-+p

T T T T T T

T F T F F T

F T T T T F

F F T T F F

T T F T T T

T F F F T T

F T F T T T

F F F T T T *

* * *

*

*

*

*

* *

(d) This can be solved using a truth table with 16 rows. Alternatively, we can proceed as follows.

Assume that the argument is not valid. This means that we can find truth values for p, q, r and s such that the premises are true but the conclusion is false. Since s ---+ (r V q) is false, we must have s true and r V q false. But this means both r and q are false. Since p ---+ q is true and q is false, p must be false. But then q V (...,r) is true and p 1\ s is false, contradicting the truth of (q V (...,r)) ---+ (p 1\ s). Hence we have a contradiction, so the argument is valid.

22

Solutions to Exercises

(e) This argument is valid. The second and third premises give q by Modus Ponens. Together with the first premise (double negation and dijunctive syllogism), we get .p.

(f) This argument is valid. The first and third premises give .p by modus tollens. Together with the second premise (double negation and a second application of modus tollens), we get r.

2. (a) If p is true and p implies q, then q is true.

(b) This was PAUSE 5.

(c) If p is true or q is true and p is not true, then q must be true.

(d) We do this by contradiction. So assume the premises are true but the conclusion is false. Since p ---+ r is false, we must have p true and r false. Since q ---+ r is true and r is false, q must be false. Then, since p ---+ q is true, p must be false, giving a contradiction.

(e) We prove this by contradiction. Assume p V qis false. This means both p and q are false. Since p V r is true and p is false, r must be true. Since q V (.r) is true and q is false, r must be false, giving a contradiction.

3. (a) [BB] We analyze with a truth table.

There are five rows when the premises are all true and in each case the conclusion is also true. The argument is valid.

(b) We analyze with a partial truth table showing the nine situations in which both the premises are true. In every case, the conclusion is true. The argument is valid.

p q r pVq p-+r q-+r (p V q) -+ r

T T T T T T T

T F T T T T T

F T T T T T T

F F T F T T T

T T F T F F F

T F F T F T F

F T F T T F F

F F F F T T T * * * *

*

p r q s pAq rAs (p A q) -+ (r As)

T T T T T T T

T T F T F T T

T T F F F F T

F T T T F T T

F T F T F T T

F T F F F F T

F F T T F F T

F F F T F F T

F F F F F F T (c) The second and third premises are p ---+ rand r ---+ s which together imply p ---+ s by the chain rule. Thus the argument becomes

pVq p---+s qVs

Section 1.3

23

which we check with a truth table.

p q 8 pVq P--)8 qV8

T T T T T T

T F T T T T

F T T T T T

F F T F T T

T T F T F T

T F F T F F

F T F T T T

F F F F T F * * *

*

There are four rows when the premises are true and, in each case, the conclusion is also true. The argument is valid.

(d) Since ((-,q) /\ r) ~ -,(q V (-,r)) and -,(p /\ 8) ~ [(-,p) V (-'8)] ~ (p --) (-'8)), the premises become

(q V (-,r)) --) p P --) (-'8)

so the chain rule gives (q V ( -,r)) --) (-'8), which is logically equivalent to (-, (q V ( -,r))) V ( -'8), which is the desired conclusion by a law of De Morgan.

4. (a) [BB] Since [(-,r) V (-,q)] ~ [q --) (-,r)], the first two premises give p --) (-,r) by the chain rule. Now -,p follows by modus tollens.

(b) This argument is not valid. If q and r are false, p and 8 are true, and t takes on any truth value, then all premises are true, yet the conclusion is false.

(c) [BB] This argument is valid. Since p f-+ (t V 8), we can replace t V 8 with p so that the premises become p V (-,q), p --) (p V r), (-,r) V p. The first of these is logically equivalent to q --) p while the third is r --) p. Using Exercise 3(a), we get q V r --) p, so certainly q V r --) p V r.

(d) This argument is valid. To see this, note that the second premise is r --) (t V 8), so the chain rule gives r --) p. Also, the first premise is q --) p. Exercise 3(a) tells us that (q V r) --) p, so certainly (qVr) --) (pVr).

(e) This argument is not valid. If p and r are false while q and 8 are true, all premises are true, yet the conclusion is false.

(f) [BB] This is valid. The first premise is qV [( -,p) V 8] while the second is (-,q) Yr. Now (-,p) V 8Vr follows by resolution, and this is the conclusion.

(g) This argument is valid. The first premise is p V [(-,q) V r], which is (-,q) V P V r. Since q V r, resolution gives p V r. Using r --) p and the result of part (f), we get p V p, which is p.

(h) This argument is valid. Using (g) twice, we have p --) [8 V (-,p)] which is (-,p) V 8 V (-,p), which is (-,p) V 8, which is the conclusion.

p: 5. (a) [BB] Let p and q be the statements

q:

I stay up late at night

I am tired in the morning.

p--)q

The given argument is p

q This is valid by modus ponens.

24

p: (b) [BB] Let p and q be the statements

q:

The given argument is

p-tq q

p

This is not valid, as the truth table shows. In row three, the two premises are true but the conclusion is false.

(c) Let p and q be the statements p : q:

p-tq

The given argument is -'q

-,p

This is valid by modus tollens.

(d) Let p and q be the statements p: q:

p-tq

The given argument is -,p

-,q

This is not valid, as the truth table shows. In row three, the two premises are true but the conclusion is false.

p: (e) [BB] Let p and q be the statements

q:

pVq

The given argument is -,q

p

This is valid by disjunctive syllogism.

(f) Let p and q be the statements p: q:

pVq

The given argument is q

-,p

This is not valid, as the truth table shows. In row one, the two premises are true but the conclusion is false.

p: (g) [BB] Let p, q, and r be the statements q: r:

Solutions to Exercises

I stay up late at night

I am tired in the morning.

p q p-+q

T T T

T F F

F T T

F F T I stay up late at night

I am tired in the morning.

I stay up late at night

I am tired in the morning.

p q p-+q -'p -'q

T T T F F

T F F F T

F T T T F

F F T T T I wear a red tie

I wear blue socks.

I wear a red tie

I wear blue socks.

p q pVq -,p

T T T F

T F T F

F T T T

F F F T I work hard

I earn lots of money I pay high taxes.

*

*

* *

*

*

Section 1.3

25

The given argument is

p-+q q-+r r-+p

This is not valid, as the truth table shows. In row five, the two premises are true but the conclusion is false.

**p q r p~q q~r r~p
**

T T T T T T

T F T F T T

F T T T T F

F F T T T F

T T F T F T

T F F F T T

F T F T F T

F F F T T T *

* *

*

p: I work hard

(h) Let p, q, and r be the statements q: I earn lots of money

r: I pay high taxes.

p-+q

The given argument is q-+r

p-+r

This is valid by the chain rule.

p: I work hard

(i) Let p, q, and r be the statements q: I earn lots of money

r: I pay high taxes. The given argument is

p-+q q-+r

"'p -+..,r

The conclusion is logically equivalent to r -+ p, so this is the same as Exercise 5(g), hence not valid.

p: I like mathematics

(j) Let p, q, and r be the statements q: I study

r : I like football.

p-+q ..,q

pVr r

The first two premises give ..,p by modus tollens, so, since p V r is true, the conclusion follows by disjunctive syllogism.

The given argument is

p: I like mathematics

(k) Let p, q, and r be the statements q: I study

r : I like football.

qVr

The given argument is r -+ p

(..,q) -+ p

qVr

This is the same as ( ..,r) V p and hence valid by resolution.

qVp

26 Solutions to Exercises

p: I like mathematics

q: I study

(I) [BB] Let p, q, and r be the statements

r : I pass mathematics

s : I graduate.

The given argument is

p~q (-,q) V r (-,s) ~ (-,r)

s~q

This is the same as

s~q

which is certainly not valid, as the following partial truth table shows.

p: I like mathematics

q: I study

(m) Let p, q, and r be the statements

r : I pass mathematics

s : I graduate.

p~q

(-,q) V r

( -,s) ~ (-,r)

The given argument is

which is the same as

p~s

which is valid by two applications of the chain rule.

6. [BB] r V q is logically equivalent to [-,( -,r) V q] {:::::::} [( -,r) ~ q] so, with p ~ -'r, we get p ~ q by the chain rule.

7. We will prove by contradiction that no such conclusion is possible. Say to the contrary that there is such a conclusion e. Since e is not a tautology, some set of truth values for p and q must make e false. But if r is true, then both the premises (-,p) ~ rand r V q are true regardless of the values of p and q. This contradicts e being a valid conclusion for this argument.

8. (a) [BB] p 1\ q is true precisely when p and q are both true.

(b) By 8(a), we can replace pl\q by the two premisesp and q. Using modus ponens, p andp ~ r lead to the conclusion r. Using modus tollens, q and s ~ (-,q)) lead to the conclusion =s, Finally, 8(a) says we can replace -,s and r with (-,s) 1\ r.

9. By Exercise 8(a), the final premise is equivalent to the list of premises ql, qz, ... ,qn' Now

Chapter 1

27

Together with qI, disjunctive syllogism gives (-'PI) V rl which is logically equivalent to PI -t rl. Thus the given premises imply

which, again using 8(a), are logically equivalent to the single premise

10. [BB] In Latin, modus ponens means "method of affirming" and modus tollens means "method of denying". This is a reflection of the fact that modus tollens has a negative -,p as its conclusion, while modus ponens affirms the truth of a statement q.

Chapter 1 Review

1.

P q r -,r q -t (-,r) P /\ (q -t (-,r)) -,q (-,q) V r

T T T F F F F T

T T F T T T F F

T F T F T T T T

F T T F F F F T

T F F T T T T T

F T F T T F F F

F F T F T F ·T T

F F F T T F T T

(p /\ (q -t (-,r))) -t (( -,q) V r)

T

F

T

T

T

T

T

T 2. We have -,r is F, so (-,r) /\ s is F. Since q is T, this means q -t ((-,r) /\ s) is F. Butp is T, so p V (q -t (( -,r) /\ s)) is T. Also r /\ t is T. Hence the entire statement has truth value T.

3. (a) A truth table shows this is a contradiction.

p q -,q -,p p/\(-,q) (-,p) V q [p /\ (-,q)] /\ [( -,p) V q]

T T F F F T F

T F T F T F F

F T F T F T F

F F T T F T F 28

Solutions to Review Exercises

(b) A truth table shows that this is neither a tautology nor a contradiction.

p q p~q pVq (p ~ q) ~ (p V q)

T T T T T

T F F T T

F T T T T

F F T F F (c) A truth table shows this is a tautology.

p q r ...,q p A (...,q) [p A (...,q)] ~ r p V [(p A (...,q)) ~ r]

T T T F F T T

T F T T T T T

F T T F F T T

F F T T F T T

T T F F F T T

T F F T T F F

F T F F F T T

F F F T F T T (d) This is neither a tautology nor a contradiction.

p q r ...,q (...,q) A r pVq

T T T F F T

T F T T T T

F T T F F T

F F T T T F

T T F F F T

T F F T F T

F T F F F T

F F F T F F

[(...,q) A r] ~ (p V q) (pVq) ~ [(...,q) Ar] (p V q) +-t [(...,q) A r]

T F F

T T T

T F F

F T F

T F F

T F F

T F F

F T F 4. Assume that some set of truth values on the variables makes A true. If 'B were false, this would make A ~ 'B false and 'B ~ A true, contradicting logical equivalence. So 'B must be true also. Similarly, if 'B is true, then A must also be true. We conclude that A is true if and only if'B is true. This means A and 'B are logically equivalent.

5. (a) Since A ~ 'B, we know that A is true precisely when 'B is true. Since 'B ~ e, 'B is true precisely when e is true. Hence A is true if and only if e is true, that is, A ~ e.

(b) Property lz saysfp=-v q) ~ ((...,p)Vq). Clearly, ((...,p)Vq) ~ (qV(...,p)),sopart(a)tells us (p ~ q) ~ (q V (...,p)). But Property 12 also says ((...,q) ~ (...,p)) ~ (...,(...,q) V (...,p)) and clearly (...,(...,q) V (...,p)) ~ (q V (...,p)). So we have (p ~ q) ~ (q V (...,p)) and also

Chapter 1

29

(q v (--,p)) {::::::} ((--,q) ~ (--,p)). Hence part (a) again gives (p ~ q) {::::::} ((--,q) ~ (--,p)), which is Property 11.

6. (a) ((p~q)~r) {::::::} (((--,p)Vq)~r) {::::::} ((--,((--,p)Vq))Vr) {::::::} ((pA(--,q))Vr) {::::::} ((p V r) A ((--,q) V r)) {::::::} ((p V r) A (--,(q A (--,r)))).

(b) [p ~ (q V r)] {::::::} (--,p) V (q V r) {::::::} --,p V q V r (associativity) {::::::} [--,(p A (--,q)] V r (De Morgan) {::::::} [p A (--,q)] ~ r.

7. (a) ((p V q) A r) V ((p V q) A (--,p))

{::::::} ((p A r) V (q A r)) V ((p A (--,p)) V (q A (--,p))) {::::::} ((p A r) V (q A r)) V (0 V (q A (--,p)))

{::::::} ((p A r) V (q A r)) V (q A (--,p))

{::::::} (p A r A q) V (p A r A (--,q)) V (q A rAp) V (q A r A (--,p)) V(q A (--,p) A (--,r))

{::::::} (p A q A r) V (p A (--,q) A r) V ((--,p) A q A r) V((--,p) A q A (--,r))

(b) [p V (q A (--,r))] A --,(q A r)

{::::::} [p V (q A (--,r))] A [( --,q) V (--,r)]

{::::::} ( [p V (q A (--,r))] A (--,q)) V ([p V (q A (--,r))] A (--,r) )

{::::::} (p A (--,q)) V (q A (--,r) A (--,q)) V (p A (--,r)) V (q A (--,r) A (--,r)) {::::::} (p A (--,q) A r) V (p A (--,q) A (--,r)) V 0 V (p A q A (--,r))

V(p A (--,q) A (--,r)) V (p A q A (--,r) V ((--,p) A q A (--,r)) {::::::} (p A (--,q) A r) V (p A (--,q) A (--,r)) V (p A q A (--,r))

V (p A q A (--,r) V (( --,p) A q A (--,r))

8. (a) This is not valid. If p is false and q is true, the premises are true but the conclusion is not.

(b) The first hypothesis can be rewritten as p V (--,q) , which is the same as q ~ p. The second hypothesis is (--,p) V (--,r), which is p ~ (--,r). The third hypothesis is (--,r) ~ s. So the given

argument is

q~p p ~ (--,r) (--,r) ~ s q~s

Two applications of the chain rule tell us this is valid.

(c) This argument is not valid. If p, r and t are true while q is false (and s takes on either truth value), the hypotheses are true while the conclusion is false.

9. This argument is valid. The hypotheses can never both be true at the same time, so there can be no case when the hypotheses are true while the conclusion is false.

10. (a) This argument, an example of resolution, is valid.

(b) This argument is not valid. We can write it as shown.

When s and r are true and p is false, the hypotheses are true, while the conclusion is false.

p~q (--,q) V r (--,r) ~ (--,s)

s~p.

30

Solutions to Exercises

Exercises 2.1

1. (a) [BBl{ -v'5, v'5}

(b) {I, 3, 5,15, -1, -3, -5, -15}

(c) [BB] {O, -~} (Although ±/2 are solutions to the equation, they are not rational.) (d) {-1,0,1,2,3}

(e) This is the empty set. There are no numbers less than -4 and bigger than +4.

2. (a) [BB] For example, 1 + i, 1 + 2i, 1 + 3i, -8 - 5i and 17 - 43i.

(b) For example, {I - 2/2, 1 - 5/2, 1 - 7/2, 316 - 2/2 and 394 - 7/2}.

(c) If x = 0, y = ±5 and x/y = 0. If x = 1, y = ±V24, and x/y = ±1/V24 = ±V24/24.

If x = 2, y = ±v'2I and x/y = ±2v'2I/2l. Five elements of the given set are 0, V24/24, -V24/24, 2v'2I/21 and -2v'2I/2l.

(d) {2, 3, 5, 6, 8}.

3. (a) [BB] {I, 2}, {I, 2, 3}, {I, 2, 4}, {I, 2, 3, 4} (b) 0, {I}, {2}, {1,2}

(c) 0, {I}, {2}, {3}, {4}, {1,3}, {1,4},{2,3}, {2,4}, {3,4}, {1,3,4}, {2,3,4}

(d) {3},{4}, {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} (e) {1,2,3}, {1,2,4}, {1,2,3,4}

(t) 0, {I}, {2}.

4. [BB] Only (c) is true. The set A contains one element, {a, b}.

5. (a) [BB] True. 3 belongs to the set {I, 3, 5}.

(b) False. {3} is a subset of {I, 3, 5} but not a member of this set. (c) True. {3} is a proper subset of {I, 3, 5}.

(d) [BB] False. {3, 5} is a subset of {I, 3, 5}.

(e) False. Although {I, 3, 5} is a subset of itself, it is not a proper subset.

(t) False. If a + 2b is in the given set, a is even, so a + 2b is even and can't equall.

(g) False. If a + b/2 = ° and b #- 0, then /2 = - ~ is the quotient of rational numbers and, hence, rational. But this is not true.

6. (a) [BB] {0};

(b) {0, {0}};

(c) {0, {0, {0}}, {0}, { {0} }}.

7. (a) [BB] True. The empty set is a subset of every set. (b) True. The empty set is a subset of every set.

(c) False. The empty set does not contain any elements. (d) True. {0} is a set containing one element, namely, 0. (e) [BB] False. {I, 2} is a subset of {I, 2, 3, {I, 2, 3}}. (t) False. {I, 2} is not an element of {I, 2, 3, {I, 2, 3}}. (g) True. {I, 2} is a proper subset of {I, 2, {{I, 2}}}.

(h) [BB] False. {I, 2} is not an element of {I, 2, {{I, 2}}}.

Section 2.1

31

(i) True. {{I, 2}} contains just one element, {I, 2}, and this is an element of {I, 2, {I, 2}}.

8. [BB] Yes it is; for example, let x = {I} and A = {I, {I n.

9. (a) i. {a,b,e,d} ii. [BB] {a,b,e}, {a,b,d}, {a,e,d}, {b,e,d}

iii. {a,b}, {a,e}, {a,d}, {b,e}, {b,d}, {e,d} iv. {a}, {b}, {e}, {d} v.0

(b) 16

10. (a) If A = 0, then P(A) = {0} is a set containing one element, so its power set contains two elements. (b) P(A) contains two elements; P(P(A)) has four elements.

11. (a) [BB] 4;

(b) [BB] 8.

(c) [BB] There are 2n subsets of a set of n elements. (See Exercise 15 in Section 5.1 for a proof.)

12. (a) [BB] False. Let A = {2}, B = {{2}}, C = {{ {2}}}. Then A is an element of B (that is, A E B) and B is an element of C (B E C), but A is not an element of C (since B is C's only element).

(b) True. If x E A, then x E B since A ~ B. But since x E B, then x E C since B ~ C.

(c) True. As in the previous part, we know that A ~ C. To prove A f C, we note that there is some x E C such that x¢. B (since B ~ C). Then, since x¢. B, x¢. A. Therefore, x is an element of C which is not in A, proving A f C.

(d) [BB] True. A E B means that A belongs to the set B. Since B is a subset of C, any element of B also belongs to C. Hence, A E C.

(e) False. For example, let A = {I}, B = {{I}, 2} and C = {{I}, 2, 3}. Then A E B, B ~ C, but A~C.

(f) False. Let A = {I}, B = {I, 2}, C = {{I, 2}, 3}. Then A ~ Band BE C, but A¢. C. (g) False. Same example as 12(f) where A ~ C.

13. (a) This is false. As a counter-example, consider A = {I}, B = {2}. Then A is not a subset of B and B is not a proper subset of A.

(b) The converse of the implication in (a) is the implication B ~ A ~ A ~ B. This is true. Since B ~ A, there exists some element a E A which is not in B. Thus A is not a subset of B.

14. (a) [BB] True. (~) If C E P(A), then by definition of "power set," C is a subset of A; that is, C~A.

«(--) If C ~ A, then C is a subset of A and so, again by definition of "power set," C E P(A).

(b) True. (~) Suppose A ~ B. We prove P(A) ~ P(B). For this, let X E P(A). Therefore, X is a subset of A; that is, every element of X is an element of B. Since A ~ B, every element of X must be an element of B. So X ~ B; hence, X E P(B).

«(--) Conversely, assume P(A) ~ P(B). We must prove A ~ B. For any set A, we know that A ~ A and, hence, A E P(A). Here, with P(A) ~ P(B), we have, therefore, A E P(B); that is, A ~ B, as desired.

(c) The double implication here is false because the implication ~ is false. If A = 0, then P(A) = {0} and {0} f 0.

32

Solutions to Exercises

Exercises 2.2

1. (a) [BB] A = {I, 2, 3,4, 5, 6}, B = {-I,O, 1, 2, 3, 4, 5}, C = {O, 2, -2}.

(b) AU C = {-2, 0,1,2,3,4,5, 6}, B n C = {0,2}, B <, C = {-I, I,3,4,5}, A EB B = {-I,6,0},

C x (B n C) = {(O, 0), (0,2), (2,0), (2,2), (-2,0), (-2, 2)}, (A,- B) <, C = {6}, A <, (B <, C) = {2, 6},

(B U 0) n {0} = 0.

(c) 8 = {(I, -1), (2,0), (3, 1), (4,2), (5,3), (6, 4)}; T = {(I, 2), (2, 2)}.

2. (a) [BB] 8 n T = {V2, 25}, 8 U T = {2, 5, V2, 25, 11",~, 4, 6, V, T x (8 n T) = {(4, V2), (4,25), (25, V2), (25,25), (V2, V2), (V2, 25), (6, V2), (6,25), (~, V2), (~, 25)}.

(b) [BB] Z U 8 = {V2, 11", ~,O, 1, -1, 2, -2, ... }; Z n 8 = {2, 5, 25}; Z UT = {V2, ~,O, 1, -1,2, -2, ... }; Z nT = {4,25,6}.

(c) Z n (8 U T) = {2, 5, 25,4, 6} = (Z n S) U (Z n T). The two sets are equal. (d) Z U (8 n T) = {V2,0, 1, -1,2, -2, ... } = z u {V2} = (Z U 8) n (Z U T).

The two sets are equal.

,

3. (a) [BB]{I, 9, 0, 6, 7}; (b){ 4,6, 5}; (c) {O, I}.

4. A = {(I, 1), (1, 2), (1,3), (2,2), (2,3), (3, 3)} and B = {±!, ±I, ±2}.

5. (a)[BB] {c, {a, b}}; (b) {0}; (c) A; (d) 0;

(e) [BB] 0; (t) {A}.

6. (a) [BB] N = (-2, IJ;

(b) AC = (-00, -3J U (4,00);

(c) AC = R.

7. (a) Y n Z = {3, 4, 5}, so X EB (Y n Z) = {I, 2, 5}. (b) (XcUy)c=xnyc=X,-Y={I}.

8. (a) [BB] The subsets of A containing {I, 2} are obtained by taking the union of {I, 2} with a subset of {3, 4, 5, ... , n}. Their number is the number of subsets of {3, 4, 5, ... , n} which is 2n-2. (See Exercise 11 of Section 2.1.)

(b) The subsets B which have the property that Bn{I, 2} = 0 are exactly the subsets of {3, 4, 5, ... , n} and these number 2n-2•

(c) The subsets B which have the property that B U {I, 2} = A are precisely those subsets which contain {3, 4,5, ... , n} and these correspond, as in (a), to the subsets of {I, 2}. There are four.

9. [BB] (a, by = (-oo,aJ U [b,oo), [a,b)C = (-00, a) U [b,oo), (a,oo)C = (-oo,aJ, (-oo,W = (b,oo).

10. (a) [BB] C8 ~ T; (b) [BB] M n P = 0;

(e) (M U C8) n P ~ TC.

11. (a) Negation: C 8 Sf: T; Converse: T ~ C 8.

(b) Negation: M n P =1= 0; Converse: P ~ MC or P n M = 0,

(c) M g; P;

(d) C8 <, T ~ P;

Section 2.2

33

(c) Negation: M <;;; P; No converse since the statement is not an implication. (d) Negation: (M U CS) nP ~ TC; Converse: TC<;;; (M U CS) n P.

(e) Negation: (M U CS) n P n T =j:. 0; Converse TC <;;; (M U CS) n P.

12. (a) [BB] En P =j:. 0 (b) OEZ, N (c) N <;;; Z

(d) Z ~ N (e) (P -, {2}) <;;; EC (0 2 E En P

(g) En P = {2}

13. (a) [BB] Since A_3 <;;; A3, A3 U A_3 = A3. (b) Since A_3 <;;; A3, A3 n A_3 = A_3.

(c) A3 n (A_3)C = {a E Z I -3 < a.~ 3}= {-2, -1, 0,1,2, 3}.

-. 4

(d) Since Ao <;;; Al <;;; A2 <;;; A3 <;;; A4, we 'have ni=o Ai = Ao·

14. [BB] Region 2 represents (AnC) ,B. Region 3 represents AnBnC; region 4 represents (AnB) ,C.

A .

15. (a) B

(b) i. (A U B) n C = {5,6}

ii. A, (B' A) = A = {1,2,4, 7,8,9} iii. (AUB)' (AnC) = {1,2,3,4,9} iv. A E9 C = {I, 2,4,7,8, 9}

v. (A n C) x (A n B) = {(5, 1), (5,2), (5,4), (6, 1), (6,2), (6, 4)}

16. (a) [BB] A <;;; B, by Problem 7;

(b) B<;;; A, by PAUSE 4 with A and B reversed.

17. [BB] Think of listing the elements of the given set. There are n pairs of the form (1, b), n - 1 pairs of the form (2, b), n - 2 pairs of the form (3/ b), and so on until finally we list the only pair of the form (n, b). The answer is 1 + 2 + 3 + ... + n= ~n(n + 1).

18. Since (1, 1) E A, (2,1) and (2,2) are inA. Since (2,1) E A, we get (3,1) and (3,2) in A and since (2,2) E A,'(3, 3) EA. Now

(3,1) E A --t (4,1) and (4,2) E A; (3,2) E A --t (4,3) E A and (3,3) E A --t (4,4) E A. The points shown so far which belong to A are plotted in the picture to the right and this makes it seem very plausible that A contains the set {( m, n) E N x N I m 2:: n}.

19. (a) Let x E B. Certainly x is also in A orin AC. This suggests cases.

Case 1: If x E A, then x E An B, sox E C. Case 2: If x ¢ A, then x E AC n B, so xE C -, In either case, x E C, so B <;;; C.

(b) [BB] Yes. Given An B = An C and AC n B = N n C, certainly we have A n B <;;; C and AC n B <;;; C so, from (a), we have that B <;;; C. Reversing the roles of Band C in (a), we can also conclude that C <;;; B; hence, B = C.

2

1 2 3 4

4

3

1

20. (a) The Venn diagram shown in Fig. 2.1 suggests the following counterexample: Let A = {I, 2,3, 4}, B = {3, 4, 5, 6} and C = {2,3, 5, 7}. Then A U (B n C) = AU {3, 5} = {I, 2, 3, 4, 5} whereas (A U B) n C = {I, 2, 3,4,5, 6} n C={2, 3, 5}.

34

Solutions to Exercises

(b) First, we prove A U (B n G) ~ (A U B) n (A U G).

So let x E AU (B nO). Then x E A or x E B n G. If x E A, then x E Au B and x E AuG, so x E (AU B) n (AU G). If x E BnG, then x E B and x E G so x E AU B and x E Au G; that is, x E (A U B) n (A U G). In either case, x E (A U B) n (A U G) giving the desired inclusion. Second, we prove (A U B) n (A U G) ~ Au (B n G).

So let x E (AUB) n (AUG). Thus, x E AUB and x E AUG. If x E A, then x E Au (BnG). If x ¢:. A, then we must have x E B and x E G; that is, x E B n G, so x E AU (B n G). In either case, x E AU (B n G) giving the desired inclusion and equality.

21. We use the fact that (XC)C = X for any set X.

Let X = Nand Y = BC. Then A = X" and B = yc, so (AnB)C = [XC nYC]C = [(XUy)C]C (by the first law of De Morgan) = X U Y = A C U BC, as required.

22. [BB] Using the fact that X" Y = X nYc, we have

(A" B) "G = (A nBC) n GC = An (BC n GC) = An (B U G)C = A" (B U G).

23. We use the laws of De Morgan and the facts that (XC)C = X and X n X" = 0 for any set X. We have [(AUB)Cn(AcUG)C]C"DC = [(ACnBC)n(AnGcW"Dc = 0c"Dc = U"Dc = Un(DC)C = UnD=D.

24. A" (B <, G) = A <, (B n GC) = An (B n GC)C = An (BC U G) = (A nBC) U (A n G) = (A nBC) U (A n (GC)C) = (A" B) U (A "GC) .:

25. (a) [BB] (A U B U G)C = [A U (B U GW = AC n (B U G)C = AC n (BC n GC) = N n BC n GC. (A n B n G)C = [A n (B n GW = N U (B n G)C = N U (BC U GC) = AC U BC U GC.

(b) (A n (B" G)t n A (A n B n GC)C n A = (AC U BC U G) n A

(A n (AC U BC)) U (A n G) = (A n AC) U (A nBC) U (A n G) o U (A nBC) U (A n G) = (A nBC) U (A n G)

(A" B) U (A n G)

26. (a) [BB] Looking at the Venn diagram at the right, A EB B consists of the points in regions 1 and 3. To have A EB B = A, we must have both regions 2 and 3 empty; that is, B = 0. On the other hand, since A EB 0 = A, this condition is necessary and sufficient.

(b) Looking at the Venn diagram, An B is the set of points in region 2 while Au B is the set of points in regions 1, 2 and 3. Hence, A n B = A U B if and only if regions 1 and 3 are both empty; that is, if and only if A = B.

27. (a) [BB] This does not imply B = G. For example, let A = {I,2}, B = {I}, G = {2}. Then A U B = AuG, but B of- G.

(b) This does not imply B = G. For example, let A = {I}, B = {I,2}, G = {I,3}. Then A n B = An G = A, but B of- G.

(c) This does imply B = G, and here is a proof. First let b E B. Then, in addition, either b E A or b ¢:. A.

Case 1: b ¢:. A

Section 2.2

35

In this case, b E A EB B, so s e A EB C and since b 1:. A it follows that b « C.

Case 2: s « A. Here we have bE B n A and, hence, b 1:. A EB B, so b 1:. A EB C. Since s « A, we must have bE C (otherwise, b E A <, C c;;:; A EB C).

In either case, we obtain bE C. It follows that B c;;:; C. A similar argument shows C c;;:; Band, hence, C = B.

(d) This is false since for A = 0, A x B = A xC = 0 regardless of Band C.

28. (a) True. Let (a, b) E A x B. Since a E A and A c;;:; C, we have a E C. Since s « Band B c;;:; D, bED. Thus, (a, b) E C x D and A x B c;;:; C x D.

(b) False: Consider A = {I}, B = {2, 3}, C = {I, 2, 3}.

(c) False. Let A = {I}, B = 0, C = {2}, D = {3}. Then A x B = 0 c;;:; {(2,3)} = C x D, but A~C.

(d) False since, by (b), the implication t- is false.

(e) [BB] True. Let x E A. Then x E AU B, so x E An B and, in particular, x E B. Thus, A c;;:; B.

Similarly, we have B c;;:; A, so A = B.

29. Let (x, y) E (A n B) x C. This means x E An B and y E C. Hence, x E A, x E B, y E C. Thus, (x, y) E A x C and (x, y) E B x C; i.e., (x, y) E (A x C) n (B x C). Therefore, (A n B) x C c;;:; (A x C) n (B x C).

Now let (x, y) E (A x C) n (B x C). This means that (x, y) E A x C and (x, y) E B x C); that is, x E A, x E B, y E C, so x E An Band y E C. Hence, (x, y) E (A n B) x C. Therefore, (A x C) n (B x C) c;;:; (A n B) x C and we have equality, as desired.

30. (a) False. For example, letA = {1,2},B = {1}andC = {2}. ThenA,(BUC) = {1,2},{1,2} = 0, but (A <, B) U (A, C) = {2} U {I} = {1,2}.

(b) True. Let (x, y) E (A, B) x C. This means that x E A, Band y E C; that is, x E A, x 1:. B, y E C. Hence, (x, y) E A x C, but (x, y) 1:. B x C, so (x, y) E (A x C) <, (B x C). Therefore, (A, B) x C c;;:; (A x C) <, (B x C).

Now let (x, y) E (A x C), (B x C). This means that (x, y) E A x C, but (x, y) 1:. B x C. Since (x, y) E A x C, we have x E A, y E C. Since y E C and (x, y) 1:. B x C, we must have x 1:. B; that is, x E A ,B, y E C, so (x, y) E (A ,B) x C. Therefore, (AxC),(BxC) c;;:; (A ,B) xC and we have equality as claimed.

(c) [BB] True. Let (x, y) E (A EB B) x C. This means that x E A EB Band y E C; that is, x E Au B, x 1:. An B, y E C. If x E A, then x 1:. B, so (x, y) E (A x C) <, (B x C). If x E B, then x 1:. A, so (x, y) E (B x C) <, (A x C). In either case, (x, y) E (A x C) EB (B x C). So (A EB B) x C c;;:; (A x C) EB (B x C).

Now, let (x, y) E (A x C) EB (B x C). This means that (x, y) E (A x C) U (B x C), but (x, y) 1:. (A x C) n (B x C). If (x, y) E A xC, then (x, y) 1:. B xC, so x E A, y E C and, therefore, x 1:. B. If (x, y) E B x C, then (x, y) 1:. A x C, so x E B, y E C and, therefore, x 1:. A. In either case, x E A EB Band y E C, so (x, y) E (A EB B) x C. Therefore, (A x C) EB (B x C) c;;:; (A EB B) x C and we have equality, as claimed.

(d) False. Let A = {I}, B = {2}, C = {3}, D = {4}. Then 1 E AU B, 4 E CUD, so (1,4) E (AU B) x (CUD). But (1,4) 1:. AxC and (1,4) 1:. BxD, so (1,4) 1:. (AxC)U(BxD).

(e) False. Let A = {I, 2}, B = {2}, C = {3}, D = {4}. Then, since 3 1:. D, (2,3) E (A x C) <, (B x D). However, because 2 E B, 21:. A, B, so (2,3) 1:. (A, B) x (C, D).

36

Solutions to Exercises

31. George Boole (1815-1864) was one of the greatest mathematicians of the nineteenth century. He was the first Professor of Mathematics at University College Cork (then called Queen's College) and is best known today as the inventor of a subject called mathematical logic. Indeed he introduced much of the symbolic language and notation we use today. Like Charles Babbage and Alan Turing, Boole also had a great impact in computer science, long before the computer was even a dream. He invented an algebra of logic known as Boolean Algebra, which is used widely today and forms the basis of much of the internal logic of computers. His books, "The Mathematical Analysis of Logic" and "An Investigation of the Laws of Thought" form the basis of present-day computer science.

Exercises 2.3

1. [BB] S x B is the set of ordered pairs (s, b), where s is a student and b is a book; thus, S x B represents all possible pairs of students and books. One sensible example of a binary relation is {( s, b) I s has used book b}.

2. A x B is the set of all ordered pairs ( a, b) where a is a street and b is a person. One binary relation would be {(a, b) I b lives on street a}.

3. (a) [BB] not reflexive, not symmetric, not transitive.

(b) (in most cases) reflexive, (in somewhat fewer cases) symmetric, certainly not transitive!

**(c) [BB] not reflexive, not symmetric, but it is transitive.
**

(d) reflexive, symmetric, transitive.

(e) not reflexive, not symmetric, not transitive

4. (a) [BB] a b c d (b) a b c d (c) a b c d

a x x a x x x a x x x

b x x b x b

c x c x x c x x

d x d d x

(d) a b c d

a x x x x

b x x x

c x

d x x 5. (a)[BB] {(I, 1), (1,2), (2, 3)}; (b) {(I, 1), (2,2), (3,3), (1,2), (2, 3)};

(c) {(I, 2), (2,3), (2, 1), (3, 2)}; (d) {(I, 2), (1,3), (2, 3)};

(e) {(I, 1), (2,2), (3,3), (1,2), (2, 1), (2, 3), (3, 2)};

(f) {(I, 1), (2,2), (3,3), (1,2), (2,3), (1, 3)}; (g) [BB] {(I, 2), (2, 1), (1, 1), (2, 2)}; (h) {(I, 1), (2,2), (3, 3), (1,2), (2,3), (1,3), (2, 1), (3, 2), (3, I)}.

6. The answer is yes and the only such binary relations are subsets of the equality binary relation. To see why, let R: be a binary relation on a set A which is both symmetric and antisymmetric. Let (a, b) E R:

Then (b, a) En by symmetry, so a = b by anti symmetry.

Section 2.3

37

7. [BB] The argument assumes that for a E n there exists a b such that (a, b) En. This need not be the case: See Exercise 5(g).

8. (a) [BB] Reflexive: Every word has at least one letter in common with itself.

Symmetric: If a and b have at least one letter in common, then so do b and a.

Not antisymmetric: (cat, dot) and (dot, cat) are both in the relation but dot f- cat!!

Not transitive: (cat, dot) and (dot, mouse) are both in the relation but (cat, mouse) is not.

(b) Reflexive: Let a be a person. If a is not enrolled at Miskatonic University, then (a, a) E R: On the other hand, if a is enrolled at MU, then a is taking at least one course with himself, so again (a,a) En.

Symmetric: If (a, b) E 'R, then either it is the case that neither a nor b is enrolled at MU (so neither is b or a, hence, (b, a) E n) or it is the case that a and b are both enrolled and are taking at least one course together (in which caseb and a are enrolled and taking a common course, so (b, a) En). In any case, if (a, b) En, then (b, a) En.

Not antisymmetric: If a and b are two different students in the same class at Miskatonic University, then (a, b) En and (b, a) En, but a f- b.

At most universities, this is not a transitive relation. Let a, b and e be three students enrolled at MU such that a and b are enrolled in some course together and b and e are enrolled in some (other) course together, but a and e are taking no courses together. Then (a, b) and (b,e) are in n but (a,e) tI- R:

9. (a) Not reflexive: (1,1) tI- R:

Not symmetric: (1,2) En but (2, 1) tI- n.

Antisymmetric: It is never the case that for two different elements a and b in A we have both (a, b) and (b, a) in R:

Transitive vacuously; that is, there exists no counterexample to disprove transitivity: The situation (a, b) En and (b, e) En never occurs.

(b) [BB] Not reflexive: (2,2) tI- n.

Not symmetric: (3,4) En but (4,3) tI- n.

Not antisymmetric: (1,2) and (2,1) are both in n but 1 f- 2. Not transitive: (2,1) and (1,2) are in n but (2,2) is not.

(c) [BB] Reflexive: For any a E Z, it is true that a2 2: O. Thus, (a, a) E R:

Symmetric: If (a, b) En, then ab 2: 0, so ba 2: 0 and hence, (b, a) En.

Not antisymmetric: (5,2) E n because 5(2) = 10 2: 0 and similarly (2,5) E R; but 5 f- 2. Not transitive: (5,0) En because 5(0) = 0 2: 0 and similarly, (0, -6) En; however, (5, -6) tln because 5( -6) "1. O.

(d) Reflexive: For any a E R, a2 = a2, so (a, a) En.

Symmetric: If (a,b) En then a2 = b2, so b2 = a2 which says that (b,a) En. Not antisymmetric: (1, -1) En and (-1,1) En but 1 f- -1.

Transitive: If (a, b) and (b, e) are both in R: then a2 = b2 and b2 = e2, so a2 = e2 which says (a,e) En.

(e) Reflexive: For any a E R, a - a = 0 ~ 3 and so (a, a) En.

Not symmetric: For example, (0,7) E R: because 0 - 7 = -7 ~ 3, but (7,0) tI- R: because 7 - 0 = 7 ~ 3.

38

Solutions to Exercises

Not antisymmetric: (2,1) E R because 2 -1 = 1 ::; 3 and (1,2) E R because 1- 2 = -1 ::; 3, but 1 of- 2.

Not transitive: (5,3) E R because 5 - 3 = 2 ::; 3 and (3,1) E R because 3 - 1 = 2 ::; 3, but (5,1) ¢. R because 5 - 1 = 41,. 3.

(f) Reflexive: For any (a, b) E A, a - a = b - b; thus, ((a, b), (a, b)) E R.

Symmetric: If ((a, b), (c, d)) E R, then a-c = b+d, soc-a = d-b and, hence, ((c, d), (a, b)) E R.

Notantisymmetric: ((5,2), (15, 12)) E R because 5-15 = 2-12 and similarly, ((15, 12), (5,2)) E R; however, (15,12) of- (5,2).

If ((a, b), (c, d)) E R and (( c, d), (e, I)) E R then a - c = b - d and c - e = d - f. Thus, a - e = (a - c) + (c - e) = (b - d) + (d - I) = b - f and so ((a, b), (e, I)) E R.

(g) Not reflexive: If n E N, then n of- n is not true.

Symmetric: If nl of- n2, then n2 of- nl.

Not antisymmetric: 1 of- 2 and 2 of- 1 so both (1,2) and (2, 1) are in R, yet 1 of- 2. Not transitive: 1 of- 2, 2 of- 1, but 1 = 1.

(h) Not reflexive: (2,2) ¢. R because 2 + 2 of- 10.

Symmetric: If (x, y) E R, then x + y = 10, so y + x = 10, and hence, (y, x) E R.

Not antisymmetric: (6,4) E R because 6 + 4 = 10 and similarly, (4,6) E R, but 6 of- 4.

Not transitive: (6,4) E R because 6 + 4 = 10 and similarly, (4,6) E R, but (6,6) ¢. R because 6 + 6 of- 10.

(i) [BB] Reflexive: If (x, y) E R2, then x + y ::; x + y, so ((x, y), (x, y)) E R.

Not symmetric: ((1,2), (3,4)) E R since 1 + 2::; 3 + 4, but ((3,4), (1, 2)) ¢. R since 3 + 41,. 1 + 2.

Not antisymmetric: ((1,2), (0,3)) E R since 1 + 2 ::; 0 + 3 and ((0,3), (1, 2)) E R since 0 + 3::; 1 + 2, but (1,2) of- (0,3).

Transitive: If ((a, b), (c, d)) and ((c, d), (e, f)) are both in R, then a+b ::; c+d and c+d::; e+ f, so a + b ::; e + f (by transitivity of ::;) which says ((a, b), (e, I)) E R.

G) Reflexive: ~ = 1 E N for any a E N.

Not symmetric: (4,2) E R but (2,4) ¢. R.

Antisymmetric: If % = n and ~ = m are integers then nm = 1 so n, m E {± 1 }. Since a and b are positive, so are n and m. Therefore, n = m = 1 and a = b.

Transitive: The argument given in Example 24 for Z works the same way for N.

(k) Not reflexive: § is not defined, let alone an integer!

Not symmetric: As before.

Not antisymmetric: (4, -4) and ( -4,4) are both in R. Transitive: As shown in Example 24.

Section 2.3

39

10. (a)

y

(0,2)

(b) The relation is not reflexive because, for example, (2,2) 1:. R: It is not transitive because, for example, (2,0) E R: and (0, 1) En but (2, 1) 1:. n.

x

(c) The relation is symmetric since if (x, y) E n, then 1 ::; Ixl + Iyl ::; 2, so 1 ::; Iyl + Ixl ::; 2, so (y, x) E R:

It is not antisymmetric since, for example, (0,1) E nand (1,0) E R; but 0#1.

11. (a) [BB] Reflexive: For any set X, we have X ~ X.

Not symmetric: Let a, bE S. Then {a} ~ {a, b} but {a, b} ~ {a}. Antisymmetric: If X ~ Y and Y ~ X, then X = Y.

Transitive: If X ~ Y and Y ~ Z, then X ~ Z.

(b) Not reflexive: For no set X is it true that X ~ X.

Not symmetric: As before.

Antisymmetric "vacuously": It is impossible for X ~ Y and Y ~ X. (Recall that an implication is false only when the hypothesis is true and the conclusion is false.)

Transitive: As before.

(c) Not reflexive: Since S # 0, there is some element a E S, and so some set X = {a} # 0 E P(S).

For this X, however, X n X = X # 0, so (X, X) 1:. n.

Symmetric: If (X, Y) E n, then X n Y = 0, so Y n X = 0, hence, (Y, X) E n.

Not antisymmetric: Leta, b be two elements in S and let X = {a}, Y = {b}. Then (X, Y) E n and (Y, X) E R; but Xi Y.

Not transitive: Let a, b be two elements in S and let X = {a}, Y = {b}, Z = {a}. Then (X, Y) En, (Y, Z) E n, but (X, Z) 1:. n.

12. (a) [BB] Reflexive: Any book has price ~ its own price and length ;::: its own length, so (a, a) E n for any book a.

Not symmetric: (Y, Z) E n because the price of Y is greater than the price of Z and the length of Y is greater than the length of Z, but for these same reasons, (Z, Y) 1:. n.

Antisymmetric: If (a, b) and (b, a) are both in R: then a and b must have the same price and length. This is not the case here unless a = b.

Transitive: If (a, b) and (b, c) are in R; then the price of a is;::: the price of b and the price of b is ;::: the price of c, so the price of a is ;::: the price of c. Also the length of a is ;::: the length of b and the length of b is;::: the length of c, so the length of a is > the length of c. Hence, (a, c) E R:

(b) Reflexive: For any book a, the price ofa is;::: the price of a so (a, a) E R: (One could also use a similar argument concerning length.)

Not symmetric: As in part (a), (Y, Z) E. R; but (Z, Y) 1:. R:

Not antisymmetric: (W, X) E n because the price of W is greater than or equal to the price of X, and (X, W) E n because the length of W is greater than or equal to the length of X, but W#X.

Not transitive: (Z, U) En because the length of Z is;::: the length of U and (U, Y) En because the price of U is;::: the price ofY, but (Z, Y) 1:. R: because neither is the price of Z;::: the price of Y nor is the length of Z ;::: the length of Y.

40

Solutions to Exercises

13. Now the second binary relation would have an extra term, {Mike, 120}, and the third would have the extra term, {Pippy Park, 120}. But, in addition, the entry {Pippy Park, 74} would be deleted. So Mike is now clearly identified as the one who shot 120, and Pippy Park is where that occurred. Hence, Mike's round of 74 was at Clovelly. Since Edgar has only one entry in binary relation two, he must have shot 72 at both courses. Finally, Bruce's 74 must have been at Clovelly and hence his 72 was at Pippy Park. All information has been retrieved in this case.

Exercises 2.4

1. Reflexive: For any citizen a of New York City, either a does not own a cell phone (in which case a ,...., a) or a has a cell phone and a's exchange is the same as a's exchange (in which case again a ,...., a).

Symmetric: If a ,...., b and a does not have a cell phone, then neither does b, so b ,...., a; on the other hand, if a does have a cell phone, then so does b and their exchanges are the same, so again, b ,...., a.

Transitive: Suppose a ,...., b and b ,...., c. If a does not have a cell phone, then neither does b and, since b ,...., c, neither does c, so a ,...., c. On the other hand, if a does have a cell phone then so does b and a's and b's exchanges are the same. Since b ,...., c, c has a cell phone with the same exchange as b. It follows that a and c have the same exchange and so, in this case as well, a rv c.

There is one equivalence class consisting of all residents of New York who do not own a cell phone and one equivalence class for each New York City exchange consisting of all residents who have cell phones in that exchange.

2. (a) [BB] This is not reflexive: (2,2) rf. R:

(b) This is not symmetric: (2,3) En but (3,2) rf. R:

It would also be acceptable to not that n is not transitive. (3,1) E n and (1,2) E n, but (3,2) rf. n.

(c) This is not symmetric: (1,3) is in the relation but (3, 1) is not.

It would also be acceptable to note that this relation is not transitive: (2,1) E n, (1,3) E R: but (2,3) rf. n.

3. [BB] Equality! The equivalence classes specify that x rv y if and only if x = y.

4. (a) Reflexive: If a E S, then a and a have the same number of elements, so a rv a.

Symmetric: If a rv b, then a and b have the same number of elements, so b and a have the same number of elements. Thus b rv a.

Transitive: If a rv b and b rv c, then a and b have the same number of elements, and band c have the same number of elements, so a and c have the same number of elements. Thus a ,...., c.

(b) There are seven equivalence classes, represented by 0, {1}, {1, 2}, {1, 2, 3}, {1, 2, 3, 4}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5, 6}.

5. (a) [BB] Reflexive: If a E R" {O}, then a rv a because ~ = 1 E Q.

Symmetric: If a rv b, then % E Q and this fraction is not zero (because 0 rf. A). So it can be inverted and we see that ~ = 1/ % E Q too. Therefore, b rv a.

Transitive: If a r- band b f'V c, then % E Q and ~ E Q. Since the product of rational numbers is rational, % = % ~ is in Q, so a ,...., c.

Section 2.4

41

(b) [BB] I = {a I a r- I} = {a I if E Q} = {a I a E Q} = Q" {a}. (c) [BB] 1Ji = ~ = 2 E Q, so v'3 ""' JI2 and hence v'3 = JI2.

6. Reflexive: For any a E N, a r- a since a2 +a = a(a+ 1) is even, as the product of consecutive natural numbers.

Symmetric: If a ""' b, then a2 + b is even. It follows that either a and b are both even or both are odd. If they are both even, b2 + a is the sum of even numbers, hence, even. If they are both odd, b2 + a is the sum of odd numbers and, hence, again, even. In both cases b2 + a is even, so b ""' a.

Transitive: If a ""' band b ""' c, then a2 + band b2 + c are even, so (a2 + b) + (b2 + c) is even; in other words, (a2 + c) + (b2 + b) is even. Since b2 + b is even, a2 + c is even too; therefore, a ""' c.

The quotient set is the set of equivalence classes. Now

2. {evens

a = {x I x + a IS even} =

odds

if a is even if a is odd

SO AI""'= {2Z, 2Z + I}.

7. (a) [BB] Reflexive: For any a E R, a ""' a because a - a = 0 E Z.

Symmetric: If a r- b, then a - bE Z, so b-a E Z (because b - a = -(a- b) and, hence, b ""' a. Transitive: If a ""' b and b ""' c, then both a - b and b - c are integers; hence, so is their sum, (a - b) + (b - c) = a-c. Thus, a ""' c.

(b) [BB] The equivalence class of 5 is 5" = {x E R I x ""' 5} = {x I x - 5 E Z} = Z, because x - 5 E Z implies x E Z.

5~ {XERlx,,",5!}

{x I x - 5~ E Z}

{x I x = 5~ + k, for some k E Z} {x I x = 5 + k + ~, for some k E Z} {x I x = n+~, forsomen E Z}

(c) [BB] For each a E R, 0 ~ a < 1, there is one equivalence class,

a = {x E R I x = a + n for some integer n}.

The quotient set is {a I 0 ~ a < I}.

8. [BB] Reflexive: For any a E Z, a ""' a because 2a + 3a = 5a.

Symmetric: If a ""' b, then 2a + 3b = 5n for some integer n. So 2b + 3a = (5a + 5b) - (2a + 3b) = 5(a + b) - 5n = 5(a + b - n). Since a + b - n is an integer, b ""' a.

Transitive: If a ""' b and b ""' c, then 2a + 3b = 5n and 2b + 3c = 5m for integers n and m. Therefore, (2a + 3b) + (2b + 3c) = 5(n + m) and 2a + 3c = 5(n + m) - 5b = 5(n + m - b). Since n + m - b is an integer, a ""' c.

9. (a) Reflexive: For any a E Z, 3a + a = 4a is a multiple of 4, so a r- a.

Symmetric: If a""' b, then 3a+b = 4k for some integer k, Since (3a+b) + (3b+ a) = 4(a+ b), we see that 3b + a = 4(a + b) - 4k is a multiple of 4, so b ""' a.

42

Solutions to Exercises

Transitive: If a '" band b '" c, then 3a + b = 4k for some integer k and 3b + c = 4£ for some integer £. Since 4(k+£) = (3a+b) + (3b+c) = (3a+c) +4b, we see that 3a+c = 4(k+£) -4b is a multiple of 4 and, hence, that a '" c.

(b) 0 = {x E Z I x r- O} = {x I 3x = 4k for some integer k}. Now if 3x = 4k, k must be a multiple of 3. So 3x = 12£ for somez E Z and x = 4£. 0 = 4Z.

(c) 2 = {x E Z I x '" 2} = {x I 3x + 2 = 4k for some integer k} = {x I 3x = 4k - 2 for some integer k} Now if 3x = 4k - 2, then 3x = 3k + k - 2 and so k - 2 is a multiple of 3. Therefore, k = 3£ + 2 for some integer £, 3x = 4(3£ + 2) - 2 = 12£ + 6 and x = 4£ + 2. S02 = 4Z+2.

(d) The quotient set is {4Z, 4Z + 1, 4Z + 2, 4Z + 3}.

10. (a) Reflexive: For any a E Z, a '" a because 3a + 4a = 7a and a is an integer.

Symmetric: If a, b E Z and a '" b, then 3a + 4b = 7n for some integer n. Then 3b + 4a = (7a + 7b) - (3a + 4b) = 7a + 7b - 7n = 7(a + b - n) and a + b - n is an integer. Thus b '" a. Transitive: Suppose a, b, c E Z with a '" b and b '" c. Then 3a + 4b = 7n and 3b + 4c = 7m for some integers nand m. Then 7n + 7m = (3a + 4b) + (3b + 4c) = (3a + 4c) + 7b, so 3a + 4c = 7n + 7m - 7b = 7(n + m - b) and n + m - b is an integer. Thus a '" c.

(b) 0 = {x E Z I x '" O} = {x E Z I 3x = 7n for some integer n}. Now if 3x = 7n, n must be a multiple of 3. So 3x = 21k for some k E Z and x = 7k. We conclude that 0 = 7Z.

11. (a) [BB] Reflexive: If a E Z <, {O}, then aa = a2 > 0, so a '" a.

Symmetric: If a '" b, then ab > O. So ba > 0 and b '" a.

Transitive: If a '" b and b '" c, then ab > 0 and be > O. Also b2 > 0 since b i' O. Hence,

_ (ac)b2 _ (ab)(bc) 0

ac - b2 - b2 >

since ab > 0, be > O. Hence, a '" c.

(b) [BB] 5 = {x E Z" {O} I x rv 5} = {x 15x > O} = {x I x > O}

-5 = {x E Z" {O} I x'" -5} = {x I -5x > O} = {x I x < O}

(c) [BB] This equivalence relation partitions Z <, {O} into the positive and the negative integers.

12. (a) [BB] Reflexive: For any a E Z, a2 - a2 = 0 is divisible by 3, so a'" a.

Symmetric: If a '" b, then a2 - b2 is divisible by 3, so b2 - a2 is divisible by 3, so b '" a. Transitive: If a '" b and b '" c, then a2 - b2 is divisible by 3 and b2 - c2 is divisible by 3, so a2 - c2 = (a2 - b2) + (b2 - c2) is divisible by 3.

(b) 0 {xEZlx",O}

{x E Z I x2 is divisible by 3}

{x E Z I x is divisible by 3} = 3Z

I {xEZlx",l}

{x I x2 - 1 is divisible by 3}

{x I (x -l)(x + 1) is divisible by 3} {x I x-lor x + 1 is divisible by 3} 3Z+ 1 U3Z+2

(c) This equivalence relation partitions the integers into the two disjoint sets 3Z and ( 3Z + 1 ) U ( 3Z + 2 ).

Section 2.4

43

13. (a) [BB] Yes, this is an equivalence relation.

Reflexive: Note that if a is any triangle, a f'V a because a is congruent to itself.

Symmetric: Assume a f'V b. Then a and b are congruent. Therefore, b and a are congruent, so b f'V a.

Transitive: If a f'V b and b f'V c, then a and b are congruent and band c are congruent, so a and c are congruent. Thus, a f'V c.

(b) Yes, this is an equivalence relation.

Reflexive: If a is a circle, then a f'V a because a has the same center as itself.

Symmetric: Assume a f'V b. Then a and b have the same center. Thus, b and a have the same center, so b f'V a.

Transitive: Assume a f'V b and b f'V c. Then a and b have the same center and band c have the same center, so a and c have the same center. Thus, a f'V c.

(c) Yes, this is an equivalence relation.

Reflexive: If a is a line, then a is parallel to itself, so a f'V a.

Symmetric: If a f'V b, then a is parallel to b. Thus, b is parallel to a. Hence, b f'V a.

Transitive: If a f'V b and b f'V c, then a is parallel to b and b is parallel to c, so a is parallel to c.

Thus, a f'V c.

(d) No, this is not an equivalence relation. The reflexive property does not hold because no line is perpendicular to itself. Neither is this relation transitive; if £1 is perpendicular to £2 and £2 is perpendicular to £3, then £1 and £3 are parallel, not perpendicular to one another.

14. (a) [BB] n = {(I, 1), (1,2), (2, 1), (2, 2), (3, 3), (3,4), (3,5), (4,4), (4,5), (5,5), (4,3), (5,3), (5,4)}

(b) n = {«(I, 1), (2, 2), (3, 3), (3,4), (4, 3), (4,4), (5, 5)}

(c) n = {(I, 1), (1,2), (1, 3), (1,4), (1,5), (2, 1), (2,2), (2,3), (2,4), (2,5), (3, 1), (3,2), (3,3), (3,4), (3,5), (4, 1), (4, 2), (4,3), (4,4), (4,5), (5, 1), (5,2), (5,3), (5,4), (5, 5)}

15. (a) As suggested in the text, we list the partitions of {a}. There is only one; namely, {a}.

(b) As suggested in the text, we list the partitions of {a, b}. There are two; namely, {a, b} and {a}, {b}.

(c) [BB] As suggested in the text, a good way to list the equivalence relations on {a, b, c} is to list the partitions of this set. Here they are:

{ {a}, {b}, {c} };

{{a,b,c}};

{{a,b},{c} };{ {a,c},{b} };{ {b,c},{a}}

There are five in all.

(d) As suggested in the text, we list the partitions of {a, b, c, d}.

{ {a}, {b}, {c}, {d} } { {a, b, c, d} }

{{a,b},{c,d}}; {{a,c},{b,d}}; {{a,d},{b,c}}

{ {a, b}, {c}, {d} }; { {a, c}, {b}, {d} }; { {a,d}, {b}, {c} }; { {b, c}, {a}, {d} }; {{b,d},{a},{c}}; {{c,d},{a},{b}}

{{a,b,c},{d}}; {{a,b,d},{c}}; {{a,c,d},{b}}; {{b,c,d},{a}} There are 15 in all.

44 Solutions to Exercises

16. (a) [BB] The given statement is an implication which concludes "x - y = x - y," whereas what is required is a logical argument which concludes "so rv is reflexive."

A correct argument is this: For any (x,y) E R2, X - Y = x - y; thus, (x, y) rv (x, y). Therefore, rv is reflexive.

(b) There is confusion between the elements of a binary relation on a set A (which are ordered pairs) and the elements of A which are themselves ordered pairs in this situation. The given statement is correct provided each of x and y is understood to be an ordered pair of real numbers, and we understand R = {(x, y) I x rv y} but this is very misleading. Much better is to state symmetry like this:

if(x,y) rv (u,v), then (u,v) rv (x,y).

(c) The first statement asserts the implication "x - y = u - v ---+ (x, y) rv (u, v)" which is the converse of what should have been said. Here is the correct argument:

If (x, y) rv (u, v), then x - y = u - v, sou - v = x - y and, hence, (u, v) rv (x, y).

(d) This suggested answer is utterly confusing. Logical arguments consist of a sequence of implications but here it is not clear where these implications start. Certainly the first sentence is not an implication.

If (x,y) rv (u,v) and (u,v) rv (w,z) then x - y = u - v and u - v = w - z. So x - y = w - z and, hence, (x, y) rv (w, z).

(e) rv defines an equivalence relation on R2 because it is a reflexive, symmetric and transitive binary relation on R2.

(f) The equivalence class of (0, 0) is

{(x,y) I (x,y) rv (O,O)} = {(x,y) I x - y = ° - O} = {(x,y) I y = x}

which is a straight line of slope 1 in the Cartesian plane passing through the origin. The equivalence class of (2, 3) is

{(x,y) I (x,y) rv (2,3)} = {(x,y) I x - y = 2 - 3 = -I} = {(x,y) I y = x + I}

which is a straight line of slope 1 passing through the point (2,3).

17. [BB] Reflexive: If (x, y) E R2, then x2 - y2 = x2 - y2, so (x, y) rv (x, y).

Symmetric: If (x, y) rv (u, v), then x2 - y2 = u2 - v2, so u2 - v2 = x2 - y2 and (u, v) rv (x, y). Transitive: If (x, y) rv (u, v) and (u, v) rv (w, z), then x2 - y2 = u2 - v2 and u2 - v2 = w2 - z2, so x2 - y2 = u2 - v2 = w2 - z2; x2 - y2 = w2 - z2 and (x, y) rv (w, z).

(0,0) = {(x,y) I (x,y) rv (O,O)} = {(x,y) I x2 - y2 = 02 - 02 = O} = {(x,y) I y = ±x}

Thus, the equivalence class of (0,0) is the pair of lines with equations y = x, y = -x.

(1,0) = {(x, y) I (x, y) rv (1,0)} = {(x, y) I x2 - y2 = 12 - 02 = I}.

Thus, the equivalence class of (1,0) is the hyperbola whose equation is x2 - y2 = 1.

18. (a) This is an equivalence relation.

Reflexive: If (a, b) E R2, then a + 2b = a + 2b, so (a, b) rv (a, b).

Symmetric: If (a, b) rv (c, d), then a + 2b = c + 2d, so c + 2d = a + 2b and (c, d) rv (a, b).

Section 2.4

45

Transitive: If (a, b) rv (c, d) and (c, d) rv (e, J), then a + 2b = c + 2d and c + 2d = e + 2/, so a + 2b = e + 2/ and (a, b) rv (e, I).

The quotient set is the set of equivalence classes. We have

(a, b) = {(x,y) I (x,y) rv (a,b)} = {(x,y) I x+2y = a+2b} = {(x, y) I y - b = -!(x - a)}

which describes the line through (a, b) with slope -!. The quotient set is the set of lines with slope -!.

(b) This is an equivalence relation.

Reflexive: If (a, b) E R2, then ab = ab, so (a, b) rv (a, b).

Symmetric: If (a, b) rv (c, d), then ab = cd so cd = ab and (c, d) rv (a, b).

Transitive: If (a, b) rv (c, d) and (c, d) rv (e, I), then ab = cd and cd = e], so ab = cd = e], ab = e] and (a, b) rv (e, I).

The quotient set is the set of equivalence classes. We have

(a,b) = {(x,y) I (x,y) rv (a,b)} = {(x,y) I xy = ab}

and consider two cases. If either a = 0 or b = 0, then (a, b) = {(x, y) I xy = O}; that is, { (x, y) I x = 0 or y = O}. Hence, (a, b) is the union of the z-axis and the y-axis. On the other hand, if a =I- 0 and b =I- 0, then

-- ab

(a, b) = {(x,y) I xy = ab} = {(x,y) I y = -}

x

since x =I- 0 in this case. This time, (a, b) is the hyperbola whose equation is y = ob]»,

(c) This is not an equivalence relation. We have (0,2) rv (1,1) because 02 + 2 = 2 = 1 + 12; however, (1,1) rf (0,2) because 12 + 1 = 2 =I- 4 = 0 + 22. The relation is not symmetric.

(d) Reflexive: For any (a, b) E R2, a = a, so (a, b) rv (a, b).

Symmetric: If (a, b) rv (c, d), then a = c, so c = a and, hence, (c, d) rv (a, b).

Transitive: If (a, b) rv (c, d) and (c, d) rv (e, I), then a = c and c = e; hence, a = e and so (a,b) rv (e,l).

Since the relation is reflexive, symmetric and transitive, it is an equivalence relation. The quotient set is the set of equivalence classes. The equivalence class of (a, b) is

{(x,Y)E R21 (x,y) rv (a,b)) = {(x,y) E R21 x = a}.

Geometrically, this set is the vertical line with equation x = a. The quotient set is the set of vertical lines.

(e) This is not an equivalence relation. For example, it is not reflexive: (1,2) rf (1,2) because 1(2) = 2 =I- 1 = 12.

19. (a) "If a n b = 0, then a =I- b."

(b) The converse is true. If a n b = 0, then a E a but a tJ. I; so a =I- b.

20. Remembering that x is just the set of elements equivalent to x, we are given that a rv b, c rv d and d rv b. By Proposition 2.4.3, a = b, c = d and d = b. Thus a = b = d = c.

46

Solutions to Exercises

21. (a) [BB] The ordered pairs defined by rv are (1,1), (1,4), (1,9), (2,2), (2,8), (3,3), (4,1), (4,4), (4,9), (5,5), (6,6), (7,7), (8,2), (8,8), (9,1), (9,4), (9,9).

(b) [BB] I = {1, 4, 9} = 4 = 9;2 = {2, 8} = 8;"3 = {3}; 5 = {5}; 6 = {6}; '7 = {7}.

(c) [BB] Since the sets {1, 4, 9}, {2, 8}, {3}, {5}, {6} and {7} partition A, they determine an equivalence relation, namely, that equivalence relation in which a rv b if and only if a and b belong to the same one of these sets. This is the given relation.

22. [BB] Reflexive: If a E A, then a2 is a perfect square, so a rv a.

Symmetric: If a rv b, then ab is a perfect square. Since ba = ab, ba is also a perfect square, so b rv a. Transitive: If a rv band b rv e, then ab and be are each perfect squares. Thus ab = x2 and be = y2

x2y2 (xy)2

for integers x and y. Now ab2e = x2y2, so ae = ~ = b . Because ae is an integer, so also

x: is an integer. Therefore, a rv e.

23. (a) The order pairs of rv are (1,1), (2,2), (3,3), (4,4), (5,5), (6,6), (7,7), (1,2), (2,1), (1,4), (4,1), (2,4), (4,2), (3,6), (6,3).

(b) 1= {1, 2, 4} = 2 = 4; "3 = {3, 6} = 6; 5 = {5}; '7 = {7}.

(c) The sets {1, 2, 4}, {3, 6}, {5}, {7} partition A, so the given relation is an equivalence relation.

24. Reflexive: If a E A, then ~ = 1 = 2° is a power of 2, so a rv a. a

Symmetric: If a rv b, then ~b = 2t, so ~ = 2-t. Since -t is an integer, ~ is also a power of 2, so

a a

b rv a.

Transitive: If a rv b and b rv e, then ~b = 2t and ~ = 28 for integers t and s. Thus ~ = ~b ~ = 2t+8,

e e e

showing that a rv e.

25. We have to prove that the given sets are disjoint and have union S. For the latter, we note that since n is reflexive, for any a E S, (a, a) E n and so a and a are elements of the same set Si; that is, a E Si for some i. To prove that the sets are disjoint, suppose there is some x E Sk n St. Since Sk rz. Uj# Sj, there exists y E Sk such that y ¢: Sj for any j i- k. Similarly, there exists zESt such that z ¢: Sj if j i- f. Now if y, x E Sk, then (y, x) E n and x, z E Se implies (x, z) En. By transitivity, (y, z) E R: hence, y and z belong to the same set. But the only set to which y belongs is Sk. Since z does not belong to Sk, we have a contradiction: No x E Sk n Se exists.

Exercises 2.5

1. (a) [BB] This defines a partial order.

Reflexive: For any a E R, a 2:: a.

Antisymmetric: If a, b E R, a 2:: b and b 2:: a, then a = b. Transitive: If a, b, e E R, a 2:: band b 2:: e, then a 2:: e.

This partial order is a total order because for any a, b E R, either a 2:: b or b 2:: a.

(b) [BB] This is not a partial order because the relation is not reflexive; for example, 1 < 1 is not true.

Section 2.5

47

(c) This is not a partial order because the relation is not antisymmetric; for example, -3 ~ 3 because (-3)2 :::; 32 and 3 ~ -3 because 32 s (-3)2 but -3 I- 3.

(d) This is not a partial order because the relation is not antisymmetric; for example, (1, 4) ~ (1,8) because 1 :::; 1 and similarly, (1, 8) ~ (1,4), but (1,4) I- (1,8).

(e) This is a partial order.

Reflexive: For any (a, b) E N x N, (a, b) ~ (a, b) because a:::; a and b 2: b.

Antisymmetric: If (a, b), (e, d) E N x N, (a, b) ~ (e, d) and (e, d) ~ (a, b), then a :::; c, b 2: d, c:::; a and d 2: b. So a = c, b = d and, hence, (a, b) = (e, d).

Transitive: If (a, b), (c, d), (e, I) E N x N, (a, b) ~ (c, d) and (e, d) ~ (e, I), then a:::; e, b 2: d, c :::; e and d 2: f. So a :::; e (because a :::; c :::; e) and b 2: f (because b 2: d 2: f) and, therefore, (a, b) ~ (e, I).

This is not a total order; for example, (1,4) and (2,5) are incomparable.

(f) This is reflexive and transitive but not antisymmetric and, hence, not a partial order. For example, cat ~ dog and dog ~ cat but dog I- cat.

2. (a) [BB] 1, 10, 100, 1000, 1001, 101, 1010, 11, 110, 111 (b) 1,11,111,110,10,101,1010,100,1001,1000

3. (a) [BB] (a, b), (a, c), (a, d), (b, c), (b, d), (e, d); (b) [BB] (a, b), (c, d);

(c) (a, b), (a,d), (c,d); (d) (a,b), (a, c), (a, d);

(e) (a, d), (a, e), (b, e), (b, c), (b, I), (c, I), (d, e);

(f) (a, I), (b, c), (d, b), (d, c), (d, h), (d, i), (e, c), (e, i), (g, I), (h, i).

4. (a) [BB] a is minimal and minimum; d is maximal and maximum.

(b) [BB] a and e are minimal; band d are maximal; there are no minimum nor maximum elements. (c) a and e are minimal; band d are maximal; there are no minimum nor maximum elements.

(d) a is minimal and minimum; b, e and d and maximal; there is no maximum element.

(e) a and b are minimal; e and f and maximal; there are no minimum nor maximum elements.

(f) a, d, e and g are minimal; c, f and i are maximal; there are no minimum nor maximum elements.

5. (a) 6 (b) {a,b, c, d}

5

4 {a,b,c}

3 {a, b} {a,e} {e,d}

2

1 {a} 6. (a) 1 is minimal and minimum; 6 is maximal and maximum. (b) {a} and {e, d} are minimal; there is no minimum.

The set {a, b, c, d} is maximal and maximum.

7. [BB] A ~ B and the set B contains exactly one more element than A.

48

Solutions to Exercises

8. Helmut Hasse (1898-1979) was one of the more important mathematicians of the twentieth century.

He grew up in Berlin and was a member of Germany's navy during the first World War. He received his PhD from the University of Gottingen in 1921 for a thesis in number theory, which was to be the subject of his life's work. He is known for his research with Richard Brauer and Emmy Noether on simple algebras, his proof of the Riemann Hypothesis (one of today's most famous open problems) for zeta functions on elliptic curves, and his work on the arithmetical properties of abelian number fields. Hasse's career started at Kiel and continued at Halle and Marburg. When the Nazis came to power in 1933, all Jewish mathematicians, including eighteen at the University of Gottingen, were summarily dismissed from their jobs. It is hard to know the degree of ambivalence Hasse may have had when he received an offer of employment at Gottingen around this time, but he accepted the position. While some of Hasse's closest research collaborators were Jewish, he nonetheless made no secret of his support for Hitler's policies. In 1945, he was dismissed by the British, lost his right to teach and eventually moved to Berlin. In May 1949, he was appointed professor at the Humboldt University in East Berlin but he moved to Hamburg the next year and worked there until his retirement in 1966.

9. (a) [BB] Let (A,:::5) be a finite poset and let a E A. If a is not maximal, there is an element al such that al )- a. If al is not maximal, there is an element a2 such that a2 )- al. Continue. Since A is finite, eventually this process must stop, and it stops at a maximal element. A similar argument shows that (A, :::5) must also contain minimal elements.

(b) The result of (a) is not true in general. For example, (R,:::;) is a poset without maximal elements and without minimal elements.

10. (a) Reflexive: For any a = (al, a2) E A, a:::; a because al :::; al and al + a2 :::; al + a2.

Antisymmetric: If a = (al, a2) and b = (bl, b2) are in A with a :::5 b and b :::5 a, then al :::; bi, al + a2 :::; bi + b2, and bi :::; al. bl + bz :::; al + a2. Since al :::; bl and bl :::; aI, we have al = bi- Since al + a2 :::; bi + bz and al = bl. we have a2 :::; b2. Similarly, b2 :::; a2, so a2 = bz- Thus a = b.

Transitive: If a = (al,a2), b = (bl,b2) and c = (CI,C2) are elements of A with a :::5 band b :::5 c, then al :::; bl. al + a2 :::; bi + b2, and also bi :::; ci. bi + bz :::; CI + C2. Since al :::; bi and bl :::; CI. we have ci :::; CI. Since al + a2 :::; bl + bz and bl + bz :::; CI + C2, we have al + a2 :::; CI + C2, so a :::5 c.

This partial order is not a total order: for example, a = (0, 0) and b = ( -1, - 2) are not comparable.

(b) Let A = Z" and for a = (aI, a2, ... , an) and b = (bl, b2, ... , bn) in A, define a :::5 b if and only if al :::; bl, al + a2 :::; bl + b2, al + a2 + a3 :::; bi + b2 + b3, al + a2 + a3 + a4 :::; bl + b2 + b3 + b4, ... , al + a2 + ... + an :::; b: + b2 + ... + bn. Then :::5 is a partial order on A.

11. (a) [BB] Suppose that a and b are two maximum elements in a poset (A, :::5). Then a :::5 b because b is maximum and b :::5 a because a is maximum, so a = b by antisymmetry.

(b) Suppose that a and b are two minimum elements in a poset (A, :::5). Then a :::5 b because a is minimum and b :::5 a because b is minimum, so a = b by anti symmetry.

12. (a) [BB] Assuming it exists, the greatest lower bound G of A and B has two properties: (1) G c;;_ A, G c;;_ B;

(2) if C c;;_ A and C c;;_ B, then C c;;_ G.

We must prove that A n B has these properties. Note first that A n B c;;_ A and A n B c;;_ B, so An B satisfies (1). Also, if C c;;_ A and C c;;_ B, then C c;;_ An B, so A n B satisfies (2) and AnB = AAB.

Section 2.5

49

(b) Assuming it exists, the least upper bound of A and B has two properties: (1) A ~ L, B ~ L;

(2) if A ~ C and B ~ C, then L ~ C.

We must prove that Au B has these properties. Since A ~ Au B and B ~ Au B, Au B satisfies (1). Also, if A ~ C and B ~ C, then A U B ~ C, so A U B satisfies (2) and A U B = A VB.

13. (a) [BB] a V b = b and here is why. We are given a ~ b and have b ~ b by reflexivity. Thus b is an upper bound for a and b. It is least because if c is any other upper bound, then a ~ c, b ~ c; in particular, b ~ c.

(b) a 1\ b = a and here is why. We are given a ~ b and have a ~ a by reflexivity. Thus a is a lower bound for a and b. It is greatest because if c is any other lower bound, then c ~ a, c ~ b; in particular, c ~ a.

14. (a) [BB] Suppose x and y are each glbs of two elements a and b. Then x ~ a, x ~ b implies x ~ y because y is a greatest lower bound, and y ~a, y ~ b implies y ~ x because x is greatest. So, by antisymmetry, x = y.

(b) Suppose x and yare each lubs of two elements a and b. Then a ~ x, b ~ x implies y ~ x because y is a least upper bound, and a ~ y, b ~ y implies x ~ y because x is least. So, by antisymmetry, x=y.

15. (a) In a totally ordered set, every two elements are comparable. So given a and b, either a ~ b or b ~ a; hence, the elements max( a, b) and min( a, b) always exist. In a poset which is not totally ordered, they don't necessarily, however. In the two element poset {a}, {b} with the relation ~, for example, max( {a}, {b }) does not exist because there is no element in the po set containing both {a} and {b}. (Similarly, min({a}, {b}) does not exist.)

(b) To prove that a totally ordered set (A, ~) is a lattice we must prove that every pair of elements has a glb and lub. We claim that glb(a, b) = min(a, b) and lub(a, b) = max(a, b).

We show that glb(a, b) = min(a, b). (The argument to show that lub(a, b) = max(a, b) is very similar.) Let m = min(a, b). (Note that m = a or m = b). Certainly we have m ~ a and m ~ b so m is a lower bound. Also, if for some element c we have c ~ a and c ~ b, then c ~ m if m = a, and c ~ m if m = b. In either case, we have c ~ m, so glb( a, b) is min( a, b) as required.

16. (a) [BB] (P(S), ~) is not totally ordered provided lSI 2: 2 (since {a} and {b} are not comparable if a =I=- b). But 0 is a minimum because 0 is a subset of any set and the set S itself is a maximum because any of its subsets is contained in it.

(b) (Z,:S:) or (R,:S:) are obvious examples.

17. Suppose a is maximal in a totally ordered set (A,~) and let b be any other element of A. Since A is totally ordered, either a ~ b or b ~ a. In the first case, a = b because a is maximal so in either case, b ~ a. Thus, a is a maximum.

18. (a) [BB] We have to prove that if b ~ a, then b = a. So suppose b ~ a. Since a is minimum, we have also a ~ b. By antisymmetry, b = a.

(b) Let b be a minimal element. We claim b = a. To see why, note that a minimum implies a ~ b.

Then minimality of b says a = b.

50

Solutions to Review Exercises

Chapter 2 Review

1. Since A = {I, 2, 3, 4, 5, 6} and B = {3, 4,5,6, 7}, we have A EB B = {I, 2, 7} and (A EB B) <, C = {I,7}.

2. (a) A = {-I, 0, 1, 2}, B = {-5, -3, -1, I}, C = {-~, -~, 0, ±I, ±2, ±~, ±D;

(b) An B = {±I}, so (A n B) x B = {(I, -5), (1, -3), (1, -1), (1, 1), (-1, -5), (-1, -3), (-1, -1), (-1, I)};

(c) B" C = {-5, -3};

3. (a) True. (----+) Suppose An B = A and let a E A. Then a E An B, so a E B. Thus A ~ B.

( f--) Suppose A ~ B. To prove A n B = A, we prove each of the two sets, A n B and A, is a subset of the other. Let x E An B. By definition of n, x is in both A and B, in particular, x E A. Thus A n B ~ A. Conversely, let x E A. Since A ~ B, x E B. Since x is in both A and B, x E An B. Thus A ~ An B.

(b) This is false. If A = 0, (A n B) U C = C while A n (B U C) = 0, so any C i- 0, any B, and A = 0 provides a counterexample.

(c) False. Take A = B = 0.

4. Let bE B and let a be any element of A. Then (a, b) E A x B, so (a, b) E A x C. Thus b E C. This shows tht B ~ C and a similar argument shows C ~ B, so B = C.

5. (a) Region 2: (A n C) "B Region 3: An B n C Region 4: (A n B) <, C

Region 5: (B n C) <, A Region 6: B <, (A U C) Region 7: C <, (A U B)

(b) Region 2,3,4,5,7 is (A n B) U C; region 2, 3, 4 is A n (B U C)

(c) B" (C" A) consists of regions 3, 4, and 6. (B" C) "A consists of region 6.

C

6. (a)

A

B

(b) i. (A U B) n C = {2, 3, 8, 9} ii. A" (B <, C) = {2, 3, 7, 9} iii. A EB B = {2, 6, 7, 8, 9}

iv. (A" B) x (B n C) = {(2, 3), (2,8), (7, 3), (7,8), (9,3), (9, 8)}

7. P(A) = {0, A}, so P(P(A)) = {0, {0}, {A}, {0, A}}.

8. (a) Take A = B = C = {3}. Then B "C = 0 so A EB (B "C) = A.On the other hand, A EB B = 0 so (A EB B) <, C = 0 i- A.

(b) Let (a, b) E A x B. Then a E A and s « B. Since a E A and A ~ C, a E C. Since s e Band B ~ D, bED. So (a, b) E C x D. Hence A x B ~ C x D.

9. Take B = C = 0, A = {I} = D. Then A x B = 0 = C x D, so A x B ~ C x D. On the other hand, A g; C.

Chapter 2

51

10. This follows quickly from one of the laws of De Morgan and the identity X <, Y = X n YC.

using (3), p. 62 at the spot marked with the arrow.

11. (a) A binary relation on A is a subset of Ax A.

(b) If A has 10 elements, A x A has 100 elements, so there are 2100 binary relations on A.

12. Reflexive: For any a with lal ~ 1, we have a2 = la21 = lallal ~ [c], thus (a, a) E R.

Symmetric by definition.

Not antisymmetric because (!,~) is in R ((!)2 ~ ~ and (~)2 ~ !) but! i= ~.

Not transitive. We have (!,~) E R because (!)2 ~ ~ and (~)2 ~ ! and (~,~) E R because ( ~ ) 2 s ~ and (~) 2 ~ !, but ("2' ~) is not in R because ( ! ) 2 1: ~.

13. (a) Reflexive: For any natural number a, we have a ~ 2a, so a rv a.

Not symmetric: 2 rv 5 because 2 ~ 2(5), but 5 rf 2 because 5 1: 2(2).

Not antisymmetric: Let a = 1 and b = 2. Then a rv b because 1 ~ 2(2) and also b rv a because 2 ~ 2(1).

Not transitive: Let a = 3, b = 2, c = 1. Then a rv b because 3 ~ 2(2) and b rv c because 2 ~ 2(1). However, a rf c because 31: 2(1).

Since the relation is not transitive, it is not an equivalence relation and it is not a partial order.

(b) Not reflexive: (1,2) rf (1,2) because 1 ~ 2 and 2 1: 1.

Not symmetric: (1,2) rv (4,3) because 1 ~ 2 and 3 s 4, but (4,3) rf (1,2) because 4 1: 3.

Not antisymmetric: (1,1) rv (2,2) because 1 ~ 1 and 2 ~ 2, and (2,2) rv (1,1) for the same reason, but (1,1) i= (2,2).

Transitive: if (a, b) rv (c, d) and (c, d) rv (e, j), then a ~ b, d ~ c, c ~ d and f ~ e, so a ~ b and f ~ e which implies ( a, b) rv (e, f).

This is not an equivalence relation because it's not reflexive (or symmetric). This is not a partial order because it's not reflexive (or antisymmetric).

14. We must determine whether or not a < band b < a implies a = b. Since the hypothesis is always false, this implication is true. The relation is antisymmetric.

15. Reflexive: For any a E Z, 4a + a = 5a is a multiple of 5.

Symmetric: If aRb, then 4a + b is a multiple of 5, so 4b + a = 5( a + b) - (4a + b) is also a multiple of 5, that is, bRa.

Transitive: If aRb and bRc, then both 4a + b and 4b + c are multiples of 5, hence so is their sum, 4a + 5b + c. It follows that (4a + 5b + c) - 5b = 4a + c is also a multiple of 5, so aRc.

16. (a) Reflexive: For any a E Z, aRa because 2a + 5a = 7a is a multiple of 7.

Symmetric: If a, s « Z and aRb, then 2a + 5b = 7k for some integer k, so 5a + 2b = 7(a + b)(2a + 5b) is the difference of multiples of 7, hence also a multiple of 7. Thus bRa.

Transitive: If a, b, c E Z with aRb and bRc, then 2a + 5b = 7k for some integer k and 2b + 5c = 7£ for some integer £. Thus (2a + 5b) + (2b + 5c) = 2a + 7b + 5c = 7(k + £) and 2a + 5c = 7(k + £) - 7b is the difference of multiples of 7, hence a multiple of 7. Thus aRc.

52

Solutions to Review Exercises

(b) We have OR7 and 7RO, yet 0 #- 7. The relation is not anti symmetric, so it is not a partial order.

17. (~) Assume x rv a. Let t E x. Then t rv x so t rv a by transitivity. Thus tEa. This proves x ~ a.

Similarly, a ~ x, so X = a.

( +-- ) Assume x = a. Since x E x, by symmetry, x E a. Thus x rv a.

18. Since a E b, a rv b and hence a = b by Proposition 2.4.3. Similarly dEb implies d = b, hence a = d.

Now d tj. c implies d #- z, so end = 0 by Proposition 2.4.4. Since a = d, so also a n c = 0.

19. (a) We must show that ::S is reflexive, antisymmetric and transitive on A. The relation is reflexive: For any (a, b) E A, (a, b) rv (a, b) because a::::; a and b ::::; b.

It is antisymmetric: If (a, b), (c,d) E A, with (a, b) rv (c,d) and (c,d) rv (a, b), then a ::::; c, d ::::; b, c ::::; a and b ::::; d. So a = c, b = d, hence, (a, b) = (c, d).

It is transitive: If (a, b), (c, d), (e, f) E A with (a, b) rv (c, d) and (c, d) rv (e, f), then a ::::; c, d ::::; b, c ::::; e and f ::::; d. So a ::::; e (because a ::::; c ::::; e) and f ::::; b (because f ::::; d ::::; b), so (a,b) rv (e,f).

(b) (A,::s) is not totally ordered since, for example, (1,4) and (2,5) are not comparable: (1,4) rf (2,5) because 5 1:. 4 and (2,5) rf (1,4) because 2 1:. 1.

20. (a) Reflexive: For any pEA, P rv P since p = p.

Symmetric: If p rv q then either p = q (so q == p) or the line through p and q passes through the origin (in which case the line through q and p passes through the origin). Thus q rv p.

Transitive: Suppose p rv q and q rv r. If the points p, q, r are different, then the line through p and q passes through the origin, as does the line through q and r. Since the line through the origin and q is unique, p and r lie on this line, p rv r. If p = r, then p rv r. If p = q #- r, then the line through q and r passes through the origin, so the line through p and r passes through the origin; thus p rv r. The remaining case, p #- q = r is similar.

(b) The equivalence class of a point p is the line through the origin and p. The equivalence classes are lines through the origin.

21. Reflexive: For any A E P(Z), A ~ A.

Antisymmetric: If A, B ~ P(Z) with A ~ Band B ~ A, then A = B. Transitive: If A, B, C ~ P(Z) with A ~ B, B ~ C, then A ~ C.

22. (a) Reflexive: For any a E A, ~ = 1 is an integer, so a ::S a.

a

Antisymmetric: If a ::S band b ::S a, then both ~ and ~ are (necessarily positive) integers. The only positive integer whose reciprocal is also an integer is 1, so a = b.

Transitive: If a ::S b and b ::S c, then ~ and -bc are both integers. Thus ~ -bc = :: is an integer. So

a a a

a ::S c. 8 (b) 4

6 2 1

(d) (A,::s) is not totally ordered; for example, 4 and 6 are not comparable.

(c) 1 is minimal and minimum; 6 and 8 are maximal. There is no maximum element.

Section 3.1

53

23. Two elements of a poset can have at most one least upper bound and here's why. Let £1, £2 each be least upper bounds for elements a and b. Then £1 is an upper bound for a and b, so £2 :5 i1 because i2 is least. Interchanging i1. i2 in the preceding statement gives i1 :5 i2. So i1 = i2 by antisymmetry.

Exercises 3.1

1. (a) [BB] Not a function; f contains two different pairs of the form (3, -).

(b) Not a function with domain {I, 2, 3, 4}. There's no pair of the form (3, -). (c) [BB] This is a function.

(d) Certainly not a function. There is more than one pair of the form (1, -): In fact, there are four! (e) This is a function.

2. (a) [BB] This is not a function unless each student at the University of Calgary has just one professor, for if student a is taking courses from professors b1 and oz. the given set contains (a, b1) and (a,b2).

(b) Assuming that each student currently registered at the University of Calgary is taking at least one course, then this is a function.

(c) Assuming some student a has no classes on Friday afternoon, then this will not be a function since the set would contain no pair of the form (a, - ).

3. [BB] A x B is a function A - B if and only if B contains exactly one element.

To see why, first note that if B = {b}, then A x B = {( a, b) I a E A} is certainly a function. Conversely, if A x B is a function but B contains two elements bb bz, then for any a E A, (a, b1) and (a, b2) are both in A x B, so A x B is not a function.

4. (a) [BB] the function defined by fen) = 2n, for example.

(b) the function defined by f(l) = 1 and for n > 1, fen) = n - 1, for example. (c) the constant function fen) = 107 for all n, for example.

(d) the identify function, LN, for example: L(n) = n, for all n.

5. (a) [BB] If x E X, then x is a country in the British Commonwealth with a uniquely determined Prime Minister y who lives in that country; that is, y E Y.

If y E Y, then y is a person living in one of the countries in the British Commonwealth. Thus, the domicile of y is a uniquely determined element x E X.

(b) If Xl =1= X2 are two different countries, then their Prime Ministers are different individuals, so Prime Minister is one-to-one. On the other hand, Prime Minister is not onto since there are people in a country who are not the Prime Minister.

(c) If x E X, then x is a country. If y is any person living in that country, then Domicile: y f---f x, so Domicile is onto. On the other hand, if Y1 and Y2 are different people living in country z, then Domicile: Y1 f---f X and Domicile: Y2 f---f x, so Domicile is not one-to-one.

6. [BB] Parking rates, bus fares, admission prices are several common examples.

54

Solutions to Exercises

7. (a) Jumps in the graph of y = L 2x - 3 J occur whenever 2x - 3 is an integer, that is, at {~ I n E Z}. (b) Jumps in the graph ofy = r!x+7J occur whenever !x+ 7 is an integer, that is, at {4n I n E Z}. (c) Jumps in the graph of y = L ~ J occur whenever i(x + 3) is an integer, that is, at {x I x = 5n - 3,n E Z}.

8. (a) [BB] The answer is "yes." By definition of "floor", we know that kx is the unique integer satisfying n - 1 < kx ~ n. Thus ~ - i < x ~ ~. Since ~ - 1 ~ ~ - i, we have ~ - 1 < x ~ ~.

Thus x = L~J. .

(b) The multiples of 3 in the indicated interval are 3,6,9, ... ,3k, where 3k = L 50000 J. Thus k = L 50~OO J = 16666.

9. [BB] We know that Lx J is an integer less than or equal to x and that Ly J is an integer less than or equal to y. Thus Lx J + Ly J is an integer less than or equal to x + y. Since Lx + y J is the greatest such integer, we get the desired result.

10. We know that r x 1 is an integer greater than or equal to x and that r y 1 is an integer greater than or equal to y. Thus r x 1 + r y 1 is an integer greater than or equal to x + y. Since r x + y 1 is the smallest such integer, we get the desired result.

11. [z J is the unique integer which satisfies x -1 < L z] ~ x. This implies (x + n) - 1 < [z J + n ~ x + n.

But there is exactly one integer a in the range (x + n) - 1 < a ~ x + n and that is Lx + n J. This gives the result.

12. We have f(l) = 2(1) - 5 = -3,f(2) =22 + 1 = 5, f(3) = 1, f(4) = 17, f(5) = 5, and so, as a subset of S x Z, f = {(I, -3), (2,5),(3,1.), (4,17), (5, 5)}.

No, f is not 1-1 because f(2) = f(5) but 2 =I 5 (equivalently, (2,5) and (5,5) are both in j).

13. (a) [BB] add is not one-to-one since, for.example, add(l, 1) = addro, 2) while (1,1) =I (0,2). It is onto, however, because, for any y E R, the equation y = add(x) has the solution x = (y,O).

(b) mult is not one-to-one since, for example, mult(I,4) = mult(2,2) while (1,4) =I (2,2). It is onto, though, since for any y E R, the equation y = mUlt(x) has the solution x = (y, 1).

14. (a) [BB] 9 is not one-to-one since, for example, g(l) = g( -1) = 2. Neither is 9 onto: For any x E Z, Ixl2: 0, so Ixl + 1 2: 1. Thus, for example, 0 ¢.rngg.

(b) [BB] 9 is not one-to-one as in (a). Thistime itis onto, however, because for n E N, the equation n = g(x) has the solution x = n - 1. (Note thatn > 0 for n E N, so In - 11 = n - 1.)

15. (a) [BB] If f(XI) = f(X2), then 3XI + 5 = 3X2 + 5, so Xl = X2 which proves that f is one-to-one.

Also f is onto, since given y E Q, y =f(hy - 5)) with ~(y - 5) E Q.

(b) This function is one-to-one, as in (a), but it is not onto because fen) = 3n + 5 > 8 for any n E N and so, for example, 1 is not in the range of f.

16. (a) h is not one-to-one since, for example, ,h(l) =3 = h( -1) and 1 ¥ -1.

h is not onto since 1 ¢. rng h: 1 E Z, but if we try to solve x2 + 2 = 1, we obtain x2 = -1 which has no solutions in Z.

(b) h is one-to-one since if h(XI) = h(X2), then x~ + 2 = x~ + 2, so x~ = x~ and Xl = ±X2. Since Xl and X2 are both in N, we must have Xl = X2.

h is not onto; as in (a), 1 is not in the range of h.

Section 3.1

55

17. (a) The function is not onto since, for example, g(x) = 0 has no integer solutions (by the quadratic formula), but it is one-to-one. To see why, suppose g(Xl) = g(X2). Then 3x~ + 14xl - 51 = 3x~ + 14x2 - 51, so 3(Xl - X2)(Xl + X2) = 14(x2 - Xl). Thus Xl = X2 or Xl + X2 = -Ii· Since Xl and X2 are integers, Xl + X2 = - 134 is impossible. Thus, Xl = X2, so 9 is one-to-one.

(b) Since the graph of 9 is a parabola, 9 is neither one-to-one nor onto.

18. (a) [BB] Note that I(x) = (x + 7)2 - 100. If I(xt} = I(X2) it follows that (Xl + 7)2 - 100 = (X2 + 7)2 - 100, so (Xl + 7)2 = (X2 + 7)2 and, taking square roots, IXI + 71 = IX2 + 71. Since Xl,X2 E N, we know Xl + 7> 0 and z-, + 7> O. Thus, Xl + 7 = X2 + 7 and Xl = X2. Thus, 1 is one-to-one, but it is not onto: For example, 1 E B, but there is no X E N with I(x) = 1 since (x + 7)2 - 100 = 1 implies (x + 7)2 = 101 and this equation has no solution in the natural numbers.

(b) This function is not one-to-one since, for example, 1(0) = 1(-14) (= -51) and it is not onto, as in (a).

(c) This function is not one-to-one; as in (b), 1(0) = I( -14). But it is onto since for any y 2: -100, X = v'100 + y - 7 is a solution to y = I(x).

19. (a) [BB] The domain of 1 is R. Its range is also R because every y E R can be written y = I(x) for some X; namely, X = yl/3. The function is, therefore, onto. It is also one-to-one: If I(Xl) = I(X2), then xi = x~ and this implies Xl = X2.

(b) The domain of 9 is R and so is the range. For the latter, note that

{ x2 ifx>O

g(x)= _X2 ifx<O

so that if y 2: 0, then y = g( y'Y) while if y < 0, y = g( -FY). Since rng 9 = R, 9 is onto. To see that 9 is 1-1, either inspect the graph or assume g(Xl) = g(X2) and consider the cases.

Case 1: Both Xl and X2 are nonnegative.

In this case, x~ = x~, so vxr = ~; hence, IXll = IX21 and Xl = X2.

Case 2: Both Xl and X2 are negative.

In this case, -x~ = -x~, so x~ = x~, /Xi = ~, IXll = IX21, -Xl = -X2 and Xl = X2·

Case 3: One of Xl, X2 is nonnegative and the other is negative.

Here we may assume that Xl is nonnegative, so X~ = -x~. Since the left side is at least 0 and the right side is less than 0, the equation cannot be true.

In all cases Xl = X2, so 9 is 1-1.

(c) The domain of f3 is (~, 00) as given. Its range is R because for any y E R, y = f3(x) for X = !(2Y + 4). Since rngf3 = R, f3 is onto. It is also one-to-one: If f3(Xl) = f3(X2), then 21og2(3xl-4) = 21og2(3x2-4), so 3Xl - 4 = 3X2 - 4 and Xl = X2.

(d) The domain of 1 is R as given. To find the range, we must remember that 2t > 0 for all t and thus, I(x) > 3 for all x. In fact rng 1 = (3,00) since, for any y > 3, y = I(x) for X = 1 + log2(y - 3). Since rng 1 =f. R, 1 is not onto. It is one-to-one, however, for if 1 (Xl) = 1 (X2), then 2X1 -1 + 3 = 2x2-l + 3, so 2X1-l = 2x2-l. Taking log2 of each side, Xl - 1 = X2 - 1, so Xl = X2.

56 Solutions to Exercises

(b) [BB] Solution 1. Since f: R ~ R is one-to-one by part (a), it is also one-to-one as a function with domain Z. Here, however, f is not onto for we note that f(O) = 0, f(l) = 4 and f is increasing, so 1 is not in the range of f.

Solution 2. (This solution mimics that given in Problem 8 in our discussion of discrete functions in this section.)

If f(xt} = f(X2), then 3X~+XI = 3X~+X2' so 3(x~-x~) = X2-XI and 3(XI -X2)(X~+XIX2+X~) = X2 - Xl· If Xl oj X2, we must have x~ + XIX2 + x~ = -k, which is impossible for integers XI,X2. Thus, Xl = X2 and f is one-to-one.

X

20. (a) [BB] The graph of f shown at the right makes it clear that f is one-to-one and onto.

On the other hand, f is not onto. In particular, 1 is not in the range of f since 1 = f (a) for some a implies 3a3 + a = 1; that is, a(3a2 + 1) = 1. But the only pairs of integers whose product is 1 are the pairs 1,1 and -1, -1. So here, we'd have to have a = 3a2 + 1 = lor a = 3a2 + 1 = -1, neither of which is possible.

(b) Since g(O) = g(l), 9 is not one-to-one. Furthermore, 9 is not onto; for example, 2 = g(x) has no integer solution since 2 = x3 - X + 1 implies X (X2 - 1) = 1 (for an integer x), so X = x2 - 1 = lor X = X2 - 1 = -1, neither of which is possible.

(c) The argument given in (b) applies to this case as well, so 9 is not onto. To determine whether or not 9 is one-to-one, suppose g(XI) = g(X2)' Then x~ - Xl + 1 = x~ - X2 + 1, so (Xl - X2)(X~ + XIX2 + x~) = Xl - X2. If Xl oj X2, we must have x~ + XIX2 + x~ = 1. For natural numbers Xl, X2, this is not possible because x~ + XIX2 + x~ ~ 3. Thus, Xl = X2 and 9 is one-to-one.

X

21. (a) The graph of 9 shown at the right makes it clear that 9 is onto but not one-to-one.

22. (a) [BB] This is not one-to-one since, for example, f(l, 3) = f(4, 1) = 11 while (1,3) oj (4,1).

The function is not onto since, for example, the equation f (x) = 1 has no solution X = (n, m) (because 2n + 3m ~ 5 for every n, mEN).

(b) [BB] This is not one-to-one since, for example, f(l, 3) = f(4, 1) = 11 while (1,3) oj (4,1). The function is onto, however, since for k E Z, the equation k = f (x) has the solution X = (- k, k).

(c) This is not one-to-one since, for example, f(12, 1) = f(l, 8) (= 190) but (12, 1) oj (1,8). It's not onto because fen, m) is even for any (n, m) so, for example, the equation fen, m) = 1 cannot be solved.

(d) This is not one-to-one since, for example, f(246,0) = f(0,89). It's onto since (-17)(246) + 47(89) = 1 implies that for any k E Z, k = (-17k)(246) + (47k)(89) = f(47k, -17k).

(e) This is not one-to-one because, for example, f(7, 8) = f(8, 7). It's not onto because, for example, the equation f(x) = 4 has no solution X = (n, m): n2 + m2 + 1 oj 4 for n, mE Z.

(0 This is not one-to-one because, for example, f(2, 2) = f(3, 2) (= 2). It is onto, however, because 1 = f(l, 2) and, for n ~ 2, we have n = fen - 1,1).

Section 3.1

57

23. (~) Suppose f is one-to-one and Xl =1= X2. We must prove that xi + XIX2 + x~ + a(xI + X2) + b =1= O.

Since f is one-to-one and Xl =1= X2, we know that f(XI) =1= f(X2); thus, x~ + axi + bXI + c =1= x~ + ax~ + bX2 + c; equivalently,

(x~ - x~) + a(xr - x~) + b(XI - X2) =1= O.

Since Xl - X2 =1= 0, we may divide this last inequality by Xl - X2. Since x~ - x~ = (Xl - x2)(xi + XIX2 + x~) and xi - x~ = (Xl - X2)(XI + X2), we obtain (xi + XIX2 + x~) + a(xI + X2) + b =1= 0 as required.

(~) Suppose that Xl =1= X2 implies xi + XIX2 + x~ + a(xI + X2) + b =1= O. We must prove that f is one-to-one. Thus, we assume f(XI) = f(X2) and prove Xl = X2. The equation f(XI) = f(X2) says x~ + axi + bx; + c = x~ + ax~ + bX2 + c; or, equivalently, as before,

(x~ - x~) + a(xr - x~) + b(XI - X2) = o.

If Xl =1= X2, then we divide by Xl - X2 as before, obtaining xi + XIX2 + x~ + a(xI + X2) + b = 0, a contradiction. Thus Xl = X2.

24. (a) [BB] We require X =1= 3, so we take A = {x E R I X =1= 3}. Then rng f = {y I y =1= O} because if y =1= 0, y = f(x) for X = 3 + t E dom j',

(b) We require 1- X> 0, so we take A = {x E R I X < I}. Then rngf = {y I y > O} because for any y > 0, y = f(x) for X = 1- ~ E domf.

y .

25. (a) The function is not one-to-one because (a, a) and (d, a) are both in f, but a =1= d. Restricting the domain to {a, b, c}, for instance, we obtain the one-to-one function {(a, a), (b, {3), (c, ')')}.

(b) [BB] Note that f(x) = -(2x - 3)2. This function is not one-to-one since, for example, f(l) = f(2) (= -1). Restrict the domain to {x I X 2': 3/2} (or to {x I X ~ n).

(c) The sine function is not one-to-one since, for example, sin 0 = sin 71". The largest interval on which a one-to-one function can be defined has length 71"; for example, {x I -71" /2 ~ X ~ 71" /2} is an interval on which sine is one-to-one.

26. (a) Reflexive: If f E A, then f(5) = f(5), so f N f.

Symmetric: If f '" g, then f(5) = g(5), so g(5) = f(5) and hence, 9 '" i.

Transitive: If f '" 9 and 9 '" h, then f(5) = g(5) and g(5) = h(5), so f(5) = g(5) = h(5) and f '" h.

(b) ] = {g: S ~ S I g(5) = f(5) = a}. Since there are three possible images for each of g(a) and g(b), there are altogether 9 functions in]; namely,

h = {(5,a), (a,5), (b,5)} h = {(5,a),(a,5),(b,a)} h = {(5,a), (a,5), (b,b)} f4 = {(5,a), (a,a), (b,5)} f5 = {(5,a),(a,a),(b,a)} f6 = {(5,a), (a,a), (b,b)} h = {(5,a), (a, b), (b,5)} fs = {(5,a),(a,b),(b,a)} f9 = {(5,a),(a,b),(b,b)}

27. (a) Reflexive: If a E A, then a r- a because f(a) = f(a).

Symmetric: If a, bE A and a r- b, then f(a) = f(b), so f(b) = f(a); hence, b '" a.

Transitive: If a, b, c E A, a r- band b '" c, then f(a) = f(b) and f(b) = f(c), so f(a) = f(c), implying a '" c.

58

Solutions to Exercises

(b) 0 = {x E R I f(x) = f(O) = O} = [0,1); 7/5 = [1,2) since L7/5J = 1; -3/4 = [-1,0) since L -3/4J = -1.

(c) I = {1};"2 = {2, 3, 6}; 4 = {4}; 5 = {5}.

28. (a) [BB] Here are the functions X -+ Y:

{(a, 1), (b, In {(a, 1), (b, 2n {(a, 1), (b, 3)} {(a,2), (b, I)} {(a,2),(b,2)} {(a,2),(b,3)} {(a,3),(b,ln {(a,3),(b,2)} {(a, 3), (b,3)}.

Here are the functions Y -+ X:

{(I, a), (2, a), (3, an {(I, a), (2, a), (3, bn {(I, a), (2, b), (3, an {(I, a), (2, b), (3, b)} {(1,b),(2,a),(3,a)} {(1,b),(2,a),(3,b)} {(l,b), (2,b), (3,a)} {(1,b),(2,b),(3,b)}.

(b) [BB] There are no one-to-one functions Y -+ X. The one-to-one functions from X -+ Y are

{(a, 1), (b, 2n {(a, 1), (b, 3n {(a, 2), (b, I)} {(a, 2), (b, 3n {(a, 3), (b, In {(a, 3), (b, 2)}.

(c) [BB] There are no onto functions X -+ Y. The onto functions Y -+ X are

{(I, a), (2, a), (3, b)} {(I, a), (2, b), (3, a)} {(I, a), (2, b), (3, b)} {(I, b), (2, a), (3, a)} {(l,b), (2,a), (3,b)} {(I, b), (2,b), (3, a)}.

29. (a) There are no one-to-one functions Y -+ X. Here are the 24 one-to-one functions X -+ Y.

{(a,1),(b,2),(e,3)} {(a,1),(b,2),(e,4)} {(a, 1), (b,3), (e,2)} {(a, 1), (b, 3), (e, 4n {(a, 1), (b, 4), (e, 2n {(a, 1), (b, 4), (e, 3)} {(a, 2), (b, 3), (e, In {(a, 2), (b, 3), (e, 4n {(a, 2), (b, 4), (e, I)} {(a, 2), (b, 4), (e, 3n {(a, 2), (b, 1), (e, 3)} {(a, 2), (b, 1), (e, 4)} {(a, 3), (b, 1), (e, 2n {(a, 3), (b, 1), (e, 4)} {(a, 4), (b, 1), (e, 2)} {(a, 4), (b, 1), (e, 3)} {(a, 3), (b, 2), (e, I)} {(a, 3), (b, 2), (e, 4)} {(a, 4), (b, 2), (e, In {(a, 4), (b, 2), (e, 3)} {(a, 3), (b, 4), (e, I)} {(a, 3), (b, 4), (e, 2n {(a, 4), (b, 3), (e, In {(a, 4), (b, 3), (e, 2)}

(b) There are no onto functions X -+ Y. Here are the 36 onto functions Y -+ X.

{(I, a), (2, a), (3, b), (4, en {(I, a), (2, a), (3, e), (4, b)} {(I, b), (2, b), (3, a), (4, en {(1,b),(2,b),(3,e),(4,a)} {(1,e),(2,e), (3,a), (4, b)} {(1,e),(2,e),(3,b),(4,a)} {(I, a), (2, b), (3, a), (4, e)} {(I, a), (2, e), (3, a), (4, b)} {(I, b), (2, a), (3, b), (4, e)} {(I, b), (2, e), (3, b), (4, a)} {(I, e), (2, a), (3, e), (4, b)} {(I, e), (2, b), (3, e), (4, an {(1,a),(2,b),(3,e),(4,a)} {(1,a),(2,e),(3,b),(4,a)} {(1,b),(2,a),(3,e),(4,b)} {(I, b), (2, e), (3, a), (4, b)} {(I, e), (2, a), (3, b), (4, e)} {(I, e), (2, b), (3, a), (4, en {(I, b), (2, a), (3, a), (4, e)} {(I, e), (2, a), (3, a), (4, b)} {(I, a), (2, b), (3, b), (4, en {(1,e),(2,b),(3,b),(4,a)} {(1,a),(2,e),(3,e),(4,b)} {(1,b),(2,e),(3,e),(4,a)} {(I, b), (2, a), (3, e), (4, a)} {(I, e), (2, a), (3, b), (4, a)} {(I, a), (2, b), (3, e), (4, b)} {(I, e), (2,b), (3,a), (4,b)} {(l,a), (2,e), (3,b), (4,e)} {(l,b), (2,e), (3,a), (4, en {(1,b),(2,e),(3,a),(4,a)} {(1,e),(2,b),(3,a),(4,a)} {(1,a),(2,e),(3,b),(4,b)} {(I, e), (2, a), (3, b), (4, b)} {(I, a), (2, b), (3, e), (4, en {(I, b), (2, a), (3, e), (4, en

Section 3.2

59

n

m

1 2 3 4

1 1 2 3 4

2 1 4 9 16

3 1 8 27 64

4 1 16 81 256 We guess that the number of functions X ---+ Y is ii'",

30. [BB]

31. (a) Let A = {at. a2, ... , an}.

If f: A ---+ B were one-to-one, then f(al), f(a2), ... , f(an) would be n different elements in B contradicting the fact that Bhas only m < n elements.

(b) Let B = {bl, b2, ... , bm}. If f: A -+. B were onto, then there would exist elements aI, a2, ... , am in A such that f(ai) = bi, distinct by definition of "function." But this contradicts the fact that A has n < m elements.

32. (a) [BB (----+)] Suppose A and B each contain n.elements. Assume that f: A ---+ B is one-to-one and let C = {f(a) I a E A}. Since f(al) =f=. f(a2) if al =f=. a2, C is a subset of B containing n elements; so C = B. Therefore, f is onto.

Conversely, suppose f is onto. Then {f(a) I a E A} = B and so the set on the left here contains n distinct elements. Since A contains only n elements, we cannot have f (al) = f (a2) for distinct aI, a2; thus, f is one-to-one.

(b) f(a) = 2a for all a E N. 'This does not contradict (a) because N is not finite.

(c) f(l) = I, fen) = n - 1 for n ;::: 2. Again there is no contradiction since N is not finite.

33. (a) [BB]

5

(b) tBB] The domain of f is R. The range is the set of all real numbers of the form 2n + a, where n E Z and 0 ::; a < 1. To prove this algebraically, we first note that any y = 2n + a is f(x) for x = n + a. On the other hand, suppose y = f(x) for some x. Writing x = n + a, n = l x J ' 0 ::; a < I, then y = x + l x J = (n +a) + n = 2n + a as required.

/ ~/

4

/!

34. s is not one-to-one since, for example, s( t ).= s(I~) (= ~). Neither is s onto since, for any z, x - lx J is in the interval [0,1) = {x E RIO::; x < I}, so, for example, 1 =f=. sex) for any x.

Exercises 3.2

1. [BB]

(a) f-l = {(1,5),(2,1),(3,2),(4,3),(5,4)}

(b) f-l = {(I, 4), (2, 1), (3,3), (4, 2), (5, 5)}

2. [BB] Let y = f-l(X). Then x = fey) = _y2, so y2 = -x and y = ±Fx. Since y E domf, y ;::: 0, thus y = +Fx = f-l(x).

3. Let y = f-l(x). Then x = fey) = y2, so Y = ±y'x. Since y E domf, y ::; 0, so y = -y'x = f-l(x).

60

Solutions to Exercises

4. Lety = f-l(x). Then x = fey) = -..;y, so y = x2 = f-l(x).

5. Since g(x) is an integer, f 0 g(x) = g(x). Similarly, 9 0 f(x) = f(x).

6. (a) [BB] r '. R ----+ R is defined by f-i(x) = !(x - 5). (b) r+. R ----+ R is defined byj-l(X) =(x + 2)1/3.

(c) (3-1: R ----+ (t, 00) is given by (3-1 (x) = i-(2x.+ 4).

(d) g-l: R ----+ R is defined by g-l(x) = {~~

(a) y

-4

if x ~ 0 if x < O.

(b)

y

3

-2

-1

(c) y

6

-2

(d)

y

x

1 1 1 1

7. (a) [BB] If f(Xl) = f(X2), then 1 + --4 = 1 + --4' --4 = --4 and Xl - 4 = X2 - 4.

Xl - X2 - Xl - x2 -

Thus Xl = X2 and f is one-to-one. Next

Y E rng f H Y = f(x) for some X E A

H there is an X E.A such that y = 1 + __2_4 x-

.' 1

H there is an X E A such that y - 1 = X _ 4

H there is an X E A such that (y ~ l)(x - 4) = 1 Hy#-1.

Thus rng f = B = {y E R I y #- I} and f has an inverse B ----+ A. To find a formula for f-l(X),

1 1

let y = f-l(x), X E B. Then X = fey) = 1 + --4' so x-I = --4' (x - l)(y - 4) = 1

. y- y-

and, since x#- 1, y - 4 = _1_. andJ-l(x) = y = 4 + __2_1'

x-I· x-

l 1 1 1

(b) Suppose f(Xl) = f(X2). Then 5 - -1--. = 5 - --, so -1-- = -1--,1 + Xl = 1 + X2

. + Xl 1 + X2 + Xl + X2

Section 3.2

61

and Xl = X2. Thus f is one-to-one. Next

Y E rngf ~ y = f(x) for some x E A

~ there is an X E A such that y = 5 __ 1_ l+x

~ there is an X E A such that y - 5 = __ 1_ l+x

~ there is an x E A such that (y - 5)(1 + x) = -1

~ y i= 5.

Thus rng f = B = {y E R I y i= 5} and f has an inverse B ---+ A. To find a formula for f-l(x),

1 1

let y = f-l(x), x E B. Then x = f(y) = 5 - --, so x - 5 = ---, (x - 5)(1 + y) = -1

l+y l+y

and, since x i= 5, 1 + y = __ 1_ and f-l(x) = y = -1- _]_5'

x-5 x-

3XI 3X2

(c) Suppose f(XI) = f(X2). Then , so 6XIX2 + 3XI = 6XIX2 + 3X2 and

2XI + 1 2X2 + 1

Xl = X2. Thus f is one-to-one. Now

Y E rng f ~ y = f (x) for some x E A

~ there is an x E A such that y = 2x3: 1

~ there is an x E A such that 2xy + y = 3x ~ there is an x E A such that x(2y - 3) = -y

3 ~ y i= 2'

Thus rng f = B = {y E R I y i= ~} and f has an inverse B ---+ A. To find a formula for f-l(x), let y = f-l(x), x E B. Then x = f(y) = 2y3~ l' so 2xy + x = 3y and y(2x - 3) = -x. Since -x

x E B, we know 2x - 3 i= 0; thus, y = 2x _ 3 = f-l(x).

Xl - 3 X2 - 3

(d) Suppose f(XI) = f(X2). Then -- = --, so XIX2+3xI -3X2-9 = XIX2-3xI +3X2-9, Xl + 3 X2 + 3

6XI = 6X2 and Xl = X2. Thus f is one-to-one. Next

y E rng f ~ y = f (x) for some x E A

x-3 ~ there is an x E A such that y = --

x+3

~ there is an x E A such that y(x + 3) = x - 3

~ there is an x E A such that x - yx = 3y + 3

~ there is an x E A such that x(l - y) = 3(y + 1) ~yi=1.

Thus rngf = B = {y E R I y i= I} and f has an inverse B ---+ A. Let y = f-l(x) with x E B. Then x = f(y) = y - 3, so x(y + 3) = y - 3, xy + 3x = y - 3, y(l - x) = 3(x + 1). Since y+3

--'- 1 f-l( ) _ _ 3(1 + x)

x,, x -y- 1 .

-x

62

Solutions to Exercises

8. (a) First we show that f is one-to-one. Suppose then that f(X1) = f(X2). If Xl and X2 are both negative, then 21x11 = 21x21. Since Ixl = -x for x < 0, we have -2X1 = -2X2 and hence, Xl = X2. If Xl and X2 are both ;::: 0, we have 2X1 + 1 = 2X2 + I, so 2X1 = 2X2 and again, Xl = X2. Finally, we note that it is impossible for f(X1) = f(X2) with Xl < 0 and X2 ;::: 0 (or vice versa) since in this case, one of f(xd, f(X2) is an even integer while the other is odd.

Next we show that f is onto. Suppose that n E N. If n = 2k is even, then n = 21 - kl = f( -k) since - k < 0, while if n = 2k + 1 is odd, then n = f (k) since k ;::: O. Since f is one-to-one and onto, it has an inverse.

(b) Let f-1(2586) = a. We must solve the equation 2586 = f(a). Since 2586 is even, we see that 2586 = f(-2586/2) = f(-1293).

9. (a) [BB] maternal grandmother (d) mother-in-law

(g) you

(b) paternal grandmother (e) father

(h) maternal grandmother

(c) maternal grandfather (f) father-in-law

(i) maternal grandmother

10. (a) [BB] fog = {(I, 1), (3,8), (2, 1), (4,9), (5, I)};

go f is not defined because rng f = {I, 2, 3, 8, 9} C£_ domg = {I, 2, 3,4, 5}. f 0 f is not defined because rng f = {I, 2, 3, 8, 9} C£_ dom f = {I, 2, 3,4, 5}. gog = {(I, 2), (2,2), (3,2), (4, 1), (5, 2)}.

(b) f is one-to-one and onto;

9 is not one-to-one: It contains both (1,2) and (2, 2); 9 is not onto: 4 is not in the range of g.

(c) Since f is one-to-one and onto, it has an inverse: r:' = {(8, 1), (9,3), (3,4), (1,2), (2, 5)}. (d) Since 9 is not one-to-one (or since 9 is not onto), 9 does not have an inverse.

11. (a)[BB] g-10fog={(1,3),(2,1),(3,2),(4,4)}; (c) go f 0 g-l = {(I, 2), (2,4), (3, 3), (4, I)};

(e) r:' 0 g-l 0 fog = {(I, 1), (2,4), (3,2), (4, 3)}.

1 1· 1 1 + 2(x2 + 1) 2X2 + 3

12. [BB] go f(x) = (x + 2)2 + 1 x2 + 4x + 5; f og(x) = x2 + 1 +2 = x2 + 1 = x2 + 1 ;

hog 0 f(x) = 3; 9 0 h 0 f(x) = g(3) = 110•

(b) f 0 g-l 0 9 = f; (d) go g-l 0 f = f;

Since r: 0 f(x) = z, we have 9 0 r:' 0 f(x) = g(x) = ~.

X +2

Since f-1(X) = X - 2, we have

-1 ( ) _ -1 ( 1 ) _ 1 2 _ -2(x + 2)2 - 1

fog 0 f X - f (x + 2)2 + 1 - (x + 2)2 + 1 - - (x + 2)2 + 1 .

1 x+l ! 1

13. gof(x) = -x- = --; fog(x) = r- = --;

x+1 X x + 1 x + 1

1

hogof(x) = h(X + 1) = x + 1 +1 = 2x + 1; fogoh(x) = f(_I_) = IX+! = _1_.

x x x x + 1 x+1 + 1 x + 2

14. [BB](g 0 f)(x) = g(f(x)) = f(x) - c. Thus the graph of go f is the graph of f translated vertically c units down if c > 0 and -c units up if c < O. The graphs are identical if c = O.

Section 3.2

63

15. (f 0 g)(x) = f(g(x)) = f(x - c). Thus the graph of fog is the graph of f, but translated horizontally c units to the right if c > 0 and -c units to the left if c < O. The graphs are identical if c = o.

16. (a) [BB] Since -Ixl = {-x ~f x;::: 0 we have f 0 g(x) = f( -Ixl) = {f((-)X) ~f z > 0

x If x < 0 f x If x < O.

So the graph of fog is the same as the graph of f to the left of the y-axis (where x < 0) while to the right of the y-axis, the graph of fog is the reflection (mirror image) of the left half of the graph of f in the y-axis. We call fog an even function since it is symmetric with respect to the y-axis: f 0 g(-x) = f 0 g(x).

{- f(x) if f(x) ;::: 0

(b) Sincegof(x) = -If(x)1 = () . () the graph ofgof is the same as the graph

fx Iffx <0

of f wherever the graph of f is below the x-axis (y < 0) while it is the reflection (mirror image) of the graph of f in the x-axis wherever the graph of f is above the x-axis. (In particular, the graph of go f lies entirely on or below the x-axis.)

1

17. (a) f 0 g(x) = f(g(x)) = f(l~x) = 1- -1- = 1- (1- x) = ~(x).

I-x

1

go r(x) = g(r(x)) = g(x:'l) = 1 _ _£_ = (x:'j}-x = x~11 = 1 - x = s(x).

x-I

loll~ f 9 h r sl

~ ~ f 9 h r s

f f 9 c s h r

9 9 ~ f r s h

h h r s t. f 9

r r s h 9 ~ f

s s h r f 9 ~ inverse

**(b) All these functions have inverses.
**

18. (a) 0 ~ !I h h f4 f5

t. ~ !I h h f4 f5

h h ~ f4 f5 h h

h h f5 c !4 h !I

h h !4 f5 ~ !I h

f4 f4 h !I h f5 ~

f5 f5 h h !I ~ f4

(b) All these functions have inverses. function

inverse

function

19. (a) [BB] fog = {(I, 4), (2,3), (3,2), (4, 1), (5, 5)}; 9 0 f = {(I, 5), (2,3), (3,2), (4,4), (5, I)} Clearly, fog t- 9 0 f.

(b) f-1 = {(1,2),(2,1),(3,5),(4,3),(5,4)};g-1 = {(I,3),(2,4),(3,I),(4,5),(5,2)}

Functions f and 9 have inverses because they are one-to-one and onto while h does not have an inverse because it is not one-to-one (equally because it is not onto).

64

Solutions to Exercises

(c) (Jog)-1 = {(1,4),(2,3),(3,2),(4,1),(5,5)}

s:' 0 t:' = {(I, 4), (2,3), (3,2), (4, 1), (5, 5)} = (J 0 g)-I. r:' og-1 = {(1,5),(2,3),(3,2),(4,4),(5,1)} =I (Jog)-I.

2.:'1 2x 2x

20. (a) [BB] For x E B, (J 0 g)(x) = f(x'2_::l) = ~ _ 2 = 2x _ 2(x -1) = ""2 = x.

x-I

2(-L) (b) [BB] For x E A, (g 0 f)(x) = g(x:2) = ~-~ 1

x-2 Proposition 3.2.7, f and 9 are inverses.

2x 2x

x _ (x _ 2) = ""2 = x and so, by

21. (a) Suppose 0 E A and let a = f(O). Then 0 = f-l(a) = fta) which is not possible for any real number f(a).

(b) Since f and f4 each have domain A, we have only to prove that f4(a) = a for all a E A. Let then a be some element of A. Let al = f(a), a2 = f(al) = f2(a), a3 = f(a2) = j3(a) and a4 = f(a3) = f4(a). We must show that a4= a. From al = f(a), we have a = f-1(al) =

f(~I) and so a2 = f(al) = ~. From a3 = f(a2), we obtain a2 = f-1(a3) = f(~3) and so

a4 = f(a3) = ...!_ = _/1 = a as desired.

a2 1 a

22. (a) [BB] Suppose g(b1) = g(b2) for bb b2 E B. Since f is onto, b1 = f(al) and bz = f(a2) for some aba2 E A. Thus, g(J(al)) = g(J(a2)); that is, 9 0 f(al) = go f(a2). Since 9 0 f is one-to-one, al = a2. Therefore, b1 = f(al) = f(a2) = b2 proving that 9 is one-to-one.

(b) Given s e B, we must find a E A such that f(q,) = b. Consider g(b) E C. Since 9 0 f: A ~ Cis onto, there is some a E A with 9 0 f(a) = g(b); that is, g(J(a)) = g(b). But 9 one-to-one implies f(a) = b, so we have the desired element a.

23. (a) [BB] Suppose f: A ~ Band g: B ~ C are one-to-one. We prove that 9 0 f: A ~ C is one-toone. For this, suppose (g 0 f)(al) = (go f)(a2) for some ab a2 EA. Then g(J(ad) = g(f(a2)) [an equation of the form g(bI) = g(b2)]. Since 9 is one-to-one, we conclude that f(al) = f(a2), and then, since f is one-to-one, that al = a2.

(b) Let f = {(I, 1), (2, 2)} and 9 = {(-I, 5), (1,5), (2, 1O)}. Then 9 is not 1-1, but the composition go f = {(I, 5), (2, 1O)} is.

(c) Let f and 9 be functions, f: A ~ B, g: B ~ C and suppose 9 0 f: A ~ Cis 1-1. Then f must be 1-1 since f(aI) = f(a2) implies g(J(al)) = g(J(a2)), that is, 9 0 f(al) = go f(a2), from which we conclude that al = a2, because 9 0 f is 1-1.

24. (a) Suppose f: A ~ B and g: B ~ C are onto. We prove that 9 0 f: A ~ C is onto. Let then c E C. We must find a E A such that go f(a) = c; that is, g(J(a)) = c [an equation of the form g(b) = c]. Since 9 is onto, there is b E B such that g(b) = c. Also, since f is onto, we know there is a E A such that b = f(a). Thus, g(f(a)) = g(b) = c as desired.

(b) [BB] With A = {I, 2}, B = {-I, 1, 2}, C = {5, 1O}, f = {(I, 1), (2, 2)} and

9 = {(-I, 5), (1,5), (2, ioi], we have 9 0 f = {(I, 5), (2, 1O}. Then 9 0 f: A ~ C is onto but f is not.

(c) Suppose f: A ~ B, g: B ~ C and 9 0 f: A ~ C is onto. Then 9 must be onto because if c E C, there exists a E A with 9 0 f(a) = c (g 0 f is onto), so g(J(a)) = c. Thus, there exists b « B with g(b) = c (b = f(a».

Section 3.2

65

25. [BB] Since a bijective function is, by definition, a one-to-one onto function, we conclude, by the results of part (a) of the previous two exercises, that indeed the composition of bijective functions is bijective.

26. (a) 1(1000) = 998; 1(999) = 1(1(1003)) = 1(1001) = 999; 1(998) = 1(1(1002)) = 1(1000) =

998; 1(997) = 1(1(1001)) = 1(999) = 999.

(b) UT h I() {998 if n is even

we guess t at n =

999 if n is odd.

(c) We guess rug 1 = {998, 999}.

2 2

27. Suppose I(XI) = I(X2). Then ~ = ~, so ~ = ~,xix~ + 2xi = xix~ +

xi + 2 x~ + 2 Xl + 2 x2 + 2

2x~, 2xi = 2x2 and Xl = ±X2. Note that X2 = -Xl is not possible (unless Xl = X2 = 0) since

-Xl Xl .

I( -Xl) = ~ #- ~ = I(XI). Thus 1 IS one-to-one. Next we note that

YXI + 2 YXI + 2

X

Y E rug 1 ~ y = 1 (x) for some X E R ~ y = .JX2+2 for some X E R. x2+2

Now, if y = ~, then y2(x2 + 2) = x2, so x2(y2 - 1) = _2y2 and this implies that y2 #- 1

x2 + 2

(otherwise we have the equation 0 = 1) and also y2"'-1 :::; 0 because x2 ~ 0, - 2y2 :::; 0 and the product

of two nonnegative numbers is nonnegative. If y E rug I, then y2 - 1 < 0; that is, -1 < y < 1.

On the other hand, if -1 < y < 1, then y2 - 1 < 0, ~2y2 ~ 0, and so this element is x2 for

y -1

some X; hence y E rug f. This shows that rug 1 = B = (-1,1). To find a formula for I-I (x), let

y = I-I(x) for X E B. Then X = I(y) = y , so x2(y2 + 2) = y2 and y2(X2 - 1) = _2X2. y'y2+2

Since x2 - 1 #- 0, y2 = 2X2 2 and since the fraction on the right here is nonnegative, there are I-x

(apparently) two solutions y = ±g. The equation X = h' however, shows that X and y have the same sign. Thus

if x > 0

if X < O.

(b) [BB] Writing X = l=l + a, 0 :::; a < 1, we have t(x) = -2 -1 l X J - a. Now it is straightforward to see that t is one-to-

one: Suppose t(xt} = t(X2), where Xl = lXIJ + at. X2 =

lX2J +a2 and 0:::; aI, a2 < 1. Then lxd -al = lX2J -a2, ....

so l xd -l X2J = al -a2. The left side is an integer; hence, ""-

so is the right. Because of the restrictions on al and a2, the

only possibility is al = a2. Hence, also l xd = l X2J, so

Xl = X2.

28. (a) From the graph, we see immediately that t is one-to-one and onto, so t has an inverse.

-2

66

Solutions to Exercises

(c) To see that t is onto, let y E R. Then we have y = lyJ + b for 0 ~ b < 1. If b = 0, then t(y) = y.

Otherwise,O < 1 - b < 1. So, with x = lyJ + 1 + (1 - b), we have lxJ = lyJ + 1. Thus, t(x) = lxJ - (1 - b) = (lyJ + 1) - (1 - b) = lyJ + b = y. In any case, we have an x such that t(x) = y.

{X ifxEZ

(d) rl: R --t R is given by r1(x) = n + 1 + (1 _ b)'f b Z b

- I x=n+ ,nE ,0< <1

Exercises 3.3

1. [BB] Ask everyone to find a seat.

2. [BB] The two lists 12,22,32,42, ... and 1,2,3,4, ... obviously have the same length; a2 1--+ a is a one-to-one correspondence between the set of perfect squares and N.

3. (a) x~14,y~-3,{a,b,c}~t.

(b) The function f: 2Z -+ 17Z defined by f(2k) = 17k for 2k E 2Z.

(c) [BB] The function f: N x N -+ C defined by f(m, n) = m + ni for all m, n E N. (d) The function f: N -+ Q defined by f(n) = n/2.

4. f-1(z) = {2Z if z > 0

1- 2z if z s 0

5. (a) If g(ml' nl) = g(m2' n2), then (m., f(nl)) = (m2' f(n2)), so ml = m2 and f(n.) = f(n2).

Since f is one-to-one, nl = n2. Thus (m., nl) = (m2' n2), so g is one-to-one. To show that g is onto, let (a, b) E N x Z. Since f is onto, there exists n E N such that f(n) = b. Then g(a, n) = (a, f(n)) = (a, b), so g is onto.

(b) Let f: N -+ Z be any one-to-one onto function (for example, the function defined in Problem 29, of this section). By part (a), the function g: N x N -+ N x Z defined by g(m, n) = (m, f(n)) is a one-to-one correspondence N x N -+ N x Z.

6. [BB] This is false. For example, I N I = IN U {O} I, as shown in the text.

7. This is not a partial order because it is not antisymmetric. If a, b E 8 and a =f b, then {a} :::S {b} because I{ a}1 ~ l{b}1 and for the same reason, {b} :::S {a}; however {a} =f {b}.

8. [BB] In this case, either 8 = 0 or 181 = 1. This time, in each case, (8, :::S) is a partial order.

Case 1: If 8 = 0, then P(8) contains a single element, 0. Reflexive: Certainly A :::S A for all A E P(8) since 0 = 101 ~ 101.

Antisymmetric: If A :::S Band B :::S A, then A = B since there is only one set in P(8).

Transitive: If A :::S Band B :::S C, then A :::S C since necessarily A = B = C and for the single set A in P(8), A :::S A.

Case 2: If 8 contains one element, then P(8) = {0, 8} contains two elements. Reflexive: A :::S A for each A E P(8) because IAI ~ IAI.

Section 3.3

67

Antisymmetric: If A, B E P(S), A ~ Band B ~ A, then we have IAI :::; IBI and IBI :::; IAI, so IAI = IBI· Since P(S) does not contain different sets of the same cardinality, it follows that A = B.

Transitive: Suppose A ~ Band B ~ C. If A = 0, then IAI = 0 :::; ICI no matter what C is, so we'd have A ~ C. If A = S, then A ~ B means B = Sand B ~ C means C = S, so A = B = C = S and A ~ C.

9. f: A x B -t B x A defined by f (a, b) = (b, a) is a one-to-one onto function.

10. (a) [BB] False. Let X = {I}, Y = {2}, Z = {3}. Then ((1,2),3) E (X x Y) x Z but ((1,2),3) rt X x (Y x Z) (a set whose second coordinates are ordered pairs).

(b) [BB] Define f: (X x Y) x Z -t X X (Y X Z) by f((x, y), z) = (x, (y, z)).

11. (a) Reflexivity: For any set A, iA is a one-to-one onto function A -t A, so A has the same cardinality as itself.

Symmetry: If A and B have the same cardinality, then there is a one-to-one onto function f: A -t B. Such a function has an inverse r:' : B -t A which is one-to-one and onto (because it has an inverse), so B and A have the same cardinality.

Transitivity: Suppose A, B and C are sets such that A and B have the same cardinality and B and C have the same cardinality. Then there is a one-to-one onto function f: A -t B and a one-to-one onto function g: B -t C. Since the composition of one-to-one functions is one-to-one and the composition of onto functions is onto (Exercises 23 and 24 of Section 3.2), go f: A -t C is one-to-one and onto. Thus, A and C have the same cardinality.

(b) [BB] By Problem 27, (0,1) and (1,00) have the same cardinality and (0,1) and (3,00) have the same cardinality. By transitivity of "same cardinality", (1,00) and (3,00) have the same cardinality too.

(c) [BB] To find an explicit one-to-one onto function (1,00) -t (3,00), we use the function f defined by f(x) = ~ - 1 + 3 = ~ + 2 from (0,1) to (3,00) exhibited in Problem 27 and the function

x x

9 defined by 9 (x) = 1 = ~ from (1, 00) to (0, 1), which is the inverse of the function

x+1-1 x

exhibited in Problem 27-see line (3). The function we seek is the composition fog, which is

defined by f 0 g(x) = f(g(x)) = i + 2 = x + 2, a rather obvious choice!

x

(d) f(x)=x+b-a

12. (a) [BB] As suggested just before Problem 28, we look for a function defined with a rule like f(x) = kx + f and discover (the rather obvious) f(x) = x + 1.

(b) The function defined by f(x) = 2x + 4 is a one-to-one correspondence between (0, 1) and (4,6). (c) The function f: (0,1) -t (a, b) defined by f(x) = a + (b - a)x is a one-to-one correspondence, and the function g: (0,1) -t (c, d) given by g(x) = c + (d - c)x is also a one-to-one correspondence. Thus go f-1 provides a one-to-one correspondence (a, b) -t (c, d). The reader may check d-c

that go f-l(x) = C + -b -(x - a). -a

13. (a) [BB] Using the result of Problem 27, we obtain the function defined by g(x) one-to-one correspondence between (0,1) and (10,00).

1 -+9asa x

68

Solutions to Exercises

(b) [BB] The function f: (2,5) - (0,1) defined by f(x) = ix - ~ is a one-to-one correspondence, as is the function g: (0,1) _ (10,00) defined by g(x) = ~ + 9. Thus, the composition 9 0 x

f: (2,5) - (10,00) is also a one-to-one correspondence. Note that (g 0 f)(x) = x: 2 + 9.

(c) The function f: (a, b) - (0,1) defined by f(x) = xb - a is a one-to-one correspondence, as is -a

the function g: (0,1) - (c, 00) defined by g(x) = ~ - 1 + c. Thus a one-to-one correspondence x

(a, b) _ (c, 00) is the composition 9 0 f. Note that (g 0 f)(x) = b - a - 1 + c. x-a

14. In Problem 27, p. 129, we saw that the function g: (0, 1) - (0, 00) defined by g(x) = ~ - 1 is a x

one-to-one correspondence. Furthermore, the function f: (a, b) - (0, 1) defined by f (x) = xb - a is -a

a one-to-one correspondence. (See the remarks preceding Problem 28.) Thus 9 0 f: (a, b) - (0,00) b-a

is a one-to-one correspondence. Note that (g 0 f)(x) = -- - 1. x-a

15. [BB] f is certainly a function from R to R+ since 2x > ° for all x E R. If 2x = 2Y, then x log 2 = y log 2 (any base), so x = y. Thus, f is one-to-one. If r E R+, then 21og2 r = r, so f is onto. We conclude that R and R+ have the same cardinality.

16. [BB] Since (a, b) has the same cardinality as R+ by Exercise 14 and since R+ and R have the same cardinality by Exercise 15, the result follows by transitivity of the notion of "same cardinality"-see Exercise 11.

17. f is certainly defined on (0,1) and takes values in R. To show that f is one-to-one, assume f(XI) = f(X2); that is, assume

Xl - I X2 - I

__ ~~2~_ 2

XI(XI -1) - X2(X2 -1)·

Then X2(X2 -l)(XI - ~) = XI(XI -1)(x2 - ~), so

Therefore,

XIX2(X2 - Xl) - ~(X2 + XI)(X2 - Xl) + ~(X2 - Xl) = ° (X2 - XI)(2xIX2 - X2 - Xl + 1) = °

and so X2 = Xl or 2XIX2 - X2 - Xl + 1 = 0. The second possibility is the same as XIX2 + (Xl - 1)(x2 - 1) = ° and, since for ° < Xl. X2 < 1 both XIX2 and (Xl - 1)(x2 - 1) are nonnegative, this case is impossible. We conclude that Xl = X2; thus, f is one-to-one.

To show that f is onto, let r E R. We wish to find an X such that f(x) = r; that is, we wish to find an x-I

X such that x(x _21) = r. Hence, we wish to solve rx2 - (r + l)x + ~ = 0. If r = 0, the solution is

Section 3.3

69

x = !. If r =I=- 0, the quadratic formula tells us that this equation has solutions

r + 1 ± J(r + 1)2 - 2r r + 1 ± v'r2 + 1

x - - ---.;___--

- 2r - 2r .

We claim that the solution

r+1-JT2TI

x=

2r

is always in (0,1). First note that if r > 0, then r + 1 > v'r2 + 1 since (r + 1)2 > r2 + 1. On the other hand, if r < 0, then r + 1 < 1 < v'r2 + 1. In either case, we have shown that

r + 1- v'r2 + 1

2r > o.

To show that this expression is also less than 1, we will prove the equivalent inequality

1-r-JT2TI

2r < o.

If r > 0, then 1 - r < 1 < v'r2 + 1 giving the result. If r < 0, then 1 - r > v'r2 + 1 because (1 - r)2 > r2 + 1, again giving the result. Since f is one-to-one and onto, ·t is a one-to-one correspondence.

18. Start at (0,0) and move as illustrated.

•

r-r rr r r

---

1

1 1

•

•

•

•

•

•

19. (a) 2, -2,4, -4, 8, -8, 16, -16, ...

(b) 1=2°,2,!,4,~,8,~, .

(c) 1,4,7,10,13,16,19, .

(d) (1,1), (1,2), (1,3), (2, 1), (2,2), (3,3), (3, 1), (3,2), (3, 3), (4, 1), ...

• • • •

• • •

(e) [BB] Follow the procedure given in the text for all rational numbers and omit those with even denominators. The listing starts 1,2, k, 3, 4,~,!, 5, 6,~,~,~,~,~, 7, ....

(0 Follow the procedure given in the text for N x N but with two modifications. We include an extra row across the bottom as follows: (1,0) (2,0) (3,0) (4,0) . Then, when doing the listing, follow immediately every pair (a, b), b > 0, with the pair (a, -b). The first few terms would be (1,0), (2,0), (1,1), (1, -1), (1,2), (1, -2), (2,1), (2, -1), (3,0), (4,0), (3,1), (3, -1), (2,2), (2, -2), ....

(g) First of all, enumerate N U [O} x N U [O} by the diagonal procedure given in the text for N x N. The first few terms would be (0,0), (1,0), (0,1), (0,2), (1,1), (2,0), (3,0), (2,1), (1,2), (0,3). Then enumerate Z x Z by taking this list, replacing every element (a, 0), a > 0, with (a, 0), (-a, 0); every element (O,a), a > 0, with (O,a),(O,-a), and every pair (a, b), a,b > 0 with (a, b), (a, -b), (-a, b), (-a, -b).

70

Solutions to Exercises

20. (a) [BB] This set is uncountable. The function defined by f(x) = x-I gives a one-to-one correspondence between it and (0,1), which we showed in the text to be uncountable.

(b) This set is countably infinite. Just follow the sequence given in the text for the set of all positive rationals, but omit any rational number not in (1,2).

(c) This set is finite. In fact, it contains at most 992 elements since there are 99 possible numerators and, for each numerator, 99 possible denominators.

(d) This set is countably infinite. List the elements as follows (deleting any repetitions such as

5/100 - 1/20)· 99 99 99 98 98 98

- ·6'7'···' 104'6'7'···' 104'··· .

(e) [BB] This set is countably infinite. In Exercise 3(c) we showed it is in one-to-one correspondence with N x N.

(f) This set is countably infinite because it is in one-to-one correspondence with Q via the function f defined by f(a, b) = a.

(g) This set is uncountable. It is in one-to-one correspondence with [-1, 1] = {x I -1 :::; x :::; I} via the function f defined by f(a, b) = a. The interval [-1,1] contains (0,1) which we showed in the text to be uncountable.

21. (a) Finite! There is some minimum volume V which a grain of sand must occupy. On the other hand, there is a finite value M for the volume of all the sand. So the number of grains is :::; M /V.

(b) Countably infinite. Here is a listing: 30,31,3-1,32,3-2, ....

(c) The set of sentences in the English language is certainly not finite for if it were, and 8 were the sentence with the most words, then "8 and roses are red." would be a longer sentence. So we have to decide if the set of sentences is countably infinite or uncountable. In fact, it is countably infinite. To see this, first note that since there are only finitely many words (see part (c)) there are only finitely many sentences k words long for each k = 1,2, .... If ak,l, ak,2, ak,3, ... is a list of the sentences which are k words long (extended to a countably infinite list by defining all ak,i = "Jqrzx" after we run out of sentences), then the set of all sentences can be listed by the diagonal scheme that we used for N x N: al,I. a2,I. al,2, al,3, a2,2 ... , where we omit all occurrences of "Jqrzx,"

22. (a) [BB] Impossible. To the contrary, suppose that the union were a finite set 8. Since 8 has only finitely many subsets (the precise number is 2181), there could not have been infinitely many sets at the outset.

(b) Impossible. The maximum number of elements in the union of sets AI, ... , An occurs when each intersection Ai n Aj is empty. Thus, IA1 U A2 U··· U Ani:::; IA11 + IA21 + ... + IAnl, which is finite.

(c) [BB] Impossible. If even one infinite set is contained in a union, then the union must be infinite.

23. [BB] Imagine 81 sitting inside 82, both spheres with the same center. Rays emanating from this common point establish a one-to-one correspondence between the points on 81 and the points on 82.

24. (a) [BB] Let Sl, S2, S3, •.. be a countably infinite subset of 8. Define f: 8 ~ 8 U {x} by

f(sd = x

f(sk+d = Sk for k ?: 1

f(s)=s ifs~{Sl,S2,S3, .. ·}.

Then f is a one-to-one correspondence.

Section 3.3

71

(b) This follows immediately from part (a) since (0, 1] = (0,1) U {I}.

25. We employ a concept known as stereographic projection. Imagine the sphere sitting on the Cartesian plane with south pole at the origin. Any line from the north pole to the plane punctures the sphere at a unique point and the collection of such lines establishes a one-to-one correspondence between the points of the plane and the sphere except for the north pole. A small modification of this correspondence finishes the job. Suppose PO,Pl,P2, ... are the points of the sphere which correspond to the points (0,0), (1,0), (2,0), ... in the plane; thus, the line from the north pole to (n,O) punctures the sphere at Pn (in particular, Po = (0,0)). Map the north pole to (0,0), the origin to (1,0), PI to (2,0), and so forth and let all other points of the sphere go to the same points as before.

26. [BB] We are given that A = {aI, a2, ... ,an} for some n E N and that B = {bl, b2, b3, ... }. Then A U B is countably infinite because it is infinite and its elements can be listed as follows:

The function f: N ~ A U B corresponding to this listing is defined by f (i) = {ai bi-n

if i :::; n ifi > n.

27. (a) We will do this by exhibiting a one-to-one correspondence between A x B and N x N, which was shown in the text to be countable. Since A is countable, we can list its elements: aI, a2, a3, .... Since B is countable, we can list its elements: bl, b2, b3, . .. . Define f: A x B ~ N x N by f(ai,bj) = (i,j). If f(ai,bj) = f(ak, be), then (i,j) = (k,€) so i = k,j = € and (ai,bj) = (ak' be). Thus, f is one-to-one. Also, for any (m, n) E N x N, we have f(am, bn) = (m, n), so f is onto. Thus, f is a one-to-one correspondence.

(b) A polynomial of degree at most one with integer coefficients is an expression of the form a + bx, where a, b E Z. The function a + bx I--t (a, b) is a one-to-one correspondence between these polynomials and the set Z x Z, which is countable by Exercise 27(a). Thus the given set of polynomials is countable too.

28. We offer a proof by contradiction. If IXI = IP(X)I, then there is a one-to-one onto function f: X ~ P(X). Thus, for each x E X, f(x) is a subset of X. Define a subset Y of X as follows: for each x E X, put x E Y if and only if x rJ. f(x). Since f is onto, Y = f(y) for some y E X. Notice that if y E Y, then y E f(y), so y rJ. Y = f(y), by definition. On the other hand, if y rJ. f(y) = Y, then y E Y, again by definition. We reach the absurd situation that y is neither in or not in Y. It follows that there can exist no onto function f: X ~ P(X).

29. Assume, to the contrary, that S is countable and, as in Problem 31, write each of its elements in a list as

al = 0.a11aI2aI3aI4 .

a2 = 0.a21a22a23a24 .

a3 = 0.a31a32a33a34 .

{4 if aii = 3 where each ai is 3 or 4. Define the sequence bi, bz, b3, ... by b; = 3

if aii = 4.

Then b = 0.blb2b3 ... is in S, yet it is different from each ai because bi i= aii for each i. This contradiction gives the result.

72

Solutions to Review Exercises

30. Assume, to the contrary, that S is countable and that its elements can be listed al,a2,a3, .. " By moving this element to the start of the list; if necessary, we may assume that al = 0.01000 .. " Now the same argument as in Exercise 29 yields the result. (Note that the choice of al guarantees that b -I- 0.)

31. The Fields Medal is the highest honour which can be bestowed upon a mathematician, there being no Nobel Prize in mathematics. John Charles Fields (1863-1932) was born in Hamilton, Ontario, obtained a PhD from John Hopkins University in 1887 and served for over thirty years on the faculty of the University of Toronto. His will established the Fields Medal (under the name "International Medal for Outstanding Discoveries in Mathematics"), which was officially adopted at the International Congress of Mathematicians in ZUrich in 1932. One of the three Canadian mathematics institutes is also named after Fields. Michael Monastyrsky wrote an informative article on the history of the Fields Medal for the March 2001 Notes of the Canadian Mathematical Society 33, no. 2, pp. 3-5. More information can be also obtained from http.: l/www.math. toronto. edu/ fields. html.

Chapter 3 Review

1. This function is not one-to-one since, for example, 1(2,2) = 4 = 1(3,1), yet (2,2) -I- (3,1).

2. 1-1 = {(2, 1), (3, 2), (4, 3), (1, 4)}; 9 01= {(1, 1), (2,4), (3,2), (4, 3)}. The function 9 is not oneto-one since g(2) = g(5} = 1, but2 -I- 5.

3. This function is not one-to-one since /(1)= 1(-1) = 4, but1 -I- -1. Neither is it onto since, for instance, there is no m with I(m) = 0: I(m) = 0 ~ 31ml = -1.

4. Suppose I(xt} = I(X2). Then 2x~ + Xl =2x~ +X2, so 2(x~ - X~) = X2 - Xl. If Xl -I- X2, we may divide both sides by Xl - X2, obtaining 2(x~ + XlX2 + x~) = -1 which is impossible because the left side is even and the right side odd. Thus Xl = X2, so I is one-to-one.

This function is not onto because 1 is not in the range of I. To see why, suppose I(x) = 1 for some x. Then X(2X2 + 1) = 1 for some x. Over Z,· this implies that both X and 2X2 + 1 are 1 or both are -1. Since 2x2 + 1 > 0, X must be positive too, so X = 2X2 + 1 = 1. This is not true.

5. (a) i. Yes, I is one-to-one. If/(al) = !(a2),'then 3a12- 4 = 3a22- 4, so, (multiplying by 2) 3al - 4 = 3a2 - 4, hence al = a2.

ii. I is not onto since, for example, there is no even integer a which satisfies I(a) = O. iii. I is not bijective since it is not onto.

(b) i. Yes, I is one-to-one. If I(al) = l(a2), then 5 -32al = 5 -32a2, so, (multiplying by 3)

5 - 2al = 5 - 2a2. hence al = a2.

ii. I is onto because if b is any rational numb.er, we have b = I(a) with a = 5 ~ 3b.

". I' bii . . .. d I 1 () 5 - 3x

111. IS ijective since It IS one-to-one an onto: - X = -2--'

6. (a) The domain of I is R" H}. To find the range, suppose y is in the range. Then y = I(x) for some x. This leads to x(2y ..:.. 4) = y, an equation with a solution if and only if y -I- 2. The range of I is R" {2}.

Chapter 3

73

(b) 1-1 can be defined on the range of I,that is, R <, {2}.

(c) Let y = 1-1 (x), x =F 2~ Then x = I{y) = ~. This implies y(2x - 4) = x. Since x =F 2, 2y -1

x . x

we have y = --4' Thus 1-1 (x) = -2 4:

2x- x-

7. (a) The values are 7,5,3,1,2,4,6.

(b) Let n E N. We must show that n = I(a) for some integer a. If n is even, let a = ~n. If n is odd,

let a = -!(n - 1). .

8. A function I on a set A is a reflexive relation if and only if I = L is the identity on A. Certainly, the identity function is reflexive. Conversely, if lis reflexive, then for any a E A, (a, a) E f. Since (a, x), (a, y) E I imply x = y, it follows-that for any a E A, (a, x) E I if and only if x = a. Thus

I=~ ,

9. Lots offunctions R - R are symmetric, for example, the function defined by !(x) = -x.

10. The greatest integer function is one example. For any a, b, e E R, if b = La J and e = L b J, then e = b because b is an integer, so e = La J .

11. (a) This is false: x = -4, Y = 2 gives a counterexample since Ixl = 4 = y2, but ylyl = 4 =F x. (b) This is true. If x = ylyl,thenlxl = 11111111 = lyl2 = y2.

(c) This is false because the implication ~'. is false.

12. (a) If !(Xl) = !(X2), then aXl b = aX2 b' Cross-multiplication gives aXlX2 + abx« = aXlX2 +

Xl + X2+

abx2, so obx; = abx2. Since ab =F 0, Xl = X2. Therefore! is one-to-one.

(b) If I(x) = a, then aXb = a. Cross multiplication yields ax = ax + ab, so ab = 0, a contradicx+

tion. There is no x. The equation I(x) = a has no solution. If !(x) = b, then ax b = b implies x+

ax = bx + b2, so x( a - b) = b2. Since b =F 0, there is a solution if and only if a =F b.

(c) I is not onto since there isno x with l{x} = il.

13. The graph of y = I(x) is a parabolaopening up. with vertex (-2, -11). So we could take A = [-2,00) = {x E R I x ~ -2} andthenB,= [-'11,00) = {y E R I y ~ -11}.

14. Suppose g(bl) = g(b2). Since! is onto; there exist al and a2 in A such that bi = I(al) and b2 = l(a2). Thus g(f(al)) = g(f(a2)); that is, 9 0 !(al) = 9 0 !(a2). Since go! is one-to-one, we have al = a2. Thus bl = bz- So 9 is one-to-one.

15. (a) finite (b) uncountable (c) countably infinite

(d) countably infinite (e) finite . (f) finite

16. (a) Reflexive. We have (a, b) '" (a, b) because ab = ba.

Symmetric. If (a, b) '" (e, d),thenad = be, so eb = da. Hence (e, d) '" (a, b).

Transitive. If ( a, b) '" (e, d) and (e, d) '" (e, I), then ad = be and c] = de, so ad! = bel = bde. Thus d(al - be) = 0. Since d =F 0, this means a] = be, so (a, b) '" (e, I).

(b) Define I: Q - AI "'- Q by I (%) = (a, b). This function is well defined because if % = ~, then

-'----+ ----+

ad= be, so (a, b) '" (e,d) and (a,b) = (e,d), hence !(%) = I(fz). The function is one-to-one

because if !(%) = f(a), then (a, b) ::::;:(e, d), so (a, b) '" (e, d), ad = be and % = a. The function is onto because (a, b) = 1(%).

74

Solutions to Exercises

17. Let A = {at,a2, ... ,an} and B = {bl,b2, ... ,bm}. Since A n B = 0, ai i- bj for any i,j. Let C = {I, 2, ... , n + m}. If we can establish a one-to-one correspondence between Au Band C, then we will have IA UBI = ICI = n + m. Define f: Au B ~ C by f(al) = 1, f(a2) = 2, ... , f(an) = n, f(bl) = n + 1, f(b2) = n + 2, ... , f(bm) = n + m. Since f(x) = f(y) ~ x = y, f is one-to-one. Clearly f is onto, so it is a one-to-one correspondence.

18. The function f: (-2, 2) ~ (1,9) defined by f(x) = 2x + 5 is a bijection.

1 1

19. Define f: (1, 3) ~ R by f(x) = -_ - -2 and suppose f(Xl) = f(X2). x-I

1 1 1 1 1 1

Then -- - - = -- - -, so -- = --, Xl - 1 = X2 - 1 and Xl = X2· Therefore, f

Xl - 1 2 X2 - 1 2 Xl - 1 X2 - 1

. G· (0) I 2y + 3

IS one-to-one. iven y E ,00, et x = --.

2y+ 1

We leave it to the student to verify that f(x) = y. Also 1 < 2y + 3 <: 3. Finally, rng f = (0,00), so 2y+ 1

f is a one-to-one correspondence between (1,3) and (0,00).

20. (a) Assume to the contrary that 8 is countable. In that case, we can list the elements of 8 as at, a2, a3,·.· . Writing each of these using their decimal expansions, we have

al = 0.alla12a13a14 .

a2 = 0.a2l a22a23a24 .

a3 = 0.a3la32a33a34 .

where each aij is 0,2 or 7. For each i ;::: 1, define bi by bi = {2 ~f aii : 0 or 7 7 If aii - 2.

Now consider the number b = 0.blb2b3 .... Since each bi is 2 or 7, b is in 8. But for any i, we have b i- ai since b and ai differ in the ith decimal place. This contradicts 8 being countable.

(b) Note that if X belongs to 8', then x has a terminating decimal expansion (that is, all decimal places o after finitely many places). It follows that X belongs to Q, so 8' ~ Q. We conclude from the first remark at the end of Section 3.3 that 8' is countable. Since 8' contains the infinite sequence 0.2,0.02,0.002, ... , it must be countably infinite: 18'1 = No.

21. First assume 8 is finite with n elements Xl, X2, ... , xn. Then P(8) contains the n + 1 elements 0, {xt}, {X2}' ... ' [z.,} so IP(8)1 > 181 and f cannot be onto. In the case that 8 is infinite, we offer a proof by contradiction. Suppose then that f is onto. Thus every subset of 8 is of the form f (x), for some X E 8. Following the hint, we let T = {s E 8 I s ~ f(s)}. Then T = f(x) for some x E 8. Reflecting on the question "is x E T?" leads to the contradiction that X E T if and only if X ~ T.

Exercises 4.1

1. [BB] (a + b)e = e(a + b) (by commutativity) = ea + eb (by the first distributive law) = ae + be (by commutativity again).

Section 4.1

75

2. (a) [BB] True. If a and b are real numbers, certainly a - b is a real number. (b) False. If a = 1, b = 2, then a - b = -1 but b - a = 1.

(c) False. If a = 1, b = 2, c = 3, then (a-b) -c = -1-3 = -4, while a- (b-c) = 1- (-1) = 2.

3. Let a = 3, b = 4, c = -2. Then 3 ~ 4 but 3( -2) = -6 1:. -8 = 4( -2).

4. (a) [BB] q = 29, r = 7; (b) [BB] q = -30, r = 10; (c) [BB] q = -29, r = 7;

(d) [BB] q = 30, r = 10.

5. (a) q = 278, r = 4; (d) q = 279, r = 15;

6. (a) q = -316, r = 21; (d) q = 20, r = 2984;

(b) q = -279, r = 15; (e) q = 0, r = 19;

(b) q =29,r =972; (e) q = 55, r = 134;

(c) q = -278, r = 4; (f) q = -1, r = 5267.

(c) q = 70, r = 613;

(f) 555,555,123 = 555,555,555 - 432 = 5(111,111,111) - 432

4(111,111,111) + 111,111,111 - 432 = 4(111,111,111) + 111,110,679

So q = 4; r = 111,110,679

(g) q = 2,104,000; r = °

7. [BB] Write a = 3q + r with r = 0, 1,2.

Case 1: r = O. In this case, a = 3q, so a2 = 9q2 = 3k with k = 3q2.

Case 2: r = 1. Here, a = 3q + 1, so a2 = 9q2 + 6q + 1 = 3k + 1 with k = 3q2 + 2q.

Case 3: r = 2. In this case, a = 3q + 2 and a2 = 9q2 + 12q + 4 = 3k + 1 with k = 3q2 + 4q + 1.

8. (a) [BB] The domain of f is Z; its range is Z as well, because given q E Z, we have q = f(qn).

(b) [BB] f is not one-to-one since f(O) = f(I). (Note that n > 1 guarantees that the quotient is °

when either ° or 1 is divided by n.) .

(c) [BB] f is onto, as shown in (a).

9. (a) The domain of f is Z; the range is {O, 1,2, ... , n - I}.

(b) f is not one-to-one since, for example, f(O) = fen) (= 0) but ° =I n. (c) Since the range is a proper subset of N U {O}, f is not onto.

10. [BB] By definition, x ~ [z] < z-l-I for any x. Letting k = f%l, we have % ~ k < %+1. Multiplying by the negative number b, we obtain a :::: kb > a + b. Thus, ° ~ a - kb < -b. Letting r = a - kb, we have a = kb + r with ° ~ r < Ibl, so, by uniqueness, k = q as asserted.

11. (a) [BB] 4034 = (111,I11,000,010h = (7702)8 = (FC2)16'

(b) 57,483 = (1,110,000,0l0,001,011h = (160,213)8 = (E08Bh6'

(c) 185,178 = (101,101,001,101,011,01Oh = (551,532)8 = (2D35Ah6'

12. (a) Since bn-1 ~ N < b" and log, is an increasing function, we have log, bn-1 ~ 10gb N < log, b"; that is, n - 1 ~ log, N < n. But this says that n - 1 is the largest integer ~ log, N or that n - 1 = [log, N J, as required. The parenthetical comment follows from the fact that N has n digits in base b.

(b) By the result of part (a), 7254 has 1 + lloglO 7254 J digits. Since 10glO 7254 = 25410g10 7 ~ 214.66, the integer 7254 has 215 digits.

76

Solutions to Exercises

(c) By the result of part (a), 319566 has 1+ LloglO 319566 J digits. Since 10glO 319566 = 566 log 10 319 ~ 1417.15, the integer 319566 has 1418 digits.

Exercises 4.2

1. (a) [BB] Not totally ordered; for example, 6 and 21 are not comparable.

(b) [BB] 1 is a minimum element since 1 I n for all n E N, but there is no maximum element since given any n E N, n 12n, so n can't be maximum.

2. (a) The greatest lower bound of natural numbers is their greatest common divisor. Since the gcd of any two elements of this poset is, in each case, still an element of the poset, every pair of elements has a glb.

3. (a) [BB]

(b) The least upper bound of natural numbers is their least common multiple. The lcm of 4 and 6 is

12. Since 12 is not in the poset, 4 and 6 have no lub.

(c) This is not a lattice (because not all pairs of elements have a lub.)

4 6

V1 0 0

357

(b)

8

2

2

7

9

4

1

4. (a) 2, 3, 5 and 7 are minimal; 4,5, 6 and 7 are maximal. There are no minimum nor maximum elements.

(b) 1 is minimal and minimum; 6, 7, 8, 9 and 10 are maximal. There is no maximum.

5. [BB] As in Problem 6, write a = nq + r, where 0 :s; r < n. Thus, r = 0,1,2, ... , or n - 1. If r = 0, then a = qn is divisible by n. If r = 1, then a = nq + 1, so a + n - 1 is divisible by n. If r = 2, then a = nq + 2 and a + n - 2 is divisible by n. In general, if r = k, then a + n - k is divisible by n.

6. [BB] Assume, to the contrary, that for some integer n, we have 4 I (n2 - 2); that is, n2 - 2 = 4x for some integer x. We derive a contradiction. First consider the case that n is even; that is, n = 2y for some integer y. Then (2y)2 - 2 = 4x says 4(y2 - x) = 2. Since y2 - x is an integer, this says 4 I 2, which is impossible.

•

Next suppose n is odd; that is, n = 2y + 1 for some integer y. Then (2y + 1)2 - 2 = 4x says

4(y2 + y - x) = 1. Since y2 + y - x is an integer, this says 4 11, another impossibility. In either case we reach a contradiction, so 4 I (n2 - 2) can never be true.

7. Since a I (llx + 3), we know llx + 3 = am for some integer m. Since a I (55x + 52), we have also 55x + 52 = an for some integer n. Now llx + 3 = am implies 55x + 15 = 5am. Thus, (55x + 52) - (55x + 15) = an - 5am and so 37 =:= a(n - 5m). But the only a> 1 dividing 37 is 37 itself. Therefore, a = 37.

Section 4.2

77

8. [BB] We have a = ql n + r and b = q2n + r for some integers ql, q2 and r, Subtracting, a - b = (qln + r) - (q2n + r) = (ql - q2)n. Thus, n 1 (a - b) as required.

9. [BB] (-» If lOa + b = 7k for some integer k, then 5(10a + b) = 35k, so 49a + a + 5b = 35k and a + 5b = 35k - 49a is divisible by 7.

(f-) Conversely, if a + 5b = 7k, then lO(a + 5b) = 70k, so lOa + 50b = lOa + b + 49b = 70k and lOa + b = 70k - 49b is divisible by 7.

10. (a) [BB] True. Since alb, b = ax for some integer x. Since b 1 (-c), -e = by for some integer y.

Thus, e = -by = -axy = a( -xy). Since -xy is an integer, ale.

(b) False. Let a = 3, b = 15, e = 3. Then 3115, so alb and e 1 b, but ae = 9 ~ 15.

(c) True. Since alb, b = ax for some integer x. Thus, be = axe = a(xe). Since xc is an integer, a 1 be.

(d) True. Since alb, b = ax for some integer x. Since e 1 d, d = ey for some integer y. Thus, bd = axey = ae(xy). Since xy is an integer, ae 1 bd.

(e) True. Since alb, b = ax for some integer x. Since e 1 ~, ~ = ey for some integer y. Hence, a a

b = a(ey) = e(ay), with ay an integer, so e 1 b. Also, ~ = ay says a 1 ~ since y is an integer.

e e

11. We have ra + sb = 1 for some integers r and s. Multiplying bye, rae + sbe = e. Now, since b 1 e , ab 1 rae and since ale , ab 1 sbe. Thus, ab divides the sum rae + sbe; in other words, ab 1 e, as required.

12. (a) [BB] 119 1 0 So gcd(93, 119) = 1 = (-25)(119) + 32(93).

93 0 1

26 1 -1

15 -3 4 11 4 -5

4 -7 9

3 18 -23

1 -25 32

(b) [BB] gcd( -93,119) = gcd(93, 119) = 1 = (-25)(119) + 32(93) by part (a), so gcd( -93,119) = 1 = (-25)(119) + (-32)( -93).

(c) [BB] gcd( -93, -119) = gcd(93, 119) = 1 = (-25)(119) + 32(93), by part (a), so gcd( -93, -119) = 1 = (25)(-119) + (-32)( -93).

(d) 1575 1 0 So gcd(1575, 231) = 21 = 5(1575) + (-34)(231).

231 0 1

189 1 -6

42 -1 7 21 5 -34

(e) gcd(1575, -231) = gcd(1575, 231) = 21 = 5(1575) + (-34)(231) by part 12(d), so gcd(1575, -231) = 21 = 5(1575) + (34)( -231).

(f) gcd( -1575, -231) = gcd(1575, 231) = 21 = 5(1575) + (-34)(231), by part 12(d), so gcd( -1575, -231) = 21 = (-5)(-1575) + 34( -231).

78

(g) 8416 1 0

3719 0 1

978 1 -2

785 -3 7

193 4 -9

13 -19 43

11 270 -611

2 -289 654

1 1715 -3881

(h) 100996 1 0

20048 0 1

756 1 -5

392 -26 131

364 27 -136

28 -53 267

(i) 28844 1 0

15712 0 1

13132 1 -1

2580 -1 2

232 6 -11

28 -67 123

8 542 -995

4 -1693 3108

G) 54321 1 0

12345 0 1

4941 1 -4

2463 -2 9

15 5 -22

3 -822 3617 Solutions to Exercises

gcd(8416, 3719) = 1 = 1715(8416) + (-3881)(3719), so gcd( -3719,8416) = 1 = 3881( -3719) + 1715(8416).

So gcd(100996, 20048) = 28 = -53(100996) + 267(20048).

gcd(28844, 15712) = 4 = (-1693)(28844) + 3108(15712), so gcd(28844, -15712) = 4 =

-1693(28844) + (-3108)( -15712).

So, gcd(12345, 54321) = 3 = -822(54321) + 3617(12345).

13. The pairs (93,119), (-93,119), (-93, -119) and (3719,8416) are each relatively prime.

14. [BB] Since a and b are relatively prime, we have ma + nb = 1 for some integers m and n, so 2 = 2ma+2nb. Now suppose x 1 (a+b) and x 1 (a-b). Then, by Proposition 4.2.3, x 1 [(a+b)+(a-b)]; that is, x 1 2a. Also x 1 [(a+b) - (a-b)]; that is, x 1 2b. Again, by Proposition 4.2.3, x 1 (2ma+2nb), so x 12 and we conclude that x = ±1 or x = ±2. The result follows.

15. [BB] If 91 and 92 are each greatest common divisors of a and b, then 91 S 92 (because 92 is greatest) and 92 S 91 (because 91 is greatest), so 91 = 92·

16. First note that a = b = 0 {:::::::} a = a + b = 0, so gcd(a, b) exists if and only if gcd(a, a + b) exists.

Suppose this is the case. As in the proof of Lemma 4.2.5, let 91 = gcd(a, a + b) and 92 = gcd(a, b). We prove that 91 S 92 and 92 S 91. First, since 921 a and 92 1 b, then 92 1 (a + b). Thus, 92 divides both a and a + b, so 92 S 91, the greatest common divisor of a and a + b. Also, since 91 divides both a and a + b, 91 must divide their difference, (a + b) - a = b. Thus, 91 divides both a and b, hence, 91 S 92, the greatest common divisor of a and b.

17. (a) [BB] Multiplying -2647(17369) + 8402(5472) = 1 by 4, we have 17369( -10588) + (5472)(33608) = 4.

Section 4.2

(b) We have 260 1 0

154 0 1

106 1 -1

48 -1 2

10 3 -5

8 -13 22

2 16 -27 79

and so gcd(154, 260) = 2 = 16(260) + (-27)(154). Multiplying by 2, 4 = 32(260) + (-54)(154):

x = -54, y = 32.

(c) [BB] Consider the possibility that 154x + 260y = 3 for certain integers x and y. The left side of this equation is even while the right side is odd, a contradiction.

(d) Suppose we have 196x + 260y = 14 for some integers x and y. Since the left side is divisible by 4, the right side would have to be divisible by 4, which is not the case.

18. (a) [BB] We know that gcd(x, y) I x and gcd(x, y) I y and so gcd(x, y) I (mx + ny) (Proposition 4.2.3).

(b) Yes, it is true. Assume gcd(x, y) I d so that d = l(gcd(x, y)) for some integer i. By Theorem 4.2.9, there are integers s and t such that gcd(x, y) = sx + ty. Hence, d = Es» + lty, and m = is, n = it will work.

19. (a) Take x = -6, y = 9, for example.

(b) Suppose 7x + 5y = 3. Since 7( -6) + 5(9) = 3 as well, subtracting gives 7(x + 6) + 5(y - 9) = O.

Since 7 I 7(x + 6), so also 7 I 5(y - 9). Since the integers 5 and 7 are relatively prime, we must have 71 y - 9, so y - 9 = 7k for some integer k. Thus y = 9 + 7k and 7(x + 6) = -5(y - 9) = -5(7k), so x + 6 = -5k and x = -6 - 5k.

20. Say x I (3k + 2) and x I (5k + 3). Then x I (15k + 10) and x I (15k + 9), but then x I [(15k + 10) - (15k + 9)]. Thus, x 11, so gcd(2k + 2, 5k + 3) = 1.

21. [BB] Let 91 = gcd(a, b) and 92 = gcd(ae, be). We have to show that 92 = e91. First note that e91 I ae since 91 I a, and, similarly, e91 I be. Thus, e91 is a common divisor of ae and be, hence, e91 ~ 92, the largest of the common divisors of ae, be. On the other hand, since 91 = am + bn for some integers m, n, e91 = aem + ben. Since 92 I aem and 92 I ben, it must be that 92 I e9l> and so, since e, 91, 92 are all positive, 92 ~ e91. We conclude that 92 = e91, as required.

22. Suppose x I a and x I (a + 2). Then x I (a + 2 - a), x I 2. Therefore, x = ±1 or x = ±2. If a is odd, then we must have x = 1, so gcd(a, a + 2) = 1. However, if a is even, then 2 I a and 21 (a + 2), so gcd(a, a + 2) = 2.

23. [BB] Say x I n and x I (n + 1). Then x I [(n + 1) - n], so x 11 and gcd(n, n + 1) = 1. We have (-l)n + (1)(n + 1) = 1.

24. Say x I a and x I b. Since x I band b I e, we have x I e by transitivity of I. Thus, x I a and x I e, so x I gcd(a, e) and thus, x = ±1. We conclude gcd(a, b) = 1.

25. First assume that gcd(n, s) = 1. Thus, there exist integers a and b so that an + bs = 1. So k = ank + bsk and since n divides the right side, it also divides the left; that is, n I k. It follows that the smallest

k is n = d~ ). In general, let 9 = gcd(n, s) and write n = n19, s = S19 with gcd(n1, si) = 1. gc n,s

Note that n I ks if and only if n1 I kS1 since ks = tn if and only if kS1 = tn1. Thus the smallest k

such that n I ks is the smallest k such that n1 I ks1. By the first step, k = n1 = ?!: = d~ ) .

9 gc n,s

80

Solutions to Exercises

26. [BB] As suggested by the hint, consider the set S of all positive linear combinations of a and b. Since S contains a = la + Ob if a > 0 and -a otherwise, S is not empty so, by the Well-Ordering Principle, S contains a smallest element g. Since 9 E S, we know that 9 = ma + nb for integers a and b; hence, we have only to prove that 9 is the greatest common divisor of a and b. First we prove that 9 1 a. Write a = qg +: r with 0 ::; r < g. Note that r is a linear combination of a and b since r = a - qg = a - q(ma + nb) = (1 - qa)m + (-qn)b. Since 9 is the smallest positive linear combination of a and b, we have r = 0, so 9 1 a as' desired. Similarly, 9 1 b. Finally, if cia and c 1 b, then c 1 (ma + nb), so c 1 g, so c ::; g.

27. [BB] Since gcd( 63,273) = 21, Iem( 63,273) = 63~173) = 819 by formula (2) of this section.

Since gcd(56, 200) = 8, Iem(56, 200) = 56(~OO) = 1400 by formula (2) of this section.

28. (a) [BB] Iem(93,119) = 93'i19 = 11,067; (b) Iem( -93,119) = 11,067;

(c) Iem( -93, -119) = 11,067;

(d) Iem(1575,231) = (1575)(231)/21 = 17,325;

(e) Iem(1575, -231) = 17,325; (f) Icrn(-1575, -231) = 17,325;

(g) Iern( -3719,8416) = (3719)(8416}/1 = 31,299,104;

(h) Iern(100996,20048) = (100996·20048)/28 = 72,313,136; (i) Iern( -28844, -15712) = (28844)(5712) /4 = 113,299,232; G) Iern(12345,54321) = (12345)(54321)/3 = 223,530,915.

29. Write m = q£ + r, 0::; r < £. We must show thatr = O. For this, note that since aim and a 1 £, it follows from Propositionc.z.S that a 1 r.':Similarly, b 1 r so that r is a common multiple of a and b. By minimality of e, r = O.

30. [BB] gcd( a, b) 1 a and a 1 lcrn(a, b) so gcd( a, b) 1 Iem( a, b) by transitivity of I. (See Proposition 4.2.2.)

31. Let 9 = gcd(a, b). First note that gC~~~I, b) is a positive integer because gcd(a, b) ~ 1. Next we note that 9 1 a and 9 1 b. Since

labl= llilal = ±llia

9 9 9

we see that ¥ is a multiple of a. Similarly, it is a multiple of b. It remains only to show that ¥ is the least of the positive common multiples of a and b. For this, suppose £ > 0 and a 1 £, b 1 £. Since 9 = sa + tb for some integers a and b, it.follows that £g = sea + Ub is a multiple of ab, hence, a multiple of labl. Since £g > 0, £g ~ labl. Therefore, £ ~ ¥ implying that ¥ is "least," as required.

32. (a) [BB] Let x = (anan-l aoho be the integer. Thus, x = ao + lOal + ... + lOnan.

Now x (ao + al + + an) + (9al + 99a2 + ... + 99·· ·9an)

. ". '--v-'

ntimes

(ao + al + ... + an) +3(3al +33a2 + ... + 33··· 3an).

. '--v-'

n times

Since ao + al + ... + an is divisible by 3 and 3 Clearly divides the second term on the right, 3 1 x as required.

(b) [BB] Reverse the argument in (a); that is, note that if 3 1 x, then we can conclude from the preceding that 3 1 (ao + al + ... + an).

Section 4.2

81

(c) Repeat the preceding arguments, but instead, writing the second term as 9(al + 11a2 + ... + 11· . ·1 an).

'-v--'

ntimes

33. (a) Let 91 = gcd(a,b) and 9 = gcd(9I.C). We have to show that 9 = gcd(a,b,c). Since 9 I 91 and 91 I a we see that 9 I a. Similarly, 9 I b. Since also 9 I c, we see that 9 is a common divisor of a, b, c. Next suppose that d is any common divisor of a, b, c. Since in particular, d is a common divisor of a and b, d I 91 (by Corollary 4.2.11). Since also d I c, we see that d is a common divisor of 91 and c, so d ::; 9. This proves that 9 is the largest of the common divisors of a, b and c.

(b) There exist integers rn and n such that gcd(a, b) = rna + nb and integers r and s such that gcd(gcd(a, b), c) = r gcd(a, b) +sc. Since gcd(a, b, c) = gcd(gcd(a, b), c), we get gcd(a, b, c) = r(rna + nb) + sc = (rrn)a + (rn)b + sc which expresses gcd(a, b, c) as an integral linear combination of a, b and c.

(c) gcd(231, 165, 105) = gcd(gcd(231, 165), 105) = gcd(33, 105) = 3.

Since 33 = -2(231) + 3(165) and 3 = -5(105) + 16(33), we have

3 = -5(105) + 16[-2(231) + 3(165)] = -5(105) - 32(231) + 48(165).

(d) gcd(8580,6279) = 39 = -30(8580)+41(6279) andgcd(2873,39) = 13 = -1(2873)+74(39).

So 13 = gcd(6279, 8580, 2873) = -1(2873) + 74[-30(8580) + 41(6279)] = -1(2873) - 2220(8580) + 3034(6279).

(e) gcd(5577, 18837,25740) = gcd(gcd(25740, 18837), 5577) = gcd(117, 5577) = 39.

Since 117 = -30(25740) + 41(18837) and 39 = -1(5577) + 48(117), we have 39 = -1(5577) + 48[-30(25740) + 41(18837)]

= -1(5577) - 1440(25740) + 1968(18837).

34. (a) Reflexive: If (Xl, X2) E Al X A2, then Xl E Al so xl jl Xl (because jl is a reflexive relation on AI) and X2 j2 X2 (because j2 is a reflexive relation on A2). Thus, (Xl,X2) j (Xl,X2).

Antisymmetric: Suppose (Xl. X2) and (YI. Y2) E Al X A2 and that (Xl, X2) j (YI. Y2) and (yI. Y2) j (Xl, X2). Then Xl jl YI. X2 j2 Y2, Yl jl Xl and Y2 j2 X2· SO Xl = Yl (because Xl jl YI. Yl jl Xl and jl is antisymmetric) and X2 = Y2 (because X2 j2 Y2, Y2 j2 X2 and j2 is antisymmetric). Therefore, (Xl,X2) = (YI.Y2).

Transitive: Suppose (Xl. X2), (YI. Y2), and (Zl, Z2) are in Al x A2, (Xl. X2) j (YI. Y2) and (Yl, Y2) j (ZI. Z2). Then Xl jl Yl and Yl jl ZI. so Xl jl Zl (because jl is transitive) and X2 j2 Y2 and Y2 j2 Z2, so X2 j2 Z2 (because j2 is transitive). Thus, (Xl. X2) j (Zl, Z2).

(b) (2, 2) ~ (2,4), (2, 2) ~ (3,2), (2, 2) ~ (3,4), (2, 2) ~ (4,2), (2, 2) ~ (4,4), (2, 3) ~ (3,3), (2, 3) ~ (4,3), (2, 4) ~ (3,4), (2, 4) ~ (4,4), (3, 2) ~ (3,4), (3, 2) ~ (4,2), (3, 2) ~ (4,4), (3,3) ~ (4,3), (3,4) ~ (4,4), (4,2) ~ (4,4)

(c)

(4,2)

(3,4)

(3,2)

(2,4)

! (4,3)

(3,3) (2,3)

(2,2)

82

Solutions to Exercises

(d) (2,2) and (2,3) are minimal; (4,3) and (4,4) are maximal; there are no minimum nor maximum elements.

(e) a b glb(a, b) lub(a, b)

i. (2,2) (3,3) * *

ii. (4,2) (3,4) (3,2) (4,4)

iii. (3,2) (2,4) (2,2) (3,4)

iv. (3,2) (3,4) (3,2) (3,4)

(f) Let Al = A2 = Z and let :51 and :52 be the usual (total) order relation on the integers. Then

Z x Z is not totally ordered since, for example, (1,2) and (0,3) are not comparable. 35. (a) First we note that (A, I ) is a poset, in the same way that (N, I ) is a poset. Now we show that any two elements a, b E A have a glb and a lub. Certainly lcm( a, b) has the properties required of a least upper bound and gcd(a, b) of a greatest lower bound. The key point is to show that these elements lie in A, and this follows from the definitions of gcd and lcm. If a, b E A, then a I n and bin, hence, lcm(a,b) I n by Exercise 29, so lcm(a,b) E A. Furthermore, since gcd(a,b) I a and a I n, we have gcd(a, b) I n and so gcd(a, b) E A too.

(b) [BB] 12 (c)

36

4

4

9

2

3

1

(d)

90

1

2

10

6

1

36. (a) [BB] By Theorem 4.2.9, we know there is at least one pair of integers a, b such that 9 = am + bn.

Now observe that for any integer k, it is also true that 9 = (a + kn)m + (b - km)n.

(b) i. By Theorem 4.2.9, there is at least one pair of integers a, b such that ma + nb = 1. As in part (a), this means that (a+kn)m+ (b-km)n = 1 for any integer k. By the Division Algorithm, select k such that b = km + r with 0 :::;r < m. Thus a'm + b'n = 1 with a' = a + kn, b' = r = b - km and 0 :::; b' < m. Note that b' = 0 is not possible since this would imply a'm = 1, contradicting m > 1. Finally we must show that a' and b' are unique. Assume then that we also have a"m + b"n = 1, with 0 < b" < m. Then (a' - a")m + (b' - b")n = 0 and so m I (b' - b")n. Since gcd(m, n) = 1, m I (b' - b") by Corollary 4.2.10. Since both b' and b" are in the range 0 < b', b" < m, the only way for b' - b" to be a multiple of m is if the multiple is O. Thus b' - b" = 0 = a' - a" .

ii. Part (i) says we can find unique integers a, b with 0 < b < m such that am + bn = 1. Since b > 0, n > 0 and m > 0, we must have a < O. Also a > -n because b < m. Now

Section 4.3

83

am + bn = 1 implies am = -bn + 1, so (a + n)m = (-b + m)n + 1. Set a' = a + n and b' = -b + m. Because 0 < b < m, 0 < b' < m also. Because -n < a < 0, 0 < a' < n. The uniqueness of a' and b' follows from the uniqueness of a and b. (Uniqueness can also be proved directly as in (i).)

Exercises 4.3

1. (a) [BB] 157 is prime;. (b) [BB] 9831 is not prime; 3 1 9831;

(c) 9833 is prime; (d) 55,551,111 is not prime; 11 155,551,111.

(e) 2216,090 - 1 is not prime: 2216,090 - 1 = (2108,045 + 1)(2108,045 - 1).

2. No. For example, take n = 9. Then n has no prime factor smaller than v'9.

3. (a) [BB] Note that n = p(nlp), Now if nip is not prime, then it has a prime factor q < VnlP by Lemma 4.3.4. Since a prime factor of nip is a prime factor of n, q would then be a prime factor of n not exceeding VnlP, contradicting the fact that the smallest prime factor of n is bigger than this.

(b) [BB] Note that 16,773,121 = 433(38,737) and that ...)38,737 ~ 197. Since 433, the smallest prime dividing 38,737, is larger than 197, 38,737 is prime, by part (a). Thus, 16,773,121 = 433(38,737) is the representation of 16,773,121 as the product of primes.

4. (a) [BB] 856 = 2 . 2 . 2 . 107 = 23 . 107; (c) 6647 = 17 ·17·23;

(e) [BB] (28 _1)20 = 320 .520.1720;

(b) 2323 = 23 . 101; (d) 9970 = 2 . 5 . 997;

(f) 55,551,111 = 3 . 7·11 . 101 ·2381.

5. [BB] If 14n terminates in 0, then it is divisible by 10 and, hence, by the prime 5; that is, there is a 5 in the factorization of 14n. This contradicts unique factorization because 14n = 2n7n says that the only primes dividing 14n are 2 and 7.

6. (a) For example, O,!, i, i,~.

(b) [BB] We have to prove that a, bE A implies a+ bE A. Let a, b « A. Then a = ~ and b = ~, where 3 % n, 3 % r. Then

a+b= mi+nk ni

Since 3 is prime, if 3 1 ni, then 3 1 n or 3 1 i, neither of which is true. Thus, 3 % ni, so a + b E A. (c) We have to prove that a, b E A implies ab E A. Let a, b E A. Then a = ~ and b = ~, where 3 % n, 3 % i. Then ab = mk I ni. Since 3 is prime, if 3 1 ni, then 3 1 n or 3 1 e. neither of which is true. Thus, 3 % ni, so ab E A.

7. We must prove that rv is reflexive, symmetric and transitive.

Reflexive: If a E A, aa = a2 is a perfect square, so a rv a.

Symmetric: If a, b E A and a rv b, then ab is a perfect square, so ba = ab is a perfect square and b rv a.

Transitive: If a, b, e E A, a rv band b rv e, then ab = n2 and be = m2 are perfect squares. So ( ab ) (be) = (n m ) 2. To prove that ae is a perfect square, we prove that the prime powers occurring

84

Solutions to Exercises

in the decomposition of ac as the product of primes are all even, that is, that ac = piO:1 p~O:2 ... p~O:r . It would follow that ac is the perfect square £2, where £ = pfl ... p':r. Suppose then that pO: is the largest power of a prime p dividing ac and that p2f3 is the largest power of p dividing b2, then the largest power of p dividing (nm)2 is po:+2{3. Since this power is even, Q is even. It follows that ac is a perfect square, hence, a rv C.

8. (a) True. This is precisely Lemma 4.3.2.

(b) [BB] False. The prime described here has the miraculous property that it divides all natural numbers greater than 1. Certainly this prime cannot be 2 since 2 ~ 3, neither can it be odd since if p is an odd prime, p ~ 2.

9. (a) The range of f is the set of all prime numbers since any prime p is f(n) for some n: Take n = p,

for example.

(b) f is not one-to-one. For example, f(2) = 2 = f(4) but 2 =I 4. (c) Since the range is a proper subset of N, f is not onto.

(d) Since 1 is not prime, f(l) would not be defined. Remember our agreement that when we write f: A ~ B, it is understood that dom f = A.

10. (a) [BB] This function is one-to-one. If f(nl, ml) = f(n2, m2), then 2m16n1 = 2m26n2, and so 2m} 2n1 3n1 = 2m2 2n2 3n2. By the Fundamental Theorem of Arithmetic, the powers of 3 and 2 on each side of this equation are the same. So nl = n2, hence ml = m2 too. Therefore, (nl' ml) = (n2' m2).

(b) This function is not one-to-one since f(l, 0) = 36 = f(O, 2) but (1,0) =I (0,2).

**11. (a) [BB] n(lO) = 4, 10/ In 10 ~ 4.343 and I;H~1o ~ 4.i43 ~ 0.921.
**

(b) n(50) = 15, 50/In50 ~ 12.781 and 5; ~~~o ~ Il~8I ~ 1.174.

(c) n(95) = 24, 95/In95 ~ 20.861 and 9; ~;95 ~ 20~:6I ~ 1.150.

12. (a) Here are the primes less than 200.

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

127 131 137 139 149 151 157 163 167 173

179 181 191 193 197 199

n(200) = 46, l;ggo ~ 37.748 and 20~;~~OJoo ~ 1.219.

(b) Here are the primes less than 500.

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

127 131 137 139 149 151 157 163 167 173

179 181 191 193 197 199 211 223 227 229

233 239 241 251 257 263 269 271 277 281

283 293 307 311 313 317 331 337 347 349

353 359 367 373 379 383 389 397 401 409

419 421 431 433 439 443 449 457 461 463

467 479 487 491 499 Section 4.3

85

1f(500) = 95, l;~go ~ 80.456 and 50~H~0~00 ~ 1.181.

13. There are approximately

5000/ In 5000 ~ 587 primes less than 5000,

50,000/ In 50,000 ~ 4621 primes less than 50,000,

500,000/ In 500,000 ~ 38,103 primes less than 500,000 and 5,000,000/ In 5,000,000 ~ 324,150 primes less than 5,000,000.

14. [BB] This is a special case of Exercise 11, Section 4.2 since if p and q are distinct primes, then p and q are relatively prime. The result also follows quickly from the Fundamental Theorem of Arithmetic since, writing n = P1P2 ... p-, the hypotheses say that one of the Pi is P and some other Pj is q.

15. (a) Since 2xo + 5yo = 2x + 5y, we have 5(yo - y) = 2(x - xo). Since 5 divides the left side, 5 I 2(x - xo), so 5 I (x - xo) by Proposition 4.3.7. Thus x - Xo = 5k (hence x = Xo + 5k) for some integer k. From 5(yo - y) = 2(x - xo), we conclude that 5(yo - y) = 10k, so Yo - Y = 2k and y = Yo - 2k as desired.

(b) This follows from part (a) since Xo = 2, Yo = 3 satisfies 2xo + 5yo = 19.

16. [BB] Without loss of generality, we may assume that a < b. Since there are infinitely many primes, there exists an integer n 2: ° such that b + n is prime. Since a + n < b + n, b + n cannot divide a + n, so a + nand b + n are relatively prime.

17. (a) If n is prime, then n is divisible only by 1 and n, so d(n) = 2. On the other hand, if n is not prime, let P be a prime dividing it. Then n is divisible by the distinct integers 1, P and n, so d(n) 2: 3. Also d(l) = 1. Thus, the n with d(n) = 2 are precisely those n which are prime.

(b) [BB] First note that, if P is prime, d(p2) = 3 since the only divisors of p2 are 1, P and p2. We claim that only integers of the form p2 satisfy the condition. To see this, notice that if n is divisible by distinct primes p and q, then n is divisible by each of 1, p, q and pq (see Exercise 14) and so d(n) 2: 4. Thus, n has just one prime factor. Also, if n is divisible by the cube of a prime, p3, then n is divisible by each of 1, p, p2, p3 so again, d( n) 2: 4. We conclude that n = p2 for some primep.

(c) First consider the case n = pOl for some prime p. Then d( n) = a+ 1, so n = p4 satisfies d( n) = 5.

Next assume that n is divisible by three distinct primes p, q, r. In this case, d(n) 2: 7 since 1, p, q, r, pq, pr, qr, pqr all divide n. Thus, n cannot have three distinct prime factors. Finally, assume n = pOlqf3 for distinct primes p and q. If a = f3 = 1, then d(n) = 4. If a > 1 (or, equivalently, f3 > 1), then n is divisible by 1, p, q, pq, p2 , p2 q, so d( n) 2: 6. We conclude that d(n) = 5 if and only if n = p4.

18. (a) [BB] No. 215 - 1 = (25 - 1)(210 + 25 + 1).

(b) No. 291 - 1 = (213 _1)(278 + 265 + 252 + 239 + 226 + 213 + 1)

(c) If n is not prime, write n = rs for 1 < r, s < n, Then 2n - 1 = 2rs - 1 = (2r - 1)(2r(s-1) + 2r(s-2) + ... + 1) is not prime, a contradiction.

(d) The converse of (c) is not true. See the section on Mersenne primes.

19. (a) [BB] 26 + 1 = (22 + 1)(24 - 22 + 1).

(b) 220 + 1 = (24 + 1)(216 - 212 + 28 - 24 + 1)

86

Solutions to Exercises

(c) If n is not a power of 2, we can write n = ab with b odd. Then 2ab + 1 = (2a + 1)(2a(b-l) - 2a(b-2) + ... + 1). Note the last term in the second factor is "+"1 because b is odd.

20. (a) If P = 2k + 1 and q = 2t' + 1, then P + q = 2(k +.e + 1), so 2 I (p + q). Also P + q > 2 since P > 2 and q > 2. Thus, P + q > 2 is divisible by 2 and so not prime.

(b) No. Consider 2 + 3 = 5.

21. [BB] Suppose, to the contrary, that P and q are consecutive primes (in that order) such that P + q = 2r, where r is a prime. Then

p+p p+q q+q

P= -- < -- =r< -- =q; 222

that is, p < r < q. This contradicts the fact that p and q are consecutive primes.

22. Suppose there exist integers x and y such that x2 - y2 = 2n. Then 2 I (x + y)(x - y) so 2 I (x + y) or 2 I (x - y). But x + y = (x - y) + 2y shows that x + y and x - yare both even or both odd. Thus, 2 divides both x + y and x - y so 4 I (x2 - y2), 412n and 2 I n, a contradiction.

23. [BB] This is true, and the proof has given Andrew Wiles a place in history. This is Fermat's Last Theorem (4.3.14)!

24. [BB] The condition tells us that in the prime decompositions of a, band e, no prime appears in two of the decompositions. Hence, a = pflp~2 ... p~r, b = qflqg2 ... q~8, e = rrrJ2 ... ri' with the primes Pi, qi, ri all different. Thus,

ab = pfl p~r qfl q~8

ae pfl p~rrr rit

b /31 /38 "'II "'It

e ql' .. qs r 1 ... r t .

Suppose gcd(ab, be, ae) =I- 1. Then there must exist a prime s such that slab, s I be, s I ae. But there is no prime common to the decompositions of ab, ae, be. Hence, no such s exists and gcd( ab, be, ae) = 1.

25. If abe and n are not relatively prime, then there exists a prime p such that p I abe and pin. By Corollary 4.3.8, p I a or p I b or pie. In the first case, p I a and pin contradicting gcd(a, n) = 1. The other two cases are similar.

26. Since gcd(a,p2) = p, we know that a = pr where p ~ r. Since gcd(b,p3) = p2, we know that b = p2s wherep ~ s.

(a) [BB] ab = p3rs andp ~rs by Proposition 4.3.7. Thus, gcd(ab,p4) = p3.

(b) a + b = pr + p2s = p(r + ps) andp ~ (r + ps) since p ~ r. Thus, gcd(a + b,p4) = p.

27. Let x be such that PIP2 ... Pn + 2 :=S x :=S PIP2 ... Pn + Pn+l - 1. Thus, x = PIP2 ... Pn + k with 2 :=S k :=S Pn+l - 1. Let p be a prime dividing k. It follows that p = Pi for some i, 1 :=S i :=S n, because k < Pn+l. But then, Pi I (PIP2'" Pn + k); that is, Pi I X. SO x is composite.

The first part of this exercise provides a sequence of Pn+l - 2 consecutive composite integers. Since there are primes Pn+l of arbitrarily large size, we obtain in this way gaps of arbitrary length.

28. Writing a = par and b = pf3 s with gcd(p, r) = 1 and gcd(p, s) = 1, we are given that gcd(r, s) = 1, a 2': 1, f3 2': 1 and either a = 1 or f3 = 1.

Section 4.3

87

(a) [BB] We have a2 = p2Qr2 with gcd(p, r2) = 1 and b = rJ3 s. Also gcd(r2, s) = 1 since gcd( r, s) = 1. We conclude that there are two possibilities: If f3 = 1, then gcd( a2, b) = P, while if f3 > 1, then gcd(a2, b) = p2.

(b) Here, a3 = p3Qr3 and b = rJ3 s. Now there are three possibilities. If f3 = 1, then gcd( a3, b) = p.

If f3 = 2, then gcd(a3, b) = p2, and if f3 :;::: 3, then gcd(a3, b) = p3.

(c) Here we have a2 = p2Qr2 and b3 = p3!3s3. There are two possibilities. If a = 1, then gcd(a2, b3) = p2. If a > 1, then gcd(a2, b3) = p3.

29. [BB] Let the prime decompositions of a and b be a = pflp~2 ... p~r and b = q~lq~2 q~8. Since

gcd(a, b) = 1, we know that Pi f:. qj for any i and i. Thus, ab = pfl ... p~rq~l q~8 with no

simplification possible. Since ab = x2, it follows that each ai and each f3i must be even. But this means that a and b are perfect squares.

30. (a) We proceed exactly as in the solution to Problem 17. We write a and b in the form

for certain primes PI, P2, ... , Pr and integers alo a2, ... , ar, f3l, f32,"" f3r. (Some ai or f3i may well be 0 since we assume that the same primes appear in the decompositions of both a and b.) We claim that the least common multiple of a and b is

where max( ai, f3i) denotes the larger of the two integers ai and f3i'

Now ale and b 1 e since the exponent max( ai, f3i) is at least as big as the exponent of the prime Pi in each of a and b. Next assume that aim and b 1 m. Since pfi 1 a pfi 1 m and since pfi 1 b , pfi 1 m. Thus, pr;:ax(Qi,!3i) 1 m. Thus, m = pIlp~2 ... p'J.r for some integers "Ii :;::: max(ai' f3i). So elm, proving that e = lcm( a, b) as claimed.

(b) Using (a) and the result of Problem 17, we have

The result now follows from the fact that min( a, (3) + max( a, (3) = a + f3 for any integers a and f3.

31. [BB] Let a = pfl p~2 ... p~r. Since a is a square, all the ai are even. Since a is a cube, all the ai are divisible by 3. It follows from Exercise 14 that 6 1 ai for all i. This means that a is a 6th power.

32. (a) [BB] True. Write a = pflp~2 ... p~r as the product of powers of primes.

Then all = p~lQl ... p;lQr. If p 1 all, then p must be one of the Pi, so pia.

(b) True. Since pia, pi a2. Now pi a2 andp 1 (a2 + b2) forces pi b2. Then, by Proposition 4.3.7, we conclude that p 1 b.

(c) False. Let a = 2. Then a9 + a17 = 131,584. Now 257 is prime and 2571131,584, but 257 ~ 2.

33. [BB] Whenever a, b, c satisfy x2 + y2 = z2, so also do ka, kb, kc satisfy the equation, for any integer k. Thus, for example, all triples of the form 3k, 4k, 5k satisfy a2 + b2 ~ c2.

88 Solutions to Exercises

34. (a) [BB] Write 3n + 2 = P1P2 ... Pm as the product of (necessarily odd) primes. Each of the Pi is either 3 or of the form 3k + 1 or 3k + 2. Now we notice that the product of integers of the form 3k + 1 is of the same form and the product of 3 with such an integer is a multiple of 3. So if none of the Pi is of the form 3k + 2, the product cannot be either. If we drop the word odd, the result is false. For example, 3(2) + 2 = 8 is divisible by only the prime 2, which is not of the form 3n + 2 forn EN.

(b) Write 4n + 3 = P1P2 ... Pm as the product of (necessarily odd) primes. Now any odd prime is of the form 4k + 1 or 4k + 3. The product of any two integers of the form 4k + 1 is of the same form, so if all the Pi were of this form so would be the product, a contradiction.

(c) Write 6n + 5 = P1P2' .. Pm as the product of primes. Each of the Pi is of the form 6k + 1 or 6k + 5. The product of two integers of the form 6k + 1 is also of this form, so at least one of the Pi has to be of the form 6k + 5, as asserted.

(d) Adopting the idea of Euclid's proof that there are infinitely many primes (Theorem 4.3.3), we suppose that there are just finitely many primes of the form 6n + 5, say PI, P2, ... , Pm, and form the product N = P1P2' .. Pm. It is easily checked that the product of two integers of the form 6k + 5 is an integer of the form 6k + 1, that the product of two integers of the form 6k + 1 is of the same form, and that the product of an integer of the form 6k + 5 and another of the form 6k + 1 is an integer of the form 6k + 5. Therefore, N is of the form 6k + 1 or 6k + 5 depending on whether m is even or odd, respectively.

If m is even (so that N = 6k + 1), we consider the integer N + 4 which is of the form 6k + 5. By part (c) of this question, 6k + 5 has a prime factor of the same form; that is, N + 4 is divisible by one of the Pi. Since Pi I N, however, this would imply Pi I 4, which is untrue.

If k is odd, the argument is similar. This time N = 6k + 5, hence, N + 6 is of the same form, hence, divisible by some Pi. Since N is also divisible by Pi, we get Pi I 6, which is not true (since 5 is the only prime Pi of the form 6k + 5 which is less than 6 and 5 ~ 6).

35. Write P + 1 = 6q + r with 0 ::; r < 6.

If r = 1, then P = 6q, contradicting P being prime.

If r = 2, then P = 6q + 1, so P + 2 = 6q + 3, 3 I (p + 2), contradicting P + 2 > 3 being prime. If r = 3, then P = 6q + 2 is divisible by 2, contradicting P being a prime greater than 2.

If r = 4, then P = 6q + 3, so 3 I p, a contradiction since P > 3.

If r = 5, then P = 6q + 4 and 2 I p, so again, we have a contradiction. The only possibility is that r = 0; that is, 6 I (p + 1).

36. (a) [BB; f(8) only] f(8) = 22(3) = 26 = 64 since n = 1, m = 8 = 23. f(~) = 22(3)-1 = 25 = 32 since m = 1, n = 1/8 = 1/23.

f(100) = 22(2) 52(2) = 2454 = 10,000 since 100 = 2252.

f(~~) = 22(3)52(1)32(2)-1)72(1)-1 = 26523371 = (64)(25)(27)(7) = 302,400 since m = 40 = 23 . 5 and n = 32 • 7.

(b) [BB; 1000000 only] Since 1000000 = 106 = 2656, X = 2353 = 1000.

Since 10000000 = 107 = 2757 = 22(4)-152(4)-1, t = 1/(2454) = 1/10,000.

Since 365,040 = (24)(33)(5)(132), m = 22(13) = 52, n = 32(51) = 45 and r = ~~.

Section 4.3

89

(c) We must prove that f is one-to-one and onto.

One-to-one: Suppose f(ml/nl) = f(m2/n2)' Assume first that ml = m2 = 1, nl = p~l ... p?

and n2 = q{l ... q£k, where PI, ,Pt are distinct primes, ql, ... , qk are distinct primes, e, > 0

and fi > 0 for all i. Then p~el-l p~et-l = q~h -1 ... q~!k-l. By the Fundamental Theorem

of Arithmetic, we conclude that nl = n2, so ml/nl = m2/n2' The same approach can be applied to the other eight possible cases for the pair (ml/nl' m2/n2), showing that f is one-to-one.

Onto: Given YEN, if y = 1, then y = f(l). Otherwise, y is a natural number> 1 and so, by the Fundamental Theorem of Arithmetic, is the unique product of powers of distinct primes.

Separating the powers into even and odd powers, we can write y = p~el p~ek if there are no odd

powers, y = q~h -1 ... q;ft -1 if there are no even powers, and y = p~el p~ek q~h -1 ... q;ft-1

if there are both odd and even powers. In the first case, y = f(m) where m = p~l ... p~k, in the second case, y = f( ~) where n = q{l ... q{t and, in the third case, y = f( ~) where

el ek d h ftTh f . t

m = PI ... Pk an n = ql ... qt. us, IS on o.

37. (a) Reflexive. a '" a because a1 = aI, so m = n = 1 works.

Symmetric. if a r- b, then am = b" for certain integers m and n each 2: 1. Then b" = am, so b '" a.

Transitive. if a '" b and b '" c, then am = b" for certain m 2: 1 and n 2: 1, and b" = cS for certain r 2: 1 and s 2: 1. Thus, amr = (amr = (bnr = (br)n = (c")" = csn with mr 2: 1 and sn 2: 1. So a '" c.

(b) "3 = {3n I n E N} is the set of powers of 3; 4 = {2n I n E N} is the set of powers of 2;

144 = {12n In E N} is the set of powers of 12.

(c) As suggested, we write a = pfl p~2 ... p~k and claim that a is the set of powers of b, where

b = pflpg2 ... p~k where (3i = ai/g, g = gcd(a., ... ,ak)'

(For example, the equivalence class of 144 = 2432 is the set of powers of 12 = 223.)

To establish our general claim, we first note that bt '" a for any power bt of b because bg = a (and so W)g = (bg)t = at). We prove that, conversely, any natural number equivalent to a is a power of b. So suppose x '" a. Then x '" b by transitivity. So z" = b'" for certain n, m 2: 1. Write n = tnt. m = tml where gcd(nb ml) = 1. Then (takingtth roots) xn1 = bm1• Writing x = pfl pt2 ••• ptk, we have nl1/Ji = ml(3i for all i. Now any prime divisor of nl divides (3i, for all i (since nl and ml are relatively prime). Since the (3's are relatively prime, it follows that nl = 1. Hence, x = bm1 is a power of b as desired.

38. (a) Here is some MAPLE code which does the trick. Crossing out and circling is implemented by means of an one-dimensional array called p whose entries initially are all 1. When integer I is divisible by a prime, p [ I 1 is set equal to 0 (this corresponds to crossing out). When the program terminates, those integers I with p [I 1 =1 are the desired primes.

An implementation of the Sieve of Eratosthenes.

Find all the primes not exceeding a given integer N. > restart:

> N := 1000:

> M := ceil(sqrt(N)): #take advantage of Lemma 4.3.4 Initialize a vector p which keeps track of integers being

90

Solutions to Exercises

"crossed out" > for i to N do

> p[i]:= 1:

#p[i]

o when integer i is "crossed out"

> od:

> for n from 2 to M do

> if (p[n]=l) then

> i := 1:

> while (i*n<=N) do

> p l i.e n] := 0: # "cross out" all multiples of of n

> i := i+l:

> od:

> fi:

> od:

Print the results > j := 0:

> for i to N do

> if (p[i] = 1) then

> printf("%5d", i):

> j := j+l: #j = no of primes printed

> if (j mod 10 = 0) then printf("\n")

#print 10 primes to a line

> fi:

> fi:

> od:

(b) Here are the primes less than 1000.

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

127 131 137 139 149 151 157 163 167 173

179 181 191 193 197 199 211 223 227 229

233 239 241 251 257 263 269 271 277 281

283 293 307 311 313 317 331 337 347 349

353 359 367 373 379 383 389 397 401 409

419 421 431 433 439 443 449 457 461 463

467 479 487 491 499 503 509 521 523 541

547 557 563 569 571 577 587 593 599 601

607 613 617 619 631 641 643 647 653 659

661 673 677 683 691 701 709 719 727 733

739 743 751 757 761 769 773 787 797 809

811 821 823 827 829 839 853 857 859 863

877 881 883 887 907 911 919 929 937 941

947 953 967 971 977 983 991 997 (c) 71'(1000) is the number of primes not exceeding 1000 which, by (b), is 168; 1000/ In 1000 ~ 144.765 and lO;J]?~~boo ~ 168/144. 765 ~ 1.161.

Section 4.4

91

Exercises 4.4

1. (a) [BB] 5,12,19, -2, -9, -16 are in 5. 4,11,18, -3, -10, -17 are in -3.

(b) [BB] The general element of 5 is an integer of the form 7k + 5 for some integer k. The general form of an element in -3 is an integer of the form 7 k - 3 for some integer k.

2. (a) 3,16,29,42, -10, -23, -36, -49, -62 are elements of 3.

11,24,37,50, -2, -15, -28, -41, -54 are elements of -2.

(b) The general integer in 3 is of the form 13k + 3 for some integer k. The general integer in - 2 is of the form 13k - 2 for some integer k.

3. (a) [BB] 1286 = 32(39) + 38, so 1286 (mod 39) = 38.

(b) 43,197 = 129(333) + 240, so 43,197 (mod 333) = 240.

(c) [BB] -545,608 = -10,699(51) + 41, so -545,608 (mod 51) = 41. (d) -125,617 = -399(315) + 68, so -125,617 (mod 315) = 68.

(e) 11,111,111,111 = 10,001,000(1111) + 111, so 11,111,111,111 (mod 1111) = 111.

4. (a) [BB] False: 18 - 2 = 16 is not divisible by 10. (c) [BB] True: 44 - (-8) = 52 is divisible by 13.

(d) False: 423 - 17 = 406 is divisible by 29, so 17 = 423. (e) False: 400 - (-18) = 418 is divisible by 19.

(b) True: -13 - 7 = -20 is divisible by 5.

5. (a) [BB] 0 = 3, I = 4, 2 = 5.

(b) 0 = 5, 1= 6, 2 = -3,3= -7,4 = 9.

(c) 0 = 8, I = 9, 2 = 18,3= -5,4= -4,5= -11,6 = 14, '7 = -1.

6. (a) [BB] Since 21,758,623 = 1 (mod 6) and 17,123,055 = 3 (mod 6), 21,758,623 + 17,123,055 = 1 + 3 = 4 (mod 6).

(b) Since 21,758,623 = 1 (mod 6) and 17,123,055 = 3 (mod 6), (21,758,623)(17,123,055) = 1(3) = 3 (mod 6).

(c) Since 17,123 = 5 (mod 6), 17,12350 = 550 (mod 6).

Since (52) = 25 = 1 (mod 6),550 = (52)25 = 125 = 1 (mod 6).

(d) 104 = 34 = 9(9) = 2(2) = 4 (mod 7) 108 = (104)2 = 42 = 2 (mod 7)

1012 = (104)(108) = 4(2) = 1 (mod 7) 1020 = (108)(1012) = 2(1) = 2 (mod 7)

1024 = (1020)(104) = 2(4) = 1 (mod 7)

(e) [BB] 2,4,8,5,10,9,7,3,6,1

(0 4,5,9,3,1,4,5,9,3,1

7. (a) a = 8 and b = 43 (mod 85), so a+b = 51, ab = 344 = 4 and (a+b)2 = 2601 = 51 (mod 85). (b) a = 16 and b = 42 (mod 143), so a + b = 58, ab = 672 = 100 and (a + b)2 = 3364 = 75 (mod 143).

(c) a = -9221 = 779 and b = 3450 (mod 10,000), so a + b = 4229 and ab = 2,687,550 = 7550 and (a + b)2 = 17,884,441 = 4441 (mod 10,000).

92

Solutions to Exercises

8. [BB] Observe that 5° == 1 (mod 7), 51 == 5 (mod 7), 52 == 4 (mod 7), 53 == 6 (mod 7), 54 == 2 (mod 7) and 55 == 3 (mod 7). Thus, each of the integers 1,2,3,4,5,6 is congruent mod 7 to some power of 5. By Proposition 4.4.5, any integer a is congruent mod 7 to one of 0,1,2,3,4,5,6. So the result follows.

9. (a) [BB] No x exists. The values of 3x mod 6 are 0 and 3.

(b) x = 2, x = 5; (c) x = 6.

(d) No x exists. The values of 4x mod 6 are 0,4 and 2.

(e) [BB] If 50 I (2x -18), then 2x -18 = 50k, so x = 9 + 25k for some integer k. We obtain x = 9, x = 34.

(f) [BB] By trial and error, x = 9, or using the method of Problem 25, write 11- 2(5) = 1, deducing that -2(5) == 1 (mod 11) and so x = -2(1) == 9 (mod 11).

(g) If 25 I (5x - 5), then 5x - 5 = 25k so x = 1 + 5k for some integer k. So x = 1,6,11,16,21. (h) No x exists. If 592 I (4x - 301), then 4x - 301 is even. This is impossible since, for any x, 4x is

even.

(i) No x exists. If 65x == 27 (mod 169), then 169 I (65x - 27), so 13 I (65x - 27). Since, for any x, 13 I 65x, this is impossible because 13 ~ 27.

(j) If 4x == 320 (mod 592), then 592 I (4x - 320), so 4x = 320 + 592k for some k; that is, x = 80 + 148k. The values of x are 80, 228, 376 and 524.

(k) [BB] We use the method of Problem 25. Write -5(595) + 186(16) = 1, deduce 186(16) == 1 (mod 595) and obtain x = 186(301) = 55,986 == 56 (mod 595).

(1) We use the method of Problem 25. Write 36(722) - 329(79) = 1, deduce -329(79) == 1 (mod 722) and obtain x = -329(15) = -4935 == 119 (mod 722).

(m) Following the method outlined in Problem 25, we write 69(1404) - 625(155) = 1. From this, we deduce that -625(155) == 1 (mod 1404) and obtain x = -625(1185) = -740,625 == 687 (mod 1404).

(n) We want to find x (mod 78) such that 78 I (58x - 6), that is, 58x - 6 = 78k for some integer k.

This says 29x - 3 = 39k, so we first solve 29x == 3 (mod 39). We have 39(3) + 29( -4) = 1, so 39(9) + 29( -12) = 3. Thus 29x == 3 (mod 39) has the unique solution x = -12 == 27 (mod 39). So our congruence has the two solutions x == 27 (mod 78) and x == 66 (mod 78) (66 = 27 + 39).

10. (a) (ax+b)(ex+d) == 0 (mod p) impliesp I (ax+b)(ex+d). Sincep is prime, by Proposition 4.3.7, we conclude that p I (ax + b) or p I (ex + d). The first case says ax + b == 0 (mod p) and the second that ex + d == 0 (mod p), giving the desired result.

(b) i. [BB] (x + 2)(x - 2) == 0 (mod 13) implies x + 2 == 0 (mod 13) or x - 2 == 0 (mod 13) (using (a)). So x == ±2 (mod 13). The solutions are x = 2, x = 11.

ii. (2x + 1)(3x + 4) == 0 (mod 17) implies 2x + 1 == 0 (mod 17) or 3x + 4 == 0 (mod 17) (using (a)). So 2x == -1 (mod 17) or 3x == -4 (mod 17). The first congruence yields x = 8 and the second x = 10.

iii. 3x2 + 14x - 5 = (3x -1)(x+5) == 0 (mod 97) implies 3x -1 == 0 (mod 97) or x+5 == 0 (mod 97) (by (a)). The first congruence yields x = 65 and the second x = 92.

iv. [BB] No x exists. The values of x2 (mod 6) are 0,1,3 and 4.

v. x = 2 or x = 4.

Section 4.4

93

vi. No x exists. The values of 4x2 + 3x + 7 (mod 5) are 2, 3 and 4.

11. (a) [BB] MUltiplying the second congruence by 2 gives 2x == 0 (mod 6) and, hence, x == 0 or x == 3 (mod 6). If x == 0, then the first congruence says y == 1 and it is easily checked that x = 0, y = 1 satisfies both congruences. If x == 3, then the first congruence says y == 1, but these values for x and y do not satisfy the second congruence. There is just one solution mod 6; namely, x = 0, y = 1.

(b) [BB] Subtracting the first congruence from the second gives 3x == -2 == 7 (mod 9). But the values of 3x mod 9 are just 0, 3 and 6. There is no solution.

(c) Subtracting the first congruence from the second gives 3x == -2 == 6 (mod 8) and, hence, x == 2.

The first congruence then says 2 + 5y == 3; that is, 5y == 1 (mod 8). So y == 5 (mod 8). One checks easily that x = 2, Y = 5 is a solution to the given congruences.

(d) Multiply the first congruence by 2 to get 14x + 4y == 6 (mod 15). Subtracting the second

congruence gives 5x == 0 (mod 15) so x = 0, 3, 6, 9 or 12. .

If x = 0, 2y == 3, so y = 9.

If x = 3, 2y == 3 - 21 = -18 == -3 == 12 so y = 6. If x = 6, 2y == 3 - 42 = -39 == -9 == 6, so y = 3. If x = 9, 2y == 3 - 63 = -60, so y = O.

If x = 12, 2y = 3 - 84 = -81 == 9, so y = 12.

(e) Multiplying the first congruence by 5 and the second by 3 gives

15x +25y == 70 == 14 (mod 28) 15x + 27y == 18 (mod 28)

and so, subtracting, 2y == 4 (mod 28). Thus, y = 2 or y = 16.

If y = 2, 3x == 14 - 10 = 4, so x = 20.

If y = 16, 3x == 14 - 80 = -66 == -10 == 18, so x = 6.

12. [BB] Since gcd(e, n) = 1, we have ex + ny = 1 for some integers x and y. We also know that ae - be = nk for some integer k. So (a - b)cx = nkx; that is, (a - b)(1 - ny) = nkx, or, a - b = n(kx + (a - b)y). Thus, n I (a - b) and a == b (mod n), as desired.

13. [BB] Since n I (a - b), we have a - b = qn for some integer q, hence, a - qn = b. Let 9 = gcd( a, n).

Then 9 I a and gin. Therefore, 9 I b (and gin), so 9 I gcd(b, n). Similarly gcd(b, n) I 9 and so these natural numbers are equal.

14. (a) [BB] False! For example, with a = b = 1 and n = 4, we have a == b (mod 4), but 3a = 3, b2 = 1 so 3 ¢ 1 (mod 4).

(b) True. Either apply Proposition 4.4.7: if a == a (mod n) and b == b (mod n), then a(a) == b(b) (mod n) or give a direct proof such as the following. Since n I (a - b), n I (a - b) (a + b); that is, n I (a2 - b2).

(c) False! For example, with a = 5, b = 2 and n = 3, we have a == b (mod 3), but a2 = 25 == 1 (mod 3) and b3 = 8 == 2 (mod 3) so a2 ¢ b3 (mod 3).

(d) False! For example, with n = 3, a = 4, b = 1, we have 4 == 1 (mod 3) but 16 ¢ 1 (mod 9).

15. (a) [BB] This is false. Consider r = 5, s = 1, a = 2, n = 4. Then 5 == 1 (mod 4), but 25 ¢ 21 (mod 4) because 25 - 21 = 30 and 4 ~ 30.

94

Solutions to Exercises

(b) This is true. From the identity ra - sa = (r - s)(ra-1 + ra-2s + ra-3 s2 + ... rsa-2 + sa-I), we see that n I (ra - sa).

16. Following the hint, we note that 10 == -1 (mod 11) and so 10k == (_1)k (mod 11) for any natural number k. Since (an-lan-2 ... a3a2alaoho = lOn-lan_1 + lOn-2an_2 + ... + 103a3 + 102a2 + lOal + ao, we have

(an-lan-2 ... a3a2alaoho

== (_1)n-lan_1 + (-1t-2an_2 + ... - a3 + a2 - al + ao (mod 11)

and this is 0 (mod 11) if and only if ao + a2 + ... == al + a3 + ... (mod 11).

17. (a) [BB] Suppose .,fi = ~ for some integers a and b. If a and b have any factors in common, these can be canceled leaving us with an equation of the form .,fi = ~ where a and b have no common factors (except ±1). So we now make this assumption. Then a2 = 2b2, so a2 + b2 = 3b2 == 0 (mod 3). By Problem 23, a and b have 3 as a common factor, which is not true.

(b) As in (a), we assume Vn = alb where a and b are integers with no common factors except ±1.

Then a2 = nb2 == 2b2 (mod 3), so a2 + b2 == 3b2 == 0 (mod 3). By Problem 23,3 I a and 3 I b, which is not true.

18. (a) i. Testing values gives x = 1 or x = 4. ii. Testing values gives x = 1 or x = 6. iii. Testing values gives x = 1 or x = 12.

(b) [BB] If x2 == 1 (mod p), then p I (x2 - 1); that is, p I (x + 1)(x - 1). By Proposition 4.3.7, p I (x + 1) or p I (x - 1); that is, x == -1 (mod p) or x == 1 (mod p). Thus, x = 1 and x = p - 1 are the desired solutions.

19. (a) i. [BB] We have 25 I (x2 - 1), so 25 I (x - 1)(x + 1). Note that it is not possible to have 5 I (x - 1) and 5 I (x + 1), for then we would have 5 I [(x + 1) - (x - 1)) which is not true. Thus, 251 (x + 1) or 25 1 (x - 1). The solutions are x = 1 and x = 24.

ii. The same argument as in i. gives x = 1 and x = 124.

iii. The same argument as in i. gives x = 1 and x = 48.

(b) If x2 == 1 (mod pk), then pk 1 (x2 - 1); so pk 1 (x + 1)(x - 1). We claim that pk 1 (x + 1) or pk I (x - 1), hence, that x == ±1 (mod pk). But if pk divides neither x + 1 nor x - 1, then p I (x + 1) andp 1 (x -1), so p I [(x + 1) - (x -1)]. Thus, p 12, so p = 2, a contradiction. The answers are x = 1 and x = pk - 1.

20. (a) i. x = 1

ii. Testing values gives x = 1 and x = 3.

iii. Testing values gives x = 1, x = 3, x = 5 and x = 7. iv. Testing values gives x = 1, x = 7, x = 9 and x = 15.

(b) If x2 == 1 (mod 2k), then 2k 1 (x + 1)(x - 1). When k = 1, we must have 2 1 (x + 1) or 2 1 (x - 1) by Proposition 4.3.7; hence, x == ±1, x = 1.

When k = 2, we have 41 (z -} 1)(x-1). Clearly x is not even, for otherwise, both x+ 1 and x-I and, hence, (x + 1)(x - 1) would be odd (and not divisible by 4). So x is odd, that is, x == ±1 (mod 4), and again we have only the obvious solutions x == ±1 (mod 4); that is, x = 1, x = 3.

Section 4.4

95

The most complex situation occurs when k ::::: 3, which we assume henceforth. Since 2 I (x + 1)(x - 1), we must have x odd, as before. Since k ::::: 3 and 2k I (x + 1)(x - 1), some power 2£ of 2, with e ::::: 2, must divide either x + 1 or x - 1. Suppose 2£ I (x - 1) with e ::::: 2. Then x + 1 = 2£a + 2 = 2(1 + 2£a), and since e ::::: 2, this means that 2 I (x + 1), but 4 J (x + 1). It follows that e ::::: k - 1. If e ::::: k, we again have the obvious solution x == 1 (mod 2k). However, we have a new possibility; namely, e = k - 1; that is, x == 1 (mod 2k-1). In this case,

is divisible by 2k, so we have a solution. Arguing similarly if 2£ I (x + 1), we obtain the solutions

x = 1, x = 2k-1 - 1, x = 2k-1 + 1, x = 2k - 1.

21. (a) Since 7(8) = 56 == 1 (mod 11), the inverse of 7 (mod 11) is 8. The solution to 7x == 3 (mod 11) is x = 7-1(3) = 8(3) = 24 == 2 (mod 11).

(b) Since 15(3) = 45 == 1 (mod 22), the inverse of 15 (mod 22) is 3. The solution to 15x == 9 (mod 22) is x = 15-1(9) = 3(9) = 27 == 5 (mod 22).

(c) Since 32(5) = 160 == 1 (mod 53), the inverse of 32 (mod 53) is 5. The solution to 32x == 19 (mod 53) is x = 32-1(19) = 5(19) = 95 == 42 (mod 53).

(d) Since 8(14) = 112 == 1 (mod 111), the inverse of 8 (mod 111) is 14. The solution to 8x == 28 (mod 111) is x = 8-1(28) = 14(28) = 392 == 59 (mod 111).

22. (a) [BB] By Fermat's Little Theorem, 188970 == 1 (mod 8971). So 188971 == 18 and 188972 == 182 = 324 (mod 8971).

(b) By Fermat's Little Theorem, 5320,592 == 1 (mod 20,593).

So 5320,593 == 53 and 5320,594 == 532 = 2809 (mod 20,593).

(c) By Fermat's Little Theorem, 3508 == 1 (mod 509). So 3509 == 3 and 3512 == 34 = 81 (mod 509). (d) By Fermat's Little Theorem, 610,588 == 1 (mod 10,589). So 610,589 == 6 and 610,594 == 66 = 46,656 == 4300 (mod 10,589).

(e) By Fermat's Little Theorem, 84056 == 1 (mod 4057). So 84058 == 82 = 64 and 84060 == 84 = 4096 == 39 (mod 4057).

(f) By Fermat's Little Theorem, 23942 == 1 (mod 3943). So 23948 == 26 = 64 (mod 3943). Since (23941)2 == 1 and 2(1971) = 3942 == 1 (mod 3943),2(23941_1971) == O. Since gcd(2, 3943) = 1,23941 - 1971 == 0; that is, 23941 == 1971 (mod 3943).

23. [BB] The key to this problem is the observation that 97 is a prime. Thus, by Fermat's Little Theorem, if x¢.O (mod 97), then x97 == x (mod 97), so x97 - X + 1 == 1 ¢. 0 (mod 97). Since x == 0 (mod 97) is also not a solution, there are no solutions at all.

24. (a) In this case, :S is a partial order.

Reflexivity: For any a E A, a:s a because a(a) == a2 (mod p).

Antisymmetry: If a, b E A, a :S band b :S a, then ab == a2 (mod p) and ba == b2 (mod p). Thus, a(a - b) == 0 (mod p) and b(a - b) == 0 (mod p). It follows that (a - b)(a - b) = a(a - b) - b(a - b) == 0 (mod p) and, hence, that p I (a - b)2. So, by Proposition 4.3.7, p I (a - b); that is, a == b (mod p) and a = b as required.

96

Solutions to Exercises

Transitivity: Suppose a, b, c E A, a :::S band b :::S c; that is, ab == a2 (mod p) and be == b2 (mod p). We want to prove that a :::S c, that is, that ae == a2 (mod p) or, equivalently, that p I (ae - a2). Now we have that (ab)(be) == a2b2 (mod p) and, hence, that p I b2(ae - a2). Again, by Proposition 4.3.7, p I b2 or p I (ae- a2). The latter case is what we want. In the former case, we must have p I b, hence, that ab == 0 (mod p). Therefore, a2 == ab == 0, so a == 0 and again ae - a2 == 0, the desired result.

(b) This is a partial order.

Reflexivity: For any a E A, a:::s a because a(a) == a2 (mod pq).

Antisymmetry: If a, b E A, a :::S band b :::S a, then ab == a2 (mod pq) and ba == b2 (mod pq). Thus, ab == a2 (mod p) and ba == b2 (mod p) and, as in (a), we get a == b (mod p). Similarly, we obtain a == b (mod q). So we have a - b divisible by both p and q. By Exercise 14 of Section 4.3, pq I (a - b), giving a == b (mod pq) as desired.

Transitivity: Suppose a, b, c E A, a :::S band b :::S c; that is, ab == a2 (mod pq) and be == b2 (mod pq). Then ab == a2 (mod p) and be == b2 (mod p) so, as in (a), ae == a2 (mod p). Similarly, ae == a2 (mod q) and so, by Exercise 14 of Section 4.3 again, we get ae == a2 (mod pq) as desired.

(c) This is not a partial order because it is not anti symmetric. In the case n = 12, 0 :::S 6 because 0(6) == 02 (mod 12) and 6 :::S 0 because 6(0) == 62 (mod 12), but 0 f- 6. In general, if n = p2m for some prime p, then 0 :::S pm because O(pm) == 02 (mod n) and pm :::S 0 because (pm)O == (pm)2 (mod n) «(pm)2 = nm), but 0 f- pm.

Exercises 4.5

1. (a) [BB] This number is valid because 1(0) + 2(1) + 3(2) + 4(3) + 5(4) + 6(5) + 7(6) + 8(7) + 9(8) + 10(9) = 330 == 0 (mod 11).

(b) [BB] This number is not valid because 1(0) + 2(4) + 3(3) + 4(2) + 5(0) + 6(9) + 7(1) + 8(0) + 9(5) + 10(5) = 181 == 5 ¢. 0 (mod 11).

(c) This number is not valid because 1(1) + 2(6) + 3(6) + 4(7) + 5(1) + 6(3) + 7(2) + 8(4) + 9(2) + 10(6) = 206 == 8 ¢. 0 (mod 11).

(d) This number is valid because 1(9)+2(4)+3(1)+4(2)+5(8)+6(8) +7(3)+8(1)+9(9)+ 10(6) = 286 == 0 (mod 11).

(e) This number is valid because 1(3)+2(4)+3(9)+4(2)+5(1)+6(6)+7(6)+8(2)+9(7)+10(10) = 308 == 0 (mod 11).

2. (a) [BB] We must have

1(3) + 2(4) + 3(1) + 4(6) + 5(1) + 6(0) + 7(9) + 8(2) + 9(7) + lOA == 0 (mod 11); hence, 185 + lOA == 0 (mod 11), so A = 9.

(b) We must have

l(A) + 2(4) + 3(6) + 4(1) + 5(2) + 6(2) + 7(8) + 8(3) + 9(7) + 10(4) == 0 (mod 11); hence, 235 + A == 0 (mod 11),4 + A == 0 (mod 11), A = 7.

Section 4.5

97

(c) We must have

1(9) + 2(1) + 3(2) + 4(3) + 5(A) + 6(4) + 7(5) + 8(5) + 9(1) + 10(10) == 0 (mod 11); hence, 5A + 237 == 0 (mod 11), 5A + 6 == 0 (mod 11), 5A == 5 (mod 11) and A = 1.

(d) [BB] We must have

1(2) + 2(7) + 3(2) + 4(9) + 5(1) + 6(8) + 7(8) + 8(A) + 9(6) + 10(2) == 0 (mod 11); hence, 8A + 241 == 0 (mod 11), 8A + 10 == 0 (mod 11), 8A == 1 (mod 11) and A = 7.

(e) We must have

1(8) + 2(9) + 3(A) + 4(5) + 5(3) + 6(9) + 7(8) + 8(2) + 9(8) + 10(4) == 0 (mod 11); hence, 3A + 299 == 0 (mod 11), 3A + 2 == 0 (mod 11), 3A == -2 == 9 (mod 11) and A = 3.

3. The first digit A would have to satisfy

I(A) + 2(3) + 3(1) + 4(5) + 5(2) + 6(6) + 7(6) + 8(7) + 9(8) + 10(2) == 0 (mod 11);

hence, A + 265 == 0 (mod 11), A + 1 == 0 (mod 11), and there is no A in the range 0-9 with this property, so no such ISBN number exists.

4. [BB] al + 2a2 + ... + 9ag + 10alO == 0 (mod 11)

~ al + 2a2 + ... + 9ag == -10alO ~ al + 2a2 + ... + 9ag == alO

since -1OalO == alO (mod 11).

5. (a) Suppose the ISBN number al a2 ... alO is correct. Thus a = al + 2a2 + ... + ia, + ... + 10alO == 0 (mod 11). If digit c, is miscopied as z, then the test computes b = al +2a2+' ·+ix+· ·+1OalO' The difference a - b = ia; - ix = i(ai - x), so b == i(x - ai) (mod 11). Now 11 I i(ai - x) implies 11 I i or 11 I (ai - x) (because 11 is prime). Since 1 ~ i ~ 10, the first possibility cannot occur. Since the numbers ai and x are in the range 0-10, ai ¢. x (mod 11) and b ¢. 0 (mod 11) (so the test picks up the error) unless x = ai, in which case there was no error.

(b) The answer is no. From part (a), if an error is made in digit ai, the test computes b == i(x - ai) and this could be the same for different values of i; for example, 11 ... could be miscopied as 21 ... or 17 .... In the first case, b = 1(2 -1) = 1 (mod 11) while, in the second, b = 2(7 -1) = 12 == 1 (mod 11) too.

6. (a) [BB] For example, 2-419713-29-0 is not valid because al + 2a2 + ... + 1OalO = 208 ¢. 0 (mod 11).

(b) For example, 2-4197~3-29-0 is valid because al + 2a2 + ... + 10alO = 220 == 0 (mod 11).

(c) Given an ISBN with digits al, a2, ... , alO, we show that any two digits ai, aj can be changed so that the result is still a valid ISBN.

Let x be any integer such that ai + x ¢. 10 (mod 11). (This ensures that ai + x (mod 11) is a (single) digit.) Replacing ai by the digitc, + x (mod 11) adds ix (mod 11) to the sum al + 2a2 + ... + 10alO. Since 11 is prime, there exists an integer y such that jy == -ix (mod 11). Note that different values of x (mod 11) lead to different values of y (mod 11). Hence, we can find x and y such that a; + x¢. 10 (mod 11), aj + y ¢. 10 (mod 11) and jy == -ix (mod 11). Replacing ai by ai + x and aj by aj + y (both mod 11) gives the desired result.

98

Solutions to Exercises

7. (a) [BB] The given rule is w . a == 0 (mod 11) for a = (aI, a2, ... ,alO) and w = (1,1,1,1,1,1,1,1,1,1).

(b) Suppose an error is made in the ith digit of an ISBN number so that instead of al a2 ai ... alO,

the number appears as ala2 ... a~ ... alO, with a~ =1= ai. Then 0 == al + a2 ... + ai + + alO ¢.

al + a2 + ... + a~ + ... + alO because

[al + a2 + ... + ai + ... + alOl - [al + a2 + ... + a~ + ... + alOl

= ai - a~ ¢. 0 (mod 11)

since ai and a~ are digits between 0 and 9.

(c) Suppose ala2 ... alO is a correct ISBN number. The transposition of ai and ai+l cannot be detected because when we apply ourtestto the incorrect number al ... ai+lai ... alO, we compute

al + ... + ai+l + ai + + alO which is, of course, congruent to 0 (mod 11) because it's the

exactly the same as al + + ai + ai+l + ... + alO.

8. (a) [BB] 1-13579-02468-8; (d) [BB] 0-63042-00635-5;

(b) 1-02468-13579-6; (e) 0-63000-16425-7;

(c) 0-62608-39349-6; (f) 8-29447-1 0493-1 .

9. (a) [BB] Not valid: 3(0 + 2 + 4 + 6 + 8 + 0) + (1 + 3 + 5 + 7 + 9 + 1) = 60 + 26 = 86 ¢. 0

(mod 10).

(b) Not valid: 3(1 + 6 + 2 + 7 + 5 + 1) + (6 + 3 + 6 + 3 + 5 + 5) = 66 + 28 = 94 ¢. 0 (mod 10). (c) [BB] Valid: 3(2 + 2 + 9 + 1 + 3 + 4) + (5 + 9 + 8 + 7 + 9 + 9) = 63 + 47 = 110 == 0 (mod 10). (d) Valid: 3(9 + 3 + 8 + 2 + 6+ 7) + (5 + 8 + 9 + 2 + 8 + 3) = 105 + 35 = 140 == 0 (mod 10). (e) Not valid: 3(8 + 1 + 8 + 1 + 3 + 4) + (4 + 2 + 5 + 9 + 8 + 2) = 75 + 30 = 105 ¢. 0 (mod 10).

10. (a) [BB] We need 3(0 + 2 + 8 + 2 + 1 + 9) + (1 + x + 9 + 9 + 0 + 4) == 0 (mod 10); that is, 66 + (23 + x) == 0, so x = 1.

(b) Weneed3(1+9+4+4+x+6)+(2+3+7+9+2+8) == 0 (mod 10); that is, 72+3x+31 == 0, so 3x == -103 == 7 and x = 9.

(c) Weneed3(4+9+1+1+2+8)+(2+2+7+0+5+x) == 0 (mod 10); that is, 75+(16+x) == 0, sox = 9.

(d) We need 3(5+1+5+x+3+2)+(9+0+7+9+3+2) == 0 (mod 10); that is, 48+3x+30 == 0, so 3x == -78 == 2 and x = 4.

(e) Weneed3(x+9+5+9+9+7)+(7+1+4+1+3+6) == 0 (mod 10); that is, 3x+117+22 == 0, so 3x == -139 == 1 and x = 7.

11. (a) [BB] Suppose the sum of the digits in the odd positions is a and the sum of the digits in the even positions is b. If the check digit in our 'bar code is correct, 3a + b == 0 (mod 10). An error in an even position digit changes b to c ¢. b (mod 10). For the new number, we compute 3a + c ¢. 3a + b and thus, 3a + c¢.O (mod 10). So we know an error has been made.

(b) [BB] Here is a valid number: 3-121;98-66132-9. Changing the 1 and 4 in positions two and four to 8 and 7 respectively produces the number 3-~2Z98-66132-9 which is also valid.

12. (a) Suppose the sum of the digits in the odd positions is a and the sum of the digits in the even positions is b. If the check digit in our bar code is correct, 3a + b == 0 (mod 10). An error in an odd position digit changes a to c ¢. a (mod 10). Note that 3c ¢. 3a (mod 10) since 3 and 10 are relatively prime. Thus, when we compute 3c + b for the new number, we have 3c + b ¢. 3a + b and, thus, 3c + b ¢. 0 (mod 10). So we know an error has been made.

Sign up to vote on this title

UsefulNot useful- Discrete Mathematics With Graph Theory by Edgar G. Goodaire and Michael M. Parmenterby Ana Freitas
- 45825864 Discrete Mathematics With Graph Theory 3rd Editionby Shubham Jain
- Probability and Statistics Book Solutionsby Lieke Lokin
- Edgar G. Goodaire, Michael M. Parmenter, Edgar G Goodaire, Michael M Parmenter-Discrete Mathematics With Graph Theory -Prentice Hall (2001)by Nihar Kandimalla

- Elementary Differential Equations 5th Edition Instructor's Solutions Manual [Edwards-Penney]by gassun20133141
- Student's Solution Manual to Complex Variables and Applications 8th Edby tom_xyz
- Calculus One and Several Variables 10E Salas Solutions Manualby 高章琛
- Herstein Abstract Algebra Student's Solution Manualby Paul Benedict

- Discrete Mathematics With Graph Theory by Edgar G. Goodaire and Michael M. Parmenter
- 45825864 Discrete Mathematics With Graph Theory 3rd Edition
- Probability and Statistics Book Solutions
- Edgar G. Goodaire, Michael M. Parmenter, Edgar G Goodaire, Michael M Parmenter-Discrete Mathematics With Graph Theory -Prentice Hall (2001)
- [Solution] Contemporary Abstract Algebra (J.gallian) (1)
- Mathematical modelling with case studies
- solution manuals introduction to real analysis( Bartle and Sherbert)
- Discrete Mathematics Structures
- Graph Theory With Applications
- Discrete Mathematics With Graph Theory, 3E Goodaire ISM Sample
- Graph Theory & Algorithms - M. Ashraf Iqbal
- graph theory by narsing deo
- Introduction to Graph Theory -- D. B. West
- Graph Theory - Douglas B West - 2 Ed
- Discrete Mathematics With Graph Theory 3rd Edition
- 2. Joseph A. Gallian, Contemporary Abstract Algebra (4th Edition), Narosa Publishing House,
- Elementary Analysis Solutions
- Fundamentals of Digital Logic With VHDL Design Solutions Manual
- Introduction to Analysis Problems and Solutions
- Discrete Mathematics and its Applications - Rosen - 6th Ed - Solutions Manual.pdf
- Elementary Differential Equations 5th Edition Instructor's Solutions Manual [Edwards-Penney]
- Student's Solution Manual to Complex Variables and Applications 8th Ed
- Calculus One and Several Variables 10E Salas Solutions Manual
- Herstein Abstract Algebra Student's Solution Manual
- DELHI UNIVERSITY NOTES 2ND SEMESTER REAL NALYSIS
- Discrete and Combinatorial Mathematics 5th Ed - R. Grimaldi - Solution Manual
- Invitation to Discrete Mathematics
- Joan M. Aldous_ Robin J. Wilson - Graphs and Applications. an Introductory Approach
- Discrete Mathematics 2005
- Calculus, Student Solutions Manual - Anton, Bivens & Davis
- Discrete Mathematics With Graph Theory (3rd Edition)