* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Solutions to Practice Midterm 2
Survey
Document related concepts
Transcript
Practice Midterm 2 Solutions May 30, 2013 (1) We want to show that for any odd integer a coprime to 7, a3 is congruent to 1 or −1 mod 7. In fact, we don’t need the assumption that a is odd. By Fermat’s theorem, we know a6 ≡ 1 (mod 7) since 7 is prime. But this means that (a3 )2 ≡ 1 (mod 7). But since 7 is prime, this implies a3 ≡ ±1 (mod 7). [Note: it’s crucial that 7 is prime. Otherwise, a number other than ±1 may square to 1]. Note: even if you did not see this trick, you could solve this by proving all the cases mod 7. That is: we cube each of the numbers between 1 and 6 and check that the cube is ±1. Note that by symmetry (e.g. 4 ≡ −3 (mod 7)), we only really need to carry out computations for three numbers and the rest are determined: 13 23 33 43 53 63 ≡ 1 (mod 7) ≡ 1 (mod 7) ≡ −1 (mod 7) ≡ (−3)3 ≡ −(33 ) ≡ −(−1) ≡ 1 (mod 7) ≡ (−2)3 ≡ −(23 ) ≡ −1 (mod 7) ≡ (−1)3 ≡ −1 (mod 7) For the next part: suppose a3 + b3 = c3 . As it stands, this is not an equation mod 7, but in particular it follows that a3 + b3 ≡ c3 (mod 7). Suppose for contradiction that a, b, c are all coprime to 7. Then from what we proved above, a3 , b3 , c3 are all ±1. But there is no way of adding two ±1’s to get ±1, a contradiction. Therefore, one of a, b, c is divisible by 7, so abc is divisible by 7. (2) Fermat’s Little Theorem: if a is not divisible by a prime p, then ap−1 ≡ 1 (mod p). Note: 163 is prime. Let b ∈ Z163 . Case 1: b = 0. Then b = 07 . Moreover, this is unique: if 0 = x7 , it follows that 1 x = 0. Case 2: b 6= 0. Then b has an inverse, and we may apply Fermat’s Little Theorem to b−1 : (b−1 )162 = 1 (in Z163 ). As a shorthand, rewrite this: b−162 = 1. Multiply both sides by b: b−161 = b. But now, note that 7 divides 161, with 161 = 7 · 23, so we may rewrite the left hand side: (b−23 )7 = b. Thus, we have expressed b as the seventh power of b−23 . To show uniqueness, suppose b = x7 . The idea is, apply all the reverse operations to conclude x must be b−23 . Indeed, we are assuming b is a unit, so if b = x7 , x must be a unit, too. So we may raise both sides to the −23rd power: b−23 = (x7 )−23 . The right hand side simplifies: b−23 = x−161 . But now, we know that, since x is a unit, Fermat’s Little Theorem applies and x162 = 1. So we may multiply the right hand side by x162 without changing the equation: b−23 = x−161 x162 = x, as desired. Note: I used equal signs instead of congruence signs because we are working in Z163 rather than Z, so congruent numbers are actually considered equal. Another note: you probably know this, but Z163 is the same as the book’s Z/163Z. (3) First we must find the prime factorization of 341 in order to apply Euler’s Theorem. It is: 341 = 11 · 31. So ϕ(341) = 10 · 30 = 300. So 5300 ≡ 1 (mod 341), so 5340 ≡ 540 (mod 341). So now we must calculate 540 mod 341. This is made easier using the binary trick (but is still pretty tedious). Note: 540 = 532 ·58 . We have: 52 ≡ 25 (mod 341) 54 ≡ 252 ≡ (20 + 5)2 ≡ 202 + 2 · 20 · 5 + 52 ≡ 400 + 200 + 25 ≡ 59 + 200 + 25 ≡ 284 (mod 341). 58 ≡ (284)2 ≡ (−57)2 ≡ 572 ≡ (50 + 7)2 ≡ 502 + 2 · 50 · 7 + 72 ≡ 2500 + 700 + 49 ≡ 3200 + 49 ≡ 10 · 320 + 49 ≡ 10 · (−21) + 49 ≡ −210 + 49 ≡ 131 + 49 ≡ 180 (mod 341) 516 ≡ (180)2 ≡ 182 ·102 ≡ 324·100 ≡ −17·100 ≡ (−17·20)·5 ≡ (−340)·5 ≡ 1·5 ≡ 5 (mod 341). 532 ≡ 52 ≡ 25 (mod 341). So: 540 = 58 · 532 ≡ 180 · 25 ≡ (180 · 5) · 5 ≡ 900 · 5 ≡ (−123) · 5 ≡ (−615) ≡ 67 (mod 341). I tried to use tricks to make the numbers easy to work with by replacing them with easier congruent numbers. Of course, you don’t have to use these tricks. Here is another, probably faster approach: instead of computing the result mod 341 = 11 · 31, compute it separately for 11 and 31, and then piece it back to- 2 gether using the Chinese remainder theorem. Calculations mod 11 and 31 are much quicker than mod 341. I’ll let you carry them out yourselves (use Fermat’s Little Theorem). You end up getting 5340 ≡ 1 (mod 11), 5340 ≡ 5 (mod 31) . Using the Chinese remainder theorem, we can conclude what 5340 has to be mod 341. In fact, we can just start with a guess of 5 and keep adding multiples of 31 until our number has remainder 1 mod 11. Indeed, 5 + 31 + 31 = 67 is the answer. (4) Recall a ring R is an integral domain if it has no zero divisors. The ring Z is an example: whenever a · b = 0, for a, b ∈ Z, we must have a = 0 or b = 0. Thus, Z is an integral domain. However, Z is not a field, since, for example, 2 has no inverse. P P (5) Note 10 ≡ −1 (mod 11). So if n = ri=0 ai 10i , then n ≡ ri=0 ai (−1)i (mod 11) simply by replacing 10 with the congruent number −1. Since ai are the digits of n, this sum is the alternating sum of the digits of n. If n is divisible by 11, then Pr n ≡ 0 (mod 11), so i=0 ai (−1)i ≡ n ≡ 0 (mod 11), so the alternating sum of the digits is also divisible P sum of the digits is P by 11. Conversely, if the alternating divisible by 11, then ri=0 ai (−1)i ≡ 0 (mod 11), so n ≡ ri=0 ai (−1)i ≡ 0 (mod 11), so n is divisible by 11. (6) No. f is multiplicative but not additive. For example, f (1 + 2) = 9 6= 5 = f (1) + f (2). (7) Recall that the kernel of a homomorphism is the set of elements that go to 0. Suppose d|m and consider the homomorphism f : Zm → Zd defined by f ([a]m ) = [a]d . Suppose a is in the kernel of f . Then [a]d = f ([a]m ) = 0. By definition, [a]d = 0 means a is divisible by d. Thus the kernel of f consists of all numbers (between 0 and m − 1) divisible by d. There are m/d such numbers (including 0). (8)Note: a ring R could technically have only one element, call it ∗, where ∗ is both the additive identity 0 and the multiplicative identity 1. We call this ring the trivial ring. It’s not very interesting. Also note: it’s part of the definition of a field that 0 6= 1, so there is no trivial field. Now, suppose F is a field and R is a ring and f : F → R is a homomorphism. Assume R is not the trivial ring. Then I claim f is injective. Recall, to check injectivity of homomorphisms, it suffices to check that if f (x) = 0, then x = 0. Put another way, if x 6= 0, then f (x) 6= 0. Indeed, let x ∈ F and suppose x 6= 0. Since F is a field, it follows by definition that x is a unit. So fix y ∈ F such that y ·x = 1. 3 But then f (y) · f (x) = f (y · x) [since f is a homomorphism] = f (1) = 1 [again since f is a homomorphism]. Thus f (y) · f (x) = 1. But this implies f (x) 6= 0. Indeed, if f (x) were equal to 0, then 1 = f (y) · 0 = 0, which can be true only in the trivial ring, which we assumed we’re not in. (9) You could technically just try all the possibilities (you would only have 10 things to check, by symmetry, as discussed in problem 1). Another thing you could try is factorize: x3 = 1 means x3 − 1 = 0, which can be factored as (x − 1)(x2 + x + 1) = 0. But this is messy. The approach I prefer is, as in 3, to reduce this to mod 3 and mod 7 instead of mod 21. Indeed, by the Chinese remainder theorem, x3 is congruent to 1 mod 21 if and only if it is congruent to 1 mod 3 and it is congruent to 1 mod 7. So we solve these two congruences separately. From problem 1, we know the solutions to x3 ≡ 1 (mod 7) are x ≡ 1, 2, 4 (mod 7). And for x3 ≡ 1 (mod 3), the only solution is x ≡ 1 (mod 3). Since a pair of congruences mod 3 and mod 7 gives rise to a unique congruence mod 21 by the Chinese remainder theorem, there are three solutions to x3 = 1 in Z21 (we didn’t calculate what the solutions are, but we weren’t asked to). (10) Suppose m, n are coprime. By Bezout’s identity, we can write 1 = rm + sn. But then sn = 1 − rm ≡ 1 (mod m). Also sn ≡ 0 (mod n), so sn is the desired solution. Conversely, I want to show that if we can find a common solution x ≡ 1 (mod m), x ≡ 0 (mod n), then m and n must be coprime. Indeed, since x ≡ 1 (mod m), we can write x = 1 + km for some k ∈ Z. Since x ≡ 0 (mod n), we can also write x = ln for some l ∈ Z. Setting these two expressions equal, we get 1 + km = ln, so 1 = ln − km But we know that this implies n and m are coprime. (11) Recall the order of a is the smallest nonzero exponent d such that ad = 1. I will assume we’re allowed to use Fermat’s Little Theorem. Then we know ap−1 = 1, for a ∈ Z∗p . But we’re not yet done. This just tells us d ≤ p − 1. Now, let r be the remainder you get when you divide p − 1 by d. So p − 1 = qd + r, 0 ≤ r < d. So q 1 = ap−1 = aqd+r = (ad ) ar = 1q ar [using the fact that d is the order of a] = ar . We just showed ar = 1. But r < d so if r 6= 0, this contradicts the definition of d as the smallest number such that ad = 1. Thus, we must have r = 0. Since r is the remainder when you divide p−1 by d, d must in fact divide p−1, as desired. To find the order of 3 in Z∗101 , first note 101 is prime. Then by the above, we know the order of 3 must divide 101 − 1 = 100. The candidates are : 1, 2, 4, 5, 10, 20, 25 or 100. We can easily see the order is not 1, 2, 4. We compute: 4 35 = 243 ≡ 2 · 100 + 43 ≡ −2 + 43 ≡ 41 (mod 101). 310 = (35 )2 ≡ (41)2 ≡ 1681 ≡ 16 · 100 + 81 ≡ 16 · (−1) + 81 ≡ 65 (mod 101) Since 310 6≡ ±1, then 320 = (310 )2 6≡ 1. 325 = 35 · (310 )2 = 41 · (65)2 = 41 · 4225 = 41 · (42 · 100 + 25) ≡ 41 · (42 · (−1) + 25) ≡ −41 · 42 + 41 · 25 ≡ −(41)2 − 41 + 1025 ≡ −65 − 41 + 10 · 100 + 25 ≡ −65 − 41 + 10 · (−1) + 25 ≡ −65 − 41 − 10 + 25 ≡ −91 ≡ 10 Since 325 6= ±1, then 350 6= 1. We can stop here and conclude that the only option left is 100, so 3 has order 100. (12) Suppose a ∈ Z∗163 has order 9. So a9 = 1 and 9 is the first nonzero number 3 with this property. So, we might guess that a3 has order 3. Indeed, (a3 ) = a9 = 1 (mod 163). We just want to show that 3 is the smallest nonzero number with k this property. Indeed, suppose 0 < k < 3 and (a3 ) = 1. But this would imply a3k = 1. However, since 0 < k < 3, it follows that 0 < 3k < 9, which contradicts the assumption that 9 is the order of a. (13) (i). We want to solve the system of equations x ≡ 1 (mod 3), x ≡ 3 (mod 5), x ≡ 0 (mod 12). Notice that the moduli 3, 5, 12 are not relatively prime. Indeed, 3 and 12 have a common divisor: 3. So the first order of business is to check whether the equations we’re trying to solve are even consistent. In fact, they’re not. If x ≡ 0 (mod 12), then it would follow that x ≡ 0 (mod 3), which contradicts the requirement x ≡ 1 (mod 3). So there are no solutions to this system of equations. (ii) We want to solve the system of equations x ≡ 1 (mod 3), x ≡ 3 (mod 5), x ≡ 4 (mod 12). Now the equations are consistent: indeed, if x ≡ 4 (mod 12), then x ≡ 1 (mod 3), which is consistent. Note: the equation x ≡ 4 (mod 12) already implies x ≡ 1 (mod 3), so we don’t need the latter. We may throw it away, and reduce our system to two equations: x ≡ 3 (mod 5) x ≡ 4 (mod 12) Once you got here, you could just solve the equation by trial and error. We start out with a guess which works mod 12: x = 4. This does not work mod 5 (as 4 6≡ 3 (mod 5). So, we simply keep adding 12 (which preserves the values mod 12) 5 until it also works mod 5. 4+12 = 16 doesn’t work, but 4+12+12 = 28 does, since 28 ≡ 3 (mod 5). So 28 is a solution. By the Chinese remainder theorem, which applies since 5 and 12 are relatively prime, 28 must be the unique solution mod 5 · 12 = 60. On the other hand, adding a multiple of 60 leaves the remainders mod 5 and mod 12 unchanged, so yields another solution. Thus, the general solution is 28 + 60k, k ∈ Z. But if you want to solve it in a more methodical way, not involving trial and error, here is how. First you want to find values r and s for which the equation 1 = r · 5 + s · 12 holds. Now, we know (see the proof of problem 10) that s · 12 ≡ 1 (mod 5) and s · 12 ≡ 0 (mod 12). Hence, s · 12 is a number we can add without changing the remainder mod 12, and increasing the remainder mod 5 by 1. However, since we’re starting at 4 and want to end up at 3 mod 5, we need to subtract by 1 instead of adding 1. So the answer is: x ≡ 4 − s · 12 (mod 60). Now it remains to find r and s so we can plug them in. We find that r = 5 and s = −2 works. So x ≡ 4 − (−2) · 12 = 28 (mod 60), as above. 6