Carmen s Core Concepts (Math 135)

Similar documents
Applications of Fermat s Little Theorem and Congruences

Solutions for the Practice Questions

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

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

ALGEBRA: Chapter I: QUESTION BANK

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

Introduction to Modular Arithmetic

Number Theory/Cryptography (part 1 of CSC 282)

Math 127: Equivalence Relations

Discrete Math Class 4 ( )

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

Practice Midterm 2 Solutions

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

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

1.6 Congruence Modulo m

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

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

SOLUTIONS FOR PROBLEM SET 4

SOLUTIONS TO PROBLEM SET 5. Section 9.1

Math 412: Number Theory Lecture 6: congruence system and

Modular arithmetic Math 2320

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

Modular Arithmetic. claserken. July 2016

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

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

Fermat s little theorem. RSA.

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

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

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

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.

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

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

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

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.

Modular Arithmetic. Kieran Cooney - February 18, 2016

MAT Modular arithmetic and number theory. Modular arithmetic

Wilson s Theorem and Fermat s Theorem

Sheet 1: Introduction to prime numbers.

NUMBER THEORY AMIN WITNO

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

A REMARK ON A PAPER OF LUCA AND WALSH 1. Zhao-Jun Li Department of Mathematics, Anhui Normal University, Wuhu, China. Min Tang 2.

CHAPTER 2. Modular Arithmetic

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

Solutions for the 2nd Practice Midterm

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

Distribution of Primes

Two congruences involving 4-cores

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

Number Theory. Konkreetne Matemaatika

The Chinese Remainder Theorem

MODULAR ARITHMETIC II: CONGRUENCES AND DIVISION

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

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

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

Primitive Roots. Chapter Orders and Primitive Roots

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

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

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

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

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

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

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

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

FORBIDDEN INTEGER RATIOS OF CONSECUTIVE POWER SUMS

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

Modular Arithmetic: refresher.

Algorithmic Number Theory and Cryptography (CS 303)

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

Grade 6/7/8 Math Circles April 1/2, Modular Arithmetic

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

Data security (Cryptography) exercise book

Quadratic Residues. Legendre symbols provide a computational tool for determining whether a quadratic congruence has a solution. = a (p 1)/2 (mod p).

Foundations of Cryptography

6.2 Modular Arithmetic

An elementary study of Goldbach Conjecture

Solutions for the Practice Final

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

Grade 6 Math Circles March 1-2, Introduction to Number Theory

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

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.

Ramanujan-type Congruences for Overpartitions Modulo 5. Nankai University, Tianjin , P. R. China

Classical Cryptography

Zhanjiang , People s Republic of China

Divisibility. Igor Zelenko. SEE Math, August 13-14, 2012

Launchpad Maths. Arithmetic II

arxiv: v3 [math.co] 4 Dec 2018 MICHAEL CORY

Goldbach Conjecture (7 th june 1742)

Algorithmic Number Theory and Cryptography (CS 303)

Final exam. Question Points Score. Total: 150

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:

Implementation / Programming: Random Number Generation

Warm-Up Up Exercises. 1. Find the value of x. ANSWER 32

Solution: This is sampling without repetition and order matters. Therefore

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

ELEMENTS OF NUMBER THEORY & CONGRUENCES. Lagrange, Legendre and Gauss. Mth Mathematicst

Name: Date: Chapter 2 Quiz Geometry. Multiple Choice Identify the choice that best completes the statement or answers the question.

Public Key Encryption

CLASS NOTES. A mathematical proof is an argument which convinces other people that something is true.

Modular Arithmetic and Doomsday

Number Theory for Cryptography

Transcription:

Carmen s Core Concepts (Math 135) Carmen Bruni University of Waterloo Week 7

1 Congruence Definition 2 Congruence is an Equivalence Relation (CER) 3 Properties of Congruence (PC) 4 Example 5 Congruences and Division (CD) 6 Congruent iff Same Remainder (CISR) 7 Example 2 8 Linear Congruences 9 Solution 1 to Solve 4x 5 (mod 8). 10 Solution 2 to Solve 4x 5 (mod 8) 11 Solution 3 to Solve 4x 5 (mod 8) 12 Linear Congruence Theorem 1 13 Simplifying Congruences

Congruence Definition

Congruence Definition Definition: Let a, b Z and n N. Then a is congruent to b modulo n if and only if n (a b) and we write a b (mod n). This is equivalent to saying there exists an integer k such that a b = kn or a = b + kn. Example: 5 11 (mod 6), 723 17 (mod 20)

Congruence is an Equivalence Relation (CER) Theorem: Congruence is an Equivalence Relation (CER) Let n N. Let a, b, c Z. Then 1 (Reflexivity) a a (mod n). 2 (Symmetry) a b (mod n) b a (mod n). 3 (Transitivity) a b (mod n) and b c (mod n) a c (mod n).

Properties of Congruence (PC) Theorem: Properties of Congruence (PC) Let a, a, b, b Z. If a a (mod m) and b b (mod m), then 1 a + b a + b (mod m) 2 a b a b (mod m) 3 ab a b (mod m) Corollary If a b (mod m) then a k b k (mod m) for k N.

Example Example: Is 5 9 + 62 2000 14 divisible by 7?

Example Example: Is 5 9 + 62 2000 14 divisible by 7? Solution: Reduce modulo 7. By Properties of Congruence, we have 5 9 + 62 2000 14 ( 2) 9 + ( 1) 2000 0 (mod 7) 2 9 + 1 (mod 7) (2 3 ) 3 + 1 (mod 7) (8) 3 + 1 (mod 7) (1) 3 + 1 (mod 7) 0 (mod 7) Therefore, the number is divisible by 7.

Congruences and Division (CD) Proposition: (Congruences and Division (CD)). Let a, b, c Z and let n N. If ac bc (mod n) and gcd(c, n) = 1, then a b (mod n).

Congruences and Division (CD) Proposition: (Congruences and Division (CD)). Let a, b, c Z and let n N. If ac bc (mod n) and gcd(c, n) = 1, then a b (mod n). Proof: By assumption, n (ac bc) so n c(a b). Since gcd(c, n) = 1, by Coprimeness and Divisibility (CAD), n (a b). Hence a b (mod n).

Congruent iff Same Remainder (CISR) Proposition: (Congruent iff Same Remainder (CISR)) Let a, b Z. Then a b (mod n) if and only if a and b have the same remainder after division by n.

Congruent iff Same Remainder (CISR) Proposition: (Congruent iff Same Remainder (CISR)) Let a, b Z. Then a b (mod n) if and only if a and b have the same remainder after division by n. Proof: By the Division Algorithm, write a = nq a + r a and b = nq b + r b where 0 r a, r b < n. Subtracting gives a b = n(q a q b ) + r a r b ( ) First assume that a b (mod n), that is n a b. Since n n(q a q b ), we have by Divisibility of Integer Combinations that n (a b) + n(q a q b )( 1) and thus, n r a r b. By our restriction on the remainders, we see that the difference is bounded by n + 1 r a r b n 1. However, only 0 is divisible by n in this range! Since n (r a r b ), we must have that r a r b = 0. Hence r a = r b. ( ) Assume that r a = r b. Noting that the difference a b yields a b = n(q a q b ) + r a r b = n(q a q b ), we see that n (a b) and hence a b (mod n).

Example 2 What is the remainder when 77 100 (999) 6 83 is divided by 4?

Example 2 What is the remainder when 77 100 (999) 6 83 is divided by 4? Solution: Notice that 6 = 4(1) + 2 77 = 19(4) + 1 999 = 249(4) + 3 Hence, by (CISR), we have 6 2 (mod 4), 77 1 (mod 4) and 999 3 (mod 4). Thus, by (PC), 77 100 (999) 6 83 (1) 100 (3) 2 83 (mod 4) 3 2 2 2 81 (mod 4) 3 4 2 81 (mod 4) 3 0(2 81 ) (mod 4) 3 (mod 4) Once again by (CISR), 3 is the remainder when 77 100 (999) 6 83 is divided by 4.

Linear Congruences Question: Solve ax c (mod m) where a, c Z and m N for x Z. Note: When we are solving ax = c over the integers, we know that this has a solution if and only if a c. Example: Solve 4x 5 (mod 8).

Solution 1 to Solve 4x 5 (mod 8). By definition, there exists a z Z such that 4x 5 = 8z, that is, 4x 8z = 5. Now, let y = z. Thus, the original question is equivalent to solving the Linear Diophantine Equation 4x + 8y = 5 Since gcd(4, 8) = 4 5, by LDET1, we see that this LDE has no solution. Hence the original congruence has no solutions.

Solution 2 to Solve 4x 5 (mod 8) Let x Z. By the Division Algorithm, x = 8q + r for some 0 r 7 and q, r integers. By Congruent If and Only If Same Remainder, 4x 5 (mod 8) holds if and only if 4r 5 (mod 8). Thus, if we can prove that no number from 0 x 7 works, then no integer x can satisfy the congruence. Trying the possibilities 4(0) 0 (mod 8) 4(1) 4 (mod 8) 4(2) 0 (mod 8) 4(3) 4 (mod 8) 4(4) 0 (mod 8) 4(5) 4 (mod 8) 4(6) 0 (mod 8) 4(7) 4 (mod 8) shows that 4x 5 (mod 8) has no solution.

Solution 3 to Solve 4x 5 (mod 8) Assume towards a contradiction that there exists an integer x such that 4x 5 (mod 8). Multiply both sides by 2 to get (by Properties of Congruence) that 0 0x 8x 10 (mod 8) Hence, 8 10 however 8 10. This is a contradiction. Thus, there are no integer solutions to 4x 5 (mod 8).

Linear Congruence Theorem 1 Theorem: LCT1 (Linear Congruence Theorem 1). Let a, c Z and m N and gcd(a, m) = d. Then ax c (mod m) has a solution if and only if d c. Further, we have d solutions modulo m and 1 solution modulo m/d. Moreover, if x = x 0 is a solution, then x x 0 (mod m/d) forms the complete solution set or alternatively, x = x 0 + m d n for all n Z or for another alternative way to write the solution: x x 0, x 0 + m d, x 0 + 2 m d,..., x 0 + (d 1) m d (mod m) This is a restatement of LDET1

Simplifying Congruences If x 2, 5 (mod 6), then x 2 (mod 3) gives the same solution set.

Simplifying Congruences If x 2, 5 (mod 6), then x 2 (mod 3) gives the same solution set. This is true since if x 2, 5 (mod 6), then x = 2 + 6k or x = 5 + 6k for some integer k. In either case, 3 (x 2) or 3 (x 5) since 3 6. Hence, x 2 (mod 3) or x 5 2 (mod 3). In reverse, if x 2 (mod 3), then x = 2 + 3k for some integer k. Now, since 6/3 = 2, we look at the remainder of k when divided by 2. If the remainder is 0, then k = 2l for some integer l and hence x = 2 + 6l and so x 2 (mod 6). Now, if the remainder when k is divided by 2 is 1, then write k = 2l + 1 for some integer l. Hence, x = 2 + 3(2l + 1) giving x = 5 + 6l and thus x 5 (mod 6).