Overview of Number Theory Basics. Divisibility


 Adam Dickerson
 1 years ago
 Views:
Transcription
1 Overview of Number Theory Basics Murat Kantarcioglu Based on Prof. Ninghui Li s Slides Divisibility Definition Given integers a and b, b 0, b divides a (denoted b a) if integer c, s.t. a = cb. b is called a divisor of a. (Transitivity) Given integers a, b, c, all >, with a b and b c, then a c. Proof: a b => m s.t. ma = b b c => n s.t. nb = c, nma = c, We obtain that q = mn, s.t c = aq, so a c
2 Divisibility (cont.) Given integers a, b, c, x, y all >, with a b and a c, then a bx + cy. Proof: a b => m s.t. ma = b a c => n s.t. na = c bx + cy = a(mx + ny), therefore a bx +cy Divisibility (cont.) (Division algorithm) Given integers a,b such that a>0, a<b then there exist two unique integers q and r, 0 r < a s.t. b = aq + r. Proof: Uniqueness of q and r: assume q and r s.t b = aq + r, 0 r < a, q integer then aq + r=aq + r a(qq )=r r qq = (r r)/a as 0 r,r <a a < (r r) < a  < (r r)/a < So  < qq <, but qq is integer, therefore q = q and r = r 2
3 Prime and Composite Numbers Definition An integer n > is called a prime number if its positive divisors are and n. Definition Any integer number n > that is not prime, is called a composite number. Example Prime numbers: 2, 3, 5, 7,, 3,7 Composite numbers: 4, 6, 25, 900, 7778, Decomposition in Product of Primes (Fundamental of Arithmetic) Any integer number n > can be written as a product of prime numbers (>), and the product is unique if the numbers are written in increasing order. e e 2 2 n = p p... p ek k Example: 84 =
4 Greatest Common Divisor (GCD) Definition Given integers a > 0 and b > 0, we define gcd(a, b) = c, the greatest common divisor (GCD), as the greatest number that divides both a and b. Example gcd(256, 00)=4 Definition Two integers a > 0 and b > 0 are relatively prime if gcd(a, b) =. Example 25 and 28 are relatively prime. Given where p i are prime numbers then GCD using Prime Decomposition e f e 2 2 f2 2 n = p p... p m = p p... p ek k k f k and then gcd(n,m) = p min(e, f ) p 2 min(e 2, f 2 )...p k min(e k, f k ) Example: 84= = gcd(84,90)=
5 GCD as a Linear Combination Given integers a, b > 0 and a > b, then d = gcd(a,b) is the least positive integer that can be represented as ax + by, x, y integer numbers. Proof: Let t be the smallest integer, t = ax + by d a and d b d ax + by, so d t. We now show t d. First t a; otherwise, a = tu + r, 0 < r < t; r = a  ut = a  u(ax+by) = a(ux) + b(uy), so we found another linear combination and r < t. Contradiction. Similarly t b, so t is a common divisor of a and b, thus t gcd (a, b) = d. So t = d. Example gcd(00, 36) = 4 = = GCD and Multiplication Given integers a, b, m >. If gcd(a, m) = gcd(b, m) =, then gcd(ab, m) = Proof idea: ax + ym = = bz + tm Find u and v such that (ab)u + mv = 5
6 GCD and Division If g = gcd(a, b), where a > b, then gcd (a/g, b/g) = (a/g and b/g are relatively prime). Proof: Assume gcd(a/g, b/g) = d, then a/g = md and b/g = nd. a = gmd and b = gnd, therefore gd a and gd b Therefore gdg, d, so d =. Example gcd(00, 36) = 4 gcd (00/4, 36/4) = gcd(25, 9) = GCD and Division Given integers a>0, b, q, r, such that b = aq + r, then gcd(b, a) = gcd(a, r). Proof: Let gcd(b, a) = d and gcd(a, r) = e, this means d b and d a, so d b  aq, so d r Since gcd(a, r) = e, we obtain d e. e a and e r, so e aq + r, so e b, Since gcd(b, a) = d, we obtain e d. Therefore d = e 6
7 Finding GCD Using the : Given integers a>0, b, q, r, such that b = aq + r, then gcd(b, a) = gcd(a, r). Euclidian Algorithm Find gcd (b, a) while a 0 do return a r b mod a b a a r Euclidian Algorithm Example Find gcd(43, 0) 43 = = = gcd (43, 0) = 7
8 Towards Extended Euclidian Algorithm : Given integers a, b > 0 and a > b, then d = gcd(a,b) is the least positive integer that can be represented as ax + by, x, y integer numbers. How to find such x and y? If a and b are relative prime, then there exist x and y such that ax + by =. In other words, ax mod b =. Euclidian Algorithm Example Find gcd(43, ) 43 = + 32 = = = gcd (43, ) = 32 = 43 5 = 3 32 = = = = =
9 Extended Euclidian Algorithm x=; y=0; d=a; r=0; s=; t=b; while (t>0) { } q = d/t u=xqr; v=yqs; w=dqt x=r; y=s; d=t r=u; s=v; t=w return (d, x, y) Invariants: ax + by = d ar + bs = t Equivalence Relation Definition A relation is defined as any subset of a cartesian product. We denote a relation (a,b) R as arb, a A and b B. Definition A relation is an equivalence relation on a set S, if R is Reflexive: ara for all a R Symmetric: for all a, b R, arb bra. Transitive: for all a,b,c R, arb and brc arc Example = is an equivalence relation on N 9
10 Definition: Modulo Operation a modn = r q,s.t. a = q n+ r Example: 7 mod 3 = 7 mod 3 = 2 Definition (Congruence): where 0 r n a b mod n a mod n = b mod n Congruence Relation Congruence mod n is an equivalence relation: Reflexive: a a (mod n) Symmetric: a b(mod n) iff b a mod n. Transitive: a b(mod n) and b c(mod n) a c(mod n) 0
11 Congruence Relation Properties ) If a b (mod n) and c d (mod n), then: a ± c b ± d (mod n) and ac bd (mod n) 2) If a b (mod n) and d n then: a b (mod d) Reduced Set of Residues Definition: A reduced set of residues (RSR) modulo m is a set of integers R each relatively prime to m, so that every integer relatively prime to m is congruent to exactly one integer in R.
12 The group (Z n *, ) Z n * consists of all integers in [..n] that are relative prime to n Z n * = { a a n and gcd(a,n)= } is a reduced set of residues modulo n (Z n *, ) is a group gcd(a,n)= and gcd(b,n)= gcd(ab, n)= given a Z n *, how to compute a ? Linear Equation Modulo If gcd(a, n) =, the equation has a unique solution, 0< x < n ax mod n Proof Idea: if ax (mod n) and ax 2 (mod n), then a(x x 2 ) 0 (mod n), then n a(x x 2 ), then n (x x 2 ), then x x 2 =0 2
13 Linear Equation Modulo (cont.) If gcd(a, n) =, the equation has a solution. ax b mod n Proof Idea: x = a  b mod n Chinese Reminder (CRT) Let n, n 2,,,, n k be integers s.t. gcd(n i, n j ) =, i j. x a x... x There exists a unique solution modulo n = n n 2 n k a 2 mod mod n n 2 a k mod n k 3
14 Proof of CMT Consider the function χ: Z n Z n Z n2 Z nk χ(x) = (x mod n,, x mod n k ) We need to prove that χ is a bijection. For i k, define m i = n / n i, then gcd(m i,n i )= For i k, define y i = m  i mod n i Define function ρ(a,a2,,ak) = Σ a i m i y i mod n a i m i y i a i (mod n i ) a i m i y i 0 (mod n j ) where i j Proof of CMT Example of the mappings: n =3, n 2 =5, n=5 χ: ρ: m =5, y =2, m y =0, m 2 y 2 =6, (,) (,) (2,2) (,2) (,4) (,3) (,2) (,4) (2,3) (2,) 20+6 (2,) (2,2) (,3) (2,3) (2,4) (2,4)
15 Example of CMT: n =7, n 2 =, n 3 =3, n=00 m =43, m 2 =9, m 3 =77 y =43  mod 7 = 3  mod 7 = 5 y 2 =9  mod = 3  mod = 4 x 5 (mod 7) x 3 (mod ) x 0 (mod 3) y 3 =77  mod 3 = 2  mod 3 = 2 x=( ) mod 00 = 3907 mod 00 = 894 The Euler Phi Function Definition Given an integer n, Φ(n) = Z n * is the number of all numbers a such that 0 < a < n and a is relatively prime to n (i.e., gcd(a, n)=). : If gcd(m,n) =, Φ(mn) = Φ(m) Φ(n) 5
16 The Euler Phi Function : Formula for Φ(n) Let p be prime, e, m, n be positive integers ) Φ(p) = p 2) Φ(p e ) = p e p e e e2 ek 3) If n = p p... p then 2 Φ( n) = n( k )( p )...( p p 2 k ) Fermat s Little Fermat s Little If p is a prime number and a is a natural number that is not a multiple of p, then a p (mod p) Proof idea: gcd(a, p) =, then the set { i*a mod p} 0< i < p is a permutation of the set {,, p}.(otherwise we have 0<n<m<p s.t. ma mod p = na mod p p (ma  na) p (mn), where 0<mn < p ) a * 2a * *(p)a = (p)! a p (p)! (mod p) Since gcd((p)!, p) =, we obtain a p (mod p) 6
17 Consequence of Fermat s  p is a prime number and  a, e and f are positive numbers  e f mod p and  p does not divide a, then a e a f (mod p) Proof idea: a e = a q(p) + f = a f (a (p) ) q by applying Fermat s theorem we obtain a e a f (mod p) Euler s Euler s Given integer n >, such that gcd(a, n) = then a Φ(n) (mod n) Corollary Given integer n >, such that gcd(a, n) = then a Φ(n) mod n is a multiplicative inverse of a mod n. Corollary Given integer n >, x, y, and a positive integers with gcd(a, n) =. If x y (mod Φ(n)), then a x a y (mod n). 7
18 Prime number distribution and testing RSA Efficiency of modular arithmetic Next 8
= 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
More informationAn 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
More informationAlgebra & Number Theory. A. Baker
Algebra & Number Theory [0/0/2009] A. Baker Department of Mathematics, University of Glasgow. Email address: a.baker@maths.gla.ac.uk URL: http://www.maths.gla.ac.uk/ ajb Contents Chapter. Basic Number
More information
Number Theory Naoki Sato
Number Theory Naoki Sato 0 Preface This set of notes on number theory was originally written in 1995 for students at the IMO level. It covers the basic background material
More information2 Polynomials over a field
2 Polynomials over a field A polynomial over a field F is a sequence (a 0, a 1, a 2,, a n, ) where a i F i with a i = 0 from some point on a i is called the i th coefficient of f We define three special
More informationElementary Number Theory: Primes, Congruences, and Secrets
This is age i Printer: Oaque this Elementary Number Theory: Primes, Congruences, and Secrets William Stein November 16, 2011 To my wife Clarita Lefthand v vi Contents This is age vii Printer: Oaque this
More informationIntroduction to finite fields and their applications
Introduction to finite fields and their applications RUDOLF LIDL University of Tasmania, Hobart, Australia HARALD NIEDERREITER Austrian Academy of Sciences. Vienna, Austria ree'wi d18e U,l,muy of W, t
More informationSolutions to Homework 6 Mathematics 503 Foundations of Mathematics Spring 2014
Solutions to Homework 6 Mathematics 503 Foundations of Mathematics Spring 2014 3.4: 1. If m is any integer, then m(m + 1) = m 2 + m is the product of m and its successor. That it to say, m 2 + m is the
More information(0, 0) : order 1; (0, 1) : order 4; (0, 2) : order 2; (0, 3) : order 4; (1, 0) : order 2; (1, 1) : order 4; (1, 2) : order 2; (1, 3) : order 4.
11.01 List the elements of Z 2 Z 4. Find the order of each of the elements is this group cyclic? Solution: The elements of Z 2 Z 4 are: (0, 0) : order 1; (0, 1) : order 4; (0, 2) : order 2; (0, 3) : order
More informationA number field is a field of finite degree over Q. By the Primitive Element Theorem, any number
Number Fields Introduction A number field is a field of finite degree over Q. By the Primitive Element Theorem, any number field K = Q(α) for some α K. The minimal polynomial Let K be a number field and
More informationRevised 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.
More informationTHE CONGRUENT NUMBER PROBLEM
THE CONGRUENT NUMBER PROBLEM KEITH CONRAD 1. Introduction A right triangle is called rational when its legs and hypotenuse are all rational numbers. Examples of rational right triangles include Pythagorean
More informationDoug Ravenel. October 15, 2008
Doug Ravenel University of Rochester October 15, 2008 s about Euclid s Some s about primes that every mathematician should know (Euclid, 300 BC) There are infinitely numbers. is very elementary, and we
More informationNUMBER RINGS. P. Stevenhagen
NUMBER RINGS P. Stevenhagen Universiteit Leiden 2012 Date of this online version: September 24, 2012 Please send any comments on this text to psh@math.leidenuniv.nl. Mail address of the author: P. Stevenhagen
More information8430 HANDOUT 3: ELEMENTARY THEORY OF QUADRATIC FORMS
8430 HANDOUT 3: ELEMENTARY THEORY OF QUADRATIC FORMS PETE L. CLARK 1. Basic definitions An integral binary quadratic form is just a polynomial f = ax 2 + bxy + cy 2 with a, b, c Z. We define the discriminant
More informationYou know from calculus that functions play a fundamental role in mathematics.
CHPTER 12 Functions You know from calculus that functions play a fundamental role in mathematics. You likely view a function as a kind of formula that describes a relationship between two (or more) quantities.
More informationAlgebraic Number Theory
Algebraic Number Theory Johan Bosman Notes by Florian Bouyer Copyright (C) Bouyer 011 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation
More informationThe Singular Value Decomposition in Symmetric (Löwdin) Orthogonalization and Data Compression
The Singular Value Decomposition in Symmetric (Löwdin) Orthogonalization and Data Compression The SVD is the most generally applicable of the orthogonaldiagonalorthogonal type matrix decompositions Every
More informationDEFINITION 5.1.1 A complex number is a matrix of the form. x y. , y x
Chapter 5 COMPLEX NUMBERS 5.1 Constructing the complex numbers One way of introducing the field C of complex numbers is via the arithmetic of matrices. DEFINITION 5.1.1 A complex number is a matrix of
More informationPRIMES is in P. Manindra Agrawal Neeraj Kayal Nitin Saxena
PRIMES is in P Manindra Agrawal Neeraj Kayal Nitin Saxena Department of Computer Science & Engineering Indian Institute of Technology Kanpur Kanpur208016, INDIA Email: {manindra,kayaln,nitinsa}@iitk.ac.in
More informationODD PERFECT NUMBERS ARE GREATER THAN 10 1500
MATHEMATICS OF COMPUTATION Volume 00, Number 0, Pages 000 000 S 00255718(XX)00000 ODD PERFECT NUMBERS ARE GREATER THAN 10 1500 PASCAL OCHEM AND MICHAËL RAO Abstract. Brent, Cohen, and te Riele proved
More informationLectures on the Dirichlet Class Number Formula for Imaginary Quadratic Fields. Tom Weston
Lectures on the Dirichlet Class Number Formula for Imaginary Quadratic Fields Tom Weston Contents Introduction 4 Chater 1. Comlex lattices and infinite sums of Legendre symbols 5 1. Comlex lattices 5
More informationMEP Y9 Practice Book A
1 Base Arithmetic 1.1 Binary Numbers We normally work with numbers in base 10. In this section we consider numbers in base 2, often called binary numbers. In base 10 we use the digits 0, 1, 2, 3, 4, 5,
More informationElliptic Modular Forms and Their Applications
Elliptic Modular Forms and Their Applications Don Zagier MaxPlanckInstitut für Mathematik, Vivatsgasse 7, 53111 Bonn, Germany Email: zagier@mpimbonn.mpg.de Foreword These notes give a brief introduction
More informationCritical points of once continuously differentiable functions are important because they are the only points that can be local maxima or minima.
Lecture 0: Convexity and Optimization We say that if f is a once continuously differentiable function on an interval I, and x is a point in the interior of I that x is a critical point of f if f (x) =
More informationA Method for Obtaining Digital Signatures and PublicKey Cryptosystems
A Method for Obtaining Digital Signatures and PublicKey Cryptosystems R.L. Rivest, A. Shamir, and L. Adleman Abstract An encryption method is presented with the novel property that publicly revealing
More informationSome Basic Techniques of Group Theory
Chapter 5 Some Basic Techniques of Group Theory 5.1 Groups Acting on Sets In this chapter we are going to analyze and classify groups, and, if possible, break down complicated groups into simpler components.
More informationRandom matchings which induce Hamilton cycles, and hamiltonian decompositions of random regular graphs
Random matchings which induce Hamilton cycles, and hamiltonian decompositions of random regular graphs Jeong Han Kim Microsoft Research One Microsoft Way Redmond, WA 9805 USA jehkim@microsoft.com Nicholas
More informationA SELFGUIDE TO OMINIMALITY
A SELFGUIDE TO OMINIMALITY CAMERINO TUTORIAL JUNE 2007 Y. PETERZIL, U. OF HAIFA 1. How to read these notes? These notes were written for the tutorial in the Camerino Modnet Summer school. The main source
More informationProperties of BMO functions whose reciprocals are also BMO
Properties of BMO functions whose reciprocals are also BMO R. L. Johnson and C. J. Neugebauer The main result says that a nonnegative BMOfunction w, whose reciprocal is also in BMO, belongs to p> A p,and
More information