Sei sulla pagina 1di 4

Mathematics 342. Solutions for Problem Set 1 Problem 1. Find gcd(189, 924).

Solution: We use the Euclidean algorithm with a = 924 and b = 189: 924 = 189 4 + 168 189 = 168 1 + 21 168 = 21 8 + 0 gcd(189, 924) = last non-zero remainder = 21. Problem 2. Find gcd(8a + 3, 5a + 2), where a is an integer. Solution: We showed in class that gcd(x, y) = gcd(y, x ny) for any integer n. Using this formula repeatedly, with n = 1 (the rst three times) and then with n = 2, we obtain gcd(8a + 3, 5a + 2) = gcd(5a + 2, 3a + 1) = gcd(3a + 1, 2a + 1) = gcd(2a + 1, a) = gcd(a, 1) = 1 . Note that the above calculation is valid for any integer value of a. Problem 3. Show that gcd(ab, ac) = a gcd(b, c) for any integers (a, b, c), where a > 0 and (b, c) = (0, 0). Solution: gcd(ab, ac) = minimal positive value of abx + acy, as x, y range over the integers = minimal positive value of a(bx + cy), as x, y range over the integers = a minimal positive value of bx + cy, as x, y range over the integers = a gcd(b, c). Problem 4. Let x and y > 0 be real numbers (not necessarily integers). (a) Show that there exists an integer q and a real number 0 r < y such that x = yq + r. That is, we can divide x by y with remainder, even if they are not integers. (b) Using division with remainder in part (a), we can carry out the Euclidean algorithm, starting with x > y > 0, to produce a sequence of remainders r0 > r1 > r2 > r3 > . . . > 0, where r0 = x, r1 = y, r2 = r, r3 is the remainder of division of r1 by r2 , etc. Show that this algorithm terminates, i.e., rn = 0 for some n, if and only if x/y is a rational number. 1 (c) Show that rn+2 < rn for every n 0. Conclude that limn rn = 0. 2 x x Solution: (a) Let q be the largest integer . Then 0 q < 1. y y Multiplying both sides of this inequality by y, we obtain 0 x qy < y. Now set r = x qy, so that x = qy + r, and 0 r < y, as desired. x x a (b) First suppose is a rational number, say, = for some positive y y b y integers a and b. Since x > y, we must have a > b. Let = . Then x = a, b
1

y = b. Denote the sequence of remainders produced by the Euclidean algorithm for (a, b) by s0 , s1 , s2 , . . .. Then the Euclidean algorithm for (x, y) and the Euclidean algorithm for (a, b) are closely related: the quotients qn are the same, and the remainders dier by a factor of . That is, r0 = s0 , r1 = s1 , r2 = s2 , etc. Note that a and b are positive integers, so the Euclidean algorithm for (a, b) will terminate. In other words, sn = 0 for some n. Then rn = sn = 0 for the same n. Conversely, suppose the Euclidean algorithm for (x, y) terminates, i.e., rn = 0 for some n. We want to show that x/y is a rational number. I claim that then every remainder ri is an integer multiple of the last nonzero remainder rn1 . That is, rm = tm rn1 for every m = 0, 1, . . . , n 1. t0 x is a rational If we can prove this, then x = t0 rn1 , y = t1 rn1 and = y t1 number. It remains to prove the claim. We do this recursively, going back from rn = 0 rn1 and rn1 = 1 rn1 to rn2 , to rn3 , etc. Indeed, by denition, ri = ri+1 qi+1 + ri+2 for i = 0, 1, . . . , n 2. Here each qi+1 is an integer. Now divide both sides by rn+1 : ri ri+1 ri+2 = qi+1 + . rn1 rn1 rn1 So, if we know that ri+1 ri+2 and rn1 are both integers, then so is rn1 completes the proof of the claim.
ri rn1 .

This

(c) For notational simplicity, let us denote rn by x, rn+1 by y and rn+2 by r. Here r is the remainder when we divide x by y, as in part (a). We x want to show that r < . We proved in class that this is the case if x and 2 y are positive integers. The argument is exactly the same in general; I will reproduce it for the sake of completeness. We consider two cases. x x Case 1. y . In this case r < y , and there is nothing to prove. 2 2 x Case 2. y > . Then q = 1, because 2y > x. In this case 2 x x r < x qy = x y < x = 2 2 as desired. Now 0 < r2n+1 < r2n < a , so limn an = 0. 2n

Problem 5. Use the Euclidean algorithm to nd integers x and y such that 102x + 1001y = 1.

Solution: First we perform the Euclidean algorithm: 1001 = 9 102 + 83 102 = 1 83 + 19 83 = 4 19 + 7 19 = 2 7 + 5 7=25+2 5 = 2 2 + 1, then use back substitution, to nd x and y: 1=522 = 5 2(7 5) = (2) 7 + 3 5 = (2) 7 + 3 (19 2 7) = 3 19 8 7 = 3 19 8 (83 4 19) = (8) 83 + 35 19 = (8) 83 + 35 (102 83) = 35 102 43 83 = 35 102 43 (1001 9 102) = (43) 1001 + 422 102 Thus we can take x = 422 and y = 43. Problem 6. Let gcd(a, b, c) denotes the the greatest common divisor of three integers a, b, c. Let us assume that a > 0. (a) Show that gcd(a, b, c) = gcd(gcd(a, b), c). (b) Explain why there exist integers x, y, z such that ax + by + cz = gcd(a, b, c) and how to nd them using the Euclidean algorithm. (c) Use your method to nd integers x, y, z such that 15x + 10y + 6z = 1. Solution: (a) It is enough to show that (a, b, c) have the same common divisors as (gcd(a, b), c). Suppose d divides both gcd(a, b) and c. Then clearly d divides a, b and c. Conversely, suppose e divides a, b, and c. Then since gcd(a, b) can be written as sa + tb, for some integers s and t, e also divides gcd(a, b). Thus e divides both gcd(a, b) and c. We have thus shown that that (a, b, c) and (gcd(a, b), c) have the same common divisors. Hence, they also have the same greatest common divisor. (b) First we nd integers s and t so that as + bt = gcd(a, b). This can be done using the Euclidean algorithm and back substitution, as in Problem 5 above. Then, in a similar manner, we nd integers v and z so that gcd(a, b)v + cz = gcd(gcd(a, b), c). Now gcd(a, b, c) = gcd(gcd(a, b), c) = gcd(a, b)v + cw = (as + bt)v + cz = a(sv) + b(tv) + cz . (c) Here gcd(15, 10) = 5 and gcd(5, 6) = 1. We write 5 = 15 10 and 1 = 6 5. Now 1 = 6 5 = 6 (15 10) = 15 (1) + 10 (1) + 6 (1). Problem 7. Recall that n! is, by denition, the product of the rst n positive integers. For example, 3! = 1 2 3 = 6 and 5! = 1 2 3 4 5 = 120.

Find the least positive residue of 1! + 2! + + 100! (mod n), where (a) n = 6, (b) n = 14, (c) n = 24. Solution: (a) For any n 3, n! is divisible by 1 2 3 = 6. In other words, n! 0 (mod 6). Thus 1! + 2! + + 100! 1! + 2! 1 + 2 3 (mod 6) , (c) Similarly, for any n 4, n! is divisible by 1 2 3 4 = 24, i.e., n! 0 (mod 24). Thus 1! + 2! + + 100! 1! + 2! + 3! 1 + 2 + 6 9 (mod 24) , (b) For any n 7, n! is divisible by 2 7 = 14. On the other hand, 4! 24 4 (mod 14), 5! 5 4! 5 (4) 20 8 (mod 14) and 6! 6 5! 6 8 48 6 (mod 14). Thus 1!+2!+ +100! 1!+2!+3!+4!+5!+6! 1+2+64+8+6 19 5 (mod 14) .

Problem 8. Is there an integer a such that a 3 (mod 9) and a 13 (mod 36)? Find one or explain why it cannot exist. Solution: No. The second congruence translates into a13 = 36n, where n is an integer. Thus a 36t + 13 13 4 (mod 9), which is incompatible with the rst congruence. Note that the Chinese Remainder Theorem does not apply here because 9 and 36 are not relatively prime.

Potrebbero piacerti anche