|
Divide-and-conquer 2-rational sequences |
|
| Introduction |
| A fundamental idea |
| Complexity and recurrences |
| 2-rational sequences |
| Asymptotic behavior |
| References |
Among the Mahlerian sequences, we distinguish a particular class,
namely the class of sequences that are rational with respect to the
radix 2 or, for brevity, 2-rational sequences. One defines a
2-rational sequence (un) by a linear
representation. Such a representation consists of a row matrix
,
a column matrix
and two square matrices A0 and A1
whose sizes are respectively
,
and
for a certain integer N. If
an integer has as binary expansion
![]()
![]()
The concept of a 2-rational sequence or more generally a
B-rational sequence (the definition is easy to write up) is a direct
extension of the concept of a rational sequence, i.e. of
sequence whose generating series is a rational function
(not admitting 0 as a pole). This concept appears in [4] where one speaks about 2-regular
sequence, but this terminology appears to be too fuzzy, the
word regular having multiple meanings. One finds in [4] many examples of
2-rational sequences. The simplest one is certainly the sequence
which gives the number of 1s in the binary writing of n. This sequence admits the linear representation
![]()
![]()
Characterization of the sequences which are rational with respect to the radix 2. We defined a 2-rational sequence by a linear representation; in real life examples are not given in this way and one must thus prove the 2-rationality. Often a divide-and-conquer recurrence is given and one can then apply the following result [12]. If the formal series f(z) satisfies the equation
![]()
![]()


![]()

![]()
In the same way the sequence defined by [21, p. 25]
![]()
![]()
![]()
Linear representation.
Knowing that a sequence
is 2-rational, it is natural to look for a linear representation of it.
The 2-regularity of a sequence (un)
expresses the fact that the sequences (un),
(u2n), (u2n+1),
(u4n), (u4n+1),
(u4n+2), (u4n+3),
etc, all live in a space of finite dimension. To emphasize this
point one associates with the sequence a binary tree. Its root is
labelled by the sequence (un) itself, and
more generally the nodes are labelled by the subsequences
(u2kn+r), with
.
The childrens of the node labelled with
(u2kn+r)
are labelled by
(u2k+1n+r) and
(u2k+1n+2k+r).
Moreover sequences which label the internal nodes of the tree
are linearly independent and the sequences which label the
leaves of the tree may be expressed as linear combinations of the
previous ones.
Applying this algorithm one obtains for the sequence (Tn) which gives the cost of mergesort in the worst case the following tree and relations of recurrences.


Indeed 2-rational series are the translation via the
positional binary notation of the rational series on the alphabet
of formal language theory [7]; with the 2-rational series
![]()
![]()
2-automatic sequences. Another demonstration of the link with the theory of formal languages is the concept of a 2-automatic sequence, which predates the concept of a 2-rational sequence [8]. 2-automatic sequences are 2-rational sequences which take only a finite number of values. An example will make clear which kind of automaton is under consideration. The sequence of paper folding is defined as follows [10]. One folds a paper tape an infinite number of times and always in the same direction. Then one unfolds the tape and one observes the folds. They can be entering or outgoing and by suitably coding these folds by 0 or 1, one obtains a sequence which starts with 1101100. This sequence is 2-rational because it satisfies the recurrence


| Previous page: | Complexity and recurrences |
| Next page: | Asymptotic behavior |