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.

Similar documents
Euclidean Domains. Kevin James

Chapter 1 A Survey of Divisibility 14

a = qb + r where 0 r < b. Proof. We first prove this result under the additional assumption that b > 0 is a natural number. Let

Chapter 2. Divisibility. 2.1 Common Divisors

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

4 Powers of an Element; Cyclic Groups

God may not play dice with the universe, but something strange is going on with the prime numbers.

5: The Integers (An introduction to Number Theory)

Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I

Lecture 7.5: Euclidean domains and algebraic integers

Ch 4.2 Divisibility Properties

Example: This theorem is the easiest way to test an ideal (or an element) is prime. Z[x] (x)

Chapter 14: Divisibility and factorization

NOTES ON INTEGERS. 1. Integers

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

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

Chapter 5: The Integers

NOTES ON SIMPLE NUMBER THEORY

1. Factorization Divisibility in Z.

Lecture 4: Number theory

The Fundamental Theorem of Arithmetic

1 Overview and revision

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

Intermediate Math Circles February 26, 2014 Diophantine Equations I

Discrete valuation rings. Suppose F is a field. A discrete valuation on F is a function v : F {0} Z such that:

Number Theory Notes Spring 2011

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

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

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

Divisibility in Z. Definition Let a, b Z be integers. We say that b divides a, if there exists c Z such that a = b c; we write b a.

Coding Theory ( Mathematical Background I)

Elementary Properties of the Integers

Problem Set 7 Solutions

Lecture Notes. Advanced Discrete Structures COT S

MATH FINAL EXAM REVIEW HINTS

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

CISC-102 Winter 2016 Lecture 11 Greatest Common Divisor

Lecture 7: Polynomial rings

Contribution of Problems

g(x) = 1 1 x = 1 + x + x2 + x 3 + is not a polynomial, since it doesn t have finite degree. g(x) is an example of a power series.

Math 547, Exam 2 Information.

4 Number Theory and Cryptography

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

Deepening Mathematics Instruction for Secondary Teachers: Algebraic Structures

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:

MATH10040 Chapter 1: Integers and divisibility

Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm

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

Greatest Common Divisor MATH Greatest Common Divisor. Benjamin V.C. Collins, James A. Swenson MATH 2730

3 The fundamentals: Algorithms, the integers, and matrices

Definition For a set F, a polynomial over F with variable x is of the form

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

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

1. multiplication is commutative and associative;

Solution Sheet (i) q = 5, r = 15 (ii) q = 58, r = 15 (iii) q = 3, r = 7 (iv) q = 6, r = (i) gcd (97, 157) = 1 = ,

Finite Fields. Mike Reiter

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

Polynomials. Chapter 4

0. Introduction. Math 407: Modern Algebra I. Robert Campbell. January 29, 2008 UMBC. Robert Campbell (UMBC) 0. Introduction January 29, / 22

Polynomials. In many problems, it is useful to write polynomials as products. For example, when solving equations: Example:

Number theory lectures

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

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

4. Number Theory (Part 2)

With Question/Answer Animations. Chapter 4

Basic Algorithms in Number Theory

Basic elements of number theory

Basic elements of number theory

Lecture 7.4: Divisibility and factorization

2. THE EUCLIDEAN ALGORITHM More ring essentials

Part V. Chapter 19. Congruence of integers

MTH310 EXAM 2 REVIEW

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

The Euclidean Algorithm and Multiplicative Inverses

Ideals: Definitions & Examples

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

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

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 511, Algebraic Systems, Fall 2017 July 20, 2017 Edition. Todd Cochrane

Rings and modular arithmetic

The Chinese Remainder Theorem

CS250: Discrete Math for Computer Science

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

Elementary Number Theory

8 Primes and Modular Arithmetic

MTH 346: The Chinese Remainder Theorem

D i v i s i b i l i t y

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?

Contents. 4 Arithmetic and Unique Factorization in Integral Domains. 4.1 Euclidean Domains and Principal Ideal Domains

LECTURE NOTES IN CRYPTOGRAPHY

CHAPTER I. Rings. Definition A ring R is a set with two binary operations, addition + and

An Algorithm for Prime Factorization

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

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:

Chapter 3 Basic Number Theory

Contribution of Problems

Math 180A - Notes. Neil Donaldson. March 14, 2018

Prof. Ila Varma HW 8 Solutions MATH 109. A B, h(i) := g(i n) if i > n. h : Z + f((i + 1)/2) if i is odd, g(i/2) if i is even.

LeLing13: Polynomials and complex numbers. Division of polynomials. Euclides s algorithm and multiple roots. R ecommended exercises: Geoling 15.

Module 1. Integers, Induction, and Recurrences

Transcription:

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. Thm: (Properties of Divisibility) 1 a b a bc 2 a b and b c a c 3 a b and a c x, y(a (bx + cy)) 4 a b and b a a ±c 5 a b, a > 0, b > 0 a b 6 m 0 (a b ma mb) 7 a b 1,..., a b n and u i Z a (u 1 b 1 + + u n b n ) Robert Campbell (UMBC) 1. Number Theory February 16, 2008 1 / 17

Division Algorithm Thm: If a and b are integer with b > 0, then there exist unique integers q and r such that a qb + r and 0 r < b. proof: Existence: Consider {..., a 2b, a b, a, a + b, a + 2b,...} Of these, only consider the positive elements. There is a smallest element, some a qb (define r a qb 0) r < b as otherwise r b 0 would be a smaller element of the set Uniqueness: Assume a qb + r q b + r so b(q q ) r r if q q then q q 1, so r r b but r r < b 0 b # So q q and r r Robert Campbell (UMBC) 1. Number Theory February 16, 2008 2 / 17

Greatest Common Divisor Def: The Greatest Common Divisor of two integers a and b, denoted gcd(a, b) is the largest positive integer g such that g a and g b. Thm: Two integers a and b have a gcd. proof: The set of common divisors of a and b is non-empty (1 is in the set) The set is bounded above by both a and b. Apply the well ordering principle for bounded subsets of Z. Robert Campbell (UMBC) 1. Number Theory February 16, 2008 3 / 17

Greatest Common Divisor - Generalized A more general definition - does not require an order relation and (potentially) applies in any ring. Def: The Greatest Common Divisor of two elements a and b, denoted gcd(a, b) is an element g such that: g a and g b if c a and c b then c g Thm: Any ring with a division algorithm has gcds. Def: An integral domain with a division algorithm is a EuclideanDomain. Def: An integral domain is a commutative ring without zero divisors. Robert Campbell (UMBC) 1. Number Theory February 16, 2008 4 / 17

Euclidean Algorithm Algorithm: Starting from r 0 a, r 1 b, if we define r k as the remainder when r k 2 is divided by r k 1, then the last non-zero value r i is equal to gcd(a, b). (aka Antenaresis, [Euclid, VII.1]). Lemma: a qb + r gcd(a, b) gcd(r, b) proof: Let g gcd(a, b) (g a) and (g b) a ng and b mg for some n and m So if a qb + r then r a qb, so r ng qmg g(n qm) So (g r) and hence (g gcd(r, b)), i.e. (gcd(a, b) gcd(r, b)) Similarly, we can show that (gcd(r, b) gcd(a, b)) Thus gcd(a, b) ± gcd(r, b) As both are positive, we have gcd(a, b) gcd(r, b) Lemma: gcd(a, 0) a Robert Campbell (UMBC) 1. Number Theory February 16, 2008 5 / 17

Euclidean Algorithm Algor: Starting from r 0 a, r 1 b, if we define r k as the remainder when r k 2 is divided by r k 1, then the last non-zero value r i is equal to gcd(a, b). (aka Antenaresis, Euclid s Elements, Book VII, Proposition 1). Example: a 1431, b 141 r 0 1431 r 1 141 1431/141 10 with remainder r 2 21 141/21 6 with remainder r 3 15 21/15 1 with remainder r 4 6 15/6 2 with remainder r 5 3 6/3 2 with remainder r 6 0 So gcd(1431, 141) 3 Robert Campbell (UMBC) 1. Number Theory February 16, 2008 7 / 17

Euclidean Algorithm: Matrix Formulation ( ) 1431 141 1 10 1431 0 1 141 1 0 21 6 1 141 1 1 21 0 1 15 1 0 6 2 1 15 1 2 6 0 1 3 ( ) 21 141 ( ) 21 15 ( ) 6 15 ( ) 6 3 ( ) 0 3 So gcd(1431, 141) 3 Robert Campbell (UMBC) 1. Number Theory February 16, 2008 8 / 17

Bézout s Identity Thm: There exist integers x and y such that gcd(a, b) ax + by proof: Consider the set {ax + by x, y Z} Choose x 0, y 0 so that ax 0 + by 0 is the least positive element Call this element l ax 0 + by 0 We now prove that l a and l b Assume the converse - wlog that l does not divide a So q, r, 0 < r < l such that r a lq a q(ax 0 + by 0 ) a(1 qx 0 ) + b( y 0 ) So r is a positive element of the set which is smaller than l (contradiction) Thus l a Similarly, we conclude that l b So l gcd(a, b) But gcd(a, b) (ax 0 + by 0 ) l, so l gcd(a, b) Robert Campbell (UMBC) 1. Number Theory February 16, 2008 9 / 17

Extended Euclidean Algorithm 1431 141 (1, 0) (0, 1) 21 1431 + ( 10)141 141 (1, 10) (1, 0) + ( 1)(0, 1) (0, 1) 21 15 141 + ( 6)21 (1, 10) ( 6, 61) (0, 1) + ( 6)(1, 10) 6 21 + ( 1)15 15 (7, 71) (1, 10) + ( 1)( 6, 61) ( 6, 61) 6 3 15 + ( 2)6 (7, 71) ( 20, 203) ( 6, 61) + ( 2)(7, 71) 0 6 + ( 2)3 3 (47, 477) (7, 71) + ( 2)( 20, 203) ( 20, 203) Robert Campbell (UMBC) 1. Number Theory February 16, 2008 10 / 17

Extended Euclidean Algorithm: Matrix Formulation 1 10 1431 1 0 0 1 141 0 1 1 0 21 1 10 6 1 141 0 1 1 1 21 1 10 0 1 15 6 61 1 0 6 7 71 2 1 15 6 61 1 2 6 7 71 0 1 3 20 203 So gcd(1431, 141) 3 ( 20)(1431) + (203)(141) ( ) 21 1 10 141 0 1 ( ) 21 1 10 15 6 61 ( ) 6 7 71 15 6 61 ( ) 6 7 71 3 20 203 ( ) 0 47 477 3 20 203 Robert Campbell (UMBC) 1. Number Theory February 16, 2008 11 / 17

Linear Diophantine Equations I Def: A Diophantine equation is a polynomial equation whose coefficients and solutions are integers. Examples: 6x + 15y 9 x 2 + 5y 3 3x 3 + 5y 2 + y 3 Def: A linear Diophantine equation is a linear polynomial equation whose coefficients and solutions are integers. Examples: 6x + 15y 9 12x + 21y + 7z 3 Robert Campbell (UMBC) 1. Number Theory February 16, 2008 12 / 17

Linear Diophantine Equations II 6x + 15y 5 Note that three divides both 6 and 15. Thus, for any integer values of x and y, three must divide 6x + 15y But three does not divide 5. Prop: ax + by c has no solutions if gcd(a, b) c Robert Campbell (UMBC) 1. Number Theory February 16, 2008 13 / 17

Linear Diophantine Equations III 6x + 15y 9 Has the same solutions as 2x + 5y 3 Prop: x, y satisfies ax + by c iff it satisfies gax + gby gc (where g 0) proof: ax + by c ax + by c 0 g(ax + by c) 0 (ga)x + (gb)y (gc) 0 (ga)x + (gb)y (gc) Robert Campbell (UMBC) 1. Number Theory February 16, 2008 14 / 17

Linear Diophantine Equations IV 2x + 5y 3 Note that gcd(2, 5) 1, which divides 3 Find coefficients {a, b} such that 2a + 5b 1: {a, b} { 2, 1} as 2( 2) + 5(1) 1 Multiply by 3 to get: 2( 6) + 5(3) 3 So {x, y} { 6, 3} is a solution We may freely add multiples of 2(5) + 5( 2) 0 to the solution. So {x, y} { 6, 3} + n{5, 2} is the set of all solutions. Robert Campbell (UMBC) 1. Number Theory February 16, 2008 15 / 17

Linear Diophantine Equations V Algorithm: Find all integer solutions for ax + by c 1 Replace ax + by c with a x + b y c, where g : gcd(a, b, c), a a/g, b b/g and c c/g 2 Let g : gcd(a, b ). Does g divide c? No: The equation has no solutions. Yes: The equation has solutions 1 Use the Extended Euclidean Algorithm to compute values x, y such that a x + b y g. 2 Compute x 0, y 0 : x(c /g), y(c /g). This is a solution of the equation. 3 All solutions of the equation have the form x 0 + n(b /g), y 0 n(a /g), where n Z. Robert Campbell (UMBC) 1. Number Theory February 16, 2008 16 / 17

Division, GCD & Other Rings Question: What other rings have division algorithms and Euclidean (like) algorithms? Z Q[x]: Yes Z[x]: No Q[x, y]: No Z[ 1] (Gaussian Integers): Yes Z[ 5]: No Robert Campbell (UMBC) 1. Number Theory February 16, 2008 17 / 17