Solenoid Maps, Automatic Sequences, Van Der Put Series, and Mealy-Moore Automata
aa r X i v : . [ c s . F L ] J un Solenoid Maps, Automatic Sequences, Van Der PutSeries, and Mealy-Moore Automata
Rostislav Grigorchuk and Dmytro Savchuk Department of Mathematics, Texas A&M University, College Station, TX77843-3368, [email protected] Department of Mathematics and Statistics, University of South Florida,4202 E Fowler Ave, Tampa, FL 33620-5700, [email protected] 4, 2020
Abstract
The ring Z d of d -adic integers has a natural interpretation as the boundary of arooted d -ary tree T d . Endomorphisms of this tree (i.e. solenoid maps) are in one-to-onecorrespondence with 1-Lipschitz mappings from Z d to itself and automorphisms of T d constitute the group Isom( Z d ). In the case when d = p is prime, Anashin showed in [3]that f ∈ Lip ( Z p ) is defined by a finite Mealy automaton if and only if the reducedcoefficients of its van der Put series constitute a p -automatic sequence over a finitesubset of Z p ∩ Q . We generalize this result to arbitrary integer d ≥
2, describe theexplicit connection between the Moore automaton producing such sequence and theMealy automaton inducing the corresponding endomorphism. Along the process weproduce two algorithms allowing to convert the Mealy automaton of an endomorphismto the corresponding Moore automaton generating the sequence of the reduced van derPut coefficients of the induced map on Z d and vice versa. We demonstrate examplesof applications of these algorithms for the case when the sequence of coefficients isThue-Morse sequence, and also for one of the generators of the standard automatonrepresentation of the lamplighter group. Continuous self-maps of the ring Z p of p -adic integers is the object of study of p -adic analysisand p -adic dynamics. Among all continuous functions Z p → Z p there is an natural subclassof 1-Lipschitz functions that do not increase distances between points of Z p . These functionsappear in many contexts and have various names in the literature. For example, Bernsteinand Lagarias in the paper devoted to the Collatz “3 n + 1” conjecture call them solenoidal1aps [10], Anashin in [5] (see also [4]) studied the conditions under which these functions actergodically on Z p . For us such functions are especially important because they act on regularrooted trees by endomorphisms (or automorphisms in the invertible case). Topologically, Z p is homeomorphic to the Cantor set which, in turn, can be identified with the boundary X ∞ ofa rooted p -ary tree X ∗ , whose vertices are finite words over the alphabet X = { , , . . . , p − } .Namely, we identify a p -adic number x + x p + x p + · · · with the point x x x . . . ∈ X ∞ .(For the language of rooted trees and group actions on them see [18, 20]).Under this identification Nekrashevych, Sushchansky, and the first author [18, Proposi-tion 3.7] showed that a continuous map from Z p to itself induces a (graph) endomorphism ofthe tree X ∗ precisely when it is 1-Lipschitz. Furthermore, it is an easy but not so well-knownobservation that the group Isom( Z p ) of isometries of Z p is naturally isomorphic to the groupAut( X ∗ ) of automorphisms of a rooted p -ary tree. As such, the groups Isom( Z p ) containmany exotic groups that provided counterexamples to several long standing conjectures andproblems in group theory [16, 17, 23, 25] and have connections to other areas of mathematics,such as holomorphic dynamics [34, 8], combinatorics [22], analysis on graphs [21], computerscience [11, 30, 29], cryptography [32, 31, 13, 35] and coding theory [12, 22]. In a similar wayone can characterize the group Isom( Q p ) of isometries of the field Q p of p -adic numbers asthe group of automorphisms of a regular (not rooted) ( p + 1)-ary tree that fix pointwise oneselected end of this tree.To describe important subgroups of Isom( Z p ) and establish their properties, the languagesof self-similar groups and semigroups initiated in [16] and developed in the last four decades(see survey papers [18, 7] and the book [34]), and Mealy automata have proved to be veryeffective. On the other hand, these tools were not widely used by researchers studying p -adicanalysis and p -adic dynamics. There are only few papers that build bridges between the twoworlds. The first realization of an affine transformation of Z p by a finite Mealy automaton wasconstructed by Bartholdi and ˇSuni´c in [9]. Ahmed and the second author in [1] describedautomata defining polynomial functions x f ( x ) on Z d , where f ∈ Z [ x ], and using thelanguage of groups acting on rooted trees deduced conditions for ergodicity of the actionof f on Z obtained by completely different methods by Larin [27]. In [3] Anashin provedan excellent result relating finiteness of the Mealy automaton generating an endomorphismof the p -ary tree with automaticity of the sequence of reduced van der Put coefficients ofthe induced functions on Z p , which will be discussed below in details. Automatic sequencesrepresent an important area at the conjunction of computer science and mathematics. Someof the famous examples of automatic sequences include Thue-Morse sequence and Rudin-Shapiro sequence defining space filling curves. We refer the reader to [2] for details. Recentapplications of automatic sequences in group theory include [15, 19].As in the real analysis, one of the effective ways to study functions Z p → Z p is todecompose them into series with respect to some natural basis in the space of continuousfunctions C ( Z p ) from Z p to itself. Two of the most widely used bases of this space are theMahler basis and the van der Put bases [28, 36]. In the more general settings of the spaces ofcontinuous functions from Z p to a field, several other bases have been used in the literature:Walsh basis [38], Haar basis (used in group theory context, for example, in [6]), Kaloujnine2asis [15]. In this paper we will deal with the van der Put basis, which is made of functions χ n ( x ), n ≥ Z p consisting of allelements that have the p -adic expansion of n as a prefix. Each continuous function f ∈ C ( Z p )can be decomposed uniquely as f ( x ) = X n ≥ B fn χ n ( x ) , (1)where the coefficients B fn are elements of Z p which we call van der Put coefficients. A function f : Z p → Z p is 1-Lipschitz if and only if its van der Put coefficients can be represented as B fn = b fn d ⌊ log d n ⌋ for all n >
0, where b fn ∈ Z p [4]. We call b fn the reduced van der Put coefficients (see Section 3 for details).The main results of the present paper are the following two theorems, in which d ≥ Theorem 1.1.
Let g ∈ End( X ∗ ) be an endomorphism of the rooted tree X ∗ , where X = { , , . . . , d − } . Then g is finite state if and only if the following two conditions hold forthe transformation ˆ g of Z d induced by g :(a) the sequence ( b ˆ gn ) n ≥ of reduced van der Put coefficients of ˆ g consists of finitely manyeventually periodic elements from Z d ;(b) ( b ˆ gn ) n ≥ is d -automatic. For the case of prime d = p , Theorem 1.1 was proved by Anashin in [3] using a completelydifferent from our approach. The proof from [3] does not provide a direct connection betweenMealy automaton of an endomorphism of X ∗ and the Moore automaton of the correspondingsequence of its reduced van der Put coefficients. Our considerations are based on understand-ing the connection between the reduced van der Put coefficients of an endomorphism andof its sections at vertices of the rooted tree via the geometric notion of a portrait. Thisconnection, summarized in the next theorem, bears a distinct geometric flavor and gives away to effectively relate the corresponding Mealy and Moore automata. Theorem 1.2.
Let X = { , , . . . , d − } be a finite alphabet identified with Z /d Z .(a) Given an endomorphism g of the tree X ∗ , defined by the finite Mealy automaton, there isan explicit algorithmic procedure given by Theorem 7.1 and Algorithm 1, that constructsthe finite Moore automaton generating the sequence ( b gn ) n ≥ of reduced van der Putcoefficients of g .(b) Conversely, given a finite Moore automaton generating the sequence ( c n ) n ≥ of eventu-ally periodic d -adic integers, there is an explicit algorithmic procedure given by Theo-rem 7.4 and Algorithm 2, that constructs the finite Mealy automaton of an endomor-phism g with the reduced van der Put coefficients satisfying b gn = c n for all n ≥ .(c) Both constructions are dual to each other in a sense that the automata produced by themcover the input automata as labelled graphs (see Section 7 for the exact definition). p -automatic sequencesin terms of algebraicity of the corresponding power series, suggested another version of themain result of his paper (i.e., of Theorem 1.1 in the case of prime d ). The authors are notaware of the existence of the analogue of Christol’s theorem in the situation of d -automaticitywhen d is not prime. The first question arises in what sense to mean the algebraicity offunction when Field Q p is replaced by the ring Q d of d -adic numbers. The authors do notexclude that the extension of Christol’s theorem is possible and leave this question for thefuture.The paper is organized as follows. Section 2 introduces necessary notions related toMealy automata and actions on rooted trees. Section 3 recalls how to represent a continuousfunction Z d → Z d by a van der Put series. We consider automatic sequences and define theirportraits and sections in Section 4. The crucial argument relating van der Put coefficients ofendomorphisms and their sections is given in 5. Section 6 contains the proof of Theorem 1.1.The algorithms relating Mealy and Moore automata associated with an endomorphism of X ∗ and constituting the proof of Theorem 1.2, are given in Section 7. Finally, two examplesare worked out in full details in Section 8 that concludes the paper. We start this section by introducing the notions and terminology of endomorphisms andautomorphisms of regular rooted trees and transformations generated by Mealy automata.For more details, the reader is referred to [18].Let X = { , , . . . , d − } be a finite alphabet with d ≥ X ∗ denote the set of all finite words over X . The set X ∗ can be equipped with the structureof a rooted d -ary tree by declaring that v is adjacent to vx for every v ∈ X ∗ and x ∈ X . Thusfinite words over X serve as vertices of the tree. The empty word corresponds to the root ofthe tree and for each positive integer n the set X n corresponds to the n -th level of the tree.Also the set X ∞ of infinite words over X can be identified with the boundary of the tree X ∗ consisting of all infinite paths in the tree without backtracking initiating at the root. We willconsider endomorphisms and automorphisms of the tree X ∗ (i.e., the maps and bijections of X ∗ that preserve the root and the adjacency of vertices). We will sometimes denote the tree X ∗ sa T d . The semigroup of all endomorphisms of T d is denoted by End( T d ) and the groupof all automorphisms of T d is denoted by Aut( T d ). To operate with such objects, we will usethe language of Mealy automata. Definition 1. A Mealy automaton (or simply automaton ) is a 4-tuple(
Q, X, δ, λ ) , where 4 Q is a set of states • X is a finite alphabet (not necessarily { , , . . . , d − } ) • δ : Q × X → Q is the transition function • λ : Q × X → X is the output function .If the set of states Q is finite, the automaton is called finite . If for every state q ∈ Q theoutput function λ q ( x ) = λ ( q, x ) induces a permutation of X , the automaton A is called invertible . Selecting a state q ∈ Q produces an initial automaton A q , which formally is a5-tuple ( Q, X, δ, λ, q ).Here we consider automata with the same input and output alphabets.Automata are often represented by their
Moore diagrams . The Moore diagram of au-tomaton A = ( Q, X, δ, λ ) is a directed graph in which the vertices are in bijection with thestates of Q and the edges have the form q x | λ ( q,x ) −→ δ ( q, x ) for q ∈ Q and x ∈ X . Figure 1shows the Moore diagram of the automaton A that, as will be explained later, generates thelamplighter group L = ( Z / Z ) ≀ Z .PSfrag replacements0 / / / / p q Figure 1: Mealy automaton generating the lamplighter group L Every initial automaton A q induces an endomorphism of X ∗ , which will be also denotedby A q , defined as follows. Given a word v = x x x . . . x n ∈ X ∗ , it scans its first letter x andoutputs λ ( q, x ). The rest of the word is handled similarly by the initial automaton A δ ( q,x ) .So we can actually extend the functions δ and λ to δ : Q × X ∗ → Q and λ : Q × X ∗ → X ∗ via the equations δ ( q, x x . . . x n ) = δ ( δ ( q, x ) , x x . . . x n ) ,λ ( q, x x . . . x n ) = λ ( q, x ) λ ( δ ( q, x ) , x x . . . x n ) . The boundary X ∞ of the tree is endowed with a natural topology in which two infinitewords are close if they have large common prefix. With this topology X ∞ is homeomorphicto the Cantor set. Each endomorphism (automorphism) of X ∗ naturally induces a continuoustransformation (homeomorphism) of X ∞ . 5 efinition 2. The semigroup (group) generated by all states of an automaton A viewed asendomorphisms (automorphisms) of the rooted tree X ∗ under the operation of compositionis called an automaton semigroup (group) and is denoted by S ( A ) (respectively G ( A )).In the definition of the automaton, we do not require the set Q of states to be finite.With this convention, the notion of an automaton group is equivalent to the notions of self-similar group [34] and state-closed group [33]. However, most of the interesting examples ofautomaton (semi)groups are finitely generated (semi)groups defined by finite automata.Let g ∈ End( X ∗ ) and x ∈ X . For any v ∈ X ∗ we can write g ( xv ) = g ( x ) v ′ for some v ′ ∈ X ∗ . Then the map g | x : X ∗ → X ∗ given by g | x ( v ) = v ′ defines an endomorphism of X ∗ which we call the state (or section ) of g at vertex x . Wecan inductively extend the definition of section at a letter x ∈ X to section at any vertex x x . . . x n ∈ X ∗ as follows. g | x x ...x n = g | x | x . . . | x n . We will adopt the following convention throughout the paper. If g and h are elements ofsome (semi)group acting on a set Y and y ∈ Y , then gh ( y ) = h ( g ( y )) . Hence the state g | v at v ∈ X ∗ of any product g = g g · · · g n , where g i ∈ Aut( X ∗ ) for1 ≤ i ≤ n , can be computed as follows: g | v = g | v g | g ( v ) · · · g n | g g ··· g n − ( v ) . Also we will use the language of the wreath recursions. For each automaton semigroup G there is a natural embedding G ֒ → G ≀ Tr( X ) , where Tr( X ) denotes the semigroup of all selfmaps of set X . This embedding is given by G ∋ g ( g , g , . . . , g d − ) σ g ∈ G ≀ Tr( X ) , (2)where g , g , . . . , g d − are the states of g at the vertices of the first level, and σ g is thetransformation of X induced by the action of g on the first level of the tree. If σ g is thetrivial transformation, it is customary to omit it in (2). We call ( g , g , . . . , g d − ) σ g the decomposition of g at the first level (or the wreath recursion of g ).In the case of the automaton group G = G ( A ), the embedding (2) is actually the em-bedding into the group G ≀ Sym( X ).The decomposition at the first level of all generators A q of an automaton semigroup S ( A ) under the embedding (2) is called the wreath recursion defining the semigroup. It6s a convenient language when doing computations involving the states of endomorphisms.Indeed, the products endomorphisms and inverses of automorphisms can be found as follows.If g ( g , g , . . . , g d − ) σ g and h ( h , h , . . . , h d − ) σ h are two elements of End( X ∗ ), then gh = ( g h σ g (0) , g h σ g (1) , . . . , g d − h σ g ( d − ) σ g σ h and in the case when g is an automorphism, the wreath recursion of g − is g − = ( g − σ − g (0) , g − σ − g (1) , . . . , g − σ − g ( d − ) σ − g . Z d to Z d In this section we will recall how to represent every continuous function f : Z d → Z d byits van der Put series. For details when d = p is prime we refer the reader to Schikhof’sbook [36] and for needed facts about the ring of d -adic integers we recommend [14, Section4.2] and [26]. Here we will relate the coefficient of these series to the vertices of the rooted d -ary tree, whose boundary is identified with Z d .First, we recall that the ring of d -adic integers Z d for arbitrary (not necessarily prime) d is defined as the set of all formal sums Z d = (cid:8) a + a d + a d + · · · : a i ∈ { , , . . . , d − } = Z /d Z , i ≥ (cid:9) , where addition and multiplication are defined in the same way as in Z p for prime p takinginto account the carry over. Also, the ring Q d of d -adic numbers can be defined as the fullring of fractions of Z d , but we will only need to use elements of Z d below. Algebraically, if d = p n p n · · · p n k k is the decomposition of d into the product of primes, then Z d = Z p × Z p × · · · × Z p k and Q d = Q p × Q p × · · · × Q p k . As stated in the introduction, for the alphabet X = { , , . . . , d − } we identify Z d with the boundary X ∞ of the rooted d -ary regular tree X ∗ in a natural way, viewing a d -adic number x + x d + x d + · · · as a point x x x . . . ∈ X ∞ . This identification givesrise to an embedding of N = N ∪ { } into X ∗ via n [ n ] d , where [ n ] d denotes the wordover X representing the expansion of n in base d written backwards (so that, for example,[6] = 011). There are two standard ways to define the image [0] d of 0 ∈ N : one can define itto be either the empty word ε over X of length 0, or a word 0 of length 1. These two choiceswill give rise later to two similar versions of the van der Put bases in the space of continuousfunctions from Z d to Z d , that we will call Mahler and Schikhof versions. Throughout thepaper we will use Mahler’s version and, unless otherwise stated, we will define [0] d = 0 (theword of length 1). However, we will state some of the results for Schikhof’s version as well.Note, that the image of N ∪ { } consists of all vertices of X ∗ that do not end with 0, and thevertex 0 itself. We will called these vertices labelled . For example, the labelling of the binarytree is shown in Figure 2. The inverse of this embedding, with a slight abuse of notationas the notation does not explicitly mention d , we will denote by bar . In other words, if7 + + + + + + + + + + Even Odd + + + + + + + + + + + + + + + + + + + + + + + + + + Figure 2: Labelling of vertices of a binary tree by elements of N u = u u . . . u n ∈ X ∗ , then u = u + u d + · · · + u n d n ∈ N . We note that the operation u u is not injective as u = u k for all k ≥ n ≥ n ] d X ∞ ⊂ Z d that consists of all d -adic integers that have [ n ] d as a prefix. Geometrically thus set can beenvisioned as the boundary of the subtree of X ∗ hanging down from the vertex [ n ] d .For n > d -ary expansion n = x + x d + · · · + x k d k , x k = 0, we define n = n − x k d k . Geometrically, n is the label of the closest to n labelled vertex in X ∗ alongthe unique path from n to the root of the tree. For example, for n = 22 we have [ n ] = 01101,so [ n ] = 011 and n = 6.We are ready to define the decomposition of a continuous function f : Z d → Z d into avan der Put series. For each such function there is a unique sequence ( B fn ) n ≥ , B fn ∈ Z d of d -adic integers such that for each x ∈ Z d the following expansion f ( x ) = X n ≥ B fn χ n ( x ) , (3)holds, where χ n ( x ) is the characteristic function of the cylindrical set [ n ] d X ∞ with valuesin Z d . The coefficients B fn are called the van der Put coefficients of f and are computed asfollows: B fn = (cid:26) f ( n ) , if 0 ≤ n < d,f ( n ) − f ( n ) , if n ≥ d. (4)This is the decomposition with respect to the orthonormal van der Put basis { χ n ( x ) : n ≥ } of the space C ( Z d ) of continuous functions from Z d (as Z d -module) to itself, as given inMahler’s book [28], and also used in [4]. In the literature this basis is considered only when8 = p is a prime number, and is, in fact, an orthonormal basis of a larger space C ( Z p → K )of continuous functions from Z p to a normed field K containing the field of p -adic rationals Q p . However, the given decomposition works in our context with all the proofs identical tothe “field” case.To avoid possible confusion we note that there is another standard version of the van derPut basis { ˜ χ n ( x ) : n ≥ } used, for example, in Schikhof’s book [36]. We will call this versionof a basis Schikhof’s version. In this basis ˜ χ n = χ n for n >
0, and ˜ χ is the characteristicfunction of the whole space Z d (while χ is the characteristic function of d Z d = 0 X ∞ ).This difference comes exactly from two ways of defining [0] d that was mentioned earlier. If[0] d = 0, we obtain the version of basis used by Mahler, and defining [0] d = ε (the emptyword) yields the basis used by Schikhof. This difference does not change much the results andthe proofs and we will give formulations of some of our results for both bases. In particular,the decomposition (3) is transformed into f ( x ) = X n ≥ ˜ B fn ˜ χ n ( x ) , (5)where Schikhof’s versions of van der Put coefficients ˜ B fn are computed as:˜ B fn = (cid:26) f (0) , if n = 0 ,f ( n ) − f ( n ) , if n > . (6)Among all continuous functions Z d → Z d we are interested in those that define endomor-phisms of X ∗ (viewed as a tree). We will use the following useful characterization of thesemaps in terms of the coefficients of their van der Put series (which works for both versionsof the van der Put basis). In the case of prime d this easy fact is given in [4]. The proof ingeneral case is basically the same and we omit it. Theorem 3.1.
A function Z d → Z d is 1-Lipschitz if and only if it can be represented as f ( x ) = X n ≥ b fn d ⌊ log d n ⌋ χ n ( x ) , (7) where b fn ∈ Z d for all n ≥ , and ⌊ log d n ⌋ = ( the number of digits in the base- d expansion of n ) − . We will call the coefficients b fn from Theorem 3.1 the reduced van der Put coefficients . Itfollows from equation (4) that these coefficients are computed as b fn = B fn d −⌊ log d n ⌋ = ( f ( n ) , if 0 ≤ n < d, f ( n ) − f ( n ) d ⌊ log d n ⌋ , if n ≥ d. (8)For Schikhof’s version of the van der Put basis equation (7) has to be replaced with f ( x ) = X n ≥ ˜ b fn d ⌊ log d n ⌋ χ n ( x )9nd corresponding reduced van der Put coefficients are computed as˜ b fn = ˜ B fn d −⌊ log d n ⌋ = ( f (0) , if n = 0 , f ( n ) − f ( n ) d ⌊ log d n ⌋ , if n > . In particular, ˜ b fn = b fn for all n ≥ d .We note that since Schikhof’s reduced van der Put coefficients ˜ b fn differ from the b fn onlyfor n < d , the claim of Theorem 1.1 clearly remains true for Schikhof’s van der Put series aswell. There are several equivalent ways to define d -automatic sequences. We will refer the readerto Allouche-Shallit’s book [2] for details. Informally, a sequence ( a n ) n ≥ is called d -automaticif one can compute a n by feeding a deterministic finite automaton with output (DFAO) thebase- d representation of n , and then applying the output mapping τ to the last state reached.We first recall the definition of the (Moore) DFAO and then give the formal definition ofautomatic sequences. Definition 3. A deterministic finite automaton with output (or a Moore automaton) isdefined to be a 6-tuple B = ( Q, X, δ, q , A, τ )where • Q is a finite set of states • X is the finite input alphabet • δ : Q × X → Q is the transition function • q ∈ Q is the initial state • A is the output alphabet • τ : Q → A is the output function In the case when the input alphabet is X = { , , . . . , d − } we will call the correspondingautomaton a d -DFAO.Similarly to the case of Mealy automata, we extend the transition function δ to δ : Q × X ∗ → Q . With this convention, a d -DFAO defines a function f M : X ∗ → A by f M ( w ) = τ ( δ ( q , w )).Note, that Moore automata can also be viewed as transducers as well by recording thevalues of the output function at every state while reading the input word. This way each10ord over X will be transformed into a word over A of the same length. This model ofcalculations is equivalent to Mealy automata (in the more general case when the outputalphabet is allowed to be different from the input alphabet) in the sense that for each Mooreautomaton there exists a Mealy automaton that defines the same transformation from X ∗ to A ∗ and vice versa (see [37] for details).Recall that for a word w = x x . . . x n ∈ X ∗ we denote by w = x + x d + · · · + x n d n ∈ N the label of the closest to w labelled vertex in X ∗ along the unique path from w to the rootof the tree. Definition 4 ([2]) . We say that a sequence ( a n ) n ≥ over a finite alphabet A is d -automatic if there exists a d -DFAO B = ( Q, X, δ, q , A, τ ) such that a n = τ ( δ ( q , w )) for all n ≥ w ∈ X ∗ with w = n .For us it will be more convenient to use the alternative characterization of automaticsequences (for the proof see for instance [2]). Theorem 4.1.
A sequence ( a n ) n ≥ over an alphabet A is d -automatic if and only if thecollection of its subsequences of the form { ( a j + n · d i ) n ≥ | i ≥ , ≤ j < d i } , called the d -kernel , is finite. We will recall the connection between the d -DFAO defining a d -automatic sequence( a n ) n ≥ and the d -kernel of this sequence (see Theorem 6.6.2 in [2]). For that we definethe section of a sequence ( a n ) n ≥ at a word v over X = { , , . . . , d − } recursively asfollows. Definition 5.
Let ( a n ) n ≥ be a sequence over alphabet A . Its d -section ( a n ) n ≥ (cid:12)(cid:12) x at x ∈ X = { , , . . . , d − } is a subsequence ( a x + nd ) n ≥ . For a word v = x x . . . x k over X wefurther define the d -section ( a n ) n ≥ (cid:12)(cid:12) v at v to be either ( a n ) n ≥ itself if v is the empty wordor ( a n ) n ≥ (cid:12)(cid:12) x (cid:12)(cid:12) x . . . (cid:12)(cid:12) x k otherwise.We will often omit d in the term d -section when d is clear from the context. The d -kernel of a sequence consists exactly of d -sections and d -automaticity of a sequence can bereformulated as: Proposition 4.2.
A sequence ( a n ) n ≥ over an alphabet A is d -automatic if and only if theset (cid:8) ( a n ) n ≥ (cid:12)(cid:12) v : v ∈ X ∗ (cid:9) is finite. The subsequences involved in the definition of the d -kernel can be plotted on the d -aryrooted tree X ∗ , where the vertex v ∈ X ∗ is labelled with the subsequence ( a n ) | v . For d = 2such a tree is shown in Figure 3.A convenient way to represent sections of a sequence and understand d -automaticity isto put the terms of this sequence on a d -ary tree. Recall, that in the previous section wehave constructed an embedding of N into X ∗ via n [ n ] d . Under this embedding we willcall the image of n ∈ N ∪ { } the vertex n of X ∗ . Definition 6.
The d - portrait of a sequence ( a n ) n ≥ over an alphabet A is a d -ary rootedtree X ∗ where the vertex n is labelled by a n and other vertices are unlabelled.11 Sfrag replacements 000 0000 11 1 11 11 a a a a a a . . .a a a a a a . . . a a a a a a . . .a a a a a . . . a a a a a . . . a a a a a . . .a a a a a . . . ( a n ) | ε ( a n ) | ( a n ) | ( a n ) | ( a n ) | ( a n ) | ( a n ) | Figure 3: The tree of subsequences of ( a n ) n ≥ constituting its d -kernel (for d = 2)In other words, we label each vertex v = x x . . . x k with x k = 0 or v = 0 by a v = a x + x d + ··· + x k d k . For example, Figure 4 represents the 2-portrait of the sequence ( a n ) n ≥ .To simplify the exposition we will write simply portrait for d -portrait when the value of d is clear from the context. In particular, unless otherwise stated, X will denote an alphabet { , , . . . , d − } of cardinality d and a portrait will mean a d -portrait.There is a simple connection between the portrait of a sequence and the portrait of itssection at vertex v ∈ X ∗ that takes into account that the subtree vX ∗ of X ∗ hanging downfrom vertex v is canonically isomorphic to X ∗ itself via vu ↔ u for each u ∈ X ∗ . Proposition 4.3.
For a sequence ( a n ) n ≥ over an alphabet A with a portrait P and a vertex v = x x . . . x k , k ≥ of X ∗ the portrait of the section ( a n ) n ≥ (cid:12)(cid:12) v is obtained from the portraitof ( a n ) n ≥ by taking the (labelled) subtree of P hanging down from vertex v , removing, if v ends with x k = 0 and k > , the label at its root vertex, and labelling the vertex 0 by a v = a x + x d + ··· + x k d k , which is the label of the closest to v labelled vertex in P on the uniquepath connecting v to the root. The proof of the above proposition follows immediately from the definitions of portraitand section.In other words, as shown in Figure 4, you can see the portrait of a section of a sequence( a n ) n ≥ at vertex v ∈ X ∗ just by looking at the subtree hanging down in the portrait of( a n ) n ≥ from vertex v (modulo minor technical issue of labelling the vertex 0 of this subtreeand possibly removing the label of the root vertex). Therefore, a sequence is automatic if andonly if its portrait has finite number of “subportraits” hanging down from its vertices. Thisway of interpreting automaticity now corresponds naturally to the condition of an automatonendomorphism being finite state. 12 Sfrag replacements a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a ( a n ) | ( a n ) | ( a n ) | Figure 4: The 2-portrait of the sequence ( a n ) n ≥ Note, that the formulation of the previous proposition would be simpler had we definedportraits by labelling each vertex v = x x . . . x k of the tree by a x + x d + ··· x k d k instead of onlynumbered ones, but we have intentionally opted not to do that to simplify notations in thenext section.Now it is easy to see that the d -DFAO defining a d -automatic sequence ( a n ) n ≥ over analphabet A with the d -kernel K can be built as follows. Proposition 4.4.
Suppose ( a n ) n ≥ is a d -automatic sequence over an alphabet A with the d -kernel K . Then a d -DFAO B = ( K, X, δ, q , A, τ ) , where: δ (( a n ) n ≥ | v , x ) = ( a n ) n ≥ | vx ,τ (( a n ) n ≥ | v ) = a v ( the first term of the sequence ( a n ) n ≥ | v ) ,q = ( a n ) n ≥ | ε = ( a n ) n ≥ . (9) defines the sequence ( a n ) n ≥ . Informally, we build the automaton M by following the edges of the tree X ∗ from theroot, labelling these edges by corresponding elements of X , and identifying the vertices thatcorrespond to the same sections of ( a n ) n ≥ into one state of M that is labelled by the 0-thterm of the corresponding section. It turns out that there is a natural relation between the (portraits of the sequences of) reducedvan der Put coefficients of an endomorphism g and of its sections. Denote by σ : Z d → Z d the map σ ( a ) = a − ( a mod d ) d . This map corresponds to the shift map on Z d that deletes thefirst letter of a . I.e., if a = x x x . . . ∈ Z d , then σ ( a ) = x x x . . . ∈ Z d .13 heorem 5.1. Suppose g ∈ End X ∗ has sections g | x , x = 0 , , . . . , n − at the vertices ofthe first level of X ∗ . Then the reduced van der Put coefficients b g | x n of the section g | x satisfy: b g | x n = σ ( b gx ) , n = 0 ,b gx + nd + σ ( b gx ) , < n < d,b gx + nd , n ≥ d (10) where for b ∈ Z d we denote by σ ( b ) = b − ( b mod d ) d the shift map on Z d .Proof. First we consider the case n = 0. By equation (8) the reduced van der Put coefficientsare computed as follows b g | x = g | x (0 ∞ ) = g ( x ∞ ) − ( g ( x ∞ ) mod d ) d = σ ( g ( x ∞ )) = σ ( b gx ) . Similarly for 0 < n < d we obtain b g | x n = g | x ( n ∞ ) = g ( xn ∞ ) − ( g ( xn ∞ ) mod d ) d = g ( xn ∞ ) − ( g ( x ∞ ) mod d ) d + g ( x ∞ ) − ( g ( xn ∞ ) mod d ) d = b gx + nd + g ( x ∞ ) − ( g ( x ∞ ) mod d ) d = b gx + nd + σ ( b gx ) . Finally, for n > d we derive b g | x n = d −⌊ log d n ⌋ (cid:0) g | x ([ n ] d ∞ ) − g | x ([ n ] d ∞ ) (cid:1) = d −⌊ log d n ⌋ (cid:18) g ( x [ n ] d ∞ ) − ( g ( x [ n ] d ∞ ) mod d ) d − g ( x [ n ] d ∞ ) − ( g ( x [ n ] d ∞ ) mod d ) d (cid:19) = d −⌊ log d n ⌋− (cid:0) g ( x [ n ] d ∞ ) − g ( x [ n ] d ∞ ) (cid:1) = d −⌊ log d ( x + nd ) ⌋ (cid:0) g ([ x + nd ] d ∞ ) − g ([( x + nd ) ] d ∞ ) (cid:1) = b gx + nd , where in the last line we used that for x < d we have x + ( n ) d = ( x + nd ) and ⌊ log d ( n ) ⌋ + 1 = ⌊ log d ( n ) + 1 ⌋ = ⌊ log d ( nd ) ⌋ = ⌊ log d ( x + nd ) ⌋ . In the case of Schikhof’s version of van der Put basis we can similarly prove the following.
Theorem 5.2.
Suppose g ∈ End X ∗ has sections g | x , x = 0 , , . . . , n − at the vertices ofthe first level of X ∗ . Then the reduced van der Put coefficients with respect to Schikhof ’sversion of van der Put basis of the section g | x satisfy: ˜ b g | x n = σ (˜ b g ) , n = 0 , x = 0 σ (˜ b gx + b g ) , n = 0 , < x < d, ˜ b gx + nd , n > . (11)14here is a more visual way to state the third case in equation (10) using the notation. Corollary 5.3.
Let x x . . . x k ∈ X ∗ be a word of length k + 1 ≥ with x k = 0 . Then b gx x ...x k = b g | x x ...x k . Proof.
Follows from (10) and the fact that if x x . . . x k = n , then x x x . . . x k = x + nd .The next corollary will be used in calculations in Section 8. Corollary 5.4.
Let v, w ∈ X ∗ with w of length at least 2 and ending in a nonzero elementof X . Then b gvw = b g | v w . Proof.
When v is the empty word the claim is trivial. The general case now follows byinduction on | v | from Corollary 5.3 as for each x ∈ X we have b gxvw = b g | x vw = b ( g | x ) | v w = b g | xv w . Corollary 5.5.
Let g ∈ End( X ∗ ) be an endomorphism of X ∗ and v ∈ X ∗ be arbitrary vertex.Then the sequences ( b g | v n ) n ≥ and ( b gn ) n ≥ | v coincide starting from term d .Proof. For any n ≥ d we have that [ n ] d = xw for some x ∈ X and w ∈ X ∗ of length at least1 that ends with a non-zero element of X . So we have by Corollary 5.4 b g | v n = b g | v xw = b gvxw . But b gvxw is exactly the term of the sequence ( b gn ) n ≥ | v with index n = xw .Now, taking into account Proposition 4.3, there is a geometric way to look at the previoustheorem. Namely, the third subcase in equation (10) yields the following proposition. Corollary 5.6.
Let v ∈ X ∗ be arbitrary vertex of X ∗ . The labels of the portrait of thesequence ( b g | v n ) n ≥ coincide at levels 2 and below with the corresponding labels of the restrictionof the portrait of ( b gn ) n ≥ to the subtree hanging down from vertex v ∈ X . We illustrate by Figure 5 this fact for v = x ∈ X of length one, where the portraits of( b g | n ) n ≥ and ( b g | n ) n ≥ are drawn on the left and right subtrees of the portrait of ( b gn ) n ≥ .Figure 5 asserts that the labels of the portraits of sections coincide with the labels of theportrait of ( b gn ) n ≥ below the dashed line. The first two subcases of (10) give labels of theportraits of ( b g | x n ) n ≥ , x ∈ X on the first level.15 Sfrag replacements
Portrait of (cid:0) b g | n (cid:1) n ≥ Portrait of (cid:0) b g | n (cid:1) n ≥ b g | = σ ( b g ) b g | = b g + σ ( b g ) b g | = σ ( b g ) b g | = b g + σ ( b g ) b g | = b g b g | = b g b g | = b g b g | = b g b g | = b g b g | = b g b g | = b g b g | = b g b g | = b g b g | = b g b g | = b g b g | = b g Figure 5: Correspondence between portraits of ( b g | x n ) n ≥ and ( b gn ) n ≥ In this section we will prove Theorem 1.1. In the arguments below we will work with even-tually periodic elements of Z d , i.e. elements of the form a + a d + a d + · · · with eventuallyperiodic sequence ( a i ) i ≥ of coefficients. As shown in [14, Theorem 4.2.4], this set of d -adicintegers can be identified with the subset Z d, of Q consisting of all rational numbers a/b ∈ Q such that b is relatively prime to d . Algebraically it can be defined as Z d, = D − Z , where D is the multiplicative set { b ∈ Z : gcd( b, d ) = 1 } . We will denote the corresponding inclusion Z d, ֒ → Z d by ψ . The following inclusions then take place. Z ⊂ Z d, ψ ֒ → Z d ⊂ Q d ∩ Q We will not need the definition of ψ which can be constructed using Lemma 4.2.2 in [14],but rather will need the definition of ψ − : ψ ( Z d, ) → Z d, . The map is defined as follows.Suppose uv ∞ ∈ Z d is an arbitrary eventually periodic element for some u, v ∈ X ∗ . Then wedefine ψ − ( uv ∞ ) = u + v · d | u | − d | v | ∈ Z d, . Lemma 6.1.
The preimage under ψ of the set { v ∞ : v ∈ X m } of all periodic elements of Z d with period of length dividing m ≥ is the set P ,m = (cid:26) j − d m : 0 ≤ j < d m (cid:27) which is the subset of the interval [ − , ⊂ R . roof. It follows from the definition of ψ − that ψ − ( v ∞ ) = v − d | v | . Recall, that for v = x x . . . x m − we have v = x + x d + . . . x m − d m − . This implies that0 ≤ v ≤ d m − − ≤ ψ − ( v ∞ ) ≤
0. Moreover, as v runs over all words in X m , v runs over all integer numbers from 0 to d m − d -ary expansionsof all these numbers. Lemma 6.2.
The preimage under ψ of the set { uv ∞ : u ∈ X l , v ∈ X m } of all eventuallyperiodic elements of Z d with preperiod of length at most l ≥ and period of length dividing m ≥ is the set P l,m = (cid:26) i + j · d l − d m : 0 ≤ i < d l , ≤ j < d m (cid:27) which is the subset of the interval [ − d l , d l − ⊂ R .Proof. We have ψ − ( { uv ∞ : u ∈ X l , v ∈ X m } ) = { ψ − ( uv ∞ ) : u ∈ X l , v ∈ X m } = { ψ − ( u ∞ ) + ψ − (0 l v ∞ ) : u ∈ X l , v ∈ X m } = { u + d l · ψ − ( v ∞ ) : u ∈ X l , v ∈ X m } = { i + d l ψ − ( v ∞ ) : 0 ≤ i < d l , v ∈ X m } = [ ≤ i The set A l,m = S i ≥ A l,mi is finite.Proof. First, we remark that the denominators of fractions in A l,mi are divisors of d m − i that A l,mi ⊂ [ − z, z ] for z = d l +1 + d − d − .For i = 0 the statement is true since A l,m ⊂ [ − d l , d l − 1] by Lemma 6.1, and z = d l +1 + d − d − > d l +1 + d − d = d l + d − d > d l . i ≥ 0. Any element of A l,mi +1 is equal to σ ( x ) + b for some x ∈ A l,mi +1 ⊂ [ − z, z ] and b ∈ P l,m ⊂ [ − d l , d l − σ ( x ) = x − x mod dd , weimmediately obtain σ ( x ) + b ≤ xd + b ≤ zd + d l − d l +1 + d − d ( d − 1) + d l − d l + 1 + ( d l − d − d − d l +1 − d + 2 d − < z. For the lower bound we obtain σ ( x ) + b ≥ x − d + 1 d + b ≥ − z − d + 1 d − d l = − d l +1 + d − d − − d + 1 d − d l = − d l − d + 1 d − − d l = − d l +1 + d − d − − z. We are ready to proceed to the main result of this section. Proof of Theorem 1.1. First, assume that g ∈ End( X ∗ ) is defined by a finite Mealy automa-ton A with the set of states Q . In order to prove that ( b gn ) n ≥ is automatic, by Proposition 4.2we need to show that it has finitely many sections at vertices of X ∗ .Assume that v ∈ X ∗ is of length at least 2, v = v ′ xy for some v ′ ∈ X ∗ and x, y ∈ X .Then the section ( b gn ) | v is a sequence that can be completely identified by a pair (cid:0) b gv , σ (( b gn ) | v ) (cid:1) , (13)where b gv is its zero term, and σ (( b gn ) | v ) is the subsequence made of all other terms.Since by Corollary 5.6 σ (( b gn ) | v ) = σ (( b gn ) | v ′ xy ) = σ (( b g | v ′ n ) | xy ) , the number of possible choices for the second component in (13) is bounded above by | Q |·| X | (as we have | Q | choices for g | v ′ and | X | choices for xy ∈ X ).Further, if v < d (i.e., v = z k for some z ∈ X ) then the number of choices for the firstcomponent b gv of (13) is bounded above by | Q | · | X | . Otherwise, v ′ = v ′′ x ′ y ′ for some v ′′ ∈ X ∗ , x ′ , y ′ ∈ X with y ′ = 0. In this case, b gv = b g | v ′′ x ′ y ′ , so the number of possible choices for b gv isagain bounded above by | Q | · | X | . Thus, the sequence ( b gn ) n ≥ has finitely many sections.To prove the first condition asserting that all b gn are in Z d ∩ Q , or, equivalently, eventuallyperiodic, it is enough to mention that by equation (8) b gn must be eventually periodic for n ≥ d as a shifted difference of two eventually periodic words g ( n ) = g ([ n ] d ∞ ) and g ( n ) = g ([ n ] d ∞ ). The latter two words are eventually periodic as the images of eventually periodicwords [ n ] d ∞ and [ n ] d ∞ under a finite automaton transformation. Similar even works for n < d , in which case there is no need to take a difference.18ow we prove the converse direction. Assume that for g ∈ End( X ∗ ) of X ∗ the sequence( b gn ) n ≥ is automatic and consists of eventually periodic elements of Z d . Then automaticityimplies that { b gn : n ≥ } is finite as a set. Let l be the maximal length among preperiodsof all b gn , and let m be the least common multiple of the lengths of all periods of b gn . Thenclearly b gn ∈ ψ ( P l,m ) for all n ≥ P l,m given in Lemma 6.2.Our aim is to show that the set { g | v : v ∈ X ∗ } is finite. We will show that thereis only finitely many portraits ( b g | v n ) n ≥ . Let v ∈ X ∗ . By Corollary 5.6 the part of theportrait of ( b g | v n ) n ≥ below level one coincides with the part below level one of the restrictionof the portrait of ( b gn ) n ≥ on the subtree hanging down from vertex v . But according toPropositions 4.2 and 4.3, since ( b gn ) n ≥ is automatic, there is only finite number of suchrestrictions as the set of all sections { ( b gn ) | v : v ∈ X ∗ } is finite.Hence, we only need to check that there is a finite number of choices for the van derPut coefficients of the first level of g | v for v ∈ X ∗ . To do that we will prove by induction on | v | that b g | v i ∈ ψ ( A l,m | v | ) for 0 ≤ i < d . The claim is trivial for | v | = 0 by definition of A l,m and the choice of l and m . Assume that the claim is true for all words v of length k , andlet vx be a word of length k + 1 for some x ∈ X . Then by assumption b g | v x ∈ ψ ( A l,m | v | ), andadditionally b g | v x + d · i ∈ P l,m for 1 ≤ i < d as these coefficients of g on the second level of itsportrait coincide with corresponding coefficients of g . Now by Theorem 5.1 we obtain b g | vx i = b ( g | v ) | x i = ( σ ( b g | v x ) , i = 0 ,b g | v x + d · i + σ ( b g | v x ) , < i < d, In both cases we get that b g | vx i ∈ A l,m | vx | by definition of A l,m | vx | from (12). Finally, Lemma 6.3now guarantees that g has finitely many sections and completes the proof. X ∗ The above proof of Theorem 1.1 allows us to build algorithms that construct the Mooreautomaton of the automatic sequence of reduced van der Put coefficients of a transformationof Z d defined by a finite state Mealy automaton, and vice versa.We start from constructing the Moore automaton generating the sequence of reduced vander Put coefficients of an endomorphism g from the finite Mealy automaton defining g . Theorem 7.1. Let g ∈ End( X ∗ ) be an endomorphism of X ∗ defined by a finite initial Mealyautomaton A with the set of states Q A = { g | v : v ∈ X ∗ } . Let also ( b gn ) n ≥ be the sequenceof reduced van der Put coefficients of the map Z d → Z d induced by g . Then the Mooreautomaton B = ( Q B , X, δ, q, Z d , τ ) , where • the set of states is Q B = (cid:8)(cid:0) g | v , ( b gvy ) y ∈ X (cid:1) : v ∈ X ∗ (cid:9) , the transition and output functions are δ (cid:0)(cid:0) g | v , ( b gvy ) y ∈ X (cid:1) , x (cid:1) = (cid:0) g | vx , ( b gvxy ) y ∈ X (cid:1) ,τ (cid:0)(cid:0) g | v , ( b gvy ) y ∈ X (cid:1)(cid:1) = b gv , (14) • the initial state is q = (cid:0) g, ( b gy ) y ∈ X (cid:1) is finite and generates the sequence ( b gn ) n ≥ .Proof. According to Proposition 4.4 one can construct an automaton B ′ generating ( b gn ) n ≥ as follows. The states of B ′ are the sections of ( b gn ) n ≥ at the vertices of X ∗ (i.e., the d -kernelof ( b gn ) n ≥ ) with the initial state being the whole sequence ( b gn ) n ≥ , and transition and outputfunctions defined by (9). Let v ∈ X ∗ be an arbitrary vertex. By Corollary 5.6 the labels ofthe portrait of ( b gn ) n ≥ | v at level 2 and below coincide with the corresponding labels of theportrait of ( b g | v n ) n ≥ . Therefore, each state ( b gn ) n ≥ | v of B ′ can be completely defined by apair, called the label of this state: l (( b gn ) n ≥ | v ) = (cid:0) g | v , ( b gvy ) y ∈ X (cid:1) , (15)where ( b gvy ) y ∈ X is the d -tuple of the first d terms of ( b gn ) n ≥ | v that corresponds to the labelsof the first level of the portrait of this sequence. The first component of this pair defines theterms of ( b g | v n ) n ≥ at level 2 and below, and the second component consists of terms of thefirst level. It is possible that different labels will define the same state of B ′ , but clearly theautomaton B from the statement of the theorem also generates ( b gn ) n ≥ since its minimizationcoincides with B ′ .Indeed, the set of states of B is the set of labels of states of B ′ and thetransitions in B are obtained from the transitions in B ′ defined in Proposition 4.4, and thedefinition of labels.Finally, the finiteness of Q B follows from our proof of Theorem 1.1 since the set { g | v : v ∈ X ∗ } (coinciding with Q A ) is finite, and the set { b gvy : v ∈ X ∗ , y ∈ X } is a subset of a finiteset { b g ′ w : g ′ ∈ Q A , w ∈ X ∪ X } .For the algorithmic procedure that, given a finite state g ∈ End( X ∗ ), constructs a Mooreautomaton generating the sequence ( b gn ) n ≥ of its reduced van der Put coefficients, we needthe following lemma. Lemma 7.2. Given a finite state endomorphism g ∈ G acting on X ∗ with | X | = d , its first d reduced van der Put coefficients b gv , v ∈ X ∗ of length at most 2, are eventually periodicelements of Z d that can be algorithmically computed.Proof. Suppose g has q states. If v = i < d , then by definition b gi = g ( i ∞ ) is the image of aneventually periodic word under a finite automaton transformation. Thus, it is also eventuallyperiodic with the period of length at most q and the preperiod of length at most q +1. Clearlyboth period and preperiod can be computed effectively. Further, if d ≤ v < d , then v = xy for x, y ∈ X with y = 0. In this case b gv = g ( xy ∞ ) − g ( x ∞ ) d is eventually periodic as a shifteddifference of two eventually periodic words g ( xy ∞ ) and g ( x ∞ ). The latter two words areeventually periodic as the images of eventually periodic words xy ∞ and x ∞ under a finiteautomaton transformation that can be effectively computed.20 lgorithm 1 (Construction of Moore automaton from Mealy automaton) . Suppose an en-domorphism g of X ∗ is defined by a finite state Mealy automaton A with the set of states Q A .To construct a Moore automaton B defining the sequence of reduced van der Put coefficients ( b gn ) n ≥ complete the following steps.Step 1. Compute b g ′ w for each g ′ ∈ Q A and w ∈ X ∪ X .Step 2. Start building the set of states of B from its initial state q = (cid:0) g, ( b gy ) y ∈ X (cid:1) with τ ( q ) = b g .Define Q = { q } .Step 3. To build Q i +1 from Q i for i ≥ start from the empty set and for each state q = (cid:0) g | v , ( b gvy ) y ∈ X (cid:1) ∈ Q i and each x ∈ X add the state q x = (cid:0) g | vx , ( b gvxy ) y ∈ X (cid:1) to Q i +1 unlessit belongs to Q j for some j ≤ i or is already in Q i +1 . Use Corollary 5.4 to identify b gvxy with one of the elements computed in Step 1. Extend the transition function by δ ( q, x ) = q x and the output function by τ ( q x ) = b gvx .Step 4. Repeat Step 3 until Q i +1 = ∅ .Step 5. The set of state of the Moore automaton B is ∪ i ≥ Q i , where the transition and outputfunctions are defined in Step 3. A particular connection between the constructed Moore automaton B and the originalMealy automaton A can be seen at the level of underlying oriented graphs as explainedbelow. Definition 7. For a Mealy automaton A = ( Q, X, δ, λ ) we define its underlying orientedgraph Γ( A ) to be the oriented labeled graph whose set of vertices is the set Q of states of A and whose edges correspond to the transitions of A and are labeled by the input lettersof the corresponding transitions. I.e., there is an oriented edge from q ∈ Q to q ′ ∈ Q labeledby x ∈ X if and only if δ ( q, x ) = q ′ .In other words, the underlying oriented graph of a Mealy automaton A can be obtainedfrom the Moore diagram of A by removing second components of edge labels. For example,Figure 6 depicts the underlying graph of a Mealy automaton from Figure 1 generating thelamplighter group L . Similarly, we construct underlying oriented graph of a Moore automa-ton. Definition 8. For a Moore automaton B = ( Q, X, δ, q , A, τ ) we define its underlying ori-ented graph Γ( B ) to be the oriented labeled graph whose set of vertices is the set Q of statesof B and whose edges correspond to transitions of B and are labeled by the input letters ofthe corresponding transitions. I.e., there is an oriented edge from q ∈ Q to q ′ ∈ Q labeledby x ∈ X if and only if δ ( q, x ) = q ′ .Figure 6 depicts also the underlying graph of a Moore automaton from Figure 8 generatingthe Thue-Morse sequence.We finally define a covering of such oriented labeled graphs to be a surjective (both onvertices and edges) graph homomorphism that preserves the labels of the edges.21Sfrag replacements0 10 1Figure 6: Underlying graph for Mealy automaton from Figure 1 and Moore automaton fromFigure 8 Corollary 7.3. Let g ∈ End( X ∗ ) be an endomorphism of X ∗ defined by a finite Mealyautomaton A . Let also ( b gn ) n ≥ be the (automatic) sequence of the reduced van der Put co-efficients of a transformation Z d → Z d induced by g . Then the underlying oriented graph Γ( B ) of the Moore automaton B defining ( b gn ) n ≥ obtained from A by Algorithm 1 covers theunderlying oriented graph Γ( A ) .Proof. Since the transitions in the original Mealy automaton A defining g are defined by δ ( g | v , x ) = g | vx , we immediately get that the map from the set of vertices of the underlyingoriented graph of B to the set of vertices of the underlying oriented graph of A defined by (cid:0) g | v , ( b gvy ) y ∈ X (cid:1) g | v , v ∈ X ∗ is a graph covering.Now we describe the procedure that constructs a Mealy automaton of an endomorphismdefined by an automatic sequence generated by a given Moore automaton. Theorem 7.4. Let g ∈ End( X ∗ ) be an endomorphism of X ∗ induced by a transformationof Z d with the sequence of reduced van der Put coefficients ( b gn ) n ≥ ⊂ Z d generated by afinite Moore automaton B with the set of states Q B = { ( b gn ) n ≥ | v : v ∈ X ∗ } . Then the Mealyautomaton A = ( Q A , X, δ, λ, q ) , where • the set of states is Q A = n(cid:0) ( b gn ) n ≥ | v , ( b g | v i ) i =0 , ,...,d − (cid:1) : v ∈ X ∗ o , • the transition and output functions are δ (cid:16)(cid:0) ( b gn ) n ≥ | v , ( b g | v i ) i =0 , ,...,d − (cid:1) , x (cid:17) = (cid:0) ( b gn ) n ≥ | vx , ( b g | vx i ) i =0 , ,...,d − (cid:1) ,λ (cid:16)(cid:0) ( b gn ) n ≥ | v , ( b g | v i ) i =0 , ,...,d − (cid:1) , x (cid:17) = b g | v x mod d. (16) • the initial state is q = (cid:0) ( b gn ) n ≥ , ( b gi ) i =0 , ,...,d − (cid:1) is finite and defines the endomorphism g . roof. The initial Mealy automaton A ′ defining g has the set of states Q ′ = { g | v : v ∈ X ∗ } ,transition and output functions defined as δ ′ ( g | v , x ) = g | vx ,λ ′ ( g | v , x ) = g v ( x ) , (17)and the initial state g = g | ǫ .Since each endomorphism of X ∗ is uniquely defined by the sequence of its reduced vander Put coefficients, we can identify Q ′ with the set { ( b g | v n ) n ≥ : v ∈ X ∗ } . By Corollary 5.5 the sequence ( b g | v n ) n ≥ of the reduced van der Put coefficients that defines g | v coincides starting from term d with ( b gn ) n ≥ | v . Therefore, each state g | v of A ′ can becompletely defined by a pair, called the label of this state: l ( g | v ) = (cid:0) ( b gn ) n ≥ | v , ( b g | v i ) i =0 , ,...,d − (cid:1) , (18)where ( b g | v i ) i =0 , ,...,d − is the d -tuple of the first d terms of ( b g | v n ) n ≥ that corresponds to thelabels of the first level of the portrait of this sequence. As in the equation (15), the firstcomponent of this pair defines the terms of ( b g | v n ) n ≥ at level 2 and below, and the secondcomponent consists of terms of the first level.Similarly to the case of Theorem 7.1, it is possible that different labels will define thesame state of A ′ , but clearly the automaton A from the statement of the theorem alsogenerates g since its minimization coincides with A ′ . Indeed, the set of states of A is the setof labels of states of A ′ and the transition and output functions in A are obtained from thecorresponding functions in A ′ and the definition of labels.Finally, the finiteness of Q follows from the above proof of Theorem 1.1 since the set { ( b gn ) n ≥ | v : v ∈ X ∗ } (coinciding with Q B ) is finite, and the set { b g | v i : v ∈ X ∗ , i = 0 , , . . . , d − } is finite as well, which follows from Lemma 6.3.We conclude with the description of the algorithm of building the Mealy automaton ofan endomorphism of X ∗ from a Moore automaton defining the sequence of its reduced vander Put coefficients. Algorithm 2 (Construction of Mealy automaton from Moore automaton) . Let g ∈ End( X ∗ ) be an endomorphism of X ∗ induced by a transformation of Z d with the sequence of reducedvan der Put coefficients ( b gn ) n ≥ , b gn ∈ Z d defined by a finite Moore automaton B with theset of states Q B = { ( b gn ) n ≥ | v : v ∈ X ∗ } . To construct a Mealy automaton A = ( Q, X, δ, λ, q ) defining endomorphism g complete the following steps.Step 1. Start building the set of states of A from its initial state q = (cid:0) ( b gn ) n ≥ , ( b gi ) i =0 , ,...,d − (cid:1) with τ ( q ) = b g . Define Q = { q } . tep 2. To build Q i +1 from Q i for i ≥ start from empty set and for each state q = (cid:0) ( b gn ) n ≥ | v , ( b g | v i ) i =0 , ,...,d − (cid:1) ∈ Q i and each x ∈ X add state q x = (cid:0) ( b gn ) n ≥ | vx , ( b g | vx i ) i =0 , ,...,d − (cid:1) to Q i +1 unless it belongs to Q j for some j ≤ i or is alreadyin Q i +1 . Use the second case in (10) to calculate b g | vx i from b gj ’s, which are the valuesof the output function of the given Moore automaton. Extend the transition functionby δ ( q, x ) = q x and the output function by λ ( q, x ) = b g | v x mod d .Step 3. Repeat Step 2 until Q i +1 = ∅ .Step 4. The set of states of Mealy automaton A is ∪ i ≥ Q i , where transition and output func-tions are defined in Step 2. Corollary 7.5. Let g ∈ End( X ∗ ) be an endomorphism of X ∗ induced by a selfmap of Z d with the sequence of reduced van der Put coefficients defined by finite Moore automaton B .Then the underlying oriented graph Γ( A ) of the Mealy automaton A obtained from B byAlgorithm 2 covers the underlying oriented graph of B .Proof. Since the transitions in the original Moore automaton B defining g are defined by δ (( b gn ) n ≥ | v , x ) = ( b gn ) n ≥ | vx , we immediately get that the map from the underlying orientedgraph of A to the underlying oriented graph of B defined by (cid:0) ( b gn ) n ≥ | v , ( b g | v i ) i =0 , ,...,d − (cid:1) ( b gn ) n ≥ | v , v ∈ X ∗ is a graph covering. We first give the example of construction of a Moore automaton from Mealy automaton.Consider the lamplighter group L = ( Z / Z ) ≀ Z generated by the 2-state Mealy automaton A over the 2-letter alphabet X = { , } from [24] shown in Figure 1 and defined by thefollowing wreath recursion: p = ( p, q )(01) ,q = ( p, q ) . Proposition 8.1. The Moore automaton B p generating the sequence of reduced van der Putcoefficients of the transformation of Z induced by automorphism p is shown in Figure 7,where the initial state is on top, and the value of the output function τ of B p at a given stateis equal to the first component of the pair of d -adic integers in its label.Proof. We will apply Algorithm 1 and construct the sections of ( b pn ) n ≥ at the vertices of X ∗ in the form (14). It may be useful to refer to Figure 7 to understand better the calculationsthat follow. 24Sfrag replacements 0000 000 0 1 111 1 111 p, (1 ∞ , ∞ ) p, (1 ∞ , ∞ ) q, (001 ∞ , ∞ ) q, (101 ∞ , ∞ ) p, (001 ∞ , ∞ ) q, (1 ∞ , ∞ ) p, (101 ∞ , ∞ ) q, (101 ∞ , ∞ )Figure 7: Moore automaton B p generating the sequence ( b pn ) n ≥ of reduced van der Putcoefficients of the generator p of the lamplighter group L The label of the initial state ( b pn ) n ≥ | ε of B p is (cid:0) p | ε , ( b p , b p ) (cid:1) . By equation (8) we get: b p = p (0 ∞ ) = 1 ∞ and b p = p (10 ∞ ) = 001 ∞ . Therefore, the initial state of B p is labeled by l (( b pn ) n ≥ | ε ) = (cid:0) p, (1 ∞ , ∞ ) (cid:1) . We proceed with the states corresponding to the vertices of the first level of X ∗ . We calculate: b p = p (010 ∞ ) − p (0 ∞ )2 = 1001 ∞ − ∞ ∞ ,b p = p (110 ∞ ) − p (10 ∞ )2 = 0101 ∞ − ∞ ∞ . Therefore, we get the labels of two more states in B p : l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) p, (1 ∞ , ∞ ) (cid:1) ,l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) q, (001 ∞ , ∞ ) (cid:1) . 25o obtain labels of the states at the vertices of deeper levels we use Corollary 5.4. Namely, for n > 3, we have that [ n ] = vx ∈ X ∗ for some v ∈ X ∗ and x ∈ X . Therefore by Corollary 5.4 b pn = b pvx = b p | v x = b p | v n mod 4 . Therefore, it is enough to compute the first 4 values of ( b p | v n ) n ≥ for all states p | v of anautomaton A . Since there are only 2 states in A and we have computed the first 4 values of( b pn ) n ≥ , we proceed to ( b pn ) n ≥ : b q = q (0 ∞ ) = 01 ∞ ,b q = q (10 ∞ ) = 101 ∞ ,b q = q (010 ∞ ) − q (0 ∞ )2 = ∞ − ∞ = 101 ∞ ,b q = q (110 ∞ ) − q (10 ∞ )2 = ∞ − ∞ = 1 ∞ . Now, by Corollary 5.5 we have that b p = b p = b p | = b p = b p = 101 ∞ ,b p = b p = b p | = b p = b p = 1 ∞ ,b p = b p = b p | = b q = b q = 101 ∞ ,b p = b p = b p | = b q = b q = 1 ∞ . Thus, the states at the second level has the following labels: l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) p, ( b p , b p ) (cid:1) = (cid:0) p, (1 ∞ , ∞ ) (cid:1) ,l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) q, ( b p , b p ) (cid:1) = (cid:0) q, (101 ∞ , ∞ ) (cid:1) ,l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) p, ( b p , b p ) (cid:1) = (cid:0) p, (001 ∞ , ∞ ) (cid:1) ,l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) q, ( b p , b p ) (cid:1) = (cid:0) q, (1 ∞ , ∞ ) (cid:1) . Since l (( b pn ) n ≥ | ) = l (( b pn ) n ≥ | ), we can stop calculations along this branch. For otherbranches we compute similarly on the next level. We start from the branch 01. l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) p, ( b p , b p | ) (cid:1) = (cid:0) p, ( b p , b q ) (cid:1) = (cid:0) p, (101 ∞ , ∞ ) (cid:1) , and l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) q, ( b p | , b p | ) (cid:1) = (cid:0) q, ( b p , b q ) (cid:1) = (cid:0) q, (1 ∞ , ∞ ) (cid:1) = l (( b pn ) n ≥ | ) , For the branch 10 we obtain: l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) p, ( b p , b p | ) (cid:1) = (cid:0) p, ( b p , b p ) (cid:1) = (cid:0) p, (001 ∞ , ∞ ) (cid:1) = l (( b pn ) n ≥ | )26nd l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) q, ( b p | , b p | ) (cid:1) = (cid:0) q, ( b q , b p ) (cid:1) = (cid:0) q, (101 ∞ , ∞ ) (cid:1) . For the branch 11 we get: l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) p, ( b p , b p | ) (cid:1) = (cid:0) p, ( b p , b q ) (cid:1) = (cid:0) p, (1 ∞ , ∞ ) (cid:1) = l (( b pn ) n ≥ | )and l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) q, ( b p | , b p | ) (cid:1) = (cid:0) q, ( b q , b q ) (cid:1) = (cid:0) q, (1 ∞ , ∞ ) (cid:1) = l (( b pn ) n ≥ | ) . At this moment we have two unfinished branches: 010 and 101. For 010 we have: l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) p, ( b p , b p | ) (cid:1) = (cid:0) p, ( b p , b p ) (cid:1) = (cid:0) p, (101 ∞ , ∞ ) (cid:1) = l (( b pn ) n ≥ | )and l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) q, ( b p | , b p | ) (cid:1) = (cid:0) q, ( b q , b p ) (cid:1) = (cid:0) q, (101 ∞ , ∞ ) (cid:1) = l (( b pn ) n ≥ | ) . Finally, for 101 branch we compute: l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) p, ( b p | , b p | ) (cid:1) = (cid:0) p, ( b q , b q ) (cid:1) = (cid:0) p, (101 ∞ , ∞ ) (cid:1) = l (( b pn ) n ≥ | )and l (( b pn ) n ≥ | ) = (cid:0) p | , ( b p , b p ) (cid:1) = (cid:0) q, ( b p | , b p | ) (cid:1) = (cid:0) q, ( b p , b q ) (cid:1) = (cid:0) q, (1 ∞ , ∞ ) (cid:1) = l (( b pn ) n ≥ | ) . We have completed all the branches and constructed all the transitions in the automaton B p . In this subsection we provide an example of the converse construction. Namely, we willconstruct the finite state endomorphism of { , } ∗ that induces a transformation of Z withthe Thue-Morse sequence of reduced van der Put coefficients, where we treat 0 as 0 ∞ and 1as 10 ∞ according to the standard embedding of Z into Z .Recall, that the Thue-Morse sequence ( t n ) n ≥ is the binary sequence defined by a Mooreautomaton shown in Figure 8. It can be obtained by starting with 0 and successively ap-pending the Boolean complement of the sequence obtained thus far. The first 32 values ofthis sequence are shown in Table 1. 27 [ n ] t n n [ n ] t n n [ n ] t n n [ n ] t n q / q / B generating the Thue-Morse sequence Proposition 8.2. Endomorphism t of X ∗ inducing a transformation of Z with the Thue-Morse sequence ( b tn ) n ≥ = ( t n ) n ≥ of the reduced van der Put coefficients is defined by the2-state Mealy automaton A t shown in Figure 9 with the following wreath recursion: t = ( t, s ) ,s = ( s, t ) (cid:0) (cid:1) , where (cid:0) (cid:1) denotes the selfmap of { , } sending both of its elements to .Proof. We will follow Algorithm 2, according to which the states of A t are the pairs of theform l ( t | v ) = (cid:0) ( b tn ) n ≥ | v , ( b t | v , b t | v ) (cid:1) , (19)Below we will suppress the subscript n ≥ b tn ) for ( b tn ) n ≥ .The initial state t will have a label l ( t ) = l ( t | ε ) = (cid:0) ( b tn ) , ( b t , b t ) (cid:1) = (cid:0) ( b tn ) , (0 ∞ , ∞ ) (cid:1) . / / / / b tn ) , (0 ∞ , ∞ )( b tn ) | , (0 ∞ , ∞ )Figure 9: Mealy automaton A t defining a transformation of Z whose sequence of reducedvan der Put coefficients is the Thue-Morse sequenceWe proceed to calculating the labels of the sections at the vertices of the first level. UsingTheorem 5.1 (namely, the first two cases in equation (10)), and the values of b tn = t n of theThue-Morse sequence from Table 1, we obtain: l ( t | ) = (cid:0) ( b tn ) | , ( b t | , b t | ) (cid:1) = (cid:0) ( b tn ) , ( σ ( b t ) , b t + σ ( b t )) (cid:1) = (cid:0) ( b tn ) , ( σ (0 ∞ ) , ∞ + σ (0 ∞ )) (cid:1) = (cid:0) ( b tn ) , (0 ∞ , ∞ ) (cid:1) = l ( t ) . We also used above the fact that ( b tn ) | = ( b tn ) that follows from the structure of automaton B . Therefore, we can stop developing the branch that starts with 0 and move to the branchstarting from 1. Similarly we get l ( t | ) = (cid:0) ( b tn ) | , ( b t | , b t | ) (cid:1) = (cid:0) ( b tn ) | , ( σ ( b t ) , b t + σ ( b t )) (cid:1) = (cid:0) ( b tn ) | , ( σ (10 ∞ ) , ∞ + σ (10 ∞ )) (cid:1) = (cid:0) ( b tn ) | , (0 ∞ , ∞ ) (cid:1) , (20)so we obtained a new section. We compute the sections at the vertices of the second levelusing Figure 5, keeping in mind that according to equation (20) b t | = 0 ∞ : l ( t | ) = (cid:0) ( b tn ) | , ( b t | , b t | ) (cid:1) = (cid:0) ( b tn ) | , ( b ( t | ) | , b ( t | ) | ) (cid:1) = (cid:0) ( b tn ) | , ( σ ( b t | ) , b t | + σ ( b t | )) (cid:1) = (cid:0) ( b tn ) | , ( σ (0 ∞ ) , b t + σ (0 ∞ )) (cid:1) = (cid:0) ( b tn ) | , (0 ∞ , ∞ + 0 ∞ ) (cid:1) = (cid:0) ( b tn ) | , (0 ∞ , ∞ ) (cid:1) = l ( t | ) . Finally, since according to equation (20) b t | = 0 ∞ , we calculate the last section at 11: l ( t | ) = (cid:0) ( b tn ) | , ( b t | , b t | ) (cid:1) = (cid:0) ( b tn ) , ( b ( t | ) | , b ( t | ) | ) (cid:1) = (cid:0) ( b tn ) , ( σ ( b t | ) , b t | + σ ( b t | )) (cid:1) = (cid:0) ( b tn ) , ( σ (0 ∞ ) , b t + σ (0 ∞ )) (cid:1) = (cid:0) ( b tn ) , (0 ∞ , ∞ + 0 ∞ ) (cid:1) = (cid:0) ( b tn ) , (0 ∞ , ∞ ) (cid:1) = l ( t ) . 29e have completed all the branches and constructed all the transitions in the automaton A t . We only need now to compute the values of the output function. By equation (16) weget: λ (cid:0)(cid:0) ( b tn ) , (0 ∞ , ∞ ) (cid:1) , (cid:1) = 0 ∞ mod 2 = 0 ,λ (cid:0)(cid:0) ( b tn ) , (0 ∞ , ∞ ) (cid:1) , (cid:1) = 10 ∞ mod 2 = 1 ,λ (cid:0)(cid:0) ( b tn ) | , (0 ∞ , ∞ ) (cid:1) , (cid:1) = 0 ∞ mod 2 = 0 ,λ (cid:0)(cid:0) ( b tn ) | , (0 ∞ , ∞ ) (cid:1) , (cid:1) = 0 ∞ mod 2 = 0 , which completes the proof of the proposition. Acknowledgements. The authors are thankful to Zoran ˇSun´ıc and Svetlana Katok forenlightening conversations on the subject of the paper. The first author graciously acknowl-edges support from the Simons Foundation through Collaboration Grant References [1] Elsayed Ahmed and Dmytro Savchuk. Endomorphisms of regular rooted trees inducedby the action of polynomials on the ring Z d of d -adic integers. J. Algebra Appl. , Publishedonline, 2019.[2] Jean-Paul Allouche and Jeffrey Shallit. Automatic sequences . Cambridge UniversityPress, Cambridge, 2003. Theory, applications, generalizations.[3] V. Anashin. Automata finiteness criterion in terms of van der Put series of automatafunctions. p-Adic Numbers Ultrametric Anal. Appl. , 4(2):151–160, 2012.[4] V. S. Anashin, A. Yu. Khrennikov, and E. I. Yurova. Characterization of ergodic p -adicdynamical systems in terms of the van der Put basis. Dokl. Akad. Nauk , 438(2):151–153,2011. [English translation: Dokl. Math. 83 (2011), no. 3, 306-308].[5] Vladimir Anashin. Ergodic transformations in the space of p -adic integers. In p -adicmathematical physics , volume 826 of AIP Conf. Proc. , pages 3–24. Amer. Inst. Phys.,Melville, NY, 2006.[6] L. Bartholdi and R. I. Grigorchuk. On the spectrum of Hecke type operators re-lated to some fractal groups. Tr. Mat. Inst. Steklova , 231(Din. Sist., Avtom. i Beskon.Gruppy):5–45, 2000. 307] Laurent Bartholdi, Rostislav Grigorchuk, and Volodymyr Nekrashevych. From fractalgroups to fractal sets. In Fractals in Graz 2001 , Trends Math., pages 25–118. Birkh¨auser,Basel, 2003.[8] Laurent I. Bartholdi and Volodymyr V. Nekrashevych. Thurston equivalence of topo-logical polynomials. Acta Math. , 197(1):1–51, 2006.[9] Laurent I. Bartholdi and Zoran ˇSuni´k. Some solvable automaton groups. In Topologicaland Asymptotic Aspects of Group Theory , volume 394 of Contemp. Math. , pages 11–29.Amer. Math. Soc., Providence, RI, 2006.[10] Daniel J. Bernstein and Jeffrey C. Lagarias. The 3 x + 1 conjugacy map. Canad. J.Math. , 48(6):1154–1169, 1996.[11] Alan J. Cain. Automaton semigroups. Theoret. Comput. Sci. , 410(47-49):5022–5038,2009.[12] Paul Cull and Ingrid Nelson. Error-correcting codes on the Towers of Hanoi graphs. Discrete Math. , 208/209:157–175, 1999. Combinatorics (Assisi, 1996).[13] Max Garzon and Yechezkel Zalcstein. The complexity of Grigorchuk groups with ap-plication to cryptography. Theoret. Comput. Sci. , 88(1):83–98, 1991.[14] Mark Goresky and Andrew Klapper. Algebraic shift register sequences . CambridgeUniversity Press, Cambridge, 2012.[15] R. Grigorchuk, Y. Leonov, V. Nekrashevych, and V. Sushchansky. Self-similar groups,automatic sequences, and unitriangular representations. Bull. Math. Sci. , 6(2):231–285,2016.[16] R. I. Grigorchuk. On Burnside’s problem on periodic groups. Funktsional. Anal. iPrilozhen. , 14(1):53–54, 1980.[17] R. I. Grigorchuk. On the Milnor problem of group growth. Dokl. Akad. Nauk SSSR ,271(1):30–33, 1983.[18] R. I. Grigorchuk, V. V. Nekrashevich, and V. I. Sushchanski˘ı. Automata, dynami-cal systems, and groups. Tr. Mat. Inst. Steklova , 231(Din. Sist., Avtom. i Beskon.Gruppy):134–214, 2000.[19] Rostislav Grigorchuk, Daniel Lenz, and Tatiana Nagnibeda. Spectra of Schreier graphsof Grigorchuk’s group and Schroedinger operators with aperiodic order. Math. Ann. ,370(3-4):1607–1637, 2018.[20] Rostislav Grigorchuk and Zoran ˇSuni´c. Self-similarity and branching in group theory.In Groups St. Andrews 2005, I , volume 339 of London Math. Soc. Lecture Note Ser. ,pages 36–95. Cambridge Univ. Press, Cambridge, 2007.3121] Rostislav Grigorchuk and Zoran ˇSuni´c. Schreier spectrum of the Hanoi Towers groupon three pegs. In Analysis on graphs and its applications , volume 77 of Proc. Sympos.Pure Math. , pages 183–198. Amer. Math. Soc., Providence, RI, 2008.[22] Rostislav Grigorchuk and Zoran ˇSuni´k. Asymptotic aspects of Schreier graphs andHanoi Towers groups. C. R. Math. Acad. Sci. Paris , 342(8):545–550, 2006.[23] Rostislav I. Grigorchuk, Peter Linnell, Thomas Schick, and Andrzej ˙Zuk. On a questionof Atiyah. C. R. Acad. Sci. Paris S´er. I Math. , 331(9):663–668, 2000.[24] Rostislav I. Grigorchuk and Andrzej ˙Zuk. The lamplighter group as a group generatedby a 2-state automaton, and its spectrum. Geom. Dedicata , 87(1-3):209–244, 2001.[25] Rostislav I. Grigorchuk and Andrzej ˙Zuk. On a torsion-free weakly branch group definedby a three state automaton. Internat. J. Algebra Comput. , 12(1-2):223–246, 2002.[26] Svetlana Katok. p -adic analysis compared with real , volume 37 of Student MathematicalLibrary . American Mathematical Society, Providence, RI; Mathematics Advanced StudySemesters, University Park, PA, 2007.[27] M. V. Larin. Transitive polynomial transformations of residue rings. Diskret. Mat. ,14(2):20–32, 2002.[28] Kurt Mahler. p -adic numbers and their functions , volume 76 of Cambridge Tracts inMathematics . Cambridge University Press, Cambridge-New York, second edition, 1981.[29] Alexei Miasnikov and Dmytro Savchuk. An example of an automatic graph of interme-diate growth. Ann. Pure Appl. Logic , 166(10):1037–1048, 2015.[30] Alexei Miasnikov and Zoran ˇSuni´c. Cayley graph automatic groups are not necessarilyCayley graph biautomatic. In Language and automata theory and applications , volume7183 of Lecture Notes in Comput. Sci. , pages 401–407. Springer, Heidelberg, 2012.[31] Alexei Myasnikov, Vladimir Shpilrain, and Alexander Ushakov. Non-commutative cryp-tography and complexity of group-theoretic problems , volume 177 of Mathematical Sur-veys and Monographs . American Mathematical Society, Providence, RI, 2011. With anappendix by Natalia Mosina.[32] Alexei G. Myasnikov and Alexander Ushakov. Random subgroups and analysis of thelength-based and quotient attacks. J. Math. Cryptol. , 2(1):29–61, 2008.[33] V. Nekrashevych and S. Sidki. Automorphisms of the binary tree: state-closed subgroupsand dynamics of 1 / London Math. Soc. Lect. Note Ser. ,pages 375–404. Cambridge Univ. Press, 2004.[34] Volodymyr Nekrashevych. Self-similar groups , volume 117 of Mathematical Surveys andMonographs . American Mathematical Society, Providence, RI, 2005.3235] George Petrides. Cryptanalysis of the public key cryptosystem based on the wordproblem on the Grigorchuk groups. In Cryptography and coding , volume 2898 of LectureNotes in Comput. Sci. , pages 234–244. Springer, Berlin, 2003.[36] W. H. Schikhof. Ultrametric calculus , volume 4 of Cambridge Studies in AdvancedMathematics . Cambridge University Press, Cambridge, 1984. An introduction to p -adicanalysis.[37] L.A. Sholomov. Foundations of the theory of discrete logical and computational devices(In Russian) . Moscow: Nauka, 1980.[38] J. L. Walsh. A Closed Set of Normal Orthogonal Functions.