{'fraction_non_alphanumeric': 0.038119495769297185, 'fraction_numerical': 0.00910896218269729, 'mean_word_length': 4.0118996105582, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Topological Dynamics of 2D Cellular Automata

Topological dynamics of cellular automata (CA), inherited from classical dynamical systems theory, has been essentially studied in dimension 1. This paper focuses on 2D CA and aims at showing that the situation is different and more complex. The main results are the existence of non sensitive CA without equicontinuous points, the non-recursivity of sensitivity constants and the existence of CA having only non-recursive equicontinuous points. They all show a difference between the 1D and the 2D case. Thanks to these new constructions, we also extend undecidability results concerning topological classification previously obtained in the 1D case.


Introduction
Cellular automata were introduced by J. von Neumann as a simple formal model of cellular growth and replication. They consist in a discrete lattice of finite-state machines, called cells, which evolve uniformly and synchronously according to a local rule depending only on a finite number of neighboring cells. A snapshot of the states of the cells at some time of the evolution is called a configuration, and a cellular automaton can be view as a global action on the set of configurations.
Despite the apparent simplicity of their definition, cellular automata can have very complex behaviours. One way to try to understand this complexity is to endow the space of configurations with a topology and consider cellular automata as classical dynamical systems. With such a point of view, one can use well-tried tools from dynamical system theory like the notion of sensitivity to initial condition or the notion of equicontinuous point. This approach has been followed essentially in the case of one-dimensional cellular automata. P. Kůrka has shown in [1] that 1D cellular automata are partitioned into two classes: -E q , the set of cellular automata with equicontinuous points, ⋆ mathieu.sablik@umpa.ens-lyon.fr, sablik@cmi.univ-mrs.fr ⋆⋆ guillaume.theyssier@univ-savoie.fr -S, the set of sensitive cellular automata.
We stress that this partition result is false in general for classical (continuous) dynamical systems. Thus, it is natural to ask whether this result holds for the model of CA in any dimension, or if it is a "miracle" or an "anomaly" of the one-dimensional case due to the strong constraints on information propagation in this particular setting. One of the main contributions of this paper is to show that this is an anomaly of the 1D case (section 3): there exist a class N of 2D CA which are neither in E q nor in S.
Each of the sets E q and S has an extremal sub-class: equicontinous and expansive cellular automata (respectively). This allows to classify cellular automata in four classes according to the degree of sensitivity to initial conditions. The dynamical properties involved in this classification have been intensively studied in the literature for 1D cellular automata (see for instance [1][2][3][4]). Moreover, in [5], the undecidability of this classification is proven, except for the expansivity class whose decidability remains an open problem.
In this paper, we focus on 2D CA and we are particularly interested in differences from the 1D case. As said above, we will prove in section 3 that there is a fundamental difference with respect to the topological dynamics classification, but we will also adopt a computational complexity point of view and show that some properties or parameters which are computable in 1D are non recursive in 2D (proposition 5 and 8 of section 4). To our knowledge, only few dimensionsensitive undecidability results are known for CA ( [6,7]). However, we believe that such subtle differences are of great importance in a field where the common belief is that everything interesting is undecidable.
Moreover, we establish in section 4 several complexity lower bounds on the classes defined above and extend the undecidability result of [5] to dimension 2. Notably, we show that each of the class E q , S and N is neither recursively enumerable, nor co-recursively enumerable. This gives new examples of "natural" properties of CA that are harder than the classical problems like reversibility, surjectivity or nilpotency (which are all r.e. or co-r.e.).

Definitions
Let A be a finite set and M = Z (for the one-dimensional case) or Z 2 (for the two-dimensional case). We consider A M , the configuration space of M-indexed sequences in A. If A is endowed with the discrete topology, A M is compact, perfect and totally disconnected in the product topology. Moreover one can define a metric on A M compatible with this topology: In other word, Σ can be viewed as a tiling where the allowed patterns are in F .
In the sequel, we will consider tile sets and ask whether they can tile the plane or not. In our formalism, a tile set is a subshift of finite type: a set of states (the tiles) given together with a set of allowed patterns (the tiling constraints). We will restrict to 2 × 1 and 1 × 2 patterns (dominos) since it is sufficient to have the undecidability results of Berger [8].
A cellular automaton (CA) is a pair ( for all x ∈ A M and m ∈ M where U ⊂ Z is a finite set named neighborhood and f : A U → A is a local rule. The radius of F is r(F ) = max{ u ∞ : u ∈ U}. By Hedlund's theorem [9], it is equivalent to say that F is a continuous function which commutes with the shift (i.e. σ m • F = F • σ m for all m ∈ M).
We recall here general definitions of topological dynamics used all along the article. Let (X, d) be a metric space and F : X → X be a continuous function.
• x ∈ X is an equicontinuous point if for all ε > 0, there exists δ > 0, such that for all y ∈ X, if d(x, y) < δ then d(F n (x), F n (y)) < ε for all n ∈ N.
• (X, F ) is sensitive if there exists ε > 0 such that for all δ > 0 and x ∈ X, there exists y ∈ X and n ∈ N such that d(x, y) < δ and d(F n (x), F n (y)) > ε.

Non Sensitive CA Without Any Equicontinuous Point
In this section, we will construct a 2D CA which has no equicontinuous point and is not sensitive to initial conditions. This is in contrast with dimension 1 where any non-sensitive CA must have equicontinuous points as shown in [1].
The CA (denoted by F in the following) is made of two components: an obstacle component (almost static) for which only finite type conditions are checked and corrections are made locally ; -a particle component whose overall behaviour is to move left and to bypass obstacles.
Let Σ F be the subshift of finite type of A Z 2 defined by the set of allowed patterns constituted by all the 3 × 3 patterns appearing in the following set of finite configurations: where * stand for any state in A \ A F . In the sequel, a configuration x is said to be finite if the set z : x(z) = 0 is finite. Moreover, in such a configuration, we call obstacle a maximal 4-connected region of states from A F .
The following lemma (the proof is straightforward) states that finite configurations from Σ F consist of rectangle obstacles inside a free A \ A F background. Moreover, obstacles are spaced enough to ensure that any position "sees" at most one obstacle in its 3 × 3 neighborhood. Lemma 1. Let x ∈ Σ F be a finite configuration. For any z ∈ Z 2 we have the following: either x(z) ∈ A F and z belongs to a rectangular obstacle; -or x(z) ∈ A F and the set of positions z ′ : is empty or belongs to the same obstacle.
The local transition function of F can be sketched as follows: states from A F are turned into 0's if finite type conditions defining Σ F are violated locally and left unchanged in any other case ; -states U and D behave like a left-moving particle when U is just above D in a background of 0's, and they separate to bypass obstacles, U going over and D going under, until they meet at the opposite position and recompose a left-moving particle (see figure 1). A precise definition of the local transition function of F is the following: 1. if the neighborhood (5 × 5 cells) forms a pattern forbidden in Σ F , then turn into state 0 ; 2. else, apply (if possible) one of the transition rules depending only on the 3 × 3 neighborhood detailed in figure 2 3. in any other case, turn into state 0.
The possibility to form arbitrarily large obstacles prevents F from being sensitive to initial conditions. Proposition 1. F is not sensitive to initial conditions. * * * Transition rule of F where x stands for any state in AF , ' * ' means any state in A \ AF (2 occurrences of * are independent), and curved arrows mean that the transition is the same for any rotation of the neighborhood pattern.
Proof. Let ε > 0. Let c ε be the configuration everywhere equal to 0 except in the square region of side 2 − log ε around the centre where there is an obstacle.
, F t (y) ≤ ε since a well-formed obstacle (precisely, a partial configuration that would form a valid obstacle when completed by 0 everywhere) is inalterable for F provided it is surrounded by states in A \ A F (see the 3 first transition rules of case 2 in the definition of the local rule): this is guarantied for y by the condition d(y, c ε ) ≤ ε/4.

⊓ ⊔
The next lemma shows that Σ F attracts any finite configuration under the action of F . Lemma 2. For any finite configuration x, there exists t 0 such that ∀t ≥ t 0 : The following lemma establishes the key property of the dynamics of F : particles can reach any free position inside a finite field of obstacles from arbitrarily far away from the field.
-Else, position z n + (1, 0) and/or position z n + (1, −1) belongs to an obstacle P . Let a, b and c be the positions of the upper-left, upper-right and lower-right outside corners of P and let p be its half perimeter. Then define z n+1 , . . . , z n+p+1 to be the sequence of positions made of (see figure 3): We claim that the path (z n ) constructed above has the properties of the lemma. Indeed, one can check that for each case of the inductive construction of a point z m from a point z n we have: Proof. Assume F has an equicontinuous point, precisely a point x which verifies Suppose that there is z 0 such that x(z 0 ) = 0 and let ε = 2 − z0 ∞ −1 . We will show that the hypothesis of x being an equicontinuous point is violated for this particular choice of ε. Consider any δ > 0 and let y be the configuration everywhere equal to 0 except in the central region of radius − log ⌈δ⌉ where it is identical to x. Since y is finite, there exists t 0 such that y + = F t0 (y) ∈ Σ F (by lemma 2). Moreover, the proof of lemma 2 guaranties that for any positive integer t, F t (y + ) (z 0 ) = x(z 0 ) = 0. So we can apply lemma 3 on y + and position z 0 to get the existence of a path (z n ) allowing particles placed arbitrarily far away from z 0 to reach the position z 0 after a certain time. For any sufficiently large n, we can construct a configuration y ′ obtained from y by adding a particle at position z n . By the property of (z n ), we have: F n (y) (z 0 ) = F n (y ′ ) (z 0 ) and therefore d F n (y), F n (y ′ ) > ε. Since, if n > − log ⌈δ⌉, both y and y ′ are in the ball of centre x and radius δ, we have the desired contradiction.
Assume now that ∀z, x(z) ∈ A F . There must exist some z 0 such that x(z 0 ) = 1 (since the uniform configuration everywhere equal to 1 is not an equicontinuous point). It follows from the definition of Σ F that z 0 belongs to a forbidden pattern for Σ F . Therefore F (x) (z 0 ) = 0 and we are brought back to the previous case of this proof.

Undecidability of Topological Classification Revisited
We will use simulations of Turing machines by tile sets in the classical way (originally suggested by Wang [10]): the tiling represents the space-time diagram of the computation and the transition rule of the Turing machine are converted into tiling constraints. Without loss of generality, we only consider Turing machines working on a semi-infinite tape with a single final state. The i th machine of this kind in a standard enumeration is denoted by M i . In the sequel we use the following notations. First, to each M i we associate a tile set T i whose constraints ensure the simulation of M i as mentioned above; Second, when constructing a CA G, we denote by Σ G the subshift of its admissible obstacles, which plays the same role as Σ F for F with some differences detailed below. In [5], the authors give a recursive construction which produce either a 1D sensitive CA or a 1D CA with equicontinuous points according to whether a Turing machine halts on the empty input. By noticing that a 1D CA is sensitive (resp. has equicontinuous points) in the 1D topology if and only if it is sensitive (resp. has equicontinuous points) in the 2D topology when viewed as a 2D CA (neighbors are aligned, e.g. horizontally), we get the following proposition. Proposition 3. There is a recursive function Φ 1 : N → CA such that Φ 1 (i) ∈ E q if M i halts on the empty input and Φ 1 (i) ∈ S otherwise.
However, this is not enough to establish the overall undecidability of the topological classification of 2D CA. The main concern of this section is to complete proposition 3 in order to prove a stronger and more complete undecidability result summarized in the following theorem. Theorem 1. Each of the class E q , S and N is neither r.e. nor co-r.e. Moreover any pair of them is recursively inseparable.
The proof of this theorem rely on different variants of the construction of the automaton F above. Each time, the construction scheme is the same, and the desired property is obtained by adding various contents inside obstacles and slightly changing the rules of destruction of obstacles according to that content.
The next proposition can be established by using a mechanism to bound or not the size of admissible obstacles according to whether a Turing machine halts or not. The idea is to force the tiling representation of a computation on a blank tape in each obstacle (using the lower left corner) and to forbid the final state. The proof mechanism used for F can be applied if there is no bound on admissible obstacles. Otherwise, we get a sensitive CA.

Proposition 4.
There is a recursive function Φ 2 : N → CA such that Φ 2 (i) ∈ S if M i halts on the empty input and Φ 2 (i) ∈ N otherwise. Before going on with the different constructions needed to prove theorem 1, let us stress the dynamical consequence of the construction of proposition 4. It is well-known that for any 1D sensitive CA of radius r, 2 −2r is always the maximal admissible sensitivity constant (see for instance [1]). Thanks to the above construction it is easy to construct CA with tiny sensitivity constants as shown by the following proposition.

Proposition 5. The (maximal admissible) sensitivity constant of sensitive 2D CA cannot be recursively (lower-)bounded in the number of states and the neighborhood size.
Proof. It is straightforward to check that for each CA Φ 2 (i) where M i halts after n steps on the empty input, the maximal admissible obstacle is of height O(n) and of width at least O(log(n)). The proposition follows since the sensitivity constant of any CA Φ 2 (i) ∈ S is precisely 2 −l/2+1 where l is the minimum between the largest height and the largest width of admissible obstacles.
⊓ ⊔ Back to the path towards theorem 1, the following proposition uses the same ideas as proposition 4 but it exchanges the role of halting and non-halting computations. Proposition 6. There is a recursive function Φ 3 : N → CA such that Φ 3 (i) ∈ N if M i halts on the empty input and Φ 3 (i) ∈ S otherwise.
The properties of the CA F and the other constructions above rely on the fact that obstacles able to stop or deviate particles cannot be fit together to form larger obstacles. Thus, F and other CA have no equicontinuous point. In the following, we will use a new kind of obstacles: they are protected from particles by a boundary as the classical obstacles of F , but they are made only of successive boundaries like onion skins. With this new construction it is not difficult to build an equicontinuous point provided there are arbitrarily large valid obstacles. The next proposition use this idea to reduce existence of equicontinuous point to a tiling problem.

Proposition 7.
There is a recursive function Φ 4 which associate with any tile set T a CA Φ 4 (T ) which is in class E q if T tiles the plane and in class N otherwise.
Proof (sketch). Given a tile set T , the CA Φ 4 (T ) is identical to F , except that it has a second kind of obstacles, called T -obstacles. T -obstacles are square patterns of states from the set E = T × X with X = {↓, ↑, ←, →, ւ, ց, տ, ր, −} and where the T component is a valid tiling and the X component is made from the set of 2 × 2 patterns appearing in the following finite configuration: The X component is used to give everywhere in T -obstacles a local notion of inside and outside as depicted by figure 4 (up to π/2 rotations): roughly speaking, arrows point to the inside region. Other constraints concerning T -obstacles are checked locally: any pair of obstacles must be at least 2 cells away from each other; -their shape must be a square and this is ensured by requiring that any cell of a T -obstacle can have {0, U, D} neighbors only in its outside region; -the behaviour of particles with T -obstacles is the same as with classical obstacles (they can not cross them and states U and D separate to bypass them). The overall dynamics of Φ 4 (T ) is similar to that of F with the following exception, which is the key point of the construction: destruction of non-valid T -obstacles is done progressively to preserve as much as possible valid zones inside non-valid obstacles. More precisely any cell in a state from E remains unchanged unless one of the following conditions is verified in which case it turns into state 0: if there is an error in the inside neighborhood; -if there is a position in the outside neighborhood such that the pattern formed by that position together with the cell itself is forbidden; -if there is a state from E in the 5 × 5 neighborhood which is not connected to the cell by states from E. is the last case in the proof of proposition 2. Precisely, if a valid configuration x such that ∀z, x(z) ∈ E can be constructed, then it is an equicontinuous point.
Otherwise, if such a x is not valid, then it contains an error somewhere and the proof scheme of proposition 2 can be applied to Φ 4 (T ). The proposition follows since such a valid x can be constructed if and only if T can tile the plane.

⊓ ⊔
The previous propositions give a set of reductions from Turing machines or tile sets to CA and one can easily check that the main theorem follows using Berger's theorem [8] and classical results of the set of halting Turing machines.
To finish this section, we will discuss another difference between 1D and 2D concerning the complexity of equicontinuous points. Let us first recall that equicontinuous point in 1D CA can be generated by finite words often called "blocking" words. Precisely, for any F with equicontinuous points, there exists a finite word u such that ∞ u ∞ is an equicontinuous point for F (proof in [1]). The previous construction can be used with the tile set of Myers [11] which can produce only non-recursive tilings of the plane. Therefore the situation is more complex in 2D, and we have the following proposition.
Proposition 8. There exists a 2D CA having equicontinuous points, but only nonrecursive ones.

Open problems
It is well-known that equicontinuous CA are exactly ultimately periodic CA (if they are also bijective, they are periodic). The proof techniques developed by Kari in [6] allow to prove that there is no recursive lower-bound on the preperiod and period of 2D equicontinuous CA. An interesting open question in the continuation of this paper is to determine whether periods of 1D equicontinuous CA (bijective or not) can be recursively bounded or not. The only known result in 1D is that pre-periods are not recursively bounded (this is essentially the nilpotency problem).
It is interesting to notice that for 1D CA, classes S and E q are easily definable in first-order arithmetic. This is due to the characterisation by blocking words mentioned above: the existential quantification over configurations can be replaced by a quantification over finite words in the definition of E q . Proposition 8 shows that first-order definability of S, E q or N for 2D CA is more challenging. We believe they are but at a higher level in the arithmetical hierarchy.

A Proof of lemma 2
Proof. First, the set z : x(z) ∈ A F } is finite and decreasing under the action of F . Moreover, U and D states can only move left, or move vertically or disappear. Since the total amount of vertical moves for U and D states is bounded by the cardinal of z : x(z) ∈ A F }, there is a time t after which no U or D state is a neighbor of a state of A F , and each U is above a D in a 0 background (the U D particle is on the left of the finite non-0 region). From this time on, the evolution of cells in a state of A F is governed only by the first case of the definition of F . Therefore, after a certain time, finite type conditions defining Σ F are verified everywhere. To conclude, it is easy to check that Σ F is stable under the action of F . ⊓ ⊔

B Proof of proposition 4
Proof (sketch). The CA Φ 2 (i) is constructed from F by replacing the state 1 by the tile set T i and by defining the obstacle subshift Σ Φ2(i) through the set of all 3 × 3 patterns satisfying the following conditions: constraints used in the simulation of M i by T i apply; -when replacing states of T i by 1, the resulting pattern must be an admissible pattern for Σ F ; -the only allowed state as upper-right neighbor of ր is q 0 , the initial state in the simulation of M i by T i ; -the only allowed state above ↑ is the blank tape symbol of the simulation of M i by T i when ր is not in the neighborhood; -no final state of the simulation of M i by T i is allowed anywhere.
It is clear from these conditions, that any admissible obstacle of Σ Φ2(i) contains the beginning of the computation of M i on the empty tape. Since any field of obstacles allowed in Σ Φ2(i) is also allowed in Σ F (when mapping T i to 1), the proof of proposition 2 is still valid and Φ 2 (i) is therefore either in class S or in class N . Moreover, as shown in the proof of proposition 1, the fact that Φ 2 (i) is sensitive or not depends only on the existence of arbitrarily large admissible obstacle. So, by construction, Φ 2 (i) ∈ S if and only if M i halts on the empty input.

C Proof of proposition 6
Proof (sketch). Following the proof of proposition 4, Σ Φ3(i) is the same as Σ Φ2(i) with the following differences: the final state q f in the simulation of M i by T i is allowed; -the only states allowed at the right and above an occurrence of q f are q f , ↓ and ←; -the only state allowed as a lower-left neighbor of ւ is q f . It follows directly that an admissible obstacle must contain the final state. Moreover, if M i halts on the empty input, admissible obstacles can be arbitrarily large. The proposition follows by a straightforward adaptation of the proofs of propositions 1 and 2.