Notes on Systems of Linear Congruences

Similar documents
Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Number Theory Homework.

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

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

A Readable Introduction to Real Mathematics

Number Theory Proof Portfolio

NOTES ON SIMPLE NUMBER THEORY

Wilson s Theorem and Fermat s Little Theorem

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

Part V. Chapter 19. Congruence of integers

Math 4400/6400 Homework #8 solutions. 1. Let P be an odd integer (not necessarily prime). Show that modulo 2,

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

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

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

Math 324, Fall 2011 Assignment 7 Solutions. 1 (ab) γ = a γ b γ mod n.

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

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

Homework #2 solutions Due: June 15, 2012

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

Chapter 3 Basic Number Theory

Generalized Splines. Madeline Handschy, Julie Melnick, Stephanie Reinders. Smith College. April 1, 2013

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald)

Math 109 HW 9 Solutions

The number of ways to choose r elements (without replacement) from an n-element set is. = r r!(n r)!.

Quadratic reciprocity and the Jacobi symbol Stephen McAdam Department of Mathematics University of Texas at Austin

MTH 346: The Chinese Remainder Theorem

4.4 Solving Congruences using Inverses

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

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

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

The primitive root theorem

MATH 361: NUMBER THEORY FOURTH LECTURE

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

CISC-102 Fall 2017 Week 6

4 Powers of an Element; Cyclic Groups

M381 Number Theory 2004 Page 1

The Chinese Remainder Theorem

The Chinese Remainder Theorem

LECTURE 4: CHINESE REMAINDER THEOREM AND MULTIPLICATIVE FUNCTIONS

MATH 145 Algebra, Solutions to Assignment 4

1 Overview and revision

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

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

MATH 3240Q Introduction to Number Theory Homework 4

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

MAT246H1S - Concepts In Abstract Mathematics. Solutions to Term Test 1 - February 1, 2018

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

Chapter 5: The Integers

Prime and irreducible elements of the ring of integers modulo n

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?

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points.

a = qb + r where 0 r < b. Proof. We first prove this result under the additional assumption that b > 0 is a natural number. Let

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

Solutions to Assignment 1

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

LEGENDRE S THEOREM, LEGRANGE S DESCENT

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

Introduction to Sets and Logic (MATH 1190)

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION

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?

CMPUT 403: Number Theory

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

Chapter 1 : The language of mathematics.

The Chinese Remainder Theorem

Basic elements of number theory

Primes and Modular Arithmetic! CSCI 2824, Fall 2014!!

Basic elements of number theory

Modular Arithmetic Instructor: Marizza Bailey Name:

The Chinese Remainder Theorem

3 The fundamentals: Algorithms, the integers, and matrices

MATH10040 Chapter 1: Integers and divisibility

Definition For a set F, a polynomial over F with variable x is of the form

Algebra. Modular arithmetic can be handled mathematically by introducing a congruence relation on the integers described in the above example.

LECTURE NOTES IN CRYPTOGRAPHY

THESIS. Presented in Partial Fulfillment of the Requirements for the Degree Master of Science in the Graduate School of The Ohio State University

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

Relations. Binary Relation. Let A and B be sets. A (binary) relation from A to B is a subset of A B. Notation. Let R A B be a relation from A to B.

10 Problem 1. The following assertions may be true or false, depending on the choice of the integers a, b 0. a "

The Real Number System

The Impossibility of Certain Types of Carmichael Numbers

Integers and Division

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

2 Elementary number theory

Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm

Congruences. September 16, 2006

Perfect Power Riesel Numbers

Elementary Number Theory Review. Franz Luef

Chapter 5. Number Theory. 5.1 Base b representations

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

LINEAR CONGRUENCES AND LINEAR DIOPHANTINE EQUATIONS

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

4 Number Theory and Cryptography

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

Computer Architecture 10. Residue Number Systems

Kevin James. MTHSC 412 Section 3.4 Cyclic Groups

Congruences and Residue Class Rings

ALGEBRA I (LECTURE NOTES 2017/2018) LECTURE 9 - CYCLIC GROUPS AND EULER S FUNCTION

Notes on Primitive Roots Dan Klain

Mathematics for Cryptography

Math 110 HW 3 solutions

Transcription:

MATH 324 Summer 2012 Elementary Number Theory Notes on Systems of Linear Congruences In this note we will discuss systems of linear congruences where the moduli are all different. Definition. Given the system of linear congruences a 1 x b 1 (mod m 1 ) a 2 x b 2 (mod m 2 ). ( ) a n x b n (mod m n ) an integer x 0 is a solution of this system if and only if it is a solution of each of the congruences in the system. The system ( ) above can be solved iteratively, as the next example shows. Example 1. Solve the following system of linear congruences x 1 (mod 2) x 2 (mod 3) x 3 (mod 5) Solution. We write the first congruence as an equality x = 2t + 1 for some integer t, and then substitute this into the second congruence to get 2t + 1 2 (mod 3), that is, Since the inverse of 2 modulo 3 is 2 we get 2t 1 (mod 3). t 2 (mod 3). Next we write this congruence as an equality t = 3k + 2 for some integer k, so that x = 2t + 1 = 6k + 4 + 1 = 6k + 5. Substituting this into the third congruence, we get 6k + 5 3 (mod 5), that is, so that 6k 2 3 (mod 5), k 6k 3 (mod 5).

Writing this last congruence as an equality, we have k = 5l + 3, so that x = 6k + 5 = 30l + 18 + 5 = 23 + 30l, and the solution to the system of linear congruences is x 23 (mod 30). Before stating the Chinese Remainder Theorem, we need some preliminary results concerning the least common multiple of two or more positive integers. Definition. If a, b, and m are nonzero integers with m > 0, then m is called a common multiple of a and b if and only if a m and b m. Note: This definition has meaning only if a 0 and b 0 since division by zero is meaningless. Clearly, ab and ab are common multiples of a and b and by the law of trichotomy at least one of them is positive, so by the well-ordering principle there must exist a smallest positive common multiple of a and b, and we have the following definition. Definition. If m is the smallest positive common multiple of the integers a and b, it is called the least common multiple of a and b, and is denoted by [a, b] or lcm(a, b). Recall that the definition of the greatest common divisor was given in terms of the order properties of the integers, but we gave an equivalent definition in terms of divisibilty only. The same can be done for the least common multiple, and we have the following theorem. Theorem. If a, b, and m are nonzero integers with m > 0, then m = [a, b] if and only if (i) a m and b m, and (ii) whenever k is a common multiple of a and b, then m k. Proof. Suppose that m = [a, b] and k is any common multiple of a and b. By definition, m > 0, and a m and b m, so we need only show that m k. We can assume without loss of generality that k > 0, thus m k since m is the least common multiple of a and b. Now, from the division algorithm we can write k = q m + r, where q and r are integers and 0 r < m, and therefore r = k q m. Since k and m are common multiples of a and b, then a r and b r, so that r is a common multiple of a and b, thus, if r > 0, this contradicts the fact that m is the least common multiple of a and b. Therefore, we must have r = 0, that is, k = q m, so that m k. Conversely, suppose that m > 0, a m and b m, and that m k for every common multiple of a and b. Since m is a positive common multiple of a and b and for any common multiple k of a and b, we have m k, then we must have m k. Therefore m is the least positive multiple of a and b, that is, m = [a, b].

Thus, we have the following result: Theorem. If a, b, and c are nonzero integers, then [a, b] c if and only if a c and b c. We define the least common multiple of any finite set of nonzero integers m 1, m 2,..., m k in a similar fashion and denote it by [m 1, m 2,..., m k ], and we have the following lemma: Lemma. If m 1, m 2,..., m k are positive integers, then [m 1, m 2,..., m k ] = [ [m 1, m 2,..., m k 1 ], m k ]. Proof. Let d = [m 1, m 2,..., m k ] and e = [ ] [m 1, m 2,..., m k 1 ], m k, then d > 0 and e > 0. We will show that d e and e f. Since d = [m 1, m 2,..., m k ], then m i d for i = 1, 2,..., k, so that by the preceding theorem [m 1, m 2,..., m k 1 ] d and mk d, and the preceding theorem again implies that e d. Conversely, m k e and [m1, m 2,..., m k 1 ] e, so that m i e for i = 1, 2,..., k, so that [m1, m2,..., mk] e, that is, d e. Now we can prove the following theorem: Theorem. If m 1, m 2,..., m k are positive integers and a and b are integers, and a b (mod m 1 ), a b (mod m 2 ),... a b (mod m k ), then a b (mod [m 1, m 2,..., m k ]). Proof. If a b (mod m 1 ) and a b (mod m 2 ), then m 1 a b and m2 a b, which implies that [m 1, m 2 ] a b, so that a b (mod [m 1, m 2 ]). Now, a b (mod [m 1, m 2 ]) and a b (mod m 3 ), which implies as above that a b (mod [ ] [m 1, m 2 ], m 3 ) b (mod [m1, m 2, m 3 ]). Continuing in this manner, we see that a b (mod [m 1, m 2,..., m k ]).

Corollary. If a b (mod m 1 ), a b (mod m 2 ),... a b (mod m k ), where m 1 > 0, m 2 > 0,..., m k > 0 are pairwise relatively prime, then a b (mod m 1 m 2 m k ). Proof. Since (m 1, m 2 ) = 1, then m 1 m 2 = [m 1, m 2 ] (m 1, m 2 ) = [m 1, m 2 ]. Similarly, since ([m 1, m 2 ], m 3 ) = (m 1 m 2, m 3 ) = 1, then m 1 m 2 m 3 = [ ] [m 1, m 2 ], m 3 (m1 m 2, m 3 ) = [ ] [m 1, m 2 ], m 3 = [m1, m 2, m 3 ]. And now and easy induction argument shows that when (m i, m j ) = 1 for i j. [m 1, m 2,..., m k ] = m 1 m 2 m k Returning to the systems of linear congruences, we have the following theorem: Theorem. The system of congruences has a solution if and only if (m, n) a b. x a (mod m) x b (mod n) If this is the case and if x 0 is any particular solution to this system, then the general solution to this system is x x 0 (mod [m, n]). Proof. Note that x 0 is a solution to the system if and only if there is an integer k such that x 0 = a + km and a + km b (mod n), and this is true if and only if km a b (mod n). Thus, a solution exists if and only if (m, n) a b. Now suppose that (m, n) a b and that x0 is a solution to the system of congruences. If x 1 is also a solution, then x 1 a x 0 (mod m) x 1 b x 0 (mod n), so that x 1 x 0 is a common multiple of m and n, that is, m x 1 x 0 and n x 1 x 0, and therefore [m, n] x1 x 0, that is x 1 x 0 (mod [m, n]) and any two solutions are congruent modulo [m, n].

Conversely, if x 1 x 0 (mod [m, n]) then x 1 x 0 (mod m) a (mod m) and x 1 x 0 (mod n) b (mod n) so that x 1 is also a solution to the system of linear congruences. Therefore the general solution is x x 0 (mod [m, n]). Corollary 1. The system of linear congruences x a 1 (mod m 1 ) x a 2 (mod m 2 ). x a n (mod m n ) has a solution if and only if (m j, m k ) aj a k for each pair of subscripts j, k. If this is the case, and if x 0 is a solution, the general solution is x x 0 (mod [m 1, m 2,..., m n ]). Corollary 2. (Chinese Remainder Theorem) Suppose that m 1, m 2,..., m n are pairwise relatively prime, that is, (m i, m j ) = 1 for i j. Let M = m 1 m 2 m n and M k = M/m k for k = 1, 2,..., n. Let y k be the unique solution of y k M k 1 (mod m k ) for k = 1, 2,..., n, then the general solution to the system x a 1 (mod m 1 ) x a 2 (mod m 2 ). x a n (mod m n ) is given by x a 1 y 1 M 1 + a 2 y 2 M 2 + + a n y n M n (mod M). We now return to the first example of a system of linear congruences which we solved iteratively and use the Chinese Remainder Theorem to find the solution again. Example 2. Solve the following system of linear congruences x 1 (mod 2) x 2 (mod 3) x 3 (mod 5).

Solution. Here we have a 1 = 1, a 2 = 2, and a 3 = 3. Also, m 1 = 2, m 2 = 3, m 3 = 5, so that M = 2 3 5 = 30, and M 1 = M m 1 = 30 2 = 15, M 2 = M m 2 = 30 3 = 10, M 3 = M m 3 = 30 5 = 6. Solving the congruences y k M k 1 (mod m k ) for k = 1, 2, 3, we have 15y 1 1 (mod 2) implies y 1 1 (mod 2) 10y 2 1 (mod 3) implies y 2 1 (mod 3) 6y 3 1 (mod 5) implies y 3 1 (mod 5), therefore the general solution to the system is x a 1 y 1 M 1 + a 2 y 2 M 2 + a 3 y 3 M 3 1 15 + 2 10 + 3 6 23 (mod 30), which is the same as the solution obtained previously.