There exist several characterizations of k-regular sequences, all of which are equivalent. Some common characterizations are as follows. For each, we take R′ to be a commutativeNoetherian ring and we take R to be a ring containing R′.
A sequence s(n) is k-regular if there exists an integer E such that, for all ej > E and 0 ≤ rj ≤ kej − 1, every subsequence of s of the form s(kejn + rj) is expressible as an R′-linear combination, where cij is an integer, fij ≤ E, and 0 ≤ bij ≤ kfij − 1.[2]
Alternatively, a sequence s(n) is k-regular if there exist an integer r and subsequences s1(n), ..., sr(n) such that, for all 1 ≤ i ≤ r and 0 ≤ a ≤ k − 1, every sequence si(kn + a) in the k-kernel Kk(s) is an R′-linear combination of the subsequences si(n).[2]
Let x0, ..., xk − 1 be a set of k non-commuting variables and let τ be a map sending some natural number n to the string xa0 ... xae − 1, where the base-k representation of x is the string ae − 1...a0. Then a sequence s(n) is k-regular if and only if the formal series is -rational.[3]
The notion of k-regular sequences was first investigated in a pair of papers by Allouche and Shallit.[6] Prior to this, Berstel and Reutenauer studied the theory of rational series, which is closely related to k-regular sequences.[7]
The Thue–Morse sequencet(n) (OEIS: A010060) is the fixed point of the morphism 0 → 01, 1 → 10. It is known that the Thue–Morse sequence is 2-automatic. Thus, it is also 2-regular, and its 2-kernel
A somewhat interesting application of the notion of k-regularity to the broader study of algorithms is found in the analysis of the merge sort algorithm. Given a list of n values, the number of comparisons made by the merge sort algorithm are the sorting numbers, governed by the recurrence relation
As a result, the sequence defined by the recurrence relation for merge sort, T(n), constitutes a 2-regular sequence.[10]
A k-regular sequence takes on finitely many values if and only if it is k-automatic.[12] This is an immediate consequence of the class of k-regular sequences being a generalization of the class of k-automatic sequences.
The class of k-regular sequences is closed under termwise addition, termwise multiplication, and convolution. The class of k-regular sequences is also closed under scaling each term of the sequence by an integer λ.[12][13][14][15] In particular, the set of k-regular power series forms a ring.[16]
If is k-regular, then for all integers , is k-automatic. However, the converse does not hold.[17]
For multiplicatively independent k, l ≥ 2, if a sequence is both k-regular and l-regular, then the sequence satisfies a linear recurrence.[18] This is a generalization of a result due to Cobham regarding sequences that are both k-automatic and l-automatic.[19]
The nth term of a k-regular sequence of integers grows at most polynomially in n.[20]
If is a field and , then the sequence of powers is k-regular if and only if or is a root of unity.[21]
Given a candidate sequence that is not known to be k-regular, k-regularity can typically be proved directly from the definition by calculating elements of the kernel of and proving that all elements of the form with sufficiently large and can be written as linear combinations of kernel elements with smaller exponents in the place of . This is usually computationally straightforward.
On the other hand, disproving k-regularity of the candidate sequence usually requires one to produce a -linearly independent subset in the kernel of , which is typically trickier. Here is one example of such a proof.
Let denote the number of 's in the binary expansion of . Let denote the number of 's in the binary expansion of . The sequence can be shown to be 2-regular. The sequence is, however, not 2-regular, by the following argument. Suppose is 2-regular. We claim that the elements for and of the 2-kernel of are linearly independent over . The function is surjective onto the integers, so let be the least integer such that . By 2-regularity of , there exist and constants such that for each ,
Let be the least value for which . Then for every ,
Evaluating this expression at , where and so on in succession, we obtain, on the left-hand side
and on the right-hand side,
It follows that for every integer ,
But for , the right-hand side of the equation is monotone because it is of the form for some constants , whereas the left-hand side is not, as can be checked by successively plugging in , , and . Therefore, is not 2-regular.[22]
^Schützenberger, M.-P. (1961), "On the definition of a family of automata", Information and Control, 4 (2–3): 245–270, doi:10.1016/S0019-9958(61)80020-X.
^Berstel, Jean; Reutenauer, Christophe (1988). Rational Series and Their Languages. EATCS Monographs on Theoretical Computer Science. Vol. 12. Springer-Verlag. ISBN978-3-642-73237-9.
^Bell, J. (2006). "A generalization of Cobham's theorem for regular sequences". Séminaire Lotharingien de Combinatoire. 54A.
^Cobham, A. (1969). "On the base-dependence of sets of numbers recognizable by finite automata". Math. Systems Theory. 3 (2): 186–192. doi:10.1007/BF01746527. S2CID19792434.