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

Similar documents
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.

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

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

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:

Solutions for the Practice Questions

SOLUTIONS TO PROBLEM SET 5. Section 9.1

Quadratic Residues. Legendre symbols provide a computational tool for determining whether a quadratic congruence has a solution. = a (p 1)/2 (mod p).

Math 124 Homework 5 Solutions

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

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

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

Is 1 a Square Modulo p? Is 2?

Solutions for the Practice Final

NUMBER THEORY AMIN WITNO

SOLUTIONS FOR PROBLEM SET 4

MT 430 Intro to Number Theory MIDTERM 2 PRACTICE

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

Practice Midterm 2 Solutions

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

MATH 118 PROBLEM SET 6

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

Math 127: Equivalence Relations

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

Carmen s Core Concepts (Math 135)

Introduction to Modular Arithmetic

Foundations of Cryptography

Number Theory/Cryptography (part 1 of CSC 282)

Fermat s little theorem. RSA.

Primitive Roots. Chapter Orders and Primitive Roots

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

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

CHAPTER 2. Modular Arithmetic

LECTURE 9: QUADRATIC RESIDUES AND THE LAW OF QUADRATIC RECIPROCITY

Solutions for the 2nd Practice Midterm

ALGEBRA: Chapter I: QUESTION BANK

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

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

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

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

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

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

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

Modular Arithmetic. Kieran Cooney - February 18, 2016

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

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

Data security (Cryptography) exercise book

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.

MAT Modular arithmetic and number theory. Modular arithmetic

Applications of Fermat s Little Theorem and Congruences

Discrete Math Class 4 ( )

Number Theory. Konkreetne Matemaatika

Degree project NUMBER OF PERIODIC POINTS OF CONGRUENTIAL MONOMIAL DYNAMICAL SYSTEMS

Wilson s Theorem and Fermat s Theorem

MA/CSSE 473 Day 9. The algorithm (modified) N 1

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

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

MATH 13150: Freshman Seminar Unit 15

Two congruences involving 4-cores

SIZE OF THE SET OF RESIDUES OF INTEGER POWERS OF FIXED EXPONENT

Modular Arithmetic. claserken. July 2016

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

Algorithmic Number Theory and Cryptography (CS 303)

Public Key Encryption

Final exam. Question Points Score. Total: 150

LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI

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

Math 319 Problem Set #7 Solution 18 April 2002

An elementary study of Goldbach Conjecture

Linear Congruences. The solutions to a linear congruence ax b (mod m) are all integers x that satisfy the congruence.

Introduction to Number Theory 2. c Eli Biham - November 5, Introduction to Number Theory 2 (12)

L29&30 - RSA Cryptography

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

Goldbach Conjecture (7 th june 1742)

On the Fibonacci Sequence. By: Syrous Marivani LSUA. Mathematics Department. Alexandria, LA 71302

and problem sheet 7

Conjectures and Results on Super Congruences

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

arxiv: v3 [math.co] 4 Dec 2018 MICHAEL CORY

SQUARING THE MAGIC SQUARES OF ORDER 4

The Chinese Remainder Theorem

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

RESIDUE NUMBER SYSTEM. (introduction to hardware aspects) Dr. Danila Gorodecky

The Chinese Remainder Theorem

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

Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014

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

The covering congruences of Paul Erdős. Carl Pomerance Dartmouth College

PT. Primarity Tests Given an natural number n, we want to determine if n is a prime number.

Cryptography, Number Theory, and RSA

Modular Arithmetic: refresher.

EE 418 Network Security and Cryptography Lecture #3

The Chinese Remainder Theorem

Algorithmic Number Theory and Cryptography (CS 303)

30 HWASIN PARK, JOONGSOO PARK AND DAEYEOUL KIM Lemma 1.1. Let =2 k q +1, k 2 Z +. Then the set of rimitive roots modulo is the set of quadratic non-re

DUBLIN CITY UNIVERSITY

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

Problem Set 6 Solutions Math 158, Fall 2016

Distribution of Primes

Implementation / Programming: Random Number Generation

Shuffling with ordered cards

Transcription:

Exam 1 Problem 1. a) Define gcd(a, b). Using Euclid s algorithm comute gcd(889, 168). Then find x, y Z such that gcd(889, 168) = x 889 + y 168 (check your answer!). b) Let a be an integer. Prove that gcd(3a + 5, 7a + 12) = 1.. Solution: a) gcd(a, b) is the largest ositive integer which divides both a and b. It is called the greatest common divisor of a and b. Euclid s algorithm yields: 889 = 5 168 + 49, 168 = 3 49 + 21, 49 = 2 21 + 7, 21 = 3 7 + 0. It follows that gcd(889, 168) = 7. Working backwards, 7 = 49 2 21 = 49 2 (168 3 49) = 7 49 2 168 = 7 (889 5 168) 2 168 = 7 889 37 168. Thus x = 7, y = 37 work. b) Note that 3(7a + 12) + ( 7)(3a + 5) = 1. Thus any common divisor of 3a + 5 and 7a + 12 must divide 1. It follows that gcd(3a + 5, 7a + 12) = 1. Problem 2. a) State the Chinese Remainder Theorem. b) Find all ositive integers smaller than 200 which leave remainder 1, 3, 4 uon division by 3, 5, 7 resectively. Show your work. Solution: a) Chinese Remainder Theorem: Let n 1,..., n k be airwise relatively rime ositive integers and let N = n 1 n 2... n k. Given any integers a 1,..., a k, the system of congruences x a i (mod n i ), i = 1, 2,..., k, has unique solution x such that 0 x < N. Moreover, an integer y satisfies these congruences iff N (x y) (so all integers satisfying the congruences are given by x + mn, m Z). b) The roblem asks us to find all integers x such that 0 < x < 200 and x 1 (mod 3), x 3 (mod 5), x 4 (mod 7). In order to find a solution to these congruences, we follow the algorithm. We have N = 3 5 7 = 105, N 1 = 35, N 2 = 21, N 3 = 15. We solve N 1 x 1 1 (mod 3), i.e. 2x 1 1 (mod 3), which has a solution x 1 = 2. Next we solve N 2 x 2 3 (mod 5), i.e. x 2 3 (mod 5), which has a solution x 2 = 3. Finally, we solve N 3 x 3 4 (mod 7), i.e. x 3 4 (mod 7), which has a solution x 3 = 4. A solution is given by x = N 1 x 1 +N 2 x 2 +N 3 x 3 = 70+63+60 = 193. The smallest ositive solution is then 193 105 = 88 and all solutions are given by the formula x = 88 + 105m, m Z. We get a ositive solution smaller than 200 only for m = 0, 1, so 88 and 193 are the only solutions to our roblem. 1

Problem 3. a) State Fermat s Little Theorem and Euler s Theorem. b) Let m, n be relatively rime ositive integers. Prove that m φ(n) + n φ(m) 1 (mod mn). c) Find the remainder of 31 2018 uon division by 36. Solution: a) Fermat s Little Theorem: Let be a rime. Then a 1 1 (mod ) for any integer a not divisible by. Equivalently, a a (mod ) for any integer a. Euler s Theorem: Let n be a ositive integer. Then a φ(n) 1 (mod n) for any integer a relatively rime to n. Here φ(n) is the number of ositive integrs relatively rime to n and n. b) By Euler s Theorem, m φ(n) 1 (mod n). Clearly n φ(n) 0 (mod n). Thus m φ(n) + n φ(n) 1 (mod n). Similarly, n φ(m) 1 (mod m) and m φ(m) 0 (mod m) so m φ(n) + n φ(n) 1 (mod m). In other words, m φ(n) + n φ(n) 1 is divisible by both m and n. Since m and n are relatively rime, we conclude that m φ(n) +n φ(n) 1 is divisible by mn, i.e. m φ(n) +n φ(n) 1 (mod mn). c) Note that (31, 36) = 1. Thus 31 φ(36) 1 (mod 36) by Euler s Theorem. Now 36 = 2 2 3 2, so φ(36) = φ(2 2 )φ(3 2 ) = 2 2 3 = 12. Therefore 31 12 1 (mod 36). Observe that 2018 = 12 168 + 2, so 31 2018 = (31 12 ) 168 31 2 31 2 (mod 36). Thus it suffices to find the remainder of 31 2 uon division by 36. Since 31 5 (mod 36), we have 31 2 ( 5)2 = 25 (mod 36). The reminder in question is therefore equal to 25. Problem 4. Find all solutions to the following congruences a) 18x 12 (mod 28) b) 3x 2 + 2x 4 0 (mod 17) Solution: a) Using Euclid s algorithm we find that (18, 28) = 2. Thus the congruence 18x 12 (mod 28) has two solutions modulo 28, given by x x 0 (mod 28) or x x 0 + 14 (mod 28), where x 0 is any articular solution. To find a articular solution, we work the Euclid s algorithm backwards to get 2 = 2 28 + ( 3) 18. Multilying by 6, we see that 12 = 12 28 18 18 18 ( 18) (mod 28). Thus x 0 = 18 is a articular solution so the solutions are x 18 (mod 28) or x 4 (mod 28), which can be written as x 10 (mod 28) or x 24 (mod 28). 2

b) Note that 3 6 = 18 1 (mod 17), i.e. 6 is the inverse of 3 modulo 17. We multily our congruence by 6 and get 18x 2 + 12x 24 0 (mod 17), i.e. x 2 + 12x 7 0 (mod 17). Now we comlete to squares: x 2 + 12x 7 = (x + 6) 2 36 7 (x + 6) 2 9 (mod 17). Thus (x + 6) 2 9 = 3 2 (mod 17) and therefore x + 6 3 (mod 17) or x + 6 3 (mod 17). Equivalently, x 3 14 (mod 17) or x 9 8 (mod 17). Problem 5. a) Define a rimitive root modulo m. Prove that 2 is a rimitive root modulo 25. b) Show that if (a, 77) = 1 then 77 divides a 30 1. c) Is there a rimitive root modulo 77? Exlain your answer. Solution: a) A rimitive root modulo m is any integer a such that ord m a = φ(m). In other words, a is a rimitive root modulo m if a φ(m) 1 (mod m) and a k 1 (mod m) for 1 k < φ(m). We have φ(25) = φ(5 2 ) = 5 4 = 20. Thus, the order of 2 modulo 25 is a divisor of 20, so it can be 1, 2, 4, 5, 10 or 20. By insection, we check that 20 is the smallest among these exonents which works: 2 2 = 4 1 (mod 25) ; 2 4 = 16 1 (mod 25) 2 5 = 32 7 1 (mod 25) ; 2 10 7 2 1 1 (mod 25). Thus the order of 2 modulo 25 is equal to 20 and therefore 2 is a rimitive root modulo 25. Second method: We roved in class the following result: if is an odd rime and a is a rimitive root modulo such that a 1 1 (mod 2 ) then a is a rimitive root modulo k for every ositive integer k. Taking = 5, a = 2 we see that 2 is a rimitive root modulo 5 and 2 4 1 (mod 25). Thus 2 is a rimitive root modulo any ower of 5. b) Note that 77 = 7 11. If (a, 77) = 1 then (a, 7) = 1 = (a, 11). Thus, by Fermat s Little Theorem, we have a 6 1 (mod 7) and a 10 1 (mod 11). Raising both sides of the first congruence to the ower 5 and both sides of the second to the ower 3 we get a 30 1 (mod 7) and a 30 1 (mod 11). Since (7, 11) = 1, we conclude that a 30 1 (mod 77). c) Note that φ(77) = φ(7 11) = 6 10 = 60. If a were a rimitive root modulo 77 then ord 77 a = 60. However, we know by art b) that a 30 1 (mod 77), so ord 77 a 30 and therefore the order cannot be 60. This roves that there does not exist a rimitive root modulo 77. vsace3mm Problem 6. Let a > 1, n > 1 be integers a) What is the order of a modulo a n + 1? Exlain your answer. b) Prove that 2n φ(a n + 1). Solution: a) Let t be the order of a modulo a n + 1 (note that a and a n + 1 are relatively rime). Clerly we have a n 1 (mod a n + 1). Squaring we get a 2n 1 (mod a n + 1). 3

Thus t 2n. Any divisor of 2n less than 2n does not exceed n But if t n then a t 1 a n 1, so a t 1 can not be divisible by a n + 1. This means that t = 2n. b) By Euler s Theorem, a φ(an +1) 1 (mod a n + 1). Thus t φ(a n + 1). Since t = 2n, the result follows. Problem 7. Let be a rime such that 2 (mod 3). Prove that the congruence x 3 a (mod ) is solvable for every integer a. How many solutions modulo does it have for a given a? Solution: When a, then the congruence has a unique solution a 0 (mod ). Suose that a. We know that x 3 a (mod ) is solvable if and only if a ( 1)/ gcd(3, 1) 1 (mod ). Since 2 (mod 3), 1 is not divisible by 3, hence gcd( 1, 3) = 1. Thus our condition is a 1 1 (mod ), which is true by the Fermat Little Theorem. What we roved so far is that the ma f(x) = x 3 (mod ) is a surjective ma from {1, 2,..., 1} to itself. Thus, it has to be a bijection. In other words the congruence x 3 a (mod ) gas unique solution for every a. Second method: Let g be a rimitive root modulo, so ord (g) = 1. Then ord (g 3 ) = ( 1)/ gcd(3, 1) = 1, so g 3 is also a rimitive root modulo. It follows that for every a relatively rime to there is unique k such that 1 k 1 and a g 3k (mod ). In other words, there is unique x = g k solving x 3 a (mod ). Problem 8. Let be an odd rime such that a 2 + b 2 for some integers a, b relatively rime to. Prove that 1 (mod 4) Solution: We have a 2 b 2 (mod ). Raising both sides to the ower ( 1)/2 we get a 1 ( 1) ( 1)/2 b 1 (mod ). Since a 1 1 b 1 (mod ) by Fermat s Little Theorem, we see that 1 ( 1) ( 1)/2 (mod ). This imlies that 1 = ( 1) ( 1)/2, which holds if and only if 1 (mod 4). Second solution: We have a 2 b 2 (mod ). Since a, b are not divisible by, we can use Legendre symbol: We know that ( ) ( ) ( a 2 b 2 1 1 = = = ( ) 1 = 1 if and only if 1 (mod 4). ) ( ) b 2 = ( ) 1. Problem 9. Is there a rime such that each of the numbers 2, 3, 6 is a rimitive root modulo? Solution: The answer is no. Indeed, recall that if g is a rimitive root modulo then g ( 1)/2 1 (mod ). Thus, if both 2 and 3 are rimitive roots modulo then 2 ( 1)/2 1 (mod ) and 3 ( 1)/2 1 (mod ). Multilying these congruences, we get 6 1 2 = 2 1 1 2 3 2 ( 1)( 1) = 1 (mod ). Thus 6 is not a rimitive root modulo. Equivalently, note first that an even ower of a rimitive root cannot be a rimitive root. But if both 2, 3 are congruent to odd owers of a chosen romitive root g then 6 = 2 3 would be congruent to an even ower, hence would not be a rimitive root modulo. 4

Problem 10. Let be a rime divisor of 10 10n + 1. Prove that 2 n+1 divides 1. Solution: Note that 10 10n = a 2n, where a = 10 5n. We will show that if a > 1 and a 2n +1 then 2 n+1 divides 1. Indeed, we have a 2n 1 (mod ), so a 2n+1 1 (mod ). Let t be the order of a modulo. Thus t divides 2 n+1. We claim that t = 2 n+1. Otherwise, if t < 2 n+1 then t would divide 2 n and we would have a 2n 1 (mod ), which is false. Thus t = 2 n+1. By Fermat s Little Theorem, a 1 1 (mod ), so t 1. In other words, 2 n+1 divides 1. 5