1. Show that if A and B are countable, then A B is also countable. Hence, prove by contradiction, that if X is uncountable and a subset A is countable, then X A is uncountable. Solution: Suppose A and B are countable; letting B := B A B, we have that B is countable by Proposition 14.2.5, and A B = A B. Therefore we can replace B with B and assume that A and B are disjoint sets. We have three cases: Case 1: A and B are both finite, then Theorem 10.2.1 tells us that A B is finite (and hence countable). Case 2: If A is finite and B is infinite, then there is a bijection f : N n A where n = A, and there is a bijection g : Z + B. Then we can define a function { h : Z + f(i) if 1 i n, A B, h(i) := g(i n) if i > n. Then we claim h gives a bijection Z + A B; to see h is injective, suppose h(i) = h(j). We can show i = j with two cases: (i) if h(i) A, then we must have 1 i n and h(i) = f(i) because we have assumed A and B to be disjoint; but then similarly we must have h(j) = f(j), then the injectivity of f implies i = j; or (ii) if h(i) B, then the disjointness of A and B implies i > n and h(i) = g(i n), and similarly h(j) = g(j n), so the injectivity of g implies i n = j n, so i = j. For surjectivity, let x A B; if x A then there exists by surjectivity of f some i N n with f(i) = x, so h(i) = x. Or if x B then we have by surjectivity of g some i Z + with g(i) = x, and then h(i + n) = x. This shows h is bijective so are done with this case; the case where A is infinite and B is finite is done exactly the same with the roles of A and B switched, so we omit this. Case 3: If A and B are both infinite, then we have bijections f : Z + A and g : Z + B, and we define { h : Z + f((i + 1)/2) if i is odd, A B, h(i) := g(i/2) if i is even. Then we claim h is a bijection; this will be very similar to the proof in Case 2. If h(i) = h(j), then if h(i) A then using disjointness of A and B we must have i odd and h(i) = f(i), and similarly h(j) = f(j), and then injectivity of f implies (i + 1)/2 = (j + 1)/2, so i = j; similarly if h(i) B, using the injectivity of g. For surjectivity, if x A B, we have two cases corresponding to whether x A or x B: if x A then surjectivity of f tells us there exists i Z + so that f(i) = x, and then h(2i 1) = x. We have a similar argument if x B, so h is surjective, and thus bijective, so A B is countable in this case. In all three cases we have shown A B is countable, so we are done. For the second part, if X is an uncountable set and A is a countable subset, then if we suppose for a contradiction that X A is countable, then the problem tells us that X = A (X A) is countable, giving a contradiction; we conclude X A is uncountable.
2. Use the Cantor-Shröder-Bernstein theorem to prove that if X Y and Y X then X = Y. Solution: Suppose X Y and Y X. Suppose for a contradiction that X = Y ; then because X Y, by definition we have X > Y. The Cantor-Shröder-Bernstein theorem then implies that any function X Y is not an injection; however, by assumption we have X Y, and by definition this means there exists an injection X Y, which gives a contradiction. Thus we conclude X = Y. 3. Prove that the number of polynomials of degree n with rational coefficients is countable. Deduce that the set of algebraic numbers is countable. Solution: For this proof, it will be important to recall that a countable union of countable sets is countable; that is, if for each n Z + we have a countable set A n, then n Z +A n is a countable set as well. Let Σ n denote the set of monic polynomials of degree n with rational coefficients (to be monic means that the coefficient of x n is equal to 1). If Q denotes the rational numbers then we have a bijection f : Q n Σ n given by f(a 1,..., a n ) = x n + a 1 x + + a n 1 x n + a n. Combining Theorem 14.2.6 and Corollary 14.2.4, we have that Q n is countable, and we conclude that Σ n is countable for all n. It follows from our first remark that Σ := n Z +Σ n is a countable set, and Σ is the set of all monic polynomials rational with coefficients. Now, let A be the set of algebraic numbers. For each monic polynomial with rational coefficients f(x) Σ, we let Z f(x) denote the set of real roots of f(x) (note this is a subset of A because any such root is an algebraic number by definition); then we claim have an equality A = Z f(x). f(x) Σ First, note we ve already remarked that Z f(x) A for all f(x) Σ, which shows the inclusion f(x) Σ Z f(x) A. On the other hand, if α A is an algebraic number it satisfies by assumption an equation of the form α n + a 1 α n 1 + + a n 1 α + a n = 0, where a i Q. Thus taking f(x) := x n + a 1 x n 1 + + a n 1 x + a n Σ n Σ, we have α Z f(x), which shows the inclusion A f(x) Σ Z f(x). This shows the equality. Now we conclude by recalling that any polynomial f(x) of degree n has at most n real roots, so this tells us that Z f(x) is finite for all f(x) Σ. In particular, we have that f(x) Zf is a countable union of finite sets, and is therefore countable, and because this union is equal to A this shows A is countable, which is what we wanted to show.
4. Prove that if n is a perfect square then n = 4q or n = 4q + 1 for some q Z. Deduce that 1234567 is not a perfect square. Solution: By assumption we have n = a 2 for some a Z; we have two cases: Case 1: If a is even then a = 2k for some k Z, and n = a 2 = (2k) 2 = 4k 2, so n = 4q for some q Z. Case 2: If a is odd then a = 2k + 1 for some k Z, and then n = a 2 = (2k + 1) 2 = 4k 2 + 4k + 1 = 4(k 2 + k) + 1, so n = 4q + 1 for some q Z. Using a calculator we can see that 1234567/4 308641.75, so 1234567 = 4(308641) + 3, which shows using Theorem 15.1.1 that 1234567 is not of the form 4q or 4q + 1 for any q Z, and thus 1234567 is not a perfect square. 5. Let gcd(a, b, c) be the greatest common divisor of the three integers a, b, and c. Use Corollary 17.2.1 to prove that gcd(a, b, c) = gcd(gcd(a, b), c). Hence find the greatest common divisor of 11033442, 1102246, and 6035. Solution: Corollary 17.2.1 states that if a, b, d Z, then d divides both a and b if and only if d divides gcd(a, b). Using this we obtain d is a common divisor of a, b, and c (d divides a and b) and d divides c d divides gcd(a, b) and d divides c. Thus the common divisors of a, b, c are the same as the common divisors of gcd(a, b) and c, i.e. D(a) D(b) D(c) = D(gcd(a, b)) D(c), and in particular these two sets must have the same maximal element; but the maximal element of D(a) D(b) D(c) is gcd(a, b, c) by definition and the maximal element of D(gcd(a, b), c) is gcd(gcd(a, b), c) by definition so these two quantities must be equal. Now, we have gcd(11033442, 1102246, 6035) = gcd(gcd(11033442, 1102246), 6035). We will take for granted that gcd(11033442, 1102246) = 578 (this was an exercise in chapter 16, and it can be done using the Euclidean algorithm in the exact fashion as the calculation we are about to make), so that gcd(11033442, 1102246, 6035) = gcd(578, 6035). To compute this, we note that 6035 = 578(10) + 255, so that gcd(578, 6035) = gcd(578, 255). Similarly, we have 578 = 2(255) + 68, so gcd(578, 255) = gcd(255, 68). And then 255 = 4(68) 17, so gcd(255, 68) = gcd(68, 17). But 17 divides 68 so then we get gcd(68, 17) = 17, and putting this all together we conclude gcd(11033442, 1102246, 6035) = 17.
6. Find integers m, n, and p such that 11033442m + 1102246n + 6035p = gcd(11033442, 1102246, 6035). Solution: Looking at our calculations in the last problem, we have 17 = 4(68) 255 = 4(578 2(255)) 255 = 4(578) 9(255) = 4(578) 9(6035 10(578)) = 9(6035) + 94(578). Similarly, one should be able to yield from their calculation of gcd(11033442, 1102246) = 578 that 578 = 803(1103442) 8038(1102246). Putting this together we get 17 = 94(578) 9(6035) = 94(803(1103442) 8038(1102246)) 9(6035) = 75482(1103442) 755572(1102246) 9(6035). Thus we see we can take m = 75482, n = 755572, and p = 9. 7. Prove that if an integer n is the sum of two square n = a 2 + b 2 for a, b Z) then n = 4q or n = 4q + 1 or n = 4q + 2 for some q Z. Deduce that 1234567 cannot be written as the sum of two squares. Solution: Suppose n = a 2 + b 2 for a, b Z. We have three cases: Case 1: If a and b are both even, say a = 2k and b = 2l for k, l Z, then n = a 2 + b 2 = 4k 2 + 4l 2 = 4(k 2 + l 2 ), so n = 4q for some q Z. Case 2: If a is even and b is odd, say a = 2k and b = 2l + 1 for k, l Z, then n = a 2 + b 2 = (4k 2 ) + (4l 2 + 4l + 1) = 4(k 2 + l 2 + l) + 1, so n = 4q + 1 for q Z. The case where a is odd and b is even is handled the same with the roles of a and b switched. Case 3: If a and b are both odd, say a = 2k + 1 and b = 2l + 1, then n 2 = a 2 + b 2 = (4k 2 + 4k + 1) + (4l 2 + 4l + 1) = 4(k 2 + k + l 2 + l) + 2, so n 2 = 4q + 2 for q Z. Now, we ve already seen in Problem 15.5 that 1234567 = 4(308641) + 3, so it is not of the form 4q, 4q + 1 or 4q + 2 for any q Z by Theorem 15.1.1, so 1234567 cannot be written as the sum of two squares.
8. The least common multiple of two non-zero integers a and b is the unique positive integer m such that (i) m is a common multiple, i.e. a divides m and b divides m, (ii) m is less than any other common multiple, i.e. if a and b both divide n then m n. We denote the least common multiple of a and b by [a, b] or lcm(a, b). Give a proof by contradiction that if a positive integer n is a common multiple a and b then [a, b] divides n. Solution: Let m := [a, b]; let n be a positive integer n which is a common multiple of a and b, and suppose for a contradiction that m does not divide n. By the division theorem (Theorem 15.1.1) we can write n = mq + r for integers q, r where 0 r < m, and because m does not divide n by hypothesis we must have r = 0, so 0 < r < m. Now because a divides m, a also divides mq, and because a divides n it follows that a divides r = n mq; similarly, we have that b divides r, so r is a common multiple for a and b. But we ve already noted 0 < r < m, so this gives a contradiction to the fact that m is the least common multiple multiple. Thus we conclude m divides n. 9. Let a and b be positive integers. By the well-ordering principle the non-empty set of positive integers {am + bn m, n Z and am + bn > 0} has a minimum element c. Prove by contradiction that c is a common divisor of a and b and hence give an alternate proof of Theorem 17.1.1. Solution: Let c be the minimum element of this set, so in particular we can write c = am + bn for m, n Z. We will show c divides a: writing c = aq + r for q, r Z and 0 r < a, if we suppose for a contradiction that c does not divide a then this means that r = 0. But then r = c aq = (am + bn) aq = a(m q) + bn, which contradicts the minimality of c because m q and n are integers and r > 0. Thus we conclude that c divides a. A completely analagous argument shows that c divides b, so c is a common divisor of a and b. Furthermore, we can immediately see that if d is any other common divisor of a and b, then d divides am + bn as well, so d divides c and this shows c satisfies the conditions of the greatest common divisor of a and b.
10. Find all positive integers which satisfy the diophantine equation 12563m + 6052n = 9922169. Solution: First we compute solutions to the homogeneous equation 12563m + 6053n = 0. First off, we use the Euclidean algorithm to compute that gcd(12563, 6052) = 17, so dividing by 17 we have 12563m + 6053n = 0 739m + 356n = 0. Now 739 and 356 are coprime so we can apply Proposition 18.3.2 to see that 739 + 356n = 0 (m, n) = (356q, 739q) for some q Z. Now, we need a particular solution (m 0, n 0 ) to the equation 12563m + 6052n = 992169; from our computation of the GCD, we see we can take the particular solution (m 0, n 0 ) = (23852, 49513). Then we have 13563m + 6053n = 9922169 13563(m 23852) + 6053(n + 49513) = 0 739(m 23852) + 356(n + 49513) = 0 (m 23852, n + 49513) = (356q, 739q) for some q Z (m, n) = (356q + 23852, 739q 49513) for some q Z.