Solutions to Problem Set 6 - Fall 2008 Due Tuesday, Oct. 21 at 1:00

Similar documents
SOLUTIONS TO PROBLEM SET 5. Section 9.1

b) Find all positive integers smaller than 200 which leave remainder 1, 3, 4 upon division by 3, 5, 7 respectively.

6. Find an inverse of a modulo m for each of these pairs of relatively prime integers using the method

Solutions for the 2nd Practice Midterm

Collection of rules, techniques and theorems for solving polynomial congruences 11 April 2012 at 22:02

SOLUTIONS FOR PROBLEM SET 4

Number Theory. Konkreetne Matemaatika

Solutions to Exam 1. Problem 1. a) State Fermat s Little Theorem and Euler s Theorem. b) Let m, n be relatively prime positive integers.

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand.

Solutions for the Practice Final

An interesting class of problems of a computational nature ask for the standard residue of a power of a number, e.g.,

NUMBER THEORY AMIN WITNO

Primitive Roots. Chapter Orders and Primitive Roots

Exam 1 7 = = 49 2 ( ) = = 7 ( ) =

Practice Midterm 2 Solutions

Applications of Fermat s Little Theorem and Congruences

The congruence relation has many similarities to equality. The following theorem says that congruence, like equality, is an equivalence relation.

LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI

MATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August 8, 2005

Assignment 2. Due: Monday Oct. 15, :59pm

LECTURE 3: CONGRUENCES. 1. Basic properties of congruences We begin by introducing some definitions and elementary properties.

University of British Columbia. Math 312, Midterm, 6th of June 2017

Modular arithmetic Math 2320

The Chinese Remainder Theorem

To be able to determine the quadratic character of an arbitrary number mod p (p an odd prime), we. The first (and most delicate) case concerns 2

CMPSCI 250: Introduction to Computation. Lecture #14: The Chinese Remainder Theorem David Mix Barrington 4 October 2013

MODULAR ARITHMETIC II: CONGRUENCES AND DIVISION

Modular Arithmetic. Kieran Cooney - February 18, 2016

CHAPTER 2. Modular Arithmetic

Introduction to Modular Arithmetic

Number Theory/Cryptography (part 1 of CSC 282)

Math 412: Number Theory Lecture 6: congruence system and

Implementation / Programming: Random Number Generation

Math 255 Spring 2017 Solving x 2 a (mod n)

Modular Arithmetic. claserken. July 2016

Math 127: Equivalence Relations

Goldbach Conjecture (7 th june 1742)

Solutions for the Practice Questions

CMPSCI 250: Introduction to Computation. Lecture #14: The Chinese Remainder Theorem David Mix Barrington 24 February 2012

An elementary study of Goldbach Conjecture

1 = 3 2 = 3 ( ) = = = 33( ) 98 = = =

Distribution of Primes

MAT Modular arithmetic and number theory. Modular arithmetic

Discrete Math Class 4 ( )

Data security (Cryptography) exercise book

1.6 Congruence Modulo m

Foundations of Cryptography

Wilson s Theorem and Fermat s Theorem

x 8 (mod 15) x 8 3 (mod 5) eli 2 2y 6 (mod 10) y 3 (mod 5) 6x 9 (mod 11) y 3 (mod 11) So y = 3z + 3u + 3w (mod 990) z = (990/9) (990/9) 1

Introduction. and Z r1 Z rn. This lecture aims to provide techniques. CRT during the decription process in RSA is explained.

Modular Arithmetic and Doomsday

Discrete Square Root. Çetin Kaya Koç Winter / 11

#A3 INTEGERS 17 (2017) A NEW CONSTRAINT ON PERFECT CUBOIDS. Thomas A. Plick

CMath 55 PROFESSOR KENNETH A. RIBET. Final Examination May 11, :30AM 2:30PM, 100 Lewis Hall

UNIVERSITY OF MANITOBA DATE: December 7, FINAL EXAMINATION TITLE PAGE TIME: 3 hours EXAMINER: M. Davidson

by Michael Filaseta University of South Carolina

Number Theory - Divisibility Number Theory - Congruences. Number Theory. June 23, Number Theory

6.2 Modular Arithmetic

Constructions of Coverings of the Integers: Exploring an Erdős Problem

Cryptography Math 1580 Silverman First Hour Exam Mon Oct 2, 2017

Caltech Harvey Mudd Mathematics Competition February 20, 2010

A Quick Introduction to Modular Arithmetic

MATH 13150: Freshman Seminar Unit 15

Goldbach conjecture (1742, june, the 7 th )

ON MODULI FOR WHICH THE FIBONACCI SEQUENCE CONTAINS A COMPLETE SYSTEM OF RESIDUES S. A. BURR Belt Telephone Laboratories, Inc., Whippany, New Jersey

Carmen s Core Concepts (Math 135)

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

DUBLIN CITY UNIVERSITY

Math 319 Problem Set #7 Solution 18 April 2002

Adding Fractions with Different Denominators. Subtracting Fractions with Different Denominators

MTH 3527 Number Theory Quiz 10 (Some problems that might be on the quiz and some solutions.) 1. Euler φ-function. Desribe all integers n such that:

Multiples and Divisibility

Class 8: Square Roots & Cube Roots (Lecture Notes)

PRIMES IN SHIFTED SUMS OF LUCAS SEQUENCES. Lenny Jones Department of Mathematics, Shippensburg University, Shippensburg, Pennsylvania

The Chinese Remainder Theorem

Public Key Encryption

Diffie-Hellman key-exchange protocol

Sheet 1: Introduction to prime numbers.

ALGEBRA: Chapter I: QUESTION BANK

Solutions to Exercises Chapter 6: Latin squares and SDRs

Final exam. Question Points Score. Total: 150

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand.

p 1 MAX(a,b) + MIN(a,b) = a+b n m means that m is a an integer multiple of n. Greatest Common Divisor: We say that n divides m.

A C E. Answers Investigation 3. Applications = 0.42 = = = = ,440 = = 42

SMT 2014 Advanced Topics Test Solutions February 15, 2014

Radical Expressions and Graph (7.1) EXAMPLE #1: EXAMPLE #2: EXAMPLE #3: Find roots of numbers (Objective #1) Figure #1:

Fermat s little theorem. RSA.

Lecture 8. Outline. 1. Modular Arithmetic. Clock Math!!! 2. Inverses for Modular Arithmetic: Greatest Common Divisor. 3. Euclid s GCD Algorithm

ON THE EQUATION a x x (mod b) Jam Germain

Numbers (8A) Young Won Lim 5/24/17

Numbers (8A) Young Won Lim 6/21/17

Zhanjiang , People s Republic of China

Congruence. Solving linear congruences. A linear congruence is an expression in the form. ax b (modm)

Numbers (8A) Young Won Lim 5/22/17

MATH 135 Algebra, Solutions to Assignment 7

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague 7 November, CS1800 Discrete Structures Midterm Version C

An ordered collection of counters in rows or columns, showing multiplication facts.

Degree project NUMBER OF PERIODIC POINTS OF CONGRUENTIAL MONOMIAL DYNAMICAL SYSTEMS

Example Enemy agents are trying to invent a new type of cipher. They decide on the following encryption scheme: Plaintext converts to Ciphertext

CALCULATING SQUARE ROOTS BY HAND By James D. Nickel

Transcription:

18.781 Solutions to Problem Set 6 - Fall 008 Due Tuesday, Oct. 1 at 1:00 1. (Niven.8.7) If p 3 is prime, how many solutions are there to x p 1 1 (mod p)? How many solutions are there to x p 1 (mod p)? The first equivalence is nown to hold for all a 0 (mod p). This is an immediate consequence of Fermat s little theorem, by multiplying by the inverse of a, which exists mod p as long as a 0. So there are p 1 solutions to x p 1 1 (mod p). The second equivalence, on the other hand, has no solutions. This is because by the above reasoning, every integer raised to the p 1 is either congruent to 1, for all coprime integers, or it is congruent to 0, if the integer was itself zero. Since we are assuming that p 3, p so is neither 0 nor 1, so the equivalence has no solutions.. (Niven.8.8) Determine how many solutions there are to: (a) x 1 16 (mod 17) (b) x 48 9 (mod 17) (c) x 0 13 (mod 17) (d) x 18 11 (mod 3). (a) Woring in the modulus 17, the nonzero residues are generated by some element, g, of order 16. So we want to find the powers of g, say g, such that ( g i ) 1 16 (mod 17). Since e 17 (g) = 16, g 8 1 16 mod 17. So we want to find the i with g 1i g 8, which is only true if e 17 (g) 1i 8, or 16 1i 8. This is a solvable congruence mod 16, which is satisfied for i, 6, 10, 14 (mod 16), so there are 4 solutions to the congruence. (b) Here, we are woring in the same modulus, but we notice that 48 = 3 16, so x 48 (x 16 ) 3 1 (mod 17). So there are no solutions to this equivalence. (c) Using the notation from the first part, we note that 13 ( 4) 16 1 g 8 (mod 17). So this implies that either g 4 13 or g 1 13. Since substituting g 1 for g switches these two options, we can assume without loss of generality that our original choice of g has g 4 13. So we want to find the i (mod 16) with ( g i ) 0 g 4 (mod 17). Since the powers of g operate additively mod 16, this is equivalent to finding the i with 0i 4 (mod 16). We can easily solve this, we get the solutions i 1, 5, 9, 13 (mod 16). So there are 4 solutions.

(d) By taing powers of 11, we can find that 11 6 (mod 3) and 11 11 1 (mod 3). Since we now the order of 11 must divide p 1 =, these congruences imply that 11 is a primitive root for 3. So we can tae g = 11, and we want to find an i such that (g i ) 18 g (mod 3) Now, we convert this to a congruence in the exponents mod : 18i 1 (mod ). We can immediately see that this has no solutions, because the greatest common divisor of 18 and is, which doesn t divide 1. So the fourth congruence has no solutions. 3. (Niven.8.13 &.8.3) Show that {1,,..., (p 1) } is a reduced residue system modulo p iff (, p 1) = 1. We can solve this problem similarly to the way the last problem was solved, by using the power of a primitive root mod p. So let g be a primitive root for p. Then we want to now for what is the list of th powers a reduced residue system modulo p. This is just asing for what does x b have a solution for every b 0. So let s write b as g i, and we want to determine if we can always find some x which we can write as g j such that ( g j) g i (mod p). Exactly as above, we can rewrite this as a congruence on the exponents mod (p 1): j i (mod (p 1)). So we want to now, for what is this congruence always solvable for j? And from our nowledge of modular arithmetic, we now that there is a solution exactly when (, p 1) = 1, because then is invertible mod p. (Bonus) Suppose that {r 1, r,..., r φ(m) } is a reduced residue system modulo m. {r1, r,..., r φ(m) } is a reduced residue system if and only if (, φ(m)) = 1. Show that 4. (Niven.8.14) Suppose that e p (a) = h and that a satisfies a a 1 (mod p). Show that e p (a) = h as well. Furthermore, if a g i (mod p) for some primitive root g, show that a g p 1 i (mod p). The first statement comes from the following relation: 1 a a (a a) a a (mod p). Therefore a 1 exactly when a 1, so they have equal orders. Now we let a g i (mod p). Since we now g is a primitive root, we have that g j a (mod p) for some 1 j p 1. But 1 a a g i g j g i+j (mod p). Since the order of g is p 1, we have that (p 1) (i + j), and from the inequalities of i and j, we have that i + j = p 1, or j = p 1 i, and we are done.

5. (Niven.8.18) Show that if g and g are both primitive roots modulo an odd prime p, then gg is not a primitive root. (Hint: Use the fact that p 1 is even.) We now that p 1 is even, and it is the order of both g and g. So this implies that g p 1 g p 1 1 (mod p). The reason this follows is we now these two powers of generators cannot be 1, by their orders, but must square to 1, so we get that they must be 1. So then we have that ) ) (gg ) p 1 (g p 1 (g p 1 1 1 1. Therefore the order of gg is at most p 1 < p 1, so gg is not a primitive root. 6. Recall from PSet 5 that g = 5 is a primitive root modulo 3. Which number(s) of the form 5 + 3 (with 0 ) is not a primitive root modulo 3? We are given 5 as a primitive root of 3. Then from wor in class, we now numbers of the form 5 + 3 are primitive roots of 3 = 59 unless 53 5 (mod 3). We 3 calculate that 5 3 8 (mod 59). This implies that 5 + 3 is not a primitive root modulo 59, for 0 only when = 8 5 3 7. Find a primitive root for the following moduli: (a) m = 7 4 = 1. (b) m = 11 3 (c) m = 13. (a) By inspection, 3 is a primitive root for 7. Then by the formula above, the only number of the form 3 + 7 that is a primitive root for 7 = 49 is when = 4, so in particular 3 is still a primitive root for 49. Then we move up to 7 4 = 401. Once you get to the third power of an odd prime modulus, any number that was a primitive root for p will still be a primitive root for p i for i >. This is because we now that the unit group has a primitive root, and then number of such roots is φ(φ(p i )) = φ(p i 1 (p 1)) = φ(p i 1 )φ(p 1) = p i (p 1)φ(p 1) = p p i (p 1)φ(p 1) = p φ(φ(p i 1 )). So the number of primitive roots is multiplied by p as we change the mod from p i 1 to p i, so every primitive root must stay a primitive root. Therefore 3 is a primitive root for 7 4. (b) For 11, we find that is a primitive root. Then moving up to 11 = 11, the for which + 11 is not a primitive root is 11 11 186 10 (mod 11). So in particular, remains a primitive root for 11. Then by the logic above it is also a primitive root for 11 3.

(c) For a number to be a primitive root mod 13, it must be a primitive root for 13 and also be odd. Then its order mod 13 is φ(13 ), so this is a lower bound for its order mod 13, but since φ( 13 ) = φ(13 ), this implies it is a primitive root for 13. So we find a primitive root for 13. The first step is to find a root for 13, suffices upon inspection. So then we move to 13 = 169. We calculate the for which + 13 fails to be a primitive root, it is 13 6 (mod 13). 13 So in particular, is still a primitive root mod 169. But we want an odd primitive root. This is easily solved: we can just tae + 169 = 171. Then this is an odd primitive root mod 169, so it is a primitive root mod 169 = 338. So 171 is our answer. 8. Consider the sequence 9, 99, 999 (= 3 3 37), 9999 (= 3 11 101),.... Prove that every prime p, 5 appears as a factor of some term in this list. Hint: Note that 10 n 1 = 99... 9, with length n. The sequence is written in a rather awward way, we rewrite the terms using the hint as a n = 10 n 1. So given a prime p, we want to show that for some n, p a n. Well, p a n p (10 n 1) 10 n 1 (mod p). So we have reduced it to showing that some power of 10 is congruent to 1 mod p. Since p is assumed to not divide 10, 10 must have an order mod p, and this power of 10 will be congruent to 1 mod p. So we are done. 9. Consider the decimal expansions 1/7 = 0.14857 /7 = 0.85714 3/7 = 0.48571 1/11 = 0.09 /11 = 0.18 3/11 = 0.7 1/13 = 0.07693 /13 = 0.153846 3/13 = 0.30769. Prove that for a prime p, 5, the fraction a/p for 1 a p 1 is repeating with period length e p (10). The tric to this problem is to delve into the algorithm that generates the decimal expansions of fractions, namely, long division. We can rewrite the division that calculates the decimal expansion of 1 7 in the following way: 1 = 7 0 + 1 10 = 7 1 + 3 30 = 7 4 + 0 = 7 + 6 60 = 7 8 + 4 40 = 7 5 + 5 50 = 7 7 + 1 10 = 7 1 + 3

So we begin by performing our fraction division in the integers, and the quotient is the integer part of the decimal (in the above case, this is 0). Then, from each step, to get the next decimal place, we tae the previous remainder, multiply it by 10, and then divide by our denominator, 7. The quotient is the next decimal place, and we get a new remainder. The process repeats as soon as our original remainder is achieved a second time. But if we loo at the above equations mod 7, the 7 q part all drops out, and we just have the next remainder in the algorithm is congruent to 10 times the previous remainder, mod 7. So, by a quic induction argument, the nth remainder is congruent to 10 n times the zeroth remainder. So the remainder repeats exactly when 10 n 1 (mod 7), so for n = e 7 (10). This argument is easily generalizable, so the length of the repeating part of a decimal with denominator p is always e p (10). 10. (Niven 1.4.1 & 1.4.) Use the binomial theorem to show that (a) = n (b) ( 1) = 0. (a) Well, the binomial theorem states that, for integers x, y, n, (x + y) n = x n y. So setting x = y = 1, we obtain (1 + 1) n = But the left hand side is obviously just n. 1 n 1 = (b) Here we can set x = 1, y = 1. We get (1 + 1) n = 1 n ( 1) =. ( n ( 1) Once again, the left hand side is easily computable, this time it is 0. 11. (Niven.7.3) Solve x 3 + x + 57 0 (mod 5 3 ). We solve this problem by solving mod 5 and then mod 5. First, mod 5 we only have to seach for a solution to x 3 + x + 0 (mod 5) by checing the value of the equation at 0, 1,, 3, and 4. We find that the only solution is 4, or 1. Then a solution mod 5 = 5 must be of the form 1 + 5. So once again we only have to chec if x 3 + x + 7 0 (mod 5) for five numbers, say 6, 1, 4, 9 and 14. It holds for 4, and none of the others. So now we only need to chec 4, 9, 54, 79, 104 for the polynomial mod 15. But in fact we immediately find that 4 again is a solution. So we can then factor the cubic mod 15: x 3 + x + 57 (x 4)(x + 4x + 17) (mod 15). Then we chec and find that the quadratic factor has no solutions mod 5, so the original polynomial has no solutions mod 15 other than 4. ).