Solution Sheet 2 1. (i) q = 5, r = 15 (ii) q = 58, r = 15 (iii) q = 3, r = 7 (iv) q = 6, r = 3. 2. (i) gcd (97, 157) = 1 = 34 97 21 157, (ii) gcd (527, 697) = 17 = 4 527 3 697, (iii) gcd (2323, 1679) = 23 = 18 1679 13 2323, (iv) gcd (4247, 2821) = 31 = 2 4247 3 2821. 3. (i) gcd (44517, 15691) = 71, (ii) gcd (173417, 159953) = 17. 4. (i) 5 41 3 68 = 1, (ii) 5 71 3 118 = 1, For (3k + 2, 5k + 3) we have 5 (3k + 2) 3 (5k + 3) = 1, 5. (i) By observation m = 3, n = 2 is a solution, so the general solution is m = 3 + 5k, n = 2 3k for k Z. (ii) Recall, if gcd (a, b) c then we can use Euclid s algorithm to solve ax + by = gcd (a, b), and then multiply through by c/ gcd (a, b) to get an integral solution to am + bn = c. The general solution is then for k Z. ( m 0 + bk gcd (a, b), n 0 ak gcd (a, b) In this example (2, 15) = 1 which divides 4. But we have no need to use Euclid s Algorithm, instead we quickly observe that 1 = 2 7 + 15 1. So, multiplying through by c/ gcd (a, b) = 4/1 = 4, we get 4 = 2 28 + 15 4. Thus m = 28, n = 4 is a particular solution. The general solution is m = 28 + 15k, n = 4 2k for k Z. Note, you might have observed immediately that 4 = 2m + 15n has a particular solution m = 2, n = 0. This leads to the general solution 1 )
m = 2 + 15l, n = 2l for l Z. This is the same set of solutions as above, map between them by l k 2. (iii) Euclid s Algorithm gives 385 = 12 31 + 13 31 = 2 13 + 5 13 = 2 5 + 3 5 = 3 + 2 3 = 2 + 1 Working back we find that 1 = 12 385 149 31. So a particular solution is m = 149, n = 12. The general solution is m = 149 + 385k, n = 12 31k for k Z. (iv) Euclid s Algorithm gives 73 = 41 + 32 41 = 32 + 9 32 = 3 9 + 5 9 = 5 + 4 5 = 4 + 1. Working back we find that 1 = 9 73 16 41. Multiply by 20 to get 20 = 180 73 320 41. So a particular solution is m = 320, n = 180. The general solution is m = 320 + 73k, n = 180 41k for k Z. 2
(v) Divide through by 3 to get 31m + 27n = 1. We quickly find by Euclid s Algorithm that 1 = 7 31 8 27 so a particular solution is m = 7, n = 8. The general solution is m = 7 + 27k, n = 8 31k for k Z. (vi) From Question 2(ii) we know that gcd (527, 697) = 17 and 17 13, hence the Diophantine Equation has no solutions. (vii) Euclid s Algorithm gives 533 = 403 + 130, 403 = 3 130 + 13, 130 = 10 13. Hence gcd (533, 403) = 13. Since 13 52 the equation has solutions. Working back we have 13 = 4 403 3 533. Multiply through by 4 to get a particular solution of m = 12, n = 16. The general solution is m = 12 + 31k, n = 16 41k for k Z, where 31 = 403/13 and 41 = 533/13. (Recall that the general solution is (m 0 + bk/ gcd (a, b), n 0 ak/ gcd (a, b)) for k Z.) 6. If the number of large boxes is x and small boxes y we must have 90x + 70y = 1100 (all prices in pennies). Divide by 10 to get 9x + 7y = 110. Euclid s Algorithm will give a solution x = 6 and y = 8. The general solution is x = 6 + 7t, y = 8 9t, t Z. But note that if t > 0 we have y < 0 while if t < 0 then x < 0. Since it seems reasonable that the number of boxes should be positive the only solution to our question comes from t = 0, i.e. 6 large boxes and 8 small boxes. 7. Write 3s + 5t = v. By the hint given, 6s + 10t + 15u = 4 becomes 2v + 15u = 4. By Question 5(ii) this has a solution v = 28, u = 4. For what s, t do we have 3s + 5t = 28? From question 5(i) we know that 3 ( 3) + 5 2 = 1. Multiply through by 28 and we get a solution (s, t, u) = (84, 56, 4). 3
For a second solution start with v = 2, u = 0. Then a solution to 3s + 5t = 2 could be s = 1, t = 1. Thus we get (s, t, u) = ( 1, 1, 0). Note, you may well have found other answers, you just have to check they are correct by substituting back into the equations. 8. (i) Euclid s Algorithm gives 41 = 31 + 10 31 = 3 10 + 1 Working back gives 1 = 4 31 3 41. Multiply through by 4 to find that 16 is a particular solution to 31x 4 mod 41. The general solution is 16 + 41k, k Z. (ii) Euclid s Algorithm gives 157 = 97 + 60 97 = 60 + 37 60 = 37 + 23 37 = 23 + 14 23 = 14 + 9 14 = 9 + 5 9 = 5 + 4 5 = 4 + 1. I leave it to the student to reverse this and derive 1 = 34 97 21 157. (1) Multiplying through by 2 we see that 68 is a particular solution of 97x 2 mod 157 and the general solution is 68 + 157k, k Z. Actually, (1) was seen in the solution to Question 2(i). (iii) Note that 1679 and 2323 were seen earlier in Question 2(iii), where the greatest common divisor of 23 was found. Since 23 does not divide 21 the congruence 1679x 21 mod 2323 has no solutions. 4
(iv) Divide through by 3 to get 29x 19 mod 35. Euclid s algorithm gives 1 = 5 35 6 29. Multiply through by 19 to find a particular solution of x 6 19 = 114 26 mod 35. The general solution is x 26 mod 35 or, in terms of the initial modulus, x 26, 61 or 96 mod 105. 9. Throughout this question you could use Euclid s Algorithm as in the previous question. But sometimes there are other approaches that work. (i) Look back at Question 5(iii) to find 31 ( 149) 1 mod 385. Multiply through by 4 to find the general solution of x 4 ( 149) = 596 174 mod 385. (ii) Start with 32x 47 47 + 385 mod 385, which gives an even number on the right hand side and thus the possibility of cancelling a factor of 2. In fact 47 + 385 = 432 = 16 27 so we can divide both sides by 16 to get 2x 27 mod 385. Apply the same idea again, so 2x 27 + 385 = 412 mod 385. Divide through by 2 to get x 206 mod 385. (iii) Write the equation as 13 47x (47 73) x = 26x mod 73 Divide through by 13 to get 1 2x mod 73. Perhaps now use the method from (ii) to write 2x 74 mod 73, thus x 37 mod 73 or x 37 36 mod 73. (iv) Divide through by 6 to get 7x 15 mod 26. Looking at a few small x we come across 7 3 5 mod 26. Multiplying by 3 we see that a solution to the congruence is x 9 17 mod 26. In terms of the original modulus, the solutions are x 17, 43, 69, 95, 121, 147 mod 156. 5
10. a) Squaring, 5 2 = 25 16 mod 41, 5 4 (16) 2 10 mod 41, 5 8 10 2 18 mod 41, 5 16 18 2 37 4 mod 41, 5 32 4 2 16 mod 41, 5 64 = 16 2 10 mod 41. b) From this list we note that 5 64 10 5 4 mod 41, and so on dividing through by 5 4 (coprime to 41) gives 5 60 1 mod 41. OR you might note from the list that So 5 20 1 mod 41. 5 16 5 4 4 10 1 mod 41. c) Multiply both sides of 5 2 x 7 mod 41 by 5 58 to get 5 60 x 7 5 58 i.e. x 7 5 58 mod 41. Here 11. Squaring, 7 5 58 = 7 5 32 5 16 5 8 5 2 7 16 ( 4) 18 ( 16) mod 41 38 mod 41. 3 2 = 9 2 mod 11, 3 4 ( 2) 2 4 mod 11, 3 8 4 2 5 mod 11, 3 16 5 2 3 mod 11, 3 32 9 mod 11. So 3 40 = 3 32 3 8 9 5 1 mod 11. Note that 40 35 7 35 ( 4) 35 (4 35 ) mod 11. Also, from this list we see that 4 3 4 mod 11 so we can read off the first few lines below from the list above. 4 2 3 8 5 mod 11, 4 4 3 16 3 mod 11, 4 8 3 32 9 2 mod 11, 4 16 ( 2) 2 4 mod 11, 4 32 4 2 5 mod 11. 6
Thus 40 35 (4 32 4 2 4) (5 5 4) 10 mod 11. Finally, 3 40 + 40 35 1 + 10 0 mod 11. 12. (i) Write the two congruences as x = 3 + 11k and x = 4 + 13l for integers k, l. Equate to get 3 + 11k = 4 + 13l. Thus we get a linear Diophantine equation 11k 13l = 1. Use Euclid s Algorithm to find 11 6 13 5 = 1. We can thus use k = 6 to find a particular solution to the system of x = 69. The general solution is x 69 mod 143. (ii) Multiply the first congruence by 4 (since 4 2 1 mod 7) and the second by 3 (since 3 4 1 mod 11). So we have x 4 mod 7, x 18 7 mod 11. Write x = 4 + 7k and x = 7 + 11l. As before set 4 + 7k = 7 + 11l or 7k 11l = 3. If you look at this you should see a solution, 7 2 11 1 = 3. With k = 2 we get a particular solution to the system of x = 18. The general solution is x 18 mod 77. (iii) Write x = 432 + 527k and x = 324 + 697l so 697l 527k = 432 324 = 108. For this to have solutions we need gcd (697, 527) 108. Looking back to Question 2(ii), Sheet2, we see that gcd (697, 527) = 17 108. Hence there are no solutions of the system. (iv) We have seen both congruences previously. From the solution to Question 8(i), Sheet 2, we can replace 31x 4 mod 41 by x 16 mod 41. From the solution to Question 9(iii), Sheet 2, we can replace 47x 13 mod 73 by x 36 mod 73. Thus x = 16+41k and x = 36+73l and so 41k 73l = 20. We have seen this Diophantine Equation in Question 5(iv), Sheet 2. A solution is k = 320, l = 180. Thus a solution of the system of Diophantine Equations is x = 13104. Hence the general solution is x 13104 1861 mod 2993. (v) The methods from the course only work for pairs of congruences, so we first look at x 1 mod 4 x 2 mod 3. 7
Equating 1 + 4k = 2 + 3l we find a solution of k = 1, l = 1 and so the general solution is x 5 mod 12. Thus we get a second pair of congruences x 5 mod 12, x 3 mod 7. Equating 5 + 12m = 3 + 7n we find a solution of m = 1, n = 2 and thus the general solution x 17 mod 84. 13. (i) n n 2 mod 5 0 0 1 1 2 4 3 4 4 1 So the only residues of squares modulo 5 are 0,1 and 4. If there is an integral solution to 30x 2 23y 2 = 1 then when we look at the equation modulo 5 we find that 23y 2 1 mod 5, i.e. 3y 2 1 mod 5 or, since 3 2 1 mod 5, y 2 2 3 mod 5. Impossible. Note in the table above, (5 n) 2 = 5 2 10n + n 2 n 2 mod 5 so we need only have taken n = 0, 1 or 2 to have found all possible residues. (ii) n n 2 mod 7 0 0 1 1 2 4 3 2 If 5x 2 14y 2 = 1 has a solution then, looking modulo 7, we must have 5x 2 1 mod 7. Since 3 5 1 mod 7 we get x 2 3 mod 7. Impossible. (iii) As in part (i) look at the equation modulo 5. 8