In
mathematics and
theoretical computer science
Theoretical computer science (TCS) is a subset of general computer science and mathematics that focuses on mathematical aspects of computer science such as the theory of computation, lambda calculus, and type theory.
It is difficult to circumsc ...
, a ''k''-regular sequence is a
sequence
In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is called ...
satisfying linear recurrence equations that reflect the
base-''k'' representations of the integers. The class of ''k''-regular sequences generalizes the class of
''k''-automatic sequences to alphabets of infinite size.
Definition
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
commutative
In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name o ...
Noetherian ring
In mathematics, a Noetherian ring is a ring that satisfies the ascending chain condition on left and right ideals; if the chain condition is satisfied only for left ideals or for right ideals, then the ring is said left-Noetherian or right-Noethe ...
and we take ''R'' to be a
ring
Ring may refer to:
* Ring (jewellery), a round band, usually made of metal, worn as ornamental jewelry
* To make a sound with a bell, and the sound made by a bell
:(hence) to initiate a telephone connection
Arts, entertainment and media Film and ...
containing ''R''′.
''k''-kernel
Let ''k'' ≥ 2. The ''k-kernel'' of the sequence
is the set of subsequences
:
The sequence
is (''R''′, ''k'')-regular (often shortened to just "''k''-regular") if the
-module generated by ''K''
''k''(''s'') is a
finitely-generated ''R''′-
module
Module, modular and modularity may refer to the concept of modularity. They may also refer to:
Computing and engineering
* Modular design, the engineering discipline of designing complex devices using separately designed sub-components
* Mo ...
.
[Allouche and Shallit (1992), Definition 2.1.]
In the special case when
, the sequence
is
-regular if
is contained in a finite-dimensional vector space over
.
Linear combinations
A sequence ''s''(''n'') is ''k''-regular if there exists an integer ''E'' such that, for all ''e''
''j'' > ''E'' and 0 ≤ ''r''
''j'' ≤ ''k''
''e''''j'' − 1, every subsequence of ''s'' of the form ''s''(''k''
''e''''j''''n'' + ''r''
''j'') is expressible as an ''R''′-
linear combination , where ''c''
''ij'' is an integer, ''f''
''ij'' ≤ ''E'', and 0 ≤ ''b''
''ij'' ≤ ''k''
''f''''ij'' − 1.
[Allouche & Shallit (1992), Theorem 2.2.]
Alternatively, a sequence ''s''(''n'') is ''k''-regular if there exist an integer ''r'' and subsequences ''s''
1(''n''), ..., ''s''
''r''(''n'') such that, for all 1 ≤ ''i'' ≤ ''r'' and 0 ≤ ''a'' ≤ ''k'' − 1, every sequence ''s''
''i''(''kn'' + ''a'') in the ''k''-kernel ''K''
''k''(''s'') is an ''R''′-linear combination of the subsequences ''s''
''i''(''n'').
Formal series
Let ''x''
0, ..., ''x''
''k'' − 1 be a set of ''k'' non-commuting variables and let τ be a map sending some natural number ''n'' to the string ''x''
''a''0 ... ''x''
''a''''e'' − 1, where the base-''k'' representation of ''x'' is the string ''a''
''e'' − 1...''a''
0. Then a sequence ''s''(''n'') is ''k''-regular if and only if the
formal series
In mathematics, a formal series is an infinite sum that is considered independently from any notion of convergence, and can be manipulated with the usual algebraic operations on series (addition, subtraction, multiplication, division, partial s ...
is
-
rational
Rationality is the quality of being guided by or based on reasons. In this regard, a person acts rationally if they have a good reason for what they do or a belief is rational if it is based on strong evidence. This quality can apply to an abil ...
.
[Allouche & Shallit (1992), Theorem 4.3.]
Automata-theoretic
The formal series definition of a ''k''-regular sequence leads to an automaton characterization similar to
Schützenberger Schützenberger may refer to these people:
* Anne Ancelin Schützenberger (1919–2018) (de)
* Paul Schützenberger, French chemist
* René Schützenberger, French painter
* Marcel-Paul "Marco" Schützenberger, French mathematician and Doctor of M ...
's matrix machine.
[Allouche & Shallit (1992), Theorem 4.4.]
History
The notion of ''k''-regular sequences was first investigated in a pair of papers by Allouche and Shallit.
[Allouche & Shallit (1992, 2003).] Prior to this, Berstel and Reutenauer studied the theory of
rational series, which is closely related to ''k''-regular sequences.
Examples
Ruler sequence
Let
be the
-adic valuation of
. The ruler sequence
() is
-regular, and the
-kernel
:
is contained in the two-dimensional vector space generated by
and the constant sequence
. These basis elements lead to the recurrence relations
:
which, along with the initial conditions
and
, uniquely determine the sequence.
[Allouche & Shallit (1992), Example 8.]
Thue–Morse sequence
The
Thue–Morse sequence
In mathematics, the Thue–Morse sequence, or Prouhet–Thue–Morse sequence, is the binary sequence (an infinite sequence of 0s and 1s) obtained by starting with 0 and successively appending the Boolean complement of the sequence obtained thu ...
''t''(''n'') () 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
:
consists of the subsequences
and
.
Cantor numbers
The sequence of
Cantor numbers ''c''(''n'') () consists of numbers whose
ternary
Ternary (from Latin ''ternarius'') or trinary is an adjective meaning "composed of three items". It can refer to:
Mathematics and logic
* Ternary numeral system, a base-3 counting system
** Balanced ternary, a positional numeral system, usef ...
expansions contain no 1s. It is straightforward to show that
:
and therefore the sequence of Cantor numbers is 2-regular. Similarly the
Stanley sequence
:0, 1, 3, 4, 9, 10, 12, 13, 27, 28, 30, 31, 36, 37, 39, 40, ...
of numbers whose ternary expansions contain no 2s is also 2-regular.
[Allouche & Shallit (1992), Examples 3 and 26.]
Sorting numbers
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
In computer science, merge sort (also commonly spelled as mergesort) is an efficient, general-purpose, and comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the order of equal elements is the same ...
algorithm. Given a list of ''n'' values, the number of comparisons made by the merge sort algorithm are the
sorting number In mathematics and computer science, the sorting numbers are a sequence of numbers introduced in 1950 by Hugo Steinhaus for the analysis of comparison sort algorithms. These numbers give the worst-case number of comparisons used by both binary inse ...
s, 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.
[Allouche & Shallit (1992), Example 28.]
Other sequences
If
is an
integer-valued polynomial In mathematics, an integer-valued polynomial (also known as a numerical polynomial) P(t) is a polynomial whose value P(n) is an integer for every integer ''n''. Every polynomial with integer coefficients is integer-valued, but the converse is not t ...
, then
is ''k''-regular for every
.
The
Glaisher–Gould sequence is 2-regular. The Stern–Brocot sequence is 2-regular.
Allouche and Shallit give a number of additional examples of ''k''-regular sequences in their papers.
Properties
''k''-regular sequences exhibit a number of interesting properties.
*Every
''k''-automatic sequence is ''k''-regular.
*Every
''k''-synchronized sequence is ''k''-regular.
*A ''k''-regular sequence takes on finitely many values if and only if it is ''k''-automatic.
[Allouche & Shallit (2003) p. 441.] 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
In mathematics (in particular, functional analysis), convolution is a mathematical operation on two functions ( and ) that produces a third function (f*g) that expresses how the shape of one is modified by the other. The term ''convolution' ...
. The class of ''k''-regular sequences is also closed under scaling each term of the sequence by an integer λ.
[Allouche & Shallit (2003) p. 445.] In particular, the set of ''k''-regular power series forms a ring.
*If
is ''k''-regular, then for all integers
,
is ''k''-automatic. However, the converse does not hold.
*For multiplicatively independent ''k'', ''l'' ≥ 2, if a sequence is both ''k''-regular and ''l''-regular, then the sequence satisfies a linear recurrence. This is a generalization of a result due to Cobham regarding sequences that are both ''k''-automatic and ''l''-automatic.
*The ''n''th term of a ''k''-regular sequence of integers grows at most polynomially in ''n''.
*If
is a field and
, then the sequence of powers
is ''k''-regular if and only if
or
is a root of unity.
Proving and disproving ''k''-regularity
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.
[Allouche and Shallit (1993) p. 168–169.]
Notes
References
*.
*.
*{{cite book , last1 = Allouche , first1 = Jean-Paul , last2 = Shallit , first2 = Jeffrey , author2-link = Jeffrey Shallit , isbn = 978-0-521-82332-6 , publisher =
Cambridge University Press
Cambridge University Press is the university press of the University of Cambridge. Granted letters patent by Henry VIII of England, King Henry VIII in 1534, it is the oldest university press in the world. It is also the King's Printer.
Cambr ...
, title = Automatic Sequences: Theory, Applications, Generalizations , year = 2003 , zbl=1086.11015
Combinatorics on words
Automata (computation)
Integer sequences
Recurrence relations