Homework Problems, Math 134, Spring 2007 (Robert Boltje) 1. Write a computer program that uses the Euclidean Algorithm to compute the greatest common divisor d of two natural numbers a and b and also integers u and v such that d = ua + vb. 2. (a) Let (a, b) = (153680, 79269). Compute d := gcd(a, b) and determine u, v Z satisfying d = ua + vb, both going through the Euclidean Algorithm by hand. Check your answer with the program you wrote. (b) Let (a, b) = (2458437443, 903827662). Now compute d and u, v as in (a), using your own program. 3. Let a and b be natural numbers, set d := gcd(a, b), and let u 0 and v 0 be integers such that d = u 0 a + v 0 b. Show that the set of pairs (u, v) Z Z satisfying d = ua + vb is given as {(u 0, v 0 ) + t(r, s) t Z}, where r := b/d and s := a/d. 4. Let S and T be rings and let R := S T. (a) Show that R is again a ring if one defines (s 1, t 1 )+(s 2, t 2 ) := (s 1 +s 2, t 1 +t 2 ) and (s 1, t 1 ) (s 2, t 2 ) := (s 1 s 2, t 1 t 2 ) for s 1, s 2 S and t 1, t 2 T. What is the zero-element and what is the one-element of R? (b) Show that R = S T. 5. Let R and S be rings and let f : R S be a ring homomorphism. (a) Show that f(0) = 0 and that f( r) = f(r) for all r R. (b) Show that if u R, then f(u) S and f(u) 1 = f(u 1 ). 6. Let R be a commutative ring. Show that the function ( ) a b det: M 2 (R) R, ad bc, c d satisfies det(ab) = det(a) det(b) for all A, B M 2 (R). Is this still true if one drops the commutativity assumption on R?
7. Find x {0,..., 17016} such that the three congruences are simultaneously satisfied. x 3 mod 119 x 2 mod 11 x 8 mod 13 8. Let n = n k 10 k + + n 2 100 + n 1 10 + n 0 with n 0,..., n k {0,..., 9} the digits of n as decimal number. Show that (a) n n 0 + n 1 + n 2 + + n k mod 9. (b) 9 n 9 n 0 + n 1 + + n k. (c) n n 0 n 1 + n 2 + mod 11. (d) 11 n 11 n 0 n 1 + n 2 +. 9. With the notation of Exercise 8, find a similar rule for divisibility by 7. 10. Compute 289 3812 mod 121. 11. Determine the units of the ring Z/30Z and find their inverses. 12. Decide if the matrix ( ) 3 + 1001Z 120 + 1001Z A = M 14 + 1001Z 73 + 1001Z 2 (Z/1001Z) is invertible and if yes, determine its inverse. 13. For a = 286, 12, 5690, determine if the following elements (a + (12001Z) are invertible in Z/12001Z, and if yes, compute the inverse. 14. Let n > 2 be an odd natural number. Show that φ(n) is a power of 2 if and only if n is a product of Fermat primes each of which occurring with multiplicity 1. (One can show that a regular n-gon can be constructed with compass and straight edge if and only if ϕ(n) is a power of 2.) 15. Assume the letters A-Z are labeled by 0,..., 25 and the blank is labeled by 26. Encipher the message everything is ok using the affine cryptosystem for R = Z/27Z with the key (a, b) = (8, 13).
16. Assume that the following message is enciphered with the labeling of letters and the blank as in Problem 15 using an affine cryptosystem for R = Z/27Z. Try to find the key (a,b) using frequency analysis. The message is: 15 8 1 17 13 9 17 10 11 1 9 10 22 2 7 17 21 1 24 22 7 12 17 10 1 21 25 24 11 1 2 17 1 17 8 3 22 26 17 3 1 26 19 11 5 1 11 26 22 1 19 8 16 22 21 9 15 11 19 2 7 17 1 23 25 15 7 19 11 19 17 24 1 1 15 1 10 17 24 11 7 17 24 24 1 19 21 15 18 19 8 15 11 19 22 8 1 15 8 3 1 15 1 9 15 11 19 17 8 11 1 9 17 10 11 19 8 15 16 19 11 0 1 1 5 22 26 15 10 3 1 26 1 17 12 17 24. 17. Decipher the message U?DIPPWKCKIKFBWZERRXTV AXN,FG.SAYCHY VTMIMBG.LHTV KCPEAF?.FSGGZ.YOQMZQL.D WKLHYCHIVT,REEKQMJSLEAFXWWVFMKQQUQEW OQHI.BOG.UN.JGNIZQYESRMOQGNWMTVZHF, OKQYZQBLVNQ.MJSLMKQQUQRXKMJEG.ZH WRM.HYNDV,REE,RGBJR.F?NFHMHGHSFMKTZPDKA?EVJEM W?T MDOYU.FSFYCKWSHKNGEG.LH?N FHMHGHSFOQCCESRM?N,RZBE,.HZZQLIHWWCZ.KHIIJOWIHW..HQQUQUNRMJR.F?TWANUEGSE GTSHFXWZGHDOOQGNVFMKWE,MBFE,.H,XOQWK ZBOTRZON.ECJQLWZFXWZQQUQ.GMZCIG.VZKW V.Q.NXVTG.QQUQ.USFMKBOBFEM WYCHIVTJR.FJLVZGNMJSL?Z QIOWCESRMSFSWSEYRWK under the assumption that it is an affine matrix encryption ( ) using the thirty letters 0 A-Z,,,,.,? with key (A, B) where B =. Also assume that you 0 know that the plaintext message ends with the four letters les. 18. Finish Example 5.4 from class by finding the correct matrix A. 19. Assume you intercept the message PSQIUF and you know it has been enciphered using the affine digraph cryptosystem for the ring R = Z/729Z and the labeling as in Problem 15 with the key (a, b) = (320, 155). Decipher the message. 20. Find primes p, q for yourself such that n := pq is in the range between N 3 = 27, 000 and N 4 = 810, 000 (where N = 30). Find a possible e for the RSA cryptosystem and compute the deciphering exponent d. Send your enciphering
key (n, e) via email to boltje@ucsc.edu. We will make our own phone book for the RSA cryptosystem. 21. Assume that with the RSA cryptosystem somebody s phone book entry is (n, e) = (11247661, 268729) and assume you found out that it is very likely that a 7169e a mod n for all a {0,..., n 1}. Find the prime decomposition of n and the deciphering key (n, d) from this information. 22. Show that if f : G H is a group homomorphism then f(1 G ) = 1 H and f(g 1 ) = f(g) 1 for all g G. 23. Show that for every ring R, the set R of invertible elements forms a group under multiplication. 24. A group G is called cyclic, if there exists an element x G such that every element g G can be written in the form g = x k for some k Z. In this case x is called a generator of G. Assume now that G is cyclic, that x is a generator of G and that G has n elements. Show: (a) For all k, l Z one has: x k = x l if and only if k l mod n. (b) For every k Z one has: x k is a generator of G if and only if gcd(k, n) = 1. 25. (a) Find a generator of the group G = (Z/17Z). (b) Is the group (Z/16Z) cyclic? (c) Is the group (Z/27Z) cyclic? 26. Let G and G be groups and let f : G G be a group homomorphism. (a) Show that if H G and H G, then f(h) := {f(h) h H} G and f 1 (H ) := {g G f(g) H } G. (b) Show that ker(f) G and im(f) G. 27. Find all primitive roots modulo 13. 28. We will soon post the list of keys for the RSA cryptosystem on the class web page. Use the 30-letter alphabet from Problem 17 to send messages to other people. Include a copy to Ted to get credit. 29. Compute the greatest common divisor of the polynomials 2x 5 + 3x 4 + x 2 + 4 and x 4 + 2x 3 + x + 3 in the polynomial ring F [x] with F = Z/5Z.
30. Let F = Z/3Z. Compute an inverse of the polynomial x 2 + x + 1 in F [x] modulo the polynomial x 3 + x 2 + x + 2. 31. Determine all irreducible polynomials in (Z/2Z)[x] of degree 2,3, and 4. 32. Is x 4 + 3x 2 2x + 1 irreducible in (Z/5Z)[x]? 33. Let F = Z/3Z. (a) Show that f = x 2 + x + 2 is irreducible in F [x]. (b) Consider the multiplicative group G of units of the field F [x]/(f). What is the order of G? Find an element that generates G. 34. Construct a field F with 25 elements and find a generator of F. How many such generators are there? 35. Assume you use the knapsack cryptosystem and that you have chosen (v 0,..., v 4 ) = (3, 4, 10, 19, 40), m = 100, and a = 19. (a) What do you publish? (b) Assume that another person wants to send the message YESTERDAY to you, using 5 digit base-2 numbers to label the letters A-Z. What does that person send? (c) You get the message (166, 227, 227, 133). What does it mean? 36. Find a generator of the group (Z/625Z). 37. Consider the prime p = 123121 and the number a := 85734. Find out if the congruence x 2 a mod p has a solution. 38. Find the next prime after the prime p = 123121 using the Solovay- Strassen test. 39. Find a Carmichael number different from 561.