Skolem's Problem – On the Border Between Decidability ... - CiteSeerX

22 downloads 0 Views 295KB Size Report
Vesa Halava. Department of Mathematics, University of Turku. FIN-20014 Turku, Finland, and. Turku Centre for Computer Science vehalava@utu.fi. Tero Harju.
Vesa Halava | Tero Harju | Mika Hirvensalo | Juhani ¨ Karhumaki

Skolem’s Problem – On the Border Between Decidability and Undecidability

TUCS Technical Report No 683, April 2005

Skolem’s Problem – On the Border Between Decidability and Undecidability Vesa Halava

Department of Mathematics, University of Turku FIN-20014 Turku, Finland, and Turku Centre for Computer Science [email protected]

Tero Harju Department of Mathematics, University of Turku FIN-20014 Turku, Finland, and Turku Centre for Computer Science [email protected]

Mika Hirvensalo

Department of Mathematics, University of Turku FIN-20014 Turku, Finland, and Turku Centre for Computer Science Supported by the Academy of Finland under grant 208797 [email protected]

¨ Juhani Karhumaki

Department of Mathematics, University of Turku FIN-20014 Turku, Finland, and Turku Centre for Computer Science Supported by the Academy of Finland under grant 206039 [email protected]

TUCS Technical Report No 683, April 2005

Abstract We give a survey of Skolem’s problem for linear recurrence sequences. We cover the known decidable cases for recurrence depths of at most 4, and give detailed proofs for these cases. Moreover, we shall prove that the problem is decidable for linear recurrences of depth 5.

Keywords: Skolem’s Problem, Linear Recurrence, Undecidability, Matrix Problems

TUCS Laboratory Discrete Mathematics for Information Technology

1 Introduction 1.1 Historical Background Solutions to combinatorial problems often appear as sequences of numbers. These sequences are sometimes defined by some relations, where the nth element of the sequence can be counted by using the precedent elements of the sequence. Here we shall consider such sequences arising from linear recurrence relations. A sequence (un )∞ n=0 (or just (un ) or un , for short) is a linear recurrent sequence, if it satisfies un = ak−1 un−1 + . . . + a1 un−k+1 + a0 un−k (1) for all n ≥ k with fixed aj ∈ Z coefficients for j = 0, . . . , k − 1. We say that the relation (1) is a linear recurrence relation of depth (or degree) k. Note that we may assume that in (1), we have a0 = 0, since a0 = 0 would imply that the sequence satisfies a shorter linear recurrence. The k first elements u0 , u1, . . . , uk−1 of the linear recurrent sequence (un ) in (1) are called the initial conditions. If the initial conditions are given, every element of the sequence is uniquely determined by the recurrence (1). Example 1.1. One of the most well known linear recurrence equations is that for the Fibonacci numbers: Fn = Fn−1 + Fn−2 for n ≥ 2 with the initial conditions are F0 = F1 = 1. In this article we are interested in the following Skolem’s problem 1: Problem S KOLEM: Given a linear recurrent sequence (ui ), that is, the linear recurrence relation and the initial conditions, determine whether or not there exists i ≥ 0 such that ui = 0. We shall give a detailed survey of Skolem’s problem covering the known (algorithmically) decidable cases, and, moreover, we shall prove that the problem is decidable for linear recurrences of depth 5. Also, we shall study the connections of Skolem’s problem to some other problems in mathematics. Let us use the following notation, for an integer sequence (u n ), let Z(un ) = {i ∈ N | ui = 0} be the set of zeroes of (un ). The starting point of the problem about zeros in recurrence sequences was in 1934 when Skolem [29] proved that Z(u n ) is union of finitely many periodic sets and a finite set. In his paper Skolem used p-adic techniques to prove the result. In the days of Skolem’s paper, algorithmic decidability issues were not yet as relevant as they are today. The result of Skolem 1

In the literature Skolem’s problem is sometimes referred to as Pisot’s problem. The usage of the name of Norwegian mathematician Thoralf Skolem comes from the history as we shall see, but the usage of French mathematician Charles Pisot’s name is not known by the authors.

1

was later proved also by Mahler [17] and Lech [23]. In Section 3 , we shall give the proof given by Hansel [13]. The result of Skolem is very strong, and, indeed, from Hansel’s proof it follows that it is decidable whether or not a given linear recurrent sequence (un ) has infinite Z(un ) or not. This was originally proved by Berstel and Mignotte in [5]. We give the decidability proof in Section 3. We also mention that it is decidable whether or not the set Z(un ) has a finite complement or Z(un ) = N, see [28]. Previously it has been shown that Skolem’s problem is decidable for linear recurrent sequence of depth at most 4. The case of depth one is trivial, but for the depth two, the problem is already challenging. There is an old folklore proof for the case of depth 2, see [11]. In 1985 Vereshchagin [31] proved that Skolem’s problem is decidable for sequences of depths 3 and 4. Vereshchagin’s proof uses results of Baker [1] and of van der Poorten [25] for linear logarithms. Here we shall prove that Skolem’s problem is decidable also when the depth of the linear recurrence relation is 5. On the way, we give new proofs for the cases where the depths are 2, 3, and 4. For these proofs, we use the same ideas as Vereshchagin: we study the solutions of the sequence, i.e., we study the problem when the nth element of the sequence is deduced from the sum r 

pi (n)λi ,

(2)

i=1

where pi ’s are polynomials, and λi ’s are complex numbers, called the characteristic roots. We prove that there is an effective upper bound M, deduced from the form (2) such that if ui = 0 for some i, then there exists j ≤ M such that also uj = 0. This upper bound is found using Baker’s result [2] for logarithms. Mignotte, Shorey and Tijdeman [22] proved in 1984 that Skolem’s problem is decidable for the depths 3 and 4, when the recurrence is nonsingular, i.e., in (2) λi /λj is not a root of unity for any i = j. Actually, Vereshchagin proved that any sequence can be reduced (or divided) to a finite set of nonsingular sequences, and we shall use this property in our proof also. Algorithmic undecidability is close to Skolem’s problem. As we shall see in Lemma 1.1, Skolem’s problem can be equivalently stated in the following terms of matrices: Given a k × k integer matrix M, determine whether or not for some power n ≥ 0, the element (M n )1k = 0. The decidability results proved here yield that the matrix form is decidable for matrices with dimension k ≤ 5. If we consider the problem where instead of one matrix we have a semigroup S generated by n integer matrices, then it is undecidable whether there exists M ∈ S such that the right upper corner of M is zero. Indeed, this problem is undecidable for semigroups generated by seven 3×3 integer matrices. This follows by the proof of R.W. Floyd in [18], since the Post 2

Correspondence Problem is undecidable for instances of 7 letters, see [19] (see also [14]). On the other hand, this problem is undecidable for two matrices of dimension at least 24, see [8]. Therefore, when finding decidable cases of Skolem’s problem, we are exploring the borderline between decidability and undecidability. There are also other important undecidable problem in the theory of integer matrices, of which we like to mention a few. Let S be a finitely generated semigroups of k ×k integer matrices. For example, for k ≥ 3 it is undecidable whether or not the zero matrix is in S for k ≥ 3 [24] (see also [12]), and whether or not the semigroup S is free [16] (see also [7]). Recently it was proved that it is undecidable for k ≥ 5, whether or not a fixed diagonal matrix is in S [26].

1.2 Equivalent Formulations of the Problem Recall from the introduction that Skolem’s problem was stated as follows: Given a linear recurrence un (over Z), does there exist an n such that un = 0? The following lemma gives some equivalent representations for the problem. Lemma 1.1. For an integer sequence u0, u1 , u2 , . . ., the following are equivalent: 1. Sequence un is a linear recurrent sequence. 2. For n ≥ 1, un = (M n )1k , where M ∈ Zk×k for some k. 3. For n ≥ 1, un = vM n wT , where v, w ∈ Zk and M ∈ Zk×k for some k. Proof. Implication (1) =⇒ (2): Assume that a sequence u n is given by first fixing u0 , . . ., uk−1 , and for n ≥ k defined by recurrence un = ak−1 un−1 + . . . + a1 un−k+1 + a0 un−k . Let



ak−1  ..  .  M1 =  a2   a1 a0

1 ... .. . . . . 0 ... 0 ... 0 ...

 0 ..  .   1 0   0 1  0 0 0 .. .

(3)

It is easy to see that for each n ≥ 0, un = vM1n w T , where v = (uk−1 , . . . , u1, u0 ), and w = (0, . . . , 0, 1). We denote 0 = (0, 0, . . . , 0) and define a (k + 1) × (k + 1)matrix M by  0 vM1 . M= 0T M1 Inductively we see that

 n

M =

0 vM1n 0T M1n 3

,

and, furthermore, that  (M )1,k+1 = (1 0) n

0 vM1n 0T M1n



0 wT

= vM n wT = un

whenever n ≥ 1. Implication (2) =⇒ (3) follows directly from (M k )1k = (1, 0)M n (0, 1)T . Implication (3) =⇒ (1): Let p(x) = xk − ak−1 xk−1 − . . . − a1 x − a0 be the characteristic polynomial of matrix M. According to the Cayley-Hamilton theorem [10] M k = ak−1 M k−1 + . . . + a1 M + a0 I, and consequently M n = ak−1 M n−1 + . . . + a1 M n−k+1 + a0 M n−k for any n ≥ k. It follows that vM n wT = ak−1 vM n−1 wT + . . . + a1 vM n−k+1 w T + a0 vM n−k w T , which is to say that un = ak−1 un−1 + . . . + a1 un−k+1 + a0 un−k ,

(4)

so (4) is the desired recurrence.

2 Mathematical Tools In this section we give the mathematical tools needed for the construction of the algorithms presented in the later sections. We shall give an introduction to the theory of algebraic numbers, but first we would like to motivate the reader. Let us consider a linear recurrent sequence un satisfying the relation, un = ak−1 un−1 + · · · + a0 un−k . The characteristic polynomial is the polynomial p(x) = xk − ak−1 xk−1 − ak−2 xk−2 − · · · − a1 x − a0 .

(5)

The roots λ1 , λ2 , . . . , λk (∈ C) of the characteristic polynomial are called the characteristic roots. Note that, since a0 = 0, λi = 0 for all i. We prove in Proposition 2.11, that the sequence un can be solved using the characteristic roots, that is, un = p1 (n)λn1 + . . . + pr (n)λnr , where λi are distinct roots of p(x) and pi (n)’s are polynomials which can be effectively found. Here, the characteristic roots are algebraic numbers. Our algorithm uses this solved form of un , and the properties of the characteristic roots. 4

2.1 Algebraic Numbers We now present the notions on algebraic numbers necessary in the continuation. For a more comprehensive representation on algebraic number theory, we refer to [10]. By an algebraic number we mean a (complex) number which is algebraic over the field of rational numbers. It is a well-known fact that all algebraic numbers form a field. The minimal polynomial of an algebraic number α is a monic polynomial p(x) ∈ Q[x] of the least possible degree having α as a zero. If c is the least common multiple of the nominators of the coefficients of p(x), we call polynomial cp(x) ∈ Z[x] the defining polynomial of α. The defining polynomial is clearly unique. If the defining polynomial of α is monic, or equivalently, if the minimal polynomial of α is in Z[x], then α is an algebraic integer. Algebraic integers form an integral domain. The definition implies directly that for β each algebraic number α there is a representation α = m , where β is an algebraic integer and m ∈ Z. Moreover, the minimal polynomial of β and m can be found algorithmically when the minimal polynomial of α is given. The degree of the minimal polynomial is called the degree of α and denoted by deg(α). If p(x) = pd xd + . . . + p1 x + p0 is the defining polynomial of α, we define the height of α as H(α) = max{|pd | , . . . , |p1 | , |p0 |}. Trivially any root (i.e, a solution of equation xn = α) of an algebraic number is again algebraic, and if β n = α, then deg(β) ≤ n deg(α). Thus, taking the root can increase the degree, but all the powers of α belong to the field generated by α, which implies that deg(αn ) ≤ deg(α) for each n ∈ N. When introducing algebraic numbers we always assume that they are embedded in C, and we fix an embedding in the following way: we say that a description of an algebraic number α is a quadruple (p(x), ξ, η, ρ), where p(x) is the defining polynomial of α, and ξ, η, and ρ are rational numbers which satisfy the following: the circle of radius ρ centered at ξ + iη contains α but no other zeros of p(x). It may be useful to refer to the result in [21] to notice that if p(x) is the defining polynomial of an algebraic number α with d = deg(α) and H = H(α), then for any roots αi = αj of p(x), we have √ 6 |αi − αj | ≥ d+1 . (6) d 2 H d−1 Therefore we will additionally require that in the description of an algebraic number, ρ should always be chosen smaller than a quarter of the above quantity (6). It is then possible to distinguish between all the roots of the minimal polynomial. It is clear that given a description, arbitrarily precise approximations of α with rational real and imaginary parts can be effectively computed by using for example Newton’s method [9, p. 145]. It is also evident that, given the descriptions of α and β, the descriptions of α ± β, αβ ±1, and nth roots (n ∈ {2, 3, . . .}) of α can be found algorithmically. In fact, it is plain how to find good approximations of a±β, αβ ±1, and the roots, and for the minimal polynomials of sums and products, 5

one can use the resultant method, see [9, p. 157]. Moreover, it is easy to see that deg(α + β) and deg(αβ) both are at most deg(α) deg(β). If α is an algebraic number and p(x) its minimal polynomial, then the roots α1 = α, . . ., αd of p(x) are called the (Galois) conjugates of α. Notice that since p(x) is a minimal polynomial (and hence irreducible), numbers α1 , . . ., αd are necessarily distinct. If α is not a real number, then the complex conjugate α of α is always among the (Galois) conjugates. It follows that αα is an algebraic number, and moreover that the absolute value (also called the modulus) |α| of α is an algebraic number, since |α|2 = αα. If α is an algebraic number of degree d and α1 = α, . . ., αd the conjugates of α, then there are exactly d embeddings σ1 , . . ., σd from field Q(α) into C, each defined as σi (α1 ) = αi [10]. Remark 2.1. It is also quite easy to see that each σi is a continuous mapping: σi (β1 ) and σi (β2 ) become arbitrarily close to each other, if |β1 − β2 | is chosen small enough. Notice also that if α is not a real number, then field Q(α) is dense in C, since 1 and α are then linearly independent over R, and thus it is possible to have arbitrarily precise approximations zn of any z ∈ C of form zn = an + bn α, where an , bn ∈ Q. It follows also that we can extend the mapping σi to whole C uniquely. Moreover, if β is an algebraic number, it is possible to compute arbitrarily precise approximations of σi (β) even though β ∈ / Q(α). For each complex number α there is a representation α = |α| eiθ , where θ ∈ [0, 2π) is called the phase of α. If α is algebraic, then so is |α|, and consequently eiθ is an algebraic number as well. Proposition 2.2. Given descriptions (p1 (x), ξ1 , η1 , ρ1 ) and (p2 (x), ξ2 , η2 , ρ2 ) of algebraic numbers α and β respectively, the following questions are decidable: 1. α = β? 2. |α| > |β|? Proof. For deciding equality, if p1 (x) = p2 (x), then certainly α = β. If p1 (x) = p2 (x) but |ξ1 + iη1 − (ξ2 + iη2 )| ≥ min{ρ1 , ρ2 }, then α = β, otherwise α = β. For the second question, it is possible to find descriptions for both |α| and |β|, and then to first decide whether |α| = |β|. If |α| = |β|, we can find arbitrarily precise approximations for both |α| and |β| to decide whether |α| > |β|. Let r ∈ N. An rth root of unity is a (complex) number ζ satisfying ζ r = 1. A root of unity is clearly an algebraic number. The smallest positive r such that ζ r = 1 is called the order of ζ and denoted as r = ord(ζ). Evidently |ζ| = 1 for the roots of unity, and the number of rth roots of unity is exactly r. An rth root of unity is called primitive if ζ k = 1 for each 1 ≤ k < r, i.e., if its order is r. All rth roots of unity are obtained as powers of a primitive root of unity. It is possible 2πi always to choose ζr = e r as a primitive rth root of unity. For any primitive rth 6

root of unity ζr it is easy to see that ζrk is primitive if and only if gcd(r, k) = 1. The rth cyclotomic polynomial is defined as φr (x) =

r−1

(x − ζrk ).

(7)

k=0 gcd(k,r)=1

Clearly φr has all the primitive rth roots of unities as zeros. It can be shown also that φr (x) ∈ Z[x], and that φr (x) is an irreducible polynomial. It follows that deg(φr ) = ϕ(r), where ϕ(r) is the Euler’s function. The cyclotomic polynomials φr (x) can be constructed algorithmically. Proposition 2.3. Given a description of an algebraic number α, it is decidable whether α is a root of unity. If α is a root of unity, then ord(α) can be algorithmically found. Proof. We show that if α is a root of unity, then there is a computable number M such that ord(α) ≤ M. The claim follows, since one can construct representations for all numbers α, α2 , . . ., αM and check if one of those numbers equals to 1. Let d = deg(α). If α is a primitive rth root of unity, then α is a zero of φ r (x), which has degree d = ϕ(r). On the other hand, it is known [27] that for r ≥ 3, 2.50637 r < eγ log log r + , ϕ(r) log log r

(8)

where γ = 0.5772156649 . . . is the Euler’s constant. For r ≥ 3, the right hand side of (8) can be estimated to get r < 283 log log r, (9) ϕ(r) which implies that d = ϕ(r) > max({r | 283 logr log r < d} ∪ {3}).

r . 283 log log r

It therefore suffices to take M =

As an algebraic number field we understand a finite extension of Q. It is a well-known fact that each number field F is a simple extension of Q, which means that F can be represented as F = Q(α). Moreover, if representations of algebraic numbers α1 , . . ., αr are given, it is possible to find algorithmically a representation of α such that Q(α) contains all the numbers α1 , . . ., αr [9]. If p(x) is a polynomial, the splitting field of p(x) is the smallest field where p(x) can be decomposed into linear factors. Remark 2.4. Throughout the rest of Section 2, we assume, unless explicitly otherwise stated, that an algebraic number field F is chosen such that all the occurring algebraic numbers and their conjugates belong to F , and that the field F is normal, meaning that F is a splitting field of some polynomial in Q[x], or equivalently that every irreducible polynomial (over Q) which has a zero in F , splits into linear factors over F . If F1 = Q(α1 ) is a number field, then it is possible to find algorithmically an algebraic number α such that F = Q(α) is a normal extension of Q containing F1 [10]. 7

If α is an element of F and σi : F → C are the embeddings of F into C, we define the norm of α as

N(α) = σi (α). It is an easy consequence of the definition that N(α) ∈ Q, N(αβ) = N(α)N(β), and that N(1) = 1 always. It follows that N : F ∗ → Q∗ is a group morphism. By the definition, it is also clear that N(α) can be algorithmically computed for each α ∈ F.

2.2 Ideals One of the most interesting and fruitful part in the theory of algebraic numbers concerns the ideals of the ring of the algebraic integers of a given algebraic number field. We refer to [10] for the results and notions mentioned in this section. The algebraic integers contained in an algebraic number field F form a ring, called the ring of integers of field F . Let us denote this ring by O. It is known that all the ideals of O are finitely generated. If A and B are ideals of O, then new ideals AB and A + B can be defined as AB = {ab | a ∈ A, b ∈ B},

A + B = {a + b | a ∈ A, b ∈ B}.

It is rather straightforward to show that the ideals form a commutative ring, where O serves as a unit element and {0} as a zero element. If we denote the principal ideal generated by α ∈ O by [α], we can also write O = [1], {0} = [0]. It is easy to see that mapping α → [α] is a morphism from the multiplicative group of O into the multiplicative group of the ideals. The notion of divisibility among the ideals is easy to formulate: B | A if and only if A = BC for some ideal C. We say that P = [0], [1] is a prime ideal if A | P implies either that A = [1] or A = P . The ideal theory has been developed mainly because the factorization in ring O is not necessarily unique, whereas the fundamental theorem of ideal theory states the following: Theorem 2.5. Each ideal not equal to {0} of ring O can be represented as a product of prime ideals. The representation is unique if the order of the prime ideals is ignored. Now we can fix a prime ideal P and define the valuation vP : O \ {0} → N ∪ {0} as follows: If α = 0 and [α] = P1k1 · . . . · Prkr

(10)

is the representation of ideal [α] as a product of prime ideals, we define ki , if P = Pi in (10) vP (α) = 0, if P ∈ / {P1 , . . . , Pr }. Moreover, we define symbolically vP (0) = ∞. The definition of vP can be extended to whole number field by noticing that always Z ⊆ O and that if α 8

is not an algebraic integer, then there exists an m ∈ Z such that α = α1 /m, where α1 is an algebraic integer. It is then possible to show that the definition vP (α) = vP (α1 ) − vP (m) is independent of the choice of α1 and m. Unlike in Z, the ideals of O need not to be principal, but anyway they are finitely generated, and the representation (10) can be found algorithmically [9, pp. 179–204]. It follows that given a number α ∈ F , value vP (α) can be found also algorithmically. The following important issues about vP can be proven straightforwardly: Proposition 2.6. Let P be a prime ideal of the ring of integers O of an algebraic number field F . Then, for each α, β ∈ F , 1. vP (αβ) = vP (α) + vP (β). 2. vP (α + β) ≥ min{vP (α), vP (β)}. 3. If vP (α) < vP (β), then vP (α + β) = vP (α). A unit of ring O is an element γ that has also an inverse γ −1 ∈ O. It is easy to see that [α1 ] = [α2 ] if and only if α1 = γα2 for some unit γ. It follows that if α = αm1 is not an algebraic integer (but α1 is), the ideals [α1 ] and [m] are not equal. Therefore, the representations (10) of [α] and [m] are not equal, and we get Lemma 2.1. If α is not an algebraic integer, then there is a prime ideal P such that vP (α) = 0. Such a prime ideal can also be found algorithmically [9]. A special case occurs if F = Q. In ring Z all ideals are principal, and the prime ideals P are generated by the prime numbers. If p is a prime number and P = [p] the ideal generated by it, we denote usually vP = vp . Given a prime number p, the valuation of an integer m can be then found as follows: 0, if p  m vp (m) = k, if pk | m but pk+1  m. , we have vp (r) = vp (m) − vp (n) according to the For any rational number r = m n previous definition. Valuation vp is called the p-adic valuation. Finally we represent the notion of norm of an ideal. Let F be the number field in question and O its ring of integers. For any ideal A = [0], we define its norm as the cardinality of the residue class ring: N(A) = |O/A|. It can be shown that for each A = [0], N(A) is finite, and that N(AB) = N(A)N(B) for all ideals A and B. Furthermore, N([α]) = |N(α)| for each principal ideal [α], and for each prime ideal P there exist a unique prime number p ∈ P , and that N(P ) = p f for some natural number f . By the definition, N(P ) ≥ 2 for any prime ideal, and as a consequence we see that N(A) = N(P1k1 . . . Pkkr ) ≥ N(Pi )ki ≥ 2ki . It follows that |N(α)| = N([α]) ≥ 2vP (α) for any α = 0 and any prime ideal P . 9

Proposition 2.7. Given descriptions of algebraic numbers α, β ∈ F , it is decidable whether α = β n for some n ∈ Z. Proof. Proposition 2.2 implies that it is possible to decide whether |β| = 1. Assume first that |β| = 1. Then log |β| = 0 and equation α = β n implies |α| = |β|n , which, in turn gives that log |α| . (11) n= log |β| It is possible to compute arbitrarily precise approximations of the right hand side of (11), which allows to restrict the number of potential exponents n to at most one. Then it remains to compute a representation β n for this potential n to check if α = β n . Assume then that |β| = 1. According to Proposition 2.3 it is decidable whether β is a root of unity. If β is a root of unity of order r, then it remains to check if any of numbers β 0 , β 1 , . . ., β r−1 equals to α. Next we assume that |β| = 1, and that β is not a root of unity. It follows that β∈ / R. We split here into two subcases: 1) β is an algebraic integer, and 2) β is not an algebraic integer. It should be noted that to distinguish between 1) and 2) is an easy task when the minimal (or defining) polynomial of β is available. In the first case, we show, following Kronecker’s argumentation, that there exists a conjugate of β having absolute value greater than 1. Assume the contrary: |σi (β)| ≤ 1 for each conjugate σi (β) and consider set B = {β, β 2, β 3 , . . .}. The minimal polynomial pn (x) of β n is of form 

pn (x) =

d

(x − βin ),

(12)

i=1

where β1n , . . ., βdn are conjugates of β n , and d ≤ deg(β). Since β n is always an algebraic integer, polynomials (12) belong to Z[x]. The aforementioned conjugates are among numbers σi (β n ) = σi (β)n , so the assumption implies that |βin | ≤ 1 for each conjugate in (12). It follows that the coefficients of (12) are bounded, and because polynomials in (12) are in Z[x], there are only finitely many polynomials pn (x). Consequently, there are only finitely many elements of B. It follows that β n = β m for some n < m, and therefore β m−n = 1, which contradicts the assumption that β is not a root of unity. Now we can choose a conjugate βi = σi (β) with |βi | > 1, and apply the homomorphism σi (or, to be precise, its extension to C) to equation α = β n to get σi (α) = σi (β)n . As mentioned in Remark 2.1, it is possible to compute arbitrarily precise approximations of σi (α), and because |σi (β)| > 1, we have log |σi (β)| = 0, and we can 10

restrict the number of potential exponents to at least one by computing approximations of the right hand side of n=

log |σi (α)| log |σi (β)|

precise enough. Finally we assume that β is not an algebraic integer. Then it is possible to find efficiently a prime ideal P of the integer ring of F such that vP (β) = 0. Thus vP (α) = nvP (β). Because 2vP (α) ≤ |N(α)|, we have an estimation log2 |N(α)| ≥ |vP (α)| = |nvP (β)| ≥ |n| . Moreover, we can compute arbitrarily precise approximations of N(α), so an upper bound for |n| can be found algorithmically. Remark 2.8. Proposition 2.7 occurred also in [31] in a less detailed form, and in [15] in form, where α = q(β) with q ∈ Q[x]. Remark 2.9. Notice also that when constructing the algorithm of Proposition 2.7, it is not necessary to compute any valuations vP (α). The valuations were only introduced to prove the method correct. However, it is possible to compute the values vP (α) algorithmically, see [9]. Similarly to Proposition 2.7 we can prove the following, a little bit more complicated claim which is needed in the sequel. Proposition 2.10. Let α1 , α2 , β1 , . . ., β4 , and δ be algebraic numbers belonging to a number field F , which is a normal extension of Q. If α1 /α2 is not a root of unity, then it is decidable whether equation β1 α1n + β2 α1−n = β3 α2n + β4 α2−n + δ

(13)

has a solution n ∈ N. Proof. By dividing by β1 (or by β3 ) and taking a common factor, we can assume that the equation (13) is in fact of form α1n + β1 α1−n = γ(α2n + β2 α2−n ) + δ,

(14)

where all the occurring numbers are algebraic (if β1 = β3 = 0 in (13), then the situation is even simpler). By changing the role of α1 and α1−1 we may assume that |α1 | ≥ 1 and similarly that |α2 | ≥ 1. Also we can assume that |α1 | ≥ |α2 |. 11

If |α1 | > |α2 |, we have n |α1 |n − |β1 | α1−1 ≤ α1n + β1 α1−n = γ(α2n + β2 α2−n ) + δ n ≤ |γ| |α2 |n + |γβ2 | α2−1 + |δ| . (15) Now that α1−1 , α2−1 ≤ 1 and |α1 | > |α2 |, the above equality ceases to be valid for n large enough. It is possible to compute approximations of the absolute values above, and find algorithmically a limit M such that (15) does not hold for n ≥ M. Assume then that |α1 | = |α2 |. If there is an embedding σi : F → C such that |σi (α1 )| = |σi (α2 )|, we can apply the homomorphism σi to both sides of equation (13) and conclude as above. Assume then that |σi (α1 )| = |σi (α2 )| for each embedding σi : F → C. Now that |σi (α1 /α2 )| = 1 for each embedding σi , and α1 /α2 is not a root of unity, we conclude, as in Proposition 2.7, that α1 /α2 is not an algebraic integer. Therefore, there must be a prime ideal P of the integer ring of F such that vP (α1 ) = vP (α2 ). By the symmetry of the roles of α1 and α2 we can assume that vP (α1 ) < vP (α2 ). As above, we can also assume that vP (α1 ), vP (α2 ) ≤ 0 (consequently, vP (α1 ), vP (α2 ) ≥ 0). Analogously to (15), we have min{nvP (α1 ), vP (β1 ) + nvP (α1−1 )} = vP (γ) + min{nvP (α2 ), vP (β2 ) + nvP (α2−1 ), vP (δ)}.

(16)

Now that vP (α1 ) < vP (α2 ) ≤ 0 and vP (α1−1 ), vP (α2−1 ) ≥ 0, It is clear that there is a number M such that (16) does not hold if n ≥ M. Moreover, number M can be computed when values vP (α1 ), vP (α2 ), vP (β1 ), vP (β2 ), vP (γ) and vP (δ) are known. The prime ideal P and the aforementioned values can be found algorithmically [9].

2.3 Solution of Linear Recurrent Sequence The following well-known result is fundamental in the study of linear recurrences. Proposition 2.11. Let a0 , a1 , . . ., ak−1 , and u0 , u1 , . . ., uk−1 be fixed integers and recurrence un = ak−1 un−1 + . . . + a1 un−k+1 + a0 un−k (17) define un for each n ≥ k. Let also p(x) = xk − ak−1 xk−1 − . . . − a1 x − a0 be the characteristic polynomial of the recurrence and F the splitting field of p(x). If p(x) = (x − λ1 )m1 · . . . · (x − λr )mr , where λ1 , . . ., λr ∈ F are the distinct zeros of p(x), then there exist unique polynomials p1 (x), . . ., pr (x) ∈ F [x] such that deg(pi ) ≤ mi − 1 and un = p1 (n)λn1 + . . . + pr (n)λnr 12

(18)

for each n ≥ 0. Conversely, any sequence un of form (18) (for polynomial p(x)) satisfies recurrence (17). Here, the form (18) is usually called the solution of un . Our algorithms for the cases of Skolem’s problem uses this solved form of the sequence u n . Note carefully, that the main issue in finding a solution of a sequence are the characteristic roots, and for the recurrent sequence of depth at least 5, this is impossible in most cases. This is also the reason for the need of the theory of the algebraic numbers. Note also that Proposition 2.11 can be proved using the theory of formal power series. Our proof here is elementary using only linear algebra and algebraic properties polynomials. Note also that the converse part can be proved by using the partial solution sequences of the form vn = nj λni , where λi is a characteristic roots and j ≤ mi − 1, which satisfy the relation (17). The claim follows by proving that for any sequences satisfying relation (17), any linear combination of then also satisfies (17). We shall give here a new proof for this converse, which may be of some reader’s interest. Before proceeding to the proof of Proposition 2.11, we need some auxiliary results. Lemma 2.2. Let p(x) = x − k

k−1 

as xs

s=0

be a polynomial having λ as a zero with multiplicity m ≥ 1. Define p 0 (x) = p(x) and pi+1 (x) = xpi (x) for each i ∈ {0, 1, 2, . . .} (pi (x) stands for the derivative of polynomial pi (x)). Then there exist polynomials qi such that pi (x) = (x − λ)m−i qi (x). for each i ∈ {0, 1, . . . , m − 1}. Conversely, if λ = 0 and pi (λ) = 0 for each i ∈ {0, 1, . . . , m − 1}, then p0 (x) = (x − λ)m q0 (x) for some polynomial q0 (x). Proof. We begin by showing that, for each i ≥ 1, pi (x) can be represented as pi (x) =

i 

(i)

cj xj p(j) (x),

(19)

j=1 (k)

(i)

(i)

where each cj is an integer, and c1 = ci = 1. The case i = 1 is clear: p1 (x) = xp (x). Assume then that (19) holds for some value of i. Then pi (x)

=

i 

(i)

cj (jxj−1 p(j) (x) + xj p(j+1) (x))

j=1

=

i 

(i) cj jxj−1 p(j) (x)

j=1

+

i+1  j=2

13

(i)

cj−1 xj−1 p(j) (x),

and consequently 

pi+1 (x) = xp (x) +

i 

(i)

(i)

(jcj + cj−1 )xj p(j) (x) + xi+1 p(i+1) (x),

j=2

as claimed. The rest of the proof is based on the following well-known fact: λ is a zero of p(x) with multiplicity m, if and only if λ is a zero of p(j) (x) with multiplicity m − j. The first claim of the lemma follows directly from this and from representation (19), because then p(j) (x) = (x − λ)m−j rj (x) for some polynomial rj (x). The converse statement follows from representation (19) by using induction. In fact, if the assumption holds for m = 1, then 0 = p0 (λ) = p(λ) and hence (x − λ) | p(x). If claim the holds for all numbers less than m, and if pm−1 (λ) = 0 we have m−1  (m−1) cj λj p(j) (λ) = λm−1 p(m−1) (λ), 0= j=0

which implies that p(m−1) (λ) = 0. The claim follows from this. Lemma 2.3. Let the notations be as in the previous lemma. Then i k

kλ =

k−1 

si as λs

s=0

for each i ∈ {0, 1, . . . , m − 1}. Proof. By induction we see that pi (x) = k i xk −

k−1 

si as xs

s=0

for each i ∈ {0, 1, 2, . . .}. By the previous lemma, pi (λ) = 0 for each i ∈ {0, 1, . . . , m − 1}, and the claim follows immediately. Lemma 2.4. Let the notations be as in the previous lemmata. Then k 

ak−s si λk−s = 0

s=1

for each i ∈ {1, 2, . . . , m − 1}. Proof. A direct calculation gives k  s=1

i k−s

ak−s s λ

 k−1 i i−t  k = as (k − s) λ = (−1) as st λs . t s=0 t=0 s=0 k−1 

i 

i s

14

t

(20)

By the previous lemma, expression (20) can be written as   i i   t i i−t t k i k t i (−1) (−1) k ·k λ =k λ . t t t=0 t=0 The latest expression equals to 0 whenever i ∈ {1, 2, . . . , m − 1}. Lemma 2.5. Let the notations be as before. Then k 

ak−s (n − s)j λk−s = nj λk

s=1

if j ∈ {0, 1, . . . , m − 1}. Proof. A straightforward calculation shows that k 

ak−s (n − s) λ

j k−s

s=1 j

j   j j−t = ak−s n (−s)t λk−s t s=1 t=0 k 

k  j  j−t t = ak−s st λk−s = nj λk . n (−1) t t=0 s=1

The last equality is due to Lemmata 2.3 and 2.4. The proof of Proposition 2.11. We will begin with the “converse part” of the statement. Let r  pi (n)λni , un = i=1

where λ1 , . . ., λr are distinct zeros of p(x) = xk − ak−1 xk−1 − . . . − a1 x − a0 with multiplicities m1 , . . ., mr , and deg(pi ) ≤ mi − 1. Then, for each n ≥ k, un − ak−1 un−1 − . . . − a0 un−k r k r    n = pi (n)λi − ak−s pi (n − s)λn−s . i s=1

i=1

By denoting ak = −1 and pi (x) =

i=1

m i −1 

pij xj

j=0

we can write (21) as −

k 

ak−s

r 

pi (n − s)λn−s i

s=0

= −

i=1 m r k i −1  

pij (n − s)j ak−s λn−k λk−s i i

i=1 s=0 j=0

= −

r  i=1

λn−k i

m i −1  j=0

pij

k  s=0

15

ak−s (n − s)j λk−s . i

(21)

According to Lemma 2.5 we have (recall that ak = −1) k 

ak−s (n −

s)j λk−s i

= −n

j

λki

+

s=0

=

−nj λki

k 

ak−s (n − s)j λk−s i

s=1

+

nj λki

= 0.

Hence un − ak−1 un−1 − . . . − a0 un−k = 0 for each n ≥ k. For the first part of the claim, we can assume without loss of generality that a0 = 0. It follows that all the numbers λi are nonzero. Denote again pi (x) =

m i −1 

pij xj

j=0

and regard pij as unknowns which are to be determined under conditions un =

r 

pi (n)λni

(22)

i=1

for each n ∈ {0, 1, . . . , k − 1}. If numbers pij can be found, then the proof is complete, since according to the “converse part”, sequence u n in (22) satisfies the recurrence equation (17). Equations (22) can be written more explicitly in form un =

r m i −1  

pij nj λni ,

(23)

i=1 j=0

where n ∈ {0, 1, . . . , k − 1}. The determinant of system (23) is of form 1 0 ... 0 ... 1 0 ... 0 λ1 λ1 ... λ1 . . . λr λr . . . λr 2 m1 −1 2 2 2 mr −1 2 λ2 2λ . . . 2 λ . . . λ 2λ . . . 2 λr 1 1 r r 1 3 m1 −1 3 3 3 mr −1 3 λ3 3λ1 ... 3 λ1 . . . λr 3λr . . . 3 λr 1 .. . .. . . . . . . .. .. .. .. .. .. .. . . k−1 k−1 k−1 λ1 (k − 1)λ1 λr

. (24)

We will demonstrate that the determinant (24) is nonzero, which implies that the unknowns pij are determined uniquely. For that purpose, we show that the rows of (24) are linearly independent. To do this, assume that there are numbers c 0 , c1 , . . ., ck−1 such that k−1  cl li λlj = 0 (25) l=0

16

for each j ∈ {1, 2, . . . , r} and i ∈ {0, 1, . . . , mj − 1}. By denoting C(x) =

k−1 

cl xl

(26)

l=0

and defining C0 (x) = C(x), Ci+1 (x) = xCi (x) as in Lemma 2.2, relations (25) can be rewritten as Ci (λj ) = 0 (27) for each j ∈ {1, 2, . . . , r}, i ∈ {0, 1, . . . , mj − 1}. Lemma 2.2 implies then that C(x) is divisible by (x − λ1 )m1 , . . ., (x − λr )mr , which shows that either deg(C(x)) ≥ m1 + . . . + mr = k or C(x) is identically zero. By (26), the former option does not hold, so C(x) is identically zero and hence c0 = c1 = . . . = ck−1 = 0. Note that in the case of distinct roots, the determinant (24) is a Vandermonde’s determinant, which is known to be nonzero. Even more information can be extracted from the proof. The following proposition may be of reader’s interest. Proposition 2.12. Determinant (24) is either in R or in iR. Proof. We notice first that if λ is a root of a polynomial p(x) ∈ R, then the multiplicity of λ and the one of its complex conjugate λ must coincide. In fact, if λ is a root of p(x), then of course so is λ, and (x − λ)(x − λ) ∈ R[x] divides p(x). Thus p(x) = (x − λ)(x − λ)p1 (x), where p1 (x) ∈ R, and we can apply the argumentation to p1 (x) recursively. Let us denote the determinant (24) by D. It is clear that the complex conjugate of D is obtained by taking the conjugates of all entries of (24). On the other hand, if there is a non-real root λ of p(x) (recall that p(x) is the characteristic polynomial of the recurrence in question) occurring exactly in m columns of (24), then there are also m columns of (24) which are identical to those m first ones, except that λ is replaced with λ. This is because λ and λ have the same multiplicity. By swapping all the m columns where λ occurs with those ones where λ occurs, we can modify D into a form where the columns containing λ and λ are restored to the positions they were in D. Performing the same operation to each complex root of p(x) we have again the original determinant D, since the rows containing occurrences of the real roots are not affected at all when taking the complex conjugates. If there are 2r non-real roots λi1 , . . ., λir and their complex conjugates, (we assume that none of λi1 , . . ., λir are complex conjugates to each other) with multiplicities mi1 , . . ., mir , we learn that D = (−1)mi1 +...+mir D. Now if s = mi1 + . . . + mir is even, we have D = D, which implies D ∈ R, whereas odd s means that D = −D, and consequently D ∈ iR. 17

Proposition 2.13. Let un =

r 

pi (n)λni

i=1

as in (22). If λi2 = λi1 , then also pi2 (x) = pi1 (x), where pi1 (x) stands for the polynomial which is obtained from pi1 (x) by replacing each coefficient by its complex conjugate. Proof. Coefficients pij can be computed by Cramer’s rule: pij = D(i, j)/D, where D(i, j) stands for the determinant which is obtained from D by replacing )T in (24) by (u0 , u1 , . . . , uk−1)T . the column (0j λ0i , 1j λ1i , 2j λ2i , . . . , (k − 1)j λk−1 i If then λi2 = λi1 , we learn that, as in the previous proposition, that the determinant D(i2 , j) can be obtained from D(i1 , j) by first taking the complex conjugate of each entry of D(i1 , j) and then swapping s = mi1 + . . . + mir columns (it is needed here that each un is real). It follows that D(i2 , j) = (−1)s D(i1 , j), which together with D = (−1)s D gives that pi1 j =

(−1)s D(i2 , j) D(i1 , j) D(i2 , j) = = = pi2 ,j . s (−1) D D D

2.4 Liner Forms of Logarithms In the sequel we will need the following important results by Alan Baker [1]. Theorem 2.14. Let α1 , . . ., αn be non-zero algebraic numbers with degrees at most d and heights at most A. Furthermore, let β0 , . . ., βn be algebraic numbers with degrees at most d and heights at most B ≥ 2. Then, for Λ = β0 + β1 log α1 + . . . + βn log αn we have either Λ = 0 or |Λ| > B −C , where C is an algorithmically computable number depending only on n, d, A and the branch of the logarithms chosen. The estimate for C is of form C  (log A)κ , where κ depends only on n, and C  depends only on n and d. In the case when β0 = 0 and β1 , . . ., βn are rational integers, the theorem holds with C = C  Ω log Ω, where Ω = log A1 · . . . · log An ,

(28)

and the numbers Ai ≥ 4 are chosen such that H(αi ) ≤ Ai [1]. The following strengthened, quantitative version of the above theorem can be found in [2]: Theorem 2.15. Let the notations be as in the above (with the principal branch of the logarithms). If Λ = 0, then 

|Λ| > (BΩ)−CΩ log Ω , where Ω = Ω/ log An and C = (16nd)200n . 18

Remark 2.16. Recall that the height of an algebraic number α is defined as the maximum of the absolute values of the coefficients of the defining polynomial of α. However, the above theorem holds if one replaces the the height by the maximal absolute value of the coefficients of any polynomial in Z[x] having α as a zero [4]. See also the improved versions of the above inequalities expressed in the terms of logarithmic Weil height [3], as well as the p-adic analogues [25].

3 Infinity of Zeros In this section, we represent the proof of Skolem-Mahler-Lech theorem in a form given by G. Hansel [13]. The core of the proof by Hansel is the following theorem. Theorem 3.1. Let p > 2 be a prime number and di any sequence of integers, and define n   n i p di . bn = i i=0 If bn = 0 for infinitely many n, then bn = 0 for each n. Before giving the proof of Theorem 3.1, we need some lemmata and definitions. In the following lemmata, we assume the prime number p > 2 fixed, unless stated otherwise. Lemma 3.1. If p is any prime number and n ∈ Z, then

pn  p−2 ≥n vp . n! p−1 Proof. Anyway

pn  = vp (pn ) − vp (n!) = n − vp (n!), n! so it suffices to estimate vp (n!). It is plain that n  n  vp (n!) = + 2 + ... p p n n n + 2 + ... = , ≤ p p p−1 vp

hence vp

pn  n p−2 ≥n− =n . n! p−1 p−1

Definition 3.2. Given a polynomial P (x) = a0 + a1 x + . . . + an xn ∈ Q[x],

let ωk (P ) =

min{vp (aj ) | j ≥ k}, if k ≤ n ∞, if k > n. 19

Remark 3.3. It is clear that ω0 (P ) ≤ ω1 (P ) ≤ . . . for each polynomial P (x). Remark 3.4. For a fixed value P (t) (t ∈ Z) we have of course vp (P (t)) = vp (a0 + a1 t + . . . an tn ) ≥ min{vp (a0 ), vp (a1 t), . . . , vp (an tn )} ≥ min{vp (a0 ), vp (a1 ), . . . , vp (an )} = ω0 (P ). Lemma 3.2. Let P (x), Q(x) ∈ Q[x] and n1 , . . ., nk ∈ Z. If P (x) = (x − n1 ) · . . . · (x − nk )Q(x), then ωk (P ) ≤ ω0 (Q). Proof. We show that if P (x) = (x − n1 )Q(x), then ωk+1 (P ) ≤ ωk (Q) for each k. The claim follows then by applying this result recursively to polynomial Q(x). By writing Q(x) = q0 + q1 x + . . . + qn xn and P (x) = p0 + p1 x + . . . + pn+1 xn+1 we have that pj+1 = qj − n1 qj+1 , which implies that qj = pj+1 + n1 pj+2 + n21 pj+3 + . . . + nn−j pn+1 , 1 which shows that vp (qj ) = vp (pj+1 + n1 pj+2 + . . . + nn−j pn+1 ) 1 ≥ min{vp (pj+1 ), vp (pj+2 ), . . . , vp (pn+1 )} = ωj+1(P ). It follows that ωk (Q) ≥ ωk+1(P ). Let n ∈ N be fixed and define R(x) ∈ Q[x] as R(x) =

n 

d i pi

i=0

x(x − 1) · . . . · (x − i + 1) . i!

. Lemma 3.3. For each k, we have ωk (R) ≥ k p−2 p−1 Proof. It is clear that R(x) can be written as R(x) = =

n  i=0 n  i=0

di

pi x(x − 1) · . . . (x − i + 1) i!

i n  n  pi  pi j di sij x = di sij xj , i! j=0 i! j=0 i=j

20

(29)

where sij are integers, so called Stirling numbers (of the first kind). Therefore, the coefficient of xj in polynomial R(x) is given by n  i=j

di

pi sij xj , i!

and vp (

n  i=j

pi pi pi di sij ) ≥ min{vp (di sij )} ≥ min{vp ( )} i≥j i≥j i! i! i! ≥ min{i · i≥j

so it follows that ωj (R) ≥ j ·

p−2 p−2 }≥j· , p−1 p−1

p−2 . p−1

Proof of Theorem 3.1. We show that if bn = 0 for n ∈ {n1 , . . . , nk }, then vp (bn ) ≥ for each bn . Theorem 3.1 follows, since now k can be chosen arbitrarily k · p−2 p−1 large, and therefore vp (bn ) = ∞ for each member of the sequence bn . Choose n = max{n1 , . . . , nk } and recall the definition of R(x) in (29). R(x) =

n  i=0

d i pi

x(x − 1) · . . . · (x − i + 1) ∈ Q[x]. i!

It is clear that for each t ≤ n we have n  t    t i t i p di = p di = bt , R(t) = i i i=0 i=0 and since R(x) has integer zeros n1 , . . ., nk , R(x) = (x − n1 ) · . . . · (x − nk )Q(x) for some polynomial Q(x). Therefore also vp (R(t)) ≥ vp (Q(t)), and we can estimate by Remark 3.4 and by the previous lemmata as follows: vp (bt ) = vb (R(t)) ≥ vp (Q(t)) ≥ ω0 (Q) ≥ ωk (R) ≥ k ·

p−2 . p−1

The following theorem is a special case of Skolem-Mahler-Lech theorem. We will not give a general case of the proof here, but instead we refer to [13], where it is explained how the proof extends into the most general case. Theorem 3.5. Let un be a linear recurrent sequence. Then the set Z(un ) = {i | ui = 0} is a union of a finite set F and finitely many arithmetic progressions. That is, Z admits representation Z = F ∪ (a1 + NZ) ∪ . . . ∪ (ar + NZ). Moreover, numbers N, a1 , . . ., ar can be found algorithmically. 21

Remark 3.6. The “constructive part” of the above theorem means that one can decide, given a linear recurrence, whether there are infinitely many n such that un = 0. Proof. Let each un be given as un = ak−1 un−1 + . . . + a1 un−k+1 + a0 un−k . Without loss of generality we can assume that a0 = 0, for otherwise the sequence un would satisfy a shorter recursion. Then we can define vectors v ∈ Zk , w ∈ Zk , and a matrix M ∈ Zk×k as in (3) such that un = vM n wT , and that det(M) = ±a0 = 0. Choose then a prime number p not dividing a0 and consider the image Mp of matrix M in Fk×k under the canonical projection Z → Fp . Now that p  a0 , we p have that det(Mp ) = 0. Moreover, the group of invertible k × k-matrices over F p 2 2 has cardinality at most pk , so it follows that there exists a number N ≤ pk such that MpN = I in the group of invertible matrices over Fp . Lifting the equation 2 MpN = I back to matrices over Z we learn that there is a number N ≤ pk and a matrix M1 ∈ Zk×k such that M N = I + pM1 . Notice that numbers p and N, as well as the matrix M1 can be found algorithmically. Now, for any number n we can write n = mN + r, where 0 ≤ r < N and see that M n = M mN +r = M N m M r = (I + pM1 )m M r . Then we have un = vM k w T = v(I + pM1 )m M r w T , i.e., umN +r = v(I + pM1 )m wTr , where w Tr = M r wT . Now we can split the sequence un into N different linearly recurrent sequences (r) um for each r ∈ {0, 1, . . . , N − 1} by setting u(r) m

= umN +r = v(I + pM1 )

m

wTr

(r)

m   m i p vM1i w Tr . = i i=0

By Theorem 3.1, sequence um either vanishes identically or contains only finitely (r) many zeros. To check whether um vanishes identically is an easy task: it suffices to compute k first members of the sequence. The claim follows immediately. 22

4 Decidable Cases 4.1 Dominant Roots Before the main theorem of this section, we must introduce several lemmata. The following useful reduction was mentioned in [5]. Lemma 4.1. Let un = ak−1 un−1 + . . . + a1 un−k+1 + a0 un−k

(30)

be a linear recurrent sequence and un = p1 (n)λn1 + p2 (n)λn2 + . . . + pr (n)λnr

(31)

it representation as in (18). Sequence un can be algorithmically reduced to a finite (0) (1) (N −1) such that λi /λj is not number of linear recurrent sequences um , um . . ., um (i) a root of unity for i = j in the representation (31) for sequences u m . Proof. If some λi /λj is a root of unity, let N = lcm{ord(λi /λj ) | i = j and λi /λj is a root of unity}. We can split the original sequence un into M distinct subsequences: For each (j) j ∈ {0, 1, . . . , N − 1} we define um = uj+mN and notice that u(j) m

= uj+mN =

r 

pi (j +

mN)λj+mN i

i=1

=

r 

m pi (j + mN)λji (λN i )

(32)

i=1

N If {µ1 , . . . , µr } are the distinct elements of set {λN 1 , . . . , λr }, we can write (32) as r  (j) um = qi (m)µm (33) i i=1

If i = j, then µi /µj is not a root of unity, since (µi /µj )t = 1 is equivalent to N (λi /λj )N t = 1 (we choose the notations such that µi = λN i and µj = λj ), which N implies (λi /λj ) = 1. This contradicts the assumption that µi = µj . We will yet demonstrate, that the property λi = λj =⇒ pi (x) = pj (x) is preserved in this reduction. But this is very straightforward: Assume that µ 1 = N N N λN i1 = . . . = λik . Then trivially µ1 = λi1 = . . . = λik and q1 (x) = pi1 (j + xN)λji1 + . . . + pik (j + xN)λjik is the coefficient polynomial of µ1 , whereas the j

j

coefficient polynomial of µ1 is pi1 (j +xN)λi1 +. . .+pik (j +xN)λik = q 1 (x). We will also need several height estimations. Lemma 4.2. Let α be an algebraic number and denote q(x) = qn xn +qn−1 xn−1 + . . . + q1 x + q0 ∈ Z[x] and H(q) = max{|q0 | , |q1 | , . . . , |qn |}. If q(α) = 0, then there exists a (computable) number Cn depending on n only such that H(α) ≤ Cn H(q). 23

Proof. If q(x) is irreducible, there is an integer C such that q(x) = Cp(x), where p(x) is the defining polynomial of α. Hence H(q) = |C| H(α) ≥ H(α), and we can choose Cn = 1. If q(x) is not irreducible, then q(x) = p(x)r(x), where p(x), r(x) ∈ Z[x] and p(x) is the defining polynomial of α. We must show that the coefficients cannot cancel too much when computing the product p(x)r(x). For this purpose, we will employ Bombieri’s norm [6]: If q(x) is as above, then the Bombieri’s 2-norm is defined as n  −1   12 n [q] = |qi |2 . i i=0 Bombieri’s inequality [6] states that if p(x)r(x) = q(x), and deg(p) = m, then  12 n [p][r] ≤ [q]. m Since r(x) ∈ Z[x], we have [r] ≥ 1, and consequently  12 n [p] ≤ [q]. m

(34)

It can be shown [30] that n  −1  n

n + 1  2i = , 2n i=0 i + 1 n

i

i=0

which implies that

n  −1  n

i

i=0



8 < 4, 3

and hence [q] =

n  −1  n i=0

i

|qi |

2

 12



n  −1  n i=0

i

H(q)

2

 12

< 2H(q).

(35)

Since p(x) is the defining polynomial of α, there must be a coefficient p j of p(x) such that H(α) = |pj |. Then [p] =

m  −1  m i=0

i

|pi |

2

 12



m −1 j

H(α)

2

 12

 − 12 m = H(α) . j

(36)

Combining (34), (35) and (36) we see that  12   12  12  12 m n n n m 2H(q) ≤ 2H(q) ≤ 2 H(q). H(α) ≤ m/2 n/2 m n/2 j

24

Lemma 4.3. If α is an algebraic number of degree d and height H, and β n = α, then deg(β) ≤ nd and H(β) ≤ Cn,dH(α), where Cn,d is a (computable) number depending on n and d alone. Proof. Let p(x) = pd xd + pd−1 xd−1 + . . . + p1 x + p0 be the defining polynomial of α. Clearly polynomial q(x) = pd xnd + pd−1 xn(d−1) + . . . + p1 xn + p0 has β as a root, and the first claim follows  directly. The second claim follows by nd Lemma 4.2, we can take Cn,d = 2 nd/2 . Lemma 4.4. Let p(x) ∈ C[x]. For each natural number n, let p(n) = |p(n)| eiφn . Then there are algorithmically computable numbers B and C such that H(e iφn ) ≤ BnC . Numbers B and C depend only on the polynomial p(x). Moreover, e iφn → eiφ as n → ∞, where eiφ is an algebraic number which can be found algorithmically. Proof. Let p(x) = pm xm +. . .+p1 x+p0 . First we will estimate the height of p(n). Let F be a field containing all the coefficients of p(x) and denote d = [F : Q]. Then clearly p(n) ∈ F for each n ∈ N, which implies that deg(p(n)) ≤ d for each n. Let H = max{H(p0), . . . , H(pm−1 )}. Now if deg(α) ≤ d, it is easy to see that H(nα) ≤ nd H(α) for each n ∈ N. In fact, if deg(α) = d1 and q(x) = ad1 xd1 + . . . + a1 x + a0 is the defining polynomial of α, then polynomial q1 (x) = ad1 xd1 + . . . + a1 nd1 −1 x + a0 nd1

(37)

has nα as a zero. Moreover, (37) is irreducible, since otherwise deg(nα) < d 1 which would imply that also α = n1 · nα has degree less than d1 . Therefore (37) is the defining polynomial of nα, and estimation H(nα) ≤ nd H(α) follows. As a consequence, we get that H(pi ni ) ≤ nid H ≤ nmd H = H1 for each i ∈ {0, 1, . . . , m}. For estimating the height of the sum of two algebraic numbers, we can use the following fact [1, p. 24]: If deg(α), deg(β) ≤ d and H(α), H(β) ≤ H, then there exists a computable constant C1 (depending on d only) such that H(α + β), H(αβ) ≤ H C1 . Thus H(pm nm + pm−1 nm−1 ) ≤ H1C1 . Similarly C2

H(pm nm + pm−1 nm−1 + pm−2 nm−2 ) ≤ (H1C1 )C1 = H1 1 , and continuing this way we see that Cm

H(p(n)) = H(pm nm + pm−1 nm−1 + . . . + p1 n + p0 ) ≤ H1 1 , 25

and that as well as

C m+1

Cm

H(p(n)2 ) ≤ (H1 1 )C1 = H1 1

C m+1

Cm

H(|p(n)|2 ) = H(p(n)p(n)) ≤ (H1 1 )C1 = H1 1

.

By Lemma 4.3 C m+1

H(|p(n)|) ≤ C2 H1 1

,

where C2 is a computable constant depending on d only, and deg(|p(n)|) ≤ 2d. It is plain that H(|p(n)|) = H(|p(n)|−1 ), which finally implies that H(eiφn ) = H(|p(n)|−1 · |p(n)| eiφn ) C m+1 C3

= H(|p(n)|−1 p(n)) ≤ (C2 H1 1 m+1

where C3 depends on d only. Denoting C4 = C2C3 H C1 and recalling that H1 = nmd H, we see that

C3

) ,

, C5 = mdC1m+1 C3 ,

H(eiφn ) ≤ C4 nC5 , where C4 and C5 are (computable) constants that depend only on polynomial p(x). The latter claim is trivial, since p(n) pm nm 1 pm 1 = + O( ) = + O( ), |p(n)| |p(n)| n |p(n)/nm | n and eiφn =

p(n) → eiφ , |p(n)|

where φ is the phase of pm = |pm | eiφ . Another obvious but important fact is that for any  > 0 it is possible to find algorithmically an integer M such that iφ e − eiφn ≤  whenever n ≥ M.

p1 (x) Lemma 4.5. If p1 (x), p2 (x) ∈ C[x] are both of degree d, then p2 (x) tends to a finite limit as x → ∞ along the real axis, and the convergence to the limit is p1 (x) ultimately monotonous. Moreover, if |p1 (x)| = |p2 (x)|, then p2 (x) = L±Θ(x−k ), where L, k and the coefficients belonging to Θ-notation can be algorithmically found. Proof. In this proof, we assume that x ∈ R. Then |p1 (x)|2 = p1 (x)p1 (x) ∈ R[x] is a polynomial of degree 2d. Let the leading coefficients of p1 (x) and p2 (x) be c1 and c2 , respectively. Then it is easy to see that the leading coefficients of |p 1 (x)|2 and |p1 (x)|2 are |c1 |2 and |c2 |2 , respectively, and as a consequence |c1 |2 2 |p1 (x)| − 2 |p2 (x)| = q(x), |c2 | 2

26

where q(x) ∈ R[x] is a nonzero polynomial of degree less than 2d. Polynomial q(x) can be constructed from polynomials p1 (x) and p2 (x), and when the coefficients of q(x) are known, it is easy to find M1 such that q(x) = 0 when x ≥ M1 . If deg(q(x)) = d1 < 2d, and q(x) is ultimately positive (resp. negative), one can use standard techniques for finding constant C 1 , C2 > 0 such that C1 xd1 ≤ q(x) ≤ C2 xd1 (resp. −C1 xd1 ≤ q(x) ≤ −C2 xd1 ), when x ≥ M2 . Similarly we can find positive constants C3 , C4 , and M3 such that C3 x2d ≤ |p2 (x)|2 ≤ C4 x2d , when x ≥ M3 . If now q(x) is ultimately positive, then p1 (x) 2 c1 2 = + q(x) , p2 (x) c2 |p2 (x)|2 where the remainder satisfies C1 xd1 q(x) C2 xd1 ≤ ≤ C4 x2d C3 x2d |p2 (x)|2 for x ≥ M = max{M1 , M2 , M3 }. The case that q(x) is ultimately negative is treated in the same way. The claim follows now from the fact that p1 (x) 2 c1 2  p1 (x) c1  p1 (x) c1  − = − c2 p2 (x) + c2 p2 (x) p2 (x) c2 and that the latter factor of the product is in interval (2 |c1 /c2 | − , 2 |c1 /c2 | + ) for any x ≥ M , where M can be found algorithmically when  is given. Proposition 4.1. Let un = ak−1 un−1 + . . . + a1 un−k+1 + a0 un−k

(38)

be a linear recurrent sequence and un = p1 (n)λn1 + p2 (n)λn2 + . . . + pr (n)λnr

(39)

it representation as in (18). Without loss of generality, we can assume that |λ 1 | ≥ |λ2 | ≥ . . . ≥ |λr |. Problem S KOLEM is decidable if one of the following cases hold: 1. |λ1 | > |λ2 |. 2. λ2 = λ1 , |λ1 | = |λ2 | > |λ3 |. 3. |λ1 | = |λ2 | = |λ3 | > |λ4 | and λ1 ∈ R, λ2 = λ3 . Remark 4.2. It is decidable whether one of the above conditions holds. In the continuation will also assume that the roots of the characteristic polynomial are always enumerated such that |λ1 | ≥ |λ2 | ≥ . . .. The proof also shows that the above the claim holds if actually r = 1 in case (1) or if r = 2 in case (2), or if r = 3 in case (3). 27

Remark 4.3. It must be emphasized that even a more general result than this proposition has been reached in [22]. Here we get a restricted version of [22], by using somewhat lighter mathematical machinery. Proof. We prove only the last claim, the other ones follow easily from that. It is worth noticing that by Lemma 4.1, we can assume that λi /λj is not a root of unity, if i = j. We denote by F the field which contains all the roots λ1 , . . ., λr , as well as their absolute values |λ1 |, . . ., |λr |. Furthermore, we assume that F is normal (see Remark 2.4) and denote d = [F : Q]. By the assumption and Proposition 2.13, we can write n

un = p1 (n)λn1 + p2 (n)λn2 + p2 (n)λ2 + R1 (n),

(40)

where R1 (n) = p4 (n)λn4 + . . . + pr (n)λnr , so R1 (n)/λn1 tends exponentially fast to 0 as n tends to infinity. We denote the main term by R0 (n) = un − R1 (n). We prove the claim only in the case λ1 < 0, the case λ1 > 0 is even easier. Denote λ1 = −λ, λ2 = λeiθ , λ3 = λe−iθ . We write also p1 (n) = An , p2 (n) = Bn eiφn , p2 (n) = Bn e−iφn , where Bn ∈ R, φn ∈ (−π, π]. By proposition 2.13, An ∈ R anyway. To examine the leading term of (40), we write n

R0 (n) = p1 (n)λn1 + p2 (n)λn2 + p2 (n)λ2 = An (−λ)n + Bn eiφn λn einθ + Bn e−iφn λn e−inθ A  n = λn Bn (−1)n + ei(φn +nθ) + e−i(φn +nθ) Bn   n n An = 2λ Bn (−1) + cos(φn + nθ) . 2Bn An If deg(p1 ) > deg(p2 ), then clearly 2Bn grows unrestricted when n tends to infin An ity. It is clearly possible to find (algorithmically) a number M1 such that 2Bn ≥ 2 whenever n ≥ M1 . For such values of n, we have A A n n n n ≥ (−1) (−1) − |cos(φn + nθ)| ≥ 2 − 1 = 1, + cos(φ + nθ) n 2Bn 2Bn and hence |R0 (n)| ≥ 2λn Bn when n ≥ M1 . Because Bn is an absolute value of a given nonzero polynomial, we can find (algorithmically) a number M2 such that Bn ≥ 1/2 when n ≥ M2 . Thus |un | = |R0 (n) + R1 (n)| ≥ |R0 (n)|−|R1 (n)| ≥ λn −|R1 (n)| = λn (1− It is now possible to find (algorithmically) a number M such that whenever n ≥ M. Then also un = 0 when n ≥ M. 28

|R1 (n)| ). λn

|R1 (n)| λn

< 1

An If deg(p1 ) = deg(p2 ), then limn→∞ 2B is a finite number which can be n straightforwardly recovered from the leading coefficients of p1 and p2 . If deg(p 1 ) < An deg(p2 ), then of course the aforementioned limit equals to 0. If limn→∞ 2B > n 1, one can find algorithmically a number M such that u n = 0 whenever n ≥ M, as easily as in the case deg(p1 ) > deg(p2 ). An Lemma 4.5 becomes helpful if limn→∞ 2Bn = 1. In this case, the convergence to the limit is ultimately monotonous, and following the proof of Lemma An 4.5, we can effectively find a constant M and decide whether 2Bn approaches 1 from above or from below (for n ≥ M). In the case that the convergence happens from above, we can utilize the proof of Lemma 4.5 to find positive constants M, C and k such that An C 2Bn − 1 ≥ nk , when n ≥ M. Then (−1)n An + cos(φn + nθ) ≥ An − 1 ≥ C 2Bn 2Bn nk and

 n C C |R1 (n)|  |un | ≥ λ Bn · k − |R1 (n)| = λn Bn · k − , n n λn

n vanishes, it does so at most polynomially, but the when n ≥ M. If the term CB nk |R1 (n)| latter term λn vanishes exponentially. It follows that one can find a number M1 such that un = 0 whenever n ≥ M1 . An Finally we assume that either 2B tends to 1 (ultimately) from below, or n tends to a limit less than 1. In both cases, we choose first M1 such that that it An 2Bn ≤ 1, if n ≥ M1 . We will extend Mignotte’s result [20] to estimate the expression (−1)n An + cos(φn + nθ) (41) 2Bn

from below by using Baker’s theorem. If we can find for (41) a lower bound of form nCk for n ≥ M, then the proof is complete, since we can argue as in the previous case (of course numbers k, C, and M must be found algorithmically). An Now that 2Bn ≤ 1 for each n under consideration, we can choose ψn ∈ An . In fact, the description of eiψn can be found by (−π, π] such that cos ψn = 2B n n using equation eiψn + e−iψn = A , which also shows that eiψn is an algebraic Bn number. Expression (41) takes now form

|cos(φn + nθ) + (−1)n cos ψn | , 29

(42)

and we treat cases n even and n odd separately. For even n, (42) is of form φ φ + nθ + ψ + nθ − ψ n n n n cos , (43) |cos(φn + nθ) + cos ψn | = cos 2 2 whereas for odd n, we have

φn + nθ + ψn φn + nθ − ψn sin . |cos(φn + nθ) − cos ψn | = sin 2 2

(44)

We handle only the even case, (44) is even easier. In the right hand side of (43), one of the factors is minimal, so 2 φ + nθ ± ψ n n , |cos(φn + nθ) + cos ψn | ≥ cos (45) 2 and we may concentrate on expressions φn + nθ ± ψn − π φ + nθ ± ψ n n cos = sin . 2 2

(46)

It is of course possible to choose mn ∈ Z such that π π φn + nθ ± ψn − π + mn π ∈ [− , ]. 2 2 2 Moreover, since φn , ψn , θ ∈ [−π, π], such mn satisfies −

n+2 n+4 ≤ mn ≤ . 2 2

In particular, mn satisfies |mn | ≤ n, whenever n ≥ 4. We will then use inequality |sin x| ≥ π2 |x| (valid for x ∈ [− π2 , π2 ]) to see that φ + nθ ± ψ n n cos 2   φ + nθ ± ψ − π n n = sin + mn π 2 2 φn + nθ ± ψn − π ≥ π + m n π 2 1 = (47) |iφn + niθ ± iψn + (2mn − 1)iπ| . π Numbers iφn , iθ, iψn , and iπ occurring in the latest expression are all logarithms of algebraic numbers. To apply Baker’s theorem, we must estimate the heights of these algebraic numbers and to find out when (47) may become zero. By Lemma 4.4 there are constants C1 and C2 such that H(eiφn ) ≤ C1 nC2 . Clearly eiφn belongs to F , which shows that d(eiφn ) ≤ d. It is plain that H(eiθ ) is 30

independent of n, and can be estimated using equation λ2 = λeiθ as in the proof of Lemma 4.4. Moreover, d(eiθ ) ≤ 2d. Also H(eiπ ) = H(−1) = 1 and d(eiπ ) = 1. It remains to estimate the height and the degree of eiψn . For that, equation eiψn + e−iψn =

An Bn

(48)

offers a starting point. Both numbers A2n and Bn2 belong to F , so (48) shows that eiψn satisfies a quadratic equation over a quadratic extension of F . This implies that deg(eiψn ) ≤ 4d. Solution of (48) is   

An 2 1 An iψn ± −4 , e = 2 Bn Bn which, using [1, p. 24] and Lemma 4.3 shows that it is possible to find algorithmically constants C3 and C4 such that H(eiψn ) ≤ C3 nC4 . Before applying Baker’s theorem we must still find out the values of n for which (47) becomes zero. Formula (47) is zero if and only if eiφn eniθ e±iψn e(2mn −1)iπ = 1, which is implies that

(ei2θ )n = e−i2(φn ±ψn ) .

(49)

We will show how to extend Proposition 2.7 to find out all solutions of (49). This is indeed rather straightforward: by Lemma 4.1 we can assume that e 2iθ = λ2 /λ2 is not a root of unity, which implies that the powers (e2iθ )n are all distinct. By Lemma 4.4 and construction of numbers ψn it is clear that there are limits eiφn → eiφ and eiψn → eiψ , which both are algebraic numbers that can be found algorithmically. for each  > 0 one can algorithmically find a number iφMoreover, e n − eiφ , eiψn − eiψ ≤  whenever n ≥ M . M such that Now eiθ = 1, so we have to apply the latter part of the proof of Proposition 2.7. Recall from the that proof, that since λ2 /λ2 = e2iθ is not a root of unity, there are two choices: either e2iθ is an algebraic integer or not. If e2iθ is algebraic an 2iθ integer, there is a (computable) isomorphism σi : C → C such that σi (e ) > 1. Equation (49) gives then log σi (e−2i(φn ±ψn ) ) = n log σi (e2iθ ) . (50) Now that e−2iφn ±ψn tends to a limit, we can find all potential numbers n for which (50) holds. If e2iθ is not an algebraic integer, there is a prime ideal P of the integer ring of field F for which vP (e2iθ ) = 0. It follows that nvP (e2iθ ) = vP (e−2i(φn ±ψn ) ) and

|n| ≤ vP (e−2i(φn ±ψn ) ) ≤ log2 N(e−2i(φn ±ψn ) ) 31

(recall the proof of Proposition 2.7). Again since ei(φn ±ψn ) tends to a limit, we can find all numbers n for which (47) is zero. Notice that (47) is zero if and only if (46) is zero. It follows that also the version r = 3 (1 real root and a pair of complex roots with the same absolute value) is covered. Hereafter we assume that n is chosen so large that (47) is not zero. We can then use Baker’s theorem by choosing B = n (recall that |mn | ≤ n) and A = DnE , where D and E are chosen such that A ≥ max{C1 nC2 , C3 nC4 } for each n. Therefore |iφn + niθ ± iψn + (2mn − 1)iπ| ≥ n−C



log(DnE )κ

,

(51)

κ is a (computable) constant, and C  is a (computable) number that depends only on d. Lower bound (51) is not exactly of the required form nCk , but (51) is good enough: by combining (42), (43), (45), (47) and (51) we see that |R0 (n)| ≥ 2λn Bn

1 n2C  log(DnE )κ

,

whereas |R1 (n)| = O(λn ) with |λ | < λ. It is straightforward to see that expression |R0 (n)/R1 (n)| tends to ∞ as n → ∞, and consequently one can find a limit M such that un = 0 when n ≥ M.

4.2 Restricted Depths Proposition 4.4. Problem S KOLEM is decidable if the recurrence has depth two, i.e. un = a1 un−1 + a0 un−2. Proof. Let λ1 and λ2 be the roots of the characteristic polynomial p(x) = x2 − a1 x − a0 . If λ1 = λ2 , then the case 1) of Proposition 4.1 applies. If λ1 = λ2 , but |λ1 | = |λ2 |, and λ1 , λ2 ∈ R, then necessarily λ2 = −λ1 , so λ1 /λ2 = −1 is a root of unity, and we can use the reduction of Lemma 4.1. In the remaining case, we have λ2 = λ1 , which leads us to the case 2) of Proposition 4.1. We can write un = 2A1 λn1 cos(φ + nθ), where λ1 = λeiθ , and A = A1 eiφ are algebraic numbers. It remains to decide whether cos(φ + nθ) = 0 for some n, but this is equivalent to deciding whether e−2iφ = (e2iθ )n for some n. This is decidable by Proposition 2.7. Proposition 4.5. Problem S KOLEM is decidable if the recurrence has depth three, i.e. un = a2 un−1 + a1 un−2 + a0 un−3. 32

Proof. Let p(x) = x3 − a2 x2 − a1 x − a0 be the characteristic polynomial of the recurrence and λ1 , λ2 , and λ3 its roots with |λ1 | ≥ |λ2 | ≥ |λ3 |. There are now two possibilities: 1) p(x) has three real roots, or 2) p(x) has only one real root. The first case divides into three subcases: 1a) |λ1 | > |λ2 | 1b) |λ1 | = |λ2 | > |λ3 |, and 1c) |λ1 | = |λ2 | = |λ3 |. Case 1a) is a subcase of Proposition 4.1, whereas in case 1b) we have either λ1 = λ2 or λ2 = −λ1 . If λ1 = λ2 , we have a multiple dominant root, again a subcase of Proposition 4.1 If λ2 = −λ1 , then λ1 /λ2 = −1 is a root of unity, and we can use the reduction of Lemma 4.1. In case 1c), we have either a triple root λ1 (which is a subcase of Proposition 4.1), or a double root. Without loss of generality, we can assume λ1 = λ2 = −λ3 , so λ2 /λ3 is a root of unity and we can again reduce as in the proof of Proposition 4.1. In the second case, necessarily λ2 = λ3 , and this is a special case of Proposition 4.1: We can write un = 2A1 λn cos(φ + nθ) + Cλn3 ,

(52)

where λ1 = λeiθ = λ2 , and λ3 ∈ R. If |λ3 | > λ, then we have case 1) of Proposition 4.1. If |λ3 | < λ1 , we have case 2) of the aforementioned proposition, whereas |λ3 | = λ is a an instance of case 3) of Proposition 4.1. Proposition 4.6. Problem S KOLEM is decidable if the recurrence has depth four. Proof. Now that the characteristic polynomial has degree four, we can divide into three cases: the number of the real roots is either 4, 2, or 0. If there are four real roots, then either one of them is dominating (which is a special case of Proposition 4.1), or λ1 = λ, λ2 = −λ. But in the latter case, again λ1 /λ2 is a root of unity, and we can use Lemma 4.1. If there are exactly two real roots, one having modulus strictly greater than the complex roots, the decision is again easy (if the other real root has the same modulus, we can use again Lemma 4.1). On the other hand, if the real roots have smaller absolute value than the complex roots, then we have again a special case of Proposition 4.1. Therefore we can assume that λ1 = λeiθ , λ2 = λe−iθ , λ3 = ±λ, and that |λ4 | ≤ λ. We can assume that λ4 = ±λ3 , since then λ3 /λ4 would be a root of unity. Then |λ4 | < |λ3 | and we have again a special case of Proposition 4.1. In the last case, there are no real roots. If one of the complex roots is a double root, so is its conjugate, and n

un = (A + Bn)λn1 + (A + Bn)λ1 ,

which is a special case (2) of Proposition 4.1. Finally we consider the case that all the complex roots are disjoint. Then n

n

un = Aλn1 + Aλ1 + Cλn3 + Cλ3 , 33

(53)

and if |λ1 | > |λ3 |, we have again a special case of Proposition 4.1. Therefore we can assume that |λ1 | = |λ3 | = λ. In this case we can rewrite (53) as un = Aλn einθ1 + Aλn e−inθ1 + λn einθ2 + Cλn e−inθ2   = λn A(eiθ1 )n + A(eiθ1 )−n + C(eiθ2 )n + C(eiθ2 )−n .

(54)

To find out if (54) is zero for some n ∈ N is a special case of Proposition 2.10, a decidable task. Proposition 4.7. Problem S KOLEM is decidable if the recurrence has depth five. Proof. In this case, the characteristic polynomial has degree 5. It is possible to have 1, 3, or 5 real roots. If there are 5 real roots, then either one of them is dominating (which is a subcase of Proposition 4.1), or some of them have the same absolute value (which we can exclude by Lemma 4.1). If there are 3 real roots, then there are two complex roots consisting of a pair of complex conjugates. In this case, either the complex roots have greater absolute value than the real roots (which is a subcase of Proposition 4.1), or there is a real root which has exactly the same absolute value as the complex roots. If, in the latter case, there are more than one real roots with the same absolute value, we can apply Lemma 4.1. If there is exactly one real root sharing the absolute value with the complex roots, we have again a subcase of Lemma 4.1. In the last case, there is only one real root and 4 complex roots. If the roots do not share the same absolute value, we have one of the cases discussed before. If one of the complex roots has multiplicity greater than 1, then so does its complex conjugate, and we have a subcase of Proposition 4.1. If all the roots have the same absolute value, then n

n

un = Aλn1 + Bλ2 + Bλ2 + Dλ4 + Dλ4 = A(±λ)n + Bλn einθ1 + Bλn einθ1 + Deinθ2 λn + De−inθ2

 = λn A(±1)n + B(eiθ1 )n + B(eiθ1 )−n + D(eiθ2 )n + D(eiθ2 )−n . We can now take separately the cases for odd and even n, and use Proposition 2.10 to decide whether un = 0 for some n.

References [1] A. Baker: Transcendental Number Theory. Cambridge University Press (1975). [2] A. Baker: The Theory of Linear Forms in Logarithms. In A. Baker and D. W. Masser (eds.): Transcendence Theory: Advances and Applications, pp. 1–27. Academic Press (1977). 34

[3] A. Baker and G. W¨ustholz: Logarithmic forms and group varietis. Journal f¨ur die reine und angewandte Mathematik 442, pp. 19–62 (1993). [4] A. Baker, personal communication. [5] J. Berstel and M. Mignotte: Deux propri´et´es d´ecidables des suites r´ecurrentes lin´eaires. Bull. Soc. math. France, 104, pp. 175–184 (1976). [6] P. Borwein and T. Erd´elyi: Polynomials and Polynomial Inequalities. Springer (1995). [7] J. Cassaigne, T. Harju and J. Karhum¨aki: On the decidability of the freeness of matrix semigroups. Internat. J. of Algebra Comp. 9, 295 - 305 (1999). [8] J. Cassaigne and J. Karhum¨aki: Examples of undecidable problems for 2-generator matrix semigroups. Theor. Comput. Sci. 204, No.1-2, 29-34 (1998). [9] H. Cohen: A Course in Computational Algebraic Number Theory. Springer (1993). [10] P. M. Cohn: Algebra, Vol 2. John Wiley and Sons (1977). [11] V. Halava: Decidable and Undecidable Problems in Matrix Theory. TUCS Tech. Report 127 (1997). [12] V. Halava and T. Harju: Mortality in matrix semigroups. Amer. Math. Monthly 108, 649 - 653 (2001). [13] G. Hansel: Une d´emonstration simple du th´eor`eme de Skolem-Mahler-Lech. Theoret. Comput. Sci. 43, pp. 1–10 (1986). [14] T. Harju and J. Karhum¨aki, Morphisms. In Handbook of Formal Languages (G. Rozenberg and A. Salomaa, eds.), vol. 1, Springer-Verlag, 1997. [15] R. Kannan and R. J. Lipton: Polynomial-Time Algorithm for the Orbit Problem. Journal of the Association for Computing Machinery, Vol 33, No. 4, pp. 808–821 (1986). [16] D.A. Klarner, J.-C. Birget and W. Satterfield: On the undecidability of the freeness of the integer matrix semigroups. Int. J. Algebra Comp. 1, 223-226 (1991). [17] K. Mahler: Eine arithmetische Eigenschaft der Taylor-Koeffizienten rationaler Funktionen. Proc. Akad. Wet. Amsterdam 38, 50-60 (1935). [18] Z. Manna: Mathematical theory of computation. McGraw-Hill Book Comp, (1974). 35

[19] Y. Matiyasevich and G. S´enizergues: Decision problems for semi-Thue systems with a few rules. Theor. Comput. Sci. 330(1), 145-169, (2005). [20] M. Mignotte: A note on linear recursive sequences. Journal of Australian Mathematical Society 20, pp- 242–244 (1975). [21] M. Mignotte: Some useful bounds. In B. Buchberger, G. E. Collings, and R. Loos (eds.): Computer Algebra, pp. 259–263, Springer (1982). [22] M. Mignotte, T.N. Shorey, and R. Tijdeman: The distance between terms of an algebraic recurrence sequence. Journal f¨ur die reine und angewandte Mathematik 349, pp. 63–76 (1984). [23] C. Lech: A note on recurring series. Ark. Mat. 2, 417-421 (1953). [24] M.S. Paterson: Unsolvability in 3 × 3 matrices. Studies in Appl. Math. 49, 105-107 (1970). [25] A. J. van der Poorten: Linear Forms in Logarithms in the p-adic Case. In A. Baker and D. W. Masser (eds.): Transcendence Theory: Advances and Applications, pp. 29–57. Academic Press (1977). [26] P. Bell and I. Potapov: On the Reachability of Invertible Diagonal Matrices. Manuscript. [27] J. B. Rosser and L. Schoenfeld: Approximate formulas for some functions of prime numbers, Illinois Journal of Mathematics 6:1, 64–94 (1962). [28] A. Salomaa and M. Soittola: Automata-theoretic aspects of formal power series. Springer-Verlag, (1978). [29] T. Skolem: Ein Verfahren zur Behandlung gewisser exponentialer Gleichungen und diophantischer Gleichungen. 8. Skand. Mat. Kongr., Stockhohn, 1934, 163-188. (1934). [30] B. Sury: Sum of the reciprocals of the binomial coefficients. European Journal of Combinatorics 14, pp. 351–353 (1993). [31] N. K. Vereshchagin: The problem of the appearance of a zero in a linear recursive sequence (Russian), Mat. Zametki 38, no. 2, pp. 177–189, 347 (1985). English translation Occurrence of zero in a linear recursive sequence. Math. Notes 38, nos 1–2, pp. 609–615, (1985).

36

¨ Lemminkaisenkatu 14 A, 20520 Turku, Finland | www.tucs.fi

University of Turku • Department of Information Technology • Department of Mathematics

˚ Abo Akademi University

• Department of Computer Science • Institute for Advanced Management Systems Research

Turku School of Economics and Business Administration • Institute of Information Systems Sciences

ISBN 952-12-1534-8 ISSN 1239-1891

Suggest Documents