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

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.

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

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

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

Solutions for the Practice Questions

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

Foundations of Cryptography

SOLUTIONS TO PROBLEM SET 5. Section 9.1

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

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

SOLUTIONS FOR PROBLEM SET 4

NUMBER THEORY AMIN WITNO

Number Theory/Cryptography (part 1 of CSC 282)

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

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

Fermat s little theorem. RSA.

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

Solutions for the Practice Final

CHAPTER 2. Modular Arithmetic

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

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

Introduction to Modular Arithmetic

Primitive Roots. Chapter Orders and Primitive Roots

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

Carmen s Core Concepts (Math 135)

Number Theory. Konkreetne Matemaatika

Data security (Cryptography) exercise book

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

ALGEBRA: Chapter I: QUESTION BANK

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

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

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

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

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

Practice Midterm 2 Solutions

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:

Modular Arithmetic. claserken. July 2016

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.

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

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

Final exam. Question Points Score. Total: 150

Solutions for the 2nd Practice Midterm

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

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

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

Discrete Math Class 4 ( )

Degree project NUMBER OF PERIODIC POINTS OF CONGRUENTIAL MONOMIAL DYNAMICAL SYSTEMS

Distribution of Primes

MATH 13150: Freshman Seminar Unit 15

Applications of Fermat s Little Theorem and Congruences

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

Math 127: Equivalence Relations

Wilson s Theorem and Fermat s Theorem

Math 412: Number Theory Lecture 6: congruence system and

MAT Modular arithmetic and number theory. Modular arithmetic

An elementary study of Goldbach Conjecture

The Chinese Remainder Theorem

Two congruences involving 4-cores

The Chinese Remainder Theorem

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

Goldbach Conjecture (7 th june 1742)

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

1.6 Congruence Modulo m

Cryptography, Number Theory, and RSA

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

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

Public Key Encryption

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

Algorithmic Number Theory and Cryptography (CS 303)

Modular Arithmetic: refresher.

The Chinese Remainder Theorem

by Michael Filaseta University of South Carolina

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

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

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

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

Application: Public Key Cryptography. Public Key Cryptography

L29&30 - RSA Cryptography

Shuffling with ordered cards

Zhanjiang , People s Republic of China

LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI

MAT199: Math Alive Cryptography Part 2

DUBLIN CITY UNIVERSITY

Implementation / Programming: Random Number Generation

Mark Kozek. December 7, 2010

MATH 135 Algebra, Solutions to Assignment 7

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

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

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

Modular Arithmetic and Doomsday

Number-Theoretic Algorithms

LUCAS-SIERPIŃSKI AND LUCAS-RIESEL NUMBERS

EE 418 Network Security and Cryptography Lecture #3

Sheet 1: Introduction to prime numbers.

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

Introduction To Modular Arithmetic

Problem Set 6 Solutions Math 158, Fall 2016

Math 319 Problem Set #7 Solution 18 April 2002

Algorithmic Number Theory and Cryptography (CS 303)

Transcription:

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. Prove that m φ(n) + n φ(m) 1 (mod mn). Solution: a) Fermat s Little Theorem: Let p be a prime. Then a p 1 1 (mod p) for any integer a not divisible by p. Euler s Theorem: Let n be a positive integer. Then a φ(n) 1 (mod n) for any integer a relatively prime to 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 prime, we conclude that m φ(n) + n φ(n) 1 is divisible by mn, i.e. m φ(n) + n φ(n) 1 (mod mn). Problem 2. a) State Chinese Remainder Theorem. b) Find all positive integers smaller than 200 which leave remainder 1, 3, 4 upon division by 3, 5, 7 respectively. Solution: a) Chinese Remainder Theorem: Let n 1,..., n k be pairwise relatively prime positive integers and let N = n 1 n 2... n k. Given integers a 1,..., a k there is integer x such that 1

x a i (mod n i ) for i = 1, 2,..., k. Moreover, an integer y satisfies the congruences iff N (x y) (so all integers satisfying the congruences are given by x+mn, m Z). b) The problem 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 observe that 12 3 + ( 1) 35 = 1, ( 4) 5 + 21 = 1, ( 2) 7 + 15 = 1. Thus a solution is given by x = ( 35)+3 21+4 15 = 88. It follows that all solutions are given by the formula x = 88 + 105m, m Z. We get a positive solution smaller than 200 only for m = 0, 1, so 88 and 193 are the only solutions to our problem. Problem 3. a) Define gcd(a, b). Using Euclid s algorithm compute gcd(889, 168) and 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. Hint: If d u and d w then d su + tw for any integers s, t. Solution: a) gcd(a, b) is the largest positive integer which divides both a and b. It is the unique positive integer d with the property that div(a) div(b) = div(d). We have 889 = 5 168 + 49, 168 = 3 49 + 21, 49 = 2 21 + 7, 21 = 3 7 + 0. By Euclid s algorithm, gcd(889, 168) = 7. Furthermore, 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 works. 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. 2

Problem 4. a) Define prime numbers. State the Fundamental Theorem of Arithmetic. Explain the notation: p k m. b) Let n = p a 1 1 p a 2 2...p as s, where p 1 < p 2 <... < p s are prime numbers. Prove that n is a perfect square (i.e. n = m 2 for some integer m) iff a 1, a 2,..., a s are all even. c) Suppose that k l is a perfect square and gcd(k, l) = 1. Prove that both k and l are perfect squares. Solution: a) A prime number is any integer p > 1 such that div(p) = {1, p}. Fundamental Theorem of Arithmetic: Any positive integer n > 1 can be factored in unique way as n = p a 1 1 pa 2 2...pas s, where p 1 < p 2 <... < p s are prime numbers and a 1,..., a s are positive integers. The notation p k m means that k is the highest power of p which divides m, i.e. p k m but p k+1 m (or, equivalently, k is the exponent with which p appears in the prime factorization of m). b) Suppose that n = m 2 is a perfect square. If m = q b 1 1 qb 2 2...qbt t is a prime factorization of m then m 2 = q 2b 1 1 q 2b 2 2...qt 2bt is a prime factorization of n = m 2. By uniqueness of factorization, we have s = t, q i = p i and a i = 2b i for i = 1, 2,..., s. In particular, all a i s are even. Conversely, if all a i s are even then m = p a 1/2 1 p a 2/2 2...p as/2 s is n integer and n = m 2 so n is a perfect square. c) Let n = kl be a perfect square. Suppose that k is not a perfect square. Then, by b), there is a prime divisor p of k such that p a k and a is odd. Since p cannot divide l, we have p a n. This however contradicts b), since n is a perfect square (so for any prime q we have q b n for some even b). Problem 5. a) Define quadratic residues and non-residues modulo a prime p. Find all quadratic residues modulo 11. b) Suppose that n = a 2 + b 2 for some integers a, b. Prove that n 3 (mod 4). Solution: a) An integer a is called a quadratic residue modulo a prime p if p a and a x 2 (mod p) for some integer x. An integer a is called a quadratic non-residue modulo a prime p if there is no integer x such that a x 2 (mod p). 3

We know that a is a quadratic residue modulo p iff a i 2 (mod p) for some i {1, 2,.., (p 1)/2}. Since 1 2 = 1, 2 2 = 4, 3 2 = 9, 4 2 = 16 5 (mod 11), 5 2 = 25 3 (mod 11), an integer a is a quadratic residue modulo 11 iff a is congruent modulo 11 to one of 1, 3, 4, 5, 9. b) Note that for any integer m we have either m 2 0 (mod 4) or m 2 1 (mod 4) (in fact, m is congruent to one of 0, 1, 2, 3 modulo 4 and 0 2 2 2 0 (mod 4), 1 2 3 2 1 (mod 4) ). Thus both a 2 0, 1 (mod 4), b 2 0, 1 (mod 4). Thus n = a 2 + b 2 0, 1, 2 (mod 4), i.e. n 3 (mod 4). Problem 6. Prove that n 21 n (mod 30) for every integer n. Solution: Let us note that if p is a prime then n k(p 1)+1 n (mod p) for any integer n and any k > 0. In fact, if p n then both sides are 0 (mod p) and if p n then Femrat s Little Theorem tells us that n p 1 1 (mod p) so n k(p 1)+1 = (n p 1 ) k n n (mod p). We apply this observation to p = 2, 3, 5. Since 21 = 20 (2 1)+1 = 10 (3 1)+1 = 5 (5 1) + 1, we have n 21 n (mod 2), n 21 n (mod 3), n 21 n (mod 5). In other words, n 21 n is divisible by 2, 3 and 5 and since these numbers are pairwise relatively prime, n 21 n is divisible by their product 2 3 5 = 30, i.e. n 21 n (mod 30) Problem 7. Let a > 1, n > 1 be integers. a) What is the order of a modulo a n + 1? b) Prove that 2n φ(a n + 1). Solution: Recall that if gcd(a, m) = 1 then ord m (a) is the smallest positive integer s such that a s 1 (mod m). We have a k 1 (mod m) iff ord m (a) k. a) Clearly gcd(a, a n + 1) = 1 (any divisor of a is a divisor of a n ). Let s = ord a n +1(a) be the order of a modulo a n +1. Note that s > n since 1 a i < a n +1 for 0 < i n. Since a n 1 (mod a n + 1), we have a 2n 1 (mod a n + 1). Thus s 2n. The only divisor of 2n greater than n is 2n itself, so s = 2n. 4

b) By Euler s Theorem, we have a φ(an +1) 1 (mod a n + 1). Thus ord a n +1(a) φ(a n + 1). Since ord a n +1(a) = 2n by a), we see that 2n φ(a n + 1). 5