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

Similar documents
Discrete Math Class 4 ( )

Number Theory/Cryptography (part 1 of CSC 282)

Solutions for the Practice Questions

Modular Arithmetic. claserken. July 2016

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

Modular Arithmetic: refresher.

NUMBER THEORY AMIN WITNO

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

Applications of Fermat s Little Theorem and Congruences

ALGEBRA: Chapter I: QUESTION BANK

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

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

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

Carmen s Core Concepts (Math 135)

Introduction to Modular Arithmetic

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

Cryptography, Number Theory, and RSA

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

1.6 Congruence Modulo m

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

Distribution of Primes

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

Fermat s little theorem. RSA.

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

Modular Arithmetic. Kieran Cooney - February 18, 2016

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

6.2 Modular Arithmetic

Primitive Roots. Chapter Orders and Primitive Roots

The Chinese Remainder Theorem

MAT Modular arithmetic and number theory. Modular arithmetic

Math 127: Equivalence Relations

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.

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

SOLUTIONS TO PROBLEM SET 5. Section 9.1

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

Number Theory. Konkreetne Matemaatika

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

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

SOLUTIONS FOR PROBLEM SET 4

Data security (Cryptography) exercise book

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

Example Enemy agents are trying to invent a new type of cipher. They decide on the following encryption scheme: Plaintext converts to Ciphertext

L29&30 - RSA Cryptography

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.

Wilson s Theorem and Fermat s Theorem

Sheet 1: Introduction to prime numbers.

CHAPTER 2. Modular Arithmetic

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

Modular arithmetic Math 2320

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

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

Final exam. Question Points Score. Total: 150

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

A Quick Introduction to Modular Arithmetic

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

Solutions for the 2nd Practice Midterm

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

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

Solutions for the Practice Final

Math 412: Number Theory Lecture 6: congruence system and

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

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

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

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

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

Multiples and Divisibility

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

Number-Theoretic Algorithms

Implementation / Programming: Random Number Generation

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

Foundations of Cryptography

Math 1111 Math Exam Study Guide

Number Theory for Cryptography

1 Introduction to Cryptology

MODULAR ARITHMETIC II: CONGRUENCES AND DIVISION

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

Math 1111 Math Exam Study Guide

MST125. Essential mathematics 2. Number theory

EE 418 Network Security and Cryptography Lecture #3

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

Modular Arithmetic and Doomsday

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

Practice Midterm 2 Solutions

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

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

Grade 6 Math Circles. Divisibility

Two congruences involving 4-cores

NIM Games: Handout 1

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

The Chinese Remainder Theorem

Goldbach Conjecture (7 th june 1742)

LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI

The Chinese Remainder Theorem

ON SPLITTING UP PILES OF STONES

FORBIDDEN INTEGER RATIOS OF CONSECUTIVE POWER SUMS

The number theory behind cryptography

An elementary study of Goldbach Conjecture

Introduction To Modular Arithmetic

Fall. Spring. Possible Summer Topics

Zhanjiang , People s Republic of China

Transcription:

- Divisibility - Congruences June 23, 2014

Primes - Divisibility - Congruences Definition A positive integer p is prime if p 2 and its only positive factors are itself and 1. Otherwise, if p 2, then p is composite. Theorem/Definition (Fundamental theorem of arithmetic) Every integer greater than 1 can be written as the product of one or more prime factors, and except for the order in which we write the prime factors, this product is unique. The product is the integer s prime factorization. Example: 600 = 2 3 3 5 2. Proof later in the course...

- Divisibility - Congruences Greatest common divisor gcd(a, b) is the largest integer that divides a and b Example: GCD of 140 and 48 is 4. If gcd(a, b) = 1, then a and b are relatively prime. (Notation: a b.)

Euclid s Algorithm - Divisibility - Congruences Assume a b. EuclidAlg(a,b) If b = 0 Return a Else Return EuclidAlg(b, a mod b) Reminder: a mod b is the remainder when a is divided by b. Example: gcd(662, 414) = 2.

- Divisibility - Congruences Euclid s Algorithm, Correctness EuclidAlg(a,b) If b = 0 Return a. Else Return EuclidAlg(b, a mod b) Theorem If a, b N and b 0, then gcd(a, b) = gcd(b, a mod b). Proof: Show that common divisors of a and b are the same as the common divisors of b and a mod b.

- Divisibility - Congruences Euclid s Algorithm, Termination EuclidAlg(a,b) If b = 0 Return a. Else Return EuclidAlg(b, a mod b) Theorem For every two recursive calls, the first argument a is halved. Proof: By cases. Either b a/2 or b > a/2...

- Divisibility - Congruences Bézout s Identity, Euclid s Lemma Theorem (Bézout s Identity) If a and b are positive integers, then there exist integers s and t such that sa + tb = gcd(a, b). Example: 2 = 8(414) - 5(662) Proof : Use Euclid s Algorithm... Corollary (*) Two positive integers a and b are relatively prime if and only if there exist integers s and t such that sa + tb = 1. Example: 35 and 12 are relatively prime and 3(12) + ( 1)(35) = 1 Proof: Use above theorem.

Euclid s Lemma - Divisibility - Congruences Corollary (Euclid s Lemma) If a, b, and c are integers, a and b are relatively prime, and a bc, then a c. Example: 15 (77)(45) and 15 45 Proof: Use previous corollary. Proposition For all primes p and integers a, if p a, then gcd(p, a) = 1. Proof: By contrapositive. Corollary (also called Euclid s lemma) If a and b are integers, p is a prime, p ab, and p a, then p c. Example: 5 (12)(15) and 5 15. Proof: Use above corollary.

Clock arithmetic - Divisibility - Congruences 5 hours after 3 o clock is 8 o clock, so 3 + 5 = 8. 6 hours after 10 o clock is 4 o clock, so 16 = 6 + 10 = 4. 8 hours before 5 o clock is 9 o clock, so -3 = 5-8 = 9. We can add or subtract multiples of 12...

Congruences - Divisibility - Congruences Definition If a and b are integers, m is a positive integer, and m (a b), then a and b are congruent modulo m, denoted a b (mod m) Alternatively, a b (mod m) if there is an integer k such that a b = km. Example: 4 18 (mod 7), 7 7 (mod 87), 7 8 (mod 15).

Modular arithmetic - Divisibility - Congruences Theorem Suppose a, b, c, d Z and m Z +. If a b (mod m) and c d (mod m), then Corollary a + c b + d (mod m) ac bd (mod m). If a and b are integers, m and n are positive integers, and a b (mod m), then a n b n (mod m). Proof:

- Divisibility - Congruences Modular arithmetic example 11 999 1 999 1 (mod 10) (1) 9 999 ( 1) 999 1 9 (mod 10) (2) 7 999 49 499 7 ( 1) 499 7 7 3 (mod 10) (3)

- Divisibility - Congruences modm versus (mod m) a = b mod m means that a is the remainder when b is divided by m. a b (mod m) means that a b is a multiple of m. Proposition a mod m = b mod m a b (mod m). Proof: ( ): Let r = a mod m = b mod m. There exist integers q 1 and q 2 such that a = q 1 m + r and b = q 2 m + r. ( ): There exists an integer q such that mq = a b. Thus a = b + mq.

- Divisibility - Congruences Modular arithmetic example Suppose we want to know 11 999 mod 10, 9 999 mod 10, and 7 999 mod 10. 11 999 1 (mod 10), so 11 999 mod 10 = 1 mod 10 = 1. 9 999 9 (mod 10), so 9 999 mod 10 = 9. 7 999 3 (mod 10), so 7 999 mod 10 = 3.

Repeated squaring - Divisibility - Congruences Find 7 100 mod 11.