Part V. Chapter 19. Congruence of integers

Similar documents
Wilson s Theorem and Fermat s Little Theorem

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

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

Solutions to Section 2.1 Homework Problems S. F. Ellermeyer

14 Equivalence Relations

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?

4. Congruence Classes

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?

Rings of Residues. S. F. Ellermeyer. September 18, ; [1] m

3.2 Solving linear congruences. v3

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.

Notes on Systems of Linear Congruences

CSE 20 DISCRETE MATH. Winter

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

Lecture Notes. Advanced Discrete Structures COT S

M381 Number Theory 2004 Page 1

Congruences. September 16, 2006

Homework #2 solutions Due: June 15, 2012

MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST

Mathematics 220 Homework 4 - Solutions. Solution: We must prove the two statements: (1) if A = B, then A B = A B, and (2) if A B = A B, then A = B.

Math 109 HW 9 Solutions

Simultaneous Linear, and Non-linear Congruences

CHAPTER 3. Congruences. Congruence: definitions and properties

CSE 20 DISCRETE MATH. Fall

Number Theory Homework.

NOTES ON SIMPLE NUMBER THEORY

Congruence of Integers

Modular Arithmetic Instructor: Marizza Bailey Name:

A Readable Introduction to Real Mathematics

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

Chapter 3 Basic Number Theory

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

Relations. Relations. Definition. Let A and B be sets.

Elementary Number Theory. Franz Luef

Mathematics 228(Q1), Assignment 3 Solutions

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3

Tomáš Madaras Congruence classes

1 Structure of Finite Fields

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

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION

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 = ,

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

Number Theory Proof Portfolio

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

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

1.4 Equivalence Relations and Partitions

Chapter 1 : The language of mathematics.

4.4 Solving Congruences using Inverses

Orders and Equivalences

CSE 20 DISCRETE MATH. Winter

Chapter 5: The Integers

5: The Integers (An introduction to Number Theory)

Number Theory and Group Theoryfor Public-Key Cryptography

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

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

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

a = mq + r where 0 r m 1.

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

Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6

WORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...}

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

Definition: div Let n, d 0. We define ndiv d as the least integer quotient obtained when n is divided by d. That is if

Carmen s Core Concepts (Math 135)

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

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

Prof. Ila Varma HW 8 Solutions MATH 109. A B, h(i) := g(i n) if i > n. h : Z + f((i + 1)/2) if i is odd, g(i/2) if i is even.

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

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES

MATH 361: NUMBER THEORY FOURTH LECTURE

4 Powers of an Element; Cyclic Groups

7.2 Applications of Euler s and Fermat s Theorem.

CIS 6930/4930 Computer and Network Security. Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography

cse 311: foundations of computing Fall 2015 Lecture 11: Modular arithmetic and applications

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5

MATH 215 Sets (S) Definition 1 A set is a collection of objects. The objects in a set X are called elements of X.

SOLUTIONS Math 345 Homework 6 10/11/2017. Exercise 23. (a) Solve the following congruences: (i) x (mod 12) Answer. We have

3.7 Non-linear Diophantine Equations

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

The Chinese Remainder Theorem

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

The Euclidean Algorithm and Multiplicative Inverses

7. Prime Numbers Part VI of PJE

INTRODUCTION TO THE GROUP THEORY

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

Mathematics for Cryptography

Discrete Mathematics with Applications MATH236

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

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

MATH FINAL EXAM REVIEW HINTS

Chapter 5. Modular arithmetic. 5.1 The modular ring

Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations

Outline. Number Theory and Modular Arithmetic. p-1. Definition: Modular equivalence a b [mod n] (a mod n) = (b mod n) n (a-b)

MATH 2200 Final Review

Math 2070BC Term 2 Weeks 1 13 Lecture Notes

Introduction to Sets and Logic (MATH 1190)

Section 0. Sets and Relations

Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

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

For your quiz in recitation this week, refer to these exercise generators:

Transcription:

Part V. Chapter 19. Congruence of integers Congruence modulo m Let m be a positive integer. Definition. Integers a and b are congruent modulo m if and only if a b is divisible by m. For example, 1. 277 and 2 are congruent modulo 5. 2. 3 and 17 are congruent modulo 4. We often write this condition as m (a b) and we often use the fact that this means that there exists q Z such that a b = mq. One writes a b mod m for a and b being congruent modulo m. E.g., 3 17 mod 4. By the Division Theorem, given m Z + and a Z there exist unique integers q and r such that a = mq + r, 0 r m 1. (1) That is, we can divide a by m to get a remainder r. Let R m = {0, 1, 2,..., m 1} be the set of remainders (modulo m). Of course, r R m. E.g., 277 = 5 55 + 2 and 2 R 5. Equation (1) implies a r = mq. So, by definition, a r mod m. E.g., 277 2 mod 5. In fact, we have shown that: For any m Z + and a Z there exists a unique integer r R m such that a r mod m. 1

Note that two integers are congruent modulo m if and only if they have the same remainder after being divided by m. Example (modulo 3). Let m = 3. Then 20 5 mod 3 since 20 5 = 15 is divisible by 3 (note that 20 and 5 both have the remainder 2 after being divided by 3). (1) Any integer a is congruent to itself modulo m: a a mod m since a a = 0 is of course divisible by m: 0 = m 0. (2) If a is congruent to b modulo m, then b is congruent to a modulo m, i.e., a b mod m implies b a mod m. Indeed, m (a b) implies m (b a). (3) If a is congruent to b modulo m and if b is congruent to c modulo m, then a is congruent to c modulo m, i.e., a b mod m and b c mod m implies a c mod m. Indeed, m (a b) and m (b c) implies m ((a b) + (b c)), i.e., m (a c). Congruence classes modulo m (for m = 3) Example. Again let m = 3. Congruence modulo 3 divides the integers into 3 categories (classes): [0] integers congruent to 0, [1] integers congruent to 1, [2] integers congruent to 2. The set of integers congruent to 0 are those integers which divided by 3 yield a remainder of 0, i.e., they are the multiples of 3: [0] = {..., 9, 6, 3, 0, 3, 6, 9,...}. The set of integers congruent to 1 are those integers which divided by 3 yield a remainder of 1, i.e., they are the multiples of 3 plus 1: [1] = {..., 8, 5, 2, 1, 4, 7, 10,...}. 2

The set of integers congruent to 2 are those integers which divided by 3 yield a remainder of 1, i.e., they are the multiples of 3 plus 2: [2] = {..., 7, 4, 1, 2, 5, 8, 11,...}. Note that each congruence class [0], [1] and [2] is a subset of integers. They are disjoint from one another: [0] [1] =, [0] [2] =, [1] [2] = and their union comprises all of the integers: [0] [1] [2] = Z. Another way of saying this is every integer is in exactly one of the three congruence classes [0], [1] and [2]. We can think of congruence as assigning colors to numbers. Congruence modulo 3 assigns three possible colors to numbers. Say the integers congruent to 0 are red, the integers congruent to 1 are white, and the integers congruent to 2 are blue. Exercise 1 Show that adding a red integer to an integer does not change the color of that integer. Show that the sum of a white integer and a blue integer must be a red integer. The exercise says that: The color of a + b depends only on the color of a and the color of b. Another way of saying this is: If a 1 and a 2 have the same color and if b 1 and b 2 have the same color, then a 1 + b 1 and a 2 + b 2 have the same color. In other words: If a 1 a 2 mod 3 and b 1 b 2 mod 3, then a 1 + b 1 a 2 + b 2 mod 3. Proposition 2 (Eccles 19.1.3) If a 1 a 2 mod m and b 1 b 2 mod m, then 1. a 1 + b 1 a 2 + b 2 mod m, 2. a 1 b 1 a 2 b 2 mod m, 3. a 1 b 1 a 2 b 2 mod m. 3

Linear congruences modulo m A linear congruence is an equation of the form ax b mod m. We approach this by working some examples from Eccles book. Example 19.3.4. Solve: 6x 15 mod 21. Note that 3 divides each of 6, 15 and 21. Step 1. Since 3 divides 6, 15 and 21, this is equivalent to: Here we used the following fact: 2x 5 mod 7. Lemma 1. If d divides a, b and m, then ax b mod m is equivalent to a d x b d mod m d. Step 2. 2x 5 mod 7 is equivalent to Here we used the following fact: 2x 12 mod 7. Lemma 2. ax b mod m is equivalent to ax b + cm mod m for any integer c. Step 3. 2x 12 mod 7 is equivalent to Here we used the following: x 6 mod 7. Lemma 3. If gcd (a, m) = 1, then ax ac mod m is equivalent to x c mod m. From Step 3 we conclude that the equation 6x 15 mod 21 is equivalent to x 6 mod 7. The solutions to this equation are {..., 8, 1, 6, 13, 20,...} = {6 + 7n n Z}. 4

Lemma 1. If d divides a, b and m, then ax b mod m is equivalent to a d x b d mod m d. P L 1. ax b mod m is equivalent to m (ax b). Since d divides ax b (d divides both a and b), this is equivalent to that is, m d ax b, d ( m a d d x b ), d which is equivalent to a d x b d mod m d. Lemma 2. ax b mod m is equivalent to ax b + cm mod m for any integer c. P L 2. ax b mod m m (ax b) m (ax b cm) ax b + cm mod m. Lemma 3. If gcd (a, m) = 1, then ax ac mod m is equivalent to P L 3. x c mod m. ax ac mod m m (ax ac) m a (x c). Since gcd (a, m) = 1, this is equivalent to m (x c), i.e., x c mod m. 5

Example 19.3.3. Solve: 4x 12 mod 14. Note that 4 divides 4 and 12 but not 14. And note gcd (4, 14) = 2. By the proposition below, we have that 4x 12 mod 14 is equivalent to x 3 mod 7. Here is the general result about dividing congruence equations. Proposition. Let m Z + and a Z and let g = gcd (a, m). If ab 1 ab 2 mod m, then b 1 b 2 mod m g. Proof. Suppose ab 1 ab 2 mod m. Then m a (b 1 b 2 ). This implies m g a g (b 1 b 2 ). Since gcd( m g, a g ) = 1, we conclude that m g (b 1 b 2 ). This says that b 1 b 2 mod m g. Corollary 1: Proposition 19.3.1. This the proposition in the case where a m, i.e., gcd (a, m) = a. (Show this is equivalent to Lemma 1 above.) Corollary 2: Proposition 19.3.2. This the proposition in the case where gcd (a, m) = 1. (Show this is equivalent to Lemma 3 above.) 6