Ultimate periodicity problem for linear numeration systems
aa r X i v : . [ c s . D M ] J u l ULTIMATE PERIODICITY PROBLEM FOR LINEARNUMERATION SYSTEMS ´E. CHARLIER , A. MASSUIR , M. RIGO AND E. ROWLAND Abstract.
We address the following decision problem. Given anumeration system U and a U -recognizable set X ⊆ N , i.e. the setof its greedy U -representations is recognized by a finite automaton,decide whether or not X is ultimately periodic. We prove that thisproblem is decidable for a large class of numeration systems builton linearly recurrent sequences. Based on arithmetical consider-ations about the recurrence equation and on p -adic methods, theDFA given as input provides a bound on the admissible periods totest. Introduction
Let us first recall the general setting of linear numeration systemsthat are used to represent, in a greedy way, non-negative integers bywords over a finite alphabet of digits. See, for instance, [11]. Let N = { , , , . . . } . Definition 1. A numeration system is given by an increasing sequence U = ( U i ) i ≥ of integers such that U = 1 and C U := sup i ≥ ⌈ U i +1 U i ⌉ isfinite. Let A U = { , . . . , C U − } be the canonical alphabet of digits.The greedy U -representation of a positive integer n is the unique finiteword rep U ( n ) = w ℓ · · · w over A U satisfying n = ℓ X i =0 w i U i , w ℓ = 0 and t X i =0 w i U i < U t +1 , t = 0 , . . . , ℓ. We set rep U (0) to be the empty word ε . A set X ⊆ N of integers is U -recognizable if the language rep U ( X ) over A U is regular (i.e. acceptedby a finite automaton).Recognizable sets of integers are considered as particularly simplebecause membership can be decided by a deterministic finite automaton Mathematics Subject Classification.
Key words and phrases.
Decision problem ; numeration system ; automata the-ory ; linear recurrent sequence ; p -adic valuation. , A. MASSUIR , M. RIGO AND E. ROWLAND in linear time with respect to the length of the representation. It is well-known that such a property for a subset of N depends on the choice ofthe numeration system. For a survey on integer base systems, see [6].For generalized numeration systems, see [21]. Definition 2. If x = x ℓ · · · x is a word over an alphabet of integers,then the U -numerical value of x isval U ( x ) = ℓ X i =0 x i U i . From the point of view of formal languages, it is quite desirable thatrep U ( N ) is regular ; we want to be able to check whether or not a wordis a valid greedy U -representation. This implies that U must satisfiesa linear recurrence relation. See, for instance, [24] or [2, Prop. 3.1.5]. Definition 3.
A numeration system U is said to be linear if it ulti-mately satisfies a homogeneous linear recurrence relation with integercoefficients. There exist k ≥ a k − , . . . , a ∈ Z such that a = 0 and N ≥ i ≥ N ,(1.1) U i + k = a k − U i + k − + · · · + a U i . The polynomial X N ( X k − a k − X k − − · · · − a ) is called the character-istic polynomial of the system.The regularity of rep U ( N ) is also important for another reason. Thelanguage rep U ( N ) is regular if and only if every ultimately periodic setof integers is U -recognizable [17, Thm. 4]. In particular, as recalled inProposition 11, if an ultimately periodic set X is given, then a DFAaccepting rep U ( X ) can effectively be obtained.In this paper, we address the following decidability question. Ouraim is to prove that this problem is decidable for a large class of nu-meration systems. Problem 1.
Given a linear numeration system U and a (determinis-tic) finite automaton A whose accepted language is contained in thenumeration language rep U ( N ), decide whether the subset X of N thatis recognized by A is ultimately periodic, i.e. whether or not X is afinite union of arithmetic progressions (along a finite set).This question about ultimately periodic sets is motivated by the cel-ebrated theorem of Cobham. Let p, q ≥ p and q are multiplicatively independent, i.e. log( p )log( q ) is irrational, then the ulti-mately periodic sets are the only sets that are both p -recognizable and q -recognizable [8]. These are exactly the sets definable by a first-order LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 3 formula in the Presburger arithmetic h N , + i . Cobham’s result has beenextended to various settings ; see [9, 20] for an application to morphicwords. See [10] for a survey.In this paper, we write greedy U -representations with most signif-icant digit first (MSDF convention): the leftmost digit is associatedwith the largest U ℓ occurring in the decomposition. Considering leastsignificant digit first would not affect decidability (a language is regularif and only if its reversal is) but this could have some importance interms of complexity issues not discussed here. What is known.
Let us quickly review cases where the decisionproblem is known to be decidable. Relying on number theoretic re-sults, the problem was first solved by Honkala for integer base systems[15]. An alternative approach bounding the syntactic complexity of ul-timately periodic sets of integers written in base b was studied in [16].Recently a deep analysis of the structure of the automata acceptingultimately periodic sets has lead to an efficient decision procedure forinteger base systems [19, 4, 18]. An integer base system is a particularcase of a Pisot system, i.e. a linear numeration system whose charac-teristic polynomial is the minimal polynomial of a Pisot number (analgebraic integer larger than 1 whose conjugates all have modulus lessthan one). For these systems, one can make use of first-order logic andthe decidable extension h N , + , V U i of Presburger arithmetic [5]. For aninteger base p , V p ( n ) is the largest power of p dividing n . A typicalexample of Pisot system is given by the Zeckendorf system based onthe Fibonacci sequence 1 , , , , , . . . . Given a U -recognizable set X ,there exists a first-order formula ϕ ( n ) in h N , + , V U i describing X . Theformula ( ∃ N )( ∃ p )( ∀ n ≥ N )( ϕ ( n ) ⇔ ϕ ( n + p ))thus expresses when X is ultimately periodic, N being a preperiodand p a period of X . The logic formalism can be applied to systemssuch that the addition is U -recognizable by an automaton, i.e. the set { ( x, y, z ) ∈ N : x + y = z } is U -recognizable. This is the case for Pisotsystems [12].When addition is not known to be U -recognizable, other techniquesmust be sought. Hence the problem was also shown to be decid-able for some non-Pisot linear numeration systems satisfying a gapcondition lim i → + ∞ U i +1 − U i = + ∞ and a more technical conditionlim m → + ∞ N U ( m ) = + ∞ where N U ( m ) is the number of residue classesthat appear infinitely often in the sequence ( U i mod m ) i ≥ ; see [1]. Anexample of such a system is given by the relation U i = 3 U i − + 2 U i − +3 U i − [13]. For extra pointers to the literature (such as an extension ´E. CHARLIER , A. MASSUIR , M. RIGO AND E. ROWLAND to a multidimensional setting), the reader can follow the introductionin [1]. Our contribution.
In view of the above summary, we are lookingfor a decision procedure that may be applied to non-Pisot linear numer-ation systems such that N U ( m )
6→ ∞ when m tends to infinity. Hencewe want to take into account systems where we are not able to applya decision procedure based on first-order logic nor on the techniquefrom [1]. We follow Honkala’s original scheme: if a DFA A is given asinput (the question being whether the corresponding recognized subsetof N is ultimately periodic), the number of states of A should providean upper bound on the admissible preperiods and periods. If there isa finite number of such pairs to test, then we build a DFA A N,p foreach pair (
N, p ) and one can test whether or not two automata A and A N,p accept the same language. This provides us with a decision pro-cedure. Roughly speaking, if the given DFA is “small”, then it cannotaccept an ultimately periodic set with a minimal period being “overlycomplicated”, i.e. “quite large”.
Example 4.
Here is an example of a numeration system based ona Parry (the β -expansion of 1 is finite or ultimately periodic, see [2,Chap. 2]) non-Pisot number β : U i +4 = 2 U i +3 + 2 U i +2 + 2 U i . Indeed, the largest root β of the characteristic polynomial is roughly2 . − .
134 is another root of modulus larger than one. Withthe initial conditions 1 , , ,
23, rep U ( N ) is the regular language over { , , } of words avoiding factors 2202, 221 and 222. For details, see[2, Ex. 2.3.37]. When m is a power of 2, there is a unique congruenceclass visited infinitely often by the sequence ( U i mod m ) i ≥ because U i ≡ r ) for large enough i . For such an example, N U ( m ) doesnot tend to infinity and thus the previously known decision proceduresmay not be applied. This is a perfect candidate for which no decisionprocedures are known.This paper is organized as follows. In Section 2, we make clear ourassumptions on the numeration system. In Section 3, we collect severalknown results on periodic sets and U -representations. In particular, werelate the length of the U -representation an integer to its value. Thecore of the paper is made of Section 4 where we discuss cases to boundthe admissible periods. In particular, we consider two kinds of primefactors of the admissible periods: those that divide all the coefficientsof the recurrence and those that don’t, see (4.1). In Section 5, we ap-ply the discussion of the previous section. First, we obtain a decision LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 5 procedure when the gcd of the coefficients of the recurrence relationis 1, see Theorem 30. This extends the scope of results from [1]. Onthe other hand, if there exist primes dividing all the coefficients, ourapproach heavily relies on quite general arithmetic properties of lin-ear recurrence relations. It has therefore inherent limitations becauseof notoriously difficult results in p -adic analysis such as finding boundson the growth rate of blocks of zeroes in p -adic numbers of a special log-arithmic form. We discuss the question and give illustrations of these p -adic techniques in Section 6. The paper ends with some concludingremarks. 2. Our setting
We have minimal assumptions on the considered linear numerationsystem U .(H1) N is U -recognizable ;(H2) There are arbitrarily large gaps between consecutive terms:lim sup i → + ∞ ( U i +1 − U i ) = + ∞ . (H3) The gap sequence ( U i +1 − U i ) i ≥ is ultimately non-decreasing:there exists N ≥ i ≥ N , U i +1 − U i ≤ U i +2 − U i +1 . Let us make a few comments. (H1) gives sense and meaning to ourdecision problem ; under that assumption, ultimately periodic sets are U -recognizable. As recalled in the introduction, it is a well-known re-sult that (H1) implies that the numeration system ( U i ) i ≥ must satisfya linear recurrence relation with integer coefficients. The assumptions(H2) and (H3) imply that lim i → + ∞ ( U i +1 − U i ) = + ∞ . However, inmany cases, even if lim i → + ∞ ( U i +1 − U i ) = + ∞ , the gap sequence maydecrease from time to time.The main reason why we introduce (H3) is the following one. Let10 j w be a greedy U -representation for some j ≥
0. Assume (H3) and i = | w | + ℓ ≥ N . Then for all ℓ ′ ≥ ℓ , 10 ℓ ′ w is a greedy U -representationas well. Indeed, if n is a non-negative integer such that U i + n < U i +1 ,then U i +1 + n = U i +1 − U i + U i + n ≤ U i +2 − U i +1 + U i + n < U i +2 . Hence U i ′ + n < U i ′ +1 for all i ′ ≥ i , meaning that as soon as the greedinessproperty is fulfilled, one can shift the leading 1 at every larger index.This is not always the case, as seen in Example 9.This property will be used in Corollary 8, which in turn will becrucial in the proofs of Propositions 17 and 22 as well as Theorem 29, ´E. CHARLIER , A. MASSUIR , M. RIGO AND E. ROWLAND where we construct U -representations with leading 1’s in convenientpositions.Note that Example 4 satisfies the above assumptions. Example 5.
Our toy example that will be treated all along the paperis given by the recurrence U i +3 = 12 U i +2 + 6 U i +1 + 12 U i . Even thoughthe system is associated with a Pisot number, it is still interesting be-cause N U ( m ) does not tend to infinity (so we cannot follow the decisionprocedure from [1]) and the gcd of the coefficients of the recurrence islarger than 1. Let r ≥
1. If m is a power of 2 or 3, then U i ≡ r ) (resp. U i ≡ r )) for large enough i . By taking theinitial conditions 1 , , U -representations isregular. For the reader aware of β -numeration systems, let us mentionthat this choice of initial conditions corresponds to the Bertrand initialconditions, in which case the language rep U ( N ) is equal to the set offactors (with no leading zeroes) occurring in the β -expansions of realnumbers where β is the dominant root of the characteristic polynomial X − X − X −
12 of the recurrence relation of the system U [3].3. Some classical lemmas
A set X ⊆ N is ultimately periodic if its characteristic sequence X ∈ { , } N is of the form uv ω where u, v are two finite words over { , } . It is assumed that u, v are chosen of minimal length. Hence the period of X denoted by π X is the length | v | and its preperiod is thelength | u | . We say that X is (purely) periodic whenever the preperiodis zero. The following lemma is a simple consequence of the minimalityof the period chosen to represent an ultimately periodic set. Lemma 6.
Let X ⊆ N be an ultimately periodic set of period π X andlet i, j be integers greater than or equal to the preperiod of X . If i j (mod π X ) then there exists r < π X such that either i + r ∈ X and j + r X or, i + r X and j + r ∈ X . Our assumption (H2) permits us to extend greedy U -representationswith some extra leading digits. See [1, Lemma 7] for a proof. Lemma 7.
Let U be a numeration system satisfying (H2). Then forall i ≥ and all L ≥ i , there exists ℓ ≥ L such that ℓ −| rep U ( t ) | rep U ( t ) , t = 0 , . . . , U i − are greedy U -representations. Otherwise stated, if w is a greedy U -representation, then there exist arbitrarily large r such that the word r w is also a greedy U -representation. LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 7
When N is U -recognizable, using a pumping-like argument, we cangive an upper bound on the number of zeroes to be inserted. Corollary 8.
Let U be a numeration system satisfying (H1) and (H2).Then there exists an integer constant C > such that if w is a greedy U -representation then, for some ℓ < C , ℓ w is also a greedy U -representation. If furthermore U satisfies (H3) then ℓ ′ w is greedyfor all ℓ ′ ≥ ℓ .Proof. By assumption (H1), there exists a DFA, say with C states,accepting the language rep U ( N ). Let w be a greedy U -representation.Then from Lemma 7, there exists r ≥ C such that 10 r w ∈ rep U ( N ).The path of label 10 r w starting from the initial state is accepting. Since r ≥ C , a state is visited at least twice when reading the block 0 r . Thusthere exists an accepting path of label 10 ℓ w with ℓ < C .We now turn to the special case. We proceed by induction. If 10 ℓ w is a greedy U -representation, thenval U (10 ℓ w ) = U ℓ + | w | + val U ( w ) < U ℓ + | w | +1 . Under (H3), U ℓ + | w | +1 − U ℓ + | w | ≤ U ℓ + | w | +2 − U ℓ + | w | +1 , adding together both sides of the two inequalities leads to U ℓ + | w | +1 +val U ( w ) < U ℓ + | w | +2 meaning that 10 ℓ +1 w is a greedy U -representation. (cid:3) Example 9.
The sequence 1 , , , , , , , , . . . is a solution ofthe linear recurrence U i +4 = 5 U i +2 − U i but it does not satisfy (H3).The property stated in the last part of Corollary 8 does not hold: onlysome shifts to the left of the leading coefficient 1 lead to valid greedyexpansions. The word 1001 is the greedy representation of 6 but for all t ≥
1, 1(00) t Example 10.
The sequence 1 , , , , , , , , , , , . . . is asolution of the linear recurrence U i +3 = 4 U i . The numeration language0 ∗ rep U ( N ) is the set of suffixes of { , , , } ∗ , hence (H1)holds. For all i ≥ U i +1 − U i = 4 ⌊ i/ ⌋ . Therefore, (H2) and (H3) arealso verified.We will also make use of the following folklore result. See, for in-stance, [2, Prop. 3.1.9]. It relies on the fact that a linearly recurrentsequence is ultimately periodic modulo Q . Proposition 11.
Let
Q, r ≥ . Let A ⊆ N be a finite alphabet. If U is a linear numeration system, then { w ∈ A ∗ | val U ( w ) ∈ Q N + r } ´E. CHARLIER , A. MASSUIR , M. RIGO AND E. ROWLAND is accepted by a DFA that can be effectively constructed. In particu-lar, whenever N is U -recognizable, i.e. under (H1), then any ultimatelyperiodic set is U -recognizable. Under assumption (H1) the formal series P i ≥ U i X i is N -rationalbecause U i is the number of words of length less than or equal to i inthe regular language rep U ( N ). One can therefore make use of Soittola’stheorem [23, Thm. 10.2]: The series is the merge of rational series withdominating eigenvalues and polynomials. We thus define the followingquantities. Definition 12.
We introduce an integer u and a real number β de-pending only on the numeration system. From Soittola’s theorem,there exist an integer u ≥
1, real numbers β , . . . , β u − ≥ P , . . . , P u − such that for r ∈ { , . . . , u − } and largeenough i , U ui + r = P r ( i ) β ir + Q r ( i )where Q r ( i ) β ir → i → ∞ . Since ( U i ) i ≥ is increasing, for r < s < u ,for all i , we have U ui + r < U ui + s < U u ( i +1)+ r . By letting i tend to infinity, this shows that we must have β = · · · = β u − that we denote by β and deg( P ) = · · · = deg( P u − ) that wedenote by d . Otherwise stated, U ui + r ∼ c r i d β i for some constant c r .Finally, let T be such that c T = max ≤ r u = 1. Lemma 13.
With the notation of Definition 12, if β > then thereexists nonnegative constants K and L such that for all n , | rep U ( n ) | < u log β ( n ) + K and | rep U ( n ) | > u log β ( n ) − u log β ( P T (log β ( n ) + K/u )) − L. This lemma shows that the length of the greedy U -representation of n grows at most like log β /u ( n ). If P T is a constant polynomial, thelower bound is of the form u log β ( n ) + L ′ for some constant L ′ . Fromthis result, we may express the weaker information (on ratios insteadof differences) that | rep U ( n ) | ∼ u log β ( n ). The intricate form of the LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 9 lower bound can be seen on an example such as ( U i ) i ≥ = ( i d i ) i ≥ . Insuch a case, we get log ( n ) < | rep U ( n ) | + d log ( | rep U ( n ) | ). Hence alower bound for | rep U ( n ) | is less than log ( n ). Proof.
We have | rep U ( n ) | = ℓ if and only if U ℓ − ≤ n < U ℓ . We makeuse of Definition 12 for u , β and T . Let j = ⌊ ℓ − − Tu ⌋ . Since U isincreasing, U ℓ − ≥ U ju + T = P T ( j ) β j + Q T ( j ) . We getlog β ( n ) ≥ log β ( U ℓ − ) ≥ j + log β ( P T ( j )) + log β (cid:18) Q T ( j ) P T ( j ) β j (cid:19) . We also have j > ℓ − − Tu − ≥ ℓ − uu − ℓu −
2. From Definition 12,we know that P T ( i ) > i and that Q T ( i ) is in o ( β i ). So thereexists a constant K ≥ ℓ < u ( j + 2) ≤ u log β ( n ) + 2 u − u log β ( P T ( j )) − u log β (cid:18) Q T ( j ) P T ( j ) β j (cid:19) ≤ u log β ( n ) + K. We proceed similarly to get a lower bound for ℓ . Let k = ⌊ ℓ − Tu ⌋ .Since U is increasing, U ℓ < U u ( k +1)+ T = P T ( k + 1) β k +1 + Q T ( k + 1) . We getlog β ( n ) < log β ( U ℓ ) < k +1+log β ( P T ( k +1))+log β (cid:18) Q T ( k + 1) P T ( k + 1) β k +1 (cid:19) . Observe that k ≤ j + 1. Hence, from the first part, we get k + 1 ≤ j + 2 ≤ log β ( n ) + Ku .
We also have k ≤ ℓ − Tu ≤ ℓu . Similarly as in the first part of the proofand since P T is a non-decreasing polynomial, there exists a constant L ≥ ℓ ≥ uk > u log β ( n ) − u log β (cid:18) P T (cid:18) log β ( n ) + Ku (cid:19)(cid:19) − L. (cid:3) Example 14.
Consider the sequence 1 , , , , , , . . . defined by U = 1, U i +1 = 2 U i and U i +2 = 3 U i +1 . Then for all i ≥ U i +2 =6 U i . It is easily seen that U i = 6 i and U i +1 = 2 · i . With thenotation of Definition 12, u = 2, β = 6, d = 0 and P T = c T = , A. MASSUIR , M. RIGO AND E. ROWLAND
2. The language 0 ∗ rep U ( N ) is made of words where in even (resp.odd) positions when reading from right to left (i.e. least significantdigits first), we can write 0 , , , | rep U ( n ) | = 2 ℓ + 1then U ℓ = 6 ℓ ≤ n < U ℓ +1 = 2 · ℓ , so | rep U ( n ) | ≤ ( n ) + 1 and | rep U ( n ) | > ( n ) + 1 = 2 log ( n ) − (2) + 1. If | rep U ( n ) | = 2 ℓ then U ℓ − = 2 · ℓ − ≤ n < U ℓ = 6 ℓ , so | rep U ( n ) | ≤ (3 n ) =2 log ( n ) + 2 log (3) and | rep U ( n ) | > ( n ). Example 15.
Consider the sequence 1 , , , , , , . . . defined by U = 1, U = 3 and U i +2 = 4 U i +1 − U i . Then U i = ( i + 1)2 i . Withthe notation of Definition 12, u = 1, β = 2, d = 1 and P T = X + 1.If | rep U ( n ) | = ℓ then U ℓ − = ( ℓ − + 1)2 ℓ − ≤ n < U ℓ = ( ℓ + 1)2 ℓ ,so | rep U ( n ) | < log ( n ) + 1 and | rep U ( n ) | > log ( n ) − log ( ℓ + 1) > log ( n ) − log ( log ( n ) + ). With the notation of Lemma 13, K = 1and P T (log ( n ) + K + 2) = log ( n ) + .As shown by the next result. It is enough to obtain a bound on thepossible period of X . In [1, Prop. 44], the result is given in a moregeneral setting (i.e. for abstract numeration systems) and we restate itin our context. Proposition 16.
Let U be a numeration system satisfying (H1), let X ⊆ N be an ultimately periodic set and let A X be a DFA accepting rep U ( X ) . Then the preperiod of X is bounded by a computable constantdepending only on the size of A X and the period π X of X . Number of states
We follow Honkala’s strategy introduced in [15]. A DFA A X accept-ing rep U ( X ) is given as input. Assuming that X is ultimately periodic,the number of states of A X should provide an upper bound on thepossible period and preperiod of X . Roughly speaking, the minimalpreperiod/period should not be too large compared with the size of A X . This should leave us with a finite number of candidates to test.Thanks to Proposition 11, one therefore builds a DFA for each pairof admissible preperiod/period. Equality of regular languages beingdecidable, we compare the language accepted by this DFA and the oneaccepted by A X . If an agreement is found, then X is ultimately peri-odic, otherwise it is not. As a consequence of Proposition 16, we onlyfocus on the admissible periods.Assume that the minimal automaton A X of rep U ( X ) is given. Let π X be a potential period for X . We consider the prime decompositionof π X . There are three types of prime factors. LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 11 (1) Those that do not divide a .(2) Those that divide a but that do not simultaneously divide allthe coefficients of the recurrence relation.(3) The remaining ones are the primes dividing all the coefficientsof the recurrence relation.Our strategy is to bound those three types of factors separately.4.1. Factors of the period that are coprime with a . The nextresult shows that given A X , the possible period cannot have a largefactor coprime with a . So it provides a bound on this kind of factorthat may occur in a candidate period. Proposition 17.
Assume (H1), (H2) and (H3). Let X ⊆ N be anultimately periodic U -recognizable set and let q be a divisor of the period π X such that ( q, a ) = 1 . Then the minimal automaton of rep U ( X ) hasat least q states.Proof. Since ( q, a ) = 1, the sequence ( U i mod q ) i ≥ is purely periodic.In particular, 1 occurs infinitely often in this sequence.We will make use of Corollary 8. Let us define q integers k , . . . , k q ≥ q words w , . . . , w q ∈ { , } ∗ of the following form w j := 10 k j k j − · · · k | rep U ( π X ) | . Thanks to Corollary 8, we may impose the following conditions. • First, k is taken large enough to ensure that val U ( w ) is largerthan the preperiod of X and 10 k rep U ( π X ) is a valid greedy U -representation. • Second, k , . . . , k q are taken large enough to ensure that w j ∈ rep U ( N ) for all j . • Third, we can choose k , . . . , k q so that the 1’s occur at indices m such that U m ≡ q ).Observe that val U ( w j ) ≡ j (mod q ). Since q divides π X , the words w , . . . , w q have pairwise distinct values modulo π X .Let i, j ∈ { , . . . , q } such that i = j . By Lemma 6, we can assumethat there exists r i,j < π X such that val U ( w i ) + r i,j ∈ X and val U ( w j ) + r i,j X (the symmetric situation is handled similarly). In particular, | rep U ( r i,j ) | ≤ | rep U ( π X ) | . Consider the two words w i −| rep U ( r i,j ) | rep U ( r i,j ) and w j −| rep U ( r i,j ) | rep U ( r i,j )where, in the above notation, it should be understood that we replacethe rightmost zeroes in w i and w j by rep U ( r i,j ). The first word belongsto rep U ( X ) and the second does not. Consequently, the number of , A. MASSUIR , M. RIGO AND E. ROWLAND states of the minimal automaton of rep U ( X ) is at least q : w , . . . , w q belong to pairwise distinct Nerode equivalence classes. (cid:3) Prime factors of the period that divide a but do not di-vide all the coefficients of the recurrence relation. We departfrom the strategy developed in [1] and now turn to a particular situa-tion where a prime factor p of the candidate period for X is such that,for some integer µ ≥
1, the sequence ( U i mod p µ ) i ≥ has a period con-taining a non-zero element. Again, this will provide us with an upperbound on p and its exponent in the prime decomposition of the period. Definition 18.
We say that an ultimately periodic sequence has a zero period if it has period 1 and the repeated element is 0. Otherwisestated, the sequence has a tail of zeroes.
Remark 19.
Let µ ≥
1. Observe that if the periodic part of ( U i mod p µ ) i ≥ contains a non-zero element, then the same property holds forthe sequence ( U i mod p µ ′ ) i ≥ with µ ′ ≥ µ .Furthermore, assume that for infinitely many µ , ( U i mod p µ ) i ≥ hasa zero period. Then from the previous paragraph, we conclude that( U i mod p µ ) i ≥ has a zero period for all µ ≥ Example 20.
We give a sequence where only finitely many sequencesmodulo p µ have a zero period. Take the sequence U = 1, U = 4, U =8 and U i +2 = U i +1 + U i for i ≥
1, then the sequence ( U i mod 2 µ ) i ≥ hasa zero period for µ = 1 , µ ≥ Theorem 21.
Let p be a prime. The sequence ( U i mod p µ ) i ≥ has azero period for all µ ≥ if and only if all the coefficients a , . . . , a k − of the linear relation (1.1) are divisible by p .Proof. It is clear that if a , . . . , a k − are divisible by p , then for anychoice of initial conditions, U k , . . . , U k − are divisible by p , hence U k , . . . , U k − are divisible by p , and so on and so forth. Otherwisestated, for all µ ≥ i ≥ µk , U i is divisible by p µ .We turn to the converse. Since the sequence ( U i ) i ≥ is linearly re-current, the power series U ( x ) := X i ≥ U i x i LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 13 is rational. By assumption, ( U i mod p µ ) i ≥ has a zero period for all µ ≥
1. Otherwise stated, with the p -adic absolute value notation, | U i | p ≤ p − µ for large enough i , i.e. | U i | p → i → + ∞ . Recall that aseries P i ≥ γ i converges in Q p if and only if lim i → + ∞ | γ i | p = 0. Hencethe series U ( x ) converges in Q p in the closed unit disc. Therefore, thepoles ρ , . . . , ρ r ∈ C p of U ( x ) must satisfy | ρ j | p > ≤ j ≤ r .Let P ( x ) = 1 − a k − x − . . . − a x k be the reciprocal polynomial ofthe linear recurrence relation (1.1). By minimality of the order k ofthe recurrence, the roots of P are precisely the poles of U ( x ) with thesame multiplicities. If we factor P ( x ) = (1 − δ x ) · · · (1 − δ k x )each of the δ j is one of the ρ , . . . , ρ r . For n >
0, the coefficient of x n is an integer equal to a sum of product of elements of p -adic absolutevalue less than 1. Since | a + b | p ≤ max {| a | p , | b | p } , this coefficient is aninteger with a p -adic absolute value less than 1, i.e. a multiple of p . (cid:3) Thanks to Remark 19 and Theorem 21, if p is a prime not dividingall the coefficients of the recurrence relation (1.1) then there exists aleast integer λ (depending only on p ) such that ( U i mod p λ ) i ≥ has aperiod containing a non-zero element. Proposition 22.
Assume (H1), (H2) and (H3). Let p be a prime notdividing all the coefficients of the recurrence relation (1.1) and let λ ≥ be the least integer such that ( U i mod p λ ) i ≥ has a period containing anon-zero element. If X ⊆ N is an ultimately periodic U -recognizableset with period π X = p µ · r where µ ≥ λ and r is not divisible by p , thenthe minimal automaton of rep U ( X ) has at least p µ − λ +1 states.Proof. We will make use of the following observation. Let n ≥
1. In theadditive group ( Z /p n Z , +), an integer a has order p s with 0 ≤ s ≤ n ifand only if a = p n − s · m where m is not divisible by p .By assumption ( U i mod p λ ) i ≥ has a period containing a non-zeroelement R of order ord p λ ( R ) = p θ for some θ such that 0 < θ ≤ λ .Consider a large enough index K such that it is in the periodic partof ( U i mod p µ ) i ≥ and U K ≡ R (mod p λ ). Using the above observationtwice, U K = m · p λ − θ for some m coprime with p and therefore, U K hasorder ord p µ ( U K ) = p µ − λ + θ modulo p µ .We can again apply the same construction as in the proof of Propo-sition 17. We define words of the form w j := 10 k j k j − · · · k | rep U ( π X ) | , A. MASSUIR , M. RIGO AND E. ROWLAND with the same properties, except for the second one: the ones occur atindices t such that U t ≡ U K (mod p µ ). Note thatval U ( w j ) ≡ j · U K (mod p µ ) . Hence the number of distinct numerical values modulo p µ that are takenby those words is given by the order of U K in Z /p µ Z , i.e. p µ − λ + θ . Theconclusion follows in a similar way as in the proof of Proposition 17. (cid:3) Prime factors of the period that divide all the coefficientsof the recurrence relation.
We can factor the period π X as(4.1) π X = Q X · p µ · · · p µ t t where every p j divides all the coefficients of the recurrence relation (1.1)and, for every prime factor q of Q X , at least one of the coefficients ofthe recurrence relation (1.1) is not divisible by q . Otherwise stated,the factor Q X collects the prime factor of types (1) and (2). Remark 23.
There is a finite number of primes dividing all the co-efficients of the recurrence relation. Thus, we only have to obtain anupper bound on the corresponding exponents µ , . . . , µ t that may ap-pear in (4.1). Definition 24.
Let j ∈ { , . . . , t } and µ ≥
1. From Theorem 21,the sequence ( U i mod p µj ) i ≥ has a zero period. We denote by f p j ( µ )the length of the preperiod, i.e. U f pj ( µ ) − p µj ) and U i ≡ p µj ) for all i ≥ f p j ( µ ). Example 25.
Let us consider the numeration system from Example 4.The sequence ( U i mod 2) i ≥ is 1 , , , , ω . Hence f (1) = 4. The se-quence ( U i mod 4) i ≥ is 1 , , , , , , , , ω . Hence f (2) = 8. Contin-uing this way, we have f (3) = 12 and f (4) = 16.Note that f p j is non-decreasing: f p j ( µ + 1) ≥ f p j ( µ ). Definition 26.
We denote by M X the maximum of the values f p j ( µ j )for j ∈ { , . . . , t } : M X = max ≤ j ≤ t f p j ( µ j ) . Thus, M X is the least index such that for all i ≥ M X and all j ∈{ , . . . , t } , U i ≡ p µ j j ). By the Chinese remainder theorem, M X is also the least index such that for all i ≥ M X , U i ≡ π X Q X ). Inparticular, U M X ≥ π X Q X and thus, | rep U ( π X Q X − | ≤ M X . Example 27.
Let us consider the numeration system from Example 5.Here we have two prime factors 2 and 3 to take into account. Computa-tions show that f (1) = 3, f (2) = 5, f (3) = 7 and f (1) = 3, f (2) = 6, LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 15 f (3) = 9. Assume that we are interested in a period π X = 72 = 2 . .With the above definition, M X = max( f (3) , f (2)) = 7. One can checkthat ( U i mod 72) i ≥ is 1 , , , , , , , ω .We introduce a quantity γ Q X which only depends on the numerationsystem U and the number Q X defined in (4.1). Since we are onlyinterested in decidable issues, there is no need to find a sharp estimateon this quantity. Definition 28.
Under (H1), for each r ∈ { , . . . , Q − } , a DFA ac-cepting the language rep U ( Q N + r ) can be effectively built (see Propo-sition 11 or the construction in [2, Prop. 3.1.9]). We let γ Q denote themaximum of the numbers of states of these DFAs for r ∈ { , . . . , Q − } .The crucial point in the next statement is that the most significantdigit 1 occurs for U M X − in a specific word. The proof makes useof the same kind of arguments built for definite languages as in [16,Lemma 2.1]. Theorem 29.
Assume (H1), (H2) and (H3). Let X ⊆ N be an ulti-mately periodic U -recognizable set with period π X factored as in (4.1) .Assume that M X − | rep U ( π X Q X − | ≥ C where C is the constant givenin Corollary 8. Then the minimal automaton of rep U ( X ) has at least γ QX ( | rep U ( π X Q X − | + 1) states. This result will provide us with an upper bound on µ , . . . , µ t (detailsare given in Section 5.2). Since Q X has been bounded in the first partof this paper, if max( µ , . . . , µ t ) → ∞ , then π X Q X → ∞ but therefore thenumber of states of the minimal automaton of rep U ( X ) should increase. Proof.
We may apply Corollary 8 and consider the given positive con-stant C : we will assume that if w is a greedy U -representation, then,for all n ≥ C −
1, 10 n w also belongs to rep U ( N ).For every r ∈ { , . . . , Q X − } , the set X ∩ ( Q X N + r ) has a perioddividing π X Q X and at least one of these subsets has period exactly π X Q X . Sowe can choose an r ∈ { , . . . , Q X − } such that the set X ∩ ( Q X N + r )has period π X Q X .Let B be the minimal automaton of rep U ( X ∩ ( Q X N + r )). We willprovide a lower bound on the number of states of this automaton. Bydefinition of M X , we have U M X − π X Q X ). Let g ≥ C − U M X + g is larger than the preperiod of X ∩ ( Q X N + r ). By Lemma 6 applied to the set X ∩ ( Q X N + r ), since U M X + g + U M X − U M X + g (mod π X Q X ), we may suppose that there exists , A. MASSUIR , M. RIGO AND E. ROWLAND s < π X Q X such that U M X + g + U M X − + s ∈ X ∩ ( Q X N + r ) and U M X + g + s X ∩ ( Q X N + r )(the symmetrical situation is treated in the same way). Let ℓ X := | rep U ( π X Q X − | . Note that | rep U ( s ) | ≤ ℓ X and then by assumption, M X − − | rep U ( s ) | ≥ M x − − ℓ X ≥ C −
1. Thanks to Corollary 8,both words u := 10 g M X − −| rep U ( s ) | rep U ( s )and v := 10 g M X − −| rep U ( s ) | rep U ( s )are greedy U -representations. For all ℓ ≥
0, define an equivalencerelation E ℓ on the set of states of B : E ℓ ( q, q ′ ) ⇔ ( ∀ x ∈ A ∗ U ) (cid:2) | x | ≥ ℓ ⇒ ( δ ( q, x ) ∈ F ⇔ δ ( q ′ , x ) ∈ F ) (cid:3) where δ (resp. F ) is the transition function (resp. the set of final states)of B . Let us denote the number of equivalence classes of E ℓ by P ℓ .Clearly, E ℓ ( q, q ′ ) implies E ℓ +1 ( q, q ′ ), and thus P ℓ ≥ P ℓ +1 .Let i ∈ { , . . . , ℓ X } . By assumption, ℓ X < M X . Since u and v havethe same suffix of length M X −
1, we can factorize these words as u = u i w i and v = v i w i where | w i | = i . Let q be the initial state of B . By construction, δ ( q , u i w i ) ∈ F whereas δ ( q , v i w i ) / ∈ F , hence the states δ ( q , u i ) and δ ( q , v i ) are not in relation with respect to E i . But for all j > i , theysatisfy E j . It is enough to show that(4.2) E i +1 ( δ ( q , u i ) , δ ( q , v i )) . Figures 1 and 2 can help the reader. Let x be such that | x | = i + t ,with t ≥
1. Let p be the prefix of rep U ( s ) of length | rep U ( s ) | − i , thisprefix p being empty whenever this difference is negative. If we replace w i by x in u and v , we get u i x = 10 g M X − −| px | + t px and v i x = 10 g M X − −| px | + t px. Then val U ( u i x ) − val U ( v i x ) = U M X + t − and by definition of M X , U M X + t − ≡ π X Q X ). Hence, val U ( u i x )and val U ( v i x ) belong to the periodic part of X ∩ ( Q X N + r ) and theydiffer by a multiple of the period. Therefore, val U ( u i x ) belongs to X ∩ ( Q X N + r ) if and only if so does val U ( v i x ).In order to obtain (4.2), it remains to show that either both u i x and v i x are valid greedy U -representations or both are not. If the word px is not a greedy U -representation then neither u i x nor v i x can be LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 17 u : i ≤ ℓ X M X − u i w i rep U ( s ): pv i v : w i tx Figure 1.
The different words (case where i ≤ | rep U ( s ) | ). u : i ≤ ℓ X M X − u i w i rep U ( s ): v i v : w i tx Figure 2.
The different words (case where i > | rep U ( s ) | ).valid. Assume now that px is a greedy U -representation. Note that inboth situations described in Figures 1 and 2, | px | ≤ ℓ X + t . Thanksto the assumption, M X − − | px | + t ≥ M X − − ℓ X ≥ C −
1. Thegreediness of px and Corollary 8 imply that 10 M X − −| px | + t px is a greedy U -representation. Since g ≥ C − u i x is also a greedy U -representationand the same observation trivially holds for v i x .We conclude that P > P > · · · > P ℓ X ≥ . Since P is the number of states of B , the automaton B has at least ℓ X + 1 states.Let A X and A r be the minimal automata of rep U ( X ) and rep U ( Q X N + r ) respectively. The number of states of A r is bounded by γ Q X . TheDFA B is a quotient of the product automaton A X × A r , hence the , A. MASSUIR , M. RIGO AND E. ROWLAND number of states of B is at most the number of states of A X times γ Q X .We thus obtain that the number of states of A X is at least ℓ X +1 γ QX . (cid:3) Cases we can deal with
The gcd of the coefficients of the recurrence relation is . In this case, for any ultimately periodic set X , the factorization ofthe period π X given in (4.1) has the special form π X = Q X and theaddressed decision problem turns out to be decidable. Theorem 30.
Let U be a linear numeration system satisfying (H1),(H2) and (H3), and such that the gcd of the coefficients of the recur-rence relation (1.1) is . Given a DFA A accepting a language con-tained in the numeration language rep U ( N ) , it is decidable whether thisDFA recognizes an ultimately periodic set.Proof. Assume that X is an ultimately periodic set with period π X .Let p be a prime that divides π X . Either p divides the last coefficientof the recurrence relation a , or it does not.In the latter case, thanks to Proposition 17, for any n ≥
1, if p n divides π X then p n is bounded by the number of states of A .In the former case, p divides a . Note that there is only a finite num-ber of such primes. By assumption, p does not divide all the coefficientsof the recurrence relation. Then thanks to Theorem 21, there exists µ ≥ U i mod p µ ) i ≥ contains anon-zero element. Let λ be the least such µ . By an exhaustive search,one can determine the value of λ : one finds the period of a sequence( U i mod p µ ) i ≥ as soon as two k -tuples ( U i mod p µ , . . . , U i + k − mod p µ )are identical (where k is the order of the recurrence). We then applyProposition 22. For any n ≥
1, if p n divides π X then either n < λ or p n − λ +1 is bounded by the number of states of A .The previous discussion provides us with an upper bound on π X , i.e.on the admissible periods for X . Then from Proposition 16, associatedwith each admissible period, there is a computable bound for the cor-responding admissible preperiods for X . We conclude that there is afinite number of pairs of candidates for the preperiod and period of X .Similar to Honkala’s scheme, we therefore have a decision procedure byenumerating a finite number of candidates. For each pair ( a, b ) of pos-sible preperiods and periods, there are 2 a b corresponding ultimatelyperiodic sets X . For each such candidate X , we build a DFA acceptingrep U ( X ) and compare it with A . We can conclude since equality ofregular languages is decidable. (cid:3) LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 19
There exist recurrence relations with that property but that werenot handled in [1]. Take [1, Example 35] U i +5 = 6 U i +4 + 3 U i +3 − U i +2 + 6 U i +1 + 3 U i , ∀ i ≥ . For this recurrence relation, N U (3 i )
6→ ∞ . The characteristic poly-nomial has the dominant root 3 + 2 √ , , , , ∗ rep U ( N ) is the set of words over { , , . . . , } avoiding the factors63 , , ,
66, hence (H1) holds. Moreover, it is easily checked that forall i ≥ U i +1 − U i ≥ U i . Therefore, the system U also satisfies (H2)and (H3).5.2. The gcd of the coefficients of the recurrence relation islarger than 1. If X is an ultimately periodic set with period π X = Q X · p µ · · · p µ t t with t ≥ M X is well-defined. Theorem 29 has a major assumption. The quantity n X := M X − | rep U (cid:16) π X Q X − (cid:17) | should be larger than some positive constant C , which only dependson the numeration system U . Theorem 31.
Let U be a linear numeration system satisfying (H1),(H2) and (H3), and such that the gcd of the coefficients of the recur-rence relation (1.1) is larger than 1. Let C be the constant given inCorollary 8. Assume there exists a computable positive integer D suchthat for all ultimately periodic sets X of period π X = Q X · p µ · · · p µ t t asin (4.1) with t ≥ , if max( µ , . . . , µ t ) ≥ D then n X ≥ C . Then, givena DFA A accepting a language contained in the numeration language rep U ( N ) , it is decidable whether this DFA recognizes an ultimately pe-riodic set.Proof. Assume that X is an ultimately periodic set with period π X = Q X · p µ · · · p µ t t as in (4.1). Note that there are only finitely many primesdividing all the coefficients of the recurrence relation (1.1), hence thepossible p , . . . , p t belongs to a finite set depending only on the numer-ation system U .Applying the same reasoning as in the proof of Theorem 30, Q X isbounded by a constant deduced from A . So the quantity γ Q X intro-duced in Definition 28 is also bounded. , A. MASSUIR , M. RIGO AND E. ROWLAND By hypothesis, there exists a computable positive integer constant D such that if max( µ , . . . , µ t ) ≥ D then n X ≥ C . The number of t -uples ( µ , . . . , µ t ) in { , . . . , D − } t is finite. So there is a finitenumber of periods π X of the form Q X · p µ · · · p µ t t with Q X boundedand ( µ , . . . , µ t ) in this set. We can enumerate them and proceed as inthe last paragraph of the proof of Theorem 30.We may now assume that max( µ , . . . , µ t ) ≥ D . Thanks to theassumption, n X ≥ C and we are able to apply Theorem 29: it providesa bound on π X Q X and thus on the possible exponents µ , . . . , µ t dependingonly on A . We conclude in the same way as in the proof of Theorem 30. (cid:3) In the last part of this section, we present a possible way to tacklenew examples of numeration systems by applying Theorem 31. Westress the fact that when π X is increasing then both terms M X and | rep U ( π X Q X − | are increasing. If β > f p j ( µ ) to be able to guarantee n X ≥ C .The p -adic valuation of an integer n , denoted ν p ( n ), is the exponentof the highest power of p dividing n . There is a clear link between ν p j and f p j : for all non-negative integers µ and N , f p j ( µ ) = N ⇐⇒ ( ν p j ( U N − ) < µ ∧ ∀ i ≥ N, ν p j ( U i ) ≥ µ ) . Remark 32.
With our Example 5 and initial conditions 1 , ,
3, com-puting the first few values of ν ( U i ) might suggest that it is boundedby a function of the form i + c , for some constant c . Nevertheless,computing more terms we get the following pairs ( i, ν ( U i )): (67 , , , , , c suggested by each of these points is respectively , , , , , which is increasing. This example explains the second term g ( i )in the function bounding ν p j ( U i ) in the next statement.In the next statement, the reader can think about logarithm functioninstead of a general function g . Indeed, for any ǫ >
0, for large enough i ,log( i ) < ǫ i . We also keep context and notation from (4.1). Lemma 33.
Let j ∈ { , . . . , t } and let β as in Definition 12. Assumethat β > and that there exist α, ǫ ∈ R > and a non-decreasing function g such that ν p j ( U i ) < ⌊ αi ⌋ + g ( i ) and there exists N such that g ( i ) < ǫ i for all i > N . Then, for largeenough µ , f p j ( µ ) > µα + ǫ . LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 21
Proof.
By definition of the p -adic valuation, p ν pj ( U i ) j | U i and p ν pj ( U i )+1 j ∤ U i . Thus, By definition of f p j , for all i , f p j ( ν p j ( U i ) + 1) ≥ i + 1 . For all µ , there exists i such that ⌊ αi ⌋ + g ( i ) ≤ µ < ⌊ α ( i + 1) ⌋ + g ( i + 1) . Take µ large enough so that i ≥ N . Using the right-hand side inequal-ity, µ < α ( i + 1) + ǫ ( i + 1) and we get i > µα + ǫ − . Using the left-hand side inequality, µ ≥ ⌊ αi ⌋ + g ( i ) > ν p j ( U i ). Since wehave integers on both sides, µ ≥ ν p j ( U i )+1. Since f p j is non-decreasing,for all large enough µ , f p j ( µ ) ≥ f p j ( ν p j ( U i ) + 1) ≥ i + 1 > µα + ǫ . (cid:3) We look for a lower bound for n X . Suppose that for each j ∈{ , . . . , t } , there exists α j , ε j , g j and N j as in the above lemma. Then M X = max j f p j ( µ j ) > max j (cid:18) µ j α j + ǫ j (cid:19) ≥ max j µ j max j ( α j + ǫ j ) . Second, let u and β as in Definition 12. By hypothesis, β >
1. ApplyingLemma 13, there exists a constant K such that | rep U ( π X Q X − | ≤ u log β Y j p µ j j ! + K. The right hand side is u X j µ j log β ( p j ) + K ≤ u (max j µ j ) X j log β p j + K. Consequently, n X ≥ max j µ j j ( α j + ǫ j ) − u X j log β p j ! − K. If π X tends to infinity (and assuming that the corresponding fac-tor Q X remains bounded as explained in the proof of Theorem 31),then max j µ j must also tend to infinity. So we are able to conclude, , A. MASSUIR , M. RIGO AND E. ROWLAND i.e. n X tends to infinity and in particular, n X will become larger than C (the constant from Corollary 8) whenever(5.1) 1max j ( α j + ǫ j ) > u X j log β p j . Actually, we don’t need n X tending to infinity, we have the weakerrequirement n X ≥ C . The constant D from Theorem 31 can be ob-tained as follows. To ensure that n X ≥ C , it is enough to have(5.2) max j µ j ≥ C + K j ( α j + ǫ j ) − u P j log β p j and the right hand side only depends on the numeration system U .As a conclusion, we simply define the constant D as the right handside in (5.2) and, under the assumption of Lemma 33 about the be-havior of the p j -adic valuations of ( U i ) i ≥ , the decision procedure ofTheorem 31 may thus be applied. From a practical point of view, eventhough n X tending to infinity is not required, testing (5.1) is relativelyeasy to estimate as seen in the following remark. This is not a formalproof, simply rough computations suggesting what could be the valueof α in Lemma 33. Remark 34.
One can first make some computational experiments.Take the numeration system of Example 4. If we compute ν ( U i ), thevalues for 41 ≤ i ≤
60 are given by10 , , , , , , , , , , , , , , , , , , , . Hence, one can conjecture that α = and the above condition (5.1)becomes ( u = 1), assuming ǫ to be negligible,4 > log . (2) ≃ . . Take the numeration system of Example 5. If we compute ν ( U i ),the values for 41 ≤ i ≤
60 are given by24 , , , , , , , , , , , , , , , , , , , ν ( U i )13 , , , , , , , , , , , , , , , , , , , . Hence, one can conjecture that α = and α = . The recurrence hasa real dominant root β ≃ . ǫ and ǫ to be negligible,the condition (5.1) is therefore2 > log . (2) + log . (3) ≃ . . LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 23 An incursion into p -adic analysis In this section, we discuss the requirement on the p -adic valuationgiven in Lemma 33. To that end, we reconsider our toy example.6.1. A second-order sequence.
Throughout this section, let U i +3 =12 U i +2 + 6 U i +1 + 12 U i with initial conditions U = 1 , U = 13 , U = 163be the sequence of Example 5. The 3-adic valuation of U i has a simplestructure. Theorem 35.
For all i ≥ , ν ( U i ) = (cid:22) i (cid:23) + ( if i if i ≡ . Proof.
Let T i = U i / i − . Since U i +3 = 12 U i +2 + 6 U i +1 + 12 U i , thesequence ( T i ) i ≥ satisfies the recurrence T i +3 = 4 · / T i +2 +2 · / T i +1 +4 T i . The initial terms are T = 3 / , T = 13 · / , T = 163, so it followsthat T i ∈ Z [3 / ] for all i ≥
0. Modulo 9 Z [3 / ], one computes that thesequence ( T i ) i ≥ is periodic with period length 27 and period3 / , · / , , · / , · / , , · / , · / , , / , / , , · / , · / , , · / , · / , , / , · / , , · / , · / , , · / , · / , . Therefore the sequence ( ν ( T i )) i ≥ of 3-adic valuations is23 , , , , , , , , , . . . with period length 9. (Here we use the natural extension of ν to afunction ν : Z [3 / ] → Z .) Equivalently, ν ( T i ) = (cid:22) i (cid:23) − i −
23 + ( i i ≡ . It follows that ν ( U i ) = i −
23 + ν ( T i ) = (cid:22) i (cid:23) + ( i i ≡ i ≥ (cid:3) Theorem 35 implies i − ≤ ν ( U i ) ≤ i +23 for all i ≥
0. In particular, ν ( U i ) < ⌊ i ⌋ +2, so the condition of Lemma 33 is satisfied, and thereforefor every ǫ > f ( µ ) > µ + ǫ , A. MASSUIR , M. RIGO AND E. ROWLAND for large enough µ . This takes care of one of the two primes dividing thecoefficients of the recurrence relation. We still have to discuss ν ( U i ).However, Theorem 35 is not representative of the behavior of ν p ( s i )for a general sequence ( s i ) i ≥ satisfying a linear recurrence with con-stant coefficients. For instance, the 2-adic valuation of the sequence( U i ) i ≥ is (much) more complicated. To study the more general set-ting, we will make use of the field Q p of p -adic numbers and its ring ofintegers Z p . The p -adic valuation ν p ( x ) of an element x ∈ Q p is relatedto its p -adic absolute value | x | p by | x | p = p − ν p ( x ) .Let | rep p ( n ) | be the number of digits in the standard base- p repre-sentation of n . For all n ≥
1, we can bound ν p ( n ) as ν p ( n ) ≤ | rep p ( n ) | − j p ) log( n ) k ≤ p ) log( n ) . (We avoid writing “log p ( n )” here to reserve log p for the p -adic loga-rithm, which will come into play shortly.) Proposition 36 below givesthe analogous upper bound on ν p ( n − ζ ) when ζ is a p -adic integerwhose sequence of base- p digits does not have blocks of consecutive 0sthat grow too quickly. Notation.
Let p be a prime, and let ζ ∈ Z p \ N . Write ζ = P i ≥ d i p i ,where each d i ∈ { , , . . . , p − } . For each a ≥
0, let ℓ ζ ( a ) ≥ d a = d a +1 = · · · = d a + ℓ ζ ( a ) − . Proposition 36.
Let p be a prime, and let ζ ∈ Z p \ N . If there existreal numbers C, D such that
C > , D ≥ − ( C +1) , and ℓ ζ ( a ) ≤ Ca + D for all a ≥ , then ν p ( n − ζ ) ≤ C + D +2log( p ) log( n ) for all n ≥ p .Proof. Write ζ = P i ≥ d i p i , where each d i ∈ { , , . . . , p − } . Foreach a ≥
0, define the integer ζ a := ( ζ mod p a ) = P a − i =0 d i p i . Then ν p ( ζ a − ζ ) = a + ℓ ζ ( a ).Let n ≥ p , and let a := | rep p ( n ) | ≥
2. Since ζ / ∈ N , the p -adicvaluation b := ν p ( n − ζ ) is an integer. There are two cases.If n ≤ ζ b , then in fact n = ζ b ; this is because n ≤ ζ b < p b , so n = ζ b implies n − ζ b p b ), which contradicts b = ν p ( n − ζ ). Since | rep p ( n ) | = a and n = ζ b , we have 0 = d a = · · · = d b − . Therefore ζ a = ζ b = n ≥ p a − , and ν p ( n − ζ )log( n ) = ν p ( ζ a − ζ )log( ζ a ) ≤ a + ℓ ζ ( a )log( p a − ) ≤ a + Ca + D ( a −
1) log( p ) ≤ C + D log( p ) , where the final inequality follows from 1 + C + D ≥ LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 25 If n > ζ b , then n = ζ b + p b m for some positive integer m . Therefore n ≥ p b , so ν p ( n − ζ )log( n ) ≤ b log( p b ) = 1log( p ) < C log( p ) ≤ C + D log( p )if b ≥ ν p ( n − ζ )log( n ) = 0 < C + D log( p ) if b = 0. (cid:3) We now turn our attention to the sequence of 2-adic valuations ν ( U i ). Theorem 37.
There exists a unique -adic integer ζ with the prop-erty that if ( i n ) n ≥ is a sequence of non-negative integers such that ν ( U i n ) → ∞ then i n → ζ in Z . A formula for ζ is given by Equation (6.2) in the proof. In particular, ζ is a computable number, and one computes ζ ≡ ). Proof of Theorem 37.
Let p = 2. To analyze the 2-adic behavior of( U i ) i ≥ , we construct a piecewise interpolation of U i to Z using themethod described by Rowland and Yassawi [22]. Let P ( x ) = x − x − x −
12 be the characteristic polynomial of ( U i ) i ≥ . The polynomial P ( x ) has a unique root β ∈ Z satisfying β ≡ | P (2) | < | P ′ (2) | ). Polynomial division shows that P ( x ) factors in Z [ x ] as P ( x ) = ( x − β ) (cid:0) x + ( β − x + ( β − β − (cid:1) . One checks that P ( x ) has no roots in Z congruent to 0, 1, 3, 4, 5, or7 modulo 8. Since β has multiplicity 1, this implies that the splittingfield K of P ( x ) is a quadratic extension of Q . Let β and β be theother two roots of P ( x ) in K = Q ( β ). Since β ≡ β is | β | = . Using the quadratic factor of P ( x ) and an approximation to β , one computes | β | = | β | = √ .Let c , c , c ∈ K be such that U i = c β i + c β i + c β i for all i ≥
0. Using the initial conditions, we solve for c , c , c to find c = − U β β + U ( β + β ) − U ( β − β )( β − β ) c = − U β β + U ( β + β ) − U ( β − β )( β − β ) c = − U β β + U ( β + β ) − U ( β − β )( β − β ) , , A. MASSUIR , M. RIGO AND E. ROWLAND where U = 1 , U = 13 , U = 163. One computes | c | = 2 and | c | =2 √ | c | . Factoring out β i gives(6.1) U i = β i (cid:16) c ( β β ) i + c + c ( β β ) i (cid:17) . Since | β β | = √ and | β β | = 1, the power ( β β ) i approaches 0 as i → ∞ ,while ( β β ) i does not. Therefore the size of ν ( U i /β i ) is limited by theproximity of c + c ( β β ) i to 0.To analyze the size of c + c ( β β ) i , we interpret ( β β ) i as a functionof a p -adic variable. For this we need the p -adic exponential and loga-rithm, which are defined on extensions of Q p by their usual power series;log p (1+ x ) converges if | x | p <
1, and exp p x converges if | x | p < p − / ( p − .Moreover, log p is an isomorphism from the multiplicative group { x : | x − | p < p − / ( p − } to the additive group { x : | x | p < p − / ( p − } , andits inverse map is exp p [14, Proposition 4.5.9 and Section 6.1]. Directcomputation shows | ( β β ) − | = < = p − / ( p − . Therefore, for all m ≥ r ∈ { , , , } ,( β β ) r +4 m = ( β β ) r ( β β ) m = ( β β ) r exp log (( β β ) m )= ( β β ) r exp (cid:16) m log (( β β ) ) (cid:17) . Denote L := log (( β β ) ). Using the power series for log , one computes | L | = . For each x ∈ Z [ β ] and r ∈ { , , , } , define f r ( r + 4 x ) := c + c ( β β ) r exp ( Lx ) . For all x ∈ Z , we have | Lx | = | x | ≤ < = p − / ( p − , so f r is welldefined on r +4 Z . The four functions f , f , f , f comprise a piecewiseinterpolation of c + c ( β β ) i . Namely, c + c ( β β ) i = f i mod 4 ( i ) for all i ≥ f r is a continuous function, from Equation (6.1) we seethat ν ( U i /β i ) is large when i is close to a zero of f i mod 4 . The equation f r ( r + 4 x ) = 0 is equivalent toexp ( Lx ) = − c c ( β β ) r . For r ∈ { , , } , one computes (cid:12)(cid:12)(cid:12) − c c ( β β ) r − (cid:12)(cid:12)(cid:12) ≥ , so there is nosolution x for these values of r . For r = 1, (cid:12)(cid:12)(cid:12) − c c ( β β ) r − (cid:12)(cid:12)(cid:12) = < ,so there is a unique solution, namely x = L log (cid:16) − c β c β (cid:17) , which has LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 27 size | x | = . Let(6.2) ζ := 1 + 4 L log (cid:16) − c β c β (cid:17) , so that f ( ζ ) = 0 and | ζ | = 1.It remains to show that ζ ∈ Z . Let σ : K → K be the Galoisautomorphism that non-trivially permutes β and β . The formulas for c and c imply c c · σ ( c ) σ ( c ) = 1; this implieslog (cid:16) − c β c β (cid:17) + σ (cid:16) log (cid:16) − c β c β (cid:17)(cid:17) = log (cid:16) c β c β · σ ( c ) β σ ( c ) β (cid:17) = log (1) = 0 . Similarly, log (( β β ) ) + σ (cid:16) log (( β β ) ) (cid:17) = log (1) = 0 . Thereforelog (cid:16) − c β c β (cid:17) log (( β β ) ) = − σ (cid:16) log (cid:16) − c β c β (cid:17)(cid:17) − σ (cid:16) log (( β β ) ) (cid:17) = σ log (cid:16) − c β c β (cid:17) log (( β β ) ) is invariant under σ and thus is an element of Q . It follows from | ζ | = 1 that ζ ∈ Z . (cid:3) Remark.
The interpolation in the previous proof depends on appro-priate powers of β β satisfying x = exp (log ( x )). We verified this bydirectly checking | ( β β ) − | < . In general, an appropriate exponentis given by [22, Lemma 6], namely ( e < p − p ⌈ log( e +1) / log p ⌉ if e ≥ p − e is the ramification index of the field extension. The ramificationindex of the extension K in the proof of Theorem 37 is e = 2; thisfollows from the fact that e is a divisor of the degree of the extensionand that e = 1 since we identified an element β ∈ K with 2-adicvaluation ν ( β ) = . Therefore the exponent 2 ⌈ log(3) / log(2) ⌉ = 4 suffices.Since | β β | = 1, [22, Lemma 6] implies | ( β β ) − | < . (In general,one must divide by a root of unity before raising to the appropriateexponent, but this root of unity is 1 for β β since the ramification indexof K is equal to its degree.) , A. MASSUIR , M. RIGO AND E. ROWLAND By Proposition 36, the growth rate of ν ( U i ) is determined by theapproximability of ζ = · · · by non-negative integers. Conjecture 38.
Let ζ ∈ Z be defined as in Equation (6.2) . Thelengths of the blocks of the -adic digits of ζ satisfy ℓ ζ ( a ) ≤ a + for all a ≥ . Conjecture 38 is weak in the sense that it is almost certainly far fromsharp. One expects the digits of ζ to be randomly distributed, in whichcase ℓ ζ ( a ) = log( a ) + O (1). Indeed, among the first 1000 base-2digits of ζ , the longest block of 0s has length 10. However, results con-cerning digits of irrational numbers are notoriously difficult to prove.Bugeaud and Keke¸c [7, Theorem 1.6] give a lower bound on the num-ber of non-zero digits among the first a digits of an irrational algebraicnumber in Q p ; see also Theorem 2.1 in the same paper. However, thereare no known results of this form for transcendental numbers.The conjectural bound was obtained by computing the line through ℓ ζ (19) = 4 and ℓ ζ (304) = 10. If Conjecture 38 is true, then an explicitformula for ν ( U i ) is given by the following theorem. In particular, theapproximation ζ ≡ ) is sufficient to com-pute ν ( U i ) for all i ≤ . Theorem 39.
Let ζ ∈ Z be defined as in Equation (6.2) . Conjec-ture 38 implies that, for all i ≥ , ν ( U i ) = (cid:22) i − (cid:23) + ( ν ( i − ζ ) if i if i ≡ . Proof.
We start as in the proof of Theorem 35. Let T i = U i / i − .Since U i +3 = 12 U i +2 + 6 U i +1 + 12 U i , the sequence ( T i ) i ≥ satisfies therecurrence T i +3 = 6 √ T i +2 + 3 T i +1 + 3 √ T i . The initial terms are T = 2 , T = 13 √ , T = 163, so it follows that T i ∈ Z [ √
2] for all i ≥ Z [ √ T i ) i ≥ is periodic with period length 4:1 , √ , , , , √ , , , . . . . It follows that if i ≥ i ν ( U i ) = i − ν ( T i ) = i − i ≡ i ≡ if i ≡ (cid:22) i − (cid:23) . LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 29
It remains to determine ν ( U i ) when i ≡ β , β , β , c , c , c and the function f definedin the proof of Theorem 37. When i ≡ | U i | = 2 − i (cid:12)(cid:12)(cid:12) c ( β β ) i + f ( i ) (cid:12)(cid:12)(cid:12) . To obtain a simpler formula for | U i | , we compare the sizes of the twoterms being added and use the fact that | x + y | p = max {| x | p , | y | p } if | x | p = | y | p . For the first, we have (cid:12)(cid:12)(cid:12) c ( β β ) i (cid:12)(cid:12)(cid:12) = 2 − i . For the second, | f ( i ) | = (cid:12)(cid:12)(cid:12) c + c β β exp (cid:0) L · i − (cid:1)(cid:12)(cid:12)(cid:12) . Since the function f (1 + 4 x ) = c + c β β exp ( Lx ) has a unique zero ζ − , the p -adic Weierstrass preparation theorem [14, Theorem 6.2.6]implies the existence of a power series h ( x ) ∈ K J x K such that h (0) = 1, | h ( x ) | = 1 for all x ∈ Z [ β ], and f (1 + 4 x ) = c + c β β − ζ − (cid:0) x − ζ − (cid:1) h ( x ) . Therefore | f ( i ) | = (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) c + c β β − ζ − (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) (cid:12)(cid:12) i − − ζ − (cid:12)(cid:12) = √ | i − ζ | . Conjecture 38 and Proposition 36 imply | i − ζ | ≥ i − / for all i ≥ − i and √ i − / intersect at i ≈ .
21. For all i ≥ i ≡ (cid:12)(cid:12)(cid:12) c ( β β ) i (cid:12)(cid:12)(cid:12) = 2 − i < √ i − / ≤ | f ( i ) | and therefore | U i | = 2 − i (cid:12)(cid:12)(cid:12) c ( β β ) i + f ( i ) (cid:12)(cid:12)(cid:12) = 2 − i | f ( i ) | = 2 − i | i − ζ | . Moreover, explicit computation shows that 2 − i < √ | i − ζ | for all i ≡ ≤ i ≤
69, so | U i | = 2 − i | i − ζ | for thesevalues as well. Therefore ν ( U i ) = i − + ν ( i − ζ ) for all i ≥
13 suchthat i ≡ (cid:3) Corollary 40.
Conjecture 38 implies that ν ( U i ) ≤ i + log( i ) for all i ≥ . , A. MASSUIR , M. RIGO AND E. ROWLAND Proof.
Since U i = 0 for all i ≥
0, we have | U i | = 0 for all i ≥
0. Since | f ( ζ ) | = 0, this implies ζ / ∈ N . Conjecture 38 and Proposition 36imply ν ( i − ζ ) ≤ log( i ) for all i ≥
2. By Theorem 39, ν ( U i ) ≤ i + log( i ) for all i ≥ (cid:3) This is sufficient to apply Lemma 33. Under Conjecture 38, we havethe right behavior for both ν ( U i ) and ν ( U i ).6.2. A fourth-order sequence.
The general case is even more com-plicated than Theorem 37. For example, let p = 2 and consider thesequence ( U i ) i ≥ satisfying the recurrence U i +4 = 2 U i +3 + 2 U i +2 + 2 U n with initial conditions U = 1 , U = 3 , U = 9 , U = 23 from Ex-ample 4. By the Eisenstein criterion, the characteristic polynomial P ( x ) = x − x − x − Q . Let K be the splittingfield of P ( x ) over Q . Let β , β , β , β be the four roots of P ( x ) in K ,and let c , c , c , c be the elements of K such that U i = P j =1 c j β ij forall i ≥ β i , we would want to write K as a sim-ple extension Q ( α ). For this, we need to determine the degree d ofthe extension and a polynomial Q ( x ) ∈ Q [ x ] of degree d such that Q ( x ) is irreducible over Q and Q ( α ) = 0. Then we could compare thesizes | β j | of the roots to each other. Experiments suggest that | β | = | β | = | β | = | β | = 2 − / and | ( β j β ) − | = < = p − / ( p − foreach j ∈ { , , } . Assuming this is the case, U i /β i = P j =1 c j ( β j β ) i canbe interpolated piecewise to Z using 8 analytic functions. However,we cannot solve c + b exp ( L x ) + b exp ( L x ) + b exp ( L x ) = 0explicitly, as we solved c + c ( β β ) r exp ( Lx ) = 0 in the proof of The-orem 37. Instead, we could use the p -adic Weierstrass preparationtheorem [14, Theorem 6.2.6] to determine the number of solutions andcompute approximations to them. However, we would also need to de-termine which of these solutions belong to Z . We do not carry outthis step here, but this would give an analogue of Theorem 37, withsome finite set Z of 2-adic integers such that every sequence ( i n ) n ≥ of non-negative integers with ν ( U i n ) → ∞ satisfies i n → ζ for some ζ ∈ Z . If the blocks of zeroes in the digit sequences of each ζ ∈ Z satisfy ℓ ζ ( a ) ≤ Ca + D for some C, D as in Conjecture 38, then Propo-sition 36 gives an upper bound on ν ( U i ). This same approach appliesto a general constant-recursive sequence and a general prime p . LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 31 Concluding remarks
The case of integer base b numeration systems is not treated in thispaper. Let b ≥
2. Assume first for the sake of simplicity that b isa prime. Consider the sequence U = ( b i ) i ≥ . If X is an ultimatelyperiodic set with period π X = b λ for some λ , then with our notation Q X = 1 and | rep U ( π X − | = λ . The sequence ( b i mod b λ ) i ≥ has azero period and f b ( λ ) = λ . Hence we don’t have the required assump-tion to apply Theorem 29: for every such set X , n X = 0. Let us alsopoint out that the technique of Propositions 17 or 22 cannot be ap-plied: adding 1 as a most significant digit will not change the value ofa representation modulo π X when words are too long, U i ≡ b λ )for large enough i . Of course, integer base systems can be handled withother decision procedures [4, 5, 15, 16, 18, 19]. If the base b is now acomposite number of the form p s · · · p s t t , the same observation holds.The length of the non-zero preperiod of ( b i mod p µj ) i ≥ is ⌊ µs j ⌋ . Takingagain an ultimately periodic set with period π X = b λ , we get Q X = 1and f p j ( λs j ) = λ , hence M X = λ and we still have | rep U ( π X − | = λ ,so n X = 0.A similar situation occurs in a slightly more general setting: themerge of r sequences that ultimately behave like b i . Let b ≥ u ≥ N ≥
0. If the recurrence relation is of the form U i + u = bU i for i ≥ N (as for instance in Example 10), then again n X
6→ ∞ as π X → ∞ .Indeed, if X is an ultimately periodic set with period π X = b λ , then Q X = 1 and applying Lemma 13 (here the polynomial P T with thenotation of Definition 12 is just a constant), | rep U ( π X − | ≥ uλ − L ,for some constant L , and with the same reasoning as for a compositeinteger base, M X ≤ N + uλ . Thus n X remains bounded for all λ . Sothere is no way to ensure that n X can be larger than C .Trying to figure out the limitations of our decision procedure andassuming that we are under the assumption of Lemma 33, this typeof linear numeration systems is the only one that we were able to findwhere our procedure cannot be applied. Moreover, as shown by thefollowing proposition, these systems are sufficiently close to the classicalbase- b system so usual decision procedures can still be applied. It isan open problem to determine if there exist linear numeration systemssatisfying (H1), (H2) and (H3) where the decision procedure may notbe applied and not of the above type. Example 41.
Take b = 4, u = 2 and N = 0. Start with the first twovalues 1 and 3. We get the sequence 1 , , , , , , , . . . . We have f ( µ ) = µ if µ is even and f ( µ ) = µ + 1 if µ is odd. Hence, for a set , A. MASSUIR , M. RIGO AND E. ROWLAND of period π X = 4 λ , M X = f (2 λ ) = 2 λ . Moreover, | rep U (4 λ − | = 2 λ .So, n X = 0 for all λ . Proposition 42.
Let b ≥ , u ≥ , N ≥ . Let U be a linear nu-meration system U = ( U i ) i ≥ such that U i + u = bU i for all i ≥ N . If aset is U -recognizable then it is b -recognizable. Moreover, given a DFAaccepting rep U ( X ) for some set X , we can compute a DFA accepting rep b ( X ) .Proof. We build in two steps a sequence of transducers reading leastsignificant digit first that maps any U -representation c ℓ − · · · c c ∈ A ∗ U (here written with the usual convention that the most significant digit ison the left) to the corresponding b -ary representation. Adding leadingzeroes, we may assume that the length ℓ of the U -representation is ofthe form N + mu . The idea is to read the first N + u (least significant)digits and to output a single digit (over a finite alphabet in N ) equalto d = val U ( c N + u − · · · c ) . Then we process blocks of size u , each such block of the form c N +( j +1) u − · · · c N + ju gives as output a single digit equal to d j = c N +( j +1) u − U N + u − + · · · + c N + ju U N . So the digits d , d , . . . , d m − all belong to the finite set { val U ( w ) : w ∈ A ∗ U and | w | ≤ N + u } . From the form of the recurrence, we haveval U ( c N + mu − · · · c ) = m − X j =0 d j b j = val b ( d m − · · · d ) . So this transducer T maps any U -representation to a non-classical b -aryrepresentation of the same integer. Precisely, when a DFA acceptingrep U ( X ) is given, we build a DFA accepting the language L = 0 ∗ rep U ( X ) ∩ { w ∈ A ∗ U : | w | ≡ N (mod u ) , | w | ≥ N } . Recall that if L is a regular language then its image T ( L ) by a trans-ducer is again regular. Moreover, val b ( T ( L )) = X .Then, it is a classical result that normalization in base b , i.e. mappinga representation over a non-canonical finite set of digits to the canonicalexpansion over { , . . . , b − } can be achieved by a transducer N [12](or [21, p. 104]). To conclude with the proof, we compose these twotransducers and consider the image N (0 ∗ T ( L )) = 0 ∗ rep b ( X ). (cid:3) LTIMATE PERIODICITY PROBLEM FOR NUMERATION SYSTEMS 33
With the above proposition, the decision problem for the merge ofsequences ultimately behaving like b i (such as the numeration systemsof Examples 10 and 14) can be reduced to the usual decision problemfor integer bases. Acknowledgments
We thank Yann Bugeaud for pointing out relevant theorems in [7].
References [1] J. Bell, ´E. Charlier, A. Fraenkel, M. Rigo, A decision problem for ultimatelyperiodic sets in nonstandard numeration system,
Internat. J. Algebra Comput. (2009), no. 6, 809–839.[2] V. Berth´e, M. Rigo (Eds), Combinatorics, Automata, and Number Theory ,Encycl. Math. and its Appl. , Cambridge Univ. Press (2010).[3] A. Bertand-Mathis, Comment ´ecrire les nombres entiers dans une base quin’est pas enti`ere,
Acta Math. Hungar. (1989), 237–241.[4] B. Boigelot, I. Mainz, V. Marsault, M. Rigo, An efficient algorithm to decideperiodicity of b -recognisable sets using MSDF convention, 44th InternationalColloquium on Automata, Languages, and Programming, Art. No. , 14pp., LIPIcs. Leibniz Int. Proc. Inform., 80, Schloss Dagstuhl. Leibniz-Zent.Inform., Wadern, 2017.[5] V. Bruy`ere, G. Hansel, Bertrand numeration systems and recognizability, The-oret. Comput. Sci. (1997), 17–43.[6] V. Bruy`ere, G. Hansel, Ch. Michaux, R. Villemaire, Logic and p -recognizablesets of integers, Bull. Belg. Math. Soc. Simon Stevin (1994), 191–238.[7] Y. Bugeaud, G. Keke¸c, On Mahler’s classification of p -adic numbers, Bulletinof the Australian Mathematical Society (2018) 203–211.[8] A. Cobham, On the base-dependence of sets of numbers recognizable by finiteautomata, Math. Systems Theory (1969), 186–192.[9] F. Durand, Decidability of the HD0L ultimate periodicity problem, RAIROTheor. Inform. Appl. (2013), 201–214.[10] F. Durand, M. Rigo, On Cobham’s theorem, in Handbook of Automata, toappear.[11] A. S. Fraenkel, Systems of numeration, Amer. Math. Monthly (1985), 105–114.[12] Ch. Frougny, Representations of numbers and finite automata, Math. SystemsTheory (1992), 37–60.[13] Ch. Frougny, On the sequentiality of the successor function, Inform. Comput. (1997), 17–38.[14] F. Q. Gouvˆea, p -adic Numbers: An Introduction second edition, Universitext,Springer–Verlag, Berlin, 1997.[15] J. Honkala, A decision method for the recognizability of sets defined by numbersystems, Theoret. Inform. Appl. (1986), 395–403.[16] A. Lacroix, N. Rampersad, M. Rigo, ´E. Vandomme, Syntactic complexity ofultimately periodic sets of integers and application to a decision procedure, Fund. Infor. (2012), 175–187. , A. MASSUIR , M. RIGO AND E. ROWLAND [17] P. B. A. Lecomte, M. Rigo, Numeration Systems on a Regular Language, Theory Comput. Systems (2001), 27–44.[18] V. Marsault, An efficient algorithm to decide periodicity of b -recognisable setsusing LSDF convention, Log. Methods Comput. Sci. (2019), Paper No. 8,30.[19] V. Marsault, J. Sakarovitch, Ultimate periodicity of b -recognisable sets: aquasilinear procedure, Developments in language theory, 362–373, Lect. Notesin Comput. Sci. , Springer, Heidelberg, (2013).[20] I. V. Mitrofanov, Almost periodicity of morphic words,
Dokl. Math. (2016),207–210.[21] M. Rigo, Formal Languages, Automata and Numeration Systems: Applicationsto Recognizability and Decidability , vol. 2, Networks and Telecommunicationsseries, ISTE-Wiley, 2014.[22] E. Rowland, R. Yassawi, p -adic asymptotic properties of constant-recursivesequences, Indag. Math. (2017), 205–220.[23] A. Salomaa, M. Soittola, Automata-theoretic aspects of formal power series ,Texts and Monographs in Computer Science, Springer-Verlag, New York, Hei-delberg, Berlin, 1978.[24] J. Shallit, Numeration systems, linear recurrences and regular sets,
Inform.Comput. (1994), 331–347. University of Li`ege, Department of Mathematics, All´ee de lad´ecouverte 12 (B37), B-4000 Li`ege, Belgium
E-mail address : [email protected] ; [email protected] ; [email protected] Department of Mathematics, Hofstra University, Hempstead, NY,USA
E-mail address ::