This paper establishes explicit bounds on how the period of continued fractions of quadratic numbers changes under Möbius transformations, providing sharp bounds with illustrative examples.
Contribution
It introduces new explicit bounds on the continued fraction period after Möbius transformations, enhancing understanding of their effect on quadratic numbers.
Findings
01
Derived explicit upper and lower bounds for continued fraction periods
02
Provided examples demonstrating the bounds are sharp
03
Enhanced theoretical understanding of Möbius transformations on quadratic numbers
Abstract
We study M\"obius transformations (also known as linear fractional transformations) of quadratic numbers. We construct explicit upper and lower bounds on the period of the continued fraction expansion of a transformed number as a function of the period of the continued fraction expansion of the original number. We provide examples that show that the bound is sharp.
Tables1
Table 1. Table 3 : Experimental results on the bound of Theorem 1 . S n ( x ) subscript 𝑆 𝑛 𝑥 S_{n}(x) denotes an experimental lower bound on sup { per ( h M ( x ) ) per ( x ) : M ∈ 𝒟 n } supremum conditional-set per subscript ℎ 𝑀 𝑥 per 𝑥 𝑀 subscript 𝒟 𝑛 \sup\left\{\frac{\operatorname{per}(h_{M}(x))}{\operatorname{per}(x)}\colon M\in\mathcal{D}_{n}{}\right\} .
per(x)={2σ(V)σ(V) if V=V1V1 for some V1∈D1, otherwise.
per(x)={2σ(V)σ(V) if V=V1V1 for some V1∈D1, otherwise.
σ(W)=2⌊2ξ(a,c)⌋+2.
σ(W)=2⌊2ξ(a,c)⌋+2.
LgRhW=(ch+ag(ch+a)+cdh+bg(dh+b)+d).
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Full text
Bounds on the period of the continued fraction after a Möbius transformation
Hanka Řada
Faculty of Nuclear Sciences and Physical Engineering
Czech Technical University in Prague
Czech Republic
Štěpán Starosta
Electronic address: [email protected]
Faculty of Information Technology
Czech Technical University in Prague
Czech Republic
Abstract
We study Möbius transformations (also known as linear fractional transformations) of quadratic numbers.
We construct explicit upper and lower bounds on the period of the continued fraction expansion of a transformed number as a function of the period of the continued fraction expansion of the original number.
We provide examples that show that the bound is sharp.
1 Introduction
Eventually periodic continued fraction expansions correspond exactly to quadratic irrational numbers.
Some general upper bounds on periods of such an expansion, depending on the number itself, are known, see [11, 12].
In some very specific cases, the exact value is known (and so is the expansion), see [3, 14, 1, 2].
We study such periods after a transformation which preserves eventual periodicity of the expansion.
Given a nonsingular matrix N=(acbd)∈Z2,2, we consider the mapping hN:R∖{−cd}→R given by
[TABLE]
Such a mapping is called the Möbius transformation associated with the matrix N, it is also sometimes referred to as a linear fractional transformation.
Given a quadratic irrational number x, the number hN(x) is clearly a quadratic irrational number (in the same field).
Our main result is an upper and lower bound on the period of the continued fraction expansion of hN(x) as a function of the period of the continued fraction expansion of x.
To state the main result, we introduce the following notation and definitions.
We have x=[v,w] with v∈Nℓ and w∈Nk for some ℓ,k∈N,k=0 (overline denotes infinite repetition of w).
If such a sequence w is the shortest possible, we say that it is the repetend of the continued fraction expansion of x (or simply of x).
Let per(x) denote the shortest period of a continued fraction of x, i.e. the length of the repetend of x.
For nonnegative integers a,c not both zero, let ξ(a,c) denote the number of divisions required to compute the gcd(a,c) using the Euclidean algorithm (ending when [math] is reached).
Thus, for instance, ξ(7,0)=ξ(0,7)=0, ξ(7,1)=ξ(1,7)=1, and ξ(13,5)=ξ(5,13)=ξ(5,3)+1=ξ(3,2)+2=ξ(2,1)+3=4.
Our main result are the following bounds on per(hN(x)).
Theorem 1**.**
Let x be a quadratic irrational number, hN a Möbius transformation and n=∣detN∣.
We have
[TABLE]
where
[TABLE]
with Jt={∅{igcd(t,tn):i∈N}for gcd(t,tn)=1,otherwise.
Example 2*.*
Let us give an example for N=(121712).
We have ∣detN∣=7 and S7=24.
For x1=[3], we have per(x1)=1 and per(hN(x1))=6≤S7per(x1)=24.
For x2=[200], we have per(x2)=1 and per(hN(x2))=24≤S7per(x2)=24.
For
[TABLE]
we have per(x3)=24 and per(hN(x3))=1≥S7per(x3)=1
The presented proof of Theorem 1 is based on the famous work of Raney [13] who described transducers which output the continued fraction expansion of hN(x) while inputting the continued fraction expansion of x.
Note that the action of Möbius transformations on a number x has been explored for instance in [7] and [9] where the authors give bounds on the value of partial coefficients of the number x after transformation.
The proof of the main result may be considered somewhat technical.
In Section 2, we first give some necessary notations and recall results of Raney.
A number of additional claims and the proof of Theorem 1 are in Section 3.
The last section contains remarks and experiment results.
2 Preliminaries
2.1 LR representation
For a more detailed description of the computations with continued fractions, we need another representation of positive real numbers.
Before we state it, we introduce the following notation.
An alphabetA is a finite set of symbols.
A word over the alphabet A is a sequence of symbols from this alphabet.
If the sequence is empty, it is the empty word and it is denoted by ε.
The set of all finite words over an alphabet A is denoted by A∗ and the set of all finite and infinite words by AN.
If we have v,w∈AN, then vw denotes the concatenation of the words v and w.
If there exists u∈AN such that w=vu, we say that v is a prefix of w.
Moreover, if w=v, we say that v is a proper prefix of w.
Analogously, if v,w∈AN and there exists u∈A∗ such that w=uv, we say that v is a suffix of w and moreover, if w=v, we say that v is a proper suffix of w.
A word u is primitive if u=vk=k timesvv⋯v implies k=1.
Let x∈R+∖Q with its continued fraction expansion equal to [x0,x1,x2,…].
Its LR representation is the following infinite word over the alphabet {L,R}:
[TABLE]
In what follows, we identify a number x with its LR expansion and simply write x=v.
For example, we have 1+2=[2]=R2L2.
Remark 3*.*
The LR representation is originally connected with the Stern-Brocot tree.
The choice of letters L and R also follows from this connection: the two letters stand for “Left” and “Right” in the tree.
For more information about the relation between the Stern-Brocot tree and continued fractions see for instance [10].
Let V be a finite word.
A run in V is a contiguous subsequence of maximal length which consists of a single letter.
That is, it is the longest repetition of one letter, sometimes also called a tandem array.
The number σ(V) denotes the number of all runs in V.
For instance, we have σ(LLRRRRL)=3.
2.2 Möbius transformation and finite state transducers
In [5], the author introduces an algorithm that calculates the continued fraction of hM(x) using the continued fraction of x.
The general idea of the algorithm is the following: read as many partial coefficients of x so that we are able to decide on the first partial coefficient of hM(x) and output it.
The reading phase is usually called absorption, the writing phase emission.
Then, if needed, continue absorbing the partial coefficients of x and emit the second partial coefficient of hM(x) when possible.
Repeat the whole procedure: if there are no coefficients to absorb, emit the rest of the output.
The details and more results on the algorithm were given later by Raney, in [13].
The main idea of the algorithm is the same but it uses LR representations instead of continued fractions expansions.
In this article, we use the latter approach and work with LR representations since they allow capturing more details of the algorithm.
In what follows, we sum up the needed results of Raney.
We also refer the reader to a more general concept of this idea in [6, Chapter 5], and for refinements of the results for continued fractions in [8].
Since for every positive integer d we have hdM(x)=hM(x), we shall work only with matrices M such that the greatest common divisor of all its elements is 1.
Following [13], we define some special sets of matrices 2×2 having a key role in the computation of Möbius transformations.
Definition 4**.**
For n∈N, n=0 we set
[TABLE]
where gcd(A) denotes the greatest common divisor of all elements of A.
Furthermore, we define the three following subsets of Dn:
[TABLE]
The names of the three above defined sets are abbreviations for “row-balanced”, “column-balanced” and “double-balanced”, respectively.
For all n, the sets RBn, CBn, and DBn are finite.
If n is a prime number, then by Corollary 4.7 of [13], we have #DBn=n.
We study the period of eventually periodic continued fractions and therefore we do not need the prefix of LR representations of the studied numbers, only the tail is important.
In the view of this, the following theorem tells us that we may consider Möbius transformations associated to a matrix from DBn.
Let x be an irrational number, hM a Möbius transformation, gcd(M)=1 and n=∣detM∣.
There exists an algorithm to construct a matrix N∈DBn and a positive irrational number y such that the continued fraction expansion of hN(y) and the continued fraction expansion of hM(x) have the same tail.
In particular, if x is a quadratic irrational number, we have
[TABLE]
A finite state transducer is the quadruple (Q,A,B,δ) where Q is a finite set of states, A is the input alphabet, B is the output alphabet and δ⊆Q×A∗×B∗×Q is the transition relation.
The transitions are also called edges of this transducer.
The first state in the transition relation is the starting state of this edge.
The word v∈A∗ is the input label of this edge.
The word w∈B∗ is the output label of this edge and the second state in the relation is the ending state of this edge.
Raney shows that once the problem is transformed to involve a Möbius transformation of a positive number y with a matrix N∈DBn, there exists a finite state transducer depending on n, denoted Tn, that can be used to determine the LR expansion of hN(y).
Namely, the input word of this transducer is the LR expansion of y, the initial state is given by N, and the output word is the LR expansion of hN(y).
As we are interested only in the repetend of hM(x), which is the same for hN(y), we can focus only on the calculation using the transducer Tn.
Thus, we refrain from giving more details on the last theorem and continue with the description of Tn and its properties.
2.2.1 Matrices L and R
We start by identifying the set of all finite words over {L,R} with the elements of D1.
Let μ:L↦(1101),R↦(1011)
and for all V,W∈{L,R}∗, we have μ(VW)=μ(V)μ(W).
The mapping μ is an isomorphism of {L,R}∗ and D1.
Since μ is an isomorphism, we shall identify the letters L and R with the two matrices, i.e., we shall consider
[TABLE]
In what follows, we often need to deduce some claims from matrix equations and these equations include mainly the matrices L, R and their inverses.
We give the two following lemmas to be used in these cases.
Lemma 7**.**
Let i,j∈Z.
We have
[TABLE]
Proof.
The first two equalities may be verified by direct computation.
The last equality follows from the combination of (2) and (1) as follows:
[TABLE]
Lemma 8**.**
If W∈D1,
then
[TABLE]
Proof.
Let
[TABLE]
for some k≥0 and is,js≥0 for all s∈{0,…,k}.
We have
[TABLE]
[TABLE]
Using k times (3) on the right side of the last equality, we obtain
there exists a unique non-empty word W∈{L,R}∗ and N∈DBn such that
[TABLE]
Theorem 5.1 in [13] does not say that the word W is unique, however this property follows directly from the equation W=MVN−1.
We have used some statements of [13] about the sets Dn which are in [13] defined without the condition that gcd(A)=1.
The validity of these statements for our definition of Dn follows from Corollary 8.4 in [13].
Based on the last theorem, we may now construct the transducer Tn.
The definition of Tn is as follows:
the set of states of Tn equals DBn;
2. 2.
the set of transitions between states is given by Theorem 9: there is a transition from M to N if MV=WN for some V,W∈D1 with MV∈RBn and MV1∈RBn for every proper prefix V1 of V. The input word of the transition is V, the output word is W.
To ease our notation, the transition from M to N with input V and output W is denoted by
[TABLE]
Let M and N be two states of Tn such that there is a sequence of transitions starting at M and ending at N in Tn with concatenation of respective input words V and output words W. We write
[TABLE]
We call this sequence a walk.
Concatenating the matrix relations of all transition in the walk we obtain the relation MV=WN.
To ease the notation we also allow V to be the empty word, which implies that W is also empty and M=N.
If we do not need to know the concrete input or output word, we write ∙ on its position.
Given a walk M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WN, we shall write for instance
[TABLE]
to specify some decomposition of the walk. If a walk repeats, we shall also write for instance
[TABLE]
In what follows, let An=(n001),An=(100n).
We have An,An∈DBn for all n and for n=2, we have DB2={A,A}.
See Figure 1 which depicts T2 and Table 1 showing the transition labels of T3.
2.2.3 Symmetries of the transducer Tn
The transducer Tn possesses some symmetries that we shall use later.
Let M=(acbd).
The matrix Massociated toM is given by
[TABLE]
Clearly, for all matrices M and N, we have MN=MN.
Note that since we identified the letters L and R with matrices and due to Proposition 6, this operation is also defined for any word over {L,R}.
The following simple identities are given in [13, Theorem 7.1] for M∈D1, i.e., words over {L,R}:
[TABLE]
where i0,i1,…,iℓ are nonnegative integers.
These properties imply a symmetry of Tn in the sense of the following claim.
Proposition 10**.**
If the transition MV∣WN exists, then the transitions MV∣WN and NTWT∣VTNT exist.
2.2.4 Relation between repetends and runs
The following lemma, exhibiting the relation between the number of runs in the repetend of the LR representation of x and the period of its continued fraction, is a direct corollary of the definition of LR representation.
Lemma 11**.**
Let V be such a repetend of x whose first and last letter are different.
We have
[TABLE]
To work with the matrix representation of words, we shall need the connection between the number of runs in some word over {L,R} and its matrix representation.
Lemma 12**.**
Let W=LW′R,W=(acbd) and W,W′∈D1. We have
[TABLE]
Proof.
Let f,e be positive integers such that W=W1LeRf for some W∈D1.
We shall proceed by induction on σ(W).
For σ(W)=2, we have W=LeRf=(1efef+1) and since ξ(1,e)=1 the claim holds.
Assume now the claim holds for σ(W)=k.
Note that for W=(acbd), as W starts with L and ends with R, we have c>a≥1 or c=a=1.
Let g,h be positive integers.
We have σ(LgRhW)=k+2 and we have
[TABLE]
If c>a, then ξ(ch+a,g(ch+a)+c)=ξ(a,c)+2 and the claim follows.
If c=a=1, then in fact W=LRf, ξ(h+1,g(h+1)+1)=2 and σ(LgRhLRf)=4=2⌊2ξ(h+1,g(h+1)+1)⌋+2.
∎
Example 13*.*
The word W=L2RLR3 is of the form from the above lemma and we have W=(25718).
Therefore, 2⌊2ξ(a,c)⌋+2=2⌊2ξ(2,5)⌋+2=2⌊22⌋+2=4=σ(W).
2.3 Properties of the transducer Tn
In what follows, we suppose that n is a fixed integer.
2.3.1 Input and output words of the edges in the transducer Tn
First, we investigate the input words on outgoing edges from some state of the transducer Tn.
Lemma 14**.**
If X∈RBn,
then XL∈RBn or XR∈RBn.
Proof.
Let X=(acbd)∈RBn.
Therefore, a>c, d>b and XL=(a+bc+dbd),XR=(aca+bc+d).
We have a+b≥c+d and then XR∈RBn, or a+b≤c+d and then XL∈RBn.
∎
A simple consequence of Theorem 9 is that the set of all input word of an outgoing edge of a state of Tn is a prefix code (no element is a prefix of another).
The last lemma implies that the lengths of these input words are 1,2,…,ℓ−1,ℓ,ℓ for some ℓ.
Example 15*.*
All transitions in the transducer T14 are given in Table 2.
[FIGURE:]
The following lemma shows that there is no edge with input label having suffix Rn+1 or Ln+1
Lemma 16**.**
Let Q∈{L,R}.
Let X∈RBn and let i be the minimal positive integer such that XQi∈RBn.
We have i≤n.
Proof.
Let Q=L and let X=(acbd)∈RBn.
We have
[TABLE]
Assume i is minimal such that XLi∈RBn. Therefore, XLi−1∈RBn.
Since d>b, we have a+b(i−1)>c+d(i−1), which implies
[TABLE]
Using a=dn+bc, we obtain
[TABLE]
The proof for Q=R is analogous.
∎
The next lemma shows a simple link of input and output words.
Let MVQ1∣Q2WN with Q1,Q2∈{L,R}.
We have Q1=Q2.
2.3.2 Sets LSn and RSn
In what follows, we show that an important role is played by input words with long runs of the same letter.
We now introduce two sets of matrices that are always visited when reading such input words.
Definition 18**.**
Let LSn respectively RSn denote the subset of DBn such that X∈LSn respectively X∈RSn if there exists a walk X\ext@arrow9999\arrowfill@\relbar\relbar↠LiLjX respectively X\ext@arrow9999\arrowfill@\relbar\relbar↠RiRjX for some i,j>0.
The names of the sets LSn and RSn are abbreviations for “L-special” and “R-special”.
For example, we have An∈LSn since AnLn∣LAn and An∈RSn since AnR∣RnAn.
The above definition says that the matrices in set LSn (RSn) can be visited several times while reading the same run of letters.
Moreover, the following lemma shows that these matrices are the only ones with such a property.
Lemma 19**.**
Let M=(acbd)∈DBn and i>0.
We have
[TABLE]
for some W∈D1 if and only if M∈LSn (i.e., W=Lj).
Moreover, the minimal value of such integer i equals min{k>0:akd∈N} and is less than or equal to n.
Proof.
The walk M\ext@arrow9999\arrowfill@\relbar\relbar↠LiWM exists if and only if W∈D1.
We have
[TABLE]
As bc−adb2i=−nb2i≤0 we have bc−adb2i∈N⟺b=0.
Thus
[TABLE]
and we conclude that W∈D1 if and only if b=0 and aid∈N.
In other words, W=Laid, which is by definition if and only if M∈LSn.
Let i has the minimal possible value, i.e., i=min{k>0:akd∈N}.
Since n=ad, we have i≤a≤n.
∎
Example 20*.*
In the transducer T14, we have M\ext@arrow9999\arrowfill@\relbar\relbar↠L7WM where M=(7002) and W=L2.
Since M\ext@arrow9999\arrowfill@\relbar\relbar↠L7L2M=ML4∣LNL3∣LM where N=(7102), the minimal i such that M\ext@arrow9999\arrowfill@\relbar\relbar↠LiWM is i=7.
This is also the minimal positive integer such that aid=72i∈N.
The following characteristic property of the matrices in the set LSn follows from the proof of the last lemma.
Corollary 21**.**
Let M=(acbd)∈DBn.
We have M∈LSn if and only if b=0.
Example 22*.*
We have already seen that the matrices (7002),(7102)∈LS14 and that An∈LSn, which corresponds with the fact that these matrices have the element on position 1,2 equal to 0. Moreover, by the symmetric version of this corollary, we have M∈RSn if and only if c=0, which corresponds with An∈RSn.
According to this condition, we can also see that (7002)∈RSn. Indeed, we have (7002)\ext@arrow9999\arrowfill@\relbar\relbar↠R2R7(7002).
The last lemma and corollary imply the following statement.
Corollary 23**.**
For M∈LSn there exists s>0 such that M\ext@arrow9999\arrowfill@\relbar\relbar↠Ln∣LsM.
Example 24*.*
As already mentioned, we have M\ext@arrow9999\arrowfill@\relbar\relbar↠L7L2M where M=(7002)∈LS14.
The last corollary shows that we have also M\ext@arrow9999\arrowfill@\relbar\relbar↠L14L4M=(M\ext@arrow9999\arrowfill@\relbar\relbar↠L7L2M)2.
As stated above, we have M\ext@arrow9999\arrowfill@\relbar\relbar↠L7L2M=ML4∣LNL3∣LM where N=(7102).
This means that there is a connection between the matrices (7002) and (7102)∈LS14.
The classes of matrices in LSn with this connection are described in the following lemma.
Lemma 25**.**
Let M,N∈LSn, M=(ac0d) and N=(a′c′0d′).
We have
[TABLE]
Proof.
Let M\ext@arrow9999\arrowfill@\relbar\relbar↠LiWN for some i>0 and W∈D1.
Lemma 19 implies that we may take W=Lj for some j>0 and i≤n.
We have
[TABLE]
Since we have id−ja=kgcd(a,d) for some k∈Z, the first implication is proven.
Assume now a′=a,d′=d,c′=c+kgcd(a,d).
The case c=c′ is trivial.
For c=c′ we find i′,j′ with i′j′<0 such that kgcd(a,d)=i′d+j′a.
It implies MLi′=L−j′N.
If j′<0, we are finished.
If j′>0, we multiply by Lrn from the right to obtain
[TABLE]
where s is the positive integer such that N\ext@arrow9999\arrowfill@\relbar\relbar↠Ln∣LsN.
A choice of r such that −j′+rs>0 implies M\ext@arrow9999\arrowfill@\relbar\relbar↠Li′+rnL−j′+rsN.
∎
The existence of a walk M\ext@arrow9999\arrowfill@\relbar\relbar↠LiWN is in fact an equivalence relation between M and N.
For each class of this equivalence, we pick a suitable representative in the following definition.
Definition 26**.**
Let LEn(REn) denote the subset of LSn(RSn) such that M=(ac0d)∈LEn(N=(a0bd)∈REn) if and only if c<gcd(a,d)(b<gcd(a,d)).
The names LEn and REn are abbreviations for “L-exceptional” and “R-exceptional”.
For instance, (7002)∈LE14 and (7102)∈LE14 because gcd(a,d)=1.
Combining this definition with the last lemma, we immediately obtain the following corollary which says that the suitable representative is unique.
Corollary 27**.**
Let M∈LSn.
There is exactly one N∈LEn such that M\ext@arrow9999\arrowfill@\relbar\relbar↠LiWN exists for some i≥0 and W∈D1.
Proof.
Let M=(ac0d).
Lemma 25 implies that the walk M\ext@arrow9999\arrowfill@\relbar\relbar↠LiWN′ exists if and only if N′=(ac′0d) and c′≡c(modgcd(a,d)).
As there is exactly one such c′<gcd(a,d), the claim follows from Definition 26.
∎
For each state M∈LEn, we shall need to know the least number i such that we can get from M to M by reading Li as an input word.
Definition 28**.**
For M∈LEn we set
[TABLE]
For M∈REn, we define νR(M) analogously:
[TABLE]
Example 29*.*
For the state M=(7002)∈LE14, we have νL(M)=7.
Moreover, we have M∈RE14 and νR(M)=2.
The purpose of the definition of the sets LEn and REn is in the following lemma.
Lemma 30**.**
Let Q∈DBn.
There exists exactly one matrix Z∈LEn such that Q\ext@arrow9999\arrowfill@\relbar\relbar↠LkWZ for some k≥0 and W∈D1.
Moreover, the integer k can be chosen such that k≤n.
Proof.
Lemma 19 and #DBn<+∞ imply that there exist j≥0, M∈LSn and W1∈D1 such that Q\ext@arrow9999\arrowfill@\relbar\relbar↠LjW1M.
Let j be the least possible.
Such M is unique (depending on Q only).
Corollary 27 implies that there is exactly one Z∈LEn such that M\ext@arrow9999\arrowfill@\relbar\relbar↠Lj′W2Z for some j′∈N and W2∈D1.
It follows that Q\ext@arrow9999\arrowfill@\relbar\relbar↠Lj+j′W1W2Z.
The uniqueness of Z follows from the uniqueness of M and the uniqueness of Z by Corollary 27.
To prove the second part, we suppose that the walk Q\ext@arrow9999\arrowfill@\relbar\relbar↠Lk′W′Z exists for some k′∈N and W′∈D1.
Let Q=(acbd) and Z=(a′c′0d′). It implies that
[TABLE]
Set k such that k≡k′(modn) and k∈{1,…,n}.
Since a′d′bd′k′−bc′+ad′ and a′d′dd′k′−c′d+cd′ are both integers, a′d′=n, and d′>c′, we have that a′d′bd′k−bc′+ad′ and a′d′dd′k−c′d+cd′ are positive integers.
Therefore, W=QLkZ−1 is a matrix of nonnegative integer elements.
We verify by direct calculation that det(W)=1, and thus W∈D1 and the walk Q\ext@arrow9999\arrowfill@\relbar\relbar↠LkWZ exists.
∎
The last lemma says that if we start in an arbitrary state of the transducer Tn and we read a long enough run of L’s (at most of length n) of the input word, we end in some state from LEn.
Moreover, if we continue to read only the letters L, we can attain only the states from LSn as follows from Lemma 19, and, in particular, we have to return to the same state from LEn (Corollary 27).
Example 31*.*
If we take Q=(4124)∈DB14, we have Q\ext@arrow9999\arrowfill@\relbar\relbar↠L5LRLM where M=(7002)∈LEn and if we continue to read only L’s, we go through the walk M\ext@arrow9999\arrowfill@\relbar\relbar↠L7L2M=ML4∣LNL3∣LM where N=(7102)∈LSn. Similarly, we have Q\ext@arrow9999\arrowfill@\relbar\relbar↠R10R3LA14 where A14=(10014)∈REn and if we continue to read only R’s, we go through the edge A14R14∣RA14.
3 Construction of the bound Sn
In the previous section, we have defined the transducer Tn and stated its important properties that are used in the construction of the upper bound Sn of Theorem 1.
This section is dedicated to the construction of this bound.
3.1 Maximalisation of the prolongation
We define the mapping κ:D1→D1 which shall be used to modify the runs of a word such that their length is within a suitable interval.
For W=Z0i0Z1i1⋯Zkik∈D1 with iℓ nonzero, Zℓ∈{L,R}, and Zℓ=Zℓ+1
we set
[TABLE]
where iℓ′≡iℓ(modn) and iℓ′∈{4n,4n+1,…,5n−1} for all ℓ∈{0,…,k}.
For instance, if n=10, we have
[TABLE]
First, we show why we do not need runs longer than 5n−1.
Lemma 32**.**
Let M\ext@arrow9999\arrowfill@\relbar\relbar↠V1LmV2∣WN.
If m≥4n,
then M\ext@arrow9999\arrowfill@\relbar\relbar↠V1Lm−nV2∣W′N, σ(W′)=σ(W), and W′ starts with the same letter as W.
Proof.
Lemma 16 implies that there exists an integer t with 0<t≤n and Q∈DBn such that
[TABLE]
for some W1∈D1.
By Lemma 30, there exists an integer k with k≤n and Z∈LEn such that
[TABLE]
for some W2∈D1.
As Z∈LEn⊆LSn we have
[TABLE]
for some positive integer s.
Let q and p be the integers such that p=(m−t−k)modn,p<n and m−t−k=qn+p.
Since m≥4n≥2n+k+t, we have q≥2 and there exists the walk
[TABLE]
and W=W1W2LqsW3.
As q≥2 implies that the walk Z\ext@arrow9999\arrowfill@\relbar\relbar↠Ln∣LsZ is used at least twice while reading V1LmV2,
we conclude that while reading V1Lm−nV2, we take this walk one less time, but at least once.
Thus, we have
[TABLE]
and σ(W)=σ(W1W2LqsW3)=σ(W1W2L(q−1)sW3).
∎
Similarly, we show that we shall not need the input words with runs shorter than 4n.
We start with a lemma.
Lemma 33**.**
Let MVLiRj∣WN with i≥0, j≥1, V∈D1, and M,N∈DBn.
There exist Q∈DBn, W1,W′∈D1 and an integer t with 0<t≤n such that for all r≥3
[TABLE]
with σ(W′)>σ(W). Moreover, the word W′ has suffix R−1W.
Proof.
The first part of the proof is very similar to the previous proof.
By Lemma 16, there exists an integer t with 0<t≤n and Q∈DBn such that
[TABLE]
for some W1∈D1.
By Lemma 30, there exists an integer k with k≤n and Z∈LEn such that
[TABLE]
for some W2∈D1.
Let r be an integer such that rn≥t+k.
Let W3(r) be the matrix given by
[TABLE]
We now show that W3(r)∈D1.
Notice that this is equivalent to the existence of the following walk: Z\ext@arrow9999\arrowfill@\relbar\relbar↠Lrn−t−kRjW3(r)N.
To show W3(r)∈D1, we first find N−1 using MVLiRj∣WN as follows
[TABLE]
By (5) and (6), we have MVLi+t+k=W1W2Z, therefore
[TABLE]
Since Z∈LEn⊆LSn, we have by Corollary 23 that Z\ext@arrow9999\arrowfill@\relbar\relbar↠Ln∣LsZ for some positive integer s.
We combine this fact with (7) and obtain
Indeed, since for r≥3 we have rn>2n≥t+k, W3(r)∈D1 implies Z\ext@arrow9999\arrowfill@\relbar\relbar↠Lrn−t−kRjW3(r)N.
Let rn−t−k=q(r)n+p with 0≤p<n, i.e., p=(−t−k)modn.
Since Z\ext@arrow9999\arrowfill@\relbar\relbar↠Ln∣LsZ, it implies that the walk Z\ext@arrow9999\arrowfill@\relbar\relbar↠LpRjL−q(r)sW3(r)N exists and L−q(r)sW3(r)∈D1.
As 2n≥t+k, using (10), we find W3(2)=Lq(2)s−q(r)sW3(r).
Since 0≤q(2)<q(r), we have W3(2)=Lq(2)s−q(r)sW3(r)∈D1.
Moreover, we have q(3)−q(2)=1.
Therefore W3(3)=LsW3(2)∈D1 and Ls is a prefix of W3(3), and thus (11) holds.
We have the two following cases:
Assume that W1W2 does not contain R.
We may choose the integer r large enough so that Lrs(W1W2)−1∈D1, and thus W3(r)∈D1 and W is suffix of W3(r). Because W has by Lemma 17 prefix R, then also R−1W is a suffix of W3(r) and therefore also of W′.
By (11), we have W3(3)∈D1 and Ls is its prefix.
As R is a prefix of W, we conclude σ(W3(3))=σ(W)+1.
Since W′=W2W3(3), we conclude σ(W′)>σ(W).
2. 2.
Assume that W1W2 contains R, i.e., RLh is its suffix for some h≥0.
Since by Lemma 17 the word W1 starts with L, we may write W1W2=LW4RLh for some W4∈D1.
Using Lemma 8, we conclude that L(LW4R)−1R∈D1.
We choose r such that rs−1≥h.
As W starts with R we have R−1W∈D1.
We conclude that
[TABLE]
and R−1W is a suffix of W3(r) and therefore also of W′.
Therefore, by (11), W3(3)∈D1 and it starts with Ls.
By Lemma 8, the word L(LW4R)−1R starts with R.
It implies that σ(Lrs(W1W2)−1R)≥2 and moreover, if Lrs(W1W2)−1R ends with L, then σ(Lrs(W1W2)−1R)≥3.
Together with the facts that if R−1W starts with R, then σ(R−1W)=σ(W) and σ(R−1W)=σ(W)−1 otherwise, we conclude σ(W3(3))>σ(W).
Since W′=W2W3(3), we have σ(W′)>σ(W).
The proof for r=3 is complete.
The general case r≥3 follows from the existence of the walk Z\ext@arrow9999\arrowfill@\relbar\relbar↠Ln∣LsZ.
∎
Example 34*.*
For instance, for the edge ML2R∣RL4N, where M=(6223) and N=(2017) in the transducer T14, we have ML4∣LR2A14L14∣LA14 and A14L12R∣RL6N with A14=(14001). Therefore, using the notation from the last lemma, we have i=2,j=1, t=2 and there is a walk A14\ext@arrow9999\arrowfill@\relbar\relbar↠Lrn−2RLr−1RL6M.
It means that W=RL4 and W′=Lr−1RL6 and so for all r≥3, σ(W′)=3>2=σ(W) and moreover, R−1W=L4 is a suffix of W′.
Corollary 35**.**
Let MVRj∣WN with j>0. If V is empty, then the walk
(a)
M\ext@arrow9999\arrowfill@\relbar\relbar↠L4nRjWN* with σ(W)>σ(W)*
exists.
If V ends in L, then the walks
M\ext@arrow9999\arrowfill@\relbar\relbar↠κ(V)RjWN* with σ(W)>σ(W),*
2. 3.
M\ext@arrow9999\arrowfill@\relbar\relbar↠L4nκ(V)RjWLN* with σ(WL)>σ(W), and*
3. 4.
M\ext@arrow9999\arrowfill@\relbar\relbar↠R4nκ(V)RjWRN* with σ(WR)>σ(W)*
exist.
Proof.
We shall prove the existence of the walk a directly and existence of the other walks by induction on σ(V).
Assume that V=Li with i≥0, i.e., σ(V)≤1.
Using Lemma 33 with r=4, we obtain
[TABLE]
with σ(W′)>σ(W) for some Q∈DBn, W1,W′∈D1 and an integer t with 0<t≤n.
Therefore, the walk M\ext@arrow9999\arrowfill@\relbar\relbar↠Li+4nRjW1W′N exists.
Applying Lemma 32 the correct number of times, we obtain M\ext@arrow9999\arrowfill@\relbar\relbar↠κ(Li)RjWN with σ(W)=σ(W1W′)≥σ(W′)>σ(W).
This proves existence of a and 2 for σ(V)=1.
Using the symmetric version of Lemma 33 (using the symmetry of L and R given by Proposition 10) on MLi+t∣W1Q, we obtain that the walk
[TABLE]
exists.
Therefore, M\ext@arrow9999\arrowfill@\relbar\relbar↠R4nL4n+iRjW2W′N exists.
Considering again Lemma 32, we prove 4.
To show the existence of 3, we proceed as in the case of the walk 2 except for using Lemma 33 with r=8 and factoring L4n in the input word of the obtained walk.
By Proposition 10, the symmetric version of the claim for σ(V)≤1 holds.
Assume now the claim and its symmetric version hold for σ(V′)=k and let V=V′Li with σ(V′Li)=k+1.
We apply Lemma 33 on MV′LiRj∣WN: there exist Q∈DBn, W1,W′∈D1 and an integer t with 0<t≤n such that
[TABLE]
with σ(W′)>σ(W).
By the induction hypothesis and the symmetry of L and R (Proposition 10) on MV′Li+t∣W1Q, we obtain M\ext@arrow9999\arrowfill@\relbar\relbar↠Xκ(V′)Li+tW1′Q with σ(W1′)>σ(W1) and X being empty, Ln, or Rn.
The situation is illustrated in Figure 2.
Therefore,
[TABLE]
Using Lemma 32, we obtain M\ext@arrow9999\arrowfill@\relbar\relbar↠Xκ(V′Li)RjWN with σ(W)=σ(W1′W′)≥σ(W′)>σ(W).
∎
Remark 36*.*
In fact, the mapping κ could be defined such that it adjusts the length of each run between 3n and (4n−1) and we could prove the same bound in Theorem 1.
Our experiments show that it might also be sufficient to adjust the length of all runs between 2n and (3n−1).
However, we use the given definition of κ since it simplifies the proofs without changing the result.
The following lemma describes the paths in the transducer Tn that are taken when the greatest prolongation occurs.
Lemma 37**.**
Let M=(t1u10m1)∈LEn and i∈{νL(M),νL(M)+1,…,2νL(M)−1}.
(1)
There exist one and only one matrix NL,M,i∈REn such that M\ext@arrow9999\arrowfill@\relbar\relbar↠LiRjWNL,M,i for some j∈N and W∈D1.
Moreover, there is exactly one jL,M,i∈{3n−νR(N)+1,3n−νR(N)+2,…,3n} such that the walk from M to NL,M,i with the input word LiRjL,M,i and an output word WL,M,i exists.
NL,M,i,jL,M,i and WL,M,i depend only on M and i.
2. (2)
The word WL,M,i starts with L, ends with R and satisfies
[TABLE]
where ξL,M,i=ξ(im1+u1,t1).
Proof.
Assume that we are on a walk which starts in M, we input Li, and we start inputting a run of R’s.
Lemmas 16 and 30 imply that after inputting at most 2nR’s we reach a state N∈REn.
Moreover, the matrix N is unique and depends only on M and i (and the fact that the walk started by reading L’s).
By Definition 28, there is exactly one j∈{3n−νR(N)+1,3n−νR(N)+2,…,3n} such that M\ext@arrow9999\arrowfill@\relbar\relbar↠LiRjWN, depending only on M and i.
Therefore, there is also exactly one word W, and it depends only on M and i, which concludes the proof of Item 1.
Let NL,M,i=(t20u2m2).
We have
[TABLE]
for some e,f∈N.
Using WL,M,i∈D1, we conclude that t2im1+u1,t2t1∈N and gcd(t2im1+u1,t2t1)=1.
Therefore, t2=gcd((im1+u1),t1).
As i≥νL(M), the walk M\ext@arrow9999\arrowfill@\relbar\relbar↠LiRjL,M,iWL,M,iNL,M,i starts with the walk M\ext@arrow9999\arrowfill@\relbar\relbar↠Lν∣LtM with ν=νL(M) and some t>0, and the walk ends with the walk N\ext@arrow9999\arrowfill@\relbar\relbar↠Rn∣RsN.
Thus, the output word of the first walk is a power of L, and L is the first letter of WL,M,i and the output word of the last walk is a power of R, and R is the last letter of WL,M,i.
By Lemma 12, σ(WL,M,i)=2⌊2ξ(t2im1+u1,t2t1)⌋+2.
By definition of ξ, we have ξ(t2im1+u1,t2t1)=ξ(im1+u1,t1)=ξL,M,i.
∎
In what follows, the notation introduced by the last claim is used.
We also use the symmetric version of this notation in the following sense.
The symmetric version of Lemma 37 holds, and given M∈REn and i∈{νR(M),νR(M)+1,…,2νR(M)−1}, we find NR,M,i∈LEn, jR,M,i∈{3n−νL(NR,M,i)+1,3n−νL(NR,M,i)+2,…,3n} and WR,M,i∈D1.
The L, resp. R, in the subscript is needed for the case M∈LSn∩RSn=∅.
In general, we may have jL,M,i=jR,M,i.
Similarly, we also use the notation ξR,M,i.
3.2 Closed walks
In this section, we return to the computation of the given Möbius transformation for a periodic input word.
Clearly, the computation in the transducer Tn ends in a repeating loop, i.e., we end up with some closed walk M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM.
We start with a general lemma that deals with the case when this closed walk is symmetric in the following sense.
If the closed walk M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM can be decomposed into two parts where the first part is M\ext@arrow9999\arrowfill@\relbar\relbar↠V1∣W1M and the second part is M\ext@arrow9999\arrowfill@\relbar\relbar↠V1W2M, then we say that the closed walk is symmetric.
Note that this implies that V=V1V1, and by Proposition 10 it also implies W2=W1, which is stated as the following lemma.
Lemma 38**.**
If M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM is a symmetric closed walk, then W=W0W0 for some W0.
Note that symmetricity of the closed walk M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM is not equivalent to V=V1V1 and W=W1W1.
We introduce the following notation, which is due to the fact that we shall require to change the starting vertex of a closed walk.
Let V∈{L,R}∗.
We set τ(V) to be the set of all conjugate words of V.
A word W is conjugate to a word V if V=V1V2 and W=V2V1, i.e., V is cyclic shift of W.
Furthermore, we set
[TABLE]
i.e., except for the case σ(V)=1, the mapping σc counts the number of runs of a conjugate word of V which starts and ends in a distinct letter, that is σc(V)=2⌊2σ(V)⌋.
Note that if σ(V)≥σ(W), then σc(V)≥σc(W).
Let W∈D1 be non-empty. We set
[TABLE]
The mapping τκ defines the transformation of the input word which yields the upper bound in Theorem 1.
The following theorem expresses its key role.
Theorem 39**.**
Let M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM.
There exists V∈τκ(V) such that M\ext@arrow9999\arrowfill@\relbar\relbar↠VWM for some M∈DBn with σc(W)≥σc(W).
Moreover,
(a)
if V=V1m1 for some V1,m1≥2 and M\ext@arrow9999\arrowfill@\relbar\relbar↠VWM=(M\ext@arrow9999\arrowfill@\relbar\relbar↠V1W1M)m1 where W1m1=W and V1m1=V, then M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM=(M\ext@arrow9999\arrowfill@\relbar\relbar↠V2∣W2M)m2 for some m2≥2 and W2m2=W and V2m2=V;
2. (b)
if V=V1V1 for some V1 and M\ext@arrow9999\arrowfill@\relbar\relbar↠VWM is symmetric, then M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM is symmetric.
Several technical lemmas concerning possible forms of edges in the transducer Tn follow.
These lemmas are used for the proof of Theorem 39 given at the end of this subsection.
which means that W has prefix LR. Let i≥1 be maximal possible such that W has prefix LRi. We have
[TABLE]
[TABLE]
and therefore
[TABLE]
Therefore,
[TABLE]
[TABLE]
and finally W=LRi.
To prove the last item of the lemma, let M=(acbd).
We have
[TABLE]
for all k<ℓ, which means that a+kb>c+kd and in particular
[TABLE]
By Lemma 17, we know that W has prefix L.
We first investigate the case in which L2 is not a prefix of W. We take s≥0 maximal possible such that LRs is a prefix of W. If s=0, we have W=L and the claim holds. In the case s≥1, we have
[TABLE]
for all j≤s.
Therefore, (j+1)b−jd≥0 and specially for j=1 (s≥1)
[TABLE]
and for j=s
[TABLE]
It follows that
[TABLE]
[TABLE]
[TABLE]
Therefore, we have
[TABLE]
and therefore the word W cannot have prefix LRsL.
Thus, W=LRs.
Now, we investigate if W can have prefix L2.
We have
[TABLE]
and for ℓ≥2 we have
[TABLE]
and therefore W cannot have the prefix L2.
It remains to deal with the case ℓ=1 and W has prefix Lt for some t≥2 maximal possible. We have
[TABLE]
Therefore, we have
[TABLE]
Further,
[TABLE]
where we have used t≥2.
Therefore, W cannot have prefix LtR, which means W=Lt.
∎
Corollary 41**.**
Let MV∣WP with M,P∈DBn, V,W∈D1.
If W=LjRW for some W∈D1 and j≥2, then
[TABLE]
2. 2.
If W=Lℓ and ℓ≥1, then
[TABLE]
where s≥0,t≥2. Moreover, if V=Lt, then ℓ=1.
Proof.
The two claims follow directly from Items 1 and 3 of Lemma 40 and Proposition 10, namely the fact that MV∣WP implies PTWT∣VTMT.
∎
Lemma 42**.**
Every closed walk in the transducer Tn either includes at least one edge with a nonempty input which cannot be written as LqR or Rq for some q≥1 or the input word of this walk is Rr for some r≥1.
Proof.
Let M=(acbd), N=(egfh) and MLqR∣WN. By Lemma 17, W has prefix R. By direct computation, we obtain
[TABLE]
and therefore
[TABLE]
where the last inequality follows from M∈DBn which implies b<d.
Similarly for the transition MRq∣WN, we obtain using Item 3 of Lemma 40 that either W=RLs for some s≥0, or W=Rt for t≥2 and q=1. By direct computation, we obtain
[TABLE]
in the first case and
[TABLE]
in the second case.
This means that the number in the first row and first column of the state matrix after taking the edge with the input word Rq is either the same or it is lessened, and after taking the edge with the input word LqR it is always lessened.
∎
Lemma 43**.**
Let NLℓ∣LRsP, where N,P∈DBn, N=(acbd), ℓ≥1 and s≥ℓ+1. We have:
[TABLE]
Proof.
Let P=(egfh). By direct computation, we obtain
[TABLE]
Therefore,
[TABLE]
and we have
[TABLE]
where the last inequality holds because s≥ℓ+1. It follows that 2b>a.
∎
Lemma 44**.**
Let MV∣WN, where N,M∈DBn, N=(acbd), V,W∈D1, V has suffix L and a≤2b. We have:
[TABLE]
where p≥1.
Proof.
By Lemma 17, we know that since V has suffix L, the word W has prefix L. We have by Lemma 40 that W=LRk for some k≥1 or W=Ls for some s≥1 or V=RpL for some p≥1.
In the third case the claim holds. The other two possibilities are discussed separately.
W=LRk for some k≥1.
According to Proposition 10, there exists the edge NTWT∣VTMT. The starting vertex of this edge is NT=(abcd) and the input word is WT=LkR. Using Theorem 9 we can determine the output word of this edge (the word VT). We already know that the word VT has prefix R.
We have
[TABLE]
Moreover, because a≤2b and c<d, we have
[TABLE]
which means that VT has prefix RL.
Let p≥1 be maximal possible such that VT has prefix RLp. We have
[TABLE]
and therefore
[TABLE]
Moreover,
[TABLE]
[TABLE]
[TABLE]
where the last inequality follows from a≤2b. Therefore, VT=RLp.
2. 2.
W=Ls for some s≥1.
Because the input word has suffix L we know by Lemma 40 that V=RpL for some p≥1 or V=Lt for some t≥1.
Now, we suppose for contradiction that the second case holds. We have M=WNV−1=LsNL−t=(a−tbs(a−tb)+c−tdbsb+d). Moreover M∈DBn and therefore
[TABLE]
which is a contradiction.
∎
A few lemmas, which are used in the proof of Proposition 51, follow.
Lemma 45**.**
Let
[TABLE]
where P1,P2,M∈DBn, V1,V2∈D1 and neither of them has suffix L, k1,k2≥1,j1,j2≥0 and j2>j1.
Then k2≤k1.
Proof.
We put M=(acbd). Then
[TABLE]
As V1 does not have suffix L, we have
[TABLE]
[TABLE]
(The case (P1V1)2,1=(P1V1)2,2∧(P1V1)1,1=(P1V1)1,2 is not possible, because det(P1V1)=n>0).
Further, we have
[TABLE]
Let now suppose for contradiction that k2>k1. We have
[TABLE]
[TABLE]
[TABLE]
which is a contradiction.
∎
Lemma 46**.**
Let P1,M∈DBn, ℓ≥2 and in the transducer Tn be the edge
[TABLE]
Then every other incoming edge of the state M with the input word which has suffix L is of the form
[TABLE]
for some P2∈DBn,W∈D1 and m≥1.
Proof.
Let P2V∣WM where V∈D1 and has suffix L, be some other incoming edge of the state M. By Lemma 17, W has prefix L. By Proposition 10, we know that the edges P1L∣LℓM, P2V∣WM exist if and only if the edges MTRℓ∣RP1T and MTWT∣VTP2T exist.
Because ℓ≥2, we know according to Lemma 14 that MT has an outgoing edge with the input word L.
Further, by Theorem 9, we obtain that every outgoing edge of the state MT, which is not equal to MTRℓ∣RP1T and has input word with suffix R, has at least three runs.
Therefore, either WT=WLRj1 or WT=WRLj2R for some j1≥2,j2≥1 and W∈D1. It means in the first case by the symmetric version of Item 1 of Lemma 40 and in the second case by the symmetric version of Item 2 of Lemma 40 that VT=RLm for some m≥1.
Therefore, P2V∣WM=P2RmL∣WM for some m≥1.
∎
Lemma 47**.**
Let PLm∣WM, where m≥1, and P=(acbd),M=(egfh)∈DBn. We have:
If W=Lℓ for some ℓ≥1, then b=f and a=e−mf and if f=0, then ba<fe.
2. 2.
If W=LRℓ for some ℓ≥1, then b=f+ℓh>f≥0, a=e+ℓg−m(f+ℓh)<e−mf and if f=0, then ba<fe.
Proof.
In the first case, we obtain by direct computation that b=f, a=e−mf. Because M∈DBn, we have f≥0 and therefore a≤e. Moreover, if f=0, we have ba<fe.
We continue with the proof of the second case.
By direct computation, we obtain b=f+ℓh and a=e+ℓg−m(f+ℓh). Because M∈DBn, we have h>f≥0 and g<h.
So e+ℓg−m(f+ℓh)=e−mf+ℓ(g−h)m<e−mf and f+ℓh>f≥0. Therefore, a<e and b>f, which for f=0 means that ba<fe.
∎
Lemma 48**.**
Let
[TABLE]
where P1=(e1g1f1h1),P2=(e2g2f2h2),M=(acbd)∈DBn, k1,k2≥1,j1,j2≥0 and j2>j1.
Then e2−(k1−k2)f2<f2.
Proof.
By direct computation, we obtain e2=a+j2c−k2(b+j2d),f2=b+j2d,g1=a+(j1+1)c−k1(b+(j1+1)d) and h1=b+(j1+1)d. Since P1∈DBn, we have g1<h1 and therefore the following series of inequalities holds.
[TABLE]
[TABLE]
[TABLE]
(where the second inequality follows from j2≥j1+1 and [d(k1+1)−c]>0)
[TABLE]
[TABLE]
[TABLE]
[TABLE]
which is equivalent to the claim of the lemma.
∎
Lemma 49**.**
For every K=(acbd)∈DBn where a>2b, there exists an edge JLt∣LℓK where t,ℓ≥1, and every other incoming edge of the state K has R in its output word.
Proof.
We have KT∈DBn and by Theorem 9, there exists an edge KTRℓ∣WJT for some ℓ≥1,W∈D1 and J∈DBn and there is no other outgoing edge of the state KT with input word, which does not contain L.
We have:
[TABLE]
Because a>2b, we have either W=R or W has prefix R2. In the second case, we have by the symmetric version of Item 3 of Lemma 40 that ℓ=1 and W=Rt for some t≥2. The claim now follows from Proposition 10.
∎
Lemma 50**.**
Every state J∈DBn has an incoming edge with the input word, which has suffix L.
Proof.
We have JT∈DBn. By Theorem 9, there is always an edge JTV∣WNT, which has an input word V with suffix R. Moreover, by Lemma 17, this edge has output word W, which has prefix R. It means that by Proposition 10, there is also an edge NWT∣VTJ where WT has suffix L.
∎
Proposition 51**.**
Let
[TABLE]
where P1,P2,M∈DBn, k1>k2≥1 and j2>j1≥0.
Then there is no walk of the form
[TABLE]
in the transducer Tn and for arbitrary walk of the form
[TABLE]
in the transducer Tn (if there is one) (Q is the first state before reading the start of the run of L’s in the input word), we have
[TABLE]
where W1W2=W, Q0∈DBn and p≥1.
Proof.
By Lemma 47, and since j2>0, we have (P2)1,2=0.
An arbitrary walk of the form
[TABLE]
in the transducer Tn, where r≥1 and Q is the first state before reading the start of the run of L’s in the input word, can be decomposed in the following way.
[TABLE]
where Qm=P2, m∈N and for all i∈N,i≤m, Wi∈D1,Qi∈DBn and ui≥1.
By Lemma 47, we have (Qi)1,2=0 for all i∈N,i≤m and (Qi)1,2(Qi)1,1<(Qi+1)1,2(Qi+1)1,1 for all i∈N,i≤m−1.
Let r be maximal possible such that there exists the walk of the form Q\ext@arrow9999\arrowfill@\relbar\relbar↠VLr∣WP2.
Lemma 50 shows that there is an incoming edge of the state Q, which has suffix of its input word equal to L.
Therefore, V has suffix R.
We know that u0≥1 and therefore by Lemma 17, W0 has prefix L. Now u0=1 holds or by Item 1 of Lemma 40, we have W0=LRs for some s≥1.
We prove by contradiction that (Q0)1,1≤2(Q0)1,2.
We suppose that (Q0)1,1>2(Q0)1,2. It follows from Lemma 49 that there exists some edge JLt∣LℓQ0 where t,ℓ≥1. By Item 3 of Lemma 40 either ℓ=1 or t=1.
By Lemma 45 or by Lemma 46 or because t≥1, we have t≥u0.
By Lemma 50, there is an edge, which ends in the state J and has input word with suffix L.
This is a contradiction with the maximality of r.
Therefore, we have (Q0)1,1≤2(Q0)1,2, which by Lemma 44 means that u0=1 and V=Rp for some p≥1.
Because Q0∈DBn, we have (Q0)1,1>(Q0)1,2. It means that
[TABLE]
At the same time, we have according to Lemma 48 that
[TABLE]
Because (Qm)1,2≥1, we have r−1<k1−k2 and the proposition holds.
∎
The symmetry of Tn can be used for the following observation about the output words.
Lemma 52**.**
Let M1V1∣W1P and M2V2∣W2P for some M1,M2,P∈DBn, V1,V2,W1,W2∈D1 be two different edges in the transducer Tn.
The word W1 is not a suffix of W2 or vice versa.
Proof.
By Proposition 10, the edges PTW1T∣V1TM1T and PTW2T∣V2TM2T exist. The claim follows from Theorem 9.
∎
We may now proceed with a proof of Theorem 39.
First, we recall its statement:
Let (pi)i=1g be the sequence of all the transitions taken on the walk M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM, ordered as they appear on this walk.
We shall transform each of the transition pi into a new walk pi having the same starting state and ending state as pi.
Doing that, we shall produce a new walk from M to M given by the sequence (pi)i=1g.
Let UiQiji be the input word of the transition pi with Qi∈{L,R}, ji>0, and Ui empty or ending in a letter distinct from Qi.
If Ui is not empty, Fi denotes the first letter of Ui.
We proceed from i=g to i=1 and replace pi with pi using the following rules. In the case i=1, we define i−1=g.
The rules use Corollary 35 or its symmetric version and construct walks pi from the walks given by an appropriate item of Corollary 35:
I.
if Ui is empty and Qi=Qi−1, then apply item a of Corollary 35 if Qi=R or its symmetric version otherwise;
2. II.
if Ui is empty and Qi=Qi−1, then pi=pi;
3. III.
if Ui is not empty and Fi=Qi−1, then apply item 2 of Corollary 35 if Qi=R or its symmetric version otherwise;
4. IV.
if Qi−1=R and Qi=L, apply item 3 of symmetric version of Corollary 35;
4. IVd.
if Qi−1=L and Qi=L, apply item 4 of symmetric version of Corollary 35.
Let M\ext@arrow9999\arrowfill@\relbar\relbar↠U∣WUM be the walk composed of the walks p1,p2,…,pg.
It follows from the above construction that all the runs in U, except for the last run, are of length at least 4n and Qg4n is a prefix of U.
As the new walks pi are given by Corollary 35 or kept the same, the number of runs in the output words is either always strictly increased or the output word is the same.
Since σ(A1)>σ(A1) and σ(A2)>σ(A2) imply σ(A1A2)>σ(A1A2) for all A1,A2,A1,A2∈D1, we conclude that using the above rules, the number σ(WU) may not be less than σ(W).
We conclude that σc(WU)≥σc(W).
We shall now repeatedly apply Lemma 32 to the walk M\ext@arrow9999\arrowfill@\relbar\relbar↠U∣WUM to decrease the length of most of the runs in the input word between 4n and 5n−1, without changing the output words except for decreasing lengths of some of their runs.
We end up with a walk
[TABLE]
where σ(WU)=σ(WU′), U′=κ(U′) and U′ starts and ends with the letter distinct from Qg.
It remains to deal with the first and the last run, which are both runs of the same letter Qg.
In order to do that, we shift the start and the end of the closed walk M\ext@arrow9999\arrowfill@\relbar\relbar↠QgeU′QgfWU′M to another state, denoted by M, on this closed walk such that the run Qge+f is inside the input word.
This is possible due to the fact that U′ contains a run of length at least 4n of the letter distinct from Q.
Let W′ be the output word of this shifted closed walk.
By the definition, we have σc(W′)=σc(WU′).
We now apply Lemma 32 one last time to reduce the length of the run Qge+f in the input word of the shifted closed walk.
We obtain a new output word W which satisfies
[TABLE]
As the input word of this closed walk belongs to τκ(V), the first part of the proof is finished.
Now, we prove Items a and b.
The proofs of the two claims of Items a and b are very similar and therefore we prove them together.
In what follows, C denotes the closed walk M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM and C the closed walk M\ext@arrow9999\arrowfill@\relbar\relbar↠VWM.
The step II of the algorithm in the first part of the proof may not be applied to all of the edges pi.
In other words, there is an edge pi such that Corollary 35 is applied to it in the algorithm.
Moreover, we may assume that such edge satisfies pi=SV3Rj∣∙T where V3 does not have suffix R.
It follows from Lemma 16 that j≤n and if V3 is empty, then we are in the step I
Let X∈{ε,L4n,R4n}.
The application of Corollary 35 to pi produces a walk pi=S\ext@arrow9999\arrowfill@\relbar\relbar↠Xκ(V3)Rj∙T on the closed walk M\ext@arrow9999\arrowfill@\relbar\relbar↠VWM.
If we change the starting state of this closed walk to S, we obtain some walk S\ext@arrow9999\arrowfill@\relbar\relbar↠B∣∙S.
In the first case (the case a of Theorem 39), we have S\ext@arrow9999\arrowfill@\relbar\relbar↠B∣∙S=(S\ext@arrow9999\arrowfill@\relbar\relbar↠B1∣∙S)m1 for B1m1=B so there is a walk pq, i=q and pi=pq such that if we change the starting vertex of the closed walk S\ext@arrow9999\arrowfill@\relbar\relbar↠B∣∙S to the starting vertex of pq, we obtain again the closed walk S\ext@arrow9999\arrowfill@\relbar\relbar↠B∣∙S. In the second case (the case b of Theorem 39), the symmetricity of the walk S\ext@arrow9999\arrowfill@\relbar\relbar↠B∣∙S implies that we may also change the starting vertex to S, and the closed walk is S\ext@arrow9999\arrowfill@\relbar\relbar↠B∙S where the first walk is pq=pi=S\ext@arrow9999\arrowfill@\relbar\relbar↠Xκ(V3)Lj∙T. Because we are investigating both cases together, we put T0=T for the first case and T0=T for the second case.
We shall now investigate the edge pℓ on the original closed walk, which, after application of the algorithm in the first part of this proof, produced the start of the reading of the last run in the input word of pq. This last run is denoted Ej, where E=R for the first case and E=L for the second case.
We are again sure that Corollary 35 is applied to pℓ since we are tracking a start of a run.
A)
pℓ=S1ZEk∣∙T1 and pℓ=S1\ext@arrow9999\arrowfill@\relbar\relbar↠X′κ(Z)Ek∙T1 with k maximal possible, Z∈D1 and X′∈{ε,L4n,R4n}.
If k=j, then T1=T0. Since for the first case V=(V1)m1, we arrive in the closed walk C at the state T0=T at least two times with the same input and therefore C=(C1)m2 for some m2≥2, which means that M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM=(M\ext@arrow9999\arrowfill@\relbar\relbar↠V2∣W2M)m2.
In the second case, we have a similar situation.
Since V=V1V1, i.e., the original input word is symmetric itself, we arrive in the closed walk C at the state T with the input word, which is symmetric to the input word after the edge pi, and so M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM is symmetric.
If k<j, then the walk pq ends with the walk T1\ext@arrow9999\arrowfill@\relbar\relbar↠Ej−k∙T0.
The walk T1\ext@arrow9999\arrowfill@\relbar\relbar↠Ej−k∙T0 is taken after pℓ.
Thus, we arrive in the closed walk C at the state T0 with the input word, which is either the same (in the first case) or symmetric (in the second case) to the input word after the walk pi, and so either M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM=(M\ext@arrow9999\arrowfill@\relbar\relbar↠V2∣W2M)m2 for some m2≥2 or M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM is symmetric, respectively.
If k>j, then the walk pℓ ends with the walk T0\ext@arrow9999\arrowfill@\relbar\relbar↠Ek−j∙T1.
Thus, the walk T\ext@arrow9999\arrowfill@\relbar\relbar↠Rk−j∙T2, where T2=T1 in the first case and T2=T1 in the second case, exists.
Therefore, as the observed run of R’s in pi is of length at least k, it is followed by T\ext@arrow9999\arrowfill@\relbar\relbar↠Rk−j∙T2.
Again, we either arrive in the closed walk C two times at the state T1 with the same input word or we find two states, T1 and T1 that have symmetric input words, and so either M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM=(M\ext@arrow9999\arrowfill@\relbar\relbar↠V2∣W2M)m2 or M\ext@arrow9999\arrowfill@\relbar\relbar↠V∣WM is symmetric, respectively.
B)
pℓ=S1Z1EkZ2Yr1∣∙T1, with Z1,Z2∈D1, Y∈{L,R},r1≥1 and k≥1 maximal possible.
As V=(V1)m1 or V=V1V1, we have k≥j.
We have pℓ=S1\ext@arrow9999\arrowfill@\relbar\relbar↠X′κ(Z1EkZ2)Yr1∙T1 where X′∈{ε,L4n,R4n}.
As M\ext@arrow9999\arrowfill@\relbar\relbar↠VWM=(M\ext@arrow9999\arrowfill@\relbar\relbar↠V1W1M)m1 or is symmetric, we know that after reading Ej in the run κ(Ek) we arrive at T0.
The situation is illustrated in Figure 3.
We arrive at the intermediate state Dg by reading Ek+tg, where tg≥1, which is also read when taking the vertical path to Dg. Therefore, S1Z1Ek+tg∣W3Dg and S1\ext@arrow9999\arrowfill@\relbar\relbar↠Z1E4nEk+tgW4Dg=S1\ext@arrow9999\arrowfill@\relbar\relbar↠Z1E4nEj∙T0\ext@arrow9999\arrowfill@\relbar\relbar↠Ek+tg−j∙Dg for some W3,W4∈D1 and we can find a state T2∈DBn such that S1\ext@arrow9999\arrowfill@\relbar\relbar↠Z1E4nEk+tgW4Dg=S1\ext@arrow9999\arrowfill@\relbar\relbar↠Z1E4nEjW5T0\ext@arrow9999\arrowfill@\relbar\relbar↠Ek+tg−r−jW6T2Er∣W7Dg for some W5,W6,W7∈D1 and k+tg−j≥r≥1.
By Lemma 33 or its symmetric version, the word W4 has suffix E−1W3 and because k+tg≥2, we have by Lemma 40Item 1 for Z1 nonempty or by Lemma 40Item 3 otherwise that W3=EEz, where z≥0.
And for Z1 nonempty even z≥k+tg−1≥1. So W4 has suffix Ez.
Moreover, by Lemma 40Item 3 or its symmetric version, we have W7=EEs for some s≥0 or W7=Et for some t≥2.
If W7=Et for some t≥2, then r=1 and by Lemma 46, there cannot be the edge S1Z1Ek+tg∣W3Dg, which is a contradiction. Therefore, W7=EEs for some s≥0.
Further, we know that W7 is a suffix of W4 and therefore Ez is a suffix of W7. Moreover, by Lemma 52, W3=W7, which means that s>z.
We distinguish the two following cases:
Z1 is not the empty word.
In this case, we have s≥z+1≥k+tg≥k+tg−j+1≥r+1.
Let T2=(acbd). Using Lemma 43 or its symmetric version on the edge T2Er∣EEsDg, we have a<2b for E=L and a<2c for E=R.
Moreover, let NV8∣W8T2, where N∈DBn,V8,W8∈D1 and V8 has suffix E, be an edge in the transducer Tn. By Lemma 44 or its symmetric version, we have V8=EyE for some y≥1.
Therefore, the walk T0\ext@arrow9999\arrowfill@\relbar\relbar↠Ek+tg−r−jW6T2 is empty and T0=T2. Therefore also for every edge NV8∣W8T0, where V8 has suffix E, we have V8=EyE. Specially we have pi=SLyR∣∙T for some y≥1 (in the second case, we have used Proposition 10) which means that j=1.
Because Z1 is not empty, we can write pℓ=S1Z3Eig+1EkZ2Yr1∙T1, with ig+1≥1 maximal possible and Z3∈D1.
Now we can have one of the following situations.
i)
The edge pi−1 has input word with a suffix L and Z3 is not an empty word.
We find the edge pu on the original closed walk on which starts the reading of the run Ly of the input word of pi and we apply Item BB1 on the edges pu and pℓ.
2. ii)
The edge pi−1 has input word with a suffix L, Z3 is empty and the edge pℓ−1 has input word with a suffix E.
In this case, we find the edge pu on the original closed walk on which starts the reading of the run Ly of the input word of pi and the edge pv on the original closed walk on which starts the reading of the run Eig+1 of the input word of pℓ and we apply Item A on these two edges.
3. iii)
The edge pi−1 has input word with a suffix L, Z3 is empty and the edge pℓ−1 has input word with a suffix E.
In this case, we find the edge pu on the original closed walk on which starts the reading of the run Ly of the input word of pi and we apply Item BB2 on the edges pu and pℓ.
4. iv)
The edge pi−1 has input word with a suffix R and Z3 has at least two runs.
We find the edge pu on the original closed walk on which starts the reading of the run of R’s, which ends as a suffix of the input word of the edge pi−1 and we apply Item BB1 on the edges pu and pℓ.
5. v)
The edge pi−1 has input word with a suffix R, Z3=Eig+2 and the edge pℓ−1 has input word with a suffix E.
We find the edge pu on the original closed walk on which starts the reading of the run of R’s, which ends as a suffix of the input word of the edge pi−1 and the edge pv on the original closed walk on which starts the reading of the run Eig+2 of the input word of pℓ and we apply Item A on the edges pu and pv.
6. vi)
The edge pi−1 has input word with a suffix R, Z3=Eig+2 and the edge pℓ−1 has input word with a suffix E.
We find the edge pu on the original closed walk on which starts the reading of the run of R’s, which ends as a suffix of the input word of the edge pi−1 and we apply Item BB2 on the edges pu and pℓ.
7. vii)
The edge pi−1 has input word with a suffix R,Z3 is empty and the edge pℓ−1 has input word with a suffix E.
We find the edge pv on the original closed walk on which starts the reading of the run Eig+1 of the edge pℓ and we apply Item BB2 on the edges pv and pi.
8. viii)
The edge pi−1 has input word with a suffix R, Z3 is empty and the edge pℓ−1 has input word with a suffix E.
We find the edge pu on the original closed walk on which starts the reading of the run of R’s, which ends as a suffix of the input word of the edge pi−1 and the edge pv on the original closed walk on which starts the reading of the run E, which ends as a suffix of the input word of the edge pℓ−1 and we apply Item A on the edges pu and pv.
In this case, we have S1Z1Ek+tg∣W3Dg=S1Ek+tg∣EEzDg and T2Er∣W7Dg=T2Er∣EEsDg, where s>z.
Using Proposition 51 or its symmetric version on the edges S1Ek+tg∣EEzDg and
T2Er∣EEsDg, we get that for every walk of the form P\ext@arrow9999\arrowfill@\relbar\relbar↠V8Ek+tg−rW8T2 for some P∈DBn and V8,W8∈D1 we have P\ext@arrow9999\arrowfill@\relbar\relbar↠V8Ek+tg−rW8T2=PEvE∣W9N1\ext@arrow9999\arrowfill@\relbar\relbar↠Ek+tg−r−1W10T2 for some N1∈DBn and v≥1.
It holds specially for every such walk which end with the walk T0\ext@arrow9999\arrowfill@\relbar\relbar↠Ek+tg−r−jW6T2 and therefore in the case Item a we have (T=T0, E=R):
Therefore, (in the second case by Proposition 10) we have j=1 and pi=SLvR∣∙T for some v≥1.
Now we can have two situations.
i)
The edge pi−1 has L as a suffix of its input word.
We find the edge pu1 on the original closed walk on which starts the reading of the run of L’s, which ends on the edge pi and the edge pu2 on the original closed walk on which starts the reading of the run E, which ends as a suffix of the input word of the edge pℓ−1 and we apply Item A on the edges pu1 and pu2.
2. ii)
The edge pi−1 has R as a suffix of its input word.
We can find the edge pu2 on the original closed walk on which starts the reading of the run E, which ends as a suffix of the input word of the edge pℓ−1 and we apply Item BB2 on the edges pu2 and pi.
Now we can see that there either exist two edges pu1,pu2 on which we can apply Item A or that for all w we have piw=MiwLqiwR∣∙Niw or piw=MiwRqiw∣∙Niw and pℓw=MℓwEqℓwE∣∙Nℓw or pℓw=MℓwEqℓw∣∙Nℓw, where qiw,qℓw≥1 and iw≡i−wmodg,ℓw≡ℓ−wmodg where g is such that C=(pi)i=1g.
For the final part of the proof, we split the cases according to Items a and b of the statement.
(a)
piw=MiwLqiwR∣∙Niw or piw=MiwRqiw∣∙Niw and pℓw=MℓwRqℓwL∣∙Nℓw or pℓw=MℓwLqℓw∣∙Nℓw, for all w and for qiw,qℓw≥1, which is a contradiction with C=(piw)w=1g=(pℓw)w=1g.
2. (b)
piw=MiwLqiwR∣∙Niw or piw=MiwRqiw∣∙Niw and pℓw=MℓwLqℓwR∣∙Nℓw or pℓw=MℓwRqℓw∣∙Nℓw for all w. It means that all the input words of the edges in the closed walk C are either LqiwR or Rqiw for some iw. Moreover, the input word of the closed walk C includes at least one run of L’s and one run of R’s. Therefore, at least one of the input words is LqiwR for some iw≥1.
By Lemma 42, this is in contradiction with the fact that C is a closed walk. ∎
We need one more claim, which is a corollary of a well-known result due to the Fine and Wilf [4].
Theorem 53** (Fine and Wilf’s theorem).**
If a word V has periods p and q and has length at least p+q−gcd(p,q), then V has also period gcd(p,q).
We use this theorem in the following form.
Corollary 54**.**
Let V0,V0∈D1, V0=V1k for some V1∈D1 and k≥2. If
[TABLE]
for some i,j≥1 then ij∈N.
Proof.
In this proof, ∣V∣ denotes the length of the word V∈D1.
Let V=V0i=V0j, m=∣V∣ and p=im=∣V0∣,q=jm=∣V0∣. Therefore, the word V has periods p and q. Moreover, let ℓ=gcd(p,q) and p=ℓp, q=ℓq.
Thus, m≥ℓpq≥ℓ(p+q−1)=p+q−ℓ.
It means that by Theorem 53, the word V has also period ℓ and because V0=V1k, we have q=ℓ.
Together we obtain the following equation.
[TABLE]
We recall that we want to find an estimate on the number σc(W), where W is the output word of the closed walk C=M\ext@arrow9999\arrowfill@\relbar\relbar↠Vγ∣WM with V primitive and
[TABLE]
Remark 55*.*
Theorem 39 implies that there exists a closed walk C=M\ext@arrow9999\arrowfill@\relbar\relbar↠VγWM where V∈τκ(V) and σc(W)≥σc(W).
If C can be decomposed into m1≥2 closed walks with the input word Vδ1, then by (26) and δ1m1=γ≥2 we obtain a contradiction with Theorem 39Item a.
Thus,
[TABLE]
for some δ1∈Z+,m1≥2 and W1∈D1.
Further, let m≥1 be the largest possible such that
[TABLE]
for some δ∈Z+,W0,V0∈D1, and V0 primitive.
It can happen that m=1 or γ=δ but in all cases we have V0δm=Vγ.
By Corollary 54, we have γδm∈N and by (27), the numbers m and γ are coprime, which means that γδ∈N. Therefore,
[TABLE]
Therefore, it is sufficient to make an estimate on σc(W0) only for the closed walks C=M\ext@arrow9999\arrowfill@\relbar\relbar↠V0δW0M where V0∈τκ(V0).
Theorem 56**.**
Let C0=M\ext@arrow9999\arrowfill@\relbar\relbar↠V0δW0M with V0 primitive, V0∈τκ(V0), and
We are interested in the value of σc(W0).
Since C0 is a closed walk, we can choose any its vertex to be the starting vertex of the closed walk, without changing σc(W0).
In other words, we may add some assumptions on M, to keep the notation simple.
Since V0∈τκ(V0), while repeatedly reading V0 and looping on C0, all the runs we read are of length at least 4n and by Lemmas 16, 30 and 23, we are sure to pass through some state from LEn at least tree times while reading one run of L’s.
We select this vertex as the starting vertex of C, that is M0=M∈LEn.
Moreover, we may assume that C starts when we encounter M0 for next-to-last time while reading the current run of L’s.
In other words, Li0R is a prefix of V0 for some i0∈{νL(M0),νL(M0)+1,…,2νL(M0)−1}.
where N0=NL,M0,i0∈REn.
The next walk on C0 is
[TABLE]
where t0′>0,q0′≥0, t0′ is such that N0\ext@arrow9999\arrowfill@\relbar\relbar↠νR(N0)∣t0′N0 and q0′ is chosen such that after taking this walk, the input word starts with Ri0′L where i0′∈{νR(N0),νR(N0)+1,…,2νR(N0)−1}.
Note that the case q0′=0 is also possible since we may have νR(N0)=n.
The symmetric version of Lemma 37 implies that the next walk that we take on C0 is
[TABLE]
followed by
[TABLE]
We continue to decompose C0 in this manner.
This decomposition allows us to identify the output word of C.
Indeed, if we put α=2σc(V0) and recall that the input word is V0δ, then we have
[TABLE]
By Lemma 37, each WL,Mk,ik starts with L and ends with R, and by the symmetric version of Lemma 37, each WR,Nk,ik′ starts with R and ends with L.
Therefore, we obtain
[TABLE]
The walk C0 inputs δ times the word V0.
We shall now focus on what can happen with a specific run in V0 during those δ times it is read.
Namely, let V0=P1LtP2, P1,P2∈D1 with integer t maximal possible, i.e., Lt is a whole run of L’s in V0.
Let ℓ∈{1,…,δ} and kℓ be the integer such that the ℓ-th reading of the specific run Lt is associated (ends on it) with the walk from Mkℓ to Nkℓ in the above decomposition of C0.
(We have kℓ=k1+α(ℓ−1).)
Assume that for ℓ=ℓ′ we have Mkℓ=Mkℓ′ and ikℓ=ikℓ′.
Lemma 37 implies that Nkℓ=Nkℓ′ and jL,Mkℓ,ikℓ=jL,Mkℓ′,ikℓ′.
Therefore, after the ℓ-th and ℓ′-th reading of the run Lt we stumble upon the same state Nkℓ with the same input word.
This contradicts the assumptions on C0.
As a consequence, we obtain an upper bound on δ by enumerating all possibilities on Mkℓ and ikℓ, where ikℓ∈{νL(Mkℓ),νL(Mkℓ)+1,…,2νL(Mkℓ)−1}.
In the case that we select to focus on a run of R’s, Proposition 10 implies that WL,M,i=WR,M,i and therefore the resulting upper bound is the same.
Similarly, if we focus on the first run of L’s in V, which is split in two parts, the very same idea of estimate applies.
Overall, we conclude that
[TABLE]
and that the maximum contribution to σc(W0) in (31) of the δ reads of one run equals
[TABLE]
By the symmetry of R and L, we need not care if the run is a run of R’s or L’s as the last number equals ∑N∈LEn∑i=νR(N)2νR(N)−1(σ(WR,N,i)−1).
Using this estimate for all the runs, we finally obtain (29).
∎
Corollary 57**.**
If V0=V1V1 for some V1∈D1, then either
(a)
the walk C0 is symmetric
or
2. (b)
[TABLE]
Proof.
If the walk C0 is not symmetric, then, in the estimate (29) we do not need to count the symmetric possibilities in the following sense.
If when reading a run of L’s in V, we count the state M∈LEn with i∈{νL(M),…,2νL(M)−1}, then when reading the symmetric run of R’s we cannot pass through M∈REn associated with the integer i.
The symmetric run of R’s exists due to the assumption V0=V1V1.
Thus, we can count only half of all the possible states (Mkℓ,ikℓ), resp. (Nkℓ,ikℓ′), which gives the estimate in item b.
∎
We now transform the last corollary into the terms of the period of the continued fraction of x after the transformation.
Theorem 58**.**
Let x be a quadratic irrational number and N∈Dn.
We have
[TABLE]
Proof.
Let V be the repetend of the LR-representation of x.
It implies that V is primitive.
Using Theorem 5, we may assume that the calculation of the tail of hN(x) is given by a closed walk C=M\ext@arrow9999\arrowfill@\relbar\relbar↠Vγ∣WM satisfying (26).
We find the closed walk C0=M\ext@arrow9999\arrowfill@\relbar\relbar↠V0δW0M with V0δm∈τκ(Vγ), V0 primitive and M∈DBn given by Theorem 39 and Remark 55, using the notation therein.
According to (28), we have
We shall first prove the upper bound on per(hN(x)) which follows directly from Theorem 58 with
[TABLE]
By Definition 26, we have M∈LEn⟺M=Mt,u=(tu0m) where mt=n and if we put gt=gcd(m,t)=gcd(t,tn), It={{0}{1,…,gt−1} for gt=1 otherwise, then u∈It.
It follows from Lemma 37 that we have
[TABLE]
We rearrange the two last sums into one.
By Lemma 19, νL(Mt,u) is the least positive integer such that
[TABLE]
for some h∈N∖{0} and therefore νL(Mt,u)=gtt. Therefore, we have
i1m+u≡i2m+u(modt) for all i1,i2∈{νL(Mt,u),νL(Mt,u)+1,…,2νL(Mt,u)−1},i1=i2.
It means that {im+u(modt):i∈{νL(Mt,u),νL(Mt,u)+1,…,2νL(Mt,u)−1}}={k:k∈N,k<t,k≡u(modgt)} and #{k:k∈N,k<t,k≡u(modgt)}=νL(Mt,u).
Let Jt={∅{igt:i∈N}for gt=1, otherwise..
Together with the facts that u=0 for gt=1 and u∈{1,…,gt−1} otherwise we have
[TABLE]
and #{k:k∈N,k<t,k∈Jt}=∑u∈ItνL(Mt,u).
Now it remains to realize that for all i≥νL(Mt,u) we have by (38) that im+u≥th+u≥t and by definition of ξ, we have ξ(k,t)=ξ(at+k,t) for all a∈N and k≥t. We conclude
As the inverse Möbius transformation preserves the determinant of its associated matrix, i.e, hN−1=hN′ for some N′∈Dn, the lower bound follows from the upper bound.
∎
4 Concluding remarks and experiment results
We have tested the obtained upper bound of Theorem 1 for various values of n.
Some of the results can be seen in Table 3.
The experiments indicate that the upper bound is sharp for n=2, all prime n with n≡3(mod4) and for some composite numbers (for example n=9,14,27).
For some other values of n the difference between our estimate Sn and the experimentally obtained factor of prolongation (denoted Sn(x) in the table) can be relatively large (for example for n=18).
The difference between Sn and Sn(x) is caused by the fact that in some cases the closed walk C cannot go through all of the transitions that we have considered in the estimate (29).
For composite numbers, a sharper estimate depends on the value of n and its divisors.
If n is prime, the sharp bound may be proven to be
[TABLE]
For n≡3(mod4) the bound in fact equals Sn, the formula is only simplified.
The bound for n≡3(mod4) equals Sn−1, corresponding to the case when C cannot pass through all possible vertices.
A corresponding experiment is for n=13 in Table 3.
We do not give a proof of the formula (39) as it is only for a very special case and requires some more technical claims.
We do not provide experiment results on the lower bound as the behaviour is completely analogous, one only needs to consider the inverse of the given Möbius transformation.
Acknowledgements
The work was supported by the Ministry of Education, Youth and Sports of the Czech Republic, project no. CZ.02.1.01/0.0/0.0/16_019/0000778.
H. Ř. acknowledges support by the Grant Agency of the Czech Technical University in Prague, grant No. SGS17/193/OHK4/3T/14.
The computer experiments were done using the computer algebra system SageMath [15].
Bibliography15
The reference list from the paper itself. Each links out to its DOI / PubMed record.
1[1] V. I. Arnold , Lengths of periods of continued fractions of square roots of integers , Funct. Anal. Other Math., 2 (2009), pp. 151–164.
2[2] L. Balková and A. Hrušková , Continued fractions of square roots of natural numbers , Acta Polytechnica, 53 (2013), pp. 322–328.
3[3] J. H. E. Cohn , The length of the period of the simple continued fraction of d 1 / 2 superscript 𝑑 1 2 d^{1/2} . , Pacific J. Math., 71 (1977), pp. 21–32.
4[4] N. J. Fine and H. S. Wilf , Uniqueness theorems for periodic functions , P. Am. Math. Soc., 16 (1965), pp. 109–114.
5[5] B. Gosper , Continued fraction arithmetic . http://perl.plover.com/yak/cftalk/INFO/gosper.txt.
6[6] P. Kůrka , Dynamics of Number Systems , Springer International Publishing, 2016.
7[7] J. C. Lagarias and J. O. Shallit , Linear fractional transformations of continued fractions with bounded partial quotients , J. Théor. Nombres Bordeaux, 9 (1997), pp. 267–279.
8[8] P. Liardet and P. Stambul , Algebraic computations with continued fractions , J. Number Theory, 73 (1998), pp. 92–121.