EPFL - Section de Mathématiques Algebra for Digital Communication Fall semester 2008 Solutions for exercise sheet 1 Exercise 1. i) We will do a proof by contradiction. Suppose 2 a 2 but 2 a. We will obtain a contradiction. Since 2 a we have that a = 2k +1 for some k Z (this follows from the Division theorem). So a 2 = (2k + 1) 2 = 4k 2 + 4k + 1 = 2(2k 2 + 2k) + 1. Hence a 2 is not divisible by 2 (its remainder on division by 2 is 1). But this is a contradiction since we assumed that 2 a 2. ii) The proof again goes by contradiction. Suppose that 2 Q. Then there exist a, b Z with 2 = a b. Without loss of generality we can assume that a and b are relatively prime (if they have a common divisor we can cancel it). Rewriting, we obtain 2 b = a, squaring both sides we obtain 2 b 2 = a 2. Hence 2 a 2 and by part (i) we conclude that 2 a. So a is of the form 2 k for some k Z. Hence 2 b 2 = a 2 = (2k) 2 = 4k 2. Dividing both sides by 2 we obtain b 2 = 2k 2. So we have 2 b 2. By using part (i) again, we obtain 2 b. This is a contradiction since a and b are relatively prime. Exercise 2. 1 of 7
i) a) 14 = 227 0 + 14 227 = 14 1 + 84 14 = 84 1 + 59 84 = 59 1 + 25 59 = 25 2 + 9 25 = 9 2 + 7 9 = 7 1 + 2 7 = 2 + 1 2 = 1 2 + 0 b) The last nonzero remainder is 1, so we have gcd(14, 227) = 1. 272 = 1479 0 + 272 1479 = 272 5 + 119 272 = 119 2 + 4 119 = 4 + 17 4 = 17 2 + 0 The last nonzero remainder is 17, so gcd(272, 1479) = 17. ii) We illustrate two methods. The first is to use the fectorization of the integers, in the second, we first find the greatest common divisor of these pairs and then use the identity gcd(a, b) lcm(a, b) = a b. a) Factoring, we obtain: 56 = 2 7 72 = 2 2. So lcm(56, 72) = 2 2 7 = 504. Alternatively, we use the Euclidean Algorithm: 72 = 56 1 + 16 56 = 16 + 8 16 = 8 2 + 0. The last nonzero remainder is 8, so we have gcd(56, 72) = 8. Hence lcm(56, 72) = 56 72 gcd(56, 72) = 504. 2 of 7
b) Factoring, we obtain: 128 = 2 7 81 = 4. So lcm(128, 81) = 2 7 4 = 1068. Alternatively, we use the Euclidean Algorithm: 128 = 81 1 + 47 81 = 47 1 + 4 47 = 4 1 + 1 4 = 1 2 + 8 1 = 8 1 + 5 8 = 5 1 + 5 = 1 + 2 = 2 1 + 1 2 = 1 2 + 0. The last nonzero remainder is 1, so we have gcd(128, 81) = 1. Hence lcm(128, 81) = 128 81 gcd(128, 81) = 1068. Exercise. i) Using the Euclidean Algorithm, we obtain 14 = 227 0 + 14 227 = 14 1 + 84 14 = 84 1 + 59 84 = 59 1 + 25 59 = 25 2 + 9 25 = 9 2 + 7 9 = 7 1 + 2 7 = 2 + 1 2 = 1 2 + 0 Now substituting backwards, starting from the next to last equation (the replaced expressions are boldface), we get 1 = 7 2 = 7 (9 7 1) = 7 4 9 = (25 9 2) 4 9 = 25 4 9 11 = 25 4 (59 25 2) 11 = 25 26 59 11 = (84 59 1) 26 59 11 = 84 26 59 7 = 84 26 (14 84 1) 7 = 84 6 14 7 = (227 14 1) 6 14 7 = 227 6 14 100. of 7
So we obtain 1 = 227 6 + 14 ( 100). Hence one solution is given by (can you say what all solutions are?). ii) We again apply the Euclidean algorithm: x = 6, y = 100. 272 = 119 2 + 4 119 = 4 + 17 4 = 17 2 + 0. So we have gcd(272, 119) = 17. Substituting backwards: 17 = 119 4 = 119 (272 119 2) = 119 7 272. Hence a solution is given by x = 7, y =. iii) In this case there is no solution in Z. Suppose there would exists x, y Z such that 56x + 72y =. We have gcd(56, 72) = 8. Since 8 56 and 8 72, we would consequently have that 8 56x + 72y =, this is a contradiction. So there cannot be a solution in the integers. iv) Euclidean Algorithm: 10 = 6 1 + 4 6 = 4 1 + 2 4 = 2 2 + 0. Hence gcd(10, 6) = 2. Substituting backwards: So we have 2 = 6 4 1 = 6 (10 6 1) 1 = 6 2 10 1. 2 = 6 2 10 1. Multiplying this equation by 2 (since we want to have 4 on the left hand side of the equation) we get 4 = 6 4 10 2. Hence a solution is given by x = 4, y = 2. Can you find a general pattern, when there exists a solution in the integers and when there is no solution in the integers? In the case that there exists one solution in the integers, how can you find all solutions? Exercise 4. i) Let n be an odd integer. By the division theorem the possible remainders on division of an integer by 4 are 0, 1, 2 and. So, every integer is of the form 4k or 4k + 1 or 4k + 2 or 4k +. Since n is odd, it cannot be of the form 4k or 4k + 2 since then it would be divisible by 2 (4k = 2(2k) and 4k + 2 = 2(2k + 1)). So n is either of the form 4k + 1 or 4k +. 4 of 7
ii) Let n be any integer. By the division theorem the possible remainders on division by are 0, 1 and 2. So, n is either of the form m or of the form m + 1 or of the form m + 2 for some m Z. Squaring, we see that n 2 is either of the form or it is of the form (m) 2 = 9m 2 = k, where k = m 2, (m + 1) 2 = 9m 2 + 6m + 1 = (m 2 + 2m) + 1 = k + 1, where k = m 2 + 2m, or it is of the form (m + 2) 2 = 9m 2 + 12m + 4 = (m 2 + 4m + 1) + 1 = k + 1, where k = m 2 + 4m + 1. So n 2 is either of the form k or k + 1. Exercise 5. i) Basis: We show that the statement holds for n = 1. In this case we have so the statement is true for n = 1. 1 2 = 2 = 1 2, Induction step: We assume that the statement holds for some given n 1 and show that it also holds for n + 1. So assume that for a given n we have 1 2 + 2 + n (n + 1) = Adding (n + 1) (n + 2) to both sides we obtain 1 2 + 2 + n (n + 1) + (n + 1) (n + 2) = n(n + 1)(n + 2). n(n + 1)(n + 2) + (n + 1) (n + 2) n(n + 1)(n + 2) + (n + 1) (n + 2) (n + 1)(n + 2)(n + ) = =. But this is just the statement for n + 1, which we wanted to deduce. Hence we are done. ii) Basis: For n = 1 the statement is true since 1 1! = 1 = 2! 1. Induction step: Assume the statement for a given n 1, i.e. that 1 (1!) + 2 (2!) + (!) + + n (n!) = (n + 1)! 1. Adding (n + 1) (n + 1)! to both sides we obtain 1 (1!) + 2 (2!) + (!) + + n (n!) + (n + 1) (n + 1)! = (n + 1)! 1 + (n + 1) (n + 1)! = (n + 2) (n + 1)! 1 = (n + 2)! 1. This is just the statement for n + 1, so we are done. 5 of 7
Exercise 6. i) The smallest prime number which is not less than 10 is 11. Since we are looking for a composite number, the smallest possibility is 11 11 = 121. ii) The Sieve of Eratosthenes is a method to find a list of all prime number up to a given number n (n = 100 in this case). It is named after the ancient greek mathematician and astronomer Eratosthenes of Cyrene. The methods works as follows: first write down all natural numbers from 2 up to n. Now cross out any multiples of 2 (except 2 itself). The smallest number (after 2) that remains uncrossed (in this case ) will be a prime number (why?). Now cross out any multiples of this number (in this case ) except the number itself. The next smallest number that remains uncrossed will again be a prime. Now cross out any all multiples of this number etc. By generalizing the reasoning in part (i), it follows easily that it is enough to start crossing out at the square of the number whose multiples you are crossing out (if you are crossing out all multiples of p, any number, which is a multiple of p and which is less than p 2 will already have been crossed out, since it has a prime divisor less than p). Clearly you can stop this process once the square of the number whose multiples you are crossing out is not contained anymore in the list (in this case for p = 11). At the end, the numbers remaining uncrossed will be the prime numbers less than n. For n = 100 the result should look as follows: /1 2 /4 5 /6 7 /8 /9 /10 11 /12 1 /14 /15 /16 17 /18 19 /20 /21 /22 2 /24 /25 /26 /27 /28 29 /0 1 /2 / /4 /5 /6 7 /8 /9 /40 41 /42 4 /44 /45 /46 47 /48 /49 /50 /51 /52 5 /54 /55 /56 /57 /58 59 /60 61 /62 /6 /64 /65 /66 67 /68 /69 /70 71 /72 7 /74 /75 /76 /77 /78 79 /80 /81 /82 8 /84 /85 /86 /87 /88 89 /90 /91 /92 /9 /94 /95 /96 97 /98 /99 100 / So the list of all prime numbers less than 100 is as follows: 2,, 5, 7, 11, 1, 17, 19, 2, 29, 1, 7, 41, 4, 47, 5, 59, 61, 67, 71, 7, 79, 8, 89, 97. Note how much the idea of the observation in part (i) speeded up the process. It is based on the fact that every composite number n has a prime divisor p such that p n. Can you prove this? iii) By the sieve above we know that neither of these numbers are prime. Since the smallest composite number now having a prime divisor less than 10 is 121, we know that these numbers must have prime divisors less than 10. So all primes dividing these numbers must be 2,, 5 or 7. By trial divison we see that 91 = 7 1, 87 = 29 and 68 = 2 2 17. Exercise 7. i) Let d = gcd(a, b) and d = gcd(b, a b). To prove that d = d we will show that d d and d d, hence d = ±d. Since the greatest common divisor of two numbers is by definition a positive number, we will conclude that d = d. 6 of 7
Since d is the gcd of a and b, we know that d a and d b. So d a b and d b. Since d = gcd(b, a b), it follows that d d. Conversely, since d is the gcd of b and a b, d divides b and (a b) + b = a. But d = gcd(a, b), so d d. ii) By using part (i) we get gcd(10000124567, 124567) = gcd(10000124567 124567, 124567) = gcd(100000000000, 124567). Now 100000000000 = 10 11 = 2 11 5 11 and 2 124567 and 5 124567. So gcd(100000000000, 124567) = 1 and consequently gcd(10000124567, 124567) = 1. 7 of 7