A p-adic Euclidean Algorithm

Similar documents
4 Powers of an Element; Cyclic Groups

The Euclidean Algorithm and Multiplicative Inverses

NOTES ON SIMPLE NUMBER THEORY

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

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES

Ch 4.2 Divisibility Properties

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

5: The Integers (An introduction to Number Theory)

2. THE EUCLIDEAN ALGORITHM More ring essentials

Elementary Properties of the Integers

Solutions, Project on p-adic Numbers, Real Analysis I, Fall, 2010.

p-adic Continued Fractions

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

Modular Arithmetic Instructor: Marizza Bailey Name:

Introduction to Arithmetic Geometry Fall 2013 Lecture #5 09/19/2013

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

Math 109 HW 9 Solutions

A Division Algorithm Approach to p-adic Sylvester Expansions

Integers and Division

Chapter 5: The Integers

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

a = a i 2 i a = All such series are automatically convergent with respect to the standard norm, but note that this representation is not unique: i<0

QUOTIENTS OF FIBONACCI NUMBERS

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

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

MATH FINAL EXAM REVIEW HINTS

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

Contribution of Problems

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

Some Facts from Number Theory

1 Overview and revision

Algebraic Number Theory Notes: Local Fields

Algebra for error control codes

February 1, 2005 INTRODUCTION TO p-adic NUMBERS. 1. p-adic Expansions

Notes on Systems of Linear Congruences

Number Theory and Group Theoryfor Public-Key Cryptography

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

Finite Fields. Mike Reiter

1 Adeles over Q. 1.1 Absolute values

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

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

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

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

Lecture Notes. Advanced Discrete Structures COT S

LEGENDRE S THEOREM, LEGRANGE S DESCENT

MTH 310, Section 001 Abstract Algebra I and Number Theory. Sample Midterm 1

1. Factorization Divisibility in Z.

Basic Algebra. Final Version, August, 2006 For Publication by Birkhäuser Boston Along with a Companion Volume Advanced Algebra In the Series

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I

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

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

Beautiful Mathematics

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

a + bi by sending α = a + bi to a 2 + b 2. To see properties (1) and (2), it helps to think of complex numbers in polar coordinates:

Chapter 5. Number Theory. 5.1 Base b representations

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

The p-adic numbers. Given a prime p, we define a valuation on the rationals by

NOTES ON FINITE FIELDS

1 Absolute values and discrete valuations

Chapter 8. P-adic numbers. 8.1 Absolute values

The set of integers will be denoted by Z = {, -3, -2, -1, 0, 1, 2, 3, 4, }

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6

Algebraic function fields

Chapter 1 : The language of mathematics.

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013

Elementary Number Theory. Franz Luef

Intermediate Math Circles February 26, 2014 Diophantine Equations I

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd()

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

Chapter 3 Basic Number Theory

NUMBER THEORY AND CODES. Álvaro Pelayo WUSTL

Jeong-Hyun Kang Department of Mathematics, University of West Georgia, Carrollton, GA

3 The fundamentals: Algorithms, the integers, and matrices

Summary: Divisibility and Factorization

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION

ECEN 5022 Cryptography

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer.

Four Basic Sets. Divisors

Modular numbers and Error Correcting Codes. Introduction. Modular Arithmetic.

Lecture Notes Math 371: Algebra (Fall 2006) by Nathanael Leedom Ackerman

M381 Number Theory 2004 Page 1

Chapter 2. Divisibility. 2.1 Common Divisors

Number Theory, Algebra and Analysis. William Yslas Vélez Department of Mathematics University of Arizona

Part V. Chapter 19. Congruence of integers

CONGRUENT NUMBERS AND ELLIPTIC CURVES

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

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

Number Theory Notes Spring 2011

Contribution of Problems

Divisibility of Natural Numbers

Algorithmic number theory. Questions/Complaints About Homework? The division algorithm. Division

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

SEVENTH EDITION and EXPANDED SEVENTH EDITION

7. Prime Numbers Part VI of PJE

Applied Cryptography and Computer Security CSE 664 Spring 2017

Transcription:

A p-adic Euclidean Algorithm Cortney Lager Winona State University October 0, 009 Introduction The rational numbers can be completed with respect to the standard absolute value and this produces the real numbers However, there are other absolute values on the rationals besides the standard one Completing the rationals with respect to one of these produces the p-adic numbers In this paper, we take some basic number theory concepts and apply them to rational p-adic numbers Using these concepts, a p-adic division algorithm is developed along with a p-adic Euclidean Algorithm These algorithms produce a generalized greatest common divisor in the p-adics along with a p-adic simple continued fraction In Section, we describe the p-adic numbers, and in Section 3 we present our p- adic Division Algorithm and Euclidean Algorithm In Section 4, we show some applications, including a connection to Browkin s p-adic continued fractions, which motivatored our investigations in the first place Finally, in Section 5, we give some open questions for further study p-adic Numbers Since we will use different absolute value functions in this paper, to avoid confusion we will denote the standard absolute value as rather than For each prime p there exists an absolute value on the rationals p : Q Q defined by a = p v(b) v(a) b p where v(n) is the number of times p divides the integer n Also 0 p = 0 This is called a p-adic absolute value, and in the context of measuring the size of a number (ie its distance to zero), it states that the more a rational number is divisible by p, the smaller it is For example, 6 3 = 3 4 < 5 7 = 3 3 3 So 6 is smaller than 5 7 in the 3-adics

Completing the rationals with respect to the p-adic absolute value yields Q p, the p-adic numbers Let p be an odd prime for the remainder of the paper Then there are a few different ways to think about p-adic numbers ([],[3], [4], [5]) but for the purposes of this paper we will consider them in the following way Definition An element ζ Q p is a Laurent series in the odd prime p, ζ = c j p j = c m p m + c m+ p m+ + c m+ p m+ + () j=m where m is a (possibly negative) integer and c j { p,, p } Note that in the standard absolute value, the p-series in () would only converge if it had a finite number of terms However, under the p-adic absolute value, each term is in fact getting smaller, and it can be shown [3] that all such infinite Laurent series in p converge under the p-adic absolute value It s also worth noting that the rational numbers are a subset of the p-adics, although they are slightly disguised For example, / in the 7-adics is given by the power series 4 + 3 7 + 3 7 + 3 7 3 + Since the geometric series test still applies to the p-adic absolute value and to convergence in Q p, then it gives the following, ( ) 4 + 3 7 + 3 7 + 3 7 3 + = + 3 = 7 For the remainder of the paper we will use the fractional representation instead of the p-series for rationals elements of Q Q p Using the notation in (), we can define v(ζ) = m, thus ζ p = p m Further, every ζ Q p \{0} can be written as ζ = up ɛ, where ɛ = v(ζ) and u p = We also have the standard properties of a non-archimedean norm: ζ ζ p = ζ p ζ p and ζ + ζ p max( ζ p, ζ p ) The non-archimedean triangle inequality gives equality if ζ p ζ p 3 The p-adic Division Algorithm and Euclidean Algorithm Both the division algorithm and the Euclidean algorithm are elements of classical number theory With the goal of recreating the real aspects of classical number theory in the p-adics, we now re-invent these two important classical ] = { m p k algorithms Let Z [ p m, k Z addition and multiplication; in fact, it is a subring of Q } Notice that Z [ is closed under

Theorem (p-adic Division Algorithm) Let p be an odd prime Then given any σ and τ Q p where τ 0, there exists uniquely q Z [ with q < p, and η Q p with η p < τ p such that σ = qτ + η Proof If σ p < τ p, then let q = 0 and η=σ Otherwise, write σ=sp v(σ), τ=tp v(τ) where s p = t p = Let q = qp v(σ) v(τ), where q Z such that q st mod p v(τ) v(σ)+ and q < p v(τ) v(σ)+ / Then q < p Then let η = spv(σ) qtp v(τ) = (s qt)p v(σ) Thus, v(τ) + v(η) and therefore η p < τ p To prove uniqueness, suppose σ = τq + η = τq + η where q = m p k, and q = m p k Then, τ(q q ) = η η Thus, τ p q q p = τ(q q ) p = η η p max( η p, η p ) < τ p, which implies that p q q = m m Thus, p k+ m m However, since p k q q < p, then m m < p k+ Hence, m = m, q = q, and η = η Note in the proof of Theorem that if q 0, then in fact p q, and therefore v(q) = v(σ) v(τ) 0; that is q p Since we now have a division algorithm in the p-adics, we can iterate the process in a way similar to the classical Euclidean Algorithm Definition (p-adic Euclidean Algorithm) Let p be an odd prime The p-adic Euclidean Algorithm applied to σ and τ Q p and where τ 0 is as follows First, apply Theorem to σ and τ to produce σ = q τ + η () In each subsequent step shift to the left and apply Theorem again, τ = q η + η η = q 3 η + η 3 η i = q i η i + η i (3) This process either continues indefinitely or stops when η i = 0 The outputs of this algorithm are the sequences {q i } and {η i } When appropriate we will consider the inputs as σ = η and τ = η 0 3

Example The 7-adic Euclidean Algorithm applied to 865 and 0555 yields ( ) 0555 ) ( 9360 = () + 7 ( ) ( ) ( ) 9360 5 = 7 7 + 7 ( ) ( ) ( ) 0 5 5 7 + 7 74 ( ) ( ) ( ) 50 5 5 7 = 7 74 + 75 ( ) ( ) 5 7 75 + 0 865 0555 9360 7 = 5 5 74 = The algorithm stops since η 5 = 0 The outputs are the sequences { {q i } =, 7, 0 7, 50 7, } 7 and {η i } = { 9360 7, 5 7, 5 74, 5 } 75 Lemma Let η i be the outputs from the p-adic Euclidean Algorithm of σ = a b pv(σ) Q, τ = c d pv(τ) Q when a b and c d are in lowest terms Then lcm(b, d) η i Z [ Proof Let l = lcm(b, d) From multiplying through by l in (), la b pv(σ) = q lc d pv(τ) + lη Since la b pv(σ), q lc d pv(τ) Z [ ] p then lη Z [ Then, inductively lη i = q i lη i + lη i [ with lη i, q i lη i Z [ Thus, lηi Z Theorem Let p be an odd prime and σ, τ Q with τ 0 Then the p-adic Euclidean Algorithm applied to σ and τ has a finite number of steps Proof For all i such that q i, η i 0, write η i = h i p ɛ i and q i = c i p δ i where ɛ i = v(η i ), δ i = v(q i ), and h i p = c i p = Then we have the following (i) By Theorem and the note afterwards, v(q i ) = v(η i ) v(η i ) Thus δ i = ɛ i ɛ i (ii) Also, ɛ i ɛ i + which implies ɛ i > ɛ i, and p ] 4

(iii) c i < p δ i since c i p δ i < p Then by (3), h i = p ɛi ɛi (h i c i h i ), where h i, c i Q Q p, and therefore h i p ɛi ɛi ( h i + c i h i ) by the Triangle Inequality < p ɛ i ɛ i ( h i + p δ i h i ) by (iii) = p ɛi ɛi ( h i + p+ɛi ɛi h i ) by (i) = p ɛ i ɛ i h i + p ɛ i+ɛ i h i < h i + h i by (ii) Thus, h i < h i + h i Now consider the sequence { h i + h i } of positive rational numbers From the previous inequality, h i + h i < h i + h i Therefore, h i + h i is decreasing If σ = a b pv(σ) and τ = c d pv(τ), and l = lcm(b, d), then, by the Lemma, l h i + l h i Z Therefore, l h i +l h i = 0 for some finite i and thus the p-adic Euclidean Algorithm has a finite number of steps for rational inputs 4 Applications of the p-adic Euclidean Algorithm 4 Greatest Common Divisor Recall the following definition Definition 3 Let a, b Z, not both zero Then the greatest common divisor, or gcd, of a and b is the unique positive integer g = gcd(a, b) that satisfies the following properties (i) a g, b g Z, and (ii) if there exists f Z with a f, b f Z, then g f Z We can extend the definition of the gcd to t, s Q, where t = a b and s = c d are in lowest terms, by setting gcd(t, s) = gcd(a, c) lcm(b, d) This satisfies the properties that if g = gcd(t, s) then t g, s g Z and if there exists f Q with t g, s g Z, then g f Z Recall that the classical Euclidean Algorithm applied to integers a and b computes gcd(a, b) as the last non-zero remainder The p-adic Euclidean Algorithm produces a similar computation 5

Theorem 3 Let nonzero σ, τ Q Q p, with σ = sp v(σ), τ = tp v(τ) Suppose the p-adic Euclidean Algorithm applied to σ and τ stops after k steps and let η i = h i p v(ηi) Then h k = gcd(t, s) Proof Since η k = q k η k then n k η k = q k Z [ ] p and thus, h k h k Z Then, proceeding inductively backwards through the p-adic Euclidean Algorithm, Hence, η k i η k = q k i η k i η k s h k = h h k Z and + η k i η k Z [ p ] t h k = h 0 h k Z Now suppose f Q such that t f, s f Z Note that v(f) 0, since v(s) = v(t) = 0, then h p v(η ) = t s f f pv(τ) q f pv(σ) Z [ ] p Thus, h f Z Then again, inductively h k f Z Our previous example of the p-adic Euclidean Algorithm shows that ( 5 865 =, 0555 ) Although this computation may seem trivial when the rational numbers are presented as fractions, all calculations in the p-adic Euclidean algorithm are amenable to elements of Q p expressed as in () 4 Simple Continued Fractions In addition to the gcd, the classical Euclidean Algorithm also computes the simple continued fraction form of a b : a b = q + q + q 3 + = [q, q, q 3, ] where q i Z are the quotients obtained during the Euclidean algorithm In [] Browkin defined a simple continued fraction form of a p-adic number, ζ, as follows: ζ = b + = [b, b, b 3, ] b + b 3 + where b i Q with b i < p The following summarizes Browkin s method 6

For ζ with v(ζ) = m as in () define π(ζ) = { 0 if m > 0 0 j=m c jp j otherwise Theorem 4 (Browkin) Let ζ Q p \{0}, and let ζ = ζ For i, let b i = π(ζ i ), ζ i+ = (ζ i b i ) until ζ i b i = 0, then ζ = [b, b, b 3, ] The following theorem relates Browkin s method to the p-adic Euclidean Algorithm In fact, our proof of Theorem was strongly motivated by the stopping theorem in [] Theorem 5 Let ζ Q p \{0}, and let {q i } be the outputs of the p-adic Euclidean Algorithm applied to ζ and Then ζ = [q, q, q 3, ] Proof It suffices to show q i = b i However, we will also prove that ζ i = η i η i We proceed by induction In the base case, ζ = ζ = ζ = η η 0 Now, let ζ be as in (), then 0 0 0 ( b = c j p j p c j p j j=m j=m j=m ( ) 0 p = j=m ) p j p j = p p p m p < p Also, ζ b p = ζ π(ζ ) p < = p Then since ζ = b +(ζ b ), by the uniqueness of the p-adic division algorithm, b = q In the inductive case, assume q i = b i and ζ i = η i η i Then, Thus, ζ i+ = η i n i Now consider (ζ i+ ) = ζ i b i = η i η i q i = η i q i η i η i = η i η i η i = b i+ η i + (η i b i+ η i ) Using the same logic from the base case, b i+ < p, and η i b i+ η i p = η i p ζ i+ b i+ p < η i p Thus, by the uniqueness of the p-adic division algorithm b i+ = q i+ Therefore, q i = b i, and by Theorem 4, ζ = [q, q, q 3, ] 7

Using the theorem in our previous example computes that 865 0555 = + 7 + 0 7 + 50 7 + 7 Even though the p-adic Euclidean Algorithm and Browkin s method produce the same results, the p-adic Euclidean Algorithm is computationally quicker since performing the p-adic division algorithm only requires an inversion modulo a prime power Further Theorem 5 tells us exactly under what conditions the p-adic Euclidean Algorithm terminates Corollary For σ, τ Q p, τ 0, the p-adic Euclidean Algorithm terminates in a finite number of steps if and only if σ/τ Q 5 Open Questions The following questions concerning the techniques discussed in this paper remain open to the authors How does the sequence {η i } from the computation (σ, τ) relate to the sequence {η i } from computing (τ, σ)? Examples quickly show that they are not always related in the simple way the remainders are in the classical case Do we have to use the modular representatives { p p } or would another set of representatives also work? Again, small examples will show that if we choose {0,, p } as the set of representatives, the p-adic Euclidean Algorithm applied to two rational numbers may not terminate In a more general setting, do the representatives depend on the choice of uniformizer for the local field? In the classical setting the division algorithm leads to modular arithmetic Is there a similar theory to come from the p-adic division algorithm? Lastly, as is always the case, an analagous theory remains to be worked out in the -adics Acknowledgements: The author would like to thank Erica Fremstad, another Winona State University student, who also worked on the independent study, Dr Eric Errthum for his mentorship throughout this project, and the anonymous reviewer for the many helpful comments 8

References [] Browkin, J Continued Fractions in Local Fields, Demonstratio Mathematica, 978 [] Gouvea, F p-adic Numbers: An Introduction, Universitext, Springer- Verlag, Berline, 993 [3] Koblitz, B p-adic Numbers, p-adic Analysis, and Zeta-Functions, Springer- Verlag, 984, nd ed [4] Rotman, J Advanced Modern Algebra, Prentice Hall, 00 [5] Serre, J-P A Course in Arithmetic, Springer, 973 9