Probabilistic initial value problem for cellular automaton rule 172

We present a method of solving of the probabilistic initial value problem for cellular automata (CA) using CA rule 172 as an example. For a disordered initial condition on an inﬁnite lattice, we derive exact expressions for the density of ones at arbitrary time step. In order to do this, we analyze topological structure of preimage trees of ﬁnite strings of length 3. Level sets of these trees can be enumerated directly using classical combinatorial methods, yielding expressions for the number of n -step preimages of all strings of length 3, and, subsequently, probabilities of occurrence of these strings in a conﬁguration obtained from the initial one after n iterations of rule 172. The density of ones can be expressed in terms of Fibonacci numbers, while expressions for probabilities of other strings involve Lucas numbers. Applicability of this method to other CA rules is brieﬂy discussed.


Introduction
While working on a certain problem in complexity engineering, that is, trying to construct a cellular automaton rule performing some useful computational task, the author encountered the following question.Let f : {0, 1} 3 → {0, 1} be defined as This function may be called selective copier, since it returns (copies) one of its inputs x 2 or x 3 depending on the state of the first input variable x 1 .Suppose now that s be a bi-infinite sequence of binary symbols, i.e., s = . . .s −2 s −1 s 0 s 1 s 2 . .., i ∈ Z.We will transform this string using the selective copier, that is, for each i, we keep s i if it is preceded by 0, or replace it by s i+1 otherwise, so that each s i is simultaneously replaced by f (s i−1 , s i , s i+1 ).Consider now the question: Assuming that the initial sequence is randomly generated, what is the proportion of 1's in the sequence after n iterations of the aforementioned procedure?
Function defined by eq. ( 1) is a local function of cellular automaton rule 172, using Wolfram numbering, and the aforementioned question is an example of a broader class of problems, which could be called probabilistic initial value problems for cellular automata: given initial distribution of infinite configurations, what is the probability of occurrence of a given finite string in a configuration obtained from the initial one by n iterations of the cellular automaton rule?In what follows, we will demonstrate how one can approach probabilistic initial value problem using cellular automaton rule 172 as an example.

Basic definitions
Let G = {0, 1, ...N −1} be called a symbol set, and let S(G) be the set of all bisequences over G, where by a bisequence we mean a function on Z to G. Set S(G) will be called the configuration space.Throughout the remainder of this text we shall assume that G = {0, 1}, and the configuration space S(G) = {0, 1} Z will be simply denoted by S.
the set of all blocks of length n over G and B be the set of all finite blocks over G.
Alternatively, the function f can be considered as a mapping of Corresponding to f (also called a local mapping) we define a global mapping F : S → S such that (F (s)) i = f (s i−r , . . ., s i , . . ., s i+r ) for any s ∈ S.
A block evolution operator corresponding to f is a mapping f : B → B defined as follows.Let r ∈ N be the radius of f , and let a = a 0 a 1 . . .a n−1 ∈ B n where n ≥ 2r + 1 > 0. Then (2) We will consider the case of G = {0, 1} and r = 1 rules, i.e., elementary cellular automata.In this case, when b ∈ B 3 , then f (b) = f (b).The set B 3 = {000, 001, 010, 011, 100, 101, 101, 110, 111} will be called the set of basic blocks.
The number of n-step preimages of the block b under the rule f is defined as the number of elements of the set f −n (b).Given an elementary rule f , we will be especially interested in the number of n-step preimages of basic blocks under the rule f .

Probabilistic initial value problem
The appropriate mathematical description of an initial distribution of configurations is a probability measure µ on S. Such a measure can be formally constructed as follows.If b is a block of length k, i.The Kolmogorov consistency theorem states that every probability measure µ satisfying the consistency condition extends to a shift invariant measure on S (Dynkin, 1969) .For p ∈ [0, 1], the Bernoulli measure defined as µ p [C(b)] = p j (1 − p) k−j , where j is a number of ones in b and k − j is a number of zeros in b, is an example of such a shift-invariant (or spatially homogeneous) measure.It describes a set of random configurations with the probability p that a given site is in state 1.
Since a cellular automaton rule with global function F maps a configuration in S to another configuration in S, we can define the action of F on measures on S. For all measurable subsets E of S we define If the initial configuration was specified by µ p , what can be said about F n µ p (i.e., what is the probability measure after n iterations of F )? In particular, given a block b, what is the probability of the occurrence of this block in a configuration obtained from a random configuration after n iterations of a given rule?
The general question of finding the iterrates of the Bernoulli measure under a given CA has been extensively studied in recent years by many authors, including, among others, Lind (1984); Ferrari et al. (2000); Maass and Martínez (2003); Host et al. (2003); Pivato andYassawi (2002, 2004); Maass et al. (2006) and Maass et al. (2006).In this paper, we will approach the problem from somewhat different angle, using very elementary methods and without resorting to advanced apparatus of ergodic theory and symbolic dynamics.We will consider iterates of the Bernoulli measure by analyzing patterns in preimage sets.
For a given block b, the set of n-step preimages is f −n (b).Then, by the definition of the action of F on the initial measure, we have and consequently Let us define the probability of occurrence of block b in a configuration obtained from the initial one by n iterations of the CA rule as Using this notation, eq. ( 5) becomes If the initial measure is µ 1/2 , then all blocks of a given length are equally probable, and P 0 (a) = 1 2 |a| , where |a| is the length of the block a.For elementary CA rule, the length of n-step preimage of b is 2n + |b|, therefore This equation tells us that if the initial measure is symmetric (µ 1/2 ), then all we need to know in order to compute P n (b) is the cardinality of f −n (b).One way to think about this is to draw a preimage tree for b.We start form b as a root of the tree, and determine all its preimages.Then each of these preimages is connected with b by an edge.They constitute level 1 of the preimage tree.Then, for each block of level 1, we again compute its preimages and we link them with that block, thus obtaining level 2. Repeating this operation ad infinitum, we obtain a tree such as the one shown in Figure 1.In that figure, five levels of the preimage tree for rule 172 rooted at 101 are shown, with only first level labelled.Note that card f −n (b) corresponds to the number of vertices in the n-th level of the preimage tree.One thus only needs to know cardinalities of level sets in order to use eq.( 8), while the exact topology of connections between vertices of the preimage tree is unimportant.The key problem, therefore, is to enumerate level sets.In order to answer the question posed in the introduction, we need to compute P n (1) for rule 172, which, in turn, requires that we enumerate level sets of a preimage tree rooted at 1.It turns out that for rule 172 the preimage tree rooted at 1 is rather complicated, and that it is more convenient to consider preimage trees rooted at other blocks.In the next section, we will show how to express P n (1) by some other block probabilities.From now on, f will exclusively denote the block evolution operator for rule 172.

Structure of preimage sets
The structure of level sets of preimage trees rooted at 001, 101, and 111 will be described in the following three propositions.
where represents arbitrary symbol from the set {0, 1}.
Two observations will be crucial for the proof.First of all, f −1 (101) = {01101, 11101}, thus f −1 (101) has the structure 1101.Furthermore, we have f −1 (1101) = {011101, 101101, 111101}, meaning that if 1101 appears in a configuration, and is not preceded by 00, then after application of the rule 172, 1101 will still appear, but shifted one position to the left.All this means that if b is to be an n-step preimage of 101, it must end with 1101.After each application of rule 172 to b, the block 1101 will remain at the end as long as it is not preceded by two zeros.Now, let us note that f −1 (00) = {0000, 0001, 1000, 1001, 1100}, which means that preimage of 00 is either 1100 or 00 .Therefore, we can say that if 00 is not present in the string a 1 a 2 . . .a n , it will not appear in its consecutive images under f .Thus, block 1101 will, after each iteration of f , remain at the end, and will never be preceded by two zeros.Eventually, after n iterations, it will produce 101, as shown in the example below.
1 0 1 0 0 1 1 1 0 1 1 0 1 What is left to show is that not having 00 in a 1 a 2 . . .a n is necessary.This is a consequence of the fact that f ( 00 ) = 00, which means that if 00 appears in a string, then it stays in the same position after the rule 172 is applied.Indeed, if we had a pair of adjacent zeros in a 1 a 2 . . .a n , it would stay in the same position when f is applied, and sooner or later block 1101, which is moving to the left, would come to the position immediately following this pair, and would be destroyed in the next iteration, thus never producing 101.Such a process is illustrated below, where after three iterations the block 1101 is destroyed due to "collision" with 00. 2 where a i ∈ {0, 1} for i = 1, . . ., n and the string a 1 a 2 . . .a n satisfies the following three conditions: (i) a i a i+1 = 00 for all i = 2 . . .n + 4; (ii) a n+3 a n+4 a n+5 = 110 and a n+2 a n+3 a n+4 = 110; (iii) if a 1 a 2 = 00, then a n+1 a n+2 a n+3 = 110.
We will present only the main idea of the proof here, omitting some tedious details.It will be helpful to inspect spatiotemporal pattern generated by rule 172 first, as shown in Figure 2. Careful inspection of this pattern reveals three facts, each of them easily provable in a rigorous way: (F1) A cluster of two or more zeros keeps its right boundary in the same place for ever.
(F2) A cluster of two or more zeros extends its left boundary to the left one unit per time step as long as the left boundary is preceded by two or more ones.If the left boundary it is preceded by 01, it stays in the same place.
(F3) Isolated zero moves to the left one step at a time as long as it has at least two ones on the left.If an isolated zero is preceded by 10, it disappears in the next time step.Let us first prove that (i)-(iii) are necessary.Condition (i) is needed because if we had 00 in the string a 2 . . .a n+5 , its left boundary would grow to the left and after n iterations it would reach sites in which we expect to find the resulting string 111.Moreover, string a 1 a 2 . . .a n+5 cannot have 011 at the end position, one site before the end, or two sites before the end.If it had, 0 preceded by two 1's would move to the left and, after n iterations, it would reach sites where we want to find 111.The only exception to this is the case when a 0 a 1 = 00.In this case, even if 011 is in the second position from the end, it will disappear in step n − 1.This demonstrates that (ii) and (iii) are necessary.
In order to prove sufficiency of (i)-(iii), let us suppose that the string b satisfies all these conditions yet f n (b) = 111.This would imply that at least one of the symbols of f n (b) is equal to zero.However, according to what we stated in F1-F3, zero can appear in a later configuration only as a result of growth of an initial cluster of two of more zeros, or by moving to the left if it is preceded by two ones.This, however, is impossible due to conditions (i)-(iii).2.

Enumeration of preimage strings
Once we know the structure of preimage sets, we can enumerate them.For this, the following lemma will be useful.Lemma 6.1 The number of binary strings a 1 a 2 . . .a n such that 00 does not appear as two consecutive terms a i a i+1 is equal to F n+2 , where F n is the n-th Fibonacci number.This result will be derived using classical transfer-matrix method.Let g(n) be the number of binary strings a 1 a 2 . . .a n such that 00 does not appear as two consecutive terms a i a i+1 .We can think of such string as a walk of length n on a graph with vertices v 1 = 0 and v 2 = 1 which has adjacency matrix A given by A 11 = 0, A 12 = A 21 = A 22 = 1.One can prove that the generating function for g, can be expressed by , where and where (M : j, i) denotes the matrix obtained by removing the j − th row and i − th column of M .Proof of this statement can be found, for example, in Stanley (1986).Applying this to the problem at hand we obtain By decomposing the above generating function into simple fractions we get where ψ = 1 2 + 1 2 √ 5 is the golden ratio.Now, by using the fact that and by using a similar expression for where . This implies that g(n) = F n+2 . 2 Proposition 6.1 The cardinalities of preimage sets of 001, 100, 101 and 111 are given by Proof of the first of these formulae is a straightforward consequence of Proposition 5.1.We have 2n arbitrary binary symbols in the string b, thus the number of such strings must be 2 2n = 4 n .The second formula can be immediately obtained using Lemma 6.1 and Proposition 5.1.Since the first n − 1 symbols of f −n (101) are arbitrary, and the remaining symbols form a sequence of n symbols without 00, we obtain In order to prove the third formula, we will use Proposition 5.3.We need to compute the number of binary strings a 1 a 2 . . .a n+5 satisfying conditions (i)-(iii) of Proposition 5.3.Le us first introduce a symbol α 1 α 2 . . .α k to denote the string of length k in which no pair 00 appears.Then we define: • A is the set of all strings having the form α 1 α 2 . . .α n+5 , • A 1 is the set of all strings having the form α 1 α 2 . . .α n+2 110, • A 2 is the set of all strings having the form α 1 α 2 . . .α n+1 1101, • A 3 is the set of all strings having the form α 1 α 2 . . .α n 11010, • A 4 is the set of all strings having the form α 1 α 2 . . .α n 11011, • B is the set of all strings having the form 001α 1 α 2 . . .α n+2 , • B 1 is the set of all strings having the form 001α 1 α 2 . . .α n−1 110, • B 2 is the set of all strings having the form 001α 1 α 2 . . .α n−2 1101.
The set Ω of binary strings a 1 a 2 . . .a n+5 satisfying conditions (i)-(iii) of Proposition 5.3 can be now written as Since A 1 . . .A 4 are mutually disjoint, and B 1 and B 2 are disjoint too, the number elements in the set Using basic properies of Fibonacci numbers, the above simplifies to card Ω = 4F n+3 .Now, since in the Proposition 5.3 the string a 1 . . .a n+5 is preceded by n − 2 arbitrary symbols, we obtain what was to be shown.

Density of ones
Using results of the previous section, eq. ( 11) can now be rewritten as which simplifies to or, more explicitly, to Obviously, lim n→∞ c n = 1 8 , in agreement with the numerical value reported in Wolfram (1994).We can see that c n converges toward c ∞ exponentially fast, with some damped oscillations superimposed over the exponential decay.This is illustrated in Figure 3, where, in order to emphasize the aforementioned oscillations, instead of c n we plotted the ratio as a function of n.One can show that d n converges to the half of ratio divina (golden ratio), ψ/2 ≈ 0.809016 . .., as illustrated in Figure 3.We can see from this figure that the convergence is very fast and that the agreement between numerical simulations and the theoretical formula is nearly perfect.

Further results
Results obtained in the previous two sections suffice to compute block probabilities for all blocks of length up to 3. Proposition 6.1 together with eq. ( 8) yields formulas for P n (001), P n (101), and P n (111).
Altough "chaotic" rules like rule 18, or complex rules such as rule 110 certainly do not belong to this category, in surprisingly many cases significant regularities can be detected in preimage trees.Usually, this applies to "simple" rules, those which in Wolfram classification belong to class I, class II, and sometimes class III.Rule 172 reported here is one of the most interesting among such rules, primarily because the density of ones does not converge exponentially to some fixed value as in many other cases, but exhibits subtle damped oscillations on top of the exponential decay.Furthermore, the appearance of Fibonacci and Lucas numbers in formulas for block probabilities is rather surprising.
One should add at this point that the convergence toward the steady state can be slower than exponential even in fairly "simple" cellular automata.Using similar method as in this paper, it has been found in Fukś and Haroutunian (2009) that in rule 14 the density of ones converges toward its limit value approximately as a power law.The exact formula for the density of ones in rule 14 involves Catalan numbers, and the structure of level sets is quite different than the one reported here.Rule 142 exhibits somewhat similar behavior too, as reported in Fukś (2006).
As a final remark, let us add that the results presented here assume initial measure µ 1/2 .This can be generalized to arbitrary µ p .In order to do this, one needs, instead of straightforward counting of preimages, to perform direct computation of their probabilities using methods based on Markov chain theory.Work on this problem is ongoing and will be reported elsewhere.
e., b = b 0 b 1 . . .b k−1 , then for i ∈ Z we define a cylinder set.The cylinder set is a set of all possible configurations with fixed values at a finite number of sites.Intuitively, measure of the cylinder set given by the block b = b 0 . . .b k−1 , denoted by µ[C i (b)], is simply a probability of occurrence of the block b in a place starting at i.If the measure µ is shift-invariant, than µ(C i (b)) is independent of i, and we will therefore drop the index i and simply write µ(C(b)).
Proposition 5.1 Block b belongs to f −n (001) if and only if it has the structure Block b belongs to f −n (101) if and only if it has the structure b = . . .n−1 a 1 a 2 . . .a n 1101,

Fig. 3 :
Fig. 3: Plot of the ratio cn+1 − c∞ cn − c∞ as a function of time step n.Numerical results were obtained by iterating rule 172 on a a configuration of length 10 8 with periodic boundary conditions.