Keywords

1 Introduction

In the theory of continuous dynamical systems, Lyapunov exponents are a measure of the exponential divergence rate of two trajectories that are initially infinitesimally close in phase space [9]. As such, they quantify how a dynamical system responds to a perturbation of its initial state. For an N-dimensional dynamical system, this yields a Lyapunov profile consisting of N different Lyapunov exponents, one for each (mutually orthogonal) direction in phase space. As soon as one of the N Lyapunov exponents is non-zero, an initial perturbation will grow exponentially over time - this indicates a sensitive dependence on initial conditions. The details of the Lyapunov profile further specify the kind of dynamics that can occur.

In order to arrive at a comprehensive overview of CAs, many different measures have been proposed [3, 11, 13]. As a CA is essentially a discrete dynamical system, a measure that captures its sensitivity to the initial configuration and its possible chaotic dynamics is useful to gain insights into the dependence of the dynamical evolution on the initial configuration. However, the extension of the concept of Lyapunov exponents to CAs is not straightforward. For the case of two-state one-dimensional CAs, two separate viewpoints emerged in the early nineties. The first viewpoint was suggested by Wolfram, who defined the Lyapunov exponents of CA empirically by considering the average propagation velocity to the left and right of the defect pattern [12]. This idea was later formalized for binary one-dimensional CA by Shereshevsky [7] and further refined by other authors [4, 8]. This approach yields the left and right Lyapunov exponents \(\varLambda ^+(x)\) and \(\varLambda ^-(x)\) respectively for one-dimensional CA. The conditions under which Shereshevsky’s definition applies are fairly strict, which prompted Tisseur [8] to define the more generally applicable average Lyapunov exponents that are smaller than or equal to the exponents defined by Shereshevsky.

The second viewpoint, proposed by Bagnoli [2], is more similar to the familiar notion of Lyapunov exponents as the exponential divergence rate of nearby trajectories. This method was later extended by Baetens et al. in order to yield the full discrete Lyapunov profile of a CA rule [1].

Both of these approaches are currently only defined for two-state CAs. This significantly reduces their applicability in real-world scenarios, as CA relevant for such applications often require more than two states [5, 6]. This paper demonstrates how Bagnoli’s [2] approach for obtaining Lyapunov profiles for two-state CAs can be extended to three-state CAs while also distinguishing between the directionality of the defects, i.e. a state change from 1 to 0 is distinct from a change from 0 to 1. In addition to quantifying the exponential divergence rate of initially close trajectories for three-state CAs, this extension also captures the kind of defects that dominate the chaotic dynamics in certain CAs.

2 Lyapunov Profiles of Cellular Automata

2.1 Preliminaries

A CA can be conveniently represented by a sextuple \(\mathcal {C}=\left\langle \mathcal{T},S,s,s_0,\mathcal {N},\phi \right\rangle \). Here, \(\mathcal{T}\) denotes a countably infinite tessellation of a one-dimensional Euclidean space, consisting of consecutive intervals \(c_i, i \in \mathbb {N}\), referred to as sites, and S constitutes the space of states of the CA. The output function \(s:\,\mathcal{T}\times \mathbb {N}\rightarrow S\) yields the state value of site \(c_i\) at the t-th discrete time step, i.e. \(s(c_i,t)\). The function \(s_0:\,\mathcal{T}\rightarrow S\) assigns to every site \(c_i\) an initial state, i.e. \(s(c_i,0)=s_0(c_i)\). \(\mathcal {N}(c_i)\) is the neighborhood function with size \(\left| \mathcal {N} \right| \), i.e. \(\mathcal {N}(c_i) = (c_{i-1},c_i,c_{i+1})\). Finally, the transition function \(\phi :\, S^{\left| \mathcal {N} \right| } \rightarrow S \), that governs the dynamics of each site \(c_i\), is given by

$$\begin{aligned} s(c_i,t+1)=\phi (s(c_{i-1},t),s(c_i,t),s(c_{i+1},t))\,. \end{aligned}$$

2.2 Two-State CA

Extending the concept of Lyapunov exponents to CAs is not straightforward, as the original definition relies on tools from differential calculus, which are not applicable to CA since the state space \(S^\mathbb {N}\) is fully discrete. Instead of considering infinitesimally close initial configurations, one can instead consider initial configurations that differ only in a single site. The vector \(\boldsymbol{s}(t)\) denotes the defect pattern and indicates how such a perturbation in the initial configuration, referred to as a defect, propagates. For binary one-dimensional CAs, the time evolution of the defect pattern can be written recursively using the Boolean Jacobian matrix \(\boldsymbol{J}(\boldsymbol{s}(t),t)\) [2]:

$$\begin{aligned} \varDelta \boldsymbol{s}(t+1) = \boldsymbol{J}( \boldsymbol{s}(t),t) * \varDelta \boldsymbol{s}(t)\,, \end{aligned}$$
(1)

where \(*\) denotes the usual matrix multiplication but with the regular summation replaced by summation modulo 2. The matrix \(\boldsymbol{J}( \boldsymbol{s}(t),t)\) contains the Boolean partial derivatives of the transition function \(\phi :S^{\left| \mathcal {N}\right| }\rightarrow S\) [10]:

$$\begin{aligned} \big [\boldsymbol{J}( \boldsymbol{s}(t),t)\big ]_{ij}&= \dfrac{\partial s(c_i,t+1)}{\partial s(c_j,t)} \end{aligned}$$
(2)
$$\begin{aligned}&= {\left\{ \begin{array}{ll} 1,&{} \text {if } \phi \bigl (\tilde{s}(\mathcal {N}(c_i),t)\bigr ) =\phi \bigl (\tilde{s}_j(\mathcal {N}(c_i),t)\bigr )\,,\\ 0, &{} \text {otherwise}, \end{array}\right. } \end{aligned}$$
(3)

where \(\tilde{s}_j(\mathcal {N}(c_i),t)\) is the set obtained by replacing \(s(c_j,t)\) by its complement in the set \(\tilde{s}(\mathcal {N}(c_i),t)\).

These entries simply indicate whether or not flipping the value at site \(c_j\) at time t causes a change in the value at site \(c_i\) at time \(t+1\). Whether or not a change at site \(c_j\) propagates to site \(c_i\) depends on the entire neighborhood \(\mathcal {N}(c_i)\), which is why \(\boldsymbol{J}( \boldsymbol{s}(t),t)\) depends on the configuration \(\boldsymbol{s}(t)\). Note that for CA with a neighborhood size of three sites, \(\boldsymbol{J}( \boldsymbol{s}(t),t)\) is a tridiagonal matrix since the right hand side of Eq. (3) vanishes when \(c_j \notin \mathcal {N}(c_i)\), because perturbations of a certain site \(c_i\) can only affect sites in its neighborhood \(\mathcal {N}(c_i)\) over the course of a single time step.

Now, we let H(t) denote the sum of all elements of the defect pattern at a certain time step t. This equals the Hamming distance \(d_h\) between two configurations evolved from initial configurations differing only in a single site, denoted by \(\boldsymbol{s}(t)\) and \(\boldsymbol{s}^*(t)\):

$$\begin{aligned} H(t)&= d_h\big (\boldsymbol{s}(t),\boldsymbol{s}^*(t)\big ) \end{aligned}$$
(4)
$$\begin{aligned}&= \sum _{i} \varDelta s(c_i,t), \end{aligned}$$
(5)

where \(\varDelta s(c_i,t)\) denotes the ith element of the vector \(\varDelta \boldsymbol{s}(t)\). Due to the local nature of CAs, H(t) can grow at most linearly with time, so the Hamming distance is not a suitable metric to define exponential divergence in \(S^N\).

Bagnoli resolved this issue for binary one-dimensional CAs by considering the number of ways in which defects can propagate to a certain time step, instead of simply considering the number of defects at a certain time step [2]. The damage vector \(\boldsymbol{n}(t)\) is defined as the vector whose i-th entry contains the number of ways in which the initial defect can propagate to site \(c_i\) in t time steps (i.e. the number of defect paths). The evolution of \(\boldsymbol{n}(t)\) is again written recursively using the Boolean Jacobian matrix:

$$\begin{aligned} \boldsymbol{n}(t+1) = \boldsymbol{J}( \boldsymbol{s}(t),t), \boldsymbol{n}(t)\,, \end{aligned}$$
(6)

where regular matrix multiplication takes place. It is clear that the total number of ways in which defects can propagate to time step t is given by the sum of all entries in \(\boldsymbol{n}(t)\), further denoted by \(\epsilon (t)\). This quantity can grow exponentially with time.

In summary, for one-dimensional binary CAs the defect pattern \(\boldsymbol{s}(t)\) and damage vector \(\boldsymbol{n}(t)\) are determined by the following recursion relations:

$$\begin{aligned} \varDelta \boldsymbol{s}(t+1)&= \boldsymbol{J} ( \boldsymbol{s}(t),t) * \varDelta \boldsymbol{s}(t), \end{aligned}$$
(7)
$$\begin{aligned} \boldsymbol{n}(t+1)&= \boldsymbol{J} ( \boldsymbol{s}(t),t), \boldsymbol{n}(t), \end{aligned}$$
(8)

From this, we infer the following upper bounds for H(t) and \(\epsilon (t)\) [1]

$$\begin{aligned} H(t) = \sum _i \varDelta s(c_i,t)&\le \left( \left| \mathcal {N} \right| -1\right) t+1, \end{aligned}$$
(9)
$$\begin{aligned} \epsilon (t) = \sum _i n(c_i,t)&\le \left| \mathcal {N} \right| ^t, \end{aligned}$$
(10)

where \(\left| \mathcal {N} \right| \) is the size of the neighborhood (e.g. \(\left| \mathcal {N} \right| =3\) for elementary CA).

From the above discussion it is clear that considering \(\epsilon (t)\) instead of H(t) provides a way to meaningfully define the exponential divergence of trajectories in \(S^\mathbb {N}\). This can be used to define Lyapunov exponents in the context of CAs in a way that complies with the definition of Lyapunov exponents for continuous dynamical systems. In particular, Bagnoli defined the total Lyapunov exponent as [2]

$$\begin{aligned} \varLambda _1 = \lim _{t \rightarrow \infty } \dfrac{1}{t} \log \left( \dfrac{\epsilon (t)}{\epsilon (0)} \right) , \end{aligned}$$
(11)

where \(\log \) indicates the natural logarithm. However, this discards the information regarding the distribution of defects in \(\boldsymbol{n}(t)\) [1]. A different approach considers a one-dimensional finite CA of size N as an N-dimensional dynamical system, where each site in the lattice corresponds to one of N dimensions, and introduces a finite-time profile of N Lyapunov exponents as follows [1]:

$$\begin{aligned} \boldsymbol{\varLambda }(T) = \dfrac{1}{T} \log (\boldsymbol{n}(T)), \end{aligned}$$
(12)

where the is applied element-wise. The elements of \(\boldsymbol{\varLambda }(T)\) may be understood as the time-averaged exponential rates by which the number of defects grows in the sites of the CA. As such, the profile consisting of N Lyapunov exponents is analogous to the spectrum of N Lyapunov exponents associated with an N-dimensional continuous dynamical system.

The above definition relies on the fact that there is only one type of defect (i.e. \(1 \rightarrow 0\) defects). However, when considering three-state CAs, there are three possible defects (i.e. \(1 \rightarrow 0\), \(1 \rightarrow 2\) and \(2 \rightarrow 0\) defects). Furthermore, when explicitly accounting for the directionality of the defects, there are six possible defects in the case of three-state CAs. This makes the above definition not applicable to CAs with more than two states.

2.3 Three-State CAs

This section discusses how the approach for two-state CAs can be generalized to the three-state directional case. Such a generalization defines six Lyapunov exponents, each one quantifying how one of the six types of defects propagates. Note that in this paper we implement and illustrate our approach for three-state CA, but it is applicable to CA with any number of states. As the number of states k increases, the number of possible types of defects increases as \(k(k-1)\), so the required computing power to compute the Lyapunov profiles increases drastically with k.

The extension to three-state CA entails a change in how the entries of the Jacobian \(\boldsymbol{J}(\boldsymbol{s}(t),t)\) are defined. Now, \(\boldsymbol{J}( \boldsymbol{s},(t)t)\) contains not only the Boolean partial derivatives of the transition function \(\phi :S^{\left| \mathcal {N}\right| }\rightarrow S\), but also a label that expresses the type of defect that occurs:

$$\begin{aligned} \big [\boldsymbol{J}( \boldsymbol{s}(t),t)\big ]_{ij} = {\left\{ \begin{array}{ll} \tau _{vw},&{} \text {if } \phi \bigl (\tilde{s}(\mathcal {N}(c_i),t)\bigr ) \ne \phi \bigl (\tilde{s}_{j,vw}(\mathcal {N}(c_i),t)\bigr )\,,\\ [0.2cm] 0,&{} \text {if } \phi \bigl (\tilde{s}(\mathcal {N}(c_i),t)\bigr ) = \phi \bigl (\tilde{s}_{j,vw}(\mathcal {N}(c_i),t)\bigr )\,, \end{array}\right. } \end{aligned}$$
(13)

where \(\tilde{s}_{j,vw}(\mathcal {N}(c_i),t)\) is the set obtained by perturbing \(s(c_j,t)\) from state v, to state w in the set \(\tilde{s}(\mathcal {N}(c_i),t)\). The values of v and w depend on the kind of defect that arrives at the site \(c_i\).

Now, the evolution of \(\boldsymbol{n}(t)\) can be written recursively using the Jacobian matrix:

$$\begin{aligned} \boldsymbol{n}(t+1) = \boldsymbol{J}( \boldsymbol{s}(t),t), \boldsymbol{n}(t)\,, \end{aligned}$$
(14)

where the regular matrix multiplication takes place. Now, the entries of \(\boldsymbol{n}(t)\) contain polynomials in \(\tau _{vw}\). Each term in such a polynomial in the ith entry of \(\boldsymbol{n}(t)\) represents a certain defect path that arrives at site i in t time steps. The exponent of \(\tau _{vw}\) in such a term represents the number of times the defect \(\tau _{vw}\) occurs in this defect path.

We illustrate this approach for the three-state totalistic CA with rule number 420 according to Wolfram’s enumeration scheme. We choose this rule because it is the only totalistic rule for which all Boolean derivatives are non-zero, therefore yielding a maximum Lyapunov exponent. For a totalistic rule, the state space is \(S = \{0, 1, 2 \}\), is endowed with the regular addition, and the updated site value depends only on the sum of the values in its neighborhood at the previous time step: \(s(c_i,t+1)=\phi (s(c_{i-1},t)+s(c_i,t)+s(c_{i+1},t)).\)

Figure 1a shows the defect pattern generated by this rule starting from a random initial configuration of nine sites evolved over three time steps. The damage spreading is shown in Fig. 1b.

Fig. 1.
figure 1

The defect pattern generated by totalistic three-state rule 420. For simplicity, only the paths arriving at the two leftmost sites in the defect pattern in Fig. 1b have been labelled.

In the binary non-directional case, an arrow appears in the damage pattern when the Boolean derivative equals one and no arrow otherwise. In the three-state directional case, the arrows are labelled according to the type of propagating defect. The polynomial at \(\big [\boldsymbol{n}(t=3)\big ]_{i=1}\) equals \(\tau _{20}\tau _{02}\tau _{12}\). This indicates that there is a single defect path arriving at site \(c_i=1\), which consists of three different defects \(\tau _{20}\), \(\tau _{02}\) and \(\tau _{12}\). When moving closer towards the center of the lattice, where the defect was introduced, the number of defect paths arriving at a certain site increases. The polynomial at \(\big [\boldsymbol{n}(t=3)\big ]_{i=2}\) equals \(\tau _{20}\tau _{02}\tau _{12}+\tau _{20}^2\tau _{02}+\tau _{20}^2\tau _{01}\). Now there are three terms in the polynomial, indicating that there are three defect paths arriving at site \(c_i=2\). Note that the sum of the exponents of each term in the polynomial equals the number of time steps.

3 Results and Discussion

3.1 Experimental Setup

Using the definition for directional Lyapunov profiles of three-state CAs, we will illustrate this approach for the case of some exemplary totalistic three-state rules. For each of these rules, the propagation of defects emerging from a single defect was tracked for 15 time steps in a one-dimensional system consisting of 30 sites. We restrict ourselves to random initial configurations and a single initial defect in the center of the lattice, though we should be aware that the Lyapunov profiles might depend on the initial configuration from which they are evolved in the sense that for some rules and initial configuration defects will die out by chance, whereas they will be able to propagate for other initial configurations. In order to yield a more clear visualization of the results, the discrete points which yield the Lyapunov profiles are connected by lines so as to yield continuous profiles.

For each of Wolfram’s classes [12], a representative totalistic three-state rule is chosen and its space-time pattern, defect pattern and corresponding Lyapunov profiles are computed. Totalistic rules are chosen for which the steady-state behavior is reached after a single time step, as we want the finite-time Lyapunov profile to reflect the steady-state behavior instead of the transient phenomena. This avoids the need to simulate for long time periods. Computing Lyapunov profiles for rules with long transients is an objective of future work.

3.2 Class I

Class I behaviour is trivial. After a transient, the defect pattern vanishes for all class I rules and the Lyapunov exponents are zero everywhere. This means that any defect introduced in the initial configuration can only propagate over a small finite distance in the lattice, before the system settles on the same equilibrium state. This is true for all class I rules, not just the one-dimensional totalistic rules considered here [2].

3.3 Class II

After a transient, the defect pattern associated with Class II rules becomes non-expanding and periodic. Yet, it often strongly depends on the initial configuration. As the defect pattern is non-expanding, the Lyapunov exponents are non-zero only in certain regions as the defects can only propagate within certain limits. Additionally, the magnitude of the Lyapunov exponents associated with different kinds of defects varies considerably, depending on the type of defects that constitute the periodic section of the defect pattern. This is illustrated in Fig. 2, where the \(1\rightarrow 0\) defects make up an important part of the periodic section of the defect pattern. This is reflected in the corresponding Lyapunov profile. Additionally, it is clear that the Lyapunov profile is non-zero only in those sections of the lattice where the periodic part of the defect pattern persists

Fig. 2.
figure 2

The space-time pattern generated by Class II rule 126 along with the corresponding defect pattern and Lyapunov profiles.

3.4 Class III

Class III rules yield defect patterns that are expanding, often at a maximal rate. This in turn yields Lyapunov profiles that are largely overlapping and non-zero everywhere, with their maximal value at the center of the lattice. This is illustrated for rule 420 in Fig. 3. In addition, Lyapunov profiles associated with class III rules are relatively independent of the initial configuration. Class III CA are typically associated with chaotic systems. The resulting space-time patterns are virtually random, with some class III rules finding use as random number generators. As such, class III rules yield defects that are uniformly and randomly distributed over the defect pattern, yielding the largely overlapping profiles. The maximum occurs near the center site as the number of paths reaching a certain site decreases when moving away from this center.

Fig. 3.
figure 3

The space-time pattern generated by class III rule 420 along with the corresponding defect pattern and Lyapunov profiles.

3.5 Class IV

Class IV is often seen as lying in the phase transition between Class II and III rules, which is reflected in their defect pattern and Lyapunov profiles: the defect pattern is irregularly expanding and highly dependent on the initial configuration. This yields Lyapunov profiles that are non-zero in an ever increasing part of the lattice, yet there are still zones where a sharp transition to zero occurs. Additionally, whereas the Lyapunov profiles of class III rules have a single maximum that usually occurs near the center of the lattice, class IV rules often lead to Lyapunov profiles exhibiting any number of local extrema, which is illustrated for class IV rule 114 in Fig. 4. This multitude of extrema reflects the irregular nature of the defect pattern that class IV rules tend to generate. In particular, a minimum in the profile can signify the splitting of the defect pattern into two separate clusters.

Figure 5 shows the space-time pattern, defect pattern and Lyapunov profiles for class IV rule 63. It is clear that \(2 \rightarrow 0\) defects yield a Lyapunov profile that is significantly higher than those associated with any other type of defect. This highlights the tendency of some class IV rules to yield defect patterns dominated by a single kind of defect. In the large time limit, any given defect path will consist almost entirely of a single type of defect. This is similar to the theory of continuous dynamical systems, where the largest of the N Lyapunov exponents dominates the others and completely determines the type of chaotic behavior. These distinct features exhibited by the class IV profiles are very relevant, as they can be used to distinguish class III from class IV CA, which has been proven to otherwise be exceptionally difficult [11].

Fig. 4.
figure 4

The space-time pattern generated by class IV rule 114 along with the corresponding defect pattern and Lyapunov profiles.

Fig. 5.
figure 5

The space-time pattern generated by class IV rule 63 along with the corresponding defect pattern and Lyapunov profiles.

4 Conclusions

In this paper, we have shown how the existing notion of Lyapunov exponents of two-state CA can be extended to three-state CA by specifying the kind of defect that can propagate in each entry of the Jacobian. Aside from permitting similar insights into CA dynamics for the three-state case as for the two-state case, this approach has the additional advantage of distinguishing between the directionality of the defects.

In both theoretical and practical scenarios, the most interesting CA are found in Wolfram’s class IV. These CA also provide the most interesting Lyapunov profiles. In particular, they reveal that often a single kind of defect dominates the profile, which indicates that the CA responds to a perturbation in a very particular way, so as to provide a possible characterization of the specific CA. This is useful information to have when a CA is used as a computational model in a practical context. Additionally, the distinctive features the class IV profiles exhibit can be used to address the difficult task of distinguishing class III from class IV CA.

Our approach was illustrated for three-state CA, but is applicable to CA with any number of states, yet the required computing power increases drastically when the number of states increases and hence additional work will be needed to increase the efficiency of the methodology and computation.