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

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

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

Modular Arithmetic. claserken. July 2016

Solutions for the Practice Questions

Carmen s Core Concepts (Math 135)

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

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.

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

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

Number Theory/Cryptography (part 1 of CSC 282)

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

SOLUTIONS TO PROBLEM SET 5. Section 9.1

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

NUMBER THEORY AMIN WITNO

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

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

Practice Midterm 2 Solutions

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

Applications of Fermat s Little Theorem and Congruences

Foundations of Cryptography

Math 412: Number Theory Lecture 6: congruence system and

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

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

Data security (Cryptography) exercise book

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

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

Solutions for the 2nd Practice Midterm

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

The Chinese Remainder Theorem

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

SOLUTIONS FOR PROBLEM SET 4

Modular Arithmetic. Kieran Cooney - February 18, 2016

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

Math 127: Equivalence Relations

Discrete Math Class 4 ( )

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.

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

Introduction to Modular Arithmetic

Fermat s little theorem. RSA.

CHAPTER 2. Modular Arithmetic

Solutions for the Practice Final

Number Theory. Konkreetne Matemaatika

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

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

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

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

LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

Goldbach Conjecture (7 th june 1742)

Cryptography, Number Theory, and RSA

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

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

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

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

EE 418: Network Security and Cryptography

Primitive Roots. Chapter Orders and Primitive Roots

Distribution of Primes

1.6 Congruence Modulo m

An elementary study of Goldbach Conjecture

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.

Zhanjiang , People s Republic of China

Lecture 32. Handout or Document Camera or Class Exercise. Which of the following is equal to [53] [5] 1 in Z 7? (Do not use a calculator.

Sheet 1: Introduction to prime numbers.

The Chinese Remainder Theorem

Discrete Mathematics and Probability Theory Spring 2018 Ayazifar and Rao Midterm 2 Solutions

ALGEBRA: Chapter I: QUESTION BANK

Math 124 Homework 5 Solutions

Wilson s Theorem and Fermat s Theorem

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

12. Let Rm = {0,1,2,..., m 1} be a complete residue system modulo ra. Let a be an integer. When is a Rm = {0,1 a, 2 a,...

Algorithmic Number Theory and Cryptography (CS 303)

The Chinese Remainder Theorem

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

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

Problem Set 6 Solutions Math 158, Fall 2016

MT 430 Intro to Number Theory MIDTERM 2 PRACTICE

Modular arithmetic Math 2320

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

SESAME Modular Arithmetic. MurphyKate Montee. March 2018 IN,Z, We think numbers should satisfy certain rules, which we call axioms:

EE 418 Network Security and Cryptography Lecture #3

Cryptography. 2. decoding is extremely difficult (for protection against eavesdroppers);

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

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

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

MODULAR ARITHMETIC II: CONGRUENCES AND DIVISION

2. Nine points are distributed around a circle in such a way that when all ( )

6.2 Modular Arithmetic

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

Power = 36² mod 99 Power = 9 5 a 5 = 0 x = 81 Power = 9² mod 99 Power = 81 6 a 6 = 1 x = 81 x 81 mod 99 x = 27 7 a 7 = 1 x = 27 x 27 mod 99 x = 36

LUCAS-SIERPIŃSKI AND LUCAS-RIESEL NUMBERS

Rational Points On Elliptic Curves - Solutions. (i) Throughout, we ve been looking at elliptic curves in the general form. y 2 = x 3 + Ax + B

Q(173)Q(177)Q(188)Q(193)Q(203)

Modular Arithmetic: refresher.

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

Classical Cryptography

Math 1111 Math Exam Study Guide

MATH 13150: Freshman Seminar Unit 15

DUBLIN CITY UNIVERSITY

Final exam. Question Points Score. Total: 150

Transcription:

Midterm #2: practice MATH 311 Intro to Number Theory midterm: Thursday, Oct 20 Please print your name: Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand. Problem 1. (a) Express 3141 in base 6. (b) Determine, without the help of a calculator, the remainder of 112358132134 modulo 9. (c) What is the remainder of 62831853 modulo 11? (d) Is 0; 1; 2; 4; 8; :::; 2 11 a complete set of residues modulo 13? (e) Is 2 a primitive root modulo 11? What about 3? Do you see a way to determine all primitive roots modulo 11 without much further computation? (a) 3141 = 523 6 + 3. Hence, 3141 = (:::3) 6 where ::: are the digits for 523. 523 = 87 6 + 1. Hence, 3141 = (:::13) 6 where ::: are the digits for 87. 87 = 14 6 + 3. Hence, 3141 = (:::313) 6 where ::: are the digits for 14. 14 = 2 6 + 2. Hence, 3141 = (:::2313) 6 where ::: are the digits for 2. In conclusion, 3141 = (22313) 6. (b) 112358132134 1 + 1 + 2 + 3 + 5 + 8 + 1 + 3 + 2 + 1 + 3 + 4 = 34 7 (mod 9) The remainder of 112358132134 modulo 9 is 7. (c) 62831853 6 + 2 8 + 3 1 + 8 5 + 3 = 4 7 (mod 11) The remainder of 62831853 modulo 11 is 7. (d) 2 0 = 1; 2 1 = 2; 2 2 = 4; 2 3 = 8; 2 4 = 16 3; 2 5 2 3 = 6; 2 6 2 6 = 12 1 The values now repeat with a minus sign: 2 7 = 2 6 2 1 2 11, 2 8 4 9, 2 9 8 5, 2 10 3 10, 2 11 6 7. Hence, the values 0; 1; 2; 4; 8; :::; 2 11 are congruent, modulo 13, to 0; 1; 2; 4; 8; 3; 6; 12; 11; 9; 5; 10; 7. So, indeed, they form a complete set of residues modulo 13. (e) 2 0 = 1; 2 1 = 2; 2 2 = 4; 2 3 = 8; 2 4 5; 2 5 2 5 = 10; 2 6 2 10 9; 2 7 2 9 7; 2 8 2 7 3; 2 9 2 3 = 6; 2 10 2 6 1 Hence, 2 is a primitive root modulo 11. On the other hand, 3 2 8 is not a primitive root because 3 5 2 40 = (2 10 ) 4 1 (mod 11). If you think about this argument, you will see that 2 a is a primitive root modulo 11 if and only if gcd(a; 10) = 1. Hence, the primitive roots modulo 11 are 2 1 = 2, 2 3 = 8, 2 7 7, 2 9 6. 1

Problem 2. (a) Using binary exponentiation, compute 31 41 (mod 23). (b) Without computations, determine 31 41 (mod 41). (c) Show that 314 159 + 265 358 + 10 is divisible by 19. (a) Before we start using binary exponentiation, we should simplify 31 41 8 41 = 8 22 8 19 8 19 (mod 23). 8 2 = 64 5 (mod 23), 8 4 ( 5) 2 2, 8 8 2 2 = 4, 8 16 4 2 = 16. Hence, 31 41 8 19 = 8 16 8 2 8 1 16 ( 5) 8 4 (mod 23). 6 (b) 41 is a prime. Hence, by Fermat's little theorem, a 41 a (mod 41) for any integer a. So, 31 41 31 (mod 41). (c) 314 159 + 265 358 + 10 10 159 + ( 1) 358 + 10 10 159 + 11 (mod 19) Note that 19 is a prime. Therefore, for any integer a such that a / 0 (mod 19), we have a 18 1 (mod 19) by Fermat's little theorem. We can therefore use 159 15 (mod 18) to simplify 10 159 10 15 (mod 19): We use binary exponentiation: 10 2 = 100 5 (mod 19), 10 4 5 2 6 (mod 19), 10 8 6 2 2 (mod 19). Hence, 10 15 = 10 8 10 4 10 2 10 1 ( 2) 6 5 10 49 8 (mod 19). 7 7 Combined, we nd that 314 159 + 265 358 + 10 10 15 + 11 8 + 11 0 (mod 19). In other words, 314 159 + 265 358 + 10 is divisible by 19. Problem 3. (a) Find the modular inverse of 17 modulo 23. (b) Solve 15x 7 (mod 31). (c) How many solutions does 16x 1 (mod 70) have modulo 70? Find all solutions. (d) How many solutions does 16x 4 (mod 70) have modulo 70? Find all solutions. (a) We use the extended Euclidean algorithm: gcd(17; 23) = gcd(6; 17) = gcd(1; 6) = 1 23=117+6 17=36 1 Hence, Bézout's identity takes the form 1 = 3 6 17 = 3 23 4 17. 6=23 117 Hence, 4 17 1 (mod 23). In other words, 17 1 4 (mod 23). (b) Since 2 15 1 (mod 31), we see that 15 1 2 (mod 31). 2

(Don't worry if you didn't see that. You can just proceed as in the rst part of this problem.) Hence, 15x 7 (mod 31) has the unique solution x 15 1 7 2 7 17 (mod 31) (c) This congruence has no solutions, because gcd(16; 70) = 2 but 2-1. (d) Again gcd(16; 70) = 2, but this time 2j4. Hence, we have 2 solutions modulo 70. The congruence is equivalent to 8x 2 (mod 35). We therefore determine 8 1 (mod 35). We use the extended euclidean algorithm: gcd(8; 35) = gcd(3; 8) = gcd(1; 3) = 1 35=48+3 8=33 1 Hence, Bézout's identity takes the form 1 = 3 3 8 = 3 35 13 8. 3=35 48 Hence, 13 8 1 (mod 35). In other words, 8 1 13 (mod 35). It follows that 8x 2 (mod 35) has the unique solution x 8 1 2 13 2 9 (mod 35). Modulo 70, we have the two solutions x 9 (mod 70), x 9 + 35 = 44 (mod 70). Problem 4. Solve the following system of congruences: 3x + 5y 6 (mod 25) 2x + 7y 2 (mod 25) Working with rational numbers, the system 3x + 5y = 6 2x + 7y = 2 has solution (use any method you like) x y 3 5 1 6 = = 1 7 5 6 = 1 32 : 2 7 2 11 2 3 2 11 6 Working modulo 25, we have to determine the modular inverse 11 1 (mod 25). Using the Euclidian algorithm, we nd that 11x + 25y = 1 is solved by x = 9, y = 4. (The steps are omitted here, since we are experts by now. Make sure you can do it, and don't omit the steps on the exam, unless there is an obvious choice for x and y!) This shows that 11 1 9 (mod 25). Hence, the system has the solution x y 32 7 12 11 1 9 6 6 4 (mod 25): (Check by substituting the values into the two original congruences!) Problem 5. (a) Solve x 1 (mod 3), x 2 (mod 4), x 3 (mod 5), x 4 (mod 11). 3

(b) Solve x 1 (mod 3), x 2 (mod 4), 2x 3 (mod 5), 3x 4 (mod 11). (c) Find the smallest integer a > 2 such that 2ja, 3j(a + 1), 4j(a + 2) and 5j(a + 3). (a) We break the problem into four pieces: x 1 (mod 3), x 0 (mod 4), x 0 (mod 5), x 0 (mod 11). To satisfy the mod 4, mod 5 and mod 11 congruences, we need x = 4 5 11z. We solve 4 5 11z 1 (mod 3). Simplies to z 1 (mod 3). z = 1 gives x = 4 5 11 = 220. x 0 (mod 3), x 1 (mod 4), x 0 (mod 5), x 0 (mod 11). We need x = 3 5 11z. Solving 3 5 11z 1 (mod 4). Simplies to z 1 (mod 4). z = 1 gives x = 3 5 11 = 165. x 0 (mod 3), x 0 (mod 4), x 1 (mod 5), x 0 (mod 11). We need x = 3 4 11z. Solving 3 4 11z 1 (mod 5). Simplies to 2z 1 (mod 5), which has solution z 3 (mod 5). z = 3 gives x = 3 4 11 3 = 396. x 0 (mod 3), x 0 (mod 4), x 0 (mod 5), x 1 (mod 11). We need x = 3 4 5z. Solving 3 4 5z 1 (mod 11). Simplies to 5z 1 (mod 11), which has solution z 2 (mod 11). z = 2 gives x = 3 4 5 ( 2) = 120. Combining these four, x 1 (mod 3), x 2 (mod 4), x 3 (mod 5), x 4 (mod 11) has solution x = 1 220 + 2 165 + 3 396 + 4 ( 120) = 1258. Since 3 4 5 11 = 660, the general solution is x 1308 62 (mod 660) by the Chinese remainder theorem. (b) 2x 3 (mod 5) has the unique solution x 2 1 3 3 3 1 (mod 5). 3x 4 (mod 11) has the unique solution x 3 1 4 4 4 5 (mod 11). Our simplied task is to solve x 1 (mod 3), x 2 (mod 4), x 1 (mod 5), x 5 (mod 11). We reuse the previous part to produce the solution x = 1 220 + 2 165 1 396 + 5 ( 120) = 446. Therefore, the general solution is x 446 214 (mod 660) by the Chinese remainder theorem. (c) This is the same as solving a 0 (mod 2), a 1 (mod 3), a 2 (mod 4), a 3 (mod 5). Notice that we can't apply the Chinese remainder theorem directly, because 2 and 4 are not coprime. However, if a 2 (mod 4) then, automatically, a 0 (mod 2). So, we can drop the latter congruence and only look for solutions of a 1 (mod 3), a 2 (mod 4), a 3 (mod 5). By the Chinese remainder theorem (since 3; 4; 5 are pairwise coprime), there is a unique solution a modulo 3 4 5 = 60. Note that a = 2 is such a solution. Hence, the next smallest solution is a = 62. [No problem if you didn't see that a = 2 is a solution. You can nd it by going through the same kind of computations as in the previous parts.] There is two more problems on the second page::: 4

Problem 6. Spell out a precise version of the following famous results: (a) Bézout's identity (b) Fermat's little theorem (c) Chinese remainder theorem (a) Bézout's identity: Let a; b 2 Z (not both zero). There exist x; y 2 Z such that gcd(a; b) = ax + by: (b) Fermat's little theorem: Let p be a prime, and suppose that p - a. Then a p 1 1 (mod p): (c) Chinese remainder theorem: Let n 1 ; n 2 ; :::; n r be positive integers with gcd(n i ; n j ) = 1 for i =/ j. Then the system of congruences x a 1 (mod n 1 ); :::; x a n (mod n r ) has a simultaneous solution, which is unique modulo n = n 1 n r. Problem 7. (a) Let a; n be positive integers. Show that a has a modular inverse modulo n if and only if gcd(a; n) = 1. (b) Let p be a prime, and a an integer such that p - a. Show that the modular inverse a 1 exists, and that a 1 a p 2 (mod p): (c) Compute the modular inverse of 17 modulo 101 in two dierent ways: Using the previous part of this problem, and binary exponentiation. Using Bézout's identity. (a) Recall that x is a modular inverse of a if and only if ax 1 (mod n). This congruence has a solution x if and only if the diophantine equation ax + ny = 1 has a solution x; y 2 Z. This is the case if and only if gcd(a; n) divides the right-hand side, which is 1. That is the case if and only if gcd(a; n) = 1. (b) Since p is a prime, and a an integer such that p - a, Fermat's little theorem states that a p 1 1 (mod p): 5

Equivalently, a p 2 a 1 (mod p), which means that a 1 a p 2 (mod p). (c) We compute the modular inverse of 17 modulo 101 in two dierent ways: By the previous part of this problem, 17 1 17 99 (mod 101): Note that 99 = 64 + 32 + 2 + 1. We compute, modulo 101, 17 2 14; 17 4 ( 14) 2 6; 17 8 ( 6) 2 36; 17 16 36 2 17; 17 32 ( 17) 2 14; so that 17 64 ( 14) 2 6, repeating the initial values. Hence, 17 1 17 99 = 17 64 17 32 17 2 17 1 ( 6) ( 14) ( 14) 17 6 (mod 101): Using the Euclidian algorithm, we compute gcd(17; 101) = gcd(1; 17) = 1; 101=617 1 so that Bézout's identity simply takes the form 1 = 6 17 101. Hence, 6 17 1 (mod 101). In other words, 17 1 6 (mod 101). It is also a very good idea to review the problems from Homework 4. 6