Ch 4.2 Divisibility Properties

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

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

The Euclidean Algorithm and Multiplicative Inverses

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

Chapter 2 (Part 3): The Fundamentals: Algorithms, the Integers & Matrices. Integers & Algorithms (2.5)

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

NOTES ON INTEGERS. 1. Integers

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

4 Powers of an Element; Cyclic Groups

Chapter 2. Divisibility. 2.1 Common Divisors

Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I

1. (16 points) Circle T if the corresponding statement is True or F if it is False.

Number Theory and Divisibility

Intermediate Math Circles February 26, 2014 Diophantine Equations I

With Question/Answer Animations. Chapter 4

3 The fundamentals: Algorithms, the integers, and matrices

CISC-102 Winter 2016 Lecture 11 Greatest Common Divisor

Introduction to Number Theory

4 Number Theory and Cryptography

CSE 215: Foundations of Computer Science Recitation Exercises Set #5 Stony Brook University. Name: ID#: Section #: Score: / 4

NOTES ON SIMPLE NUMBER THEORY

Chapter 3 Basic Number Theory

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

Mathematics for Computer Science Exercises for Week 10

Direct Proof Divisibility

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

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

Direct Proof Divisibility

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

(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.

Discrete Mathematics GCD, LCM, RSA Algorithm

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

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

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

8 Primes and Modular Arithmetic

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

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

2 Elementary number theory

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.

(a) 14 and 42 (b) 33 and 18 (c) 45 and 108 (d) 24 and 2039, given that 2039 is a prime number

Numbers. Çetin Kaya Koç Winter / 18

Homework #2 solutions Due: June 15, 2012

Euclidean Domains. Kevin James

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

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

Senior Math Circles Cryptography and Number Theory Week 2

Elementary Properties of the Integers

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

5: The Integers (An introduction to Number Theory)

CISC-102 Fall 2017 Week 6

Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some. Notation: b Fact: for all, b, c Z:

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

Chapter 5: The Integers

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.

Discrete Structures Lecture Primes and Greatest Common Divisor

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.

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

REVIEW Chapter 1 The Real Number System

Math 109 HW 9 Solutions

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

Introduction to Sets and Logic (MATH 1190)

6.1. Rational Expressions and Functions; Multiplying and Dividing. Copyright 2016, 2012, 2008 Pearson Education, Inc. 1

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

Basic elements of number theory

Basic elements of number theory

Prime Factorization and GCF. In my own words

Number Theory Notes Spring 2011

2.5 정수와알고리즘 (Integers and Algorithms)

Ma/CS 6a Class 1. Course Details

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

Chapter 1. Greatest common divisor. 1.1 The division theorem. In the beginning, there are the natural numbers 0, 1, 2, 3, 4,...,

Base-b representations of integers. (b 진법표현 ) Algorithms for computer arithmetic: Euclidean algorithm for finding GCD s.

M381 Number Theory 2004 Page 1

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?

EDULABZ INTERNATIONAL NUMBER SYSTEM

N= {1,2,3,4,5,6,7,8,9,10,11,...}

a + bi by sending α = a + bi to a 2 + b 2. To see properties (1) and (2), it helps to think of complex numbers in polar coordinates:

The Euclidean Algorithm

Remainders. We learned how to multiply and divide in elementary

CSE 311: Foundations of Computing. Lecture 12: Two s Complement, Primes, GCD

CHAPTER 3. Number Theory

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

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

5.1. Primes, Composites, and Tests for Divisibility

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

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?

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

Applied Cryptography and Computer Security CSE 664 Spring 2017

EUCLID S ALGORITHM AND THE FUNDAMENTAL THEOREM OF ARITHMETIC after N. Vasiliev and V. Gutenmacher (Kvant, 1972)

ZEROS OF POLYNOMIAL FUNCTIONS ALL I HAVE TO KNOW ABOUT POLYNOMIAL FUNCTIONS

Number Theory Proof Portfolio

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

Introduction Integers. Discrete Mathematics Andrei Bulatov

Homework 3, solutions

4.3 - Primes and Greatest Common Divisors

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.

NUMBER THEORY AND CODES. Álvaro Pelayo WUSTL

Bell Quiz 2-3. Determine the end behavior of the graph using limit notation. Find a function with the given zeros , 2. 5 pts possible.

Integers and Division

Number Theory and Group Theoryfor Public-Key Cryptography

Transcription:

Ch 4.2 Divisibility Properties - Prime numbers and composite numbers - Procedure for determining whether or not a positive integer is a prime - GCF: procedure for finding gcf (Euclidean Algorithm) - Definition: Relatively prime integers H9: 1-13 odds, 14, 15-19 odds, 25-42 all Definition: An integer b divides a (or b is a factor of a, or we say that a is divisible by b) if there exists an integer q such that a = bq, i.e. if q Z a = bq. If b divides a, we denote this by b a. Definition: A positive integer greater than 1 is a prime number (or simply a prime) if its only positive factors are 1 and itself. A positive integer greater than 1 is a composite number if it is not a prime (that is if it has positive factors other than 1 and itself.) Exercise 1: 1. True or False: 5 15. 2. True or False: 15 5. 3. True or False: The number 1 is a prime number. 4. True or False: The number 39 is a prime number. 5. True or False: The number -39 is a composite number. 6. True or False: The first 9 prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23. Theorem (The Fundamental Theorem of Arithmetic) Every positive integer n 2 either is a prime or can be written as a product of primes. We will prove this later. (Ch 4.4.) One procedure for determining if a number is prime is as follows: Question: is 117 prime? Step 1: if 323 is divisible by 2, then 323 is not prime otherwise go to next Step 2: if 323 is divisible by 3, then 323 is not prime otherwise go to next Step 3: if 323 is divisible by 5, then 323 is not prime otherwise go to next

Step 4: if 323 is divisible by 7, then 323 is not prime otherwise go to next. (how long must we continue?) Theorem 4.2 An composite number n has a prime factor less than or equal to n Proof: Let n be a composite number. By definition of composite, there exist two positive integers a and b such that n = ab where 1 < a < n and 1 < b < n. Suppose a > n and b > n. Then n = ab > n n = n, which is not possible. Therefore, either a n or b n. Since both a and b are integers, it follows that either a n or b By the fundamental theorem of arithmetic, every positive integer has a prime factor. Any such factor of a or of b is also a factor or n, so must have a prime factor less than or equal to n. n. Exercise 2: The statement of the previous theorem is that if n is composite, then n has a prime factor less than or equal to n. What is the contrapositive of the statement? Exercise 3: True or False: If a and b are integers such that a b and b a, then a = b. Theorem 4.3 If a and b are positive integers such that a b and b a, then a = b. Proof: Assume that a and b are positive integers such that a b and b a. By definition of divisibility and. By substitution,

Theorem If a, b and c are any integers. Then (1) If a b and b c, then a c (transitivity property) (2) If a b and a c, then a (b+c) (3) If a b and a c, then a (b - c) (3) If a b, then a (bc). Proof: of (2) Assume a b and a c. By there exist q 1 and q 2 integers such that b = q 1 a and c = q 2 a. By substitution, b + c = Since q 1 and q 2 are integers and, q 1 + q 2 is an integer from which is follows by definition of divisibility that. Definition: A positive integer can be a factor (or divisor) of two positive integers a and b. Such a positive integer is a common factor of a and b. The largest common factor is the greatest common divisor (gcd) of a and b, denoted by gcd{a, b}. Alternate definition of gcd: A positive integer d is the gcd of a and b if and only if i) d a and d b AND ii) (d a and d b) d d. Theorem 4.5 Let a and b be any positive integers, and r the remainder when a is divided by b. Then gcd{a,b} = gcd{b,r}. Proof: Let gcd{a,b} = d and gcd{b,r} = d. By Theorem 4.3, we can prove that d = d by showing that d d and d d. By the Division Algorithm, a unique quotient and remainder q and r exist such that 0 < r < b, such that a = bq +r (1) By definition of gcd, that d = gcd{a,b} means that d a and d b, which by Theorem 4.4 implies that d qb. Using Theorem 4.4 again d a and d qb imply d (a - bq), which by (1) implies that d r. Thus, d b and d r, which by definition of gcd imply that d d. The proof of d d is similar see exercise 33 (homework). Thus, d = d.

Example 4: Illustrate Theorem 4.5, using a = 108 and b = 20. Euclidean Algorithm: Find gcd{1976, 1776} Step 1: apply the division algorithm with the smaller as the divisor 1976 = 1776 + Step 2: if the remainder is not zero, then apply the division algorithm with divisor and remainder of step 1 as the dividend and divisor, respectively. 1776 = + Step 3: if the remainder is not zero, then apply the division algorithm with divisor and remainder of step 2 as the dividend and divisor, respectively. = + repeat step 3 until you reach a zero remainder. The last nonzero remainder is gcd{1876, 1776} which in our example is.

Theorem 4.6: Let a and b be any positive integers, and d = gcd{a, b}. Then there exist integers s and t such that d = sa + tb (i.e. a linear combination of a and b). We won t prove it in this class, but let us see how to find them for the previous example. Definition. Two positive integers a and b are relatively prime if their gcd is 1. Exercise 5: True or False: The integers 4 and 9 are relatively prime. True or False: The integers 24 and 25 are relatively prime. True or False: The integers 11 and 99 are relatively prime. True or False: If a bc, then a b or a c. Theorem 4.7: Let a and b be relatively prime numbers. If a bc, then a c. Proof: Assume a and b are relatively prime, and that a bc. By definition of relatively prime. By Theorem 4.6, there exist integers s and t such that (1) (multiply through by c) By Theorem 4.4., since a sa, a sac, and since a bc, a tbc. Therefore, by Theorem 4.4. a (sac + tbc), which by substitution implies that a c.