RATIONAL BASE NUMBER SYSTEMS FOR p-adic NUMBERS

Similar documents
Online-routing on the butterfly network: probabilistic analysis

Dorin Andrica Faculty of Mathematics and Computer Science, Babeş-Bolyai University, Cluj-Napoca, Romania

CMSC 425: Lecture 5 More on Geometry and Geometric Programming

Problem Set #10 Math 471 Real Analysis Assignment: Chapter 8 #2, 3, 6, 8

ON INDEPENDENT SETS IN PURELY ATOMIC PROBABILITY SPACES WITH GEOMETRIC DISTRIBUTION. 1. Introduction. 1 r r. r k for every set E A, E \ {0},

k. s k=1 Part of the significance of the Riemann zeta-function stems from Theorem 9.2. If s > 1 then 1 p s

Sincere Voting and Information Aggregation with Voting Costs

A Bijective Approach to the Permutational Power of a Priority Queue

arxiv:math/ v2 [math.ag] 21 Sep 2005

Pledge: Signature:

556: MATHEMATICAL STATISTICS I

Analysis of Arithmetic. Analysis of Arithmetic. Analysis of Arithmetic Round-Off Errors. Analysis of Arithmetic. Analysis of Arithmetic

THE PARITY OF THE PERIOD OF THE CONTINUED FRACTION OF d

BEST CONSTANTS FOR UNCENTERED MAXIMAL FUNCTIONS. Loukas Grafakos and Stephen Montgomery-Smith University of Missouri, Columbia

Recognizable Infinite Triangular Array Languages

arxiv: v1 [math.nt] 12 May 2017

9.1 The multiplicative group of a finite field. Theorem 9.1. The multiplicative group F of a finite field is cyclic.

An Estimate of Incomplete Mixed Character Sums 1 2. Mei-Chu Chang 3. Dedicated to Endre Szemerédi for his 70th birthday.

Approximating the minimum independent dominating set in perturbed graphs

Probabilistic number theory : A report on work done. What is the probability that a randomly chosen integer has no square factors?

Chapter 3: Theory of Modular Arithmetic 38

Journal of Inequalities in Pure and Applied Mathematics

Solution to HW 3, Ma 1a Fall 2016

Method for Approximating Irrational Numbers

ONE-POINT CODES USING PLACES OF HIGHER DEGREE

Maximal Inequalities for the Ornstein-Uhlenbeck Process

Introduction Common Divisors. Discrete Mathematics Andrei Bulatov

Edge Cover Time for Regular Graphs

C/CS/Phys C191 Shor s order (period) finding algorithm and factoring 11/12/14 Fall 2014 Lecture 22

ON THE INVERSE SIGNED TOTAL DOMINATION NUMBER IN GRAPHS. D.A. Mojdeh and B. Samadi

ANA BERRIZBEITIA, LUIS A. MEDINA, ALEXANDER C. MOLL, VICTOR H. MOLL, AND LAINE NOBLE

Stanford University CS259Q: Quantum Computing Handout 8 Luca Trevisan October 18, 2012

Abstract Voronoi Diagrams Revisited

Lecture 28: Convergence of Random Variables and Related Theorems

QIP Course 10: Quantum Factorization Algorithm (Part 3)

New problems in universal algebraic geometry illustrated by boolean equations

On the ratio of maximum and minimum degree in maximal intersecting families

Polar Coordinates. a) (2; 30 ) b) (5; 120 ) c) (6; 270 ) d) (9; 330 ) e) (4; 45 )

Kepler s problem gravitational attraction

arxiv: v1 [math.co] 4 May 2017

Pushdown Automata (PDAs)

On the ratio of maximum and minimum degree in maximal intersecting families

Supplementary information Efficient Enumeration of Monocyclic Chemical Graphs with Given Path Frequencies

A proof of the binomial theorem

On decompositions of complete multipartite graphs into the union of two even cycles

arxiv: v1 [math.co] 1 Apr 2011

A Short Combinatorial Proof of Derangement Identity arxiv: v1 [math.co] 13 Nov Introduction

CONGRUENCES INVOLVING ( )

The 2-Sylow subgroups of the tame kernel of imaginary quadratic fields

Syntactical content of nite approximations of partial algebras 1 Wiktor Bartol Inst. Matematyki, Uniw. Warszawski, Warszawa (Poland)

Asymptotically Lacunary Statistical Equivalent Sequence Spaces Defined by Ideal Convergence and an Orlicz Function

arxiv: v1 [math.co] 6 Mar 2008

Pascal s Triangle (mod 8)

Semicanonical basis generators of the cluster algebra of type A (1)

On the Quasi-inverse of a Non-square Matrix: An Infinite Solution

AQI: Advanced Quantum Information Lecture 2 (Module 4): Order finding and factoring algorithms February 20, 2013

Brief summary of functional analysis APPM 5440 Fall 2014 Applied Analysis

COLLAPSING WALLS THEOREM

Vanishing lines in generalized Adams spectral sequences are generic

Lacunary I-Convergent Sequences

A generalization of the Bernstein polynomials

Math 301: The Erdős-Stone-Simonovitz Theorem and Extremal Numbers for Bipartite Graphs

Using Laplace Transform to Evaluate Improper Integrals Chii-Huei Yu

Adam Kubica A REGULARITY CRITERION FOR POSITIVE PART OF RADIAL COMPONENT IN THE CASE OF AXIALLY SYMMETRIC NAVIER-STOKES EQUATIONS

10/04/18. P [P(x)] 1 negl(n).

MATH 415, WEEK 3: Parameter-Dependence and Bifurcations

Errata for Edition 1 of Coding the Matrix, January 13, 2017

6 PROBABILITY GENERATING FUNCTIONS

The Archimedean Circles of Schoch and Woo

Lot-sizing for inventory systems with product recovery


Numerical solution of the first order linear fuzzy differential equations using He0s variational iteration method

A STUDY OF HAMMING CODES AS ERROR CORRECTING CODES

When two numbers are written as the product of their prime factors, they are in factored form.

Goodness-of-fit for composite hypotheses.

Polynomial differential systems having a given Darbouxian first integral

Enumerating permutation polynomials

The Chromatic Villainy of Complete Multipartite Graphs

Numerical approximation to ζ(2n+1)

Analysis of Finite Word-Length Effects

Relating Branching Program Size and. Formula Size over the Full Binary Basis. FB Informatik, LS II, Univ. Dortmund, Dortmund, Germany

Journal of Universal Computer Science, vol. 1, no. 7 (1995), submitted: 14/6/95, accepted: 14/6/95, appeared: 28/7/95 Springer Pub. Co.

Fractional Zero Forcing via Three-color Forcing Games

On a quantity that is analogous to potential and a theorem that relates to it

Weighted Inequalities for the Hardy Operator

ON SPARSELY SCHEMMEL TOTIENT NUMBERS. Colin Defant 1 Department of Mathematics, University of Florida, Gainesville, Florida

A NOTE ON ROTATIONS AND INTERVAL EXCHANGE TRANSFORMATIONS ON 3-INTERVALS KARMA DAJANI

NOTE. Some New Bounds for Cover-Free Families

A Crash Course in (2 2) Matrices

Application of Parseval s Theorem on Evaluating Some Definite Integrals

3.1 Random variables

Permutations and Combinations

EM Boundary Value Problems

Miskolc Mathematical Notes HU e-issn Tribonacci numbers with indices in arithmetic progression and their sums. Nurettin Irmak and Murat Alp

Online Mathematics Competition Wednesday, November 30, 2016

Cross section dependence on ski pole sti ness

A Comment on Increasing Returns and Spatial. Unemployment Disparities

On the Efficiency of Markets with Two-sided Proportional Allocation Mechanisms

HE DI ELMONSER. 1. Introduction In 1964 H. Mink and L. Sathre [15] proved the following inequality. n, n N. ((n + 1)!) n+1

Bounds for Codimensions of Fitting Ideals

Transcription:

RAIRO-Theo. Inf. Al. 46 (202) 87 06 DOI: 0.05/ita/204 Available online at: www.aio-ita.og RATIONAL BASE NUMBER SYSTEMS FOR -ADIC NUMBERS Chistiane Fougny and Kael Klouda 2 Abstact. This ae deals with ational base numbe systems fo -adic numbes. We mainly focus on the system oosed by Akiyama et al. in 2008, but we also show that this system is in some sense isomohic to some othe ational base numbe systems by means of finite tansduces. We identify the numbes with finite and eventually eiodic eesentations and we also detemine the numbe of eesentations of a given -adic numbe. Mathematics Subject Classification. A67, E95.. Intoduction In this ae, we conside fou distinct but simila ational base numbe systems. The stating oint of the deivation of all these systems is the classical division algoithm which comutes the eesentation of ositive integes in an intege base b 2: fo nonzeo s in N, ut s 0 = s and s i = bs i+ + a i, a i {0,,...,b }, (.) fo i =0,,... The esulting seuence of digits a 2 a a 0 is always finite, meaning that thee is some n in N such that a n 0anda k =0foallk>n, and, moeove, it holds that s = n i=0 a ib i. We say that a n a 0 is the eesentation of s in base b. The same eesentation can be obtained also using the well-known geedy algoithm only with the diffeence that it is comuted fom left to ight: the most significant digit a n fist. Keywods and hases. Rational base numbe systems, -adic numbes. LIAFA, CNRS UMR 7089, Case 704, 75205 Pais Cedex 3, and Univesité Pais 8, Fance. Chistiane.Fougny@liafa.jussieu.f 2 Faculty of Infomation Technology, Kolejní 550/2, 60 00 Pague, Czech Reublic. kael.klouda@fit.cvut.cz Aticle ublished by EDP Sciences c EDP Sciences 20

88 C. FROUGNY AND K. KLOUDA If one wants to get a ational base eesentation by the geedy algoithm, it suffices to elace the intege base b by a ational numbe,>. Howeve, even if the inut is a ositive intege, the etuned eesentations may be infinite to the ight, i.e., the seuence of digits is not eventually zeo. In fact, even if the intege base b is elaced by a eal β >, the geedy algoithm still woks. The esulting eesentations ae called β-exansions. The notion of β-exansion was fistly intoduced by Rényi in [7] and has been studied since then by many authos (see [3], Cha. 7, fo a suvey and efeences). The β-exansions ae obtained by the genealization of the geedy algoithm. Fo the most geneal setting of the geedy algoithm we have: the inut can be any nonnegative eal numbe, any eal numbe geate than one can be taken as a base, and the β-exansions ae, in geneal, infinite to the ight. The goal of this ae is to study some genealizations of the division algoithm in the case whee the inut is not a ositive intege, and in the case whee the base is not a ositive intege. As fo the ossible inuts, looking at the key ste of the division algoithm (.), an iational numbe can be hadly an inut. As we will see below, the algoithm can be modified so that the inut can be ational numbes. Regading the ossible bases, again an iational base is not accetable. In ode to get a ational base numbe system, we have to modify (.): let > be co-ime integes, if we elace (.) by s i = s i+ + a i, o by s i = s i+ + a i, (.2) whee a i {0,,..., }, we get the ational base numbe systems we ae going to study. It is easy to check that fo any ositive intege s = s 0 we get s = n i=0 a i ( ) i o s = n 2 i=0 a i ( ) i, fo some n,n 2 N, (.3) esectively. If we futhe elace by, we get two negative ational base systems. Again, all the esective algoithms admit any ational numbe as an inut (see Algoithm 3.). We have said that even negative numbes can be an inut of the division algoithm: let b =2ands = in(.), then the outut is the left-infinite seuence a 2 a a 0 =. In ode fo this seuence to be the eesentation of, we would have to have = i=0 2i. This is of couse not tue with esect to the classical absolute value, theefoe we have to move to anothe field. In some sense, the only candidate is the field of 2-adic numbes Q 2. The fields of -adic numbes Q,fo a ime numbe, will be descibed in the seuel. Now, we can secify what this ae deals with: we will study fou ational base numbe systems enabling to eesent -adic numbes in the fom i k 0 a i ( ) i, i k 0 a i ( ) i, a i i k 0 ( ) i, a i i k 0 ( ) i, (.4)

RATIONAL BASE NUMBER SYSTEMS FOR P -ADIC NUMBERS 89 whee > ae co-ime integes, a i belongs to {0,,..., } and k 0 is in Z. Ou stategy is to study one of them and then to show that they all shae most of thei oeties. Moe ecisely, we will study the thid one, called the AFS numbe system, since this system has aleady been consideed by Akiyama et al. in []. We fist study the eesentations of the negative integes, and show that they ae eesentable by a tee, simila to the tee of the eesentations of nonnegative integes of []. We chaacteize the case when thee is a natual isomohism of the tees, Poosition 3.3. In Poosition 3.7 we give a combinatoial descition of the numbes having a finite exansion. Theoem 3.20 ovides an answe to the uestion of uniueness of a eesentation and also chaacteizes all eesentations of x in Q, a ime facto of, which convege to x with esect to.. Then we chaacteize the numbes with eventually eiodic eesentations: moe ecisely, we show that if x belongs to Q, a ime facto of, then the -eesentation of x, given by algoithm GMD, is eventually eiodic if, and only if, x is in Q and the -eesentation is euals to the -exansion of x given by Algoithm MD, Theoem 3.26. Finally we show that, fo >, thee exist finite seuential tansduces conveting one eesentation fom (.4) to each othe one, Theoem 4.. 2.. -adic numbes 2. Peliminaies Within this section, is a ime numbe. Detailed intoduction to the theoy of -adic numbes can be found in many books, see, e.g., [5]. Hee we shotly ecall the definition and some basic oeties we ae going to need late on. Fist, define the -adic valuation v : Z \{0} R by n = v(n) n with n. This is extended to ationals by v ( a b )=v (a) v (b) fo any nonzeo a, b Z. Having the valuation, we define the -adic absolute value of x in Q as x =0ifx =0,and x = v(x) othewise. Due to the celebated Ostowski s theoem fom 98, the -adic absolute values and the classical one ae the only non-tivial absolute values definable on Q since the theoem says any absolute value is euivalent to one of these. The cucial diffeence between the classical and the -adic absolute value is that the -adic one is ultametic, i.e., fo all x, y Q it holds x+y max{ x, y }. Moeove, even fo non-ational -adic numbes the absolute value (and valuation) still takes only countably many values; moe ecisely, thee exists i Z such that x = v(x) = i fo all x Q. InthesamewayasthesetRis the comletion of Q with esect to the classical absolute value, the sets Q of -adic numbes ae the comletions of Q with esect

90 C. FROUGNY AND K. KLOUDA to. It is known that any x in Q has a uniue standad eesentation in base : x = k k 0 a k k, with a k {0,,..., } and k 0 = v (x). This standad eesentation is finite if, and only if, x is in N, eventually eiodic fo x in Q and aeiodic othewise. The existence and uniueness of the standad eesentation imlies the following simle but essential lemma; Z is the set of -adic integes, i.e., numbesx Q with x. Lemma 2.. Let x Z and n N. Then thee exists a uniue α n {0,,..., n } such that x α n n. 2.2. Combinatoics on wods Any finite nonemty set A is called alhabet. In aticula, we ut A k = {0,,...,k } fo any k N. Any finite sting w = a 0 a a n,a i A, is a finite wod ove A of length w = n +. The set of all finite wods ove A including the emty wod ε is denoted by A. A ight-infinite wod ove A is a seuence a = a 0 a with a i A; A N is the set of all such wods ove A. If a = uwww = uw ω fo some u and w in A,thena is said to be eventually eiodic. If u = ε, a is uely eiodic. Left-infinite wods and the set N A ae defined in the same manne. If a = wwwu = ω wu fo some w, u A,thena is eventually eiodic to the left. If w in A is eual to zu fo some z and u in A,thenz is a efix and u a suffix of w. Alanguage L ove A is any subset of A. Ifanyefixofanyw L belongs also to L, L is a efix-closed language. 3. AFS numbe system In [] the AFS system is oosed as a new method to eesent the nonnegative integes in the fom of the thid seies fom (.4), whee > ae co-ime integes and digits a i fom the alhabet A. It is oved thee that such a finite eesentation is uniue and that the language of all such eesentations is efix-closed. In fact, it holds that if w in A is a eesentation of an intege, then thee exists at least one a in A such that wa eesents an intege as well. So, if w = a n a n a a 0, we can study ( ) k n a k k=0 and get a eesentation of a ational numbe. As we have said, w can always be extended by at least one lette and emains a eesentation of an intege. Doing this extension eetitively, n tends to infinity and we can get even iational numbes. Such infinite eesentations ae then studied in [] and they tun out to be vey inteesting and to elate to old and difficult oblems of numbe theoy; namely, Mahle s oblem [4] and the Josehus oblem [6,8]. In this ae we will take a diffeent aoach; we will study also infinite seies but containing an infinite numbe of ositive owes of.

RATIONAL BASE NUMBER SYSTEMS FOR P -ADIC NUMBERS 9 3.. Modified division algoithm In what follows, we assume that > ae co-ime ositive integes (we do not assume that is a ime numbe!). As exlained above, the eesentations in the AFS system can be obtained by the division algoithm if the key ste (.) is modified. The esult is the following algoithm, called the modified division (MD) algoithm. It is stated in the most geneal fom so that its inut can be any ational numbe x = s t with s and t being the lowest tems. Algoithm 3. (MD algoithm). Let x = s t, s being an intege and t a ositive intege. (i) if s =0, etun the emty wod a = ε; (ii) if t is co-ime to, uts 0 = s and fo all i N define s i+ and a i A by s i t = s i+ t + a i. (3.) Retun a = a 2 a a 0 ; ( ) l (iii) if t is not mutually ime with, multily s t by until x is of the fom s t,wheet is co-ime to. Then aly the algoithm fom (ii) etuning a = a 2a a 0.Retuna = a a 0 a a l = a l+ a l a l a 0. Definition 3.2. Let x be in Q. The wod a etuned by the evious algoithm fo x is said to be the -exansion of x and denoted by x. We often omit the adix oint if its osition is clea. Lemma 3.3. Let x = s t,whees 0and t>0 is co-ime to. Then fo the seuence (s i ) i fom the MD algoithm we have: (i) if s>0 and t =, i.e., x N, (s i ) i is eventually zeo; (ii) if s>0 and t>, (s i ) i is eithe eventually zeo o eventually negative; (iii) if s<0, (s i ) i is negative; (iv) fo all i N, ifs i < t,thens i <s i+ ; (v) fo all i N, if t s i < 0, then t s i+ < 0; (vi) (s i ) i is always bounded and eventually eiodic; (vii) (s i ) i is eventually zeo (es. eventually eiodic) if, and only if, a is eventually zeo (es. eventually eiodic). Poof. Items (i), (ii) and (iii) follow fom the tivial fact that if s i is ositive, then s i+ <s i,andthatifs i is negative, then s i+ is also negative. If s i < t,wemusthaves i < si ( )t. And since fo all i N, item (iv) follows. s i ( )t s i+ s i

92 C. FROUGNY AND K. KLOUDA Similaly one can ove (v). Let t s i < 0, then by (iii) we get s i+ < 0 and ( ) s i+ s i ( )t t ( )t = t Item (vi) is a diect conseuence of (ii) (iv) and of the fact that the value of s i+ (and also of a i ) is comletely detemined by the value of s i. The same fact imlies (vii). It follows fom the lemma that the inteval [ t, 0] is a sot of attacto fo the seuence (s i ) i and this gives us the following bound fo the length of the eiod of -exansions. Coollay 3.4. Let x = s t be in Q. Then the eiod of x is less than t. Lemma 3.5. Let x = s t be in Q such that its -exansion x = a l+a l, l N, is not finite (i.e., it is not eventually zeo). Then k= l a k ( ) k conveges to x with esect to the -adic absolute value if, and only if, is a ime facto of. Moeove, if i is the multilicity of in, then fo all n l we have n x ( ) k a k i(n+). (3.2) k= l Poof. W.l.o.g., assume that t is co-ime to. Then it follows fom (3.) s t = s t + a 0 = = ( ) n+ s n+ t + n k=0 a k ( ) k Since (s i ) i is a seuence of integes, we have 0 < s i fo all i. Hence, n x ( ) k a k ( ) n+ s ( ) n+ n+ = t t k= l Obviously, this seuence tends to zeo if, and only if, is a ime facto of. In ( ) n+ such a case, we have t = i(n+). is not even- Of couse, Ineuality (3.2) holds even without assuming that x tually zeo. Some examles of -exansions ae stated in Table. This means that i is the geatest intege such that i divides.

RATIONAL BASE NUMBER SYSTEMS FOR P -ADIC NUMBERS 93. The last column contains the ab- Table. Examles of x solute values fo which the -exansion fom the second column conveges to x (in tems of Lem. 3.5). x x (s i ) i 0 Abs. values =3, =2 5 20 5, 3, 2,, 0, 0,... all 5 ω 202 5, 3, 2, 2, 2,... 3 /4 20, 6, 4, 0, 0,... all /8 ω 222, 2, 4, 8, 8, 8,... 3 /5 ω (02)22, 4,,, 4, 6, 4, 6,... 3 =30, = 5 25 5,, 0, 0,... all 5 ω 985 5, 2,,,... 2, 3, 5 /7 ω (225)233,, 5, 3, 6, 5,... 2, 3, 5 3.2. -exansions of the negative integes The case of -exansions of the ositive integes has aleady been studied in []. In the esent subsection, we will study the case of the negative integes. Definition 3.6. Let a l+ a l, l N be an eventually eiodic wod ove A. The evaluation ma π is defined by: π( a l+ a l )=x if, and only if, x a l+ a l. Lemma 3.7. Let a 2 a a 0 be eventually eiodic. (i) if π( a 2 a a 0 ) is in Z, thenπ( a 3 a 2 a ) belongs to Z; (ii) if x = π( a 2 a a 0 ) is a negative intege, then thee exists a A such that π( a 2 a a 0 a) is also a negative intege. Moeove, min {π( a 2 a a 0 a) π( a 2 a a 0 a) Z,a A } = x (3.3) max {π( a 2 a a 0 a) π( a 2 a a 0 a) Z,a A } = (x + ). (3.4) Poof. Let us assume that an intege x has exansion x = a 3a 2 a a 0 and let s be the second element of the coesonding seuence (s i ) i 0 fom the MD algoithm. Then, clealy, s = a 3a 2 a. It emains to ove (ii). In othe wods, we want to ove that thee exists an intege s such that s fom the MD algoithm fo s 0 = s is eual to x, i.e., s = x + a fo some a A. It is euivalent to the condition (x + a) Z. (3.5)

94 C. FROUGNY AND K. KLOUDA Clealy, this condition is satisfied at least fo one a, the est of the statement (ii) follows fom the fact that 0 a. In wods, the set of -exansions of all negative integes is efix-closed and all its elements ae extendable to the ight. Moeove, the -exansion of a negative intege is eventually eiodic with eiod : Poosition 3.8. Let k be a ositive intege. Denote B =,then: (i) if k B, then k = ω b with b = k( ); (ii) othewise, k = ω bw with w A + and b = B( ). Poof. Let k B. Then, fo s 0 = k, wehave k = s 0 = s + a 0 ; this euation is satisfied (only) fo s = k and a = k( ) and the oof of (i) follows. If k>bthen k <. We know, due to Lemma 3.3 (iv), that (s i) i 0 is eventually geate than o eual to B. Hence, k = ω bw, wheeπ( ω b)isa negative intege k, k B. We will ove that k must be eual to B and so, due to (i), b = B( ). We show that if k <Band b = k ( ), then the only a A such that π( ω b a) is an intege is again a = b. Let k <B,then k = ω b with b = k ( ). Assume that k 0 = π( ω b a) Z. Wemusthave k 0 = k + a. This is satisfied fo a = k ( ) andk 0 = k. Let us suose that the same euation is satisfied also fo diffeent a and k 0. Clealy, a must be eual to k ( ) +l fo some nonzeo l and, at least fo one of l = o l =, it must be tue that k ( ) +l A. Then k 0 = k ok 0 = k +, esectively. It imlies that, fo some 0 k 0 B, wehavetwodiffeent - exansions: one is given by (i) (oiseualtoε fo k 0 = 0) and the second one is ω b a, a contadiction. 3.2.. Tees T and T The language of -exansions of all ositive integes is studied in []. It is oved thee, among othe oeties of this language, that it is efix-closed and extendable to the ight. Thus, it is uite natual to eesent the language as a tee with infinite banches. We fist ecall the esults fo the case of ositive integes and then oose thei analogues fo the negative case. -exansion of is efix-closed, extendable to the ight, and not Lemma 3.9. Define the language L = {w A w is the somes N}. The language L context-fee (if ). The oof is a diect conseuence of the uming lemma and can be found in [].

RATIONAL BASE NUMBER SYSTEMS FOR P -ADIC NUMBERS 95 Definition 3.0. The tee T has the nonnegative integes as nodes and the diected edges ae labeled by lettes fom A.Futhemoe: (i) 0 is the oot of the tee; (ii) theeisanedgefomnoden to node n 2 with label a if n 2 =(n + a)/. Tee T fo =3, =2, is deicted in Figue. It is easonable to ask which nonnegative intege x is the least one with x of length n. Denote such an intege by G n : suely G 0 =0andG =. The childen in the tee T of node n ae given by Condition (3.5), obviously, the least such intege is n (cf. Lem. 3.7). Lemma 3.. The least nonnegative intege with -exansion of length n N is G n,wheeg 0 =0, G =, G n+ = G n. We now oose euivalent objects fo the negative integes. The language now eads L = {w A ω bw = s,s B,fist lette of w b}. Clealy, the lette b is eual to B( )withb fom Poosition 3.8. Using the same techniues, on can ove the same esults as the ones of Lemma 3.9 fo the language L. can be also eesented Since both languages have the same oeties, L by a tee T. The nodes ae the negative integes, the oot is eual to B, and thee is an edge fom node n to node n 2 with label a in A if n 2 =(n + a)/. Tee T fo =3, = 2 is deicted in Figue, too. Again, we can ask which intege B istheleastonehavingthe ω bw with w L integes, we get: -exansion of length n. Using the same easoning as in the case of ositive Lemma 3.2. The least negative intege with -exansion ω bw with b = B( ) and w L of length n N is G n,wheeg 0 = B, G n+ = G n. Looking at the tees fo vaious values of and, one can notice that sometimes they ae isomohic and sometimes not. Fo instance, T and T ae isomohic fo =3and = 2 but not fo =8and =5,seeFigue2. Poosition 3.3. The maing which mas node k of the tee T to node B k of T is an isomohism if, and only if, is an intege. Poof. Clealy, the maing is an isomohism if, and only if, the nodes k and B k have the same numbe of childen fo all k N. Denote the numbe of childen of a node k by m(k), then (see (3.5)) we have fo all k N m(k) = #{a A k + a 0(mod)}, m( B k) = #{b A (B + k)+b 0(mod)} = #{b A k +( )B b 0(mod)}.

96 C. FROUGNY AND K. KLOUDA ω 0 ω 2 7 2 0 0 0 4 6 2 9 0 2 2 0 3 5 8 - ω 2 0 2-2 -3-4 -5-7 0 2-0 -6 2-8 0 0 - -9-2 -3 Figue. The gah containing =3, = 2: the tees T and T -exansions of all integes fo. The case = is tivial, so assume that >. Since and ae co-ime, the seuence (k) k 0 visits all esidue classes (mod ). Theefoe, m(k) = m( B k) fo all k if, and only if, the set {( )B b b A } has the same numbe of elements in each esidue class (mod ) asa. This is euivalent to {( )B b b A } = {l, l +,...,l+ } fo some l Z. But since ( )B, the only admissible case is that l = 0 and, conseuently, B = =. 3.3. Finite -exansions If x has a finite -exansion of length m +, i.e., x = ( ) k m a k k=0, then it s is eual to fo some s. But not all numbes of this fom have a finite m+ - exansion, e.g., x =/8 =/2 3 has an eventually eiodic eesentation ω 222 fo =3and =2,seeTable. In ode to bette undestand this, we intoduce an altenative algoithm comuting the -exansion of numbes of this fom. Algoithm 3.4. Let x = s with s and m ositive integes. Put h m 0 = s. Define h i+ and b i in A as follows. Fo i =0,,...,m let h i m (i+) = h i+ m (i+) + b i.

RATIONAL BASE NUMBER SYSTEMS FOR P -ADIC NUMBERS 97 ω 0 ω 3 0 - =8, =5 5 7 3 6 2 4 3 2 4 7 6 7 2 5 0 5 0 9 8 ω 6 4 7-2 -3-4 -5 2-6 5 0 3-7 -8-9 Figue 2. The gah containing =8, = 5: the tees T and T -exansions of all integes fo. Fo i m let h i = h i+ + b i. Retun b = b 2 b b 0. It tuns out that b = x, as oved in the following esult. s m Lemma 3.5. Let x = with s and m ositive integes. Let b = b 2 b b 0 be the wod etuned by algoithm 3.4 and (h i ) i the esective seuence; similaly, let x = a 2 a a 0 and let (s i ) i be the seuence fom the MD algoithm. Then x = b and s i = { h i i i =0,,...,m, h i m i = m, m +,... Poof. Fo i =0,wehaves 0 = s + a 0 m and h 0 = h + b 0 m. It follows that a 0 = b 0 and s = h. We cay on by induction on i =, 2,...,m. Assuming that s i = h i i, the euations s i = s i+ + a 0 m and h i = h i+ + b i m (i+) again imly that b i = a i and s i+ = h i+ ; it suffices to multily the latte one by i+ to make it clea. The oof continues in an analogous way even fo i geate than m.

98 C. FROUGNY AND K. KLOUDA It is easy to see that (as in the case of the MD algoithm) if b 2 b b 0 is the h0 -exansion etuned by the altenative algoithm fo,then b m 3 b 2 b is the -exansion of h.conseuently, b m m+2 b m+ b m is the -exansion of the intege h m. We aleady know that the -exansion of an intege is finite if, and only if, the intege is nonnegative, so this imlies: s m Coollay 3.6. Let x = with s and m ositive integes, and let (h i ) i be the seuence constucted fo x in Algoithm 3.4. Then x is finite if, and only if, h m is a nonnegative intege. Having this knowledge, we ae now able to descibe all numbes of the fom of s whose m -exansion is infinite. Poosition 3.7. Let >. Define fo all ositive integes m the set INF(m) = i i i>0, m is infinite. Then INF() = and INF(m) =A(m) B(m), m =2, 3,..., whee A(m)= { k+a m } k>,a A N, and B(m)= { k+a m } k INF(m ),a A. Poof. Fo m =and s,s > 0, we get in Algoithm 3.4 s = h 0 = h + b 0,it imlies h 0 and so, indeed, INF() is emty. s Now, conside fo m>. The oof follows fom the fact that s INF(m) m if, and only if, eithe h < 0oh INF(m ). Indeed, if s A(m ), i.e., s = k + a m fo some k>anda A, then we get in Algoithm 3.4 s = h 0 = k + a m = h + b 0 m. Since h and b 0 ae uniuely given, h = k <0. Analogously, s = h 0 = k + a m fo some k INF(m ) and a A imlies that h = k INF(m ). 3.4. -eesentation of -adic numbes Within this subsection lettes,, 2,... stand fo ime numbes and is a geneal intege geate than one. Definition 3.8. A left-infinite wod a l0+a l0,l 0 N, ove A is a eesentation of x Q if a l0 > 0ol 0 =0and ( ) k a k x = k= l 0 with esect to. -

RATIONAL BASE NUMBER SYSTEMS FOR P -ADIC NUMBERS 99 So fa, we have been concened with -eesentation of ational numbes in Q. We have shown that thee exists at least one -eesentation fo all ational numbes, namely the -exansion obtained by the MD algoithm, ovided that is a ime facto of. Is this eesentation the only one of this tye? Does it exist even fo non-ational -adic numbes? Befoe answeing these uestions, let us conside again Lemma 2.: thenumbeα n is not the only intege satisfying the ineuality; it emains tue even if α n is elaced by α n + l n fo any l Z. This tivial obsevation tuns out to be the eason why thee exist even uncountably many -eesentations if is not a owe of a single ime. Howeve, thee is some common oety fo all such eesentations. Lemma 3.9. Let be a ime facto of with multilicity i and let x be in Q. Given a a 0 a a l0, a i in A, such that a k x = k= l 0 then, fo all integes n l 0, n x a k k= l 0 k=0 ( ) k, ( ) k (n+)i. (3.6) Poof. The oof is again a conseuence of the fact that is ultametic. We have n x ( ) k a k ( ) k a k ( ) k a k = max (n+)i. k=n+,n+2,... k= l 0 k=n+ Having this necessay condition, we can chaacteize all -eesentations of agivenx; the assumtion x belongs to Z means no loss of geneality. Theoem 3.20. Let be a ime facto of with multilicity i and let x be in Z. (i) If is not a owe of, then thee exist uncountably many -eesentations a 2 a a 0 such that fo all n N: n x ( ) k a k (n+)i. (3.7) Each of these wods is detemined by an infinite seuence (m j ) j 0, m j {0,,..., }; whee = i ; (ii) if is a owe of, thee exists a uniue -eesentation satisfying (3.7).

00 C. FROUGNY AND K. KLOUDA Poof. If x, then x as well. By Lemma 2., we know that thee exits a uniue u 0 {0,,..., i } such that x u 0 i. Since the -adic absolute value is ultametic, we have fo all m N x (u 0 + m i ) max{ x u 0, m i ) } i. Put a 0 = u 0 + m 0 i fo some m 0 {0,,..., }, then x a 0 = x a 0 i with a 0 A. The integes a 0 of this fom ae the only integes of A satisfying this ineuality. Now, since / = i, multilying the ineuality by / yields x a0 and so, as above, we have a uniue u {0,,..., i }, abitay m {0,,..., } and a = u + m i such that a0 x 2 u i. Multilying by / 2 = i yields x a 0 a 2i. In this way, afte n stes, we obtain n x a k k=0 ( ) k (n+)i. Theoem 3.20 ovides an answe to the uestion of uniueness of a eesentation and also chaacteizes all eesentations of x Q which convege to x with esect to. We have seen that fo a ational x, which is an element of Q fo all ime, the -exansion x conveges with esect to all absolute values, a ime facto of. So, it seems easonable to study -eesentations which eesent a ational x in Q fo all fom any nonemty subset of ime factos of. Definition 3.2. Let = l l k k be a ime factoization of, j ae ime numbes > andl j > 0. Let y =(y,,y k ) {0,l } {0,l k }\(0, 0,...,0). We denote y = y y k k, I(y) ={j y j = l j },and y is defined by = y y.

RATIONAL BASE NUMBER SYSTEMS FOR P -ADIC NUMBERS 0 Algoithm 3.22 (genealized modified division (GMD) algoithm). Let y as in Definition 3.2 be fixed but abitay fo a given and x = s t Q such that t>0 is co-ime to j fo all j I(y). Puts 0 = s, t 0 = t. Moeove let t j = t j y = t 0 ( y ) j and s j t j = s j+ t j y + u j with u j {0,,..., y }. Choose m j {0,,..., y } at andom and ut a j = u j + m j y and s j+ = s j+ m jt j. Retun a 2 a a 0. Denote the set of all ossible oututs a 2 a a 0 by GMD(x). We now ove that the GMD algoithm etuns all -eesentations of x in Q j,j I(y). Lemma 3.23. Given and y. Let x = s t Q such that t>0 is co-ime to j fo all j I(y). Thee exist exactly y numbes a A satisfying x a j lj fo all j I(y). Poof. The existence of y such numbes follows fom the constuction of the GMD algoithm: c m = u 0 + m y,m = 0,,..., y satisfy the ineuality, 0 u 0 y is the lette constucted in the fist ste of the GMD algoithm. If thee is anothe numbe in A diffeent fom all c m and satisfying the ineuality, thee must exist y such digits of the fom of d m = d 0 + m y,m=0,,..., y with 0 d 0 y. As we know, fo all j I(y), thee exists a uniue 0 b lj such that x b j lj and, futhemoe, all othe numbes fo which this ineuality is tue ae of the fom of b + n lj,n Z. Thus,bothc 0 and d 0 ae of this fom and so c 0 d 0 is a multile of lj fo all j I(y). Since j ae distinct imes, c 0 d 0 must be a multile of y and hence c 0 = d 0. Theoem 3.24. Let y as in Definition 3.2 be fixed but abitay fo a given and x = s t Q such that t>0 is co-ime to j fo all j I(y). Futhe, let a = a 2 a a 0 be an infinite wod ove A. Then ( ) k a k x = with esect to j k=0 fo all j I(y) if, and only if, a GMD(x). Poof. Fist, let us suose a GMD(x). We have x = s 0 = s y + a 0 t 0 t 0 t 0 = s t + a 0 = ( ) 2 ( s3 t 3 + a 2 ( s2 t 2 + a ) + a 0 = ) + a + a 0 = = s n+ t n+ ( ) n+ + n k=0 a k ( ) k

02 C. FROUGNY AND K. KLOUDA Hence, fo all n N and fo all j I(y) n x a ( ) n+ k s n+ = = s n+ t n+ j j t 0 ( y ) n+ k=0 Since t 0 ( y ) n+ is co-ime to j and s n+ j and the sum conveges to x. Assume that x = k=0 a k ( ) k j, (n+)lj j ( ) n+ j is an ue bound l with esect to j fo all j I(y). Then x a 0 j j j, j I(y). The evious lemma says that thee ae just y ossible values of a 0, and so they must coincide with the y values of the fist digit (ossibly) obtained in the fist ste of the GMD algoithm. Since again 2 ( x a ) 0 l a j j, j I(y), j we can use the same agument fo a and continue in the same manne fo a 2,a 3,... Obviously, if we take y =(l,l 2,...,l k ), then the GMD and MD algoithms coincide and the etuned wod is uniue and eual to x. Examle 3.25. Let = 30, =, and y =(,, 0). Hee ae two examles of eesentations of the numbe : 27 24 24 29 26 29 27 25 25 24 28 24 28 27 29 GMD(), 20 22 2 22 22 22 9 8 8 9 23 8 22 22 23 GMD(), and of the numbe 0: 7 2 3 7 4 7 8 7 7 5 5 6 6 5 6 GMD(0), 5 2 5 3 5 9 9 9 4 2 2 0 2 GMD(0). 3.5. Peiodicity It tuns out that the -exansion x of a ational x lays an imotant ole between all eesentations fom GMD(x) not only because it is the only one which conveges in all Q, a ime facto of. It is also the only one which is eventually eiodic. Theoem 3.26. Let x Q i, i > a ime facto of = l l k k. Then the -eesentation a of x is eventually eiodic if, and only if, x Q and a = x.

RATIONAL BASE NUMBER SYSTEMS FOR P -ADIC NUMBERS 03 Poof. The ight to left imlication is oved in Lemma 3.3. Let us assume, w.l.o.g, that x Z and that a = a 2 a a 0 GMD(x) fosome y (see Def. 3.2) is eventually eiodic, say, a = ω wv, w A +,v A, v = h 0, and w = h. Thesimlefact j=0 ( ) j = immediately imlies that x must be ational. Let (s j ) j and (t j ) j be the seuences constucted within the un of the GMD algoithm. Then we must have fo all n h 0 and j N s n t n = s n+jh t n+jh, since t j = t 0 yj,wegets n+jh = s n ( y ) jh which imlies s n+jh i jh i fo all i {, 2,...,k}\I(y). Define fo all n h 0 and fo all these i a nonnegative intege m 0 <hby n h 0 m 0 (mod h), then x n j=0 a j ( ) j i = s n t n ( ) n = s h0+m 0 t 0 s h0+m = 0 ( y ) n h0 m0 i t 0 ( y ) n (n h0 m0) i. i ( ) n i Since the intege m 0 is bounded by h fo abitay n, thesumconvegestox with esect to all absolute values i,i {, 2,...,k}. But thee is only one such -eesentation: namely, a must be eual to x. 4. Convetes between ational base numbe systems 4.. -eesentations Let us now conside the system coesonding to the fist seies fom (.4). In the same way as fo the AFS system, we define the -exansion of x in Q and -eesentation of x in Q. As omised in the intoduction, we show that thee exists a simle convete between them. A tansduce is an automaton whee edges ae labelled by coules of wods. It is finite if the set of states and the set of edgesaefinite. Itissaidtobeseuential if the ojection on the fist comonent is a deteministic automaton. It is lette-to-lette if edges ae labelled by coules of lettes. Fo moe definitions and esults on tansduces the eade is efeed to [9] fo instance.

04 C. FROUGNY AND K. KLOUDA Theoem 4.. Thee exists a finite lette-to-lette ight 2 seuential tansduce C conveting the -eesentation of any x Z, ime facto of, toits - eesentation; the invese of C is also a finite lette-to-lette ight seuential tansduce. Poof. Let C =(Q N, A A,E,{0},ω) be the ight lette-to-lette seuential tansduce whose set of edges E is defined by s a b s (a + s) =s + b with a, b A. Clealy, if the inut is a a 0 such that x = ( ) i i=0 a i in Q, aime facto of, then thee is in C aath0 a0 b0 a b s s2 such that, fo each k 0, k ( ) i a i = i=0 k i=0 The states s i ae nonnegative integes, and so i=0 b i ( ) i a i = i=0 ( ) i + s k+ b i ( ) k+ ( ) i in Q. Let us show that C is finite. Fom a state s, it is ossible to each the state s + k, k, if thee exist a and b in A such that (s + a) =(s + k)+b, that is, if s = a k b. Since a,b 0, the lagest accessible state is { } ( ) k s max max + k k max k ( ) ( ) k }{{} >0 = and hence the tansduce C is finite. Now, suose that s a b s and s a b s, a a.then(a + s) and(a + s) ae conguent (mod), hence a and a ae conguent (mod ), which is imossible. Thus, the tansduce C, whee the edges Ẽ ae defined by s a b C s s b a C s, is also ight seuential, and C ealizes the convesion fom -eesentations. -eesentations to This esult says that thee is a one-to-one maing between the sets of all -and -eesentations of a given x Z. This maing, moeove, eseves eventual eiodicity, meaning that the eventually eiodic infinite wods ae maed to 2 Wods ae ocessed fom ight to left.

RATIONAL BASE NUMBER SYSTEMS FOR P -ADIC NUMBERS 05 -exansions. This is not a suising esult as it is still tue that only ational numbes can have an eventually eiodic -eesentation. Regading the finiteness of the exansions, thee is a diffeence. But finding those ationals with finite -eesentations can be done in the efectly analogous way we used fo the case in Poosition 3.7. Theoem 4. can be easily modified also fo the two negative base systems fom (.4). Since the comosition of two finite seuential tansduces is again a finite seuential tansduce, the theoem is valid fo any ai of numbe systems fom (.4). This convesion still eseves eventual eiodicity. The uestion on finiteness fo the negative base cases is a bit moe comlex. The two systems with negative ational base ae canonical numbe systems (see [2] fomoe),i.e., each x in Z has a uniue finite eesentation, but thee ae also ational numbes with finite eesentations. 4.2. Convesion fom the intege base system Anothe natual uestion is whethe thee exists a convete of eesentations in intege base to -eesentations. The answe is ositive, but the convete is not finite. This is an exected esult since if thee existed such a finite convete, thee would be a finite convete fom the language A of standad ositive intege eesentations to the non-context-fee language L, which is not ossible. Algoithm 4.2. Denote by a a 0 N A the inut and by b b 0 N A the outut. The ewiting ule is defined by: z 0 =0,i=0and (z i,i) ai bi (z i+,i+), with a i,b i A such that a i i + z i = b i + z i+. Clealy, z i is always nonnegative and uniuely given. Poosition 4.3. Let be a ime facto of and let a a 0 N A such that x = i=0 a i i Z. Then fo the outut b b 0 N A of Algoithm 4.2 we have x = ( ) i b i i=0 Z. Poof. The oof is simle, it follows fom the fact that z 0 =0= b 0 + z a 0 = b 0 + b ( ) 2 + z 2 a a 0 k ( ) i ( ) k+ b i = = + z k+ i=0 k a i i i=0

06 C. FROUGNY AND K. KLOUDA fo all k N and fom that ( ) k+ z k+ 0 as i. This convesion eseves finiteness. Note that Algoithm 4.2 allows to define a lette-to-lette ight seuential tansduce with a denumeable set of states ealizing the convesion. Lemma 4.4. If the inut of Algoithm 4.2 is finite (i.e., eventually zeo), then the outut is finite as well. Poof. Let the inut be eual to a a 0 N A whee a i =0foalli>k N. Then fo all j N z k+j+ = ( z k+j b ) k+j <z k+j if z k+j 0ob k+j 0. Thus, the seuences (z i ) i 0 and (b i ) i 0 must be eventually zeo. The inut is finite if it is a eesentation of a nonnegative intege in base. This imlies that the lemma cannot be evesed since, as we know, thee ae finite oututs obtained fo infinite inuts (a tivial examle is the eesentations of ). Acknowledgements. We acknowledge financial suot by the Agence Nationale de la Recheche, gant ANR-JCJC-06-34288 DyCoNum, by the Czech Science Foundation gant 20/09/0584, and by the gants MSM6840770039 and LC06002 of the Ministy of Education, Youth, and Sots of the Czech Reublic. We also thank the CTU student gant SGS0/085/OHK4/T/4. Refeences [] S. Akiyama, Ch. Fougny and J. Sakaovitch, Powes of ationals modulo and ational base numbe systems. Is. J. Math. 68 (2008) 53 9. [2] I. Kátai and J. Szabó, Canonical numbe systems fo comlex integes. Acta Sci. Math. (Szeged) 37 (975) 255 260. [3] M. Lothaie, Algebaic Combinatoics on Wods, Encycloedia of Mathematics and its Alications 95. Cambidge Univesity Pess (2002). [4] K. Mahle, An unsolved oblem on the owes of 3/2. J. Austal. Math. Soc. 8 (968) 33 32. [5] M.R. Muty, Intoduction to -adic analytic numbe theoy. Ameican Mathematical Society (2002). [6] A. Odlyzko and H. Wilf, Functional iteation and the Josehus oblem. Glasg. Math. J. 33 (99) 235 240. [7] A. Rényi, Reesentations fo eal numbes and thei egodic oeties. Acta Math. Acad. Sci. Hunga. 8 (957) 477 493. [8] W.J. Robinson, The Josehus oblem. Math. Gaz. 44 (960) 47 52. [9] J. Sakaovitch, Elements of Automata Theoy. Cambidge Univesity Pess, New Yok (2009). Communicated by G. Richomme. Received Novembe 2, 200. Acceted July 4, 20.