Introduction to Number Theory

Similar documents
Proofs. Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm. Reading (Epp s textbook)

Discrete Structures Lecture Primes and Greatest Common Divisor

Ch 4.2 Divisibility Properties

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

3 The fundamentals: Algorithms, the integers, and matrices

Integers and Division

4 Number Theory and Cryptography

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

2 Elementary number theory

Number Theory and Divisibility

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

CISC-102 Fall 2017 Week 6

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

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

Mathematics for Computer Science Exercises for Week 10

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.

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

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth

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

ECE 646 Lecture 5. Mathematical Background: Modular Arithmetic

Introduction to Number Theory. The study of the integers

Applied Cryptography and Computer Security CSE 664 Spring 2017

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

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

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

Intermediate Math Circles Number Theory II Problems and Solutions

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

The Euclidean Algorithm and Multiplicative Inverses

Introduction to Sets and Logic (MATH 1190)

Chapter 5: The Integers

Chapter 5. Number Theory. 5.1 Base b representations

5: The Integers (An introduction to Number Theory)

CMPUT 403: Number Theory

CS March 17, 2009

Downloaded from

CS250: Discrete Math for Computer Science

EDULABZ INTERNATIONAL NUMBER SYSTEM

Intermediate Math Circles February 26, 2014 Diophantine Equations I

Chapter 2. Divisibility. 2.1 Common Divisors

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

PRACTICE PROBLEMS: SET 1

NOTES ON SIMPLE NUMBER THEORY

Number Theory and Group Theoryfor Public-Key Cryptography

Answers (1) A) 36 = - - = Now, we can divide the numbers as shown below. For example : 4 = 2, 2 4 = -2, -2-4 = -2, 2-4 = 2.

8 Primes and Modular Arithmetic

4 Powers of an Element; Cyclic Groups

With Question/Answer Animations. Chapter 4

A number that can be written as, where p and q are integers and q Number.

Mathematics of Cryptography

Lecture 7: Number Theory Steven Skiena. skiena

Discrete Mathematics GCD, LCM, RSA Algorithm

18 Divisibility. and 0 r < d. Lemma Let n,d Z with d 0. If n = qd+r = q d+r with 0 r,r < d, then q = q and r = r.

MTH 346: The Chinese Remainder Theorem

2MA105 Algebraic Structures I

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

Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I

Course: CS1050c (Fall '03) Homework2 Solutions Instructor: Prasad Tetali TAs: Kim, Woo Young: Deeparnab Chakrabarty:

Chapter V. Theory of the Integers. Mathematics is the queen of the sciences and number theory is the queen of mathematics. Carl Friedrich Gauss

Notes on Systems of Linear Congruences

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

ECE 646 Lecture 5. Motivation: Mathematical Background: Modular Arithmetic. Public-key ciphers. RSA keys. RSA as a trap-door one-way function

Chapter 3: The Euclidean Algorithm and Diophantine. Math 138 Burger California State University, Fresno

Number Theory Proof Portfolio

Numbers. Çetin Kaya Koç Winter / 18

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd()

Direct Proof Divisibility

Direct Proof Divisibility

Mathematics for Cryptography

(e) Commutativity: a b = b a. (f) Distributivity of times over plus: a (b + c) = a b + a c and (b + c) a = b a + c a.

Elementary Properties of the Integers

not to be republished NCERT REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results

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

Math 110 FOUNDATIONS OF THE REAL NUMBER SYSTEM FOR ELEMENTARY AND MIDDLE SCHOOL TEACHERS

Extending The Natural Numbers. Whole Numbers. Integer Number Set. History of Zero

A group of figures, representing a number, is called a numeral. Numbers are divided into the following types.

Divisibility. Def: a divides b (denoted a b) if there exists an integer x such that b = ax. If a divides b we say that a is a divisor of b.

An Introduction to Mathematical Thinking: Algebra and Number Systems. William J. Gilbert and Scott A. Vanstone, Prentice Hall, 2005

Solutions Math 308 Homework 9 11/20/2018. Throughout, let a, b, and c be non-zero integers.

3 The Fundamentals:Algorithms, the Integers, and Matrices

The following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers:

Objective Type Questions

Do not open this exam until you are told to begin. You will have 75 minutes for the exam.

Writing Assignment 2 Student Sample Questions

Public Key Encryption

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

Math 547, Exam 1 Information.

Quantitative Aptitude

CSC 474 Network Security. Outline. GCD and Euclid s Algorithm. GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation Discrete Logarithms

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 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013

Basic elements of number theory

Basic elements of number theory

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

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.

An Algorithm for Prime Factorization

Lecture 4: Number theory

Slide 1 / 69. Slide 2 / 69. Slide 3 / 69. Whole Numbers. Table of Contents. Prime and Composite Numbers

Senior Math Circles Cryptography and Number Theory Week 2

Lecture 7.4: Divisibility and factorization

Transcription:

Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic principles of divisibility, greatest common divisors, least common multiples, and modular arithmetic 2 2

Division If a and b are integers with a 0, we say that a dividesb if there is an integer c so that b = ac. When a divides b we say that a is a factorof b and that b is a multipleof a. The notation a bmeans that a divides b. We write a X bwhen a does not divide b. 3 3

Divisors. Examples Q: Which of the following is true? 1. 77 7 2. 7 77 3. 24 24 4. 0 24 5. 24 0 L9 4 4

Divisors. Examples A: 1. 77 7: false bigger number can t divide smaller positive number 2. 7 77: true because 77 = 7 11 3. 24 24: true because 24 = 24 1 4. 0 24: false, only 0 is divisible by 0 5. 24 0: true, 0 is divisible by every number (0 = 24 0) L9 5 5

Divisibility Theorems For integers a, b, and c it is true that if a b and a c, then a (b + c) Example:3 6 and 3 9, so 3 15. if a b, then a bcfor all integers c Example:5 10, so 5 20, 5 30, 5 40, if a b and b c, then a c Example:4 8 and 8 24, so 4 24. 6 6

Divisor Theorem THM: Let a, b, and c be integers. Then: 1. a b a c a (b+ c ) 2. a b a bc 3. a b b c a c EG: 1. 17 34 17 170 17 204 2. 17 34 17 340 3. 6 12 12 144 6 144 L9 7 7

Primes A positive integer p greater than 1 is called prime if the only positive factors of p are 1 and p. A A positive integer that is greater than 1 and is not prime is called composite. The fundamental theorem of arithmetic: Every positive integer can be writtenuniquelyas the product of primes, where the prime factors are written in order of increasing size. 8 8

Examples: Primes 15 = 48 = 17 = 100 = 512 = 515 = 28 = 3 5 2 2 2 2 3 = 24 3 17 2 2 5 5 = 22 5 2 2 2 2 2 2 2 2 2 2 = 2 9 5 103 2 2 7 = 22 7 9 9

Primes If n is a composite integer, then n has a prime divisor less than or equal n This is easy to see: if n is a composite integer, it must have two divisors p 1 and p 2 such that p 1 p 2 = n and p 1 2 and p 2 2. p 1 and p 2 cannot both be greater than, because then p 1 p 2 would be greater than n. n If the smaller number of p 1 and p 2 is not a prime itself, then it can be broken up into prime factors that are smaller than itself but 2. 10 10

Division Remember long division? d the divisor a the dividend 117 = 31 3 + 24 a = dq+r 3 31 117 93 24 q the quotient rthe remainder L9 11 11

Division THM: Let a be an integer, and d be a positive integer. There are unique integers q, r with r {0,1,2,,d-1} satisfying a = dq+r The proof is a simple application of long-division. The theorem is called the division algorithmthough really, it s long division that s the algorithm, not the theorem. L9 12 12

The Division Algorithm Let abe an integer and da positive integer. Then there are unique integers qand r, with 0 r < d, such that a = dq+ r. In the above equation, dis called the divisor, ais called the dividend, qis called the quotient, and ris called the remainder. 13 13

The Division Algorithm Example: When we divide 17 by 5, we have 17 = 5 3 + 2. 17 is the dividend, 5 is the divisor, 3 is called the quotient, and 2 is called the remainder. 14

Example: The Division Algorithm What happens when we divide -11 by 3? Note that the remainder cannot be negative. -11 = 3 (-4) + 1. -11 is the dividend, 3 is the divisor, -4 is called the quotient, and 1 is called the remainder. 15

Greatest Common Divisors Let a and b be integers, not both zero. The largest integer d such that d a and d b is called the greatest common divisorof a and b. The greatest common divisor of a and b is denoted by gcd(a, b). Example 1:What is gcd(48, 72)? The positive common divisors of 48 and 72 are 1, 2, 3, 4, 6, 8, 12, 16, and 24, so gcd(48, 72) = 24. Example 2:What is gcd(19, 72)? The only positive common divisor of 19 and 72 is 1, so gcd(19, 72) = 1. 16

Greatest Common Divisors Using prime factorizations: a = p 1 a 1 p 2 a 2 p n a n, b = p 1 b 1 p 2 b 2 p n b n, where p 1 < p 2 < < p n and a i, b i Nfor 1 i n gcd(a, b) = p 1 min(a 1, b 1) p 2 min(a 2, b 2) p n min(a n, b n ) Example: a = 60 = 2 2 3 1 5 1 b = 54 = 2 1 3 3 5 0 gcd(a, b) = 2 1 3 1 5 0 = 6 17 17

Relatively Prime Integers Definition: Two integers a and b are relatively primeif gcd(a, b) = 1. Examples: Are 15 and 28 relatively prime? Yes, gcd(15, 28) = 1. Are 55 and 28 relatively prime? Yes, gcd(55, 28) = 1. Are 35 and 28 relatively prime? No, gcd(35, 28) = 7. 18 18

Definition: Relatively Prime Integers The integers a 1, a 2,, a n arepairwiserelatively primeif gcd(a i, a j ) = 1 whenever 1 i< j n. Examples: Are 15, 17, and 27 pairwise relatively prime? No, because gcd(15, 27) = 3. Are 15, 17, and 28 pairwise relatively prime? Yes, because gcd(15, 17) = 1, gcd(15, 28) = 1 and gcd(17, 28) = 1. 19 19

Least Common Multiples Definition: The least common multipleof the positive integers a and b is the smallest positive integer that is divisible by both a and b. We denote the least common multiple of a and b by lcm(a, b). Examples: lcm(3, 7) = 21 lcm(4, 6) = 12 lcm(5, 10) = 10 February 9, 2012 Applied Discrete Mathematics Week 3: Algorithms 20 20

Least Common Multiples Using prime factorizations: a = p 1 a 1 p 2 a 2 p n a n, b = p 1 b 1 p 2 b 2 p n b n, where p 1 < p 2 < < p n and a i, b i Nfor 1 i n lcm(a, b) = p 1 max(a 1, b 1) p 2 max(a 2, b 2) p n max(a n, b n ) Example: a = 60 = 2 2 3 1 5 1 b = 54 = 2 1 3 3 5 0 lcm(a, b) = 2 2 3 3 5 1 = 4*27*5 = 540 February 9, 2012 21 21

GCD and LCM a = 60 = 2 2 3 1 5 1 b = 54 = 2 1 3 3 5 0 gcd(a, b) = 2 1 3 1 5 0 = 6 lcm(a, b) = 2 2 3 3 5 1 = 540 Theorem: a*b = gcd(a,b a,b)* lcm(a,b a,b) February 9, 2012 Applied Discrete Mathematics Week 3: Algorithms 22 22

Greatest Common Divisor Relatively Prime Let a,bbe integers, not both zero. The greatest common divisorof a and b (or gcd(a,b) ) is the biggest number d which divides both a and b. Equivalently: gcd(a,b)is smallest number which divisibly by any x dividing both aand b. a and b are said to be relatively primeif gcd(a,b) = 1, so no prime common divisors. L9 23 23

Greatest Common Divisor Relatively Prime Q: Find the following gcd s: 1. gcd(11,77) 2. gcd(33,77) 3. gcd(24,36) 4. gcd(24,25) L9 24 24

A: Greatest Common Divisor 1. gcd(11,77) = 11 2. gcd(33,77) = 11 3. gcd(24,36) = 12 Relatively Prime 4. gcd(24,25) = 1. Therefore 24 and 25 are relatively prime. NOTE: A prime number are relatively prime to all other numbers which it doesn t divide. L9 25 25

Find gcd(98,420). Greatest Common Divisor Relatively Prime Find prime decomposition of each number and find all the common factors: 98 = 2 49 = 2 7 7 420 = 2 210 = 2 2 105 = 2 2 3 35 = 2 2 3 5 7 Underline common factors: 2 7 7, 2 2 3 5 7 Therefore, gcd(98,420) = 14 L9 26 26

Greatest Common Divisor Relatively Prime Pairwiserelatively prime: the numbers a, b, c, d, are said to be pairwiserelatively prime if any two distinct numbers in the list are relatively prime. Q: Find a maximal pairwiserelatively prime subset of { 44, 28, 21, 15, 169, 17 } L9 27 27

Greatest Common Divisor Relatively Prime A: A maximal pairwiserelatively prime subset of {44, 28, 21, 15, 169, 17} : {17, 169, 28, 15} is one answer. {17, 169, 44, 15} is another answer. L9 28 28

Least Common Multiple The least common multipleof a, and b (lcm(a,b) ) is the smallest number m which is divisible by both a and b. Equivalently: lcm(a,b)is biggest number which divides any x divisible by both aand b Q: Find the lcm s: 1. lcm(10,100) 2. lcm(7,5) 3. lcm(9,21) L9 29 29

Least Common Multiple A: 1. lcm(10,100) = 100 2. lcm(7,5) = 35 3. lcm(9,21) = 63 THM: lcm(a,b) = ab / gcd(a,b) L9 30 30