* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download pdf file
Survey
Document related concepts
Transcript
MATH 13150: Freshman Seminar Practice Final Exam Answers 1. Compute 71003 (mod 33). φ(33) = 20, 71000 ≡ 1 (mod 33), so answer is 73 ≡ 13 (mod 33) 2. Suppose Alice wants to send a message to Bob using the RSA algorithm and N = 143, and k = 13. If the secret number she wants to send Bob is “a=4”, what is the encoded message she sends? 413 ≡ 108 (mod 143) 3. Suppose Bob receives the encoded message “2” from Alice, and the messages was encoded using the RSA algorithm with p = 11, q = 13, and k = 37. What is the decoded message? 13 ∗ 37 ≡ 1 (mod 120), so213∗37 ≡ 2 (mod 143). Answer is 21/37 ≡ 213 ≡ 41 (mod 143) 4. Suppose Alice has sent an encoded secret number to Bob using the RSA algorithm. Eve intercepts the encoded message “5” and knows that n = 51 and k = 11. What is the secret number? n=51 gives φ(n) = 32.11 ∗ 3 ≡ 1 (mod 32), so the secret number is 53 ≡ 23 (mod 51) 5. How many numbers divide 211? 2 since 211 = 2111 is prime. 6. How many numbers divide 24 · 3 · 57 · 26? The prime factorization of the number is 25 · 3 · 57 · 13, so it has 6 · 2 · 8 · 2 = 192 factors. 7. How many numbers divide both 24 · 3 · 57 · 26 and 25 · 53 · 133 ? The gcd of the two numbers is 25 · 53 · 13, so there are 6 · 4 · 2 = 48 factors of the gcd, and hence 48 common factors of both. 8. How many numbers divide the least common multiple of 24 · 3 · 57 · 26 and 25 · 53 · 133 ? The lcm of the two numbers is 25 · 3 · 57 · 133 , so there are 6 · 2 · 8 · 4 = 384 factors of the lcm. 9. Are 372 and 561 relatively prime? Answer is no, because 3 divides both. You can also calculate the gcd. 10. (a) How many seven digit phone numbers are there if a phone number cannot begin with 0? 9 · 106 (b) How many seven digit phone numbers are there if a phone number cannot begin with 0, and no digits are repeated? 9·9·8·7·6·5·4 11. A class with 8 boys and 9 girls is choosing a six person team to play baseball against a team from another class. You can express your answer in terms of 5 binomial numbers such as ; you do not need to convert binomial numbers 2 into ordinary numbers. (a) How many different six person teams can be chosen? 17 6 (b) How many six person teams can be chosen with two boys and four girls? 8 9 · . 2 4 (c) How many six person teams can be chosen that are all boys? 8 6 (d) How many six person teams can be chosen that are all girls? 9 6 12. (a) Compute φ(495). 240 (b) How many numbers from 1 to 495 are relatively prime to 495? 240 (c) How many numbers from 1 to 495 are relatively prime to 165? The answer is still 240. Since 495 = 32 · 5 · 11 and 165 = 3 · 5 · 11 have the same prime factors, being relatively prime to 495 is the same as being relatively ptime to 165. (d) How many numbers from 1 to 495 are relatively prime to 495 and also to 101? The answer is 237. We consider the list of numbers from 1 to 495 that are relatively prime to 495. There are 240 numbers on that list. We have to decide how many of these 240 numbers are also relatively prime to 101. Since 101 is prime, the numbers from 1 to 495 that are not relatively prime to 101 are 101, 202, 303, and 404. Of these, 101, 202 and 404 are relatively prime to 495, but 303 is not. So we should omit 101, 202 and 303 from the list, giving 240 − 3 = 237 numbers. 13. There are 4 toppings in the salad bar that you can put on a bowl of lettuce. Assuming you like every topping, how many possible salads can you create with 2 toppings, if the order in which you choose the topics does not matter? How many possible salads can you create with 2 toppings, if the order in which you choose the topics does matter? 4 The answer when order does not matter is 6 = . The answer when order 2 does matter is 12 = 4 · 3. 14. (Unit 4, 1.4) Suppose Cathy is choosing a committee of four students from a class with 14 boys and 12 girls, and 3 chimpanzees, and all mammals are allowed to serve on the committee. (a) How many ways can she choose the committee? 29 The answer is , since there are 24 total students. 4 (b) How many ways can she choose the committee if it must have 2 boys and 2 girls? 14 12 The answer is · . 2 2 (c) How many ways can she choose the committee if it must have 2 boys, 1 girl, and 1 chimpanzee? 14 12 3 The answer is · · = 7 · 13 · 12 · 3. 2 1 1 15. (Unit 2) In this problem a number refers to a number from 0 to 9. (a) How many license plates are there with 3 letters and 3 numbers. The answer is 263 · 103 . (b) How many license plates are there with 3 letters and 3 numbers, if the first and last letter cannot be “X”, and the second number cannot be “6”, and no number can be repeated? The answer is 9 · 9 · 8 · 252 · 26. 16. Explain the answers to the following problems. 40 (a) Does 5 divide ? 20 Yes, because 55 divides the numberator and only 54 divides the denominator, so a factor of 5 remains. 40 (b) Does 35 divide ? 20 40 40 Yes. We already saw that 5 divides . Also, 7 divides since 73 20 20 2 divides the numerator and only 7 divides the denominator, so 35 divides 40 . 20 1001 (c) Does 4 divide ? 998 1001 1001 · 1000 · 999 , and 23 divides the numerator Yes, because = 3·2·1 998 but only 21 divides the denominator, so a factor of 22 remains. 17. Do the following computations mod 44 (hint φ(44) = 20) (a) Compute 520 + 540 + 560 + 580 + 5100 − 5120 (mod 44) 4 (mod 44) (b) Compute 432445 (mod 44). 43 (mod 44) 18. Let a = 32 · 53 · 72 · 115 and let b = 18360. (a) Find the greatest common divisor gcd(a, b) of a and b. Express your answer in terms of its prime factorization and say how many divisors gcd(a, b) has. 32 · 5. There are 6 divisors of the gcd. (b) What is the prime factorization of the least common multiple of a and b? 23 · 33 · 53 · 72 · 115 · 17 There are 4 · 4 · 4 · 3 · 6 · 2 divisors. 1 19. Does (mod 152) exist. Explain why or why not, and if it exists, compute it 13 and express the answer as a positive number. 117 (mod 152) √ 5 20. Does 13 (mod 37) exist? If so, find it. If not, explain why not. 22 (mod 37) 21. These are some password generation problems. I’ve included a number of them, because there was no homework on these kinds of problems. (a) Alice and Bob want to create a password for their next RSA exchange. If Alice picks the prime to be 19 and A = 2, and Alice picks k = 12 and Bob picks l = 5, what is the password? 212·5 (mod 19) ≡ 260 (mod 19) ≡ 7 (mod 19), so the answer is 7. (b) Alice and Bob create a password with p = 31 and A = 11. If Alice chooses k = 3 and Bob tells her that C = Al ≡ 5 (mod 31), what is the password? The answer is 53 ≡ 1 (mod 31). (c) Alice and Bob create a password with p = 19 and A = 2. Suppose Alice chooses k = 6, and Bob tells her that C = B l ≡ 14 (mod 19). If Bob tells Alice that the password is 10, should she believe that it is really Bob? The answer is no. The password is 146 ≡ 7 (mod 19). 22. Suppose a cricket chirps for the first time at 1:00:13 AM (thirteen seconds after 1 AM), and every thirteen seconds after that. (a) What is the seconds reading on your digital clock the 19th time the cricket chirps? The answer is 13 · 19 ≡ 7 (mod 60). (b) Find a value of k so that the kth time the cricket chirps, the seconds reading on your digital clock is 6. The answer is k = 42. To find this, observe that the kth time the cricket chirps, the seconds reading is 13k (mod 60). This will read 6 when 13·k ≡ 1 6 (mod 60). To compute this, show ≡ 37 6 (mod 60), or when k = 13 13 6 (mod 60), so ≡ 6 · 37 ≡ 42 (mod 60). 13 23. For the following fractions, either explain why the fraction does not exist in modular arithmetic or compute it if it does exist. (a) (b) (c) (d) (e) 2 (mod 15) 7 11 1 (mod 224) 21 does not exist, since 7 divides 224 1 (mod 41) 17 29, since 12 · 17 ≡ 1 (mod 41) 1 (mod 323) 31 198, since 31 · 125 − 12 · 323 = −1 7 (mod 308) 21 no since 7 divides 308 24. (a) Compute 732 (mod 120). The answer is 1. Indeed, φ(120) = 32, so 732 ≡ 1 (mod 120) using Euler’s theorem. (b) Compute 7704 (mod 120). The answer is again 1, since 704 is a multiple of 32. (c) Compute 7391 (mod 120). The answer is 103. To find this, note that 32 divides 391 12 times with remainder 7. From this it follows that 7391 ≡ 77 ≡ 103 (mod 120). (d) Compute 12064 (mod 120). The answer is 064 ≡ 0 (mod 120), since 120 ≡ 0 (mod 120). (e) Compute 3035 (mod 120). The answer is 0, but the problem is tricky. To answer it, note that 30 = 2 · 3 · 5, and 120 = 23 · 3 · 5. Thus, 303 = 23 · 33 · 53 is a multiple of 120, so 303 ≡ 0 (mod 120). Hence, 3035 ≡ 303 · 3032 ≡ 0 · 3032 ≡ 0 (mod 120). 25. (a) Compute 536 (mod 37). The answer is 1 by Fermat’s theorem. (b) Compute 5327 (mod 37). 327 ≡ 3 (mod 36), so 5327 ≡ 53 ≡ 14 (mod 37). (c) Compute 7436 (mod 37). 036 ≡ 0 (mod 37). √ 5 26. Compute 3 (mod 17). Since 5 · 13 ≡ 1 (mod 16), the answer is 313 ≡ 12 (mod 17).