The Chinese Remainder Theorem

Similar documents
The Chinese Remainder Theorem

COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635

Homework #2 solutions Due: June 15, 2012

a the relation arb is defined if and only if = 2 k, k

MTH 346: The Chinese Remainder Theorem

Proof 1: Using only ch. 6 results. Since gcd(a, b) = 1, we have

Chuck Garner, Ph.D. May 25, 2009 / Georgia ARML Practice

MATH 215 Final. M4. For all a, b in Z, a b = b a.

Solution Sheet (i) q = 5, r = 15 (ii) q = 58, r = 15 (iii) q = 3, r = 7 (iv) q = 6, r = (i) gcd (97, 157) = 1 = ,

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

Chapter 3 Basic Number Theory

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

Notes on Systems of Linear Congruences

ELEMENTS OF NUMBER THEORY

3.2 Solving linear congruences. v3

Math 109 HW 9 Solutions

Lecture Notes. Advanced Discrete Structures COT S

A Readable Introduction to Real Mathematics

3 The fundamentals: Algorithms, the integers, and matrices

Part V. Chapter 19. Congruence of integers

M381 Number Theory 2004 Page 1

Number Theory Math 420 Silverman Exam #1 February 27, 2018

Solutions to Assignment 1

4 Number Theory and Cryptography

Wednesday, February 21. Today we will begin Course Notes Chapter 5 (Number Theory).

Elementary Number Theory MARUCO. Summer, 2018

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer.

Number Theory Proof Portfolio

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

Ma/CS 6a Class 2: Congruences

Math 261 Spring 2014 Final Exam May 5, 2014

Elementary Number Theory. Franz Luef

Mathematics of Cryptography Part I

4 Powers of an Element; Cyclic Groups

MATH 501 Discrete Mathematics. Lecture 6: Number theory. German University Cairo, Department of Media Engineering and Technology.

Solutions to Section 2.1 Homework Problems S. F. Ellermeyer

Number theory lectures

1 Overview and revision

12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z.

ax b mod m. has a solution if and only if d b. In this case, there is one solution, call it x 0, to the equation and there are d solutions x m d

Number Theory Notes Spring 2011

EUCLID S ALGORITHM AND THE FUNDAMENTAL THEOREM OF ARITHMETIC after N. Vasiliev and V. Gutenmacher (Kvant, 1972)

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II

Senior Math Circles Cryptography and Number Theory Week 2

Chapter 1 A Survey of Divisibility 14

CSE 20 DISCRETE MATH. Winter

Coding Theory ( Mathematical Background I)

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2,

Integers and Division

Elementary Number Theory Review. Franz Luef

Chapter 5. Number Theory. 5.1 Base b representations

Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I

Signature: (In Ink) UNIVERSITY OF MANITOBA TEST 1 SOLUTIONS COURSE: MATH 2170 DATE & TIME: February 11, 2019, 16:30 17:15

This exam contains 5 pages (including this cover page) and 4 questions. The total number of points is 100. Grade Table

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

Our Number Theory Textbook

CHAPTER 3. Congruences. Congruence: definitions and properties

4.4 Solving Congruences using Inverses

ASSIGNMENT Use mathematical induction to show that the sum of the cubes of three consecutive non-negative integers is divisible by 9.

CMPUT 403: Number Theory

Elliptic Curves, Factorization, and Cryptography

5: The Integers (An introduction to Number Theory)

Numbers, Groups and Cryptography. Gordan Savin

The Fundamental Theorem of Arithmetic

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

LINEAR CONGRUENCES AND LINEAR DIOPHANTINE EQUATIONS

WORKSHEET MATH 215, FALL 15, WHYTE. We begin our course with the natural numbers:

Ma/CS 6a Class 2: Congruences

Number Theory Solutions Packet

I Foundations Of Divisibility And Congruence 1

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

Solutions to Problem Set 3 - Fall 2008 Due Tuesday, Sep. 30 at 1:00

Chapter 1 : The language of mathematics.

Elementary Properties of the Integers

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions

Chapter 4 Finite Fields

NOTES ON SIMPLE NUMBER THEORY

MATH FINAL EXAM REVIEW HINTS

1. multiplication is commutative and associative;

Basic elements of number theory

Basic elements of number theory

Discrete Structures Lecture Solving Congruences. mathematician of the eighteenth century). Also, the equation gggggg(aa, bb) =

MATH 420 FINAL EXAM J. Beachy, 5/7/97

Computer Architecture 10. Residue Number Systems

Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

Congruences. September 16, 2006

The set of integers will be denoted by Z = {, -3, -2, -1, 0, 1, 2, 3, 4, }

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

Greatest Common Divisor MATH Greatest Common Divisor. Benjamin V.C. Collins, James A. Swenson MATH 2730

NOTES ON INTEGERS. 1. Integers

Practice Number Theory Problems

A SURVEY OF PRIMALITY TESTS

The Euclidean Algorithm and Multiplicative Inverses

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

Lecture 7 Number Theory Euiseong Seo

Outline. Some Review: Divisors. Common Divisors. Primes and Factors. b divides a (or b is a divisor of a) if a = mb for some m

Outline. AIT 682: Network and Systems Security. GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation Discrete Logarithms

4. Congruence Classes

Transcription:

Sacred Heart University piazzan@mail.sacredheart.edu March 29, 2018

Divisibility Divisibility We say a divides b, denoted as a b, if there exists k Z such that ak = b. Example: Consider 2 6. Then k = 3 since (2)(3) = 6. Property - Addition Let a, b, and c Z. If a b and a c then a (b+c). Proof. ak = b am = c Then a(k + m) = b + c. This implies a (b + c).

Properties of Divisibility Property - Subtraction Let a, b, and c Z. If a b and a c then a (b-c). Property - Multiplication Let a, b, and c Z. If a b then a bc. Property - Transitive Let a, b and c Z. If a b and b c, then a c.

Division Algorithm and GCD Division Algorithm Let m and n N. Then there exist unique integers q, r such that m = qn + r, where 0 r n - 1. Great Common Divisior The Greatest Common Divisor of two integers a and b, not both 0, is the largest, positive integer that divides a and b. It is denoted as (a, b).

Example of the Euclidean Algorithm Theorem leading to the Euclidean Algorithm Let a, n, b, and r Z where a and b are not both 0. If a = nb + r, then (a,b) = (b, r). gcd(124, 144). 144 = (124 1) + 20. 124 = (20 6) + 4. 20 = (4 5) + 0. Then the gcd(124, 144) = 4. Retracing our steps, we express the gcd in a linear combination of its terms 124 and 144: 4 = 124 - (20 6) 4 = 124 - ((144-124) 6) 4 = 124 - (6 144) + (6 124) 4 = (- 6) 144 + (7) 124

A Linear Diophantine Equation A linear Diophantine equation ax + by = c A linear equation of this form ax + by = c of two variables is a linear Diophantine equation. GCD is a linear combination Let a and b Z not both 0. Then there exist x and y Z such that ax+by= (a,b). Theorem Let a, b and c Z. If a bc and (a,b) = 1, then a c. Proof. Since (a, b) = 1, then ax + by = 1. Then, cax + cby = c Since a cax and a cby, then a (cax + cby). Therefore a c.

Condition for solutions for a linear Diophantine equation Let a, b, and c Z with a and b not both 0, then there exist x, y Z that satisfy the equation ax + by = c if and only if (a,b) c. Proof. Suppose ax + by = c and (a,b) = d. Then d a and d b. This implies that d c Conversely, assume d c. Then kd = c Then let d = (a, b), This implies ax + by = d. kd = k(ax + by ) a(kx ) + b(ky ) = c. Let x = kx and y = ky. Therefore this satisfies the equation ax + by = c.

Example of a Linear Diophantine Equation Consider the linear Diophantine equation of two variables: 3x + 6y = 3. We start with any solution, say (1,0).

Linear Congruences Congruence Modulo n We say a is congruent to b (mod n), if n (a - b). It is denoted as a b (mod n). A linear congruence modulo n has a solution if its Diophantine equation has a solution. Theorem Let a, b, and n be integers with n > 0. The congruence ax b (mod n) has a solution if and only if there exist integers x and y such that ax + ny = b.

Proof. Assume ax b (mod n) has a solution. Then n (ax - b) n -(ax - b). This implies ny = b - ax. Rewriting we have ax + ny = b. Conversely, assume ax 0 + ny 0 = b. Then ax 0 - b = n(-y 0 ). This implies ax 0 b(mod n) has a solution.

Solution to Linear Congruences Condition for a linear congruence to have a solution Let a, b, and n be integers with n > 0. The equation ax b (mod n) has a solution if and only if (a, n) b. Proof. Suppose ax b (mod n) has a solution x 0. ax + by = b (a, n) b This implies ax b (mod n) has a solution if and only if (a, n) b.

Solutions to a System of Linear Congruences Condition for a system of linear congruences to have a solution Let a, b, m and n be integers with m > 0 and n > 0. Then the system x a (mod n), x b (mod m) has a solution if and only if (n, m) (a - b). Proof. Suppose there is a solution to the system x a (mod n) and x b (mod m). Let d = (n, m). We have d n and d m We also know n (x - a) and m (x - b). This implies d (x - a) and d (x - b). Subtracting we have d ((x - b) - (x - a)) Therefore d (a - b).

Solutions to a System of Linear Congruences Proof. Suppose (n, m) (a - b). Then there exists x 0 Z such that mx 0 (a - b)(mod n). This implies mx 0 + b a (mod n). Also mx 0 + b b (mod m), thus x = mx 0 + b is a solution to the system.

A system of two linear congruences relatively prime Let a, b, m and n be integers with m > 0, n > 0 and (n, m) = 1. Then the system x a (mod n), x b (mod m) has a unique solution modulo mn. Proof. The system has a solution say x 0 because 1 (a - b). Let x a (mod n) and x b (mod m) be another solution to the system. Then x 0 - x 0 (mod n) And x 0 - x 0 (mod m). This implies n (x 0 - x ) and m (x 0 - x ) Since (m, n) = 1, then mn (x 0 - x ) Thus x 0 x (mod mn). This implies x 0 is the unique solution.

Generalization Suppose n 1, n 2... n L are positive integers that are pairwise relatively prime, that is (n i, n j ) = 1 for i j, 1 i, j L. Then the system of L congruences x a 1 (mod n 1 ), x a 2 (mod n 2 )... x a L (mod n L ) has a unique solution modulo the product of n 1 n 2 n 3...n L.

Proof. Induction step: Suppose the system of L - 1 congruences x a 1 (mod n 1 ), x a 2 (mod n 2 )... x a L 1 (mod n L 1 ) has a unique solution modulo n 1...n L 1 say x 0. Then we have x x 0 (mod n 1 n 2...n L 1 ). We need to prove the result is true for L congruences: x a 1 (mod n 1 ), x a 2 (mod n 2 )... x a L 1 (mod n L 1 ), x a L (mod n L ) where (n i, n j ) = 1 for all i, j such that 1 i, i L. Since n 1, n 2,..., n L 1,n L are pairwise relatively prime, it follows that the product n 1 n 2...n L 1 is relatively prime to n L. Since x x 0 (mod n 1 n 2...n L 1 ) and x a L (mod n L ) which is a pair of relatively prime congruences, it follows that this system has a unique solution mod n 1 n 2...n L 1 n L, say x. Then x is the unique solution modulo to the system x a 1 (mod n 1 ), x a 2 (mod n 2 )... x a L (mod n L ).

Example of Easter Eggs! Let s make an Easter egg example. Sally, Billy, and Ann are children that have collected eggs left behind from the Easter Bunny. The system of congruences is as followed: x 5 (mod 13), x 7 (mod 12), and x 0 (mod 11). What is the least amount of eggs they ve collected?

Example of Easter Eggs! Let s make an Easter egg example. Sally, Billy, and Ann are children that have collected eggs left behind from the Easter Bunny. The system of congruences is as followed: x 5 (mod 13), x 7 (mod 12), and x 0 (mod 11). What is the least amount of eggs they ve collected? Solution 13k = x - 5. 13k + 5 7 (mod 12). k 2 (mod 12) or k = 12m + 2. 13(12m + 2) = x - 5 or x = 156m + 31. 156m + 31 0 (mod 11) m 1 (mod 11) or m = 1 + 11j x = 156(1 + 11j) + 31 or x = 1716j + 187. Our least solution is 187 (mod 1716).

Further Research and Questioning considers a system of only pairwise relatively prime modulo congruences, but what about systems of linear congruences with moduli with gcd > 1? Is there a systematic method or theorem that describes solutions of congruences not pairwise, relatively prime modulo?

References Marshall D., Odell E. and Starbird M., 2007: Number Theory Through Inquiry. The Mathematical Association of America, 151.

The End