Jump to content

Automatic sequence

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Taylorsmith2 (talk | contribs) at 02:22, 17 April 2017 (Improved definitions, miscellaneous fixes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In mathematics and theoretical computer science, an automatic sequence (also called a k-automatic sequence or a k-recognizable sequence when one wants to indicate that the base of the numerals used is k) is an infinite sequence of terms characterized by a finite automaton. The n-th term of an automatic sequence a(n) is a mapping of the final state reached in a finite automaton accepting the digits of the number n in some fixed base k.[1][2]

An automatic set is a set of non-negative integers S for which the sequence of values of its characteristic function χS is an automatic sequence; that is, S is k-automatic if χS(n) is k-automatic, where χS(n) = 1 if n  S and 0 otherwise.[3][4]

Definition

Automatic sequences may be defined in a number of ways, all of which are equivalent. Four common definitions are as follows.

Automata-theoretic

Let k be a positive integer, and let D = (Q, Σk, δ, q0, Δ, τ) be a deterministic finite automaton with output, where

  • Q is the finite set of states;
  • the input alphabet Σk consists of the set {0,1,...,k-1} of possible digits in base-k notation;
  • δ : Q × ΣkQ is the transition function;
  • q0Q is the initial state;
  • the output alphabet Δ is similar to Σk; and
  • τ : Σk → Δ is the output function mapping from the input alphabet to the output alphabet.

Extend the transition function δ from acting on single digits to acting on strings of digits by defining the action of δ on a string s consisting of digits s1s2...st as:

δ(q,s) = δ(δ(q0, s1s2...st-1), st).

Define a function a from the set of positive integers to the output alphabet Δ as follows:

a(n) = τ(δ(q0,s(n))),

where s(n) is n written in base k. Then the sequence a = a(1)a(2)a(3)... is a k-automatic sequence.[1]

An automaton reading the base k digits of s(n) starting with the most significant digit is said to be direct reading, while an automaton starting with the least significant digit is reverse reading.[4] The above definition holds whether s(n) is direct or reverse reading.[5]

Substitution

Let φ be a k-uniform morphism of a free monoid Σ and let τ be defined as in the automata-theoretic case. If w is a fixed point of φ—that is, if w = φ(w)—then s = τ(w) is a k-automatic sequence.[6] This result is due to Cobham.[2][7] Conversely, every k-automatic sequence is obtainable in this way.[4]

k-kernel

Let k ≥ 2. The k-kernel of the sequence s(n) is the set of sequences

A sequence s(n) is k-automatic if its k-kernel is finite.

It follows that a k-automatic sequence is necessarily a sequence on a finite alphabet.

Decimation

Let k ≥ 2. For a sequence w, we define the k-decimations of w for r = 0,1,...,k − 1 to be the subsequences consisting of the letters in positions congruent to r modulo k. The decimation kernel of w consists of the set of words obtained by all possible repeated decimations of w. A sequence is k-automatic if and only if the k-decimation kernel is finite.[8][9][10]

History

Automatic sequences were introduced by Büchi in 1960,[11] although his paper took a more logico-theoretic approach to the matter and did not use the terminology found in this article. The notion of automatic sequences was further studied by Cobham in 1972, who called these sequences "uniform tag sequences".[7] The term "automatic sequence" first appeared in a paper of Deshouillers.[12]

Examples

The following sequences are automatic:

Thue–Morse sequence

DFAO generating the Thue–Morse sequence

The Thue–Morse sequence is the fixed point of the morphism 0 → 01, 1 → 10. Since the n-th term of the Thue–Morse sequence counts the number of ones modulo 2 in the base-2 representation of n, it is generated by the two-state deterministic finite automaton with output pictured here, where being in state q0 indicates there are an even number of ones in the representation of n and being in state q1 indicates there are an odd number of ones. Hence, the Thue–Morse sequence is 2-automatic.

Period-doubling sequence

The n-th term of the period-doubling sequence, d(n), is determined by the parity of the exponent of the highest power of 2 dividing n. It is also the fixed point of the morphism 0 → 01, 1 → 00.[13] Starting with the initial term w = 0 and iterating the 2-uniform morphism φ on w where φ(0) = 01 and φ(1) = 00, it is evident that the period-doubling sequence is the fixed-point of φ(w) and thus it is 2-automatic.

Rudin–Shapiro sequence

The n-th term of the Rudin–Shapiro sequence, r(n), is determined by the number of consecutive ones in the base-2 representation of n. The 2-kernel of the Rudin–Shapiro sequence[14] is

Since the 2-kernel consists only of r(n), r(2n + 1), r(4n + 3), and r(8n + 3), it is finite and thus the Rudin–Shapiro sequence is 2-automatic.

Other sequences

Both the Baum–Sweet sequence[15] and the regular paperfolding sequence[16][17][18] are automatic. In addition, the general paperfolding sequence with a periodic sequence of folds is also automatic.[19]

Properties

For given k and r, a set is k-automatic if and only if it is kr-automatic. Otherwise, for h and k multiplicatively independent, then a set is both h-automatic and k-automatic if and only if it is ultimately periodic.[20] This theorem is also due to Cobham,[21] with a multidimensional generalisation due to Semënov.[22][23]

If u(n) is a k-automatic sequence then the sequences u(kn) and u(kn − 1) are ultimately periodic.[24] Conversely, if v(n) is ultimately periodic then the sequence u defined by u(kn) = v(n) and otherwise zero is k-automatic.[25]

Let u(n) be a k-automatic sequence over the alphabet A. If f is a uniform morphism from A to B then the word f(u) is k-automatic sequence over the alphabet B.[26]

Let u(n) be a sequence over the alphabet A and suppose that there is an injective function j from A to the finite field Fq. The associated formal power series is

The sequence u is q-automatic if and only if the power series fu is algebraic over the rational function field Fq(z).[27]

Every automatic sequence is a morphic word.[28]

1-automatic sequences

k-automatic sequences are normally only defined for k  2.[1] The concept can be extended to k = 1 by defining a 1-automatic sequence to be a sequence whose n-th term depends on the unary notation for n; that is, (1)n. Since a finite state automaton must eventually return to a previously visited state, all 1-automatic sequences are ultimately periodic.

Generalizations

Automatic sequences are robust against variations to either the definition or the input sequence. For instance, as noted in the automata-theoretic definition, a given sequence remains automatic under both direct and reverse reading of the input sequence. A sequence also remains automatic when the base is changed or when the base is negated; that is, when the input sequence is represented in base −k instead of in base k.[29]

k-automatic sequences are generalized to infinite alphabets by k-regular sequences.

See also

Notes

  1. ^ a b c Allouche & Shallit (2003) p. 152
  2. ^ a b Berstel et al (2009) p. 78
  3. ^ Allouche & Shallit (2003) p. 168
  4. ^ a b c Pytheas Fogg (2002) p. 13
  5. ^ Pytheas Fogg (2002) p. 15
  6. ^ Allouche & Shallit (2003) p. 175
  7. ^ a b Cobham (1972)
  8. ^ Allouche & Shallit (2003) p. 185
  9. ^ Lothaire (2005) p. 527
  10. ^ Berstel & Reutenauer (2011) p. 91
  11. ^ Büchi, Julius Richard (1960). "Weak second-order arithmetic and finite automata". Z. Math. Logik Grundlagen Math. 6: 66–92. doi:10.1007/978-1-4613-8928-6_22.
  12. ^ Deshouillers, J.-M. (1979–1980). "La répartition modulo 1 des puissances de rationnels dans l'anneau des séries formelles sur un corps fini". Séminaire de Théorie des Nombres de Bordeaux: 5.01 – 5.22.
  13. ^ Allouche & Shallit (2003) p. 176
  14. ^ Allouche & Shallit (2003) p. 186
  15. ^ Allouche & Shallit (2003) p. 156
  16. ^ Berstel & Reutenauer (2011) p. 92
  17. ^ Allouche & Shallit (2003) p. 155
  18. ^ Lothaire (2005) p. 526
  19. ^ Allouche & Shallit (2003) p. 183
  20. ^ Allouche & Shallit (2003) pp. 345–350
  21. ^ Cobham, Alan (1969). "On the base-dependence of sets of numbers recognizable by finite automata". Math. Systems Theory. 3 (2): 186–192. doi:10.1007/BF01746527.
  22. ^ Semenov, A. L. (1977). "Presburgerness of predicates regular in two number systems". Sibirsk. Mat. Zh. (in Russian). 18: 403–418.
  23. ^ Point, F.; Bruyère, V. (April 1997). "On the Cobham-Semenov theorem". Theory of Computing Systems. 30 (2): 197–220. doi:10.1007/BF02679449.
  24. ^ Lothaire (2005) p. 529
  25. ^ Berstel & Reutenauer (2011) p. 103
  26. ^ Lothaire (2005) p. 532
  27. ^ Berstel & Reutenauer (2011) p. 93
  28. ^ Lothaire (2005) p. 524
  29. ^ Allouche & Shallit (2003) p. 157

References

Further reading