The search for symmetry, as an unusual yet profoundly appealing phenomenon, and the origin of regular, repeating configuration patterns have long been a central focus of complexity science and physics. To better grasp and understand symmetry of configurations in decentralized toroidal architectures, we employ group-theoretic methods, which allow us to identify and enumerate these inputs, and argue about irreversible system behaviors with undesired effects on many computational problems. The concept of so-called “configuration shift-symmetry” is applied to two-dimensional cellular automata as an ideal model of computation. Regardless of the transition function, the results show the universal insolvability of crucial distributed tasks, such as leader election, pattern recognition, hashing, and encryption. By using compact enumeration formulas and bounding the number of shift-symmetric configurations for a given lattice size, we efficiently calculate the probability of a configuration being shift-symmetric for a uniform or density-uniform distribution. Further, we devise an algorithm detecting the presence of shift-symmetry in a configuration. Given the resource constraints, the enumeration and probability formulas can directly help to lower the minimal expected error and provide recommendations for system’s size and initialization. Besides cellular automata, the shift-symmetry analysis can be used to study the nonlinear behavior in various synchronous rule-based systems that include inference engines, Boolean networks, neural networks, and systolic arrays.

Symmetry is a synonym for beauty and rarity, and generally perceived as something desired. In this paper, we investigate an opposing side of symmetry and show how it can irreversibly “corrupt” a computation, and restrict a system’s dynamics and its potentiality. We demonstrate this fundamental phenomenon, which we call “configuration shift-symmetry,” affecting many crucial distributed tasks on the simplest gridlike synchronous system of cellular automation. We show how to count these symmetric inputs depending on a lattice size and its prime factorization, how likely they are encountered, and how to detect them.

The structure of the computational rules that result in regular, repeating system configurations has been studied by many, yet the question of how the natural and engineered system organize into symmetric structures is not completely known. To understand the role of symmetry of the starting configurations (the inputs), how they are processed (the machine), and produce the final configurations with desired properties (the outputs) we use a cellular automata (CA) as a simple distributed model of computation. First introduced by John von Neumann, CAs were instrumental in the exploration of logical requirements for machine self-replication and information processing in nature.45 Despite having no central control and limited communication among the components, CAs are capable of universal computation and can exhibit various dynamical regimes.9,56,63 As one of the structurally simplest distributed systems, CAs have become a fundamental model for studying complexity in its purest form.20,64 Subsequently, CAs have been successfully employed in numerous research fields and applications, such as modeling artificial life,36 physical equations,24,58 and social and biological simulations.22,32,52,53

The CA input configurations define a language that is processed by the machine. Exploring the structural symmetries of the input language not only translates to an efficient machine implementation but also allows us to argue about a problem insolvability and the irreversibility of computation.

In this paper, we explore the concept of shift-symmetry and revisit a well-known fact that any standard CA maintains a configuration shift-symmetry due to uniformity and synchronicity of cells. We show that once a system reaches a symmetric, i.e., spatially regular configuration, the computation will never revert from this attractor and will fail to solve all problems that require asymmetric solutions. As a result, the number of symmetries of the dynamical system is never decreasing. When a configuration slips to a symmetric, repeating pattern the configuration space of the CA irreversibly folds, causing a permanent regime “shift.” Consequently, a nonsymmetric solution cannot be reached from a shift-symmetric configuration. A more general implication is that a configuration is unreachable (even if symmetric) if a source configuration has a symmetry not contained in the target. Nonsymmetric tasks, such as leader election or pattern recognition, i.e., tasks expecting a final configuration to be nonsymmetric, are, therefore, principally insolvable, since for any lattice size there always exist input configurations that are symmetric. As a hypothesis, we also briefly discuss the eventual gradual increase of system’s symmetries at the end of this paper, however, without any strong claims or proofs attached.

Using basic results from group theory and elementary combinatorics, we develop three progressively more efficient enumeration techniques based on mutually-independent generators to answer the question of how many potential shift-symmetric configurations there are in any given two-dimensional CA lattice. As a side product, we demonstrate that the shift-symmetry is closely linked to prime factorization. We introduce and prove lower and upper bounds for the number of shift-symmetric configurations, where the lower bound (local minima) is tight and reached only for prime lattice sizes. We enumerate shift-symmetric configurations for a given lattice size and number of active cells.

Finally, we derive a formula and bounds for the probability of selecting shift-symmetric configuration randomly generated from a uniform or density-uniform distribution. We develop a shift-symmetry detection algorithm and prove its worst-case and average-case time complexities.

All the formulas and proofs presented in this paper assume a two-dimensional CA with any number of states, and arbitrary uniform transition and neighborhood functions, which makes our results widely applicable.

Knowing the number of shift-symmetric configurations, we can directly determine the probability of selecting a shift-symmetric configuration by chance. This probability then equals an error lower bound or expected insolvability for any nonsymmetric task. As we show, the insolvability caused by shift-symmetry rapidly decreases asymptotically with the lattice size for a uniform distribution. For instance, the probability is 0.5 for a 2×2 lattice, but drops to around 2.7×1015 for a 10×10 lattice. Since the number of shift-symmetric configurations heavily depends on the prime factorization of the lattice size, the probability function is nonmonotonously decreasing. To minimize the occurrence of shift-symmetries for uniform distribution, we generally recommend using prime lattices, or at least avoiding even ones. On the other hand, the probability for a density-uniform distribution is quite high, regardless of primes; it is around 103, even for a 45×45 lattice.

The distribution error-size constraints have important consequences for designing robust and efficient computational procedures for many crucial distributed problems, such as leader election,6,56 pattern recognition,49 edge detection,55 image translation,30 convex hull/minimum bounding rectangle,14 hashing or collision resolution for associative memory,16 encryption,60 and random number generation.57 For these tasks, an expected final configuration, e.g., reproduction of a certain two-dimensional image, is frequently nonshift-symmetric, and, therefore, unreachable from a symmetric configuration. Alternatively, an expected configuration can be unreachable even if it is shift-symmetric, which occurs when the vector space of its generating vectors (shifts) do not contain all the shifts of an initial configuration.

Practical implications of these properties include performance degradation of systolic Central Processing Unit (CPU) arrays and nanoscale multicore systems.67 Our results span to the hardware implementations of synchronous CAs with Field-Programmable Gate Array (FPGA), used, e.g., for traffic signals control,33 random number generation,54 and reaction-diffusion model;31 and spintronics, where computation is achieved by coupled oscillators.10,59 Also, current efforts to implement two or three-dimensional cellular automata using DNA tiles26,61 and/or gel-separated compartments in so-called “gellular automata”27,35 may face problems related to configuration shift-symmetry if a synchronous update is considered.

In their seminal work, Packard and Wolfram46 identified the importance of symmetry and showed that the global properties of a CA emerge as a function of the transition function’s reflective and rotational symmetries. The fundamental algebraic properties of additive and nonadditive CAs were studied by Martin et al.,41 who demonstrated that in simple cases, there is a connection between the global behavior and the structure of the configuration transitions. Wolz and de Oliveira65 exploited the structure and the symmetry in the transition table to design an efficient evolutionary algorithm that found the best results for the density classification and parity problems. Marquez-Pita et al.39,40 used a brute-force approach to find similar input configurations that produce the same outputs. Their results are a compact transition function re-description schema that use wildcards to represent the many-to-one computation rules on a majority problem. Bagnoli et al.5 explored different methods of master–slave synchronization and control of totalistic cellular automata. A number of computation-theoretic results for CA were summarized by Culik et al.,21 who investigated CAs through the eyes of set theory and topology. The effect of symmetry on the complexity of Boolean functions was thoroughly researched by Babai et al.4 Pippenger47 studied translation functions capable of correcting CA configurations under a specific kind of symmetry: rotation (an isometry with a corner coordinate fixed).

Besides the symmetry of “transition functions” and the design of transition functions resulting in regular or synchronized patterns, a number of contributions to the theoretical CA literature have addressed the general structure and implications of shift-symmetric “configurations” also called translation invariant, or simply periodic, as we do here. This problem has been studied primarily in the context of group theory,13 through a general approach using stabilizers, group actions, and Bernoulli shifts. In particular, the work by Castillo-Ramirez and Gadouleau,12 for example, approaches the problem using Möbius inversion of the subgroup lattice. Our derivation differs from their work by leveraging the affordances of specifying in advance that our symmetries are restricted to shift-symmetries, i.e., the specific case of Cartesian powers of cyclic groups in two dimensions, and proceeding inductively, which allows us to derive stronger results for the subproblem of our interest. In particular, we provide more efficient and executable enumeration formulas in an algorithmic sense and a better lower bound for the number of aperiodic configurations. Note that Castillo-Ramirez and Gadouleau improved the bound found by Gao et al.25 

Another recent article23 explores similar questions regarding the number of distinct binary configurations of toroidal arrays in the presence of rotational and reflection symmetries. For our purposes, the ratio of symmetric to nonsymmetric configurations is of greater interest than a simple enumeration of the total. Accordingly, our work differs from theirs by our focus on enumerating how many of these configurations possess some nontrivial symmetry (and, additionally, we do not wish to be limited to the binary case of an alphabet of size 2).

The concept of symmetry in number theory has been applied to so-called tapestry design and periodic forests,3,42 which relates to CA configurations. However, the triangular topology and geometric branching differs from the discrete toroidal Cartesian topology typically used for CAs.

One of our main motivations is the pioneering work of Angluin,2 who noticed that a ring containing anonymous components (processors), which are all in the same state, will never break its homogeneous configuration and elect a leader. This intuitive observation is, in fact, a special case of the concept of configuration shift-symmetry for CAs. We will show that Angluin’s homogeneous state, which corresponds to a configuration of all zeros or all ones in a binary CA, is the most symmetric configuration for a given lattice size.

The concept of shift-symmetry is related to the notion of regular domains in computational mechanics.19,28,50,51 A shift-symmetric configuration is essentially a (global) regular domain spread to a full lattice. Although we cannot apply our results directly to regular domains at the level of subconfigurations, because we pay no attention to local symmetries and noncyclic and nonregular borders, the number of possible shift-symmetric configurations gives at least an upper bound on the number of possible regular domains.

In our previous work,8 we proved that configuration shift-symmetry, along with loose-coupling of active cells, prevents a leader from being elected in a one-dimensional CA.6 The “leader election” problem, first introduced by Smith,56 requires processors to reach a final configuration where exactly one processor is in a leader state (one) and all others are followers (zero). Leader election is a representative of a problem class where the solution is an asymmetric, nonhomogeneous, transitionally and rotationally invariant system configuration. A final fixed-point configuration is asymmetric, since it contains only one processor in a leader state. Clearly, leader election and symmetry are “enemies,” and, in fact, leader election is often called symmetry-breaking.

To enumerate shift-symmetric configurations for a one-dimensional case,8 we employed only basic combinatorics. Here, in order to span to two dimensions, we extend our enumeration machinery to include some basic concepts from group theory and we rely heavily on the notion of independent generators. We show that the insolvability caused by configuration symmetry extends beyond leader election to a whole class of nonsymmetric problems.

By definition, a CA17 consists of a lattice of N components, called “cells,” and a “state set” Σ. A state of the cell with index i is denoted siΣ. A “configuration” is then a sequence of cell states

(1)

Given a topology for the lattice and the number of neighbors b, a “neighborhood” function η:N×ΣNΣb maps any pair (i,s) to the b-tuple ηi(s) of cells’ states that are accessible (visible) to cell i in configuration s. Note that each cell is usually its own neighbor.

The transition rule ϕ:ΣbΣ is applied in parallel to each cell’s neighborhood, resulting in the synchronous update of all of the cells’ states sit+1=ϕ(ηi(s)t). The transition rule is represented either by a transition table, also called a look-up table, or a finite state transducer.29 Here we focus exclusively on “uniform” CAs, where all cells share the same transition function. The “global transition rule” Φ:ΣNΣN is defined as the transition rule with the scope over all configurations: st+1=Φ(st).

In this paper, we analyze two-dimensional CAs, where cells are topologically organized on a two-dimensional grid with cyclic boundaries, i.e., we treat them as tori. The true power of our analysis is that it applies to two-dimensional CAs with arbitrary neighborhood and transition functions. We rely only on their uniformity: each cell has the same neighborhood and transition function; and synchronous update, the attributes typically assumed for a standard CA.

Figure 1 shows the update mechanism for a two-dimensional binary CA with a Moore neighborhood, a square neighborhood with radius r=1 containing 9 cells. The dynamics of two-dimensional CAs are illustrated as a series of configuration snapshots, where an active cell is black and an inactive cell white (Fig. 2).

FIG. 1.

Schematic of the configuration update for a binary two-dimensional CA, where the first nine bits in the transition table represent the flattened Moore neighborhood and the last bit is the output.

FIG. 1.

Schematic of the configuration update for a binary two-dimensional CA, where the first nine bits in the transition table represent the flattened Moore neighborhood and the last bit is the output.

Close modal
FIG. 2.

Example space–time diagrams of a leader-electing CA on lattice size N=402 from Ref. 7. Figures show a CA computation starting with a random initial configuration (time t0), followed by 7 configuration snapshots. The CA reaches a final configuration with a single active cell (leader) at time t212.

FIG. 2.

Example space–time diagrams of a leader-electing CA on lattice size N=402 from Ref. 7. Figures show a CA computation starting with a random initial configuration (time t0), followed by 7 configuration snapshots. The CA reaches a final configuration with a single active cell (leader) at time t212.

Close modal

As stated by Angluin,2 the problem of reaching a “center” (i.e., leader) in homogeneous configurations is insolvable by any anonymous deterministic algorithm (including CAs). The CA uniformity can be embedded in its transition function, the deterministic update, synchronicity, topology, configuration, and cells’ anonymity. Intuitively, a fully uniform system in terms of its structure, configuration, and computational mechanisms cannot produce any reasonable or complex dynamics.

We show that Angluin’s homogeneous configurations of 0N and 1N belong to a much larger class of so-called shift-symmetric configurations. In this section, we formalize the concept of configuration shift-symmetry by employing vector translations and group theory. Figure 3 depicts a CA computation on a two-dimensional shift-symmetric configuration. Compared to the one-dimensional case,8 two dimensions are more symmetry-potent.

FIG. 3.

Space–time diagrams of CA computation on a two-dimensional binary shift-symmetric configuration showing a lattice at three consecutive time steps. Once reached, a shift-symmetry cannot be broken.

FIG. 3.

Space–time diagrams of CA computation on a two-dimensional binary shift-symmetric configuration showing a lattice at three consecutive time steps. Once reached, a shift-symmetry cannot be broken.

Close modal

It is important to mention that we deal with “square” configurations only. Nevertheless, we suggest most of the lemmas and theorems could be extended to incorporate arbitrary rectangular shapes. Also, the formulas and methodology to enumerate two-dimensional shift-symmetric configurations could be generalized to arbitrarily many dimensions. For consistency, however, we leave the rectangular as well as n-dimensional extensions for future consideration. Note that in order to improve the readability of the main text, all proofs and formally defined lemmas and theorems appear in  Appendix A. The equations that have nontrivial proofs in the Appendix are labeled with the “” symbol. See, e.g., Eq. (4′) Lemma E.4.

First, we define a shift-symmetric (square) configuration by a given vector as shown in Fig. 4. Formally, for a nonzero vector (pattern shift) vZn×Zn we denote by

(2)

the set of all “shift-symmetric square configurations” of size N=n2 relative to v over the alphabet Σ, where denotes coordinatewise addition on Zn×Zn.

FIG. 4.

Schematic of a shift-symmetric two-dimensional configuration generated by the vector v=(2,3) on Z10×10.

FIG. 4.

Schematic of a shift-symmetric two-dimensional configuration generated by the vector v=(2,3) on Z10×10.

Close modal

Note that as opposed to our previous work,7 we renamed “symmetric” to “shift-symmetric” configurations to avoid confusion with reflective or rotational symmetries. These two symmetry types, unlike shift-symmetry, are not generally preserved by a transition function unless we impose certain “symmetric” properties on the transitions.

Since any translation by a nonzero vector v defines a configuration symmetry, we can study shift-symmetric configurations with the techniques of group theory. From now on, we will call such a nonzero vector vZn×Zn that we use for state translation a “generator” formalized as

(3)

where v is the cyclic subgroup of Zn×Zn generated by v.

Trivially, for any nonzero vZn×Zn

(4)

In the following text, we bridge shift-symmetry, which is associated with configurations, i.e., static “states,” with any uniform transition rule, which defines the “dynamics” of CA. We show that shift-symmetry cannot be broken, thus it fundamentally restricts the reachable states and the potentiality of a transition rule. More formally, for a vector v and any uniform global transition rule Φ

(5)

and so, by induction, a nonsymmetric configuration qSn×n(v) is unreachable from a shift-symmetric sSn×n(v)

(6)

As a consequence, several tasks for CA are principally insolvable. For instance, a target configuration for leader election56 contains exactly one cell in the leader state aΣ. This configuration is asymmetric for n>1 as shown in Fig. 5 (asym-d), and, therefore, unreachable from any shift-symmetric configuration. Further, several image-processing tasks illustrated in Fig. 5 are insolvable: e.g., image translation (sym-c to asym-c)30 and pattern recognition or noise filtering (sym-c to asym-f and sym-a to sym-b).49 Also, the task of random57 or prime p number generation is insolvable if p|n (for p = 7: sym-a to asym-e). If a configuration is shift-symmetric, the associative memory16 has a corrupted (nonuniform) hashing function to handle collisions (e.g., sym-a to asym-a). This in general sense also applies to encryption.60 

FIG. 5.

Examples of shift-symmetric configurations with generating vector(s) in the left, and shift-asymmetric configurations in the right column, all on the lattice Z10×10. Since a shift-symmetry by a specific vector cannot be lost, there exists no CA (transition function), which would eventually reach any of the asymmetric configurations (right) from any of the symmetric ones (left). That also means a shift-symmetric configuration by a vector u cannot be reached from another shift-symmetric configuration, which is not generated by 〈u〉. For instance, the configuration sym-a, generated by the vector v=(5,5), cannot be transformed to the configuration sym-b generated by the vector u=(2,2), but can be transformed to the configuration sym-c, since its vector space (5,0),(0,5)v. Reachability among the shift-symmetric configurations in the figure is indicated by arrows.

FIG. 5.

Examples of shift-symmetric configurations with generating vector(s) in the left, and shift-asymmetric configurations in the right column, all on the lattice Z10×10. Since a shift-symmetry by a specific vector cannot be lost, there exists no CA (transition function), which would eventually reach any of the asymmetric configurations (right) from any of the symmetric ones (left). That also means a shift-symmetric configuration by a vector u cannot be reached from another shift-symmetric configuration, which is not generated by 〈u〉. For instance, the configuration sym-a, generated by the vector v=(5,5), cannot be transformed to the configuration sym-b generated by the vector u=(2,2), but can be transformed to the configuration sym-c, since its vector space (5,0),(0,5)v. Reachability among the shift-symmetric configurations in the figure is indicated by arrows.

Close modal

In this section, we will further investigate shift-symmetric two-dimensional configurations and ask how many there are in a square lattice of size N=n2. First, to generalize shift-symmetry and lay a solid ground for group-centric analysis, we define the symmetric configurations over several generators.

Let LZn×Zn. We define the set of L-symmetric configurations to be the set

(7)

where L={c1v1c|L|v|L||ciZn}. In other words, Sn×n(L) denotes the set of all shift-symmetric configurations of size N=n2 over the alphabet Σ with a generator set L.

Directly from the definition, for any subset LZn×Zn,

(8)

and for any u,vZn×Zn

(9)

The following equivalence, which may sound counterintuitive at first, adapts shift-symmetry for the theory of groups. It states that if a vector v generates a cyclic “subgroup” of another vector u, then its set of shift-symmetric configurations is a “superset” (not a subset!) of that generated by the vector u and vice versa, i.e., for any u,vZn×Zn

(10)

Now, in a straightforward manner, we define the set of all shift-symmetric configurations Sn×n over all possible combinations of vectors (shifts) for a given lattice as

(11)

Due to nontrivial intersections of the sets Sn×n(v), it is fairly unpractical to count the shift-symmetric configurations over all n21 vectors. We, instead, construct significantly fewer generators using prime factors of n, which equivalently produce an entire set of shift-symmetric configurations.

We start with the definition of the generators. For any natural number n, let n=j=1ω(n)pjαj be the prime factorization, where ω(n) denotes the number of distinct prime factors. We define the generator set Gn as

(12)

where for each prime divisor pj

The total number of these generators is then

(13)

Using some divisibility arguments, we can prove that they indeed produce all shift-symmetric configurations

(14)

Further, we show that these prime-based generators are mutually independent, thus greatly simplifying the counting problem to relatively compact closed formulas. For any distinct u,vGn (nN),

(15)

and for any distinct u,vGn(p), where p is a prime divisor of n and n^=n/p

(16)

In particular, |u,v|=p2.

Finally, we are ready to enumerate shift-symmetric configurations. In the following formulas, given any v, wZk, we write vw whenever the coordinates satisfy viwi for every i(1ik). We write vw if vw and vw. We denote the sum of the coordinates by |v|=i=1kvi, and for any mZ, we write m for the k-tuple whose coordinates all equal m. Let n=i=1kpiαi be the prime factorization of n, where k=ω(n), the number of distinct prime factors of n. Note that a one-by-one lattice offers no symmetries since there exists no nonzero shift in Z1×Z1.

As the base, we first combine the generators Gn directly by the inclusion-exclusion principle and apply the fact that these generators are mutually independent [Eq. (15′)], as well as that their joint size is at most |u,v|=p2 [Eq. (16′)]. That gives us

(17)

where p=(p1,,pk) and f(v)=n2i=1kpimin(vi,2).

An alternative and more efficient counting is based on an idea of grouping of the exponential elements Σf(v) from the original formula [Eq. (17′)], which are costly to calculate. It goes as follows:

(18)

where g(v)=n2i=1kpivi and top(v)Zk has the ith coordinate

The final formula that follows is the most efficient because, besides having the exponential elements grouped, it also reduces the inner binomial sum to a simple expression r(i),

(19)

where g(v)=n2i=1kpivi and

Interestingly, for a prime lattice n=p the vector v is (1) and g(v)=n, or v=(2) and g(v)=1, which forces formula (19′) to collapse to

(20)

The gradual improvements from Eqs. (17′) and (18′), and finally to Eq. (19′) are illustrated for n=2α13α2 in  Appendix B.

In Sec. III, we derived closed and increasingly efficient formulas for counting the number of shift-symmetric configurations in a square lattice N=n2. To get a deeper and more qualitative insight, we now bound this number from the top and the bottom by exponential functions. We prove that the lower bound is tight on prime lattices (example in Fig. 7), whereas local maxima are reached on even ones (Fig. 6).

FIG. 6.

Number of shift-symmetric two-dimensional binary (|Σ|=2) configurations for the lattice sizes 22 to 1002 with an inset focused on the area 22 to 102. Note the local minima for prime and local maxima for even sizes.

FIG. 6.

Number of shift-symmetric two-dimensional binary (|Σ|=2) configurations for the lattice sizes 22 to 1002 with an inset focused on the area 22 to 102. Note the local minima for prime and local maxima for even sizes.

Close modal
FIG. 7.

All 26 binary shift-symmetric configurations for the lattice size of 32 grouped into 5 classes based on the generating vector(s). The vectors are from left to right: (0,1),(1,0),(1,1),(1,2) and the one at the bottom containing all of them. The arrows show allowed transitions. Note that for prime-size binary lattices |Sn×n|=2n(n+1)2n.

FIG. 7.

All 26 binary shift-symmetric configurations for the lattice size of 32 grouped into 5 classes based on the generating vector(s). The vectors are from left to right: (0,1),(1,0),(1,1),(1,2) and the one at the bottom containing all of them. The arrows show allowed transitions. Note that for prime-size binary lattices |Sn×n|=2n(n+1)2n.

Close modal

More precisely, for any nN, |Sn×n| can be bounded as

(21)

where equality holds if and only if n is a prime.

For an upper bound, let n=i=1kpiαi be the prime factorization of n, where k=ω(n), the number of distinct prime factors of n. Then

(22)

Note that our bound is significantly lower than the bound |Σ|n2(n21)|Σ|n2/2 found by Castillo-Ramirez and Gadouleau.12 Also recall that they addressed a more general problem of counting aperiodic configurations on an arbitrary group.

By combining the inequalities (21′) and (22′), the number of shift-symmetric configurations satisfies

(23)

To calculate the probability that a randomly drawn configuration is shift-symmetric, we first handle a uniform distribution, in which each symbol from Σ for si in configuration s is equally likely. For nonsymmetric tasks, this probability directly equals a least expected insolvability (or error lower bound).

Overall, there exist |Σ|n2 configurations and each configuration is equally likely, hence the probability of selecting a shift-symmetric configuration in a square lattice of size N=n2 over uniform distribution is Pn×n{unif}=|Sn×n||Σ|n2. Further, by applying the inequality (23) and knowing that n|Σ|n|Σ|n(n+1)|Σ|n, we can bound the probability as

(24)

As exemplified in Fig. 8 and mathematically rooted in inequality (24), the probability Pn×n{unif} decreases rapidly: square-exponentially by n or exponentially by the lattice size N=n2. Since |Sn×n| depends on the prime factorization of n the probability is nonmonotonous. Similar to |Sn×n| the probability Pn×n{unif} reaches local minima for prime and local maxima for even lattices (n>4).

FIG. 8.

Probability of selecting a shift-symmetric two-dimensional binary (|Σ|=2) configuration using uniform distribution for the lattice sizes 22 to 1002 with an inset focused on the area 22 to 102. Note the local minima for prime and local maxima for even sizes (n>4).

FIG. 8.

Probability of selecting a shift-symmetric two-dimensional binary (|Σ|=2) configuration using uniform distribution for the lattice sizes 22 to 1002 with an inset focused on the area 22 to 102. Note the local minima for prime and local maxima for even sizes (n>4).

Close modal

Having enumerated “all” shift-symmetric configurations we now tackle a subproblem of enumerating configurations with a specific number of cells in a given state, such as the state “active.” The motivation behind this endeavor is to calculate the probability of selecting a shift-symmetric configuration generated by a density-uniform distribution.

We first define a set of shift-symmetric configurations with k cells in a special state a. Formally, for any state aΣ and n,kN, we define Dn×n,ka to be the set of all square configurations with exactly k sites in state a

(25)

where #as denotes the number of cells in a configuration s that are in a state a. Accordingly, let Sn×n,ka be the set of such configurations that are symmetric:

(26)

and for any vZn×Zn, let Sn×n,ka(v) denote the set of configurations in Sn×n,ka that are generated by v so that

(27)

As a direct corollary, for any aΣ, any n,kN, and v=(l1,l2)Zn×Zn,

(28)

To launch our enumeration endeavor, we focus first on shift-symmetric configurations of a single generating vector. For any aΣ, any kN, and vZn×Zn such that |v| divides k

(29)

To derive the counting formulas for the specifics of k-active-cell configurations, we mimic the advancements of the three counting techniques based on mutually-independent generators for |Sn×n| from Sec. III, but this time, we root them into Eq. (29′).

As before we start with a base formula. Pick n,kN with kn and let d={gcd}(k,n). Let n=i=1ω(n)piαi, k=i=1ω(k)qiβi, and d=i=1ω(d)riγi be the prime factorizations of n, k, d, respectively. Then, for any aΣ,

(30)

where r=(r1,,rω(d)) and h(u)=i=1ω(d)rimin(ui,2).

Similar to Eq. (18′) from Sec. III, the following alternative counting method is more efficient than the core Eq. (30′) due to the grouping of the exponential elements.

(31)

where h(v)=i=1ω(d)rimin(vi,2) and top(v)Zω(d) has the ith coordinate

At last, as a parallel to Eq. (19′), we derive the final formula, which further simplifies the counting mechanics by collapsing the inner binomial sum to a simple expression r(i).

(32)

where h(v)=i=1ω(d)rimin(vi,2) and

As a special case, it can be shown that the number of “binary” symmetric configurations (|Σ|=2) with k sites in state a is

(33)

For illustration purposes, an example of the three increasingly more compact counting formulas is given for n=2α13α2 and k=2β13β2,β1α1,β2α2 in  Appendix B.

Besides a uniform distribution, a CA’s performance is commonly evaluated using a so-called density-uniform distribution, in which the probability of selecting k active cells (#as=k), a “density,” is uniformly distributed. Since for a density k there exist n2k(|Σ|1)n2k configurations and each density is equally likely, the probability of selecting a shift-symmetric configuration in a lattice N=n2 over a density-uniform distribution is then

(34)

As presented in Fig. 9, the probability for density-uniform distribution decreases a magnitude slower than for the uniform one and reaches 0.001 even for N=452. That is due to the fact that density-uniform distribution selects configurations with a few or many active cells, which are combinatorially more symmetric, more often.

FIG. 9.

Probability of selecting a shift-symmetric two-dimensional binary (|Σ|=2) configuration using density-uniform distribution for the lattice sizes 22 to 1002 with an inset focused on 22 to 102.

FIG. 9.

Probability of selecting a shift-symmetric two-dimensional binary (|Σ|=2) configuration using density-uniform distribution for the lattice sizes 22 to 1002 with an inset focused on 22 to 102.

Close modal

For practical reasons, e.g., to test whether a current system’s configuration is shift-symmetric, and if yes take an action (restart), we provide an algorithm to effectively detect an occurrence of shift-symmetry.

First, to find out whether a configuration is shift-symmetric by a shift v we start at a corner cell w=(0,0) and check if all the cells at the orbit wiv are in the same state. If yes, we repeat this process for the next orbit and so on, moving in an arbitrary but fixed order (e.g., left-right up-down), until we check all the cells. If a cell has been visited before we skip it and move on until we find an unvisited cell, which marks a start of the next orbit. Also, if the test fails at any point, a configuration is nonshift-symmetric (by v), and the process can be terminated. Otherwise, the property holds for all the cells and a configuration is shift-symmetric.

To determine whether a configuration is shift-symmetric globally, a naive way would be to try all possible nonzero vectors v and check if any of them passes the aforementioned procedure. Luckily, as we discovered in Sec. II each configuration shift-symmetry “overlaps” with mutually-independent generators from Gn. Recall that these generators are defined by prime factors and their total number |Gn|=ω(n)+i=1ω(n)pi is significantly smaller than n2.

In the worst case, the shift-symmetry test needs to visit all n2 cells and there are |Gn| vectors to try. Since O[|Gn|)=O(sopf(n)] and sopf(n)=i=1ω(n)pi, also known as the integer logarithm, is at most n, the worst-case time complexity is

(35)

Similarly, with a slightly more complicated proof, we can show that the average-case time complexity of the shift-symmetry test for a configuration generated from a uniform distribution is

(36)

Note that the worst-case and average-case time complexity of O(n3) and O(n2), respectively, translate to O(NN) and linear O(N) when interpreted by the optics of the number of cells N=n2. The function sopf(n), which plays a crucial role in both O formulas, is of a logarithmic nature in “most of the cases,” but n for primes. Since the number of primes is infinite, we could not use any tighter asymptote than n. However, for randomly chosen n the expected time complexities drop to just O[{log}(n)n2] and O[{log}2(n)], respectively.

It is worth mentioning that the presented algorithm detects “if” a configuration is shift-symmetric but does not count the number of shift-symmetries in a configuration. The validity of the detection holds because we know that “any” shift-symmetric configuration must obey at least one of the prime generators from Gn. Nevertheless, to determine the number of shift-symmetries, i.e., the number of vectors with distinct vector spaces in Zn×Zn for which the cells at a same orbit share the same state, we would need to consider also subvectors, whose satisfiability cannot be generally inferred from the prime generators. Construction of a “counting” algorithm is addressable but goes beyond the scope of this paper.

Shift-symmetry, as we illustrated in the paper, decreases the system’s computational capabilities and expressivity, and is generally good to be avoided. For each shift-symmetry, a system falls into, a configuration folds by the order of symmetry and “independent” computation shrinks to a smaller, prime fraction of the system. The rest is mirrored and lacks any intrinsic computational value or novelty. The number of reachable configurations shrinks proportionally as well.

One of the key aspects of shift-symmetry is that it is maintained (irreversible) for any number of states, and any uniform transition and neighborhood functions. It means that the occurrence of shift-symmetry is rooted in the CA model itself, specifically, in the cells’ uniformity, synchronous update, and toroidal topology. Shift-symmetry is preserved as along as a transition function is uniform (shared among the cells), even if nondeterministic. In other words, during each step, a transition function can be discarded and regenerated at random. However, within the same synchronous update it must be consistent, i.e., two cells whose neighborhood’s subconfigurations are the same must be transitioned to the same state.

We showed that a nonshift-symmetric solution is unreachable from a shift-symmetric configuration. Even more, a shift-symmetric configuration cannot be reached from another shift-symmetric one, if the vector space defining the symmetries of the starting configuration is not a subset of the target configuration's vector space. This renders the tasks, such as leader election,6,56 several image processing routines including pattern recognition,49 and encryption,60 insolvable by uniform CAs in a general sense. These procedures are fundamental for many distributed protocols and algorithms. Additionally, leader election contributes to decision making of biological societies18,38 and is a key driver of cell differentiation37,44 responsible for their structural heterogeneity and specialization.

To determine how likely a configuration randomly generated from a uniform distribution is shift-symmetric, hence insolvable, we efficiently enumerated and bounded the number of shift-symmetric configurations using mutually-independent generators. We also introduced a lower, tight prime-size bound, and an upper bound, and showed that even-size lattices are locally most likely shift-symmetric. By specializing on Cartesian powers of cyclic groups (two-dimensional case), we obtained more effective counting and probability formulas and sharper bounds compared to the state-of-the-art work addressing the problem for general groups.12,25 We also extended our machinery to a fixed number of active symbols and derived a probability formula for density-uniform distribution.

Overall, shift-symmetry is not as rare as one would think, especially for small or nonprime lattices, or when a configuration is generated using density-uniform distribution. Asymptotically, the probability for uniform distribution drops exponentially with the lattice size but a magnitude slower for a density-uniform distribution. For instance, the probability for a 1002 square lattice is around 101505 using uniform and 2×104 using density-uniform distribution. Importantly, shift-symmetry does not necessarily have to be harmful for all the tasks. For instance, the density classification,15,20,43,48 which is widely used as a CA benchmark problem, requires a final configuration to be either 1N if the majority of cells are initially in the state 1, and 0N otherwise. Since the expected homogeneous configurations are fully shift-symmetric, they can be reached potentially from any configuration. Naturally, that depends on the structure of a transition function but shift-symmetry does not impose any strong restrictions here. The ability of reaching a “valid” answer does not necessarily mean reaching a “correct” answer. However, for the density classification, shift-symmetry tolerates the latter as well. It is because a shift-symmetric configuration consists purely of repeated subconfigurations, and so the density (ratio of ones) in a subconfiguration is the same as in the whole.

To detect whether a configuration is shift-symmetric we constructed an algorithm, which, by using the base prime generators, can effectively determine the presence of shift-symmetry in linear O(N) time for prime and just O([12log(N)]2) for randomly chosen N on average.

By moving from one to two dimensions, we generalized our machinery to vector translations, which can be extended to the n-dimensional case.11 It is expected that the number of shift-symmetric configurations will grow with the dimensionality of lattice. It will be interesting to investigate this relation from the perspective of prime-exponent divisors.

An important implication of shift-symmetry is that cyclic behavior must occur only within the same symmetry class defined by a set of prime shifts (vectors) as illustrated in Fig. 7. Note that we count no-symmetry as a class as well. This leads to the realization that once a CA gains a symmetry, i.e., a configuration crosses symmetry classes, it cannot be injective and reversible, and there must exist a configuration without a predecessor, a so-called “Garden of Eden” configuration.1,34 It means that the only way for the CA to stay injective is to decompose all the configurations into cycles, each fully residing in a certain shift-symmetry class. Again, one large class would contain all the nonshift-symmetric configurations. Open question is for which lattices, i.e., for how many shift-symmetric configurations, CAs are noninjective, thus irreversible, on average. As opposed to our shift-symmetric endeavor, which applies to any transition function, investigating injectivity would require to assume something about the transition function, e.g., that is generated randomly. Trivially, for any lattice, there always exists an injective transition function. An example is an identity function.

As we proved, the number of symmetries in any synchronous toroidal CA is nondecreasing. A natural question is: could it be increasing in the “average” case for a random transition function? We know that the expected behavior of randomly generated CA is most likely chaotic and the attractor length is exponential to the lattice size N, as opposed to ordered or complex CAs with linear or quadratic attractors.66 Would the length of attractor be sufficient to discover a shift-symmetry if we keep a random CA running long enough, potentially |Σ|N time steps? As seen in Fig. 8, the ratio of shift-symmetric configurations assuming a uniform distribution is exponentially decreasing with the lattice size, and prime lattices could produce “only” around n|Σ|n symmetric configurations. For a randomly chosen lattice size, dimensions, and cell connectivity, we expect the number of reachable symmetries to be significantly smaller than the total number of symmetries available. However, for symmetry-rich lattices, we speculate that toroidal synchronous uniform systems, such as CAs, could undergo “spontaneous symmetrization” contracting an initial configuration to a fully homogeneous state (analogical to Big Crunch). If proven, it would directly imply the system’s noninjectivity and irreversibility, and would bind symmetrization with “nonergodicity.” This hypothesis will be addressed in our future work.

We suggest that several phenomena observed in CA dynamics, such as irreversibility, emergence of structured “patterns,” and self-organization could be explained or contributed to shift-symmetry. As demonstrated by Wolfram62 on 256 elementary one-dimensional CAs, when run long enough, most of these CAs condensate to ordered structures: homogeneous configurations and self-similar patterns, which are in fact shift-symmetric.

A straightforward way to fight symmetry would be to introduce noise, i.e., to break the uniformity of cells and/or to use an asynchronous update. Based on the amount of noise, this could, however, disrupt the consistency of local, particle-based, interactions, which give rise to a global computation. Clearly, asynchronicity makes a system more robust but sacrifices the information processing by “algebraic” structures, which could exist only due to synchronous update.

Practical utility of the presented enumeration formulas and probability calculations for a given distributed application is that, we can minimize a likelihood of shift-symmetry-caused insolvability as well as the number of resources needed. An online supplementary web page, which implements these formulas as well as an embedded simulator to run a CA on a shift-symmetric configuration, can be found at https://coel-sim.org/symmetry.

This material is based upon work supported by the National Science Foundation (NSF) under Grant Nos. 1028120, 1028378, and 1518833 and by the Defense Advanced Research Projects Agency (DARPA) under Award No. HR0011-13-2-0015. The views expressed are those of the author(s) and do not reflect the official policy or position of the Department of Defense or the U.S. Government. Approved for Public Release, Distribution Unlimited.

Note: lemmas, theorems, and corollaries are numbered such that those starting with E correspond to the equations in the main text which they are referenced from [e.g., Lemma E.4 Eq. (4′)]. The remaining nonequation-referenced (auxiliary) lemmas have the A prefix.

Lemma A.1.
For any nonzero vector (generator) vZn×Zn,
where v is the cyclic subgroup of Zn×Zn gen. by v.
Lemma E.4

For any nonzero v=(l1,l2)Zn×Zn, the following hold

(i). |Sn×n(v)|=|Σ|n2|v|.

(ii). |v|=ngcd(l1,l2,n),

(iii). |Sn×n(v)|=|Σ|ngcd(l1,l2,n).

Proof.

(i). When v=(l1,l2) is repeatedly applied to any cell in the lattice, an orbit is generated, consisting of |v| cells that must share a common state for any configuration in Sn×n(v). The number of distinct orbits of cells in the lattice is simply n2|v|. Any configuration in Sn×n(v) is thus uniquely determined by choosing a state from Σ for each orbit of cells, so (i) follows.

(ii). For lZn it is easily shown that |l|=ngcd(l,n), so
where lcm denotes the least common multiple.
(iii). By (ii), the exponent in (i) becomes
as desired.
Lemma A.5.
Fix any nonzero vector vZn×Zn and any shift-symmetric square configuration sSn×n(v). Then for any wZn×Zn, the neighborhoods satisfy
Proof.
Suppose the neighborhood function, which is uniformly shared by all cells, is defined by (relative) vectors u1,,um, i.e., ηw(s)=(swu1,,swum) and assume the lemma does not hold, i.e., there exists w for which ηw(s)ηwv(s). Then
and so there exists some uj such that swujs(wv)uj, i.e., swujs(wuj)v, which contradicts the assumption that sSn×n(v).
Theorem E.5.

If sSn×n(v) then Φ(s)Sn×n(v) for any uniform global transition rule Φ.

Proof.
Suppose q=Φ(s) is not symmetric by v. Then, there exists uZn×Zn, such that ququv. By Lemma A.5, ηu(s)=ηuv(s), and so
which is a contradiction.
Lemma E.10
For any u,vZn×Zn
Proof.
(). Suppose Sn×n(u)Sn×n(v). Then
by Corollary [Eq. (9)]. But then |u|=|u,v| by Corollary [Eq. (8)], which forces u=u,v, so that vu and vu as desired.

(). By way of contradiction, suppose that Sn×n(u)Sn×n(v) and vu. Let sSn×n(u) such that sSn×n(v). Then s is symmetric under u but not under v. Consequently, there exists wZn×Zn such that swswv. But sSn×n(u) and vu by assumption, so Lemma A.1 implies that sw=swv, which is a contradiction.

Lemma A.11

For any prime p that divides n and any i(0i<n), the cyclic group (np,inp) is simple, i.e., it has no nontrivial proper subgroups.

Proof.

By Lemma E.4(ii), we see that (np,inp) has order p, and by Lagrange’s theorem, any group with prime order is simple.

Remark

By swapping the coordinates, the proof applies also to each subgroup of the form (inp,np).

Lemma E.14.
Fix any natural number n and let n=j=1ω(n)pjαj be the prime factorization of n, where ω(n) denotes the number of distinct prime factors. Then,
where Gn is defined as in Definition [Eq. (12)].
Proof.

(). Let sSn×n, so that sSn×n(v) for some nonzero v=(a,b)Zn×Zn. It suffices to show that wv for some wGn, since this fact, by Lemma E.10, implies Sn×n(v)Sn×n(w) and, therefore, sSn×n(w).

Without loss of generality, we may assume gcd(a,b,n)=1. Otherwise, we simply divide everything by d=gcd(a,b,n) to obtain v^=(a^,b^), and n^, respectively. Once we show that w^v^ for some w^Gn^, we multiply throughout by d to obtain the desired result.

Case 1. Suppose gcd(a,n)=1. Then ainb and ajn1 for some i, jZ. Also, nvn(0,0), so |v| divides n. Let p be any prime divisor of |v| and write n=pm for some mZ. Let w=(m,im) and note that wGn(p). Also observe v=a(1,i) and w=m(1,i), so that
Therefore, wv and thus wv as desired.
Case 2. Suppose gcd(a,n)1. Let p be any prime divisor of both a and n, so that a=pa and n=pn for some a,nZ. Let w=(0,n) and note that wGn(p). Observe that an=apn=ann0, so
Therefore, nvw. But by Lemma E.4(ii), |w|=p, a prime. So if nv is nonzero, then it generates w. But nv is indeed nonzero, since its second coordinate is bn, and if bnn0, then n|bn. Dividing by n, we see p|b. But recall that p divides a and n, and we assumed at the beginning (without loss of generality) that gcd(a,b,n)=1. So p cannot divide b. This contradiction shows nv is nonzero and so nv generates w. Thus
So, wv as desired.

(). Immediate by Definition [Eq. (11)].

Lemma E.15.
Fix any nN. For any distinct u,vGn,
(A1)
Proof.

First, suppose that uGn(p) and vGn(q), where pq. By Lemma E.4(i), |u|=p and |v|=q. Since |uv| must divide both of these primes, the line (⋆) must hold as claimed.

Next, suppose u,vGn(p) and write n=n^p for some n^Z. Suppose u=(n^,in^) and v=(n^,jn^) for some 0i<j<p. If xuv then k,l(0k,l<p) such that x=ku=lv. But then (kn^,kin^)=(ln^,ljn^), so kn^nln^ and thus kpl. But also, kin^nljn^, so that kiplj. Since ipj, this forces kp0, so that x=0 and (⋆) must hold as claimed.

Finally, suppose u,vGn(p) and suppose u=(0,n^) and v=(n^,in^) for some 0i<p. If xuv then k,l(0k,l<p) such that x=ku=lv. But then (0,kn^)=(ln^,lin^), so 0nln^ and thus 0pl. But also, kn^nlin^, so that kpli and, therefore, kp0. Now x=0 and (⋆) must hold as claimed.

Lemma E.16.
Fix any nN and any prime divisor p of n. Let n^=n/p. Then for any distinct u,vGn(p),
In particular, |u,v|=p2.
Proof.

(). First suppose u=(n^,in^) and v=(n^,jn^) for some 0i<j<p. Then u=(n^,0)+i(0,n^) and v=(n^,0)+j(0,n^). So u,v(n^,0),(0,n^) as desired. A similar argument holds when u=(n^,in^) and v=(0,n^).

(). Again suppose u=(n^,in^) and v=(n^,jn^) for some 0i<j<p. Then uv(0,n^). But uv0 and |(0,n^)|=p, so uv generates (0,n^). Thus (0,n^)uvu,v. Likewise, (n^,0)juivu,v, so the desired containment holds. A similar argument can be made when u=(n^,in^) and v=(0,n^), showing that (n^,0)uiv, which implies the desired result.

Lemma E.17.
Let n=i=1kpiαi be the prime factorization of n, where k=ω(n), the number of distinct prime factors of n. Then,
where p=(p1,,pk) and f(v)=n2i=1kpimin(vi,2).
Proof.
By Lemma E.14, inclusion-exclusion, and Eq. (9),
Since Gn=j=1kGn(pj), we have k=ω(n) sets from which to choose the elements of J, so
where the sum excludes the case when Ji= for all i. It follows from Eq. (9) that Sn×n(Ji)=Sn×n(Ji) and so Eq. (8) gives
But by Lemma E.15, we know |JiJj|=1 when ij, so
Since JiGn(pi), recall that Ji=(npi,0),(0,npi) when |Ji|2 by Lemma E.16. So |Ji|=1, pi, and pi2 when |Ji|=0, 1, and 2, respectively. Therefore,
Substituting all these into the expression for |Sn×n|, we obtain

Now, because the content of Ji is irrelevant and we care only about the cardinality |Ji|, for each size vi=|Ji| we have |Gn(pi)|vi=pi+1vi ways of choosing vi elements from Gn(pi), which produces the final formula as required.

Lemma E.18.
Let n=i=1kpiαi be the prime factorization of n, where k=ω(n), the number of distinct prime factors of n. Then, an alternative counting of |Sn×n| is
where g(v)=n2i=1kpivi and top(v)Zk has ith coordinate
Proof.
We know that the exponent of each pi in Sn×n from Lemma E.17 is at most 2. Therefore, for given v1,,vk{0,1,2}, we can combine all binomial expressions associated with |Σ|n2i=1kpivi. If vi1, then we have pi+1vi selections from Gn(pi), and ui=2pi+1pi+1ui for vi=2. These two expressions could be generalized as ui=vitop(i)pi+1ui using the “top” function defined above. Therefore, the total coefficient of |Σ|n2i=1kpivi is
as required.
Theorem E.19.
Let n=i=1kpiαi be the prime factorization of n, where k=ω(n), the number of distinct prime factors of n. Then
where g(v)=n2i=1kpivi and
Proof.
For a given vector v with v1,,vk{0,1,2}, we define
where top(i)=vi\ if\ vi<2\ and\ pi+1\ if\ vi=2.
Using Lemma E.18, we are left to show that

We prove it by induction on k. As the induction basis, we choose k=1, and so n=p, where p is a prime. Since b(v)=r(0) we need to confirm it equals 1,p+1, or p for three different cases of v defined by the function r.

If v=(0), top(v)=(0) and the only u is u=(0), which gives b(v)=p+10=1. If v=(1), top(v)=(1) and the only u is u=(1), and so b(v)=p+11=p+1. If v=(2), top(v)=(p+1) and u ranges from (2) to (p+1). Therefore,
For the induction step, we prove
where w=(v1,,vk,vk+1). Similar to the induction basis, we need to consider three cases for vk+1
If vk+1=0,
If vk+1=1,
If vk+1=2,
Corollary E.20.
Let n=p, where p is a prime. Then
Proof.

For v=(1), g(v)=n and b(v)=(n+1), and for v=(2), g(v)=1 and b(v)=n.

Lemma A.21.
Let n=i=1kpiαi be the prime factorization of n, where k=ω(n), the number of distinct prime factors of n, and for each m(1mk), let
where vZm and g(v) and r(i) are defined as before. Note that |Sn×n|=qn×nk. Then for m<k
Proof.
Let v=(v1,,vm) and w=(v1,,vm,vm+1). Then
We split the expression into five parts
and define, for any cR
i.e., qn×nm=qn×nm(1). Then,
Now, we show that
Let A=n2pm+11. Then (y1+x1+y2)(pm+1+1)1
Since x2 is non-negative, we can conclude that
Lemma E.21.
where equality holds if and only if n is a prime.
Proof.
If k=1, i.e., n is a prime, the equality holds as shown in Corollary E.20. If k>1 using Lemma A.21 and p1<n,p1n2
Lemma A.22.
Let n=i=1kpiαi be the prime factorization of n, where k=ω(n), the number of distinct prime factors of n. Then
Proof.
As in the proof of Lemma A.21, we employ the function qn×n, which can be decomposed into five parts as defined earlier
Now, we show that
Let A=n2pm+11. Then (y1x1x2y2)(pm+1+1)1
Since y1x1+x2+y2,
By substituting x0 and y1, we obtain a recursive inequality

To finalize the proof we use |Sn×n|=qn×nk.

Lemma A.23.
Let p be a prime divisor of n. Then,
Proof.
Let B=|Σ|n2p1. Then
Corollary A.24
Let p be a prime of n. Then,
Proof.
By induction,
Lemma E.22.
Let n=i=1kpiαi be the prime factorization of n, where k=ω(n), the number of distinct prime factors of n. Then,
Proof.
By Lemma A.22 and Corollary A.24,
Lemma E.29.
For any aΣ, any kN, and vZn×Zn such that |v| divides k
Proof.

Let sSn×n,ka(v). Then, the number of selections of state in s, i.e., the pattern size, is n2/|v|. To enumerate the number of such configurations, we first have to choose k/|v| out of n2/|v| sites to be in state a, and then fill the remaining n2/|v|k/|v| sites with states from Σ{a}.

Lemma E.30
Pick n,kN with kn and let d={gcd}(k,n). Let n=i=1ω(n)piαi, k=i=1ω(k)qiβi, and d=i=1ω(d)riγi be the prime factorizations of n, k, d, respectively. Then for any aΣ,
where r=(r1,,rω(d)) and h(u)=i=1ω(d)rimin(ui,2).
Proof.
Using Eq. (26), Lemma E.14, and Eq. (28),
By the inclusion-exclusion principle,
Now, by Eq. (9),
Finally let m=|i=1ω(d)Ji|, then using Lemma E.29,
where m=|i=1ω(d)Ji|=i=1ω(d)rimin(|Ji|,2).
Lemma E.31.
Pick n,kN with kn and let d={gcd}(k,n). Let n=i=1ω(n)piαi, k=i=1ω(k)qiβi, and d=i=1ω(d)riγi be the prime factorizations of n, k, d, respectively. Then for any aΣ,
where h(v)=i=1ω(d)rimin(vi,2) and top(v)Zω(d) has ith coordinate
Proof.

Similar to the proof of Lemma E.18.

Theorem E.32.
Pick n,kN with kn and let d={gcd}(k,n). Let n=i=1ω(n)piαi, k=i=1ω(k)qiβi, and d=i=1ω(d)riγi be the prime factorizations of n, k, d, respectively. Then for any aΣ,
where h(v)=i=1ω(d)rimin(vi,2) and
Proof.

Similar to the proof of Theorem E.19.

Corollary A.33.
The number of binary symmetric configurations (|Σ|=2) with k sites in state a is given by
Corollary A.34.

For any state set Σ and state aΣ, the set Sn×n,0a equals the set Sn×n for the state set Σ{a}.

Theorem E.35.
The worst-case time complexity of the shift-symmetry detection algorithm for a square configuration of size N=n2 is
Proof.
In a worst-case scenario, when a configuration is nonshift-symmetric and there is only one cell breaking symmetry, each test requires to visit potentially all n2 cells. The overall worst-case time complexity is, therefore, O(|Gn|n2). We know that the sum of distinct prime factors sopf(n)=i=1ω(n)pi also known as the integer logarithm is at most n (if n is prime), which gives us
Theorem E.36.
The average-case time complexity of the shift-symmetry detection algorithm for a square configuration of size N=n2 generated from a uniform distribution is
Proof.
Let m=n2p1 be the number of orbits for a prime p. Assuming a uniform distribution the probability of passing an orbit is Q=|Σ|1p. If successful we move to a next orbit, otherwise we terminate with the probability 1Q. The probability of terminating at ith orbit can be, therefore, generalized as

It is easy to show that these probabilities sum to 1, i.e., we must terminate at one of m orbits. Further, the probability of successfully passing the test for all the orbits—the probability that a configuration generated from a uniform distribution is shift-symmetric by a vector with an order p—equals |Σ|n2(p11).

By using the formula for a geometric sum, we can prove that
We apply this to calculate the expected number of visited orbits as
Owing to Q<1, we can bound the expected (average) number of visited orbits for a prime p as
Each p-orbit contains p cells and so the expected number of visited cells is simply
Note that while moving from one orbit to a next one, we can potentially revisit some cells; however, because the order is fixed we can visit each cell at most twice.
The number of generators |Gn(pi)| for each prime pi equals pi+1 [Eq. (12)], thus the overall expected number of visited cells, i.e., the average-case time complexity in O-notation is
Since the expression (1|Σ|1pi)1 is at most 2 (pi2) and the integer logarithm sopf(n) is at most n, the average-case time complexity of the shift-symmetry test is
Example
Let n=2α13α2, then using counting from Lemma E.17, |Sn×n|=
by Lemma E.18, |Sn×n|=
and finally by Theorem E.19, |Sn×n|=
Example
Let n=2α13α2, aΣ, and k=2β13β2, where β1α1,β2α2, and σ=|Σ|1. Then using counting from Lemma E.30 |Sn×n,ka|=
by Lemma E.31 |Sn×n,ka|=
and finally by Theorem E.32, |Sn×n,ka|=
1.
S.
Amoroso
and
G.
Cooper
,
Proc. Am. Math. Soc.
26
,
158
(
1970
).
2.
D.
Angluin
, STOC ’80 Proceedings of the 12th Annual ACM Symposium on Theory of Computing (ACM, New York, NY, 1980), pp. 82–93.
3.
H.
ApSimon
,
Philos. Trans. R. Soc. Lond. A Math. Phys. Eng. Sci.
266
,
113
(
1970
).
4.
L.
Babai
,
R.
Beals
, and
P.
Takácsi-Nagy
, Proceedings of the 24th Annual ACM Symposium on Theory of Computing (ACM, 1992), pp. 438–449.
5.
F.
Bagnoli
,
R.
Rechtman
, and
S.
El Yacoubi
,
Phys. Rev. E
86
,
066201
(
2012
).
6.
P.
Banda
, Advances in Artificial Life. Darwin Meets von Neumann, Lecture Notes in Computer Science Vol. 5778, edited by G. Kampis, I. Karsai, and E. Szathmáry (Springer, Berlin, 2011), pp. 310–317.
7.
P.
Banda
, “
Anonymous leader election in one- and two-dimensional cellular automata
,” Ph.D. thesis (
Comenius University
,
2014
).
8.
P.
Banda
,
J.
Caughman
, and
J.
Pospichal
,
J. Cell. Automata
10
,
1
(
2015
).
9.
E. R.
Berlekamp
,
J. H.
Conway
, and
R. K.
Guy
, “What is life?,” in Winning Ways for Your Mathematical Plays, Vol. 2: Games in Particular (Academic Press, London, 1982), Chap. 25.
10.
C.
Boehme
and
J. M.
Lupton
,
Nat. Nanotechnol.
8
,
612
(
2013
).
11.
L. G.
Brunnet
and
H.
Chaté
,
Phys. Rev. E
69
,
057201
(
2004
).
12.
A.
Castillo-Ramirez
and
M.
Gadouleau
, “
Cellular automata and finite groups
,”
Nat. Comput.
1
14
(
2017
).
13.
T.
Ceccherini-Silberstein
and
M.
Coornaert
,
Cellular Automata and Groups
(
Springer Science & Business Media
,
2010
).
14.
M.
Cenek
, “
Information processing in two-dimensional cellular automata
,” Ph.D. thesis (
Portland State University
,
2011
).
15.
M.
Cenek
and
M.
Mitchell
, in
Encyclopedia of Complexity and Systems Science
, edited by
Robert A.
Meyers
(
Springer, New York
,
2009
), pp.
3233
3242
.
16.
D. R.
Chowdhury
,
I. S.
Gupta
, and
P. P.
Chaudhuri
,
IEEE Trans. Comput.
44
,
1260
(
1995
).
17.
E. F.
Codd
,
Cellular Automata
(
Academic Press
,
1968
).
18.
L.
Conradt
and
C.
List
,
Philos. Trans. R. Soc. B Biol. Sci.
364
,
719
(
2008
).
19.
J. P.
Crutchfield
and
J. E.
Hanson
,
Physica D
69
,
279
(
1993
).
20.
J. P.
Crutchfield
,
M.
Mitchell
, and
R.
Das
, Evolutionary Dynamics: Exploring the Interplay of Selection, Accident, Neutrality, and Function (Oxford, 2003), pp. 361–411.
21.
I. I.
Culik
and
S.
Yu
,
Physica D Nonlinear Phenom.
45
,
357
(
1990
).
22.
G. B.
Ermentrout
and
L.
Edelstein-Keshet
,
J. Theor. Biol.
160
,
97
(
1993
).
23.
S.
Ethier
,
J. Integer Sequences
16
,
3
(
2013
).
24.
E.
Fredkin
and
T.
Toffoli
,
Int. J. Theor. Phys.
21
,
219
(
1982
).
25.
S.
Gao
,
S.
Jackson
, and
B.
Seward
,
Group Colorings and Bernoulli Subflows
(
American Mathematical Society
,
2016
), Vol. 241.
26.
H.
Gu
,
J.
Chao
,
S.-J.
Xiao
, and
N. C.
Seeman
,
Nat. Nanotechnol.
4
,
245
(
2009
).
27.
M.
Hagiya
,
S.
Wang
,
I.
Kawamata
,
S.
Murata
,
T.
Isokawa
,
F.
Peper
, and
K.
Imai
, International Conference on Unconventional Computation and Natural Computation (Springer, 2014), pp. 177–189.
28.
J. E.
Hanson
and
J. P.
Crutchfield
,
J. Stat. Phys.
66
,
1415
(
1992
).
29.
W.
Hordijk
, “
Dynamics, emergent computation, and evolution in cellular automata
,” Ph.D. thesis (
University of New Mexico
, Albuquerque, NM,
2000
).
30.
K.
Ioannidis
,
G. C.
Sirakoulis
, and
I.
Andreadis
, Cellular Automata in Image Processing and Geometry (Springer, 2014), pp. 25–45.
31.
K.
Ishimura
,
K.
Komuro
,
A.
Schmid
,
T.
Asai
, and
M.
Motomura
, “
FPGA implementation of hardware-oriented reaction-diffusion cellular automata models
,”
Nonlinear Theory Appl., IEICE
6
(
2
),
252
262
(
2015
).
32.
V.
Kalogeiton
,
D.
Papadopoulos
,
I.
Georgilas
,
G.
Sirakoulis
, and
A.
Adamatzky
,
Int. J. Gen. Syst.
44
,
354
(
2015
).
33.
G.
Kalogeropoulos
,
G. C.
Sirakoulis
, and
I.
Karafyllidis
,
J. Supercomput.
65
,
664
(
2013
).
34.
J.
Kari
,
Physica D Nonlinear Phenom.
45
,
379
(
1990
).
35.
I.
Kawamata
,
S.
Yoshizawa
,
F.
Takabatake
,
K.
Sugawara
, and
S.
Murata
, International Conference on Unconventional Computation and Natural Computation (Springer, 2016), pp. 168–181.
36.
C. G.
Langton
,
Physica D Nonlinear Phenom.
42
,
12
(
1990
).
37.
P. A.
Lawrence
,
The Making of a Fly: The Genetics of Animal Design
(
Wiley-Blackwell
,
1992
).
38.
D.
Lusseau
and
L.
Conradt
,
Behav. Ecol. Sociobiol.
63
(
7
),
1067
1077
(
2009
).
39.
M.
Marques-Pita
,
M.
Mitchell
, and
L. M.
Rocha
,
The Role of Conceptual Structure in Designing Cellular Automata to Perform Collective Computation
(
Springer
,
2008
).
40.
M.
Marques-Pita
and
L. M.
Rocha
, 2011 IEEE Symposium on Artificial Life (ALIFE) (IEEE, 2011), pp. 233–240.
41.
O.
Martin
,
A. M.
Odlyzko
, and
S.
Wolfram
,
Commun. Math. Phys.
93
,
219
(
1984
).
42.
J. C.
Miller
,
Philos. Trans. R. Soc. Lond. A Math. Phys. Eng. Sci.
266
,
63
(
1970
).
43.
M.
Mitchell
,
J. P.
Crutchfield
, and
R.
Das
, HandBook of Evolutionary Computation, edited by T. Baeck, D. Fogel, and Z. Michalewicz (Oxford University Press, 1997).
44.
R.
Nagpal
, Engineering Self-Organising Systems, Lecture Notes in Computer Science Vol. 2977 (Springer, 2003), pp. 53–62.
45.
J. V.
Neumann
and
A. W.
Burks
,
Theory of Self-Reproducing Automata
(
Illinois Press
,
1966
).
46.
N. H.
Packard
and
S.
Wolfram
,
J. Stat. Phys.
38
,
901
(
1985
).
47.
N.
Pippenger
,
J. Comput. Syst. Sci.
49
,
83
(
1994
).
48.
R.
Reynaga
and
E.
Amthauer
,
Pattern Recognit. Lett.
24
,
2849
(
2003
).
49.
P. L.
Rosin
,
IEEE Trans. Image Process.
15
,
2076
(
2006
).
50.
A.
Rupe
and
J. P.
Crutchfield
,
Chaos
28
,
075312
(
2018
).
51.
A.
Rupe
and
J. P.
Crutchfield
, “Spacetime symmetries, invariant sets, and additive subdynamics of cellular automata”, CoRR, preprint arXiv:1812.11597 (
2018
).
52.
J. A.
de Sales
,
M. L.
Martins
, and
D. A.
Stariolo
,
Phys. Rev. E
55
,
3262
(
1997
).
53.
R. M. Z.
dos Santos
and
S.
Coutinho
,
Phys. Rev. Lett.
87
,
168102
(
2001
).
54.
B.
Shackleford
,
M.
Tanaka
,
R. J.
Carter
, and
G.
Snider
, Proceedings of the 2002 ACM/SIGDA 10th International Symposium on Field-Programmable Gate Arrays (ACM, 2002), pp. 106–112.
55.
S.
Slatnia
,
M.
Batouche
, and
K. E.
Melkemi
, “Evolutionary cellular automata based-approach for edge detection,” in Applications of Fuzzy Sets Theory: 7th International Workshop on Fuzzy Logic and Applications, WILF 2007, Camogli, Italy, July 7–10, 2007 (Springer, Berlin, 2007), pp. 404–411.
56.
A.
Smith
,
Assoc. Comput. Mach. J.
18
,
339
(
1971
).
57.
M.
Tomassini
,
M.
Sipper
, and
M.
Perrenoud
,
IEEE Trans. Comput.
49
,
1146
(
2000
).
58.
G. Y.
Vichniac
,
Physica D Nonlinear Phenom.
10
,
96
(
1984
).
59.
D.
Vodenicarevic
,
N.
Locatelli
,
J.
Grollier
, and
D.
Querlioz
, 2016 International Joint Conference on Neural Networks (IJCNN) (IEEE, 2016), pp. 2015–2022.
60.
X.
Wang
and
D.
Luan
,
Commun. Nonlinear Sci. Num. Simul.
18
,
3075
(
2013
).
61.
B.
Wei
,
M.
Dai
, and
P.
Yin
,
Nature
485
,
623
(
2012
).
62.
S.
Wolfram
,
Rev. Mod. Phys.
55
,
601
(
1983
).
63.
S.
Wolfram
,
Physica D Nonlinear Phenom.
10
,
1
(
1984
).
64.
S.
Wolfram
,
Theory and Application of Cellular Automata
(
World Scientific
,
Singapore
,
1986
).
65.
D.
Wolz
and
P.
De Oliveira
, “
Very effective evolutionary techniques for searching cellular automata rule spaces
,”
J. Cell. Automata
3
(
4
),
289
312
(
2008
).
67.
V.
Zhirnov
,
R.
Cavin
,
G.
Leeming
, and
K.
Galatsis
,
IEEE Comput.
41
,
38
(
2008
).