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.

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

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:

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

Is 1 a Square Modulo p? Is 2?

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

Solutions for the Practice Questions

MT 430 Intro to Number Theory MIDTERM 2 PRACTICE

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

NUMBER THEORY AMIN WITNO

SOLUTIONS TO PROBLEM SET 5. Section 9.1

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

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

Solutions for the Practice Final

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

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

LECTURE 9: QUADRATIC RESIDUES AND THE LAW OF QUADRATIC RECIPROCITY

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

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

Foundations of Cryptography

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

SOLUTIONS FOR PROBLEM SET 4

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

Carmen s Core Concepts (Math 135)

Number Theory/Cryptography (part 1 of CSC 282)

Introduction to Modular Arithmetic

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

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

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

Solutions for the 2nd Practice Midterm

Discrete Math Class 4 ( )

Data security (Cryptography) exercise book

Algorithmic Number Theory and Cryptography (CS 303)

Primitive Roots. Chapter Orders and Primitive Roots

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

CHAPTER 2. Modular Arithmetic

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

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

Degree project NUMBER OF PERIODIC POINTS OF CONGRUENTIAL MONOMIAL DYNAMICAL SYSTEMS

MATH 13150: Freshman Seminar Unit 15

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

ALGEBRA: Chapter I: QUESTION BANK

Number Theory. Konkreetne Matemaatika

Final exam. Question Points Score. Total: 150

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

Practice Midterm 2 Solutions

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

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

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

Wilson s Theorem and Fermat s Theorem

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.

The Chinese Remainder Theorem

Fermat s little theorem. RSA.

Modular Arithmetic. Kieran Cooney - February 18, 2016

Modular Arithmetic. claserken. July 2016

Public Key Encryption

MAT Modular arithmetic and number theory. Modular arithmetic

Applications of Fermat s Little Theorem and Congruences

The Chinese Remainder Theorem

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

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

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

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

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

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

L29&30 - RSA Cryptography

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

Algorithmic Number Theory and Cryptography (CS 303)

DUBLIN CITY UNIVERSITY

Math 127: Equivalence Relations

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

Distribution of Primes

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

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

Conjectures and Results on Super Congruences

Math 412: Number Theory Lecture 6: congruence system and

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

The Chinese Remainder Theorem

Implementation / Programming: Random Number Generation

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

LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI

Cryptography, Number Theory, and RSA

Two congruences involving 4-cores

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

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

EE 418: Network Security and Cryptography

Math 319 Problem Set #7 Solution 18 April 2002

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

Divisibility. Igor Zelenko. SEE Math, August 13-14, 2012

EE 418 Network Security and Cryptography Lecture #3

Modular Arithmetic: refresher.

Sheet 1: Introduction to prime numbers.

Number-Theoretic Algorithms

Zhanjiang , People s Republic of China

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

Problem Set 6 Solutions Math 158, Fall 2016

Transcription:

Solutions to Exam 1 Problem 1. 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 1 008 uon division by 6. Solution: a) Fermat s Little Theorem: Let be a rime. Then for any integer a not divisible by. a 1 1 (mod ) Euler s Theorem: Let n be a ositive integer. Then for any integer a relatively rime to n. a φ(n) 1 (mod 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 (1, 6) 1. Thus 1 φ(6) 1 (mod 6) by Euler s Theorem. Now 6, so φ(6) 1. Therefore 1 1 1 (mod 6). Observe that 008 1 167+4, so 1 008 (1 1 ) 167 4 1 4 (mod 6). Thus it suffices to find the remainder of 1 4 uon division by 6. Since 1 (mod 6), we have 1 ( ) 11 (mod 6), and 1 4 ( 11) 11 (mod 6). The reminder in question is therefore equal to. Problem. a) State Chinese Remainder Theorem. b) Find all ositive integers smaller than 00 which leave remainder 1,, 4 uon division by,, 7 resectively. Show your work. 1

Solution: a) Chinese Remainder Theorem: Let n 1,..., n k be airwise relatively rime ositive integers and let N n 1 n... n k. Given any integers a 1,..., a k, the system of congruences x a i (mod n i ), i 1,,..., 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 < 00 and x 1 (mod ), x (mod ), x 4 (mod 7). In order to find a solution to these congruences, we follow the algorithm. We have N 7 10, N 1, N 1, N 1. We solve N 1 x 1 1 (mod ), i.e. x 1 1 (mod ), which has a solution x 1. Next we solve N x (mod ), i.e. x (mod ), which has a solution x. Finally, we solve N x 4 (mod 7), i.e. x 4 (mod 7), which has a solution x 4. A solution is given by x N 1 x 1 +N x +N x 70+6+60 19. The smallest ositive solution is then 19 10 88 and all solutions are given by the formula x 88 + 10m, m Z. We get a ositive solution smaller than 00 only for m 0, 1, so 88 and 19 are the only solutions to our roblem. Problem. a) Define (a, b). Using Euclid s algorithm comute (889, 168) and find x, y Z such that (889, 168) x 889 + y 168 (check your answer!). b) Let a be an integer. Prove that (a +, 7a + 1) 1. Hint: If d u and d w then d su + tw for any integers s, t. 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 168 + 49, 168 49 + 1, 49 1 + 7, 1 7 + 0. It follows that gcd(889, 168) 7. Working backwards, 7 49 1 49 (168 49) 7 49 168 7 (889 168) 168 7 889 7 168. Thus x 7, y 7 work. b) Note that (7a + 1) + ( 7)(a + ) 1. Thus any common divisor of a + and 7a + 1 must divide 1. It follows that gcd(a +, 7a + 1) 1. Problem 4. Solve the following congruences a) 18x 1 (mod 8) b) x + x 4 0 (mod 17)

Solution: a) Using Euclid s algorithm we find that (18, 8). Thus the congruence 18x 1 (mod 8) has two solutions modulo 8, given by x x 0 (mod 8) or x x 0 + 14 (mod 8), where x 0 is any articular solution. To find a articular solution, we work the Euclid s algorithm backwards to get 8 + ( ) 18. Multilying by 6, we see that 1 1 8 18 18 18 ( 18) (mod 8). Thus x 0 18 is a articular solution so the solutions are x 18 (mod 8) or x 4 (mod 8), which can be written as x 10 (mod 8) or x 4 (mod 8). b) Note that 6 18 1 (mod 17), i.e. 6 is the inverse of modulo 17. We multily our congruence by 6 and get 18x + 1x 4 0 (mod 17), i.e. x + 1x 7 0 (mod 17). Now we comlete to squares: x + 1x 7 (x + 6) 6 7 (x + 6) 9 (mod 17). Thus (x + 6) 9 (mod 17) and therefore x + 6 (mod 17) or x + 6 (mod 17). Equivalently, x 14 (mod 17) or x 9 8 (mod 17). Problem. a) Define the Legendre symbol a (state clearly all assumtions) and state its roerties. b) Is 91 a quadratic residue modulo 17? Justify your answer. Solution: a) An integer a is called a quadratic residue modulo a rime if a and a x (mod ) for some integer x. An integer a is called a quadratic non-residue modulo a rime if there is no integer x such that a( x (mod ). When is an odd rime and a then we define the Legendre symbol a ) as follows { a 1 if a is a quadratic residue modulo ; 1 if a is a quadratic non-residue modulo. Legendre symbol has the following roerties. ( 1. If a b (mod ) then a ) b.. a 1 for any integer a relatively rime to. (. ab a b ) for any integers a, b relatively rime to. ) (mod ). ( 4. Euler s Criterion: a ( 1)/ a { 1 if 1, 7 (mod 8) ;. ( ) 1 if, (mod 8). and 1 { 1 if 1 (mod 4) ; 1 if (mod 4). 6. Qadratic Recirocity: If and q are distinct odd rime numbers then ( q q if q (mod 4) ; ) ( q) if at least one of, q is 1 (mod 4).

b) Note that 91 6 (mod 17). Thus, by roerties 1,, we have 91 6 1 6 1 1. 17 17 17 17 17 Thus 91 is not a quadratic residue modulo 17. Second method. Note that 91 7. We use the quadratic recirocity: 91 7 17 17 1 10 17 17 17 7 7 Thus 91 is not a quadratic residue modulo 17. 1. ( ) Problem 6. a) Define a rimitive root modulo m. Prove that is a rimitive root modulo. b) Show that if (a,77) 1 then 77 divides a 0 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 φ() φ( ) 4 0. Thus, the order of modulo is a divisor of 0, so it can be 1,, 4,, 10 or 0. By insection, we check that 0 is the smallest among these exonents which works. Thus the order of modulo is equal to 0 and therefore is a rimitive root modulo. 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 and both sides of the second to the ower we get a 0 1 (mod 7) and a 0 1 (mod 11). Since (7, 11) 1, we conclude that a 0 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 0 1 (mod 77), so ord 77 a 0 and therefore the order cannot be 60. This roves that there does not exist a rimitive root modulo 77. Problem 7. Prove that n 1 n (mod 0) for every integer n. Solution: Let us note that if is a rime then n k( 1)+1 n (mod ) for any integer n and any k > 0. In fact, if n then both sides are 0 (mod ) and if n then Femrat s Little Theorem tells us that n 1 1 (mod ) so n k( 1)+1 (n 1 ) k n n (mod ). 4

We aly this observation to,,. Since 1 0 ( 1) + 1 10 ( 1) + 1 ( 1) + 1, we have n 1 n (mod ), n 1 n (mod ), n 1 n (mod ). In other words, n 1 n is divisible by, and and since these numbers are airwise relatively rime, n 1 n is divisible by their roduct 0, i.e. n 1 n (mod 0) Problem 8. Let be a rime such that (mod ). Prove that the equation x a (mod ) is solvable for every integer a. Solution: Let g be a rimitive root modulo. If a then x 0 is a solution. If (a, ) 1 then a g k (mod ) for some k. We would like to find m > 0 such that g k g m (mod ). Then x g m is a solution. Since the order of g modulo is 1, we have g k g m (mod ) iff ( 1) (k m), i.e. k m (mod 1). Since (mod ), we have ( 1, ) 1 and therefore for any k there is an m such that k m (mod 1). Clerly we can choose such m ositive, and then x g m is a solution. Problem 9. Let be an odd rime such that a + b for some integers a, b relatively rime to. Prove that 1 (mod 4) Solution: We have a b (mod ). Raising both sides to the ower ( 1)/ we get a 1 ( 1) ( 1)/ b 1 (mod ). Since a 1 1 b 1 (mod ) by Fermat s Little Theorem, we see that 1 ( 1) ( 1)/ (mod ). This imlies that 1 ( 1) ( 1)/, which holds if and only if 1 (mod 4). Second solution: We have a b (mod ). Since a, b are not divisible by, we can use Legendre symbol: By roerty, a b 1 ( 1 ) b 1 1 if and only if 1 (mod 4). 1.