Here is the Walnut code that verifies the various claims in their paper, especially pages 621-623, and also proves the conjecture implicitly given in Remark 4.7.
Yesterday I heard from Narad Rampersad that he recently came across this paper and found the same things.
In the paper he discussed the sequence s = 10001010101000101000... which is the fixed point of the morphism that sends 1 to 1000 and 0 to 10. In his paper with Fokkink, he analyzed this sequence using the Dumont-Thomas numeration system using the sequence 1, 2, 6, 16, 44, 120, ... that satisfies Bn+1 = 2Bn + 2Bn-1, and connected the sequence with √3. In particular his numeration system was not greedy.
However, if instead of the sequence above, we shift it by 1 and divide by 2, we get the sequence 1,3,8,22,60,... which I studied in this paper in 2024, and called the Kimberling numeration system. The advantage to this system is that it has simple greedy representations and an addable numeration system.
In this numeration system s has a rather simple description in terms of a
13-state automaton, which I call J.txt in honor of Joshi. Here it is:
msd_kim
0 1
0 -> 0
1 -> 1
2 -> 2
1 0
0 -> 3
1 -> 4
2 -> 2
2 0
0 -> 0
1 -> 1
3 0
0 -> 0
1 -> 1
2 -> 5
4 1
0 -> 6
1 -> 1
2 -> 2
5 1
0 -> 0
1 -> 1
6 0
0 -> 3
1 -> 7
2 -> 8
7 0
0 -> 6
1 -> 9
2 -> 10
8 1
0 -> 11
1 -> 1
9 1
0 -> 3
1 -> 4
2 -> 2
10 0
0 -> 3
1 -> 7
11 0
0 -> 12
1 -> 7
2 -> 8
12 1
0 -> 11
1 -> 1
2 -> 5
With this and the techniques in my paper mentioned above I imagine one can
obtain the same results as Joshi, in perhaps a simpler and more
straightforward way.
For example, consider x = x[1..8] = 01001010. Here the runs are (1,6), (3,4), and (4,8).
Counting the number of runs in a word has become a kind of industry in the field, culminating in the 2017 paper by Bannai et al. that proved that a word of length n has < n runs.
The Fibonacci words give a class of words with a lot of runs. They are defined by X1 = 1, X2 = 0, and Xn = Xn-1 + Xn-2 for n ≥ 3. In Walnut we can deal with the Fibonacci word Xn for n ≥ 2 as the prefix of length Fn of the infinite Fibonacci word f, which is built-in to Walnut under the name F. Recall that infinite words in Walnut are indexed starting at position 0.
As mentioned in Theorem 7 of Crochemore et al., it is known that there are exactly 2Fn-2 - 3 runs in Xn for n ≥ 5. We can prove this in Walnut as follows.