3.13 Exercises

    1. Find integers x and y such that 17x+101y=1.

    2. Find 171(mod101).

    1. Using the identity x3+y3=(x+y)(x2xy+y3),  factor 2333+1 into a product of two integers greater than 1.

    2. Using the congruence 221(mod3),  deduce that 22321(mod3) and show that 2333+1 is a multiple of 3.

    1. Solve 7d1(mod30).

    2. Suppose you write a message as a number m(mod31). Encrypt m as m7(mod31). How would you decrypt? (Hint: Decryption is done by raising the ciphertext to a power mod 31. Fermat’s theorem will be useful.)

  1. Solve 5x+23x7(mod31).

    1. Find all solutions of 12x28(mod236).

    2. Find all solutions of 12x30(mod236).

    1. Find all solutions of 4x20(mod50).

    2. Find all solutions of 4x21(mod50).

    1. Let n2. Show that if n is composite then n has a prime factor pn.

    2. Use the Euclidean algorithm to compute gcd(30030, 257).

    3. Using the result of parts (a) and (b) and the fact that 30030=23571113,  show that 257 is prime. (Remark: This method of computing one gcd, rather than doing several trial divisions (by 2, 3, 5, ...), is often faster for checking whether small primes divide a number.)

  2. Compute gcd(12345678987654321, 100).

    1. Compute gcd(4883, 4369).

    2. Factor 4883 and 4369 into products of primes.

    1. What is gcd(111, 11)? Using the Extended Euclidean algorithm, find 111 mod 111.

    2. What is gcd(1111, 11)? Does 111 mod 1111 exist?

    3. Find gcd(x, 11),  where x consists of n repeated 1s. What can you say about 111 mod x as a function of n?

    1. Let F1=1, F2=1, Fn+1=Fn+Fn1 define the Fibonacci numbers 1, 1, 2, 3, 5, 8, . Use the Euclidean algorithm to compute gcd(Fn, Fn1) for all n1.

    2. Find gcd(11111111, 11111).

    3. Let a=11111 be formed with Fn repeated 1’s and let b=11111 be formed with Fn1 repeated 1’s. Find gcd(a, b). (Hint: Compare your computations in parts (a) and (b).)

  3. Let n2. Show that none of the numbers n!+2, n!+3, n!+4, , n!+n are prime.

    1. Let p be prime. Suppose a and b are integers such that ab0(modp). Show that either a0 or b0(modp).

    2. Show that if a, b, n are integers with n|ab and gcd(a, n)=1,  then n|b.

  4. Let p be prime.

    1. Show that if x20(modp),  then x0(modp).

    2. Show that if k2,  then x20(modpk) has solutions with x0(modpk).

  5. Let p3 be prime. Show that the only solutions to x21(modp) are x±1(modp). (Hint: Apply Exercise 13(a) to (x+1)(x1).)

  6. Find x with x3(mod5) and x9(mod11).

  7. Suppose x2(mod7) and x3(mod10). What is x congruent to mod 70?

  8. Find x with 2x1(mod7) and 4x2(mod9). (Hint: Replace 2x1(mod7) with xa(mod7) for a suitable a,  and similarly for the second congruence.)

  9. A group of people are arranging themselves for a parade. If they line up three to a row, one person is left over. If they line up four to a row, two people are left over, and if they line up five to a row, three people are left over. What is the smallest possible number of people? What is the next smallest number? (Hint: Interpret this problem in terms of the Chinese remainder theorem.)

  10. You want to find x such that when you divide x by each of the numbers from 2 to 10, the remainder is 1. The smallest such x is x=1. What is the next smallest x? (The answer is less than 3000.)

    1. Find all four solutions to x2133(mod143). (Note that 143=1113.)

    2. Find all solutions to x277(mod143). (There are only two solutions in this case. This is because gcd(77, 143)1.)

  11. You need to compute 12345678965537(mod581859289607). A friend offers to help: 1 cent for each multiplication mod 581859289607. Your friend is hoping to get more than $650. Describe how you can have the friend do the computation for less than 25 cents. (Note: 65537=216+1 is the most commonly used RSA encryption exponent.)

  12. Divide 210203 by 101. What is the remainder?

  13. Divide 3987654321 by 11. What is the remainder?

  14. Find the last 2 digits of 123562.

  15. Let p3(mod4) be prime. Show that x21(modp) has no solutions. (Hint: Suppose x exists. Raise both sides to the power (p1)/2 and use Fermat’s theorem. Also, (1)(p1)/2=1 because (p1)/2 is odd.)

  16. Let p be prime. Show that apa(modp) for all a.

  17. Let p be prime and let a and b be integers. Show that (a+b)pap+bp(modp).

    1. Evaluate 77(mod4).

    2. Use part (a) to find the last digit of 777. (Note: abc means a(bc) since the other possible interpretation would be (ab)c=abc,  which is written more easily without a second exponentiation.) (Hint: Use part (a) and the Basic Principle that follows Euler’s Theorem.)

  18. You are told that exactly one of the numbers

    21000+277, 21000+291, 21000+297

    is prime and you have one minute to figure out which one. Describe calculations you could do (with software such as MATLAB or Mathematica) that would give you a very good chance of figuring out which number is prime? Do not do the calculations. Do not try to factor the numbers. They do not have any prime factors less than 109. You may use modular exponentiation, but you may not use commands of the form “IsPrime[n]” or “NextPrime[n].” (See Computer Problem 3 below.)

    1. Let p=7,  13, or 19. Show that a17281(modp) for all a with pa.

    2. Let p=7,  13, or 19. Show that a1729a(modp) for all a. (Hint: Consider the case p|a separately.)

    3. Show that a1729a(mod1729) for all a. Composite numbers n such that ana(modn) for all a are called Carmichael numbers. They are rare (561 is another example), but there are infinitely many of them [Alford et al. 2].

    1. Show that 2101(mod11) and 251(mod31).

    2. Show that 23401(mod341).

    3. Is 341 prime?

    1. Let p be prime and let a0(modp). Let bap2(modp). Show that ab1(modp).

    2. Use the method of part (a) to solve 2x1(mod7).

  19. You are appearing on the Math Superstars Show and, for the final question, you are given a 500-digit number n and are asked to guess whether or not it is prime. You are told that n is either prime or the product of a 200-digit prime and a 300-digit prime. You have one minute, and fortunately you have a computer. How would you make a guess that’s very probably correct? Name any theorems that you are using.

    1. Compute ϕ(d) for all of the divisors of 10 (namely, 1, 2, 5, 10), and find the sum of these ϕ(d).

    2. Repeat part (a) for all of the divisors of 12.

    3. Let n1. Conjecture the value of ϕ(d),  where the sum is over the divisors of n. (This result is proved in many elementary number theory texts.)

  20. Find a number α mod 7 that is a primitive root mod 7 and find a number γ0(mod7) that is not a primitive root mod 7. Show that α and γ have the desired properties.

    1. Show that every nonzero congruence class mod 11 is a power of 2, and therefore 2 is a primitive root mod 11.

    2. Note that 238(mod11). Find x such that 8x2(mod11). (Hint: What is the inverse of 3(mod10)?)

    3. Show that every nonzero congruence class mod 11 is a power of 8, and therefore 8 is a primitive root mod 11.

    4. Let p be prime and let α be a primitive root mod p. Let hαy(modp) with gcd(y, p1)=1. Let xy1(modp1). Show that hxα(modp).

    5. Let p and h be as in part (d). Show that h is a primitive root mod p. (Remark: Since there are ϕ(p1) possibilities for the exponent x in part (d), this yields all of the ϕ(p1) primitive roots mod p.)

    6. Use the method of part (e) to find all primitive roots for p=13,  given that 2 is a primitive root.

  21. It is known that 14 is a primitive root for the prime p=30000001. Let b149000000(modp). (The exponent is 3(p1)/10.)

    1. Explain why b101(modp).

    2. Explain why b1(modp).

    1. Find the inverse of 1161(mod26).

    2. Find all values of b(mod26) such that 11b1(mod26) is invertible.

  22. Find the inverse of 1110(mod2).

  23. Find all primes p for which 3573(modp) is not invertible.

    1. Use the Legendre symbol to show that x25(mod19) has a solution.

    2. Use the method of Section 3.9 to find a solution to x25(mod19).

  24. Use the Legendre symbol to determine which of the following congruences have solutions (each modulus is prime):

    1. X2123(mod401)

    2. X243(mod179)

    3. X21093(mod65537)

    1. Let n be odd and assume gcd(a, n)=1. Show that if an=1,  then a is not a square mod n.

    2. Show that 335=+1.

    3. Show that 3 is not a square mod 35.

  25. Let n=15. Show that (2n)2(n1)/2(mod n).

    1. Show that 365537=1.

    2. Show that 3(655371)/21(mod 65537).

    3. Use the procedure of Exercise 54 to show that 3 is a primitive root mod 65537. (Remark: The same proof shows that 3 is a primitive root for any prime p5 such that p1 is a power of 2. However, there are only six known primes with p1 a power of 2; namely, 2, 3, 5, 17, 257, 65537. They are called Fermat primes.)

    1. Show that the only irreducible polynomials in Z2[X] of degree at most 2 are X,  X+1,  and X2+X+1.

    2. Show that X4+X+1 is irreducible in Z2[X]. (Hint: If it factors, it must have at least one factor of degree at most 2.)

    3. Show that X4X+1, X8X2+1,  and X16X(modX4+X+1).

    4. Show that X151(modX4+X+1).

    1. Show that X2+1 is irreducible in Z3[X].

    2. Find the multiplicative inverse of 1+2X in Z3[X](modX2+1).

  26. Show that the quotients in the Euclidean algorithm for gcd(a, b) are exactly the numbers a0, a1,  that appear in the continued fraction of a/b.

    1. Compute several steps of the continued fractions of 3 and 7. Do you notice any patterns? (It can be shown that the ai’s in the continued fraction of every irrational number of the form a+bd with a, b, d rational and d>0 eventually become periodic.)

    2. For each of d=3, 7,  let n be such that an+1=2a0 in the continued fraction of d. Compute pn and qn and show that x=pn and y=qn give a solution of what is known as Pell’s equation: x2dy2=1.

    3. Use the method of part (b) to solve x219y2=1.

  27. Compute several steps of the continued fraction expansion of e. Do you notice any patterns? (On the other hand, the continued fraction expansion of π seems to be fairly random.)

  28. Compute several steps of the continued fraction expansion of (1+5)/2 and compute the corresponding numbers pn and qn (defined in Section 3.12). The sequences p0, p1, p2,  and q1, q2,  are what famous sequence of numbers?

  29. Let a and n>1 be integers with gcd(a, n)=1. The order of a mod n is the smallest positive integer r such that ar1(modn). We denote r=ordn(a).

    1. Show that rϕ(n).

    2. Show that if m=rk is a multiple of r,  then am1(modn).

    3. Suppose at1(modn). Write t=qr+s with 0s<r (this is just division with remainder). Show that as1(modn).

    4. Using the definition of r and the fact that 0s<r,  show that s=0 and therefore r|t. This, combined with part (b), yields the result that at1(modn) if and only if ordn(a)|t.

    5. Show that ordn(a)|ϕ(n).

  30. This exercise will show by example how to use the results of Exercise 53 to prove a number is a primitive root mod a prime p,  once we know the factorization of p1. In particular, we’ll show that 7 is a primitive root mod 601. Note that 600=23352.

    1. Show that if an integer r<600 divides 600, then it divides at least one of 300, 200, 120 (these numbers are 600/2, 600/3, and 600/5).

    2. Show that if ord601(7)<600,  then it divides one of the numbers 300, 200, 120.

    3. A calculation shows that

      7300600, 7200576, 7120423(mod601).

      Why can we conclude that ord601(7) does not divide 300, 200, or 120?

    4. Show that 7 is a primitive root mod 601.

    5. In general, suppose p is a prime and p1=q1a1qsas is the factorization of p1 into primes. Describe a procedure to check whether a number α is a primitive root mod p. (Therefore, if we need to find a primitive root mod p,  we can simply use this procedure to test the numbers α=2, 3, 5, 6, ... in succession until we find one that is a primitive root.)

  31. We want to find an exponent k such that 3k2(mod65537).

    1. Observe that 2321(mod65537),  but 2161(mod 65537). It can be shown (Exercise 46) that 3 is a primitive root mod 65537, which implies that 3n1(mod65537) if and only if 65536|n. Use this to show that 2048|k but 4096 does not divide k. (Hint: Raise both sides of 3k2 to the 16th and to the 32nd powers.)

    2. Use the result of part (a) to conclude that there are only 16 possible choices for k that need to be considered. Use this information to determine k. This problem shows that if p1 has a special structure, for example, a power of 2, then this can be used to avoid exhaustive searches. Therefore, such primes are cryptographically weak. See Exercise 12 in Chapter 10 for a reinterpretation of the present problem.

    1. Let x=b1b2bw be an integer written in binary (for example, when x=1011,  we have b1=1, b2=0, b3=1, b4=1). Let y and n be integers. Perform the following procedure:

      1. Start with k=1 and s1=1.

      2. If bk=1,  let rksky(modn). If bk=0,  let rk=sk.

      3. Let sk+1rk2(modn).

      4. If k=w,  stop. If k<w,  add 1 to k and go to (2).

      Show that rwyx(modn).

    2. Let x,  y,  and n be positive integers. Show that the following procedure computes yx(modn).

      1. Start with a=x, b=1, c=y.

      2. If a is even, let a=a/2,  and let b=b, cc2(modn).

      3. If a is odd, let a=a1,  and let bbc(modn), c=c.

      4. If a0,  go to step 2.

      5. Output b.

      (Remark: This algorithm is similar to the one in part (a), but it uses the binary bits of x in reverse order.)

  32. Here is how to construct the x guaranteed by the general form of the Chinese remainder theorem. Suppose m1, , mk are integers with gcd(mi, mj)=1 whenever ij. Let a1, , ak be integers. Perform the following procedure:

    1. For i=1, , k,  let zi=m1mi1mi+1mk.

    2. For i=1, , k,  let yizi1(modmi).

    3. Let x=a1y1z1++akykzk.

    Show xai(modmi) for all i.

  33. Alice designs a cryptosystem as follows (this system is due to Rabin). She chooses two distinct primes p and q (preferably, both p and q are congruent to 3 mod 4) and keeps them secret. She makes n=pq public. When Bob wants to send Alice a message m,  he computes x m2(modn) and sends x to Alice. She makes a decryption machine that does the following: When the machine is given a number x,  it computes the square roots of xmodn since it knows p and q. There is usually more than one square root. It chooses one at random, and gives it to Alice. When Alice receives x from Bob, she puts it into her machine. If the output from the machine is a meaningful message, she assumes it is the correct message. If it is not meaningful, she puts x into the machine again. She continues until she gets a meaningful message.

    1. Why should Alice expect to get a meaningful message fairly soon?

    2. If Oscar intercepts x (he already knows n), why should it be hard for him to determine the message m?

    3. If Eve breaks into Alice’s office and thereby is able to try a few chosen-ciphertext attacks on Alice’s decryption machine, how can she determine the factorization of n?

  34. This exercise shows that the Euclidean algorithm computes the gcd. Let a, b, qi, ri be as in Subsection 3.1.3.

    1. Let d be a common divisor of a, b. Show that d|r1,  and use this to show that d|r2.

    2. Let d be as in (a). Use induction to show that d|ri for all i. In particular, d|rk,  the last nonzero remainder.

    3. Use induction to show that rk|ri for 1ik.

    4. Using the facts that rk|r1 and rk|r2,  show that rk|b and then rk|a. Therefore, rk is a common divisor of a, b.

    5. Use (b) to show that rkd for all common divisors d,  and therefore rk is the greatest common divisor.

  35. Let p and q be distinct primes.

    1. Show that among the integers m satisfying 1m<pq,  there are q1 multiples of p,  and there are p1 multiples of q.

    2. Suppose gcd(m, pq)>1. Show that m is a multiple of p or a multiple of q.

    3. Show that if 1m<pq,  then m cannot be a multiple of both p and q.

    4. Show that the number of integers m with 1m<q such that gcd(m, pq)=1 is pq1(p1)(q1)=(p1)(q1). (Remark: This proves the formula that ϕ(pq)=(p1)(q1).)

    1. Give an example of integers mn with gcd(m, n)gt1 and integers a, b such that the simultaneous congruences

      xa(modm), xb(modn)

      have no solution.

    2. Give an example of integers mn with gcd(m, n)>1 and integers ab such that the simultaneous congruences

      xa(modm), xb(modn)

      have a solution.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.208.117