Greatest Common Divisor MATH Greatest Common Divisor. Benjamin V.C. Collins, James A. Swenson MATH 2730
|
|
- Posy Sutton
- 5 years ago
- Views:
Transcription
1 MATH 2730 Greatest Common Divisor Benjamin V.C. Collins James A. Swenson
2 The world s least necessary definition Definition Let a, b Z, not both zero. The largest integer d such that d a and d b is called the greatest common divisor of a and b, and is denoted by gcd(a, b). Existence We know that there is at least one common divisor of a and b; namely, 1. Because (a, b) (0, 0), at least one of {a, b} has only a finite number of divisors. This shows that the set of common divisors of a and b is nonempty and finite, so it has a greatest element.
3 Examples Example gcd(12, 40) = 4 gcd( 625, 100) = 25 gcd(81, 70) = 1 gcd(220, 8294) = = =
4 Euclid s algorithm Euclid(a,b) Input: positive integers a and b Output: gcd(a, b) Method: assign c = a mod b if c = 0: return b else: return Euclid(b,c)
5 Euclid s algorithm assign c = a mod b if c = 0: return b else: return Euclid(b,c) Input Division Algorithm mod operation Output (220, 8294) 220 = mod 8294 = 220 Euclid(8294, 220) (8294, 220) 8294 = mod 220 = 154 Euclid(220, 154) (220, 154) 220 = mod 154 = 66 Euclid(154, 66) (154, 66) 154 = mod 66 = 22 Euclid(66, 22) (66, 22) 66 = mod 22 = 0 22
6 Why does Euclid s algorithm work? Lemma Let a Z and b Z +. If c = a mod b, then gcd(a, b) = gcd(b, c). Proof. Let a Z and b Z +, and let c = a mod b. Let d = gcd(a, b) and e = gcd(b, c). We have a = qb + c for some q Z. We know that d a and d b, so d (a qb). That is, d c. Since d b and d c, d is a common divisor of b and c, so d gcd(b, c) = e. On the other hand, e b and e c, so e (qb + c). That is, e a. Since e a and e b, e is a common divisor of a and b. Therefore, e gcd(a, b) = d. Therefore d = e. That is, gcd(a, b) = gcd(b, c).
7 Euclid s algorithm works! Proposition Euclid s algorithm correctly computes gcd(a, b) for all a, b Z +. Proof. Assume wlog that b a. The proof is by strong induction on a. Base case: Suppose a = 1. Then b = 1, so gcd(a, b) = 1. But c = a mod b = 0, so Euclid s algorithm returns b = 1. Strong induction hypothesis: Suppose that Euclid s algorithm correctly computes gcd(a, b) whenever 1 a k and b a. Apply Euclid s algorithm to a = k + 1 and any b k + 1. If (k + 1) mod b = 0, then b = gcd(k + 1, b), and Euclid s algorithm returns b. If (k + 1) mod b 0, then 1 b k. By induction, Euclid s algorithm returns gcd(b, c). By the lemma, that s gcd(k + 1, b). Either way, Euclid s algorithm computes gcd(k + 1, b) correctly.
8 Linear combinations and the GCD Theorem Let a and b be integers, not both zero. The smallest positive integer of the form ax + by (x, y Z) is gcd(a, b). Example Find integers x and y such that 12x + 40y = 4. (x=-3, y=1) Find integers x and y such that ( 625)x + ( 100)y = 25. (x=-1, y=6) Find integers x and y such that 8294x + 220y = 22.
9 Finding the linear combination Find integers x and y such that 8294x + 220y = 22. Equation Rearranged Substituted 154 = (2) = 154(1) + 66( 2) 22 = 154(1) + 66( 2) 220 = (1) = 220(1) + 154( 1) 22 = 154(1) + [220(1) + 154( 1)]( 2) 22 = 154(3) + 220( 2) 8294 = (37) = 8294(1) + 220( 37) 22 = [8294(1) + 220( 37)](3) + 220( 2) 22 = 8294(3) + 220( 113)
10 Proof of the theorem Theorem Let a and b be integers, not both zero. The smallest positive integer of the form ax + by (x, y Z) is gcd(a, b). Proof. Let D = {k Z + : x, y Z, k = ax + by}. Using the well-ordering principle, let c = au + bv be the least element of D. Using the division algorithm, write a = qc + r, with 0 r < c. a = q(au + bv) + r r = a(1 qu) + b( qv) Now r is of the form ax + by, but r < c, so r is not positive. But r 0, so r = 0. So a = qc, which implies that c a. A similar argument shows that c b. So c is a common divisor of a and b.
11 Proof of the theorem (continued) Theorem Let a and b be integers, not both zero. The smallest positive integer of the form ax + by (x, y Z) is gcd(a, b). Proof (continued).... So c is a common divisor of a and b. Now, suppose that d is any common divisor of a and b. That is, a = dm and b = dn for some m, n Z. Then we have: c = au + bv = dmu + dnv = d(mu + nv). Therefore, d c. But c > 0, so d c. By the definition of gcd, c = gcd(a, b).
12 Relatively prime Definition Let a and b be integers. We say a and b are relatively prime provided that gcd(a, b) = 1. Example 70 is relatively prime to is not relatively prime to Any integer x is relatively prime to 1.
13 Using the theorem Greatest Common Divisor Corollary Given a, b Z, a and b are relatively prime if and only if there exist integers x and y such that ax + by = 1. Proof. Let a, b Z. Suppose a and b are relatively prime. By the definition of relatively prime, gcd(a, b) = 1. So, by the theorem, there exist integers x and y such that ax + by = 1. On the other hand, suppose that there exist integers x and y such that ax + by = 1. Then 1 is the smallest positive integer of the form ax + by (x, y Z). So, by the theorem, 1 = gcd(a, b). By the definition of relatively prime, a and b are relatively prime.
14 Using the corollary Theorem If m and n are relatively prime, and j Z, then m + jn and n are relatively prime. Proof. Suppose that m and n are relatively prime, and let j Z. By the corollary, there exist x, y Z such that: mx + ny = 1 mx + jnx + ny jnx = 1 (m + jn)x + n(y jx) = 1 So there exist z, w Z such that (m + jn)z + nw = 1; namely, z = x and w = y jx. Therefore m + jn and n are relatively prime.
15 Another example Greatest Common Divisor Proposition Let a, b, n be integers with n > 0. If ab 1 (mod n), then both a and b are relatively prime to n. Proof. Let a, b, n be integers with n > 0, and suppose ab 1 (mod n). By definition of, n (ab 1). So ab 1 = nk for some k Z. ab + n( k) = 1 Since b Z and k Z, the corollary implies that a and n are relatively prime. On the other hand, since a Z and k Z, the corollary implies that b and n are relatively prime. So both a and b are relatively prime to n.
5: The Integers (An introduction to Number Theory)
c Oksana Shatalov, Spring 2017 1 5: The Integers (An introduction to Number Theory) The Well Ordering Principle: Every nonempty subset on Z + has a smallest element; that is, if S is a nonempty subset
More informationNOTES ON INTEGERS. 1. Integers
NOTES ON INTEGERS STEVEN DALE CUTKOSKY The integers 1. Integers Z = {, 3, 2, 1, 0, 1, 2, 3, } have addition and multiplication which satisfy familar rules. They are ordered (m < n if m is less than n).
More informationChapter 5: The Integers
c Dr Oksana Shatalov, Fall 2014 1 Chapter 5: The Integers 5.1: Axioms and Basic Properties Operations on the set of integers, Z: addition and multiplication with the following properties: A1. Addition
More informationThe following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers:
Divisibility Euclid s algorithm The following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers: Divide the smaller number into the larger, and
More informationNOTES ON SIMPLE NUMBER THEORY
NOTES ON SIMPLE NUMBER THEORY DAMIEN PITMAN 1. Definitions & Theorems Definition: We say d divides m iff d is positive integer and m is an integer and there is an integer q such that m = dq. In this case,
More information4 Powers of an Element; Cyclic Groups
4 Powers of an Element; Cyclic Groups Notation When considering an abstract group (G, ), we will often simplify notation as follows x y will be expressed as xy (x y) z will be expressed as xyz x (y z)
More informationNumber Theory Proof Portfolio
Number Theory Proof Portfolio Jordan Rock May 12, 2015 This portfolio is a collection of Number Theory proofs and problems done by Jordan Rock in the Spring of 2014. The problems are organized first by
More informationInduction. Induction. Induction. Induction. Induction. Induction 2/22/2018
The principle of mathematical induction is a useful tool for proving that a certain predicate is true for all natural numbers. It cannot be used to discover theorems, but only to prove them. If we have
More informationAll variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points.
Math 152, Problem Set 2 solutions (2018-01-24) All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. 1. Let us look at the following equation: x 5 1
More information1 Overview and revision
MTH6128 Number Theory Notes 1 Spring 2018 1 Overview and revision In this section we will meet some of the concerns of Number Theory, and have a brief revision of some of the relevant material from Introduction
More information(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.
Math 299 Midterm 2 Review Nov 4, 2013 Midterm Exam 2: Thu Nov 7, in Recitation class 5:00 6:20pm, Wells A-201. Topics 1. Methods of proof (can be combined) (a) Direct proof (b) Proof by cases (c) Proof
More informationEUCLID S ALGORITHM AND THE FUNDAMENTAL THEOREM OF ARITHMETIC after N. Vasiliev and V. Gutenmacher (Kvant, 1972)
Intro to Math Reasoning Grinshpan EUCLID S ALGORITHM AND THE FUNDAMENTAL THEOREM OF ARITHMETIC after N. Vasiliev and V. Gutenmacher (Kvant, 1972) We all know that every composite natural number is a product
More informationHomework #2 solutions Due: June 15, 2012
All of the following exercises are based on the material in the handout on integers found on the class website. 1. Find d = gcd(475, 385) and express it as a linear combination of 475 and 385. That is
More informationNotes on Systems of Linear Congruences
MATH 324 Summer 2012 Elementary Number Theory Notes on Systems of Linear Congruences In this note we will discuss systems of linear congruences where the moduli are all different. Definition. Given the
More informationPRACTICE PROBLEMS: SET 1
PRACTICE PROBLEMS: SET MATH 437/537: PROF. DRAGOS GHIOCA. Problems Problem. Let a, b N. Show that if gcd(a, b) = lcm[a, b], then a = b. Problem. Let n, k N with n. Prove that (n ) (n k ) if and only if
More informationNumber 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:
Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some z Z Notation: b Fact: for all, b, c Z:, 1, and 0 0 = 0 b and b c = c b and c = (b + c) b and b = ±b 1
More informationSome Facts from Number Theory
Computer Science 52 Some Facts from Number Theory Fall Semester, 2014 These notes are adapted from a document that was prepared for a different course several years ago. They may be helpful as a summary
More informationCS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II
CS 5319 Advanced Discrete Structure Lecture 9: Introduction to Number Theory II Divisibility Outline Greatest Common Divisor Fundamental Theorem of Arithmetic Modular Arithmetic Euler Phi Function RSA
More informationHomework 3, solutions
Homework 3, solutions Problem 1. Read the proof of Proposition 1.22 (page 32) in the book. Using simialr method prove that there are infinitely many prime numbers of the form 3n 2. Solution. Note that
More informationMATH FINAL EXAM REVIEW HINTS
MATH 109 - FINAL EXAM REVIEW HINTS Answer: Answer: 1. Cardinality (1) Let a < b be two real numbers and define f : (0, 1) (a, b) by f(t) = (1 t)a + tb. (a) Prove that f is a bijection. (b) Prove that any
More informationCSE20: Discrete Mathematics
Spring 2018 Today Greatest Common Divisor (GCD) Euclid s algorithm Proof of Correctness Reading: Chapter 4.3 Primes and GCD Universe: U = N = {0, 1, 2,...} a divides b (written a b) iff k.b = ak Set of
More informationRings and modular arithmetic
Chapter 8 Rings and modular arithmetic So far, we have been working with just one operation at a time. But standard number systems, such as Z, have two operations + and which interact. It is useful to
More informationDiscrete Mathematics with Applications MATH236
Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet
More informationArithmetic Algorithms, Part 1
Arithmetic Algorithms, Part 1 DPV Chapter 1 Jim Royer EECS January 18, 2019 Royer Arithmetic Algorithms, Part 1 1/ 15 Multiplication à la Français function multiply(a, b) // input: two n-bit integers a
More informationCOMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635
COMP239: Mathematics for Computer Science II Prof. Chadi Assi assi@ciise.concordia.ca EV7.635 The Euclidean Algorithm The Euclidean Algorithm Finding the GCD of two numbers using prime factorization is
More informationIntermediate Math Circles February 29, 2012 Linear Diophantine Equations I
Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I Diophantine equations are equations intended to be solved in the integers. We re going to focus on Linear Diophantine Equations.
More informationMATH10040 Chapter 1: Integers and divisibility
MATH10040 Chapter 1: Integers and divisibility Recall the basic definition: 1. Divisibilty Definition 1.1. If a, b Z, we say that b divides a, or that a is a multiple of b and we write b a if there is
More informationWriting Assignment 2 Student Sample Questions
Writing Assignment 2 Student Sample Questions 1. Let P and Q be statements. Then the statement (P = Q) ( P Q) is a tautology. 2. The statement If the sun rises from the west, then I ll get out of the bed.
More information2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.
2 Arithmetic This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}. (See [Houston, Chapters 27 & 28]) 2.1 Greatest common divisors Definition 2.16. If a, b are integers, we say
More informationDirect Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24
Direct Proof MAT231 Transition to Higher Mathematics Fall 2014 MAT231 (Transition to Higher Math) Direct Proof Fall 2014 1 / 24 Outline 1 Overview of Proof 2 Theorems 3 Definitions 4 Direct Proof 5 Using
More informationCS250: Discrete Math for Computer Science
CS250: Discrete Math for Computer Science L6: Euclid s Algorithm & Multiplicative Inverses Mod m Greatest Common Divisors, GCD If d a and d b then d is a common divisor of a and b. 1, 2, 3, and 6 are common
More informationThe Fundamental Theorem of Arithmetic
Chapter 1 The Fundamental Theorem of Arithmetic 1.1 Primes Definition 1.1. We say that p N is prime if it has just two factors in N, 1 and p itself. Number theory might be described as the study of the
More informationThis is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time.
8 Modular Arithmetic We introduce an operator mod. Let d be a positive integer. For c a nonnegative integer, the value c mod d is the remainder when c is divided by d. For example, c mod d = 0 if and only
More informationElementary Number Theory
Elementary Number Theory CIS002-2 Computational Alegrba and Number Theory David Goodwin david.goodwin@perisic.com 09:00, Tuesday 25 th October 2011 Contents 1 Some definitions 2 Divisibility Divisors Euclid
More informationINTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.
INTEGERS PETER MAYR (MATH 2001, CU BOULDER) In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes. 1. Divisibility Definition. Let a, b
More informationChapter 2. Divisibility. 2.1 Common Divisors
Chapter 2 Divisibility 2.1 Common Divisors Definition 2.1.1. Let a and b be integers. A common divisor of a and b is any integer that divides both a and b. Suppose that a and b are not both zero. By Proposition
More information8 Primes and Modular Arithmetic
8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.
More information2. THE EUCLIDEAN ALGORITHM More ring essentials
2. THE EUCLIDEAN ALGORITHM More ring essentials In this chapter: rings R commutative with 1. An element b R divides a R, or b is a divisor of a, or a is divisible by b, or a is a multiple of b, if there
More informationDo not open this exam until you are told to begin. You will have 75 minutes for the exam.
Math 2603 Midterm 1 Spring 2018 Your Name Student ID # Section Do not open this exam until you are told to begin. You will have 75 minutes for the exam. Check that you have a complete exam. There are 5
More informationNotes for Recitation 6
6.042/18.062J Mathematics for Computer Science February 18, 2005 Srini Devadas and Eric Lehman Notes for Recitation 6 1 The Pulverizer We saw in lecture that the greatest common divisor (GCD) of two numbers
More informationAlgorithms CMSC Basic algorithms in Number Theory: Euclid s algorithm and multiplicative inverse
Algorithms CMSC-27200 Basic algorithms in Number Theory: Euclid s algorithm and multiplicative inverse Instructor: László Babai Last updated 02-14-2015. Z denotes the set of integers. All variables in
More informationMATH 215 Final. M4. For all a, b in Z, a b = b a.
MATH 215 Final We will assume the existence of a set Z, whose elements are called integers, along with a well-defined binary operation + on Z (called addition), a second well-defined binary operation on
More informationMATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.
MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences. Congruences Let n be a postive integer. The integers a and b are called congruent modulo n if they have the same
More informationCISC-102 Winter 2016 Lecture 11 Greatest Common Divisor
CISC-102 Winter 2016 Lecture 11 Greatest Common Divisor Consider any two integers, a,b, at least one non-zero. If we list the positive divisors in numeric order from smallest to largest, we would get two
More informationElementary Algebra Chinese Remainder Theorem Euclidean Algorithm
Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm April 11, 2010 1 Algebra We start by discussing algebraic structures and their properties. This is presented in more depth than what we
More information2.2 Inverses and GCDs
34 CHAPTER 2. CRYPTOGRAPHY AND NUMBER THEORY 2.2 Inverses and GCDs 2.2.1 Inverses mod p In the last section we explored the multiplication in Z n. We saw in the special case with n =12 and a = 4 that if
More informationDivisibility. 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.
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
More informationChapter 5.1: Induction
Chapter.1: Induction Monday, July 1 Fermat s Little Theorem Evaluate the following: 1. 1 (mod ) 1 ( ) 1 1 (mod ). (mod 7) ( ) 8 ) 1 8 1 (mod ). 77 (mod 19). 18 (mod 1) 77 ( 18 ) 1 1 (mod 19) 18 1 (mod
More informationNumber Theory and Graph Theory. Prime numbers and congruences.
1 Number Theory and Graph Theory Chapter 2 Prime numbers and congruences. By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com 2 Module-1:Primes
More informationThe Euclidean Algorithm
MATH 324 Summer 2006 Elementary Number Theory Notes on the Euclidean Algorithm Department of Mathematical and Statistical Sciences University of Alberta The Euclidean Algorithm Given two positive integers
More informationIntermediate Math Circles February 26, 2014 Diophantine Equations I
Intermediate Math Circles February 26, 2014 Diophantine Equations I 1. An introduction to Diophantine equations A Diophantine equation is a polynomial equation that is intended to be solved over the integers.
More informationProof 1: Using only ch. 6 results. Since gcd(a, b) = 1, we have
Exercise 13. Consider positive integers a, b, and c. (a) Suppose gcd(a, b) = 1. (i) Show that if a divides the product bc, then a must divide c. I give two proofs here, to illustrate the different methods.
More informationApplied Cryptography and Computer Security CSE 664 Spring 2017
Applied Cryptography and Computer Security Lecture 11: Introduction to Number Theory Department of Computer Science and Engineering University at Buffalo 1 Lecture Outline What we ve covered so far: symmetric
More informationdownload instant at
2 CRYPTOGRAPHY AND NUMBER THEORY 2.1 CRYPTOGRAPHY AND MODULAR ARITHMETIC Pages 54 to 56 Problem 1 Problem 2 Problem 3 Problem 4 14 mod 9 = 5; 1 mod 9 = 8; 11 mod 9 = 7. KHUH LV D PHVVDJH. EBOB FP X JBPPXDB.
More informationSolutions Math 308 Homework 9 11/20/2018. Throughout, let a, b, and c be non-zero integers.
Throughout, let a, b, and c be non-zero integers. Solutions Math 308 Homework 9 11/20/2018 1. Consider the following statements: i. a is divisible by 3; ii. a is divisible by 9; iii. a is divisible by
More informationFinite Fields. Mike Reiter
1 Finite Fields Mike Reiter reiter@cs.unc.edu Based on Chapter 4 of: W. Stallings. Cryptography and Network Security, Principles and Practices. 3 rd Edition, 2003. Groups 2 A group G, is a set G of elements
More informationChapter 1. Greatest common divisor. 1.1 The division theorem. In the beginning, there are the natural numbers 0, 1, 2, 3, 4,...,
Chapter 1 Greatest common divisor 1.1 The division theorem In the beginning, there are the natural numbers 0, 1, 2, 3, 4,..., which constitute the set N. Addition and multiplication are binary operations
More informationPart V. Chapter 19. Congruence of integers
Part V. Chapter 19. Congruence of integers Congruence modulo m Let m be a positive integer. Definition. Integers a and b are congruent modulo m if and only if a b is divisible by m. For example, 1. 277
More informationM381 Number Theory 2004 Page 1
M81 Number Theory 2004 Page 1 [[ Comments are written like this. Please send me (dave@wildd.freeserve.co.uk) details of any errors you find or suggestions for improvements. ]] Question 1 20 = 2 * 10 +
More informationMATH 145 Algebra, Solutions to Assignment 4
MATH 145 Algebra, Solutions to Assignment 4 1: a) Find the inverse of 178 in Z 365. Solution: We find s and t so that 178s + 365t = 1, and then 178 1 = s. The Euclidean Algorithm gives 365 = 178 + 9 178
More informationa = qb + r where 0 r < b. Proof. We first prove this result under the additional assumption that b > 0 is a natural number. Let
2. Induction and the division algorithm The main method to prove results about the natural numbers is to use induction. We recall some of the details and at the same time present the material in a different
More informationWORKSHEET MATH 215, FALL 15, WHYTE. We begin our course with the natural numbers:
WORKSHEET MATH 215, FALL 15, WHYTE We begin our course with the natural numbers: N = {1, 2, 3,...} which are a subset of the integers: Z = {..., 2, 1, 0, 1, 2, 3,... } We will assume familiarity with their
More informationMat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013
Fall 2013 Student Responsibilities Reading: Textbook, Section 3.7, 4.1, & 5.2 Assignments: Sections 3.6, 3.7, 4.1 Proof Worksheets Attendance: Strongly Encouraged Overview 3.6 Integers and Algorithms 3.7
More informationLecture 4: Number theory
Lecture 4: Number theory Rajat Mittal IIT Kanpur In the next few classes we will talk about the basics of number theory. Number theory studies the properties of natural numbers and is considered one of
More informationChapter 5. Number Theory. 5.1 Base b representations
Chapter 5 Number Theory The material in this chapter offers a small glimpse of why a lot of facts that you ve probably nown and used for a long time are true. It also offers some exposure to generalization,
More informationDiscrete Mathematics GCD, LCM, RSA Algorithm
Discrete Mathematics GCD, LCM, RSA Algorithm Abdul Hameed http://informationtechnology.pk/pucit abdul.hameed@pucit.edu.pk Lecture 16 Greatest Common Divisor 2 Greatest common divisor The greatest common
More informationContradiction MATH Contradiction. Benjamin V.C. Collins, James A. Swenson MATH 2730
MATH 2730 Contradiction Benjamin V.C. Collins James A. Swenson Contrapositive The contrapositive of the statement If A, then B is the statement If not B, then not A. A statement and its contrapositive
More informationStudent Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd()
Student Responsibilities Week 8 Mat 2345 Week 8 Reading: Textbook, Section 3.7, 4.1, & 5.2 Assignments: Sections 3.6, 3.7, 4.1 Induction Proof Worksheets Attendance: Strongly Encouraged Fall 2013 Week
More informationChapter 1 A Survey of Divisibility 14
Chapter 1 A Survey of Divisibility 14 SECTION C Euclidean Algorithm By the end of this section you will be able to use properties of the greatest common divisor (gcd) obtain the gcd using the Euclidean
More informationElementary Properties of the Integers
Elementary Properties of the Integers 1 1. Basis Representation Theorem (Thm 1-3) 2. Euclid s Division Lemma (Thm 2-1) 3. Greatest Common Divisor 4. Properties of Prime Numbers 5. Fundamental Theorem of
More informationElementary Number Theory Review. Franz Luef
Elementary Number Theory Review Principle of Induction Principle of Induction Suppose we have a sequence of mathematical statements P(1), P(2),... such that (a) P(1) is true. (b) If P(k) is true, then
More informationCSE 311 Lecture 13: Primes and GCD. Emina Torlak and Kevin Zatloukal
CSE 311 Lecture 13: Primes and GCD Emina Torlak and Kevin Zatloukal 1 Topics Modular arithmetic applications A quick wrap-up of Lecture 12. Primes Fundamental theorem of arithmetic, Euclid s theorem, factoring.
More informationCarmen s Core Concepts (Math 135)
Carmen s Core Concepts (Math 135) Carmen Bruni University of Waterloo Week 4 1 Principle of Mathematical Induction 2 Example 3 Base Case 4 Inductive Hypothesis 5 Inductive Step When Induction Isn t Enough
More informationcse 311: foundations of computing Spring 2015 Lecture 12: Primes, GCD, applications
cse 311: foundations of computing Spring 2015 Lecture 12: Primes, GCD, applications casting out 3s Theorem: A positive integer n is divisible by 3 if and only if the sum of its decimal digits is divisible
More informationMa/CS 6a Class 2: Congruences
Ma/CS 6a Class 2: Congruences 1 + 1 5 (mod 3) By Adam Sheffer Reminder: Public Key Cryptography Idea. Use a public key which is used for encryption and a private key used for decryption. Alice encrypts
More informationKnow the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.
The first exam will be on Monday, June 8, 202. The syllabus will be sections. and.2 in Lax, and the number theory handout found on the class web site, plus the handout on the method of successive squaring
More information1. multiplication is commutative and associative;
Chapter 4 The Arithmetic of Z In this chapter, we start by introducing the concept of congruences; these are used in our proof (going back to Gauss 1 ) that every integer has a unique prime factorization.
More informationMONOALPHABETIC CIPHERS AND THEIR MATHEMATICS. CIS 400/628 Spring 2005 Introduction to Cryptography
MONOALPHABETIC CIPHERS AND THEIR MATHEMATICS CIS 400/628 Spring 2005 Introduction to Cryptography This is based on Chapter 1 of Lewand and Chapter 1 of Garrett. MONOALPHABETIC SUBSTITUTION CIPHERS These
More informationMath Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions
Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions Warm-up Problems 1. What is a prime number? Give an example of an even prime number and an odd prime number. A prime number
More informationSummary: Divisibility and Factorization
Summary: Divisibility and Factorization One of the main subjects considered in this chapter is divisibility of integers, and in particular the definition of the greatest common divisor Recall that we have
More informationThe Chinese Remainder Theorem
Sacred Heart University DigitalCommons@SHU Academic Festival Apr 20th, 9:30 AM - 10:45 AM The Chinese Remainder Theorem Nancirose Piazza Follow this and additional works at: http://digitalcommons.sacredheart.edu/acadfest
More informationWorst-case analysis of Weber s GCD algorithm
Information Processing Letters 72 (1999) 125 130 Worst-case analysis of Weber s GCD algorithm Christian Lavault, S. Mohamed Sedjelmaci LIPN, Université Paris-Nord, 93430 Villetaneuse, France Received 30
More information1. Factorization Divisibility in Z.
8 J. E. CREMONA 1.1. Divisibility in Z. 1. Factorization Definition 1.1.1. Let a, b Z. Then we say that a divides b and write a b if b = ac for some c Z: a b c Z : b = ac. Alternatively, we may say that
More informationA SURVEY OF PRIMALITY TESTS
A SURVEY OF PRIMALITY TESTS STEFAN LANCE Abstract. In this paper, we show how modular arithmetic and Euler s totient function are applied to elementary number theory. In particular, we use only arithmetic
More informationCPSC 467b: Cryptography and Computer Security
CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 8 February 1, 2012 CPSC 467b, Lecture 8 1/42 Number Theory Needed for RSA Z n : The integers mod n Modular arithmetic GCD Relatively
More informationHomework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4
Do the following exercises from the text: Chapter (Section 3):, 1, 17(a)-(b), 3 Prove that 1 3 + 3 + + n 3 n (n + 1) for all n N Proof The proof is by induction on n For n N, let S(n) be the statement
More informationFinal Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is
1. Describe the elements of the set (Z Q) R N. Is this set countable or uncountable? Solution: The set is equal to {(x, y) x Z, y N} = Z N. Since the Cartesian product of two denumerable sets is denumerable,
More informationa the relation arb is defined if and only if = 2 k, k
DISCRETE MATHEMATICS Past Paper Questions in Number Theory 1. Prove that 3k + 2 and 5k + 3, k are relatively prime. (Total 6 marks) 2. (a) Given that the integers m and n are such that 3 (m 2 + n 2 ),
More informationNumber Theory Solutions Packet
Number Theory Solutions Pacet 1 There exist two distinct positive integers, both of which are divisors of 10 10, with sum equal to 157 What are they? Solution Suppose 157 = x + y for x and y divisors of
More informationCh 4.2 Divisibility Properties
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:
More informationCISC-102 Fall 2017 Week 6
Week 6 page 1! of! 15 CISC-102 Fall 2017 Week 6 We will see two different, yet similar, proofs that there are infinitely many prime numbers. One proof would surely suffice. However, seeing two different
More information2x 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?
Chapter 3: Theory of Modular Arithmetic 25 SECTION C Solving Linear Congruences By the end of this section you will be able to solve congruence equations determine the number of solutions find the multiplicative
More information12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z.
Math 3, Fall 010 Assignment 3 Solutions Exercise 1. Find all the integral solutions of the following linear diophantine equations. Be sure to justify your answers. (i) 3x + y = 7. (ii) 1x + 18y = 50. (iii)
More informationIntroduction to Cryptography CS 355 Lecture 3
Introduction to Cryptography CS 355 Lecture 3 Elementary Number Theory (1) CS 355 Fall 2005/Lecture 3 1 Review of Last Lecture Ciphertext-only attack: Known-plaintext attack: Chosen-plaintext: Chosen-ciphertext:
More informationMath 412, Introduction to abstract algebra. Overview of algebra.
Math 412, Introduction to abstract algebra. Overview of algebra. A study of algebraic objects and functions between them; an algebraic object is typically a set with one or more operations which satisfies
More informationDivisibility in the Fibonacci Numbers. Stefan Erickson Colorado College January 27, 2006
Divisibility in the Fibonacci Numbers Stefan Erickson Colorado College January 27, 2006 Fibonacci Numbers F n+2 = F n+1 + F n n 1 2 3 4 6 7 8 9 10 11 12 F n 1 1 2 3 8 13 21 34 89 144 n 13 14 1 16 17 18
More informationLecture Notes. Advanced Discrete Structures COT S
Lecture Notes Advanced Discrete Structures COT 4115.001 S15 2015-01-13 Recap Divisibility Prime Number Theorem Euclid s Lemma Fundamental Theorem of Arithmetic Euclidean Algorithm Basic Notions - Section
More informationLecture Notes 1 Basic Concepts of Mathematics MATH 352
Lecture Notes 1 Basic Concepts of Mathematics MATH 352 Ivan Avramidi New Mexico Institute of Mining and Technology Socorro, NM 87801 June 3, 2004 Author: Ivan Avramidi; File: absmath.tex; Date: June 11,
More informationHomework 7 solutions M328K by Mark Lindberg/Marie-Amelie Lawn
Homework 7 solutions M328K by Mark Lindberg/Marie-Amelie Lawn Problem 1: 4.4 # 2:x 3 + 8x 2 x 1 0 (mod 1331). a) x 3 + 8x 2 x 1 0 (mod 11). This does not break down, so trial and error gives: x = 0 : f(0)
More informationCSE 311: Foundations of Computing. Lecture 12: Two s Complement, Primes, GCD
CSE 311: Foundations of Computing Lecture 12: Two s Complement, Primes, GCD n-bit Unsigned Integer Representation Represent integer as sum of powers of 2: If 2 where each {0,1} then representation is b
More information