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

Similar documents
After that, we will introduce more ideas from Chapter 5: Number Theory. Your quiz in recitation tomorrow will involve writing proofs like those.

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

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

3 The fundamentals: Algorithms, the integers, and matrices

8 Primes and Modular Arithmetic

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time.

MATH 361: NUMBER THEORY FOURTH LECTURE

4 Number Theory and Cryptography

Chapter 5. Number Theory. 5.1 Base b representations

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

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

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6

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

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

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

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

Algorithmic number theory. Questions/Complaints About Homework? The division algorithm. Division

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

Intermediate Math Circles February 26, 2014 Diophantine Equations I

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?

MTH 346: The Chinese Remainder Theorem

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

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

Notes on Systems of Linear Congruences

An Algorithm for Prime Factorization

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

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

The Euclidean Algorithm and Multiplicative Inverses

Number theory (Chapter 4)

Elementary Properties of the Integers

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

1 Overview and revision

NOTES ON SIMPLE NUMBER THEORY

Ma/CS 6a Class 2: Congruences

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

Chapter 2. Divisibility. 2.1 Common Divisors

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations

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

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

Algebra for error control codes

Ch 4.2 Divisibility Properties

Applied Cryptography and Computer Security CSE 664 Spring 2017

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?

PGSS Discrete Math Solutions to Problem Set #4. Note: signifies the end of a problem, and signifies the end of a proof.

Chapter 3 Basic Number Theory

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

Some Facts from Number Theory

Integers and Division

Lecture Notes. Advanced Discrete Structures COT S

Homework #2 solutions Due: June 15, 2012

Q 2.0.2: If it s 5:30pm now, what time will it be in 4753 hours? Q 2.0.3: Today is Wednesday. What day of the week will it be in one year from today?

MATH 25 CLASS 21 NOTES, NOV Contents. 2. Subgroups 2 3. Isomorphisms 4

Cool Results on Primes

2 Elementary number theory

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

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

CSE 20 DISCRETE MATH. Winter

Modular Arithmetic Instructor: Marizza Bailey Name:

#26: Number Theory, Part I: Divisibility

Number Theory Proof Portfolio

Fall 2017 Test II review problems

Introduction to Number Theory

1. multiplication is commutative and associative;

Writing Assignment 2 Student Sample Questions

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

Introduction to Sets and Logic (MATH 1190)

Mathematics of Cryptography

Ma/CS 6a Class 2: Congruences

CISC-102 Fall 2017 Week 6

9 Modular Exponentiation and Square-Roots

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

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

[Part 2] Asymmetric-Key Encipherment. Chapter 9. Mathematics of Cryptography. Objectives. Contents. Objectives

Commutative Rings and Fields

CPSC 467: Cryptography and Computer Security

NUMBER THEORY AND CODES. Álvaro Pelayo WUSTL

CPSC 467b: Cryptography and Computer Security

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

Number Theory and Graph Theory. Prime numbers and congruences.

Mathematics for Cryptography

COT 3100 Applications of Discrete Structures Dr. Michael P. Frank

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers

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

Number Theory Math 420 Silverman Exam #1 February 27, 2018

The Chinese Remainder Theorem

Clock Arithmetic. 1. If it is 9 o clock and you get out of school in 4 hours, when do you get out of school?

Number Theory and Group Theoryfor Public-Key Cryptography

Intermediate Math Circles March 6, 2013 Number Theory I

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions

CMPUT 403: Number Theory

CSE20: Discrete Mathematics

Introduction Integers. Discrete Mathematics Andrei Bulatov

Continuing discussion of CRC s, especially looking at two-bit errors

M381 Number Theory 2004 Page 1

REAL NUMBERS. Any positive integer a can be divided by another positive integer b in such a way that it leaves a remainder r that is smaller than b.

Basic elements of number theory

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

Basic elements of number theory

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

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

Transcription:

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

Return to Chapter 5 In discussing Methods of Proof (Chapter 3, Section 2) we introduced the divisibility relation from Chapter 5: Let a, b, be integers; then a b if and only if there is an integer k such that ak = b. We also introduced the modular congruence relation from Chapter 5: For integers a, b, and positive integer m, a b (mod m) if and only if m a b. These relations, and further concepts from number theory, are at the heart of some fundamental ideas in computing, including cryptography. 2

The Division Algorithm Let a be an integer and d be a positive integer. Then there are unique integers q and r, with 0 r<d, such that a = qd + r. In the relation a = qd + r, a is called the, d is called the, q is called the, and r is called the. Note that the Division Algorithm isn t really an algorithm, but that is the commonly used name for this theorem. As the following examples suggest, finding q and r for a particular a and d can be done using an algorithmic approach, which is probably the basis for the name. 3

EXAMPLE Let a = 61, d = 13; find q and r according to the division algorithm. (You may have already completed this exercise in your head; the following systematic approach indicates the association between this theorem and the word algorithm.) To find q, and then nonnegative r, we can carry out the following sequence of calculations of the form kd for integers k until kd exceeds a. 0 13 = 1 13 = 2 13 = 3 13 = 4 13 = 5 13 = 4

EXAMPLE Let a = 21, d = 6; find q and r according to the division algorithm. True/false: q = 3 The approach taken in the previous example can be helpful in the case where a is negative; remember that r must be nonnegative and less than d (= 6). 0 6 = 1 6 = 2 6 = 3 6 = 4 6 = 5

An operation derived from the Division Algorithm In the expression a = qd + r we say that r = a modulo d or r = a mod d That is, a mod d is the remainder according to the Division Algorithm when the integer a is divided by the positive integer d. Referring to the results of the previous examples, we say that 61 mod 13 = 21 mod 6 = Beware: most calculators and programming languages have a feature is that like the mod operation (frequently denoted a % d ); exactly how these functions work can vary from one device or language to another, but they tend to not align with the mathematical definition of a mod d, which insists, among other things, that d must be positive and a mod d must be nonnegative and less than d. Note that a mod d is an operation, unlike a b (mod m), which is a relation. The two concepts are connected to one another however. 6

Theorem Let a, b, be integers and let m be a positive integer. a b (mod m) if and only if a mod m = b mod m. Here is an example of what this theorem is stating. Let m = 5, a = 28, b = 53. Then a mod m = 28 mod 5 = b mod m = 53 mod 5 = Also note that a b (mod m) because We will prove one direction of the biconditional theorem above. The proof of the other direction is similar. Prove: For integers a, b, and positive integer m, if a mod m = b mod m, then a b (mod m). 7

Number theory: more definitions and theorems The greatest common divisor of integers a, b, denoted GCD(a, b), is the largest positive integer d such that d a and d b. The least common multiple of integers a, b, denoted LCM(a, b), is the smallest positive integer d such that a d and b d. An integer p 2 is prime if the only positive divisors of p are 1 and p. An integer n 2 that is not prime is composite. If n is composite, then n is the product of integers greater than 1 but less than n. The Fundamental Theorem of Arithmetic states that every integer n 2 can be expressed as the product of prime factors, and this representation is unique when the prime factors are listed in nondescending order (we will prove part this theorem, after we have studied mathematical induction). Example: 40 = 52 = In middle school you were (probably) taught to use the prime factorizations of a, b to build GCD(a, b) and LCM(a, b). 8

Finding gcd(a, b) is an important step in solving many problems. Eventually, we will introduce a much more efficient method (the Euclidean algorithm). There are infinitely many prime numbers. This claim might seem obvious to you, but that fact that a claim seems obvious doesn t guarantee that it is true. A proof guarantees that a claim is true. The following proof is from Euclid, roughly 2000 years ago. He proved the equivalent claim: If S is any finite set of prime numbers, there is at least one prime number not included in S. The proof makes use of the Fundamental Theorem of Arithmetic, and the Division Algorithm. 9

There is no known formula or function that will automatically generate prime numbers. Generating very large prime numbers is an important part of public key cryptography. The methods used today involve are probabilistic: stated simplistically, they involve generating a very large, random odd number (easy to do), then applying various tests to decide whether there is a high probability that the number is prime. One formula that, at first, seems to generate prime numbers is: 2 p 1, where p is prime. 2 2 1 = 3 is prime 2 3 1 = 7 is prime 2 5 1 = 31 is prime 2 7 1 = 127 is prime but, alas 2 11 1 = 127 = 2047 = 23 89 is not prime. A prime number that does have the form 2 p 1 is called a Mersenne Prime. For example, 127 = 2 7 1 is a Mersenne prime. 17 is a prime, but not a Mersenne prime. 2047 = 2 11 1 is not a Mersenne prime, because 2047 is not prime. 10