Abstract 1 Introduction 2 Preliminaries 3 The Smallest Attractors of Fibonacci Words 4 The Smallest Attractors of Period-Doubling Words 5 Discussion References Appendix A Using Walnut to Characterize the Smallest Attractors Appendix B Additional Figures

The Smallest String Attractors of Fibonacci and Period-Doubling Words

Mutsunori Banbara ORCID Graduate School of Informatics, Nagoya University, Japan    Hideo Bannai ORCID M&D Data Science Center, Institute of Integrated Research, Institute of Science Tokyo, Japan    Peaker Guo ORCID M&D Data Science Center, Institute of Integrated Research, Institute of Science Tokyo, Japan    Dominik Köppl ORCID Department of Computer Science and Engineering, University of Yamanashi, Kofu, Japan    Takuya Mieno ORCID Graduate School of Informatics and Engineering, University of Electro-Communications, Chofu, Japan    Yoshio Okamoto ORCID Graduate School of Informatics and Engineering, University of Electro-Communications, Chofu, Japan
Abstract

A string attractor of a string T[1..|T|] is a set of positions Γ of T such that any substring w of T has an occurrence that crosses a position in Γ, i.e., there is a position i such that w=T[i..i+|w|1] and the intersection [i,i+|w|1]Γ is nonempty. The size of the smallest string attractor of Fibonacci words is known to be 2. We completely characterize the set of all smallest string attractors of Fibonacci words, and show a recursive formula describing the 2n4+2n/22 distinct position pairs that are the smallest string attractors of the nth Fibonacci word for n7. Similarly, the size of the smallest string attractor of period-doubling words is known to be 2. We also completely characterize the set of all smallest string attractors of period-doubling words, and show a formula describing the two distinct position pairs that are the smallest string attractors of the nth period-doubling word for n2. Our results show that strings with the same smallest attractor size can have a drastically different number of distinct smallest attractors.

Keywords and phrases:
String attractors, Fibonacci words, Period-doubling words, Combinatorics on words
Funding:
Hideo Bannai: JSPS KAKENHI Grant Number JP24K02899.
Dominik Köppl: JSPS KAKENHI Grant Number JP25K21150.
Takuya Mieno: JSPS KAKENHI Grant Number JP24K20734.
Yoshio Okamoto: JSPS KAKENHI Grant Number JP23K10982.
Copyright and License:
[Uncaptioned image] © Mutsunori Banbara, Hideo Bannai, Peaker Guo, Dominik Köppl, Takuya Mieno, and
Yoshio Okamoto; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Mathematics of computing Combinatorics on words
Related Version:
Extended Version: https://arxiv.org/abs/2602.16152
Editors:
Philip Bille and Nicola Prezza

1 Introduction

For any string T, a set Γ of positions is a string attractor (or simply attractor) of T, if any substring of T has an occurrence that crosses (i.e., contains) a position in Γ. String attractors [5] are an important combinatorial notion that captures the repetitiveness (compressiveness) of the string in the sense that dictionary compression algorithms can be viewed as algorithms that compute string attractors. It is known that the size of the smallest string attractor of T, denoted by γ(T), bounds all dictionary compression measures from below, and is NP-hard to compute [5].

The study of string attractors on well-known families of strings has attracted much attention. Mantaci et al. [10, 11] initiated the study of string attractors on standard Sturmian words (which include the Fibonacci words), and Thue–Morse words. For any standard Sturmian word T, they showed that at least one of the sets Γ1={η+1,η+2} or Γ2={|T|η3,|T|η2} is a smallest string attractor of T, where η is the length of the longest proper palindromic prefix of T[1..|T|2]. For de Bruijn words of length n, they showed that the smallest attractor size asymptotically approaches n/logn. They also showed an attractor of size Θ(log|𝒯n|) for the nth Thue–Morse word 𝒯n. Later, Kutsukake et al. [7] showed that γ(𝒯n)=4 for all n4. In a more general setting, Schaeffer and Shallit [14] discussed string attractors of all prefixes of automatic sequences, including the period-doubling words, Thue–Morse words, and Tribonacci words. In particular, they showed that the size of the smallest attractor of any prefix of the period-doubling word longer than one is 2, using the Walnut theorem prover [13].

For the Fibonacci words, defined as F0=b, F1=a, Fn=Fn1Fn2, it holds that η=fn12 (where fn1=|Fn1|), and the above result of Mantaci et al. translates to the sets Γ1={fn11,fn1} or Γ2={fn21,fn2}. Since Γ2 cannot be an attractor (it can be shown that the length fn1 suffix of Fn occurs uniquely and does not have an occurrence crossing a position in Γ2), it follows that Γ1 is an attractor of Fn. Hence, this gives an explicit pair of positions to be a smallest attractor of Fibonacci words. However, in general, a given string can have multiple smallest string attractors. For example, any single position of a unary string is an attractor. For a more interesting example, the set of all smallest string attractors of F8 is shown in Figure 1. See also Figure 13 for more examples.

In this paper, we take a deeper look into the combinatorial aspects of string attractors of Fibonacci words and period-doubling words, and give a complete characterization of their smallest string attractors. Our characterization for Fibonacci words is based on occurrences of singular words [15] in the Fibonacci word. We show a recursive formula describing the set of all 2n4+2n/22 smallest string attractors of the nth Fibonacci word for all n7. For the nth period-doubling word Dn defined as D0=a and Dn=ϕ(Dn1) for the morphism ϕ(a)=ab and ϕ(b)=aa, we show that the position pairs {32n3,62n3} and {42n3,62n3} characterize the smallest attractors for n3. To the best of our knowledge, this is the first work which shows a complete characterization of the set of smallest string attractors for non-trivial families of strings.

It is also worth noting that, although the smallest attractor size for both the Fibonacci and period-doubling words is two, our results show that the number of smallest attractors can differ drastically, namely, from exponential in the length to constant. We do not yet have a clear interpretation of what this quantity captures, and its understanding remains an open and interesting question, as it may allow us to consider more fine-grained types of repetitiveness. Other related open problems are listed in Section 5.

Related Work

Mieno et al. [12] gave a complete characterization of smallest straight-line programs (SLPs) of Fibonacci words, showing that an SLP of a Fibonacci word is a smallest SLP if and only if it can be obtained by some implementation of the RePair algorithm [8], i.e., the recursive pairing of a most frequent adjacent symbol pair. The number of distinct smallest SLPs for Fn was shown to be 2(n+1)/22 for n3.

We note that for the strings we have considered, the approach of Schaeffer and Shallit [14] and the software Walnut [13] can be applied, and it is possible to compute a finite state automaton for symbols in ({0,1}×{0,1}×{0,1}), such that accepting paths spell out a representation of the two attractor positions and the length of a prefix of the string. While the correctness of our claims can, in principle, be verified by analyzing and characterizing these paths, this would not seem to give us much insight into why the statements hold. This approach is discussed briefly in Appendix A.

Schaeffer and Shallit [14] and Cassaigne et al. [1] have studied another related attractor-based parameter 𝑠𝑝𝑎𝑛(w), defined as the smallest distance between the leftmost and rightmost positions in an attractor of w.

Figure 1: For n=8. Left: all smallest attractors of Fn, where each pair of horizontally aligned dots represents an attractor. Right: characterization of these attractors according to Theorem 23; the three dotted boxes (top to bottom) correspond to Lemmas 25, 26, and 27. (See Figure 18 in Appendix B for the case n=9.)

2 Preliminaries

Let Σ={a,b} be a binary alphabet. An element of Σ is called a symbol. An element of Σ is called a string. For a string x, let |x| denote its length, and let ε denote the empty string, i.e., |ε|=0. For any integer 1i|x|, let x[i] denote the ith symbol of x, and for any 1ij|x|, let x[i..j]=x[i]x[j], and x[i..j)=x[i..j1]. Let xR denote the reverse of x, i.e., if x=x[1]x[2]x[|x|], then xR=x[|x|]x[|x|1]x[1]. The complement of a symbol in Σ is denoted as a¯=b and b¯=a, and for any string xΣ, its complement is x¯=x[1]¯x[|x|]¯.

For a set X of integers and another integer i, let iX=Xi:={i+x:xX} and iX:={ix:xX}. For two sets X and Y, let XY:={{x,y}:(x,y)X×Y}. For a string T and an occurrence w=T[i..j] of a substring w of T, we say that the occurrence of w crosses position k, if ikj. A boundary is a pair of consecutive positions sometimes identified with two strings ending and starting at the respective positions. We say that an occurrence of a string crosses the boundary if it crosses both positions of the boundary.

Definition 1 (String Attractors [5]).

A string attractor, or an attractor for short, of a string T is a set Γ of positions of T such that for any substring u of T, there exists an occurrence of u in T that crosses some position in Γ. We denote by 𝒜(T) the set of all smallest attractors of T.

It is straightforward that string attractors are invariant under string reversal, meaning that the “mirrored” string attractor is a string attractor of the mirrored string.

Observation 2.

If Γ is an attractor of a string w, then (|w|+1)Γ is an attractor of wR.

A string w is a minimal unique substring (MUS) [4] of T if w is a substring of T that has a unique occurrence in T, and any proper substring of w has multiple occurrences in T. The following observation is straightforward.

Observation 3.

Any string attractor must contain at least one position that is crossed by the unique occurrence of a MUS.

3 The Smallest Attractors of Fibonacci Words

3.1 Properties of Fibonacci Words and Singular Words

Definition 4 (Fn and fn).

For each n0, the nth Fibonacci word is defined as F0=b,F1=a, and Fn=Fn1Fn2 for each n2. The nth Fibonacci number is defined as f0=1,f1=1, and fn=fn1+fn2 for each n2. Note that fn=|Fn|.

Definition 5 (Gn, Δn).

For n2, let Gn=Fn[1..fn2] and Fn=GnΔn. For convenience, let Δ0=ab and Δ1=ba.

Below are known or simple observations concerning Fibonacci words.

Observation 6 (e.g. [2, 6, 9]).

The following propositions hold.

  1. 1.

    For i2, Δi=Δimod2.

  2. 2.

    For i2, Gi is a palindrome (by Gi=Gi2Δi2Gi3Δi3Gi2 and induction).

  3. 3.

    For i3, Fi=Fi1Fi2=Fi2Gi1Δi.

  4. 4.

    For i5,

    Fi =GiΔi=Fi1Gi2Δi=Gi2Δi2Gi3Δi3Gi2Δi=Gi2(Fi3)R(Fi2)RΔi
    =Gi2(Fi1)RΔi.
Definition 7 (Singular Words).

Let S1=ε, S0=a, S1=b, and Sn=Sn2Sn3Sn2 for n2.

Notice that |Fn|=|Sn|, and all singular words are palindromes. In the literature [15, 3], these words have been defined to be Sn=Fn[fn1]Fn[1..fn1]=Fn[fn1]GnFn[fn1]. However, we start from the above definition (Property 2 (4) in [15]) to simplify the presentation. The next lemma summarizes results shown in [15] that we utilize.

Lemma 8 ([15]).

For any n0, the following propositions hold.

  1. (1)

    Sn=Snmod2(i=0n2Si). (Property 2 (12) in [15])

  2. (2)

    Sn is not a substring of Sn+1 nor of i=0n1Si. (Properties 2 (2) and (13) in [15])

  3. (3)

    Let SnSn+1=u1u2u3 where u1 is a non-empty proper prefix of Sn and u3 is a non-empty proper suffix of Sn+1. Then, u2Si for any i0. (Lemma 3 in [15])

The following lemma is essentially the same as what has been shown by Wen and Wen (Theorem 1 in [15]) for the infinite Fibonacci string.

Lemma 9.

For any n1, Fn=(i=0n2Si)S(n1)mod2.

Proof.

Induction on n. The equation holds for n=1. Suppose it holds for all nk. Then,

Fk+1=FkFk1=(i=0k2Si)S(k1)mod2(i=0k3Si)S(k2)mod2=(i=0k1Si)Skmod2

where the last equation uses S(k1)mod2(i=0k3Si)=Sk1 by Lemma 8 (1). Therefore, the equation holds for n=k+1.

Corollary 10.

For any k0, Sk occurs uniquely in S0Sk and the first (leftmost) occurrence of Sk in F spans the range [fk+1..fk+21].

Proof.

Sk cannot occur in i=0k1Si nor contain Sk1 (Lemma 8 (2)), nor cross the boundary of Sk1Sk (Lemma 8 (3)). The range follows from |Sk|=fk and i=0k1fi=fk+11.

Lemma 11.

For any n5, Sn3 and Sn2 are the (only) MUSs of Fn.

Proof.

Sn3 occurs uniquely in Fn=(i=0n2Si)S(n1)mod2; It cannot occur after its first occurrence (characterized by Corollary 10) since it cannot occur in Sn2 (Lemma 8 (2)) nor cross the boundary of Sn3Sn2 as well as the boundary of Sn2Sn1 (Lemma 8 (3)). The latter also implies the uniqueness of Sn2 in Fn. We have Sn3=Fn[fn2..fn11], Sn2=Fn[fn1..fn1] from Corollary 10, and any substring containing them are unique. Since Fn=Gn1Δn1Fn2=Fn2Gn1Δn by Observation 6, it holds that Fn[1..fn12]=Fn[fn2+1..fn2]=Gn1 and Fn[fn1+1..fn]=Fn2 are repeating substrings. These are the maximal substrings of Fn not containing Sn3 nor Sn2. All substrings of these maximal substrings are repeating as well, and include all proper substrings of Sn3 and Sn2. Therefore Sn3 and Sn2 are MUSs. Also, since a substring containing a MUS must be unique, there can be no other MUSs in Fn.

Definition 12 (Un and Vn).

For each n5, define Un=[fn2..fn11] and Vn=[fn1..fn1], i.e., the ranges of positions crossed by the MUSs Sn3 and Sn2, respectively.

Proposition 13 ([10, Thm. 5]).

The size of the smallest string attractor of Fn is 2 for n2.

For any n5, a Fibonacci word has exactly two MUSs and the ranges of positions crossed by their occurrence are disjoint (Corollary 10, Lemma 11, Definition 12). Since an occurrence of a unique substring must contain an attractor position (Observation 3) and from Proposition 13, the smallest attractor must consist of one position from each of the two MUS ranges.

Observation 14.

For n5, 𝒜(Fn)UnVn.

In Section 3.2, we first characterize a subset of position pairs in UnVn that cannot be an attractor of Fn by arguments based on the occurrence of singular words in Fn. We then prove in Section 3.3 that all other position pairs are attractors of Fn.

3.2 Invalid Attractor Position Pairs

Here, we characterize position pairs in UnVn that cannot be attractors of Fn by using occurrences of singular words in Fn. We first show that all occurrences of singular words Si in Fn can be captured by their occurrences in our recursive definition (Definition 7). We interpret the recursion as a grammar rule, and show that each occurrence of singular words in Fn corresponds to a node in the parse tree of this grammar, where a node in the parse tree is considered to span exactly the interval of positions corresponding to the substring it derives. See Figure 2 for a concrete example.

Figure 2: Illustration of Lemma 15 and Definition 18. Top: F9. Bottom: the parse tree of F9 based on singular words. For 2k7: the gray blocks are descendants of the center child Sk3 in the parse tree for Sk, i.e. Sk=Sk2Sk3Sk2. The green and blue blocks correspond to positions in Lk and Rk, respectively. (Notice that these positions are not crossed by any center child in the parse tree for Sk.) The positions corresponding to Lk are highlighted directly in orange.
Lemma 15.

Consider the equations of Lemma 9 and Definition 7 as grammar rules that derive Fn for n1, i.e., {Fn(i=0n2Si)S(n1)mod2,S1ε,S0a, S1b}{SiSi2Si3Si2i=2,,n2}. Then, for any i0, every occurrence of Si in Fn corresponds to a node in the parse tree of this grammar.

Proof.

Due to Corollary 10, there is no occurrence of Si in Fn before its first (leftmost) occurrence in a node of the parse tree. Suppose there is a later occurrence of Si that does not correspond to a node in the parse tree of the grammar, and consider the lowest common ancestor (LCA) in the parse tree of the leftmost position and rightmost position of the occurrence. From the above observation, if the LCA is Fn, this implies that an occurrence of Si crosses a boundary of SkSk+1 for some ki which violates Lemma 8 (3). Therefore, the LCA must be Sk for some k>i. Furthermore, since Si does not occur in Si+1 (Lemma 8 (2)), the LCA must be Sk for some k>i+1, thus, ik2. By definition, Sk=Sk2Sk3Sk2. Therefore, Si must have an occurrence in Sk (i) crossing both boundaries between Sk2 and Sk3, and between Sk3 and Sk2 (only when i=k2), (ii) crossing only the boundary of Sk2 and Sk3, or (iii) crossing only the boundary of Sk3 and Sk2. Case (i) cannot happen since Sk3 is not a substring of Sk2 (Lemma 8 (2)). Case (ii) directly violates Lemma 8 (3) and Case (iii) also violates Lemma 8 (3) due to the fact that Si is a palindrome and the statement of Lemma 8 (3) holds for SkSk1 as well. In the parse tree of Fn based on the grammar defined in the statement of Lemma 15, we say that the occurrence of Si is a center child of Si+3 if it is derived by the rule Si+3Si+1SiSi+1. Note that S2S0S0 has no (or an empty) center child. We say a position p is crossed by a node in the parse tree if the occurrence of the string derived by the node crosses p.

Lemma 16.

Let n5 and {u,v}UnVn. If u or v is crossed by a center child in the parse tree of some Si, then {u,v} is not an attractor of Fn.

Proof.

See Figure 3. Un and Vn correspond to the ranges of positions crossed by the MUSs Sn3 and Sn2 of Fn, respectively (Definition 12). Therefore, an attractor of size 2 of Fn must contain exactly one position from each of the ranges. By definition, Sn3=Sn5Sn6Sn5 and Sn2=Sn4Sn5Sn4. Here, Sn4 only occurs twice as children of Sn2, and does not occur elsewhere in the strings Sn3 and Sn2 (Lemma 15). Therefore, an attractor position must be crossed by one of the two occurrences of Sn4, and any position crossed by the center child Sn5 of Sn2 cannot be chosen as an attractor position, since it would not be crossed by Sn4. Similarly, there are three occurrences of Sn5; two as children of Sn3 and one as a center child of Sn2. However, since we cannot choose an attractor position in the center child of Sn2, an attractor position in Sn3 must be crossed by one of the two occurrences of Sn5. Therefore, a position crossed by the center child Sn6 of Sn3 cannot be chosen as an attractor position. The argument can be repeated recursively; For j=1,,n/22, given that the attractor positions must be crossed by occurrences of Sn2j1=Sn2j3Sn2j4Sn2j3 and Sn2j=Sn2j2Sn2j3Sn2j2 that were not center children in the sub-tree of the parse tree respectively of Sn3 and Sn2, attractor positions in the respective center children Sn2j4 and Sn2j3 cannot be chosen.

Figure 3: Illustration of the proof of Lemma 16 for n=11. Circles and crosses at the top mark valid and invalid attractor positions, respectively. A cross highlighted in a given color indicates that the position is invalid because it fails to be crossed by the substring shown in the same color. (Note that some combinations of the positions marked by circles in Sn3 and Sn2 are still invalid; these are characterized in Lemma 17.)
Lemma 17.

Let n7 and {u,v}UnVn. If uUn{minUn,minUn+1} and vVn is in the right child of the first occurrence of Sn2, then {u,v} is not an attractor of Fn.

Proof.

See Figure 4. Consider the occurrences of Sn4(Sn3[1..2]) in Fn. Due to Lemma 15, Sn4 has only three occurrences in Sn4Sn3Sn2S(n1)mod2, and thus in Fn, two of which are the left and right child of Sn2=Sn4Sn5Sn4. Since the last occurrence is only followed by a single symbol S(n1)mod2, it follows that there can only be two occurrences of Sn4(Sn3[1..2]) in Fn. Therefore, for an attractor position to be crossed by Sn4(Sn3[1..2]), if one of the first two positions in Un (corresponding to the first two positions of Sn3) is not chosen as an attractor position, then, we cannot choose a position in the right child of Sn2 for the other attractor position. Here, notice that we require n7, since otherwise, the second occurrence of Sn4(Sn3[1..2]) crosses the boundary of the center and right children of Sn2.

Figure 4: Illustration of the proof of Lemma 17 for n=9, where P=Sn3[1..2] and α=S(n1)mod2. Circles (resp. squares) at the top mark positions in Un (resp. Vn) that are not ruled out by Lemma 16. A circle-square pair in UnVn is invalid if they are both in a red region since they fail to be crossed by Sn4P. (All other circle-square pairs are indeed valid, which we prove in Section 3.3.)

3.3 Valid Attractor Position Pairs

In this subsection, we show that the position pairs in UnVn that are not invalidated by Lemma 16 nor Lemma 17 are indeed attractors of Fn.

Definition 18 (Lk, Rk, and Lk).

For k2, we define three subsets of positions within the first occurrence of Sk; let uk be the node in the parse tree corresponding to this occurrence. Let Lk be the set of positions in the left child of uk that are not crossed by any center child. Similarly, let Rk be the set of positions in the right child of uk that are not crossed by any center child. Further, let Lk be the set of positions corresponding to the occurrence of S2(kmod2) in the leftmost path in the parse tree rooted at uk (uk itself when uk=S2).

For example, L6={21,22,24,25}, R6={29,30,32,33}, L6={21,22}. See Figure 2.

Observation 19.

L2={3}, R2={4}, L2={3,4}, L3={5}, R3={7}, L3={5}, and

Lk =(Lk2Rk2)fk, (1)
Rk =(Lk2Rk2)fk+1=Lkfk1, (2)
Lk =Lk2fk. (3)

for k4. For k2,

Lk={{fk+1,fk+1+1} if k is even,{fk+1} if k is odd. (4)

Proof.

Equations (1) and (3) hold because, by Lemma 9, in the factorization Fn=S0S1Sk2¯Sk1Sk¯Sn2S(n1)mod2, the offset between the starting positions of the first occurrences of Sk2 and Sk is |Sk2Sk1|=fk. Equation 4 follows directly from Equation 3. Equation 2 holds because, in Sk=Sk2Sk3Sk2, the offset between the starting positions of the two occurrences of Sk2 is |Sk2Sk3|=fk1.

The following is straightforward from the definitions and the above observation.

Observation 20.

For k2, minLk=fk+1, maxLk=2fk1, minRk=fk+1+fk1, and maxRk=fk+21.

The following holds since all singular words are palindromes and thus the parse tree rooted at each singular word is symmetric, implying that for any k2, Lk and Rk are a “mirrored” image of the other with respect to some mid-point.

Observation 21.

For any k2, Rk=(fk+31)Lk, Lk+2=(fk+41)(LkRk).

Using the sets of Definition 18, the results of Section 3.2 can be summarized as follows.

Corollary 22.

For n7, 𝒜(Fn)((Ln3Rn3)Ln2)(Ln3Rn2).

Proof.

Lemma 16 implies that an attractor position pair must be in (Ln3Rn3)(Ln2Rn2), where Ln3Rn3Un and Ln2Rn2Vn. Furthermore, Lemma 17 implies that if one of the attractor positions is in Rn2, then the other position must be in the set {minUn,minUn+1}={fn2,fn2+1}. If n3 is even, this set is exactly Ln3. If n3 is odd, Ln3 only includes fn2, but then fn2+1 is a center child and cannot be an attractor position by Lemma 16. Therefore, the other position will be in Ln3. These imply that 𝒜(Fn)((Ln3Rn3)Ln2)(Ln3Rn2). Below, we show that all position pairs in this set are actually attractors of Fn.

Theorem 23.

For any n7, 𝒜(Fn)=((Ln3Rn3)Ln2)(Ln3Rn2).

 Note 24.

Since Ln3Ln3 for n6, Theorem 23 implies Ln3(Ln2Rn2)𝒜(Fn).

Since Corollary 22 establishes 𝒜(Fn)((Ln3Rn3)Ln2)(Ln3Rn2), we prove 𝒜(Fn)((Ln3Rn3)Ln2)(Ln3Rn2) using the following three lemmas.

Lemma 25.

For n8, if (Ln4Rn4)Ln3𝒜(Fn1), then Rn3Ln2𝒜(Fn).

Proof.

See Figure 5. For any {q,p}(Ln4Rn4)Ln3𝒜(Fn1) with q<p, let p=fnp1 and q=fnq1. Since pLn3 and qLn4Rn4, p=(fn1)pRn3 and q=(fn1)qLn2 by Observation 21. Thus, {p,q}Rn3Ln2. Since the mapping {p,q}{p,q} is bijective, it suffices to show that {p,q}𝒜(Fn).

From Observation 6, Gn=Fn1Gn2=Gn2(Fn1)R is a prefix of Fn. Essentially, p,q are positions in Fn that correspond to the positions p,q in Fn1, mapped to the occurrence of (Fn1)R, i.e., p=|Gn|p+1=fn2p+1=fnp1 and q=|Gn|q+1=fn2q+1=fnq1. Thus, by Observation 2, all substrings of (Fn1)R must have an occurrence that crosses p or q. In order to prove that {p,q} is an attractor of Fn, consider any substring u=Fn[i..j] that does not cross p nor q. Notice that since pminLn3=fn2, we have pfnfn21=fn11. Also, since qmaxRn4=fn21, we have qfn(fn21)1=fn1.

  1. 1.

    If j<p, then jfn12, so u is a substring of Gn1, which is a substring of (Fn1)R.

  2. 2.

    If p<ij<q, then u is trivially a substring of (Fn1)R.

  3. 3.

    If q<i, then ifn1+1 so u is a substring of Fn2, which is a substring of (Fn1)R because (Fn1)R=(Δn1)RGn1=(Δn1)RFn2Gn3.

In all these cases, u is a substring of (Fn1)R, which means u has an occurrence that crosses p or q. Therefore, {p,q} is an attractor of Fn.

Figure 5: Illustration of Lemma 25 for n=10. White and black markers at the top denote positions in 𝒜(Fn1) and 𝒜(Fn), respectively. Highlighted markers, together with the highlighted occurrences of Fn1 and (Fn1)R, illustrate the mapping described in the proof. Pink and orange squiggly arrows illustrate Case 1 and Case 3, respectively. (Note that Δn1=Δn¯ and (Δn1)R=Δn.)
Lemma 26.

For n7, if Rn3Ln2𝒜(Fn), then Ln3Ln2𝒜(Fn).

Proof.

See Figure 6. For any {p,q}Rn3Ln2𝒜(Fn) with p<q, let p=pfn4. We have {p,q}Ln3Ln2 since Rn3=Ln3fn4 (Equation 2). Since the mapping {p,q}{p,q} is bijective, it suffices to show that {p,q}𝒜(Fn).

Since {p,q} is an attractor of Fn, all substrings of Fn have an occurrence crossing p or q. Consider substrings of Fn that have occurrences crossing p but not q nor p. Since minLn3=fn2p<p<qmaxLn2=2fn21 and Fn=Fn2fn2Gn22fn22ΔnGn3Δn, all such occurrences are in a substring of Gn2. Furthermore, they have an occurrence crossing p=pfn4, since Fn=Fn1Fn2=Fn3Gn2Δn1Fn2 and Gn2 also occurs fn4=fn2fn3 positions to the left. Thus, all substrings of Fn have an occurrence crossing p or q, and therefore, {p,q} is an attractor of Fn.

Figure 6: Illustration of Lemma 26 for n=10. Black markers at the top denote positions in 𝒜(Fn). Relevant attractor positions and occurrences of Gn2 are highlighted.
Lemma 27.

For n9, if Ln5(Ln4Rn4)𝒜(Fn2), then Ln3Rn2𝒜(Fn).

Proof.

See Figure 7. For any {p,q}Ln5(Ln4Rn4)𝒜(Fn2) with pLn5 and qLn4Rn4, let p=p+fn1, q=q+fn1, and p′′=p+fn3=pfn2. Notice that fn2p′′fn2+1, p2fn2+1, and qfn1 can be seen from Equation 4 and Observation 20. It can be also seen that p′′Ln5fn3=Ln3 (Equation 3), and q(Ln4Rn4)fn1=Rn2 (Equation 2). Thus, {p′′,q}Ln3Rn2. Since the mapping {p,q}{p′′,q} is bijective, it suffices to show that {p′′,q}𝒜(Fn).

Consider any substring u=Fn[i..j] that does not cross p′′ nor q and the following cases.

  1. 1.

    If j<p′′, then u is a substring of Fn2 since p′′fn2+1.

  2. 2.

    If p′′<ij<p, then u is a substring of Fn2 since fn2p′′<p2fn2+1, and (Fn2)2 is a prefix of Fn=Fn1Fn2=Fn2Fn3Fn4Fn5Fn4=(Fn2)2Fn5Fn4.

  3. 3.

    If p′′<i<p<j<q, then u is a substring of Gn1 which crosses p, since fn2p′′<qfn1 and Fn=Fn2Gn1Δn.

  4. 4.

    If p<i, then u is a substring of Fn2, since Fn=Fn1Fn2 and p2fn2+1>fn1.

For Case 3, u has an occurrence that crosses p′′, since p′′=pfn2, and there is an occurrence of Gn1, fn2 positions to the left (as a prefix of Fn). It remains to show that all substrings of Fn2 have an occurrence crossing p′′ or q. Since {p,q} is an attractor of Fn2, Fn=Fn1Fn2=Fn2Fn3Fn2, and {p,q}={p,q}fn1, all substrings of Fn2 have an occurrence that crosses p or q. Furthermore, as was the case for Case 3, any substring of Fn2 crossing p but not crossing q is a substring of Gn1, and has an occurrence crossing p′′. Therefore, any substring will cross p′′ or q, and {p′′,q} is an attractor of Fn.

Figure 7: Illustration of Lemma 27 for n=10. White and black markers at the top denote positions in 𝒜(Fn2) and 𝒜(Fn), respectively.

Proof of Theorem 23.

The proof is by induction. 𝒜(F7) and 𝒜(F8) can be confirmed by brute force computation:

𝒜(F7) =((L4R4)L5)(L4R5)
=(({8,9}{11,12}){13,15})({8,9}{18,20})
={{8,13},{8,15},{8,18},{8,20},{9,13},{9,15},{9,18},{9,20},
{11,13},{11,15},{12,13},{12,15}}, and
𝒜(F8) =((L5R5)L6)(L5R6)
=(({13,15}{18,20}){21,22,24,25})({13}{29,30,32,33})
={{13,21},{13,22},{13,24},{13,25},{13,29},{13,30},{13,32},{13,33},
{15,21},{15,22},{15,24},{15,25},{18,21},{18,22},{18,24},{18,25},
{20,21},{20,22},{20,24},{20,25}}.

Under the induction hypothesis and Note 24, the conditions of Lemmas 25, 26, and 27 hold for n9, and thus, together with Corollary 22 and the above base cases, the theorem holds.

Corollary 28.

For k4, |𝒜(F2k1)|=(2k3+1)2k2 and |𝒜(F2k)|=(2k2+1)2k2.

Proof.

It is clear that |L2|=|R2|=|L3|=|R3|=1, and |Li|=|Ri|=2|Li2|=2|Ri2| for i4. Therefore, |L2k1|=|R2k1|=2k2 and |L2k|=|R2k|=2k1. Since |L2k1|=1 and |L2k|=2, we have from Theorem 23 that |𝒜(F2k1)|=|((L2k4R2k4)L2k3)(L2k4R2k3)|=(22k32k3)+22k3=(2k3+1)2k2 and |𝒜(F2k)|=|((L2k3R2k3)L2k2)(L2k3R2k2)|=(22k32k2)+2k2=(2k2+1)2k2.

4 The Smallest Attractors of Period-Doubling Words

Definition 29 (Dn).

For each n0, the nth period-doubling word is defined as D0=a, and Dn=ϕ(Dn1) where ϕ is a morphism defined by ϕ(a)=ab and ϕ(b)=aa. Note that |Dn|=2n.

Theorem 30.

𝒜(D2)={{2,3},{2,4}}. For n3, 𝒜(Dn)={{pn,rn}, {qn,rn}}, where pn=32n3, qn=2n1, and rn=32n2.

Schaeffer and Shallit [14] showed that for arbitrary prefixes of length at least 6 of the infinite period-doubling sequence, {pn,rn} is a smallest attractor when the length is in [2n,32n1), and {qn,qn+1}, when the length is in [32n1,2n+1). We consider only the length 2n prefixes, but characterize all smallest string attractors.

Observation 31.

Since any occurrence of b in Dn must have come from an occurrence of a in Dn1 by ϕ(a)=ab, an occurrence of b in Dn is always at an even position. Hence, bb cannot occur. This implies that an occurrence of aa starting at an odd position must be followed (provided it is not the end of the string) and preceded by ab, since it could only have come from ϕ(aba).

Furthermore, the above implies the following corollary.

Corollary 32.

Any occurrence of a substring x in Dn with |x|3 has the same parity, i.e., |{imod2Dn[i..i+|x|)=x}|=1.

Observation 33.

The following are known or easily verifiable properties of period-doubling words.

  1. (1)

    For n1, (Dn1)2=Dnc¯ where Dn=Dn[1..2n) and c=Dn[|Dn|].

  2. (2)

    For n2, Dn=Dn1(Dn2)2=Dn1cDn1c¯, where c=Dn1[|Dn1|].

  3. (3)

    For any i such that 0n2i<n, (Dn2i)2 is a suffix of Dn, and for any 0i<n, Di is a prefix of Dn.

We first show that the two position pairs are indeed attractors of Dn.

Lemma 34.

For n3, {{pn,rn},{qn,rn}}𝒜(Dn)

Proof.

The statement can be verified by brute force for n=3 and 4. Suppose the statement holds for all 3n<k. Let X=Dk[i..j](1ij2k) be an arbitrary substring of Dk, and let Y be the shortest even-length substring of Dk that contains the occurrence of X, starting at an odd position, and ending at an even position, i.e., Y=Dk[2i1..2j] where i=i2, j=j2. It holds that Y=ϕ(Y) where Y=Dk1[i..j]. Since {pk1,rk1} (resp. {qk1,rk1}) are attractors of Dk1, Y has an occurrence Dk1[i′′..j′′]=Y crossing pk1 (resp. qk1) or rk1, i.e., i′′sk1j′′ for some sk1{pk1,qk1,rk1}. Then, since 2i′′1<2sk1=sk2j′′, Y[2..|Y|] in the corresponding occurrence of Y=Dk[2i′′1..2j′′] will cross sk. Since Y[2..|Y|1] is a substring of X, X has an occurrence crossing sk or ending just before sk. See Figure 8. Thus, to prove that {pk,rk} and {qk,rk} are attractors of Dk, it remains to show that any substring X ending just before pk (resp. qk) or rk will have an occurrence crossing pk (resp. qk) or rk.

Since pk=|Dk2Dk3|, qk=|Dk1|, and Dk=Dk1cDk1c¯ (Observation 33 (2)), any substring X ending just before pk (resp. qk) has an occurrence ending just before pk+2k1=|Dk1Dk2Dk3| (resp. qk+2k1=|Dk|). Since Dk=Dk1(Dk2)2=Dk1Dk2Dk3(Dk4)2 and rk=|Dk1Dk2|, any such X not crossing rk must be a suffix of Dk3 (resp. Dk2), having an occurrence ending just before rk. See Figure 9.

Finally, we claim that any substring X ending just before rk will have occurrences crossing both pk and qk, or rk. We consider the following O(k) disjoint cases depending on |X|.

  1. 1.

    |X|>|Dk3Dk2|. See Figure 10 (a). Since the starting position of X is rk|X|<rk|Dk3Dk2|=32k22k32k2+1pk+1, X crosses both pk and qk.

  2. 2.

    |Dk3Dk2||X||(Dk4)2|. See Figure 10 (a) and Figure 11. Since Dk3Dk2=Dk[pk+1..rk1]=Dk[pk+1|Dk3|..rk1|Dk3|], it follows that Dk3Dk3Dk2 has a period of |Dk3|. Since |X||(Dk4)2|>|Dk3|, X starts with a suffix of Dk3 and therefore will have occurrences crossing pk and qk.

  3. 3.

    |(Dk2i)2|>|X||Dk2i|=|(Dk2i1)2| for i2,k2i10. See Figure 10 (b) and Figure 12. Due to Observation 33 (3), there is an occurrence of (Dk2i)2 centered at (i.e., the first copy ending at) both r=rk|(Dk2i)| and rk. Since X is a suffix of Dk2iDk2i and crosses r, it also has an occurrence crossing rk.

  4. 4.

    |(Dk2i1)2|>|Dk2i||X||Dk2i1|=|(Dk2i2)2| for i2,k2i20. See Figure 10 (b) and (c), and Figure 12. X is a suffix of Dk2i. There is an occurrence of (Dk3)2 centered at both pk and qk. Due to Observation 33 (3), there must be an occurrence of (Dk2i1)2 also centered at pk and qk, and thus an occurrence of Dk2i (Observation 33 (1)) of which X is a suffix. Since |X||Dk2i1|>|Dk2i1|, X has occurrences that cross pk as well as qk.

  5. 5.

    |X|=1. D3[p3]=D3[q3]=a and D3[r3]=b. It is easy to see that Dk[pk]=Dk[qk]=c and Dk[rk]=c¯ from the definition of ϕ, so X will cross both pk and qk, or rk.

Thus, {{pk,rk},{qk,rk}}𝒜(Dk), proving the lemma.

Figure 8: Illustration of the first paragraph of the proof of Lemma 34. Left: X=Y[2..|Y|] and i′′=sk1. Right: X=[1..|Y|1] and j′′=sk1. (Note that if X=Y, X=Y[2..|Y|], or X=[1..|Y|1] and j′′<sk1, then X has an occurrence crossing sk.)
Figure 9: Illustration of the second paragraph of the proof of Lemma 34. Blue and green blocks represent substrings that have an occurrence ending just before pk and qk, respectively, but do not have an occurrence crossing rk when considering its occurrence in the second half of the string via Dk1. Such substrings have occurrences ending just before rk.
Figure 10: Illustration of the proof of Lemma 34. There are 4 main cases depending on the length of X which is a suffix of Dk[1..rk) and shown in gray (except for Case 1, which already crosses both pk and qk), and the occurrence crossing both pk and qk, or rk is shown in orange.
Figure 11: Illustration of Case 2 in the proof of Lemma 34.
Figure 12: Illustration of Cases 34 in the proof of Lemma 34 for i=2 and i=3. The highlighted substrings follow the same color pattern in (b) and (c) of Figure 10.

Next, we will show that no other position pairs can be attractors of Dn with the help of the following lemma.

Lemma 35.

For n4, let {p,q}𝒜(Dn) and Dn[p]=a and Dn[q]=b. Then, p,q are both even and {p,q}={p/2,q/2}𝒜(Dn1).

Proof.

The strings aaa, aab, baa, bab, abab, aabaa, aabab, babab, babaa, ababab are all substrings of Dn for n4. It is clear that q is even from Observation 31.

We first claim that Dn[p+1]b. Suppose to the contrary that Dn[p+1]=b. Then, for aaa to have an occurrence crossing p, Dn[p2..p+1]=aaab, where the underlined a corresponds to position p. From Observation 31, we have Dn[q1..q]=ab, where the underlined b corresponds to position q. In order for the substrings baa and bab to have an occurrence crossing one of these positions, Dn[q3..q+4]=ababaaab, where the bold a and ab are due to Observation 31. Next, in order for the substrings aabaa and aabab to have an occurrence crossing p or q, Dn[p2..p+3]=aaabaa and Dn[q5..q+4]=aaababaaab. However, then, there cannot be an occurrence of ababab that crosses p or q contradicting that they are an attractor.

Next, we claim that p is even. If it is odd, then, from the above arguments, Dn[p..p+3]=aaab. We also have Dn[q1..q]=ab. For aab and abab to cross p or q, Dn[q3..q+2]=aaabab. Furthermore, for aabaa to cross p or q, Dn[p3..p+3]=aabaaab. However, then at least one of babab and babaa cannot cross p or q.

Finally, consider any substring X of Dn1. If |X|=1, then, from the above arguments, Dn1[p]=b since Dn[p]=a could not have been derived by ϕ(a), and Dn1[q]=a since Dn[q]=b must have been derived by ϕ(a). Hence, X crosses p or q. If |X|2, consider the corresponding substring X=ϕ(X) in Dn. Since {p,q} is an attractor of Dn, X has an occurrence crossing p or q. Furthermore, since |X|4 and the parity of its occurrences is determined uniquely (Corollary 32), an occurrence of X at position k in Dn crossing p or q implies an occurrence of X at position k/2 in Dn1 crossing p or q.

Proof of Theorem 30.

Assume the statement of Theorem 30 holds for all 3n<k. Lemma 35 implies that any element other than {pk,rk} or {qk,rk} in 𝒜(Dk) would imply an element in 𝒜(Dk1) not in {{pk1,rk1},{qk1,rk1}} contradicting the induction hypothesis. Together with Lemma 34, this completes the proof.

While we studied in earlier sections the smallest attractors of Fibonacci words and period-doubling words of higher orders (Fn for n7 and Dn for n3), for completeness, we list the smallest attractors of lower orders in Figure 13.

Figure 13: Smallest attractors of period-doubling words Dn for n=1,2,3 and Fibonacci words Fn for n=3,4,5,6,7. The visualization pattern follows that of Figure 1.

5 Discussion

Some natural related open problems are:

  • Characterization of all smallest bidirectional macro schemes (BMS) for the same family of strings considered.

  • Characterization of all smallest string attractors and BMS for arbitrary prefixes of the considered infinite sequence.

References

  • [1] Julien Cassaigne, France Gheeraert, Antonio Restivo, Giuseppe Romana, Marinella Sciortino, and Manon Stipulanti. New string attractor-based complexities for infinite words. J. Comb. Theory, Ser. A, 208:105936, 2024. doi:10.1016/J.JCTA.2024.105936.
  • [2] Aldo de Luca. A combinatorial property of the Fibonacci words. Inf. Process. Lett., 12(4):193–195, 1981. doi:10.1016/0020-0190(81)90099-5.
  • [3] Gabriele Fici. Factorizations of the Fibonacci infinite word. J. Integer Seq., 18(9):15.9.3, 2015. URL: https://cs.uwaterloo.ca/journals/JIS/VOL18/Fici/fici5.html.
  • [4] Lucian Ilie and William F. Smyth. Minimum unique substrings and maximum repeats. Fundam. Informaticae, 110(1-4):183–195, 2011. doi:10.3233/FI-2011-536.
  • [5] Dominik Kempa and Nicola Prezza. At the roots of dictionary compression: string attractors. In Ilias Diakonikolas, David Kempe, and Monika Henzinger, editors, Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2018, Los Angeles, CA, USA, June 25-29, 2018, pages 827–840. ACM, 2018. doi:10.1145/3188745.3188814.
  • [6] Donald E. Knuth, James H. Morris Jr., and Vaughan R. Pratt. Fast pattern matching in strings. SIAM J. Comput., 6(2):323–350, 1977. doi:10.1137/0206024.
  • [7] Kanaru Kutsukake, Takuya Matsumoto, Yuto Nakashima, Shunsuke Inenaga, Hideo Bannai, and Masayuki Takeda. On repetitiveness measures of Thue–Morse words. In Christina Boucher and Sharma V. Thankachan, editors, String Processing and Information Retrieval - 27th International Symposium, SPIRE 2020, Orlando, FL, USA, October 13-15, 2020, Proceedings, volume 12303 of Lecture Notes in Computer Science, pages 213–220. Springer, 2020. doi:10.1007/978-3-030-59212-7_15.
  • [8] N. Jesper Larsson and Alistair Moffat. Offline dictionary-based compression. In Data Compression Conference, DCC 1999, Snowbird, Utah, USA, March 29-31, 1999, pages 296–305. IEEE Computer Society, 1999. doi:10.1109/DCC.1999.755679.
  • [9] M. Lothaire. Sturmian Words, volume 90 of Encyclopedia of Mathematics and its Applications, pages 45–110. Cambridge University Press, 2002.
  • [10] Sabrina Mantaci, Antonio Restivo, Giuseppe Romana, Giovanna Rosone, and Marinella Sciortino. String attractors and combinatorics on words. In Alessandra Cherubini, Nicoletta Sabadini, and Simone Tini, editors, Proceedings of the 20th Italian Conference on Theoretical Computer Science, ICTCS 2019, Como, Italy, September 9-11, 2019, volume 2504 of CEUR Workshop Proceedings, pages 57–71. CEUR-WS.org, 2019. URL: https://ceur-ws.org/Vol-2504/paper8.pdf.
  • [11] Sabrina Mantaci, Antonio Restivo, Giuseppe Romana, Giovanna Rosone, and Marinella Sciortino. A combinatorial view on string attractors. Theor. Comput. Sci., 850:236–248, 2021. doi:10.1016/J.TCS.2020.11.006.
  • [12] Takuya Mieno, Shunsuke Inenaga, and Takashi Horiyama. RePair grammars are the smallest grammars for Fibonacci words. In Hideo Bannai and Jan Holub, editors, 33rd Annual Symposium on Combinatorial Pattern Matching, CPM 2022, Prague, Czech Republic, June 27-29, 2022, volume 223 of LIPIcs, pages 26:1–26:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.CPM.2022.26.
  • [13] Hamoon Mousavi. Automatic theorem proving in Walnut, 2021. arXiv:1603.06017.
  • [14] Luke Schaeffer and Jeffrey Shallit. String attractors for automatic sequences, 2024. arXiv:2012.06840.
  • [15] Zhi-Xiong Wen and Zhi-Ying Wen. Some properties of the singular words of the Fibonacci word. Eur. J. Comb., 15(6):587–598, 1994. doi:10.1006/EUJC.1994.1060.

Appendix A Using Walnut to Characterize the Smallest Attractors

Using the approach by Schaeffer and Shallit [14], we can characterize the smallest attractors of period-doubling and Fibonacci words using the following Walnut program. Below, we only introduce the connection and do not give rigorous arguments.

def pdfaceq "k+i>=j & A u,v (u>=i & u<=j & v+j=u+k) => PD[u]=PD[v]":
def pdsa2 "(i1<n) & (i2<n) & Ak,l (k<=l & l<n) => (Er,s r<=s & s<n &
 (s+k=r+l) & $pdfaceq(k,l,s) & ((r<=i1 & i1<=s) | (r<=i2 & i2<=s)))":
def pdfa1 "An (n>=2) => Ei1,i2 $pdsa2(i1,i2,n)":
def pdfa2 "$pdsa2(i1,i2,n) & i1 < i2":

def fibfaceq "?msd_fib k+i>=j & A u,v (u>=i & u<=j & v+j=u+k) => F[u]=F[v]":
def fibsa2 "?msd_fib (i1<n) & (i2<n) & Ak,l (k<=l & l<n) =>
 (Er,s r<=s & s<n & (s+k=r+l) & $fibfaceq(k,l,s)
 & ((r<=i1 & i1<=s) | (r<=i2 & i2<=s)))":
def fibfa1 "?msd_fib An (n>=2) => Ei1,i2 $fibsa2(i1,i2,n)":
def fibfa2 "?msd_fib $fibsa2(i1,i2,n) & i1 < i2":

The code for the automaton pdfa2 for period-doubling words is taken from [14]. The code for fibfa2 only changes PD (period-doubling words) to F (Fibonacci words), and specifies the numeration system the corresponding automaton is defined for.

See Figures 14 and 15. While these automata characterize the set of all smallest string attractors of arbitrary prefixes of the period-doubling words or Fibonacci words, their interpretation is not straightforward. To limit the lengths of prefixes to the words we consider, we can modify the above to:

reg pow2 msd_2 "10*":
def pdsapow2 "(i1<n) & (i2<n) & (i1<i2) & $pow2(n) & Ak,l (k<=l & l<n) =>
 (Er,s r<=s & s<n & (s+k=r+l) & $pdfaceq(k,l,s)
 & ((r<=i1 & i1<=s) | (r<=i2 & i2<=s)))":

reg fibpow msd_fib "10*":
def fibsaf "?msd_fib (i1<n) & (i2<n) & (i1<i2) & $fibpow(n) &
 Ak,l (k<=l & l<n) => (Er,s r<=s & s<n & (s+k=r+l) & $fibfaceq(k,l,s)
 & ((r<=i1 & i1<=s) | (r<=i2 & i2<=s)))":

Figure 16 shows the sub-automaton pdsapow2 of pdfa2 for paths corresponding to prefixes of D of lengths 2k, and can be used to verify the results of Theorem 30. For Fibonacci words, Figure 17 shows a sub-automaton fibsaf of fibfa2 containing only the accepting paths for prefixes of length fk, which can be used to verify the results of Theorem 23.

Figure 14: The automaton pdfa2 accepting a sequence s({0,1}×{0,1}×{0,1}) if and only if s[i]=(𝗉[i],𝗊[i],𝗇[i]) where 𝗉,𝗊,𝗇 are respectively the binary representation of integers p1, q1, n, satisfying {p,q}𝒜(D[1..n]) and p<q. Here, the 1 is due to the difference in the start index used for strings. By analyzing accepting paths for which 𝗇=10k implying n=2k we can verify the statement of Theorem 30. See also Figure 16.
Figure 15: The automaton fibsa2 accepting a sequence s({0,1}×{0,1}×{0,1}) if and only if s[i]=(𝗉[i],𝗊[i],𝗇[i]) where 𝗉,𝗊,𝗇 are respectively the bit representation, in Fibonacci numeration (Zeckendorf bit representation), of integers p1, q1, n satisfying {p,q}𝒜(F[1..n]) and p,q. Here, the 1 is due to the difference in the start index used for strings. The accepting paths for which 𝗇=10k implies n=fk+1 and the values p and q implied from 𝗉 and 𝗊 should correspond to the statement of Theorem 23. See Figure 17 for a simplified automaton containing only such paths.
Figure 16: The automaton pdsapow2 obtained by removing, from the automaton in Figure 14, all edges and nodes that are not part of accepting paths with 𝗇=10k implying n=2k. We can see that For k=2, 𝗉=001 implying p=2 and 𝗊=010 or 011 implying q=3 or 4, i.e., 𝒜(Dk)={{2,3},{2,4}}. For k3, 𝗉=00101k3 or 00111k3 implying p=32k3 or 2k1, and 𝗊=01011k3 implying q=32k2, i.e., 𝒜(Dk)={{32k3,32k2},{2k1,32k2}}, verifying the statement of Theorem 30.
Figure 17: The automaton fibsaf obtained by removing, from the automaton in Figure 15, all edges and nodes that are not part of accepting paths with 𝗇=10k representing fk+1 in the Fibonacci numeration. Each accepting path of length n starting with [0,0,1] represents a position pair in 𝒜(Fn), and the automaton can be used to verify Theorem 23 (in principle).

Appendix B Additional Figures

Figure 18: Extended version of Figure 1 for the case n=9. For each of Fn (bottom), Fn1 (top left), and Fn2 (top right), all of their smallest attractors are indicated as pairs of horizontally aligned dots. Characterization of the attractors of Fn via Theorem 23 is illustrated by colors: the blue and yellow dots illustrate the mapping via the occurrences of Fn1 and (Fn1)R in Lemma 25; the pink dots illustrate the offset in Lemma 26; while the green dots illustrate Lemma 27.