# Restricted Density Classification in One Dimension

Siamak Taati

► To cite this version:

Siamak Taati. Restricted Density Classification in One Dimension. 21st Workshop on Cellular Automata and Discrete Complex Systems (AUTOMATA), Jun 2015, Turku, Finland. pp.238-250, 10.1007/978-3-662-47221-7_18. hal-01442476

HAL Id: hal-01442476

https://inria.hal.science/hal-01442476

Submitted on 20 Jan 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Restricted density classification in one dimension

Siamak Taati

Mathematics Institute, Leiden University
P.O. Box 9512, 2300 RA Leiden, The Netherlands

**Abstract.** The density classification task is to determine which of the symbols appearing in an array has the majority. A cellular automaton solving this task is required to converge to a uniform configuration with the majority symbol at each site. It is not known whether a one-dimensional cellular automaton with binary alphabet can classify all Bernoulli random configurations almost surely according to their densities. We show that any cellular automaton that washes out finite islands in linear time classifies all Bernoulli random configurations with parameters close to 0 or 1 almost surely correctly. The proof is a direct application of a "percolation" argument which goes back to Gács (1986).

**Keywords:** cellular automata, density classification, phase transition, sparseness, percolation

## 1 Introduction

An array containing symbols 0 and 1 is given. We would like to determine which of the two symbols 0 and 1 appears more often in this array. The challenge is to perform this task in a local, uniform and decentralized fashion, that is, by means of a cellular automaton. A cellular automaton solving this problem is to receive the input array as its initial configuration and to end by reaching a consensus, that is, by turning every symbol in the array into the majority symbol. All computations must be done on the same array with no additional symbols.

If we require the cellular automaton to solve the task for all odd-sized finite arrays with periodic boundary conditions (i.e., arrays indexed by a ring $Z_n$ or a $d$-dimensional torus $Z_n^d$, where $n$ is odd), then no perfect solution exists [10] (see also [1]). Indeed, the effect of an isolated 1 deep inside a large region of 0's will soon disappear, hence its removal from the starting configuration should not affect the end result. However, removing such an isolated 1 could shift the balance of the majority from 1 to 0 in a borderline case.

Here, we consider a variant of the problem on infinite arrays, and focus on the one-dimensional case. We ask for a cellular automaton that classifies a randomly chosen configuration (say, using independent biased coin flips) according to its density *almost surely* (i.e., with probability 1). We relax the notion of classification to allow computations that take infinitely long: we only require that the content of each site is eventually turned into the majority symbol and remains so forever, but we allow the fixation time to depend on the site.
Almost sure classification of random initial configurations is closely related to the question of stability of cellular automata trajectories against noise and the notion of ergodicity for probabilistic cellular automata. Constructing a cellular automaton with at least two distinct trajectories that remain distinguishable in presence of positive Bernoulli noise is far from trivial. Toom [12, 13] produced a family of examples in two dimensions. Each of Toom's cellular automata has two or more distinct fixed points that are stable against noise: in presence of sufficiently small (but positive) Bernoulli noise, the cellular automaton starting from each of these fixed points remains close to that fixed point for an indefinite amount of time. The noisy version of each of these cellular automata is thus non-ergodic in that it has more than one invariant measure.

The most well-known of Toom's examples is the so-called NEC rule (NEC standing for North, East, Center). The NEC rule replaces the symbol at each site with the majority symbol among the site itself and its north and east neighbors. Combining the combinatorial properties of the NEC rule and well-known results from percolation theory, Bušić, Fatès, Mairesse and Marcovici [1] showed that the NEC cellular automaton also solves the classification problem: starting from a random Bernoulli configuration with parameter *p* on $Z^2$ (i.e., using independent coin flips with probability *p* of having 1 at each site), the cellular automaton converges almost surely to the uniform configuration 0 if *p* < 1/2 and to 1 if *p* > 1/2.

The situation in dimension one is more complicated. No one-dimensional cellular automaton with binary alphabet is known to classify Bernoulli random configurations. Moreover, Toom's examples do not extend to one dimension; the only example of a one-dimensional cellular automaton with distinct stable trajectory in presence of noise is a sophisticated construction due to Gács [5, 6] based on error-correction and self-simulation, which uses a huge number of symbols per site.

There are however candidate cellular automata in one dimension that are suspected to both classify Bernoulli configurations and to remain bi-stable in presence of noise. The oldest, most studied candidate is the *GKL* cellular automaton, introduced by Gács, Kurdyumov and Levin [4]. Another candidate with similar properties and same degree of simplicity is the *modified traffic* cellular automaton studied by Kůrka [9] and Kari and Le Gloannec [8]. Both of these two automata have the important property that they “wash out finite islands of errors” on either of the two uniform configurations *0* and *1* [7, 8]. In other words, each of the two uniform configurations *0* and *1* is a fixed point that attracts all configurations that differ from it at no more than finitely many sites. Incidentally, this same property is also shared among Toom's cellular automata, and is crucial (but not sufficient) for its noise stability and density classification properties.

A cellular automaton that washes out finite islands of errors, also washes out infinite sets of errors that are sufficiently sparse. In this context, a set should be considered sparse if it can be covered with disjoint finite islands that are washed out before sensing the effect of (or having an effect on) one another. It turns out
that a Bernoulli random configuration with sufficiently small parameter is sparse with probability 1. The proof is via a beautiful and relatively simple argument that goes back to Gács [5, 6], who used it to take care of the probabilistic part of his result. The author has learned this argument in a more streamlined form from a recent paper of Durand, Romashchenko and Shen [2], who used it in the context of aperiodic tilings. Given its simplicity and potential, we shall repeat this argument below.

An immediate consequence of the sparseness of low-density Bernoulli sets is that any cellular automaton that washes out finite islands of errors on $\mathbb{O}$ and $\mathbb{1}$ (e.g., GKL and modified traffic) almost surely classifies a Bernoulli random configuration correctly, as long as the Bernoulli parameter $p$ is close to either 0 or 1. It remains open whether the same classification occurs for all values of $p$ in $(0, 1/2) \cup (1/2, 1)$.

## 1.1 Terminology

Let us proceed by fixing the terminology and formulating the problem more precisely. By a configuration, we shall mean an infinite array of symbols $x_i$ chosen from an alphabet $S$ that are indexed by integers $i \in \mathbb{Z}$, or equivalently, a function $x : \mathbb{Z} \to S$. The evolution of a cellular automaton is obtained by iterating a transformation $\Phi : S^{\mathbb{Z}} \to S^{\mathbb{Z}}$ on a starting configuration $x : \mathbb{Z} \to S$. The transformation $x \mapsto \Phi x$ is carried out by applying a local update rule $f$ simultaneously on every site so that the new symbol at site $i$ reads $(\Phi x)_i \triangleq f(x_{i-r}, x_{i-r+1}, \dots, x_{i+r})$. We call the sites $i-r, i-r+1, \dots, i+r$ the neighbors of site $i$ and refer to $r$ as the neighborhood radius of the cellular automaton.

The density of a symbol $a$ in a configuration $x$ is not always well-defined or non-ambiguous. We take as the definition,

$$ \rho_a(x) \triangleq \lim_{N \to \infty} \frac{|\{i \in [-N, N] : x_i = a\}|}{2N + 1} \quad (1) $$

when the limit exists. According to the law of large numbers, the density of a symbol $a$ in a Bernoulli random configuration is almost surely the same as the probability of occurrence of $a$ at each site. Formally, if $X$ is a random configuration $\mathbb{Z} \to S$ in which the symbol at each site is chosen independently of the others, taking value $a$ with probability $p(a)$, then $\mathbb{P}\{\rho_a(X) = p(a)\} = 1$.

When $S = \{0, 1\}$, we simply write $\rho(x) \triangleq \rho_1(x)$ for the density of 1's in $x$. We say that a cellular automaton $\Phi : \{0, 1\}^{\mathbb{Z}} \to \{0, 1\}^{\mathbb{Z}}$ classifies a configuration $x : \mathbb{Z} \to \{0, 1\}$ according to density if $\Phi^t x \to \mathbb{O}$ or $\Phi^t x \to \mathbb{1}$ as $t \to \infty$, depending on whether $\rho(x) < 1/2$ or $\rho(x) > 1/2$. The notation $\underline{a}$ is used to denote a uniform configuration with symbol $a$ at each site. For us, the meaning of the convergence of a sequence of configurations $x^{(1)}, x^{(2)}, \dots$ to another configuration $x$ is site-wise eventual agreement: for each site $i$, there must be an index $n_i$ after which all the following configurations in the sequence agree with $x$ on the content of site $i$. (Formally, $x_i^{(n)} = x_i$ for all $n \ge n_i$.) This is the concept of convergence in the product topology of $S^{\mathbb{Z}}$, which is a compact and metric topology.
## 2 Eroder Property

Let us describe two candidates that are suspected to solve the density classification problem in one dimension: the cellular automaton of Gács, Kurdyumov and Levin and the modified traffic rule. Both cellular automata are defined on binary configurations $\mathbb{Z} \to \{0, 1\}$ and have neighborhood radius 3.

The cellular automaton of Gács, Kurdyumov and Levin [4] (GKL for short) is defined by the transformation

$$ (\Phi x)_i \triangleq \begin{cases} \text{maj}(x_{i-3}, x_{i-1}, x_i) & \text{if } x_i = 0, \\ \text{maj}(x_i, x_{i+1}, x_{i+3}) & \text{if } x_i = 1, \end{cases} \qquad (2) $$

where maj(a, b, c) denotes the majority symbol among a, b, c.

The modified traffic cellular automaton [9, 8] is defined as a composition of two simpler automata: the traffic automaton followed by a smoothing filter. The traffic automaton transforms a configuration by replacing every occurrence of 10 with 01. The follow-up filter replaces the 1 in every occurrence of 0010 with 0, and symmetrically, turns the 0 in every occurrence of 1011 into a 1.

Sample space-time diagrams of the GKL and the modified traffic automata are depicted in Figure 1. Note that both GKL and modified traffic have the

<figure><img src="image_2.png" /><figcaption>Fig. 1. Finding the majority in a biased coin-flip configuration. Time goes downwards.</figcaption></figure>

following symmetry: exchanging 0 with 1 and right with left leaves the cellular automaton unchanged.

The uniform configurations 0 and 1 are fixed points of both GKL and modified traffic automata. The following theorem states that both automata wash out finite islands of errors on either of the two uniform configurations 0 and 1. This is sometimes called the eroder property. For the GKL automaton, the eroder property was proved by Gonzaga de Sá and Maes [7]; for modified traffic, the result is due to Kari and Le Gloannec [8]. Let us write $\text{diff}(x, y) \triangleq \{i \in \mathbb{Z} : x_i \neq y_i\}$ for the set of sites at which two configurations x and y differ. We call x a finite perturbation of z if $\text{diff}(z, x)$ is a finite set.

**Theorem 1 (Eroder property [7, 8]).** Let $\Phi$ be either the GKL or the modified traffic cellular automaton. For every finite perturbation x of 0, there is a
time $t$ such that $\Phi^t x = \emptyset$. If $\text{diff}(\emptyset, x)$ has diameter at most $n$ (i.e., covered by an interval of length $n$), then $\Phi^{2n}x = \emptyset$. The analogous statement about finite perturbations of $\frac{1}{2}$ holds by symmetry.

Let us emphasize that many simple cellular automata have the eroder property on some uniform configuration. For instance, the cellular automaton $\Phi : \{0,1\}^Z \to \{0,1\}^Z$ defined by $(\Phi x)_i \triangleq x_{i-1} \wedge x_i \wedge x_{i+1}$ washes out finite islands on the uniform configuration $\emptyset$. What is remarkable about GKL and modified traffic is the fact that they have the eroder property on two distinct configurations $\emptyset$ and $\frac{1}{2}$. This double eroder property may lead one to guess that these two cellular automata could indeed classify Bernoulli configurations according to density or that the trajectories of the fixed points $\emptyset$ and $\frac{1}{2}$ are stable in presence of small but positive noise.

## 3 Washing Out Sparse Sets

In this section, we consider a slightly more general setting. We assume that $\Phi : S^Z \to S^Z$ is a cellular automaton that washes out finite islands of errors on a configuration $z$ in linear time; that is, there is a constant $m$ such that $\Phi^{ml}x = \Phi^{ml}z$ for any finite perturbation of $x$ for which $\text{diff}(z,x)$ has diameter at most $l$. For GKL and modified traffic, $z$ can be either $\emptyset$ or $\frac{1}{2}$, which are fixed points (hence $\Phi^{ml}z = z$), and the constant $m$ can be chosen to be 2.

The above eroder property automatically implies that $\Phi$ also washes out (possibly infinite) sets of error that are “sparse enough”. Indeed, an island of errors which is well separated from the rest of the errors will disappear before sensing or affecting the rest of the error set. We are interested in an appropriate notion of “sparseness” for $\text{diff}(z,x)$ that guarantees the attraction of the trajectory of $x$ towards the trajectory of $z$.

To elaborate this further, let us denote the neighborhood radius of $\Phi$ by $r$. Consider an arbitrary configuration $x$ and think of it as a perturbation of $z$ with errors occurring at sites in $\text{diff}(z,x)$. Let $I \subseteq \mathbb{Z}$ be an interval of length $l$ such that $x$ agrees with $z$ on a margin of width $2rml$ around $I$, that is, $x_j = z_j$ for $j \in \mathbb{Z} \setminus I$ within distance $2rml$ from $I$. We call such an interval an *isolated island* (of errors) on $x$. Let $y$ be a configuration obtained from $x$ by *erasing* the errors on $I$, that is, by replacing $x_i$ with $z_i$ for each $i \in I$. (Note on terminology: we shall use “erasure” to refer to this abstract construction of one configuration from another, and reserve the word “washing” for what the cellular automaton does.) Observe that within $ml$ steps, the distinction between $x$ and $y$ disappears and we have $\Phi^{ml}x = \Phi^{ml}y$ (see Figure 2). Namely, the island $I$ is washed out before time $ml$ and the sites in $\text{diff}(z,x) \setminus I = \text{diff}(z,y) \setminus I$ do not get a chance to feel the distinction between $x$ and $y$.

We find that erasing an isolated island of length at most $l$ from $x$ does not affect whether the trajectory of $x$ is attracted towards the trajectory of $z$ or not. Neither does erasing several (possibly infinitely many) isolated islands of length $\le l$ at the same time. On the other hand, erasing some isolated islands from $x$ makes the error set $\text{diff}(z,x)$ sparser and possibly turns larger portions of
<figure><img src="image_3.png" /><figcaption>Fig. 2. Forgetting an isolated region of errors.</figcaption></figure>

$\text{diff}(z, x)$ into isolated islands (see Figure 3). Hence, we can perform the erasure

<figure><img src="image_4.png" /><figcaption>Fig. 3. Washing out a sparse set of errors.</figcaption></figure>

procedure recursively, by first erasing the isolated islands of length 1, then erasing the isolated islands of length 2, then erasing the isolated islands of length 3 and so forth. In this fashion, we obtain a sequence $x^{(0)}, x^{(1)}, x^{(2)}, \dots$ with $x^{(0)} = x$ and $\text{diff}(z, x^{(l)}) \supseteq \text{diff}(z, x^{(l+1)})$ obtained by successive erasure of isolated islands. We say that the error set $\text{diff}(z, x)$ is *sparse* if all errors are eventually erased, that is, if $\bigcap_l \text{diff}(z, x^{(l)}) = \emptyset$.

However, this notion of sparseness still does not guarantee the attraction of the trajectory of $x$ towards the trajectory of $z$. (The trajectory of $x$ is considered to be *attracted* towards the trajectory of $z$ if for each site $i$, there is a time $t_i$ such that $(\Phi^t x)_i = (\Phi^t z)_i$ for all time steps $t \ge t_i$. If $\Phi z = z$, this attraction becomes equivalent to the convergence $\Phi^t x \to z$..) Note that it is well possible that all errors are eventually washed out from $x$ (hence, their information is lost) but the washing out procedure for larger and larger islands affects a given site $i$ indefinitely, so that $(\Phi^t x)_i \ne (\Phi^t z)_i$ for infinite many time steps $t$ (see Figure 4).

To clarify this possibility, note that an isolated island of length $l$ can affect the state of sites within distance $rml$ up to time $ml$ (see Figure 2). Let us denote by $A_l \triangleq \text{diff}(z, x^{(l)}) \setminus \text{diff}(z, x^{(l-1)})$ the union of isolated islands of length $l$ that are erased from $x^{(l-1)}$ during the $l$'th stage of the erasure procedure. The only possibility for a site $i$ to have a value other than $(\Phi^t z)_i$ at time $t$ is that site $i$ is within distance $rml$ from $A_l$ for some $l$ satisfying $ml > t$. In this case, we say that $i$ is within the *territory* of such $A_l$. A sufficient condition for the attraction of the trajectory of $x$ towards the trajectory of $z$ is that the error set $\text{diff}(z, x)$
<figure><img src="image_5.png" /><figcaption>Fig. 4. Washing out but not attracting.</figcaption></figure>

is sparse, and furthermore, each site $i$ is within the territory of $A_l$ for at most finitely many values of $l$. If this condition is satisfied, we say that the error set $\text{diff}(z, x)$ is *strongly sparse*. In summary, the trajectory of $x$ is attracted towards the trajectory of $z$ if $\text{diff}(z, x)$ is *strongly sparse*.

# 4 Sparseness

The notion of (strong) sparseness described in the previous section can be formalized and studied without reference to cellular automata, and that is what we are going to do now. This notion is of independent interest, as it commonly arises in error correcting scenarios. More sophisticated applications appear in [5, 6] and [2]. Our exposition is close to that of [2].

We refer to a finite interval $I \subseteq \mathbb{Z}$ as an *island*. Let $k$ be a fixed positive integer. The *territory* (or the *interaction range*) of an island $I$ of length $l$ is the set of sites $i \in \mathbb{Z}$ that are within distance $kl$ from $I$. We denote the territory of $I$ by $R(I)$. Two disjoint islands $I$ and $I'$ of lengths $l$ and $l'$, where $l \le l'$, are considered *well separated* if $I' \cap R(I) = \emptyset$, that is, if the larger island does not intrude the territory of the smaller one. A set $E \subseteq \mathbb{Z}$ is said to be *sparse* if it can be covered by a family $\mathcal{I}$ of (disjoint) pairwise well-separated islands. A sparse set is *strongly sparse* if the cover $\mathcal{I}$ can be chosen so that each site $i$ is in the territory of at most finitely many elements of $\mathcal{I}$.

Note that for $k \triangleq 2rm$, we get essentially the same notion of sparseness as in the previous section. Indeed, let $\mathcal{I}_l$ be the sub-family of $\mathcal{I}$ containing all islands of length at most $l$, and denote by $E_l \triangleq E \setminus \bigcup_{I \in \mathcal{I}_l} I$ the subset of $E$ obtained by erasing the islands of length at most $l$. Then, every island $I \in \mathcal{I}$ having length $l$ is *isolated* in $E_{l-1}$, because its territory is not intruded by $E_{l-1} \setminus I$. The new notion of strong sparseness might be slightly more restrictive, as we define the territory by the constant $k = 2rm$ rather than $k/2 = rm$, but the arguments below are not sensitive to this distinction.
The most basic observation about sparseness is its monotonicity.

**Proposition 1 (Monotonicity).** Any subset of a (strongly) sparse set is (strongly) sparse.

One expects a “small” set to be sparse. The following theorem due to Levin [11]
is an indication of this intuition.

**Theorem 2 (Sparseness of small sets [11]).** There are constants $\varepsilon, c \in (0, 1)$
depending on the sparseness parameter $k$ such that every periodic set $E \subseteq \mathbb{Z}$ with
period $n$ and at most $cn^\varepsilon$ elements per period is strongly sparse.

The reverse intuition is misleading: a sparse set does not need to be “small”.
In fact, there are sets with arbitrarily large densities that are sparse. The exis-
tence of such sets is demonstrated by Kari and Le Gloannec [8], and in special
cases, was also noted by Levin [11] and Kûrka [9].

**Theorem 3 (Large sparse sets [8]).** There are periodic subsets of $\mathbb{Z}$ with density arbitrarily close to 1 that are strongly sparse.

It immediately follows that the set of possible densities of strongly sparse (peri-
odic) subsets of $\mathbb{Z}$ is dense in $[0, 1]$. A more important corollary is a strengthen-
ing of the impossibility result of Land and Belew [10] for cellular automata with
linear-time eroder property: for any such automaton, there are configurations $x$
with density $\rho(x)$ close to any number in $[0, 1]$ that are incorrectly classified.

The main result of interest for us is the sparseness of sufficiently biased
Bernoulli random sets.

**Theorem 4 (Sparseness of Bernoulli sets [5, 6, 2]).** A Bernoulli random set $E \subseteq \mathbb{Z}$ with parameter $p$ is almost surely strongly sparse as long as $p < (2k)^{-2}$, where $k$ is the sparseness parameter.

*Proof*. For a set $E \subseteq \mathbb{Z}$, we recursively construct a family $\mathcal{I}$ of pairwise well-separated islands as a candidate for covering $E$. The family $\mathcal{I}$ will be divided into sub-families $\mathcal{J}_l$ consisting of islands of length $l$, and $E_l$ will be the set obtained by erasing the selected islands of length at most $l$ from $E$. Let $E_0 \triangleq E$. For $l \ge 1$, recursively define $\mathcal{J}_l$ as the family of islands $I \subseteq \mathbb{Z}$ of length $l$ that intersect $E_{l-1}$ and are isolated in $E_{l-1}$ (i.e., $E_{l-1} \setminus I$ does not intersect the territory of $I$), and set $E_l \triangleq E_{l-1} \setminus \bigcup_{I \in \mathcal{J}_l} I$. Let $\mathcal{I} \triangleq \bigcup_l \mathcal{J}_l$.

To see that the elements of $\mathcal{I}$ are pairwise well separated, let us first argue
that every island $I \in \mathcal{J}_l$ is minimal, in that, it is the smallest interval containing
$I \cap E_{l-1}$. Indeed, let $J \subseteq I$ be the smallest island containing $I \cap E_{l-1}$, and
assume that $|J| < l$. Then, the endpoints of $J$ must be in $E_{l-1}$. Therefore, every
island $I' \in \mathcal{J}_{l'}$ with $l' < l$ must have been at distance more than $kl'$ from $J$, for
otherwise, $I'$ would not have been isolated in $E_{l'-1}$. In particular, for $l'$ satisfying
$|J| \le l' < l$, the island $J$ has distance more than $k|J|$ from every $I' \in \mathcal{J}_{l'}$. Since
the distance between $J$ and $E_{l-1}$ is also more than $kl \ge k|J|$, it follows that $J$ is
isolated in $E_{|J|-1}$. On the other hand, $J$ intersects $E_{|J|-1}$, because it intersects
$E_{l-1}$ and $E_{l-1} \subseteq E_{|J|-1}$. We find that $J \in \mathcal{J}_{|J|-1}$, which is a contradiction.
Therefore, $I$ is minimal. The well-separation of two islands $I \in \mathcal{J}_l$ and $I' \in \mathcal{J}_{l'}$ with $l \le l'$ follows from the minimality of $I'$. We conclude that the elements of $\mathcal{I}$ are also well separated.

Now, let $E$ be a Bernoulli random configuration with parameter $p$. We choose an appropriate sequence $0 < l_1 < l_2 < l_3 < \dots$ (to be specified more explicitly below) and observe whether a site $u$ is in $E_{l_n}$. We will show that the probability that site $u$ is in $E_{l_n}$ is double exponentially small, that is, $\mathbb{P}(u \in E_{l_n}) \le \alpha^{2n}$ for some $\alpha < 1$.

Let $u$ be an arbitrary site. In order for $u$ to be in $E_{l_n}$, it is necessary that $u$ is also in $E_{l_{n-1}}$, and furthermore, $u$ is not covered by any island in $\mathcal{J}_{l_n}$. Therefore, $E_{l_{n-1}}$ (which includes $E_{l_{n-1}}$) must contain two elements $u_0 \triangleq u$ and $u_1$ that are farther than $l_n/2$ from each other but no farther than $(k+1/2)l_n$ from each other (see Figure 5). In a similar fashion, in order for $u_0$ and $u_1$ to be in $E_{l_{n-1}}$,

<figure><img src="image_6.png" /><figcaption>Fig. 5. An evidence for $u \in E_{l_n}$ in $E_{l_{n-1}}$ (see the proof of Theorem 4).</figcaption></figure>

the set $E_{l_{n-2}}$ must contain elements $u_{00} \triangleq u_0, u_{01}, u_{10} \triangleq u_1$ and $u_{11}$ such that

$$ \frac{1}{2} l_{n-1} < d(u_{00}, u_{01}) \le \left(k + \frac{1}{2}\right) l_{n-1}, \qquad (3) $$

$$ \frac{1}{2} l_{n-1} < d(u_{10}, u_{11}) \le \left(k + \frac{1}{2}\right) l_{n-1}. \qquad (4) $$

Repeating this procedure, we find a binary tree of depth $n$ with roots in $E_0 = E$ that provides an evidence for the presence of $u$ in $E_{l_n}$. We call such a tree an *explanation tree*. Thus, in order to have $u \in E_{l_n}$, there must be at least one explanation tree for it.

We estimate the probability of the existence of an explanation tree for $u \in E_{l_n}$. Let $T = (u, u_0, u_1, u_{00}, u_{01}, \dots, u_{11\dots0}, u_{11\dots1})$ be a *candidate* explanation tree, that is, a tree with the right distances between the nodes. To simplify the estimation, we choose the lengths $l_1, l_2, \dots$ in such a way to make sure that the leaves of $T$ are distinct elements of $\mathbb{Z}$. A sufficient condition for the distinctness of the leaves of $T$ is that for each $m$,

$$ \frac{1}{2} l_m \ge 2 \left(k + \frac{1}{2}\right) \left(l_{m-1} + l_{m-2} + \dots + l_1\right). \qquad (5) $$

This would guarantee that the two subtrees descending from each node do not intersect. We choose $l_m \triangleq (4k+3)^{m-1}$, which is a solution of the above system of inequalities.
A candidate tree $T$ is an explanation tree for $u \in E_{l_n}$ if and only if all its leaves are in $E$. Whether or not each leaf $u_w$ of $T$ is in $E$ is determined by a biased coin flip with probability $p$ of falling in $E$. With the above choice of $l_m$, the events $u_w \in E$ for different leaves of $T$ are independent. It follows that $T$ is an explanation tree for $u \in E_{l_n}$ with probability $p^{2^n}$.

Let us now estimate the number of candidate trees of depth $m$. Denote this number by $f_m$. Observe that $f_m$ satisfies the recursive inequality

$$f_m \le 2kl_m f_{m-1}^2 \quad (6)$$

with $f_0 \triangleq 1$. Indeed, $2kl_m$ counts for the number of possible positions for $u_1$ and $f_{m-1}^2$ counts the number of possibilities for each of the two subtrees. Letting $g_m \triangleq \log f_m$, we have

$$g_m \le a m + b + 2g_{m-1}, \quad (7)$$

where $a \triangleq \log(4k+3)$ and $b \triangleq \log 2k - \log(4k+3)$. Expanding the last recursion we get

$$g_m \le 2^m (2b + a \sum_{i=0}^{m} \frac{i}{2^i}) \quad (8)$$

$$\le 2^m (2b + a \sum_{i=0}^{\infty} \frac{i}{2^i}) \quad (9)$$

$$= 2^{m+1}(a+b). \quad (10)$$

Therefore,

$$f_m \le (2k)^{2^{m+1}}. \quad (11)$$

By the sub-additivity of the probabilities, we find that the probability of the existence of at least one explanation tree for $u \in E_{l_n}$ satisfies

$$\mathbb{P}(u \in E_{l_n}) \le p^{2^n} f_n \le \alpha^{2^n}, \quad (12)$$

where $\alpha \triangleq p(2k)^2$. Since $p < (2k)^{-2}$, we get $\alpha < 1$.

The probability that a given site $u \in \mathbb{Z}$ is in $E$ but is not covered by $\mathcal{I}$ (i.e., never erased) is

$$\mathbb{P}(u \in \bigcap_l E_l) = \mathbb{P}(u \in \bigcap_n E_{l_n}) = \lim_{n \to \infty} \mathbb{P}(u \in E_{l_n}) = \lim_{n \to \infty} \alpha^{2^n} = 0. \quad (13)$$

Since $\mathbb{Z}$ is countable, we find, by sub-additivity, that $\mathbb{P}(\bigcap_l E_l \neq \emptyset) = 0$, which means, $E$ is sparse with probability 1.

That $E$ is strongly sparse with probability 1 follows by the Borel-Cantelli argument. Namely, the event that a site $u$ is in the territory of infinitely many islands $I \in \mathcal{I}$ can be expressed as $\bigcap_m \bigcup_{n \ge m} \{d(u, E_{l_n}) \le kl_n\}$. (Note that an
island covering a site in $E_{l_n}$ has length greater than $l_n$.) The probability that $u$ is within distance $kl_n$ from $E_{l_n}$ satisfies

$$ \mathbb{P}(d(u, E_{l_n}) \le kl_n) \le (2kl_n + 1)\alpha^{2n} = (2k(4k+3)^{n-1} + 1)\alpha^{2n}. \quad (14) $$

Therefore,

$$ \mathbb{P}\left(\bigcup_{n \ge m} \{d(u, E_{l_n}) \le kl_n\}\right) \le \sum_{n \ge m} (2k(4k+3)^{n-1} + 1)\alpha^{2n} < \infty. \quad (15) $$

It follows that

$$ \mathbb{P}\left(\bigcap_{m} \bigcup_{n \ge m} \{d(u, E_{l_n}) \le kl_n\}\right) \le \lim_{m \to \infty} \sum_{n \ge m} (2k(4k+3)^{n-1} + 1)\alpha^{2n} = 0. \quad (16) $$

Using again the countability of $\mathbb{Z}$, we find that, with probability 1, no site $u$ is in the territory of more than finitely may islands $I \in \mathcal{I}$. That is, $E$ is almost surely strongly sparse. $\square$

Theorem 4, along with a standard application of monotonicity, shows that when the Bernoulli parameter is varied, a non-trivial phase transition occurs.

**Corollary 1 (Phase transition).** There is a critical value $p_c \in (0, 1]$ depending on the sparseness parameter $k$ such that a Bernoulli random set $E \subseteq \mathbb{Z}$ with parameter $p$ is almost surely strongly sparse if $p < p_c$ and is almost surely not strongly sparse if $p > p_c$.

*Proof.* First, observe that the (strong) sparseness of $E$ is a translation-invariant event (i.e., for $a \in \mathbb{Z}$, the sparseness of $a + E$ is equivalent to the sparseness of $E$). Therefore, by ergodicity, the probability that a Bernoulli random set is (strongly) sparse is either 0 or 1.

The presence of a threshold value $p_c \in [0, 1]$ (possibly 0) is a standard consequence of monotonicity. Indeed, let $U_i, i \in \mathbb{Z}$ be a collection of independent random variables with uniform distribution on the real interval $[0, 1]$. For $p \in [0, 1]$, define a set $E^{(p)} \triangleq \{i \in \mathbb{Z} : U_i < p\}$. Then, $E^{(p)}$ is a Bernoulli random set with parameter $p$, and the collection of sets $E^{(p)}$ is increasing in $p$. Let $p_c \triangleq \sup\{p : E^{(p)}$ is almost surely (strongly) sparse$\}$. By monotonicity, the set $E^{(p)}$ is almost surely (strongly) sparse for $p < p_c$ and is almost surely not (strongly) sparse for $p > p_c$.

Finally, we know from Theorem 4 that $p_c > 0$. $\square$

# 5 Restricted Classification

Let us state the claimed result of this paper explicitly as a corollary of Theorem 4 and the discussions in the previous sections.
**Corollary 2 (Restricted classification).** Let $\Phi : \{0, 1\}^Z \to \{0, 1\}^Z$ be a cellular automaton that washes out finite islands of errors on either of the two uniform configurations $\emptyset$ and $\mathbb{1}$ in linear time. Namely, suppose that there is a constant $m$ such that for every finite perturbation $x$ of $\emptyset$ for which $\text{diff}(\emptyset, x)$ has diameter at most $l$, we have $\Phi^{ml}x = \emptyset$, and similarly for $\mathbb{1}$. Then, there is a constant $p_c \in (0, 1/2]$ such that $\Phi$ classifies a Bernoulli random configuration with parameter $p \in [0, p_c) \cup (1-p_c, 1]$ almost surely correctly.

For GKL and modified traffic, we have $k = 2rm = 12$. Therefore, Theorem 4 only guarantees correct classification if the Bernoulli parameter $p$ is within distance $(2k)^{-2} = 24^{-2} \approx 0.0017$ from either 0 or 1.

# 6 Discussion

We conclude with few comments and questions.

Corollary 2 shows that the asymptotic behaviour of the GKL and modified traffic automata starting from a Bernoulli random configuration undergoes a phase transition: the cellular automaton converges to $\emptyset$ for $p$ close to 0 and to $\mathbb{1}$ for $p$ close to 1. It remains open whether the transition occurs precisely at $p = 1/2$, or if there are other transitions in between. The result of Bušić et al. [1] shows that the transition in the NEC cellular automaton is unique and happens precisely at $p = 1/2$.

Another open issue is the behaviour of the GKL and modified traffic automata on random configurations with non-Bernoulli distributions. One might expect the sparseness argument to extend to measures that are sufficiently mixing. For instance, it should be possible to show the same kind of classification on a Markov random configuration that has density close to 0 or 1.

It would also be interesting to see if the sparseness method can be applied to probabilistic cellular automata that are suggested for the density classification task. Fatès [3] has introduced a parametric family of one-dimensional probabilistic cellular automaton with a density classification property: for every $n \in \mathbb{N}$ and $\varepsilon > 0$, there is a setting of the parameter such that the automaton classifies a periodic configuration with period $n$ with probability at least $1 - \varepsilon$. Does the majority-traffic rule of Fatès with a fixed parameter classify sufficiently biased Bernoulli random configurations? A two-dimensional candidate would be the noisy version of the nearest-neighbor majority rule, in which the noise occurs only when there is no consensus in the neighborhood.

Finally, given its various applications, one might try to study the notion of sparseness in a more systematic fashion, trying to capture more details about the transition. It is curious that the notion of sparseness of Bernoulli random sets supports a hierarchy of phase transitions, even in one dimension where the standard notion of percolation fails.

**Acknowledgments.** Research supported by ERC Advanced Grant 267356-VARIS of Frank den Hollander. I would like to thank Jarkko Kari for suggesting this problem and for discussions that lead to this paper.
References

1. Bušić, A., Fatès, N., Mairesse, J., Marcovici, I.: Density classification on infinite lattices and trees. Electronic Journal of Probability 18(51), 1–22 (2013)

2. Durand, B., Romashchenko, A., Shen, A.: Fixed-point tile sets and their applications. Journal of Computer and System Sciences 78, 731–764 (2012)

3. Fatès, N.: Stochastic cellular automata solutions to the density classification problem. Theory of Computing Systems 53(2), 223–242 (2013)

4. Gach, P., Kurdyumov, G.L., Levin, L.A.: One-dimensional uniform arrays that wash out finite islands. Problems of Information Transmission 14(3), 223–226 (1978)

5. Gács, P.: Reliable computation with cellular automata. Journal of Computer and System Sciences 32, 15–78 (1986)

6. Gács, P.: Reliable cellular automata with self-organization. Journal of Statistical Physics 103(1/2), 45–267 (2001)

7. Gonzaga de Sá, P., Maes, C.: The Gacs-Kurdyumov-Levin automaton revisited. Journal of Statistical Physics 67(3/4), 507–522 (1992)

8. Kari, J., Le Gloannec, B.: Modified traffic cellular automaton for the density classification task. Fundamenta Informaticae 116, 1–16 (2012)

9. Kürka, P.: Cellular automata with vanishing particles. Fundamenta Informaticae 58, 203–221 (2003)

10. Land, M., Belew, R.K.: No perfect two-state cellular automata for density classification exists. Physical Review Letters 74(25), 5148–5150 (1995)

11. Levin, L.A.: Self-stabilization of circular arrays of automata. Theoretical Computer Science 235(1), 143–144 (2000)

12. Toom, A.L.: Nonergodic multidimensional systems of automata. Problems of Information Transmission 10(3), 239–246 (1974)

13. Toom, A.L.: Stable and attractive trajectories in multicomponent systems. In: Dobrushin, R.L., Sinai, Y.G. (eds.) Multicomponent Random Systems, pp. 549–575. Marcel Dekker (1980)