# Euclid s Algorithm for the Greatest Common Divisor Desh Ranjan Department of Computer Science New Mexico State University

Save this PDF as:

Size: px
Start display at page:

Download "Euclid s Algorithm for the Greatest Common Divisor Desh Ranjan Department of Computer Science New Mexico State University"

## Transcription

1 Euclid s Algorithm for the Greatest Common Divisor Desh Ranjan Department of Computer Science New Mexico State University 1 Numbers, Division and Euclid It should not surprise you that people have been using numbers (and operations on them like division) for a very long time for very practical purposes like dividing up the money left by parents equally among children or distributing ears of corn equally to groups of people and more generally to conduct all sorts of business dealings. It may be a bit of surprise to some of you that things like calculating divisors of numbers actually form the very core of methods that ensure security of all computer systems and internet communications. The RSA cryptosystem that is used extensively for secure communications is based on the assumptions of difficulty of calculating divisors of large numbers. So, people have been thinking of divisors of numbers for a very, very long time and calculating these actually has significant import in the modern day world. A very related and even more basic notion is the notion of multiples of quantities. One very natural way to compare quantities is to measure how many times do we need to aggregate the smaller quantity to obtain the larger quantity. For example, we may be able to compare two unknown lengths by observing that the larger length can be obtained by aggregating the smaller length three times. This provides one a sense of how the two lengths compare without actually knowing the two lengths. Unfortunately, the larger quantity may not always be obtainable from the smaller quantity by aggregating it an integral number of times. In this scenario, one way to think would be to imagine each of the two quantities to be made up of smaller (identical) parts such that both the quantities can be obtained by aggregating these smaller parts an integral number of times. Obviously, for the larger quantity we will have to use a greater number of parts than the smaller quantity. For example, when comparing two weights, one might observe that larger one can be obtained by aggregating some weight 7 times whereas the smaller weight can be obtained by aggregating the same weight 5 times. This provides us a sense of how big the first weight is to the second one. Of course, in the above scenario, one can also observe that if we chose even smaller parts to split the weights (say a quarter of the first one) the first weight would be we obtained by aggregating this even 1

3 cian if there was an easier way to learn geometry. Euclid replied, there is no royal road to geometry, and sent the king to study. Euclid wrote several books like (Data, On Divisions of Figures, Phaenomena, Optics, and the lost books Conics and Porisms), but Elements remains his best known compilation. The first book in this compilation is perhaps the most well-known. It lays down the foundations of what we today call Euclidean geometry (which was the only geometry people studied until the Renaissance). This book has the definitions of basic geometric objects like points and lines along with the basic postulates or axioms. These axioms are then used by Euclid to establish many other truths (Theorems) of geometry. Elements is considered one of the greatest works of mathematics. It was translated into Latin and Arabic and influenced mathematics throughout Europe and the middle east. It was probably the standard textbook for geometry for more than 1500 years in western Europe and continues to influence the way geometry is taught to this day. Book 7 of Elements provides foundations for number theory. Euclid s Algorithm for calculating the greatest common divisor of two numbers was presented in this book. As one will notice later, Euclid uses lines to represent numbers and often relies on visual figures to aid the explanation of his method of computing the GCD. As such, he seems to be relating numbers to geometry which is quite different from present day treatment of number theory. Today, erroneously, many different methods are called Euclid s algorithm to compute the greatest common divisor(gcd) of two numbers. By reading the original writings of Euclid you will discover the real Euclid s algorithm and appreciate its subtlety. In any case, Euclid s Algorithm is one of the most cited and well-known examples of an (early) algorithm. To quote Knuth [1] : By 1950, the word algorithm was mostly associated with Euclid s Algorithm. 2 Prelude We say that a number 1 x divides another number y if y is a multiple of x. For example, 1, 2, and 3 all divide 6 but 5 does not divide 6. The only divisors of 17 are 1 and 17. The notation x y is a shorthand for x divides y. We denote by divisors(x) the set of all the numbers y such 1 The word number in this section means a positive integer. That is what it meant to Euclid. 3

4 that y x. So, for example, divisors(6) = {1, 2, 3, 6} and divisors(60) = {1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60}. A number z is called a common divisor of two numbers x and y if z x and z y. We denote by cd(x, y) the set of all common divisors of x and y. For example, cd(6, 8) = {1, 2} and cd(40, 180) = {1, 2, 4, 5, 10, 20}. Exercise 2.1. What is the set of divisors of the number 315? Exercise 2.2. Calculate the set cd(288, 216). While it is relatively easy to calculate the divisors of a number and common divisors of two numbers when the numbers are small, the task becomes harder as the numbers becomes larger. Exercise 2.3. Calculate divisors(3456). Exercise 2.4. Calculate cd(3456, 4563). Exercise 2.5. A rather naive method for computing the divisors of a number x is to test whether each number from 1 to x inclusive is a divisor of x. For integers n = 1, 2, 3,..., x, simply test whether n divides x. Using this naive algorithm, write a computer program in the language of your choice that accepts as input a positive integer x and outputs all divisors of x. Run this program for: (a) x = 3456, (b) x = 1009, (c) x = Exercise 2.6. The naive method for computing the common divisors of two numbers x and y is to test whether each number from 1 to the least of {x, y} divides x and y. In modern notation, let m denote the minimum (least of) {x, y}. For n = 1, 2, 3,..., m, first test whether n divides x, and, if so, then test whether n divides y. If n divides both x and y, record n as a common divisor. Using this naive algorithm, write a computer program in the language of your choice that accepts as input two positive integers x, y, and outputs their common divisors. Run this program for: (a) x = 3456, y = 4563, (b) x = 625, y = 288, (c) x = 216, y = 288, 4

5 (d) x = 147, y = 27. As you might have noticed the number 1 divides every number. Since there is no number smaller than 1, 1 is the smallest common divisor for any two numbers x and y. What about the greatest common divisor? The greatest common divisor of two numbers x and y, denoted by gcd(x, y), is the largest number z such that z x and z y. Finding the greatest common divisor is not quite as easy as finding the smallest common divisor. 3 Euclid s Algorithm Here we present the translations of (relevant) Definitions, Proposition 1 and Proposition 2 from Book VII of Euclid s Elements as translated by Sir Thomas L. Heath [2]. Euclid s method of computing the GCD is based on these propositions. BOOK VII of Elements by Euclid DEFINITIONS. 1. A unit is that by virtue of which each of the things that exist is called one. 2. A number is a multitude composed of units. 3. A number is a part of a number, the less of the greater, when it measures the greater. 4. but parts when it does not measure it The greater number is a multiple of the less when it is measured by the less. 6. An even number is that which is divisible into two equal parts. 7. An odd number is that which is not divisible into two equal parts, or that differs by a unit from an even number. 2 While this definition is not relevant here, what is meant by this definition is quite subtle and subject of scholarly mathematical work. 5

6 8. An even-times even number is that which is measured by an even number according to an even number. 9. An even-times odd number is that which is measured by an even number according to an odd number. 10. An odd-times odd number is that which is measured by an odd number according to an odd number. 11. A prime number is that which is measured by a unit alone Numbers prime to one another are those which are measured by a unit alone as a common measure. 13. A composite number is that which is measured by some number. 14. Numbers composite to one another are those which are measured by some number as a common measure. Exercise 3.1. Discuss how Euclid s unit relates to the number 1. Does Euclid think that 1 is a number? Exercise 3.2. What is likely meant when Euclid states that a number measures another number? Express Euclid s notion of measures in modern mathematical notation. Exercise 3.3. Does the number 4 measure number 72? Does 5 measure 72? Briefly justify your answer. Exercise 3.4. Euclid never defines what is a common measure, but uses that in definition 12 and 14. What is your interpretation of Euclid s common measure? Exercise 3.5. Find a number (other than the unit) that is a common measure of the numbers 102 and 187. According to Euclid s definitions, are the numbers 102 and 187 composite to one another? Why or why not? Exercise 3.6. According to Euclid s definitions, are the numbers 21 and 55 composite to one another? Justify your answer. We now present Proposition 1 from Euclid s book VII. The proposition concerns numbers that are prime to one another. 3 Reading further work of Euclid, e.g. Proposition 2, it is clear that Euclid meant that a prime number is that which is measured only by the unit and the number itself. 6

7 PROPOSITION 1. Two unequal numbers being set out, and the less being continually subtracted in turn from the greater, if the number which is left never measures the one before it until a unit is left, the original numbers will be prime to one another. For, the less of two unequal numbers AB, CD being continually subtracted from the greater, let the number which is left never measure the one before it until a unit is left; I say that AB, CD are prime to one another, that is, that a unit alone measures AB, CD. For, if AB, CD are not prime to one another, some number will measure them. I A H C G E B D Let a number measure them, and let it be E; let CD, measuring BI, leave IA less than itself, let, AI measuring DG, leave GC less than itself, and let GC, measuring IH, leave a unit HA. Since, then E measures CD, and CD measure BI, therefore E also measures BI. 7

8 But it also measures the whole BA; therefore it will also measure the remainder AI. But AI measures DG; therefore E also measures DG. But it also measures the whole DC; therefore it will also measure the remainder CG. But CG measures IH; therefore E also measures IH. But it also measures the whole IA; therefore it will also measure the remainder, the unit AH, though it is a number: which is impossible. Therefore no number will measure the numbers AB, CD; therefore AB, CD are prime to one another. [VII. Def 12] Q. E. D. Exercise 3.7. Euclid begins with two unequal numbers AB, CD, and continually subtracts the smaller in turn from the greater. Let s examine how this method proceeds in turn when subtraction yields a new number that is smaller than the one subtracted. Begin with AB = 162 and CD = 31. (a) How many times must CD be subtracted from AB until a remainder is left that is less than CD? Let this remainder be denoted as IA. (b) Write AB = BI + IA numerically using the given value for AB and the computed value for IA. (c) How many times must IA be subtracted from CD until a remainder is left that is less than IA? Let this remainder be denoted as GC. 8

10 We now present proposition 2 from Book VII of Euclid s elements. This proposition presents a method to compute the GCD of two numbers which are not prime to each other and provides a proof of the correctness of the method. Euclid s presentation intermixes the proof and the method to some extent. Despite this the elegance of his method and the proof is striking. PROPOSITION 2. Given two numbers not prime to one another, to find their greatest common measure. Let AB, CD be the two given numbers not prime to one another. Thus it is required to find the greatest common measure of AB, CD. If now CD measures AB - and it also measures itself - CD is a common measure of CD, AB. And it is manifest that it is also the greatest; for no greater number than CD will measure CD. But, if CD does not measure AB, then, the less of the numbers AB, CD being continually subtracted from the greater, some number will be left which will measure the one before it. 4 For a unit will not be left; otherwise AB, CD will be prime to one another [VII, I], which is contrary to the hypothesis. Therefore some number will be left which will measure the one before it. Now let CD, measuring BE, leave EA less than itself, let EA, measuring DI, leave IC less than itself, and let CI measure AE. Since then, CI measures AE, and AE measures DI, 4 This is the heart of Euclid s description of his algorithm. The statement is somewhat ambiguous and subject to at least two different interpretations. 10

11 A E C I G B D therefore CI will also measure DI. But it also measures itself; therefore it will also measure the whole CD. But CD measures BE; therefore CI also measures BE. But it also measures EA; therefore, it will also measure the whole BA. But it also measures CD; therefore CI measures AB, CD. Therefore CI is a common measure of AB, CD. I say next that it is also the greatest. For, if CI is not the greatest common measure of AB, CD, some number which is greater than CI will measure the numbers AB, CD. 11

12 Let such a number measure them, and let it be G. Now, since G measures CD, while CD measures BE, G also measures BE. But it also measures the whole BA; therefore it will also measure the remainder AE. But AE measures DI; therefore G will also measure DI. But it will also measure the whole DC; therefore it will also measure the remainder CI, that is, the greater will measure the less: which is impossible. Therefore no number which is greater than CI will measure the numbers AB, CD; therefore CI is the greatest common measure of AB, CD. Porism. From this it is manifest that, if a number measure two numbers, it will also measure their greatest common measure. Exercise In Proposition 2 Euclid describes a procedure to compute the greatest common measure of two numbers AB, CD, not prime to one another. The method again proceeds by repeatedly subtracting the smaller in turn from the greater until some number is left, which in this case divides the number before it. Let s examine this process for AB = 147 and CD = 27. (a) Does CD measure AB? If so, the process stops. If not, how many times must CD be subtracted from AB until a positive remainder is left that is less than CD. Let EA denote this remainder. 12

13 (b) Write AB = BE + EA numerically using the given value for AB and the computed value for EA. Also find a positive integer q 1 so that BE = q 1 CD. (c) Does EA measure CD? If so, the process stops. If not, how many times must EA be subtracted from CD until a positive remainder is left that is less than EA. Let IC denote this remainder. (d) Write CD = DI + IC numerically using the given value for CD and the computed value for IC. Also, find a positive integer q 2 so that DI = q 2 EA. (e) Does IC measure EA? If so, the process stops. If not, how many times must IC be subtracted from EA until a positive remainder is left that is less than IC? (f) Find a positive integer q 3 so that EA = q 3 IC. Exercise Apply Euclid s procedure in Proposition 2 to compute the greatest common measure of AB = 600 and CD = 276 outlined in the steps below. (a) To streamline the process, let a 1 = AB = 600, a 2 = CD = 276, and a 3 = EA. Compute a 3 numerically for this example. Write the equation AB = BE + EA entirely in terms of a 1, a 2 and a 3. (b) Let a 4 = IC. Compute a 4 for this example. Write the equation CD = DI + IC entirely in terms of a 2, a 3 and a 4. (c) Does IC measure EA in this example? If so, the process stops. If not, how many times must IC be subtracted from EA until a positive remainder is left that is less than IC? Denote this remainder by a 5. (d) Write an equation using a 3, a 4 and a 5 that reflects the number of times IC must be subtracted from EA so that the remainder is a 5. (e) Does a 5 measure a 4? If so, the process stops. If not, how many times must a 5 be subtracted from a 4 until a positive remainder is left that is less than a 5? Exercise In modern notation, the Euclidean algorithm to compute the greatest common measure of two positive integers a 1 and a 2 (prime to each other or not) can be written as follows. Find a sequence of positive 13

14 integer remainders a 3, a 4, a 5,..., a n+1 and a sequence of (positive) integer multipliers q 1, q 2, q 3,..., q n so that a 1 = q 1 a 2 + a 3, 0 < a 3 < a 2 a 2 = q 2 a 3 + a 4, 0 < a 4 < a 3 a 3 = q 3 a 4 + a 5, 0 < a 5 < a 4. a i 1 = q i 1 a i + a i+1, 0 < a i+1 < a i a i = q i a i+1 + a i+2, 0 < a i+2 < a i+1. a n 1 = q n 1 a n + a n+1, 0 < a n+1 < a n a n = q n a n+1 (a) Why is a n+1 a divisor of a n? Briefly justify your answer. (b) Why is a n+1 a divisor of a n 1? Carefully justify your answer. (c) In a step-by-step argument, use (backwards) mathematical induction to verify that a n+1 is a divisor of a i, i = n, n 1, n 2,..., 3, 2, 1. (d) Why is a n+1 a common divisor of a 1 and a 2? (e) In a step-by-step argument, use (forwards) mathematical induction to verify that if G is a divisor of a 1 and a 2, then G is also a divisor of a i, i = 3, 4, 5,..., n + 1. First, carefully explain why G is a divisor of a 3. Then examine the inductive step. (f) From part (d) we know that a n+1 is a common divisor of a 1 and a 2. Carefully explain how part (e) can be used to conclude that a n+1 is in fact the greatest common divisor of a 1 and a 2. A proof by contradiction might be appropriate here, following Euclid s example. Exercise In Proposition 1 Euclid describes an algorithm whereby, given two unequal numbers, the less is continually subtracted in turn from the greater until a unit is left. While in Proposition 2, Euclid describes an algorithm, whereby, given two unequal numbers, the less is continually subtracted from the greater until some number is left which measures the one before it. (a) To what extent are these algorithms identical? 14

15 (b) How are the algorithms in Proposition 1 and Proposition 2 designed to differ in application? (c) Does Euclid consider a unit as a number? Justify your answer citing relevant passages from the work of Euclid. Does Euclid consider a common measure as a number? Again, justify your answer from the work of Euclid. (d) Why, in your opinion, does Euclid describe this algorithm using two separate propositions, when a single description could suffice? Exercise In the modern description of the Euclidean algorithm in Exercise (3.12), the last equation written is a n = q n a n+1, meaning that after n-steps, the algorithm halts and a n+1 divides (measures) a n. Given any two positive integers a 1 and a 2, why must the Euclidean algorithm halt in a finite number of steps? Carefully justify your answer using the modern version of the algorithm. Exercise Write a computer program in the language of your choice that implements Euclid s algorithm for finding the greatest common divisor of two positive integers. The program should accept as input two positive integers a 1, a 2, and as output print their greatest common divisor. Run the program for: (a) a 1 = 3456, a 2 = 4563, (b) a 1 = 625, a 2 = 288, (c) a 1 = 216, a 2 = 288. References [1] Knuth, D.E., The Art of Computer Programming, Volume 1, [2] Heath T.L., Euclid The Thirteen Books of the Elements, Volume 2, Second Edition, Dover Publications, New York,

### An Innocent Investigation

An Innocent Investigation D. Joyce, Clark University January 2006 The beginning. Have you ever wondered why every number is either even or odd? I don t mean to ask if you ever wondered whether every number

### INCIDENCE-BETWEENNESS GEOMETRY

INCIDENCE-BETWEENNESS GEOMETRY MATH 410, CSUSM. SPRING 2008. PROFESSOR AITKEN This document covers the geometry that can be developed with just the axioms related to incidence and betweenness. The full

### WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? introduction Many students seem to have trouble with the notion of a mathematical proof. People that come to a course like Math 216, who certainly

### Mathematical Induction

Mathematical Induction (Handout March 8, 01) The Principle of Mathematical Induction provides a means to prove infinitely many statements all at once The principle is logical rather than strictly mathematical,

### CONTINUED FRACTIONS AND FACTORING. Niels Lauritzen

CONTINUED FRACTIONS AND FACTORING Niels Lauritzen ii NIELS LAURITZEN DEPARTMENT OF MATHEMATICAL SCIENCES UNIVERSITY OF AARHUS, DENMARK EMAIL: niels@imf.au.dk URL: http://home.imf.au.dk/niels/ Contents

### Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10 Introduction to Discrete Probability Probability theory has its origins in gambling analyzing card games, dice,

### Factoring & Primality

Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount

### 11 Ideals. 11.1 Revisiting Z

11 Ideals The presentation here is somewhat different than the text. In particular, the sections do not match up. We have seen issues with the failure of unique factorization already, e.g., Z[ 5] = O Q(

### Plato gives another argument for this claiming, relating to the nature of knowledge, which we will return to in the next section.

Michael Lacewing Plato s theor y of Forms FROM SENSE EXPERIENCE TO THE FORMS In Book V (476f.) of The Republic, Plato argues that all objects we experience through our senses are particular things. We

### Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures

Number Theory Hungarian Style Cameron Byerley s interpretation of Csaba Szabó s lectures August 20, 2005 2 0.1 introduction Number theory is a beautiful subject and even cooler when you learn about it

### Handout NUMBER THEORY

Handout of NUMBER THEORY by Kus Prihantoso Krisnawan MATHEMATICS DEPARTMENT FACULTY OF MATHEMATICS AND NATURAL SCIENCES YOGYAKARTA STATE UNIVERSITY 2012 Contents Contents i 1 Some Preliminary Considerations

### Breaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and

Breaking The Code Ryan Lowe Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and a minor in Applied Physics. As a sophomore, he took an independent study

### ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION

ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION Aldrin W. Wanambisi 1* School of Pure and Applied Science, Mount Kenya University, P.O box 553-50100, Kakamega, Kenya. Shem Aywa 2 Department of Mathematics,

### The program also provides supplemental modules on topics in geometry and probability and statistics.

Algebra 1 Course Overview Students develop algebraic fluency by learning the skills needed to solve equations and perform important manipulations with numbers, variables, equations, and inequalities. Students

### Some Polynomial Theorems. John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA 90405 rkennedy@ix.netcom.

Some Polynomial Theorems by John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA 90405 rkennedy@ix.netcom.com This paper contains a collection of 31 theorems, lemmas,

### MATH 289 PROBLEM SET 4: NUMBER THEORY

MATH 289 PROBLEM SET 4: NUMBER THEORY 1. The greatest common divisor If d and n are integers, then we say that d divides n if and only if there exists an integer q such that n = qd. Notice that if d divides

### Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur

Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Module No. # 01 Lecture No. # 05 Classic Cryptosystems (Refer Slide Time: 00:42)

### Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Math Review for the Quantitative Reasoning Measure of the GRE revised General Test www.ets.org Overview This Math Review will familiarize you with the mathematical skills and concepts that are important

### SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by

SUBGROUPS OF CYCLIC GROUPS KEITH CONRAD 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by g = {g k : k Z}. If G = g, then G itself is cyclic, with g as a generator. Examples

### If A is divided by B the result is 2/3. If B is divided by C the result is 4/7. What is the result if A is divided by C?

Problem 3 If A is divided by B the result is 2/3. If B is divided by C the result is 4/7. What is the result if A is divided by C? Suggested Questions to ask students about Problem 3 The key to this question

### U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory

### Chapter 1. Computation theory

Chapter 1. Computation theory In this chapter we will describe computation logic for the machines. This topic is a wide interdisciplinary field, so that the students can work in an interdisciplinary context.

### Read this syllabus very carefully. If there are any reasons why you cannot comply with what I am requiring, then talk with me about this at once.

LOGIC AND CRITICAL THINKING PHIL 2020 Maymester Term, 2010 Daily, 9:30-12:15 Peabody Hall, room 105 Text: LOGIC AND RATIONAL THOUGHT by Frank R. Harrison, III Professor: Frank R. Harrison, III Office:

### 4 G: Identify, analyze, and synthesize relevant external resources to pose or solve problems. 4 D: Interpret results in the context of a situation.

MAT.HS.PT.4.TUITN.A.298 Sample Item ID: MAT.HS.PT.4.TUITN.A.298 Title: College Tuition Grade: HS Primary Claim: Claim 4: Modeling and Data Analysis Students can analyze complex, real-world scenarios and

### Subsets of Euclidean domains possessing a unique division algorithm

Subsets of Euclidean domains possessing a unique division algorithm Andrew D. Lewis 2009/03/16 Abstract Subsets of a Euclidean domain are characterised with the following objectives: (1) ensuring uniqueness

### it is easy to see that α = a

21. Polynomial rings Let us now turn out attention to determining the prime elements of a polynomial ring, where the coefficient ring is a field. We already know that such a polynomial ring is a UF. Therefore

### Ancient P olitical Political Thought

Ancient Political Thought Plato s Republic Overview I. 2. 3. 4. Setting Historical Background Structure of the work Cast of Characters I. The Setting: Locale Locale: Pireaus Port of Athens, about 6 miles

### Factoring Algorithms

Factoring Algorithms The p 1 Method and Quadratic Sieve November 17, 2008 () Factoring Algorithms November 17, 2008 1 / 12 Fermat s factoring method Fermat made the observation that if n has two factors

### 5-1 NUMBER THEORY: DIVISIBILITY; PRIME & COMPOSITE NUMBERS 210 f8

5-1 NUMBER THEORY: DIVISIBILITY; PRIME & COMPOSITE NUMBERS 210 f8 Note: Integers are the w hole numbers and their negatives (additive inverses). While our text discusses only whole numbers, all these ideas

### MACM 101 Discrete Mathematics I

MACM 101 Discrete Mathematics I Exercises on Combinatorics, Probability, Languages and Integers. Due: Tuesday, November 2th (at the beginning of the class) Reminder: the work you submit must be your own.

### Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)

Chapter 23 Squares Modulo p Revised Version of Chapter 23 We learned long ago how to solve linear congruences ax c (mod m) (see Chapter 8). It s now time to take the plunge and move on to quadratic equations.

### Answer: (a) Since we cannot repeat men on the committee, and the order we select them in does not matter, ( )

1. (Chapter 1 supplementary, problem 7): There are 12 men at a dance. (a) In how many ways can eight of them be selected to form a cleanup crew? (b) How many ways are there to pair off eight women at the

### TEXAS A&M UNIVERSITY. Prime Factorization. A History and Discussion. Jason R. Prince. April 4, 2011

TEXAS A&M UNIVERSITY Prime Factorization A History and Discussion Jason R. Prince April 4, 2011 Introduction In this paper we will discuss prime factorization, in particular we will look at some of the

### A Second Course in Mathematics Concepts for Elementary Teachers: Theory, Problems, and Solutions

A Second Course in Mathematics Concepts for Elementary Teachers: Theory, Problems, and Solutions Marcel B. Finan Arkansas Tech University c All Rights Reserved First Draft February 8, 2006 1 Contents 25

### DEGREE OF NEGATION OF AN AXIOM

DEGREE OF NEGATION OF AN AXIOM Florentin Smarandache, Ph D Professor of Mathematics Chair of Department of Math & Sciences University of New Mexico 200 College Road Gallup, NM 87301, USA E-mail: smarand@unm.edu

### Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

### CHAPTER II THE LIMIT OF A SEQUENCE OF NUMBERS DEFINITION OF THE NUMBER e.

CHAPTER II THE LIMIT OF A SEQUENCE OF NUMBERS DEFINITION OF THE NUMBER e. This chapter contains the beginnings of the most important, and probably the most subtle, notion in mathematical analysis, i.e.,

### z 0 and y even had the form

Gaussian Integers The concepts of divisibility, primality and factoring are actually more general than the discussion so far. For the moment, we have been working in the integers, which we denote by Z

### The Division Algorithm for Polynomials Handout Monday March 5, 2012

The Division Algorithm for Polynomials Handout Monday March 5, 0 Let F be a field (such as R, Q, C, or F p for some prime p. This will allow us to divide by any nonzero scalar. (For some of the following,

### Not for resale. 4.1 Divisibility of Natural Numbers 4.2 Tests for Divisibility 4.3 Greatest Common Divisors and Least Common Multiples

CHAPTER 4 Number Theory 4.1 Divisibility of Natural Numbers 4.2 Tests for Divisibility 4.3 Greatest Common Divisors and Least Common Multiples 4.4 Codes and Credit Card Numbers: Connections to Number Theory

### WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

First Name: Family Name: Student Number: Class/Tutorial: WOLLONGONG COLLEGE AUSTRALIA A College of the University of Wollongong Diploma in Information Technology Mid-Session Test Summer Session 008-00

### SOLUTIONS FOR PROBLEM SET 2

SOLUTIONS FOR PROBLEM SET 2 A: There exist primes p such that p+6k is also prime for k = 1,2 and 3. One such prime is p = 11. Another such prime is p = 41. Prove that there exists exactly one prime p such

### This chapter is all about cardinality of sets. At first this looks like a

CHAPTER Cardinality of Sets This chapter is all about cardinality of sets At first this looks like a very simple concept To find the cardinality of a set, just count its elements If A = { a, b, c, d },

### Linear Algebra I. Ronald van Luijk, 2012

Linear Algebra I Ronald van Luijk, 2012 With many parts from Linear Algebra I by Michael Stoll, 2007 Contents 1. Vector spaces 3 1.1. Examples 3 1.2. Fields 4 1.3. The field of complex numbers. 6 1.4.

### How many numbers there are?

How many numbers there are? RADEK HONZIK Radek Honzik: Charles University, Department of Logic, Celetná 20, Praha 1, 116 42, Czech Republic radek.honzik@ff.cuni.cz Contents 1 What are numbers 2 1.1 Natural

### MTH6120 Further Topics in Mathematical Finance Lesson 2

MTH6120 Further Topics in Mathematical Finance Lesson 2 Contents 1.2.3 Non-constant interest rates....................... 15 1.3 Arbitrage and Black-Scholes Theory....................... 16 1.3.1 Informal

### Warm up. Connect these nine dots with only four straight lines without lifting your pencil from the paper.

Warm up Connect these nine dots with only four straight lines without lifting your pencil from the paper. Sometimes we need to think outside the box! Warm up Solution Warm up Insert the Numbers 1 8 into

### FACTORING LARGE NUMBERS, A GREAT WAY TO SPEND A BIRTHDAY

FACTORING LARGE NUMBERS, A GREAT WAY TO SPEND A BIRTHDAY LINDSEY R. BOSKO I would like to acknowledge the assistance of Dr. Michael Singer. His guidance and feedback were instrumental in completing this

### Probabilistic Strategies: Solutions

Probability Victor Xu Probabilistic Strategies: Solutions Western PA ARML Practice April 3, 2016 1 Problems 1. You roll two 6-sided dice. What s the probability of rolling at least one 6? There is a 1

### INTRUSION PREVENTION AND EXPERT SYSTEMS

INTRUSION PREVENTION AND EXPERT SYSTEMS By Avi Chesla avic@v-secure.com Introduction Over the past few years, the market has developed new expectations from the security industry, especially from the intrusion

### MATHEMATICS OF FINANCE AND INVESTMENT

MATHEMATICS OF FINANCE AND INVESTMENT G. I. FALIN Department of Probability Theory Faculty of Mechanics & Mathematics Moscow State Lomonosov University Moscow 119992 g.falin@mail.ru 2 G.I.Falin. Mathematics

### NIM with Cash. Abstract. loses. This game has been well studied. For example, it is known that for NIM(1, 2, 3; n)

NIM with Cash William Gasarch Univ. of MD at College Park John Purtilo Univ. of MD at College Park Abstract NIM(a 1,..., a k ; n) is a -player game where initially there are n stones on the board and the

### FACTORING. n = 2 25 + 1. fall in the arithmetic sequence

FACTORING The claim that factorization is harder than primality testing (or primality certification) is not currently substantiated rigorously. As some sort of backward evidence that factoring is hard,

### Basic Algorithms In Computer Algebra

Basic Algorithms In Computer Algebra Kaiserslautern SS 2011 Prof. Dr. Wolfram Decker 2. Mai 2011 References Cohen, H.: A Course in Computational Algebraic Number Theory. Springer, 1993. Cox, D.; Little,

### Factoring Polynomials

Factoring Polynomials Sue Geller June 19, 2006 Factoring polynomials over the rational numbers, real numbers, and complex numbers has long been a standard topic of high school algebra. With the advent

### Probability Using Dice

Using Dice One Page Overview By Robert B. Brown, The Ohio State University Topics: Levels:, Statistics Grades 5 8 Problem: What are the probabilities of rolling various sums with two dice? How can you

### mathematical community as well as many others. He is considered by many to be one of the

Kramer 1 Johann Friedrich Carl Gauss is a name that is instantly recognized by members of the mathematical community as well as many others. He is considered by many to be one of the greatest mathematicians

### Balanced Assessment Test Algebra 2008

Balanced Assessment Test Algebra 2008 Core Idea Task Score Representations Expressions This task asks students find algebraic expressions for area and perimeter of parallelograms and trapezoids. Successful

### PowerScore Test Preparation (800) 545-1750

Question 1 Test 1, Second QR Section (version 1) List A: 0, 5,, 15, 20... QA: Standard deviation of list A QB: Standard deviation of list B Statistics: Standard Deviation Answer: The two quantities are

### Game Theory and Algorithms Lecture 10: Extensive Games: Critiques and Extensions

Game Theory and Algorithms Lecture 0: Extensive Games: Critiques and Extensions March 3, 0 Summary: We discuss a game called the centipede game, a simple extensive game where the prediction made by backwards

### QUEUING THEORY. 1. Introduction

QUEUING THEORY RYAN BERRY Abstract. This paper defines the building blocks of and derives basic queuing systems. It begins with a review of some probability theory and then defines processes used to analyze

### The Problem of the "Rod" and the "Root of Jesse" in Isaiah 11

CHAPTER XXV The Problem of the "Rod" and the "Root of Jesse" in Isaiah 11 When the Angel Moroni appeared to the Prophet Joseph Smith on the evening of September 21, 1823, he quoted the eleventh chapter

### Integer roots of quadratic and cubic polynomials with integer coefficients

Integer roots of quadratic and cubic polynomials with integer coefficients Konstantine Zelator Mathematics, Computer Science and Statistics 212 Ben Franklin Hall Bloomsburg University 400 East Second Street

### WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

First Name: Family Name: Student Number: Class/Tutorial: WOLLONGONG COLLEGE AUSTRALIA A College of the University of Wollongong Diploma in Information Technology Final Examination Spring Session 2008 WUCT121

### Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. We begin by defining the ring of polynomials with coefficients in a ring R. After some preliminary results, we specialize

### Lecture Notes on Polynomials

Lecture Notes on Polynomials Arne Jensen Department of Mathematical Sciences Aalborg University c 008 Introduction These lecture notes give a very short introduction to polynomials with real and complex

### E3: PROBABILITY AND STATISTICS lecture notes

E3: PROBABILITY AND STATISTICS lecture notes 2 Contents 1 PROBABILITY THEORY 7 1.1 Experiments and random events............................ 7 1.2 Certain event. Impossible event............................

### 9. POLYNOMIALS. Example 1: The expression a(x) = x 3 4x 2 + 7x 11 is a polynomial in x. The coefficients of a(x) are the numbers 1, 4, 7, 11.

9. POLYNOMIALS 9.1. Definition of a Polynomial A polynomial is an expression of the form: a(x) = a n x n + a n-1 x n-1 +... + a 1 x + a 0. The symbol x is called an indeterminate and simply plays the role

### Intermediate Math Circles March 7, 2012 Linear Diophantine Equations II

Intermediate Math Circles March 7, 2012 Linear Diophantine Equations II Last week: How to find one solution to a linear Diophantine equation This week: How to find all solutions to a linear Diophantine

### Can RIA Help Participants with Rollovers

May 2013 Can RIA Help Participants with Rollovers by Fred Reish, Drinker Biddle & Reath LLP Note: The bulletin you are reading is part of a series provided as a service to the Designees and Members of

### Solutions for Practice problems on proofs

Solutions for Practice problems on proofs Definition: (even) An integer n Z is even if and only if n = 2m for some number m Z. Definition: (odd) An integer n Z is odd if and only if n = 2m + 1 for some

### = 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without

### JUST THE MATHS UNIT NUMBER 1.8. ALGEBRA 8 (Polynomials) A.J.Hobson

JUST THE MATHS UNIT NUMBER 1.8 ALGEBRA 8 (Polynomials) by A.J.Hobson 1.8.1 The factor theorem 1.8.2 Application to quadratic and cubic expressions 1.8.3 Cubic equations 1.8.4 Long division of polynomials

### A Concrete Introduction. to the Abstract Concepts. of Integers and Algebra using Algebra Tiles

A Concrete Introduction to the Abstract Concepts of Integers and Algebra using Algebra Tiles Table of Contents Introduction... 1 page Integers 1: Introduction to Integers... 3 2: Working with Algebra Tiles...

GENERATING SETS KEITH CONRAD 1 Introduction In R n, every vector can be written as a unique linear combination of the standard basis e 1,, e n A notion weaker than a basis is a spanning set: a set of vectors

### The finite field with 2 elements The simplest finite field is

The finite field with 2 elements The simplest finite field is GF (2) = F 2 = {0, 1} = Z/2 It has addition and multiplication + and defined to be 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 0 0 = 0 0 1 = 0

### Chapter 9. The Valuation of Common Stock. 1.The Expected Return (Copied from Unit02, slide 36)

Readings Chapters 9 and 10 Chapter 9. The Valuation of Common Stock 1. The investor s expected return 2. Valuation as the Present Value (PV) of dividends and the growth of dividends 3. The investor s required

### 1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier.

Study Group 1 Variables and Types 1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier. 2. What does the byte 00100110 represent? 3. What is the purpose of the declarations

### PROBLEM SET 6: POLYNOMIALS

PROBLEM SET 6: POLYNOMIALS 1. introduction In this problem set we will consider polynomials with coefficients in K, where K is the real numbers R, the complex numbers C, the rational numbers Q or any other

### Math/Stats 425 Introduction to Probability. 1. Uncertainty and the axioms of probability

Math/Stats 425 Introduction to Probability 1. Uncertainty and the axioms of probability Processes in the real world are random if outcomes cannot be predicted with certainty. Example: coin tossing, stock

### Near Optimal Solutions

Near Optimal Solutions Many important optimization problems are lacking efficient solutions. NP-Complete problems unlikely to have polynomial time solutions. Good heuristics important for such problems.

### MTH124: Honors Algebra I

MTH124: Honors Algebra I This course prepares students for more advanced courses while they develop algebraic fluency, learn the skills needed to solve equations, and perform manipulations with numbers,

### Indiana State Core Curriculum Standards updated 2009 Algebra I

Indiana State Core Curriculum Standards updated 2009 Algebra I Strand Description Boardworks High School Algebra presentations Operations With Real Numbers Linear Equations and A1.1 Students simplify and

### An Introductory Course in Elementary Number Theory. Wissam Raji

An Introductory Course in Elementary Number Theory Wissam Raji 2 Preface These notes serve as course notes for an undergraduate course in number theory. Most if not all universities worldwide offer introductory

### THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER JASPER DEANTONIO Abstract. This paper is a study of the Turing Degrees, which are levels of incomputability naturally arising from sets of natural numbers.

### Cryptanalysis of a Partially Blind Signature Scheme or How to make \$100 bills with \$1 and \$2 ones

Cryptanalysis of a Partially Blind Signature Scheme or How to make \$100 bills with \$1 and \$2 ones Gwenaëlle Martinet 1, Guillaume Poupard 1, and Philippe Sola 2 1 DCSSI Crypto Lab, 51 boulevard de La Tour-Maubourg

### Notes on Factoring. MA 206 Kurt Bryan

The General Approach Notes on Factoring MA 26 Kurt Bryan Suppose I hand you n, a 2 digit integer and tell you that n is composite, with smallest prime factor around 5 digits. Finding a nontrivial factor

### ON UNIQUE FACTORIZATION DOMAINS

ON UNIQUE FACTORIZATION DOMAINS JIM COYKENDALL AND WILLIAM W. SMITH Abstract. In this paper we attempt to generalize the notion of unique factorization domain in the spirit of half-factorial domain. It

### Teaching & Learning Plans. Arithmetic Sequences. Leaving Certificate Syllabus

Teaching & Learning Plans Arithmetic Sequences Leaving Certificate Syllabus The Teaching & Learning Plans are structured as follows: Aims outline what the lesson, or series of lessons, hopes to achieve.

### Chapter 21: The Discounted Utility Model

Chapter 21: The Discounted Utility Model 21.1: Introduction This is an important chapter in that it introduces, and explores the implications of, an empirically relevant utility function representing intertemporal

### A Hajós type result on factoring finite abelian groups by subsets II

Comment.Math.Univ.Carolin. 51,1(2010) 1 8 1 A Hajós type result on factoring finite abelian groups by subsets II Keresztély Corrádi, Sándor Szabó Abstract. It is proved that if a finite abelian group is

### Lecture 13: Factoring Integers

CS 880: Quantum Information Processing 0/4/0 Lecture 3: Factoring Integers Instructor: Dieter van Melkebeek Scribe: Mark Wellons In this lecture, we review order finding and use this to develop a method

### Conditional Probability, Hypothesis Testing, and the Monty Hall Problem

Conditional Probability, Hypothesis Testing, and the Monty Hall Problem Ernie Croot September 17, 2008 On more than one occasion I have heard the comment Probability does not exist in the real world, and

### Basic Concepts of Point Set Topology Notes for OU course Math 4853 Spring 2011

Basic Concepts of Point Set Topology Notes for OU course Math 4853 Spring 2011 A. Miller 1. Introduction. The definitions of metric space and topological space were developed in the early 1900 s, largely

### On Generalized Fermat Numbers 3 2n +1

Applied Mathematics & Information Sciences 4(3) (010), 307 313 An International Journal c 010 Dixie W Publishing Corporation, U. S. A. On Generalized Fermat Numbers 3 n +1 Amin Witno Department of Basic

### 1 Sufficient statistics

1 Sufficient statistics A statistic is a function T = rx 1, X 2,, X n of the random sample X 1, X 2,, X n. Examples are X n = 1 n s 2 = = X i, 1 n 1 the sample mean X i X n 2, the sample variance T 1 =

### 1 = (a 0 + b 0 α) 2 + + (a m 1 + b m 1 α) 2. for certain elements a 0,..., a m 1, b 0,..., b m 1 of F. Multiplying out, we obtain

Notes on real-closed fields These notes develop the algebraic background needed to understand the model theory of real-closed fields. To understand these notes, a standard graduate course in algebra is

### Fractions Packet. Contents

Fractions Packet Contents Intro to Fractions.. page Reducing Fractions.. page Ordering Fractions page Multiplication and Division of Fractions page Addition and Subtraction of Fractions.. page Answer Keys..