Discrete Math Class 4 ( )

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

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

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

NUMBER THEORY AMIN WITNO

Number Theory/Cryptography (part 1 of CSC 282)

Solutions for the Practice Questions

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

Carmen s Core Concepts (Math 135)

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

Distribution of Primes

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

Modular Arithmetic. claserken. July 2016

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

CHAPTER 2. Modular Arithmetic

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

SOLUTIONS TO PROBLEM SET 5. Section 9.1

ALGEBRA: Chapter I: QUESTION BANK

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

1.6 Congruence Modulo m

Applications of Fermat s Little Theorem and Congruences

Primitive Roots. Chapter Orders and Primitive Roots

SOLUTIONS FOR PROBLEM SET 4

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

Introduction to Modular Arithmetic

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

Fermat s little theorem. RSA.

Final exam. Question Points Score. Total: 150

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

The Chinese Remainder Theorem

Number Theory. Konkreetne Matemaatika

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

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

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.

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

Math 412: Number Theory Lecture 6: congruence system and

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

by Michael Filaseta University of South Carolina

Foundations of Cryptography

Data security (Cryptography) exercise book

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

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

Wilson s Theorem and Fermat s Theorem

Math 127: Equivalence Relations

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

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

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

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

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

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

Modular Arithmetic: refresher.

Multiples and Divisibility

Cryptography, Number Theory, and RSA

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.

Implementation / Programming: Random Number Generation

LUCAS-SIERPIŃSKI AND LUCAS-RIESEL NUMBERS

6.2 Modular Arithmetic

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

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

An elementary study of Goldbach Conjecture

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

Modular Arithmetic. Kieran Cooney - February 18, 2016

Practice Midterm 2 Solutions

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

Solutions for the Practice Final

Goldbach Conjecture (7 th june 1742)

Modular arithmetic Math 2320

L29&30 - RSA Cryptography

Solutions for the 2nd Practice Midterm

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 for Cryptography

Zhanjiang , People s Republic of China

Public Key Encryption

The Chinese Remainder Theorem

MAT Modular arithmetic and number theory. Modular arithmetic

FORBIDDEN INTEGER RATIOS OF CONSECUTIVE POWER SUMS

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.

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

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

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

Problem Set 6 Solutions Math 158, Fall 2016

Degree project NUMBER OF PERIODIC POINTS OF CONGRUENTIAL MONOMIAL DYNAMICAL SYSTEMS

The covering congruences of Paul Erdős. Carl Pomerance Dartmouth College

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

Sheet 1: Introduction to prime numbers.

CS 202, section 2 Final Exam 13 December Pledge: Signature:

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

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

Overview. The Big Picture... CSC 580 Cryptography and Computer Security. January 25, Math Basics for Cryptography

Two congruences involving 4-cores

The Chinese Remainder Theorem

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

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

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

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

Mark Kozek. December 7, 2010

MODULAR ARITHMETIC II: CONGRUENCES AND DIVISION

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

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

PRIMES IN SHIFTED SUMS OF LUCAS SEQUENCES. Lenny Jones Department of Mathematics, Shippensburg University, Shippensburg, Pennsylvania

Transcription:

Discrete Math 37110 - Class 4 (2016-10-06) 41 Division vs congruences Instructor: László Babai Notes taken by Jacob Burroughs Revised by instructor DO 41 If m ab and gcd(a, m) = 1, then m b DO 42 If gcd(a, m) = 1, then gcd(m, ab) = gcd(m, b) DO 43 If d m and a b (mod m) then a b (mod d) (Uses transitivity of divisibility) Example 44 If a b (mod 75) then a b (mod 5) DO 45 a b (mod m) = ac bc (mod mc) The converse of this also holds DO 46 If c a, b, m and a b (mod m), then a c b c (mod m ), assuming c 0 c We have seen that a b (mod m) = ac bc (mod m) The converse of this statement is false For example, 2 4 mod 2, but, dividing both sides with 2 we do not get a congruence: 1 2 mod 2 However, the converse does hold under an additional assumption DO 47 Suppose c a, c b, a b (mod m), and c, m are relatively prime Then a c b (mod m) c Here is a stronger version of this statement DO 48 Suppose c a, c b, c 0 and a b (mod m) Then a c b c (mod m d ) where d = gcd(c, m) 42 Linear congruences Definition 49 x is a multiplicative inverse of a mod m if ax 1 (mod m) Proposition 410 If there exists an inverse of a (mod m) then the inverses form a residue class modm In other words, if x 0 is an inverse then ( x)(x is an inverse x x 0 (mod m)) Corollary 411 The multiplicative inverse is unique modm inverses must be congruent mod m This means that any two 1

Proof of Prop 410 ax 1 (mod m) ax ax 0 (mod m) m ax ax 0 = a(x x 0 ) m x x 0 (because gcd(a, m) = 1) x x 0 mod m Proposition 412 (Linear congruence) Given a, b, m, a solution to ax b (mod m) exists if and only if gcd(a, m) b Proof of necessity Let d = gcd(a, m) Then ax b (mod m) = ax b (mod d), and thus 0 b (mod d) since a 0 (mod d) So d b DO 413 The sufficiency is left as an exercise We assume d b, and want to show that x such that ax b (mod m) Hint Prove that this statement is equivalent to Bézout s lemma HW 414 Show that if ax b (mod m) is solvable then the solutions form a residue class modulo m d What this means is the following Suppose ax 0 b (mod m) Then ( x)(ax b (mod m)) (x x 0 (mod m ) d ), where d = gcd(a, m) Remark It follows that the solution is unique modulo m/d, ie, every pair of solutions is congruent modulo m/d Method 415 We want to solve ax b (mod m), assuming d b where d = gcd(a, m) 0 We can transform this into ax b mod m, in which case the coefficient and the modulus d d d are relatively prime (gcd(a, m ) = 1, where a = a/d and m = m/d) Let b = b/d Then x = (a ) 1 b (mod m ) works; or we can directly use a method analogous to finding the multiplicative inverse 43 Systems of simultaneous congruences Definition 416 A system of simultaneous congruences is a set of congruences which must be satisfied simultaneously DO 417 Consider the following system of simultaneous congruences a 1 x b 1 (mod m 1 ) a 2 x b 2 (mod m 2 ) a k x b k (mod m k ) 2

Prove: If each separate congruence is solvable and ( i)(m i 0) then the system is equivalent to a system of the following form: x b 1 (mod m 1) x b 2 (mod m 2) x b k (mod m k) where m i = m i / gcd(a i, m i ) Determine the value of b i (Two systems are equivalent if they have the same set of solutions) So we only need to deal with the case when each coefficient is 1 Theorem 418 Consider the following system of simultaneous congruences x c 1 (mod m 1 ) x c 2 (mod m 2 ) x c k (mod m k ) If this system has a solution then the solution is unique modulo lcm(m 1, m 2,, m k ) Proof Suppose x 0 is a solution Then x is a solution if and only if ( i)(x x 0 (mod m i )), or equivalently, x x 0 mod lcm(m 1, m 2,, m k ) DO 419 Show that e 1 a and and e k a if and only if lcm(e 1,, e k ) a Example 420 A system with no solution: DO 421 Show that the system has no solution Hint: look at each congruence modulo 5 Theorem 422 The system x 0 (mod 2) x 1 (mod 2) x 4 (mod 75) x 17 (mod 210) x a 1 (mod m 1 ) x a 2 (mod m 2 ) is solvable if and only if a 1 a 2 (mod d) where d = gcd(m 1, m 2 ) 3

Proof of necessity x a i (mod m i ) = x a i (mod d) = a 1 x a 2 (mod d) XC 423 Show that the condition is also sufficent: if a 1 a 2 (mod d) then the system of congruences given in Theorem 422 has a solution Theorem 424 (Chinese Remainder Theorem (CRT)) If ( i j)(gcd(m i, m j ) = 1), then has a solution x c 1 (mod m 1 ) x c k (mod m k ) DO 425 Prove that under the assumptions of the CRT, the solutions form a residue class modulo m 1 m k In particular, the solution is unique modulo m 1 m k DO 426 Let M = m 1 m k, and P i = M m i = j i m j Show that ( j)(gcd(p j, m j ) = 1) Proof of CRT Try to find x in the form x = k i=1 x ip i Now x is a solution if and only if k i=1 x ip i c j (mod m j ) for each j Let us note that P i 0 (mod m j ) if i j The above sum thus reduces to x j P j c j (mod m j ) (separation of the variables) So to solve our original system of simultaneous congruences, we just need to solve each congruence x j P j c j (mod m j ) separately But this congruence is solvable because gcd(p j, m j ) = 1 CH 427 The system x a i (mod m i ) (i = 1,, k) is solvable if and only if every pair of congruences is solvable, i e, ( i j)(a i a j mod gcd(m i, m j )) Note that there may be questions that ask us to use the CRT to solve them; don t use this instead 44 GCD of a set of integers Definition 428 (Greatest common divisior of a set of numbers) Let S Z We say that d is a gcd of S if d is a common divisor (ie, ( s S)(d s)) and d is a multiple of all common divisors (ie, ( e)(if ( s S)(e s) then e d)) Note that in this definition, S is permitted to be an infinite set, or the empty set DO 429 Find a, b, c such that gcd(a, b, c) = 1 but gcd(a, b) 1 and gcd(a, c) 1 and gcd(b, c) 1 DO 430 Show that the gcd exists and Bézout s Lemma holds: the gcd can be written in the form gcd = s i S x i s i Here the sum must be finite even if S is infinite; in other words, all but a finite number of the coefficients x i must be zero 4

DO 431 (a) What is gcd( )? (b) What is gcd(z)? DO 432 Prove: lcm(a, b) is the gcd of all common multiples of a and b (Note: this is an infinite set) DO 433 Using the notation from the proof of CRT above, prove that gcd(p 1,, P k ) = 1 DO 434 (No-risk strategy) In the proof of CRT, we were looking for solutions of a particular form, namely, linear combinations of the P i Prove that there was no risk to this approach: every integer can be written as a linear combination of the P i 45 Reducing composite moduli to prime power moduli DO 435 Prove: a b (mod 600) the following congruences hold simultaneously a b (mod 8) a b (mod 3) a b (mod 25) DO 436 Let m = p k i i be the prime factorization of m (the p i are distinct primes) Then a b (mod m) ( i)(a b (mod p k i i ) Example 437 Consider the quadratic congruence ax 2 + bx + c 0 (mod 600) This is equivalent to the following set of simultaneous congruences ax 2 + bx + c 0 (mod 8) ax 2 + bx + c 0 (mod 3) ax 2 + bx + c 0 (mod 25) If we have a way of handling such congruences modulo 8, 3, and 2 (and modulo prime powers in general) then the solutions can then be combined using the CRT to obtain the solutions modulo 600 HW 438 Given a prime p, prove that x 2 1 (mod p) x ±1 (mod p) Clearly state, exactly what property of p you are using XC 439 Given a pair of distinct odd primes, p q, prove that x 2 1 (mod pq) = x ±1 (mod pq) Warning: you have to show that this inference is false for every pair (p, q) of distinct odd primes Giving a counterexample for a particular pair such as (3, 5) will not do Note: This problem was previously erroneously posted as HW It was meant to be XC 5

46 An amusing exercise: decimal is special! The instructor s mother, a grade school teacher, tried to teach her slow-witted son the multiplication table I had especially great difficulty remembering 7 8 Mother noticed the following helpful mnemonic 56 = 7 8 Are there other entries in the multiplication table that obey a similar rule? Sure, 12 = 3 4 AMUX 440 (Instructor s mother s rule) Show that the instructor s mother s rule occurs in the decimal system only In other words, consider four consecutive digits, k,, k + 3, in base b So 0 k b 4 Now if (k + 2)(k + 3) is the two-digit number k (k + 1) b, ie, (k + 2)(k + 3) = bk + (k + 1), then b = 10 and k = 1 or 5 (Enjoy this exercise, do not hand it in) 6