Example: (13320, 22140) =? Solution #1: The divisors of are 1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 27, 30, 36, 41,

Similar documents
a b a In case b 0, a being divisible by b is the same as to say that

Foundations of Arithmetic

THE CHINESE REMAINDER THEOREM. We should thank the Chinese for their wonderful remainder theorem. Glenn Stevens

Math 261 Exercise sheet 2

2.3 Nilpotent endomorphisms

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems

Errors for Linear Systems

Problem Solving in Math (Math 43900) Fall 2013

Complex Numbers. x = B B 2 4AC 2A. or x = x = 2 ± 4 4 (1) (5) 2 (1)

8.6 The Complex Number System

Lectures - Week 4 Matrix norms, Conditioning, Vector Spaces, Linear Independence, Spanning sets and Basis, Null space and Range of a Matrix

PRIMES 2015 reading project: Problem set #3

Difference Equations

Affine transformations and convexity

n α j x j = 0 j=1 has a nontrivial solution. Here A is the n k matrix whose jth column is the vector for all t j=0

Problem Set 9 Solutions

Structure and Drive Paul A. Jensen Copyright July 20, 2003

8.4 COMPLEX VECTOR SPACES AND INNER PRODUCTS

18.781: Solution to Practice Questions for Final Exam

= z 20 z n. (k 20) + 4 z k = 4

APPENDIX A Some Linear Algebra

and problem sheet 2

Some Consequences. Example of Extended Euclidean Algorithm. The Fundamental Theorem of Arithmetic, II. Characterizing the GCD and LCM

2 More examples with details

Polynomials. 1 What is a polynomial? John Stalker

Time-Varying Systems and Computations Lecture 6

Bernoulli Numbers and Polynomials

COMPLEX NUMBERS AND QUADRATIC EQUATIONS

FACTORIZATION IN KRULL MONOIDS WITH INFINITE CLASS GROUP

Dynamic Programming. Preview. Dynamic Programming. Dynamic Programming. Dynamic Programming (Example: Fibonacci Sequence)

On the size of quotient of two subsets of positive integers.

Section 3.6 Complex Zeros

SL n (F ) Equals its Own Derived Group

5 The Rational Canonical Form

Discussion 11 Summary 11/20/2018

LECTURE V. 1. More on the Chinese Remainder Theorem We begin by recalling this theorem, proven in the preceeding lecture.

The internal structure of natural numbers and one method for the definition of large prime numbers

Solutions to the 71st William Lowell Putnam Mathematical Competition Saturday, December 4, 2010

Module 9. Lecture 6. Duality in Assignment Problems

Formulas for the Determinant

Lecture 5 Decoding Binary BCH Codes

U.C. Berkeley CS294: Spectral Methods and Expanders Handout 8 Luca Trevisan February 17, 2016

Yong Joon Ryang. 1. Introduction Consider the multicommodity transportation problem with convex quadratic cost function. 1 2 (x x0 ) T Q(x x 0 )

FINITELY-GENERATED MODULES OVER A PRINCIPAL IDEAL DOMAIN

THERE ARE NO POINTS OF ORDER 11 ON ELLIPTIC CURVES OVER Q.

Inner Product. Euclidean Space. Orthonormal Basis. Orthogonal

Subset Topological Spaces and Kakutani s Theorem

A combinatorial problem associated with nonograms

CS 331 DESIGN AND ANALYSIS OF ALGORITHMS DYNAMIC PROGRAMMING. Dr. Daisy Tang

Lecture 2: Gram-Schmidt Vectors and the LLL Algorithm

Determinants Containing Powers of Generalized Fibonacci Numbers

LECTURE 9 CANONICAL CORRELATION ANALYSIS

Exercises. 18 Algorithms

A summation on Bernoulli numbers

The Ramanujan-Nagell Theorem: Understanding the Proof By Spencer De Chenne

First day August 1, Problems and Solutions

No-three-in-line problem on a torus: periodicity

HMMT February 2016 February 20, 2016

MEM 255 Introduction to Control Systems Review: Basics of Linear Algebra

DISCRIMINANTS AND RAMIFIED PRIMES. 1. Introduction A prime number p is said to be ramified in a number field K if the prime ideal factorization

Factoring Using Shor's Quantum Algorithm

Norms, Condition Numbers, Eigenvalues and Eigenvectors

REDUCTION MODULO p. We will prove the reduction modulo p theorem in the general form as given by exercise 4.12, p. 143, of [1].

= = = (a) Use the MATLAB command rref to solve the system. (b) Let A be the coefficient matrix and B be the right-hand side of the system.

The Multiple Classical Linear Regression Model (CLRM): Specification and Assumptions. 1. Introduction

ALGEBRA HW 7 CLAY SHONKWILER

Hyper-Sums of Powers of Integers and the Akiyama-Tanigawa Matrix

College of Computer & Information Science Fall 2009 Northeastern University 20 October 2009

Advanced Algebraic Algorithms on Integers and Polynomials

k(k 1)(k 2)(p 2) 6(p d.

MATH 241B FUNCTIONAL ANALYSIS - NOTES EXAMPLES OF C ALGEBRAS

Common loop optimizations. Example to improve locality. Why Dependence Analysis. Data Dependence in Loops. Goal is to find best schedule:

Chapter 3 Differentiation and Integration

Anti-van der Waerden numbers of 3-term arithmetic progressions.

Complex Numbers Alpha, Round 1 Test #123

Min Cut, Fast Cut, Polynomial Identities

More metrics on cartesian products

Character Degrees of Extensions of PSL 2 (q) and SL 2 (q)

On quasiperfect numbers

Outline and Reading. Dynamic Programming. Dynamic Programming revealed. Computing Fibonacci. The General Dynamic Programming Technique

Introduction to Algorithms

Attacks on RSA The Rabin Cryptosystem Semantic Security of RSA Cryptology, Tuesday, February 27th, 2007 Nils Andersen. Complexity Theoretic Reduction

Report on Image warping

November 5, 2002 SE 180: Earthquake Engineering SE 180. Final Project

Chapter 7 Generalized and Weighted Least Squares Estimation. In this method, the deviation between the observed and expected values of

The KMO Method for Solving Non-homogenous, m th Order Differential Equations

3.1 Expectation of Functions of Several Random Variables. )' be a k-dimensional discrete or continuous random vector, with joint PMF p (, E X E X1 E X

form, and they present results of tests comparng the new algorthms wth other methods. Recently, Olschowka & Neumaer [7] ntroduced another dea for choo

Poisson brackets and canonical transformations

28 Finitely Generated Abelian Groups

Finding Primitive Roots Pseudo-Deterministically

Perron Vectors of an Irreducible Nonnegative Interval Matrix

International Mathematical Olympiad. Preliminary Selection Contest 2012 Hong Kong. Outline of Solutions

For now, let us focus on a specific model of neurons. These are simplified from reality but can achieve remarkable results.

UNIT 4 EXTENDING THE NUMBER SYSTEM Lesson 3: Operating with Complex Numbers Instruction

arxiv: v6 [math.nt] 23 Aug 2016

332600_08_1.qxp 4/17/08 11:29 AM Page 481

Linear, affine, and convex sets and hulls In the sequel, unless otherwise specified, X will denote a real vector space.

Introduction to Algorithms

On cyclic of Steiner system (v); V=2,3,5,7,11,13

Transcription:

The greatest common dvsor of two ntegers a and b (not both zero) s the largest nteger whch s a common factor of both a and b. We denote ths number by gcd(a, b), or smply (a, b) when there s no confuson about the ntent of the notaton. Example: (13320, 22140) =? Soluton #1: The dvsors of 13320 are 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 37, 40, 45, 60, 72, 74, 90, 111, 120, 148, 180, 185, 222, 296, 333, 360, 370, 444, 555, 666, 740, 888, 1110, 1332, 1480, 1665, 2220, 2664, 3330, 4440, 6660, 13320; the dvsors of 22140 are 1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 27, 30, 36, 41, 45, 54, 60, 82, 90, 108, 123, 135, 164, 180, 205, 246, 270, 369, 410, 492, 540, 615, 738, 820, 1107, 1230, 1476, 1845, 2214, 2460, 3690, 4428, 5535, 7380, 11070, 22140 The common dvsors are hghlghted; the largest number n both sets s 180.

Soluton #2: The prme factorzatons of these numbers are 13320 = 2 3 3 2 5 37 and 22140 = 2 2 3 3 5 41. The gcd can be nferred from the factorzatons to be 2 2 3 2 5 = 180. Proposton Suppose that the ntegers m and n have prme factorzatons d p e and p, respectvely, where the d s and e s are nonnegatve exponents. (Ths allows us to use the same set of prmes for both mn(d numbers.) Then (m, n) = p,e ). // Corollary Every common dvsor of m and n s a dvsor of (m, n). // Porsm Suppose that the ntegers m and n have prme factorzatons d p e and p, respectvely, where the d s and e s are nonnegatve exponents. Then the least common multple of m and n s gven by the formula max(d [m, n] = p,e ). // Corollary (m, n) [m, n] = mn. //

Soluton #3: Usng the dvson algorthm, we fnd that 22140 = 1 13320 + 8820. Ths relaton mples that any common dvsor of 13320 and 22140 and n partcular the gcd must also be a dvsor of 8820. Sgnfcantly, t also mples that any common dvsor of 8820 and 13320 and n partcular ther gcd s a common dvsor of of 13320 and 22140. It follows that (8820, 13320) (13320, 22140) and (13320, 22140) (8820, 13320). So (13320, 22140) = (8820, 13320). The same prncple allows us to say that (8820, 13320) = (4500, 8820), snce 4500 s the remander of the dvson of 13320 by 8820. Ths procedure has the beneft of reducng the sze of the orgnal numbers we are dealng wth, despte the fact that we have not yet computed the gcd. Contnung: (13320,22140) = (8820,13320) = (4500,8820) = (4320,4500) = (180,4320) =180 22140 = 1 13320 + 8820 13320 = 1 8820 + 4500 8820 = 1 4500 + 4320 4500 = 1 4320 +180 4320 = 24 4320 Note that at each stage, the prevous dvsor becomes the new dvdend and the prevous remander becomes the new dvsor, the dvsons endng when the remander reaches 0. The fnal nonzero remander s the desred gcd.

Ths process s called the Eucldean algorthm. (It appears n a slghtly dfferent form Eucld s Elements.) It can be much abbrevated by layng out the computatons n a smple array: 22140 13320 1 8820 1 4500 1 4320 1 180 24 The second column holds the nteger quotents ( q ) for the dvsons obtaned when we dvde a number n the frst column ( r ) nto the number above t ( r 1); the remander of the dvson ( r +1) becomes the subsequent number n the frst column: 0 r 1 r r +1 M q M Note how much less computaton s requred to fnd the gcd by the Eucldean algorthm than be the frst two methods we consdered!

Theorem The gcd of the (postve) ntegers m and n s representable as an nteger lnear combnaton of m and n. That s, there exst ntegers x and y so that (m,n) = xm + yn. In fact, (m, n) s the smallest postve nteger lnear combnaton of m and n. Proof We need only prove the fnal statement snce the frst asserton follows from t drectly. Let S be the set of all postve ntegers of the form xm + yn. Clearly, S s non-empty (consder x = 1, y = 0, or x = 0, y = 1), so t has a least element. Call ths number g = x 0 m + y 0 n. Now g s dvsble by every common factor of m and n; n partcular, (m, n) g. So (m, n) g. On the other hand, dvdng m by g yelds a quotent and remander: m = qg + r, 0 r < g. Subttutng for g n ths equaton we obtan m = q(x 0 m+ y 0 n)+ r, or r = (1 qx 0 )m+( qy 0 )n. But ths means ether that r s n S and s smaller than g, whch s mpossble, or that r = 0. Therefore, g m. An entrely smlar argument shows that g n, too. So g s a common dvsor of m and n, whence g (m, n), mplyng that g (m, n). We can then conclude that g = (m, n). // It s possble to extend the Eucldean algorthm slghtly so as to compute the values of x and y so that (m,n) = xm + yn:

Fnd x and y so that (22140, 13320) = 22140x + 13320y. Consder solutons to the equaton r = 22140x + 13320y r x y q 22140 1 0 13320 0 1 1 8820 1 1 1 4500 1 2 1 4320 2 3 1 180 3 5 24 0 We place the trval solutons x = 1, y = 0, and x = 0, y = 1 n the frst two rows of the array (recognzable as the 2 2 dentty matrx), then use the same arthmetc from the nteger dvson of each value of r by the subsequent value to determne the subsequent values of x and y as well (thn elementary row operatons): f the ( 1)st and th rows of the array are determned by equatons r 1 = 22140x 1 +13320y 1 r = 22140x +13320y and r +1 = r 1 q r, then the (+1)st row s

determned by subtractng q tmes the th equaton from the ( 1)st: x +1 = x 1 q x, y +1 = y 1 q y. When the array produces the gcd as the last nonzero remander, the row of the array contanng ths gcd also contans the approprate coeffcents that represent t as a lnear combnaton of 22140 and 13320: for nstance, from the above array, we see that 180 = 3 22140+ 5 13320. If the numbers a, b have gcd = 1, we see that they share no common factors besdes 1. Such are numbers are sad to be relatvely prme to each other.