---
abstract: 'We show that a recently proposed Rudin–Shapiro-like sequence, with balanced weights, has purely singular continuous diffraction spectrum, in contrast to the well-known Rudin–Shapiro sequence whose diffraction is absolutely continuous. This answers a question that had been raised about this new sequence.'
address: 'School of Mathematics and Statistics, The Open University, Walton Hall, Milton Keynes MK7 6AA, United Kingdom Email addresses: {lax.chan,uwe.grimm}@open.ac.uk'
author:
- Lax Chan
- Uwe Grimm
title: 'Spectrum of a Rudin–Shapiro-like sequence'
---

Introduction
============

Substitution dynamical systems are widely used as toy models for aperiodic phenomena in one dimension [@PF02]. Crystallographers are interested in the diffraction spectrum of these systems because it provides information about the structure of a material [@BG12]. Dworkin [@SD93] showed that the diffraction spectrum is related to part of the dynamical spectrum, which is the spectrum of a unitary operator acting on a Hilbert space, as induced by the shift action. For recent developments regarding the relation between diffraction and dynamical spectra, we refer to the review [@BL16] and references therein.

The Rudin–Shapiro (RS) sequence [@Sha51; @Rud59] (in its (balanced) binary version with values in $\{\pm 1\}$) is a rare example of a substitution-based system with purely absolutely continuous diffraction spectrum (while its dynamical spectrum is mixed, containing the dyadic integers as its pure point part); see [@AS03] for background. A ‘Rudin–Shapiro-like’ (RSL) sequence was recently introduced and analyzed in [@PNR15]. It is defined as $$\label{eq:rsl}
  \textnormal{RSL}(n)\, =\, (-1)^{\textnormal{inv}^{}_2(n)},$$ where $\textnormal{inv}^{}_{2}(n)$ counts the number of occurences of $10$ (‘inversions’) as a scattered subsequence in the binary representation of $n$. In [@PNR15], it is shown that this sequence exhibits some similar properties as the Rudin–Shapiro sequence. In particular, this concerns the partial sums $\varSigma(N):=\sum_{0\leq n\leq N}\textnormal{RSL}(N)$, which are shown to have the form $\varSigma(N)=\sqrt{N}\,G(\log_{4}N)$, where $G$ is a function that oscillates periodically between $\sqrt{3}/3$ and $\sqrt{2}$. At the end of [@PNR15], the question is raised whether this similarity between the two sequences extends to the property that $$\label{eq:ineq}
  \sup_{\theta\in{{\mathbb{R}}}}\left|\sum_{n<N}RSL(n)\, e^{2\pi in\theta}\right| 
   \, \le\, C\, N^{\frac{1}{2}},$$ which is satisfied by the Rudin–Shapiro sequence [@AL91], and which is linked to the purely absolutely continuous diffraction measure of the balanced RS sequence.

In what follows, we are going to employ a recent algorithm by Bartlett [@AB14] to show that the Rudin–Shapiro-like sequence has purely singular continuous diffraction spectrum, pointing to a big structural difference to the Rudin–Shapiro sequence. In particular, this will imply that Equation  does *not* hold for the Rudin–Shapiro-like sequence.

A sketch of Bartlett’s algorithm
================================

By generalizing and developing previous work of Queffélec [@MQ10], Bartlett [@AB14] provides an algorithm that characterizes the spectrum of an aperiodic, constant length substitution $S$ on ${{\mathbb{Z}}}^{d}$. It describes the Fourier coefficients of mutually singular measures of pure type, giving rise to the maximal spectral type. Here, we can only give a brief sketch of Bartlett’s algorithm, concentrating on the case of dimension $d=1$.

We assume that the substitution system is primitive. We first compute the instruction matrices (or digit matrices) $R_j$, where $j\in[0,q)$ and $q$ is the length of the substitution (which will be $q=2$ in our case). These matrices encode the letters that appear at the $j$-th position of the image of the substitution system; we shall show this for the explicit example of the Rudin–Shapiro-like sequence below. The substitution matrix $M_S$ is given by the sum of the instruction matrices.

Due to primitivity, the Perron–Frobenius theorem [@BG13 Thm. 2.2] ensures that the eigenvector to the leading eigenvalue of $M_S$ can be chosen to have positive entries only. We denote this vector, after normalizing it to be a probability vector, by $u$. Note that $u=(u_{{\gamma}})_{{\gamma}\in\mathcal{A}}$ determines a point counting measure as it counts how frequently each letter ${\gamma}$ in the alphabet $\mathcal{A}$ appears asymptotically. One then applies the following lemma [@JP86] to verify aperiodicity. Another property that is used is the so-called height of the substitution $S$, which can be calculated using [@MQ10 Def. 6.1].

A primitive $q$-substitution $S$ which is one-to-one on $\mathcal{A}$ is aperiodic if and only if $S$ has a letter with at least two distinct neighbourhoods.

Bartlett’s algorithm employs the bi-substitution of the substitution $S$, which is defined as follows.

Let $S$ be a $q$-substitution on the alphabet $\mathcal{A}$. The substitution product $S\otimes S$ is a $q$-substitution on $\mathcal{A}\mathcal{A}$ (the alphabet formed by all pairs of letters in $\mathcal{A}$) with configuration $R\otimes R$ whose $j$-th instruction is the map $$(R\otimes R)_{j}\!:\, \mathcal{A}\mathcal{A}\longrightarrow 
     \mathcal{A}\mathcal{A}\quad\text{with}\quad
    (R\otimes R)_{j}\!:\,{\alpha}{\gamma}\longmapsto R_j({\alpha})R_j({\gamma}).$$ The substitution $S\otimes S$ is called the *bi-substitution* of $S$.

The Fourier coefficients $\widehat{{\Sigma}}$ of the correlation measures ${\Sigma}$ can then be obtained using following theorem of Bartlett [@AB14].

\[thm:AB1\] Let $S$ be an aperiodic $q$-substitution on $\mathcal{A}$. Then, for $p\in{{\mathbb{N}}}$, we have $$\widehat{{\Sigma}}(k)\, =\, \frac{1}{q^{p}}\sum_{j\in[0,q^{p})}R_{j}^{p}\otimes 
   R_{j+k}^{p}\,\widehat{{\Sigma}}\lfloor j+k\rfloor_{p} \, =\, 
   \lim_{n\to\infty}\frac{1}{q^{n}}\sum_{j\in[0,q^{n})}R_{j}^{n}\otimes 
   R_{j+k}^{n}\,\widehat{{\Sigma}}(0),$$ where $\lfloor j+k\rfloor_{p}$ is the quotient of $j+k$ under division modulo $q^{p}$. Here $R_j\otimes R_{j+k}$ is the Kronecker product of the instruction matrices at position $j$ and $j+k$.

Together with the above theorem and Michel’s lemma [@AB14 Thm. 2.1], we have $$\widehat{{\Sigma}}(0)\, =\, \sum_{{\gamma}\in\mathcal{A}}u\cdot e_{{\gamma}{\gamma}},$$ where in general $e_{\alpha\beta}$ is the standard unit vector in ${{\mathbb{C}}}^{\mathcal{A}^{2}}$ corresponding to the word $\alpha\beta$. Define the $p$-th carry set to be $\Delta_p(k):=\{j\in
[0,q^{p}):j+k\neq [0,q^{p})\}$. As a consequence of the above theorem, we have the following expression, $$\label{equation:1}
  \widehat{{\Sigma}}(1)\, =\, 
  \left(qI-\sum_{j\in\Delta_1(1)}R_j\otimes R_{j+1}\right)^{-1}
  \sum_{j\notin\Delta_1(1)} R_j\otimes R_{j+1}\, \widehat{{\Sigma}}(0).$$

We then use the following proposition [@AB14 Prop. 2.2] to compute the bi-substitution and to partition the alphabet into its ergodic classes and a transient part.

\[prop:AB2\] Let $S$ be a substitution of constant length on $\mathcal{A}$. Then there is an integer $h>0$ and a partition of the alphabet $\mathcal{A}=E_1\sqcup\cdots\sqcup E_k\sqcup T$ so that

1.  $S^{h}\!:\, E_{j}\to E_{j}^{+}$ is primitive for each $1\leq j\leq K$,

2.  ${\gamma}\in T$ implies $S^{h}({\gamma})\notin T^{+}$,

where $\sqcup$ denotes the disjoint union, $E_j$ its ergodic classes and $T$ the transient part. $E_{j}^{+}$ and $T^{+}$ are the words formed by elements of the ergodic classes and transient part, respectively.

We define the *spectral hull* $K(S)$ of a $q$-substitution to be $$K(S)\, :=\, \{v\in{{\mathbb{C}}}^{\mathcal{A}^{2}}: C_{S}^{t}v=qv \text{ and }
v\geq 0\},$$ and denote the *extreme rays* of $K(S)$ by $K^{*}$. Here, $C_S=\sum_{j}R_j\otimes R_j$, the sum of the Kronecker product of the instruction matrices at each position $j$. Using the following lemma of Bartlett [@AB14] and enforcing strong semi-positivity, we obtain the extreme rays $K^{*}$ of the spectral hull $K(S)$. Here, we use the notation $\vec{E}:=\sum_{{\gamma}\delta\in E}e_{{\gamma}\delta}\in{{\mathbb{C}}}^{\mathcal{A}^{2}}$.

\[lem:AB3\] A vector $v\in\mathbb{C}^{\mathcal{A}^{2}}$ satisfies $v\in K(S)$ if and only if $$v\, =\, V+P_{T}(QI-P_{T}C_{S}^{t})^{-1}P_{T}C_S^{t}V 
  \quad\text{and}\quad v\geq 0,$$ where $V=\sum_{j}w_j\vec{E}_{j}$ with $w_j\in{{\mathbb{C}}}$, and where $P_{T}$ is the standard projection onto the transient pairs $T$ of $\mathcal{A}^{2}$.

Finally, the *maximal spectral type* is given by $$\label{eq:mst}
   \sigma_{\textnormal{max}}\, \sim\, \omega_q*\sum_{w\in
  K^{*}}{\lambda}_{w},$$ where $\omega_q$ is a probability measure supported by the $q$-adic roots of unity. For each $w\in K^{*}$, we compute $$\widehat{{{\lambda}}_{w}}(k)\, =\, w\widehat{{\Sigma}}(k).$$ If $\widehat{{{\lambda}}_{w}}(k)$ is periodic in $k$, then ${\lambda}_{w}$ is a pure point measure, if $\widehat{{\lambda}_{w}}(k)=0$ for all $k\neq 0$, then ${\lambda}_w$ is Lebesgue measure. Otherwise, ${\lambda}_{w}$ is purely singular continuous. Thus, the maximal spectral type is completely characterized by this algorithm.

The Rudin–Shapiro-like sequence
===============================

The Rudin–Shapiro-like sequence of [@PNR15] can be described by the following substitution rule $$\label{eq:subst}
  S^{}_{\text{RSL}^{}}\!:\; 0\mapsto 01,\quad 1\mapsto 20,\quad 2\mapsto 13,
  \quad 3\mapsto 32,$$ on four letters. This is similar to the Rudin–Shapiro case, where the binary sequence is also obtained from a four-letter substitution rule, after applying a reduction map. We apply the recoding $0,1\to +1$ and $2,3\to -1$. Both letters $\pm 1$ then are equally frequent, so we are in the balanced weight case.

In the remaining of this article, we are going to apply Bartlett’s algorithm to prove the following result.

The (balanced weight) sequence $S^{}_{\text{RSL}^{}}$ has purely singular continuous diffraction spectrum.

The instruction matrices and the substitution matrix can be read off from the substitution rule of Equation  and are given by $$R_0= 
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 0 & 1 & 0\\
0 & 1 & 0 & 0\\
0 & 0 & 0 & 1
\end{pmatrix},\quad 
R_1=
\begin{pmatrix}
0 & 1 & 0 & 0 \\
1 & 0 & 0 & 0\\
0 & 0 & 0 & 1\\
0 & 0 & 1 & 0
\end{pmatrix}
\quad\textnormal{and}\quad
M_{\textnormal{RSL}}^{}=
\begin{pmatrix}
1 & 1 & 0 & 0 \\
1 & 0 & 1 & 0\\
0 & 1 & 0 & 1\\
0 & 0 & 1 & 1
\end{pmatrix}.$$ As $M_{\textnormal{RSL}}^{3}\gg 0$, the substitution is primitive. The third iterate of the seed $0$ is $01201301$, which shows that the letter $0$ can be preceded by $2$ or by $3$, and that the letter $1$ can be followed by either $2$ or by $3$. Hence both $0$ and $1$ have two distinct neighbourhoods and, by Pansiot’s Lemma, the sequence is aperiodic.

In accordance with the Perron–Frobenius theorem, we find ${\lambda}_{\textnormal{PF}}=2$ and $u=\frac{1}{4}(1,1,1,1)$ for the eigenvalue and statistically normalized eigenvector of $M_{\textnormal{RSL}}^{}$. By applying Theorem \[thm:AB1\], we obtain $\widehat{{\Sigma}}(0)=\frac{1}{4}\sum_{{\alpha}\in\mathcal{A}}e_{{\alpha}{\alpha}}$. As we are dealing with a length two substitution, we have $\Delta_{1}(1)=\{1\}$. Using Equation , we find that $$\widehat{{\Sigma}}(1)\, =\, 
  \left(0,\frac{1}{6},0,\frac{1}{12},0,0,\frac{1}{12},
  \frac{1}{6},\frac{1}{6},\frac{1}{12},0,0,\frac{1}{12},0,
   \frac{1}{6},0\right).$$ We then proceed to compute $\widehat{{\Sigma}}(k)$ for any $k\geq 2$.

By using Proposition \[prop:AB2\], we calculate the ergodic decomposition of the bi-substitution $S_{\textnormal{RSL}^{}}\otimes
S_{\textnormal{RSL}^{}}$ to obtain $$E_1=\{00,11,22,33\}, \quad 
    E_2=\{03,12,21,30\}, \quad 
    E_3=\{01,02,10,13,20,23,31,32\}$$ as the ergodic classes. In our case, the transient part turns out to be empty. Note that $E_1$ and $E_2$ contain exactly the same elements as the two corresponding ergodic classes of the Rudin–Shapiro sequence.

Using Lemma \[lem:AB3\], and taking into account that we have an empty transient part $P_T^{}=0$, it follows that $$v\, =\,\left(\begin{matrix}
   w_1 & w_3 & w_3 & w_2 \\
   w_3 & w_1 & w_2 & w_3\\
   w_3 & w_2 & w_1 & w_3\\
   w_2 & w_3 & w_3 & w_1
   \end{matrix} \right).$$ We then diagonalize the matrix $v$, $$v_d\, =\, \left(\begin{matrix}
   w_2+w_1+2w_3 & 0 & 0 & 0\\
   0 & w_2+w_1-2w_3 & 0 & 0\\
   0 & 0 & -w_2+w_1 & 0\\
   0 & 0 & 0 & -w_2+w_1
   \end{matrix}\right).$$ Setting $w_1=1$, strong semi-positivity is equivalent to $w_{2}$ and $w_{3}$ satisfying the following three inequalities, $$1-w_2\geq 0,\quad
   1+w_2+2w_3\geq 0,\quad
   1+w_2-2w_3\geq 0.$$ The extreme points are given by the solutions $(w_1,w_2,w_3)=(1,1,1)$, $(w_1,w_2,w_3)=(1,1,-1)$ or $(w_1,w_2,w_3)=(1,-1,0)$. Thus, the extremal rays are $$\begin{aligned}
  v_1=&(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1), \\ 
  v_2=&(1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1)\mbox { and }\\
  v_3=&(1,0,0,-1,0,1,-1,0,0,-1,1,0,-1,0,0,1).\end{aligned}$$ As usual, ${\lambda}_{v_1}=\delta_{0}$ which gives rise to the pure point component, via Equation . Using the previously computed values of $\widehat{{\Sigma}}(k)$, one checks that $\widehat{{\lambda}_{v_2}}(k)$ and $\widehat{{\lambda}_{v_3}}(k)$ do not vanish at all positions $k\neq 0$, which proves that there are no absolutely continuous components. One can then easily verify that the substitution system is of trivial height, therefore the pure point component is entirely supported by the Dirac measure $\delta_{0}$. The other two measures are neither absolutely continuous nor show the necessary periodicity to contribute to the pure point part. By Dekking’s theorem [@AB14 Thm. 5.6], we thus conclude that the other two measures have to be singular continuous. Thus, we have a purely singular continuous diffraction spectrum in the balanced weight case (in which the pure point component is extinguished).

If we assumed that the Rudin–Shapiro-like sequence satisfied the inequality , it would imply that the diffraction spectrum was absolutely continuous, as a consequence of the following result [@MQ10 Prop. 4.9].

If $\sigma$ is the unique correlation measure of the sequence $\gamma$, $\sigma$ is the weak-$*$ limit point of the sequence of absolute continuous measures $R_N\cdot m$, where $m$ is the Haar measure and $R_N=\frac{1}{N}\left|\sum_{n<N}\gamma(n)e^{2\pi
  in\theta}\right|^{2}$,

Let us denote $\zeta_N=R_N\cdot m$ and suppose weak convergence to a limit $\zeta$. Assuming that Equation  holds, it follows that $\zeta(g)\leq C\int g\ dm$, which implies absolute continuity. Hence, it follows from the singular diffraction that the inequality does *not* hold for the Rudin–Shapiro-like sequence.

Comparison with the Rudin–Shapiro sequence
==========================================

Let us close with a brief comparison with the Rudin–Shapiro sequence. The following result about the Rudin–Shapiro sequence is well known; see [@BG13 Ch. 10.2] and references therein for background and details.

The Rudin–Shapiro sequence (with balanced weights) has purely absolute continuous diffraction spectrum.

We refer the readers to [@AB14 Ex. 5.8] to see how Bartlett’s algorithm can be employed to show the above result.

Both the RS sequence and the RSL sequence are based on (four-letter) substitutions of constant length $q=2$ (and a subsequent reduction to a balanced two-letter sequence), and superficially looks quite similar, including sharing the behaviour of partial sums that we mentioned earlier. The ergodic classes $E_1$ and $E_2$ of both substitutions contain exactly the same elements. The elements that form the transient part of the Rudin–Shapiro sequence are exactly the same elements that form the third ergodic class of the Rudin–Shapiro-like sequence. However, the values obtained from the Fourier transform of the correlation measures differ between these two systems. Hence, we have two structurally different systems that exhibit a similar arithmetic structure.

Bartlett’s algorithm indicates that it may be quite difficult to construct substitution-based sequences with absolutely continuous diffraction spectrum, because it requires $\widehat{{\lambda}_{v}}(k)$ to vanish for *all* $k\ne 0$ for one of the extremal rays. Intuitively, this is the case because any non-trivial correlation will give rise to long-range correlations due to the built-in self-similarity of the substitution-based sequence. Generically, this property will not be fulfilled, so one should expect singular continuous spectra to dominate, which is indeed what is observed. A notable exception is provided by substitution sequences based on Hadamard matrices [@Fra03].

The authors would like to thank Michael Baake and Ian Short for many helpful discussions and comments on improving this paper, to Alan Bartlett on explaining his paper and Jean-Paul Allouche for sharing his preprint [@JA16]. The first author is supported by the Open University PhD studentship.

[99]{}

N. Pytheas Fogg, *Substitutions in Dynamics, Arithmetics and Combinatorics*, Lecture Notes in Mathematics Vol.  1794 (Springer, Berlin, 2002).

M. Baake, U. Grimm, Mathematical diffraction of aperiodic structures, *Chem. Soc. Rev.* **41** (2012) 6821–6843.

S. Dworkin, Spectral theory and [X]{}-ray diffraction, *J. Math. Phys.* **34** (1993) 2965–2967.

M. Baake, D. Lenz, Spectral notions of aperiodic order, *Preprint* arXiv:1601.06629.

H. Shapiro, *Extremal Problems for Polynomials and Power Series*, Masters thesis (MIT, Boston, 1951).

W. Rudin, Some theorems on fourier coefficients, *Proc. Amer. Math. Soc.* **10** (1959) 855–859.

J.-P. Allouche, J. Shallit, *Automatic Sequences* (Cambridge University Press, Cambridge, 2003).

P. Lafrance, N. Rampersad, R. Yee, Some properties of a [R]{}udin-[S]{}hapiro-like sequence, *Adv. in Appl. Math.* **63** (2015) 19–40.

J.-P. Allouche, P. Liardet, Generalized [R]{}udin-[S]{}hapiro sequences, *Acta Arith.* **60** (1991) 1–27.

A. Bartlett, Spectral theory of $\mathbb{Z}^{d}$ substitutions, *Ergod. Th. & Dynam. Syst.* (to appear, *Preprint* arXiv:1410.8106).

M. Queff[é]{}lec, *Substitution Dynamical Systems—Spectral Analysis*, 2nd Ed., Lecture Notes in Mathematics Vol.  1294 (Springer, Berlin, 2010).

M. Baake, U. Grimm, *Aperiodic Order. Vol. 1. A Mathematical Invitation*, Encyclopedia of Mathematics and its Applications Vol. 149 (Cambridge University Press, Cambridge, 2013).

J.-J. Pansiot, Decidability of periodicity for infinite words, *RAIRO Inform.  Théor. Appl.* **20** (1986) 43–46.

N. Frank, Substitution sequences in $\mathbb{Z}^{d}$ with a non-simple [L]{}ebesgue component in the spectrum, *Ergod. Th. & Dynam. Syst.* **23** (2003) 519–532.

J.-P. Allouche, On a [G]{}olay–[S]{}hapiro-like sequence, *Preprint*.
