Mathematics 228(Q1), Assignment 3 Solutions Exercise 1.(10 marks)(a) If m is an odd integer, show m 2 1 mod 8. (b) Let m be an odd integer. Show m 2n 1 mod 2 n+2 for all positive natural numbers n. Solution.(a) In light of the Division Algorithm, there exists an integer k such that We calculate m = 2k + 1. m 2 = (2k + 1) 2 = 4k 2 + 4k + 1 = 4k(k + 1) + 1. Observing k(k + 1) is even, since k (respectively, k + 1) is even when k is even (respectively,odd), we deduce 8 4k(k + 1), hence m 2 1 mod 8. (b) We will prove the result using induction on n. The base case n = 1 is covered by part (a) above. Assume k 1 and suppose m 2k 1 mod 2 k+2. By definition, there exists an integer q such that m 2k = 1 + 2 k+2 q. Therefore, m 2k+1 = m 2k 2 = (m 2k ) 2 = (1 + 2 k+2 q) 2 = 1 + 2 2 k+2 q + (2 k+2 q) 2 = 1 + 2 k+3 q + 2 2(k+2) q 2 = 1 + 2 k+3 ( q + 2 k 1 q 2). Since k 1, the expression q + 2 k 1 q 2 is an integer, hence the preceding calculation allows us to conclude (PMI) allows us to conclude for all positive integers n. m 2k+1 1 mod 2 k+3. m 2n 1 mod 2 n+2 Exercise 2.(10 marks)(a) If m is a nonnegative integer, show m is congruent modulo 10 to its last digit.(eg. 27 7 mod 10). (b) Show that no perfect square has 2, 3, 7, or 8 as its last digit. (Hint : Work modulo 10.) Solution. (a) If is the decimal expansion of m then m = a k... a 1 a 0 m a 0 = a k... a 1 0 = 10 a k... a 1.
This shows m is congruent modulo 10 to its last digit. (b) Since an integer m is congruent modulo 10 to its last digit a 0, the fact congruence behaves well with respect to multiplication yields m 2 a 2 0 mod 10. In particular, the last digit of m 2 is congruent to that of a 2 0. Using the following table, the last digit of a 2 0, 0 a 0 9 cannot equal 2, 3, 7, or 8; the preceding discussion allows us to conclude that none of the listed numbers can occur as the last digit of a perfect square. a 0 0 1 2 3 4 5 6 7 8 9 a 2 0 0 1 4 9 16 25 36 49 64 81 last digit 0 1 4 9 6 5 6 9 4 1 Exercise 3.(10 marks) Solve the following equations. (a) 25x = 3 in Z 77. (b) 243x + 17 = 101 in Z 725. Solution(a) We note 77 = 3 25 + 2 25 = 12 2 + 1 2 = 2 1. It follows that (25, 77) = 1, so the given equation has a unique solution. To find the solution, we first write 1 as a linear combination of 25 and 77. In light of the preceding calculation, 1 = 25 12 2 = 25 12(77 3 25) = 37 25 12 77. Multiplication by 3 yields We deduce that in Z 77, so the given equation has the solution 3 = 111 25 36 77. 3 = 111 25, x = 111 = 34. (b) We first observe that the given equation is equivalent to the equation 243x = 101 17 = 84. (+) Next, we note 725 = 2 243 + 239 243 = 1 239 + 4 239 = 59 4 + 3 4 = 1 3 + 1 3 = 3 3 We deduce (243, 725) = 1, so the equation (+) has a unique solution. To find it, we write 1 as a linear combination of 234 and 725. In light of the preceding calculations, 1 = 4 1 3 = 4 1(239 59 4) = 60 4 239 = 60(243 1 239) 239 = 60 243 61 239 = 60 243 61(725 2 243) = 182 243 61 725.
Multiplication by 84 yields We conclude that in Z 725, so the given equation has the solution 84 = 15288 243 5124 725. 84 = 15288 243, x = 15288 = 63. Exercise 4.(15 marks) Let n N, n > 1. Let a, b be integers and set d = (a, n). (a) Assuming the equation [a]x = [b] has a solution in Z n, show that d b. (b) Conversely, assume d b. (i) Explain why there exists integers u, v, w, a 1, b 1, and n 1 such that au + nv = d, a = da 1, b = db 1, and n = dn 1. (ii) Show that x = [ub 1 + in 1 ], 0 i d 1, (1) are all solution of the equation [a]x = [b] in Z n. Solution(a) If x = [u] is a solution of the equation [a]x = [b] in Z n then [b] = [a][u] = [au]. The characterization of congruence classes provide in class allows to deduce there exists an integer q such that b = au + nq. Since d divides both a and n, we conclude d b. (b)(i) From class, d = (a, n) is an integral linear combination of a and n, i.e. there exists integers u and v such that au + nv = d. The definition of gcd ensures that d divides both a and n; by hypothesis, d also divides b. Therefore, there exists integers a 1, n 1, and b 1 such that a = da 1, n = dn 1, b = db 1. (ii) Using the notation introduced in (i), if 0 i d 1 then [a][ub 1 + in 1 ] = [a(ub 1 + in 1 )] = [aub 1 + ian 1 ] = [(d vn)b 1 + i(a 1 d)n 1 ] = [db 1 vb 1 n + (ia 1 )(dn 1 )] = [b vb 1 n + ia 1 n] = [b + (ia 1 vb 1 )n] = [b], since b + (ia 1 vb 1 )n b mod n. Thus, the elements are solutions of the equation [a]x = [b] in Z n. [ub 1 + in 1 ], 0 i d 1, Exercise 5.(10 marks) Let the notation be as in Exercise 4. We here assume d b.
(a) Show that the solutions of the equation [a]x = [b] in Z n provided by (1) are distinct. (b) If x = [r] is any solution of [a]x = [b] in Z n then [r] = [ub 1 + in 1 ] for a suitable integer i, 0 i k 1. (Hint : Observe that [ar] [aub 1 ] = [0]. Use this to show first n 1 (a 1 (r ub 1 )), and then deduce n 1 (r ub 1 ).) Solution. We have to show that [ub 1 + in 1 ] = [ub 1 + jn 1 ], 0 i, j d 1, implies that i = j. The equality of congruence classes allows us to deduce that n divides the difference (ub 1 + in 1 ) (ub 1 + jn 1 ) = (i j)n 1. On the other hand, 0 i, j d 1 implies i j (d 1) 0 = d 1 < d. Similarly, Taken together, i j 0 (d 1) = 1 d > d. d < i j < d. Recalling n = n 1 d, multiplication of the last inequality by n 1 > 0 yields n < (i j)n 1 < n. The fact (i j)n 1 is a multiple of n allows us to conclude (i j)n 1 = 0, which entails i j = 0, since n 1 0. (b) If x = [r] is a solution of the equation [a]x = [b] then, recalling x = [ub 1 ] is a solution, [0] = [b] [b] = [a][r] [a][ub 1 ] = [ar aub 1 ] = [a(r ub 1 )]. In particular n divides a(r ub 1 ), say a(r ub 1 ) = nq. Dividing both sides by d = (a, n), we deduce a 1 (r ub 1 ) = n 1 q. ( ) Division of the equality by d yields d = au + nv 1 = a 1 u + n 1 v.
It follows immediately that (a 1, n 1 ) = 1. Since ( ) shows n 1 divides a 1 (r ub 1 ), we deduce n 1 r ub 1, hence there exists an interger s such that r = ub 1 + sn 1. Writing we conclude s = td + i, 0 i d 1, [r] = [ub 1 + sn 1 ] = [ub 1 + (td + i)n 1 ] = [ub 1 + in 1 + tdn 1 ] = [ub 1 + in 1 + tn] = [ub 1 + in 1 ], as required. Exercise 6.(15 marks) Find all the solutions of the following equations. (Hint : You may find the results of exercises 4 and 6 useful.) (a) 36x = 78 in Z 96 (b) 98x = 175 in Z 245 (c) 35x = 63 in Z 77. Solution. (a) We first note 96 = 2 36 + 24 36 = 1 24 + 12 24 = 2 12 It follows that (36, 96) = 12. Observing 78 = 6 12 + 6, we deduce 12 does not divide 78. Thus, the equation 36x = 78 has no solutions in Z 96. (b) We first note 245 = 2 98 + 49 98 = 2 49 It follows that (98, 245) = 49. Observing 175 = 3 49 + 28, we deduce 49 does not divide 175. Thus, the equation 98x = 175 has no solutions in Z 245. (c) We first note It follows that (35, 77) = 7. Observing the equation 77 = 2 35 + 7 35 = 5 7 63 = 7 9, 35x = 63 has 7 distinct solutions in Z 77.
To a find a particular solution, we write 7 = (35, 77) as a linear combination of 35 and 77. Using the calculation performed above, we deduce 7 = 77 2 35. Multiplying the last equation by 63/7 = 9, we obtain Therefore, in Z 77 we have which shows is a particular solution of the equation. Observing 77/7 = 11, the general solution of in Z 77 is 63 = 9 77 18 35. 63 = ( 18) 35, x = 18 35x = 63 x = 18 + 11i, i Z. The distinct solutions are obtained by restricting i to {0,, 7 1 = 6}; the corresponding solution set is { 18, 7, 4, 15, 26, 37, 48}, or equivalently, {59, 70, 4, 15, 26, 37, 48}.