Complex Dynamics Emerging in Rule 30 with Majority Memory

In cellular automata (CAs) with memory, the unchanged maps of conventional CAs are applied to cells endowed with memory of their past states in some specified interval. We implement the rule 30 automaton and show that by using the majority memory function we can transform the quasi-chaotic dynamics of classical rule 30 into domains of traveling structures with predictable behavior. We analyze morphological complexity of the automata and classify glider dynamics (particle, self-localizations) in the memory-enriched rule 30. Formal ways of encoding and classifying glider dynamics using de Bruijn diagrams, soliton reactions, and quasi-chemical representations are provided.


Introduction
An elementary cellular automaton (CA) is a one-dimensional array of finite automata, where each automaton takes two states and updates its state in discrete time depending on its own state and the states of its two closest neighbors.All cells update their state synchronously.The following general classification of elementary CAs was introduced in [1].
Class IV is of particular interest because the rules exhibit nontrivial behavior with rich and diverse patterns, as shown for rule 54 in [2,3].

One-Dimensional Cellular Automata
One-dimensional CAs are represented by an infinite array of cells x i where i oe  and each x takes a value from a finite alphabet S. Thus, a sequence of cells 8x i < of finite length n represents a string or global configuration c on S with the set of finite configurations represented as S n .An evolution is represented by a sequence of configurations 9c i = given by the mapping F : S n Ø S n ; thus their global relation is provided as where t is time and every global state of c is defined by a sequence of cell states.Also, the cell states in configuration c t are updated at the next configuration c t+1 simultaneously by a local function j: Wolfram represents a one-dimensional CA with two parameters Hk, rL where k  †S § is the number of states, and r is the neighborhood radius.Elementary CAs are defined by parameters Hk  2, r  1L.There are S n different neighborhoods (where n  2 r + 1) and k k n different evolution rules.
We used automata with periodic boundary conditions in our computer experiments.

Cellular Automata with Memory
Conventional CAs are ahistoric (memoryless): that is, the new state of a cell depends on the neighborhood configuration solely at the preceding time step of j as in equation (2).
Cellular automata with memory consider an extension to the standard CA framework by implementing memory capabilities in cells x i from its own history.
Thus, to implement memory we incorporate a memory function f, such that t < t determines the degree of memory backward and each cell s i oe S is a state function of the series of states of the cell x i with memory up to the current time step.Finally, to execute the evolution we apply the original rule as: jI… , s i-1 t , s i t , s i+1 t , …M Ø x i t+1 .
Thus, in CAs with memory, while the mappings j remain unaltered, historic memory of all past iterations is retained by featuring each cell with a summary of its past states from f.Therefore, cells canalize memory to the map j.
Thus, in CAs with memory, while the mappings j remain unaltered, historic memory of all past iterations is retained by featuring each cell with a summary of its past states from f.Therefore, cells canalize memory to the map j.
As an example, we define the majority memory as (4) where, in case of a tie given by S 1  S 0 from f, we will take the last value x i .So the f maj function represents the classic majority function [4] on the cells Ix i t-t , … , x i t-1 , x i t M and defines a temporal ring before finally getting the next global configuration c.Majority memory exerts a general inertial effect [5].This effect, when starting from a single site live cell, notably restrains the dynamics, as illustrated using rule 30 in Figure 1.This figure shows the spatio-temporal patterns of both the current x state values and that of the underlying s values.

Elementary Cellular Automaton Rule 30
Rule 30 was initially studied by Wolfram in [1] because of its chaotic global behavior while looking for a random number generator.Rule°30 is an elementary CA that evolves in one dimension of order H2, 1L.An interesting property is that it has a surjective relation and thus does not have Garden of Eden configurations [6].In this way, any configuration always has at least one predecessor.
Here is the local rule j corresponding to rule 30: Generally speaking, rule 30 displays a typical chaotic global behavior, that is, it is in Wolfram's Class III.An interesting study on rule 30 showing a local nested structure that repeats periodically while looking for invertible properties is given in [7].
Generally speaking, rule 30 displays a typical chaotic global behavior, that is, it is in Wolfram's Class III.An interesting study on rule 30 showing a local nested structure that repeats periodically while looking for invertible properties is given in [7].
So, initially j R30 has a 50% probability of states zero or one, and consequently each state appears with the same frequency.Also, the evolution of rule 30 presents the following feature: if an initial configuration is covered all in state one, then it always evolves into one; but if this is empty or filled with state one then this always evolves to state zero.Figure 2 shows two typical cases of evolution with rule 30.

De Bruijn and Subset Diagrams in Rule 30
Given a finite sequence w oe S m , such that w  w 1 , … , w m , let a HwL  w 1 , b HwL  w 2 , … , w m , and yHwL  w 1 , … , w m-1 .With these elements, we can specify a labeled directed graph known as a de Bruijn diagram   8N; E< associated with the evolution rule of the CA.The nodes of  are defined by N  S 2 r and the set of directed edges E OE S 2 r äS 2 r is defined as For every directed edge Hv, wL oe E, let h Hv, wL  a w oe S 2 r+1 where a  a HvL; that is, h Hv, wL is a neighborhood of the automaton.In this way, the edge Hv, wL is labeled by j È h Hv, wL; hence, every labeled path in  represents the evolution of the corresponding sequence specified by its nodes.Since each w oe N can be described by a number base k of length 2 r, every node in  can be enumerated by a unique element in  k 2 r , which is useful for simplifying the diagram.
The de Bruijn diagram associated with rule 30 is depicted in Figure 3, where black edges indicate the neighborhoods evolving into zero and those evolving into one are shown by gray edges.The de Bruijn and subset diagrams were calculated using NXLCAU21 designed by McIntosh.The program is available from delta.cs.cinvestav.mx/~mcintosh.In this way, the edge Hv, wL is labeled by j È h Hv, wL; hence, every labeled path in  represents the evolution of the corresponding sequence specified by its nodes.Since each w oe N can be described by a number base k of length 2 r, every node in  can be enumerated by a unique element in  k 2 r , which is useful for simplifying the diagram.
The de Bruijn diagram associated with rule 30 is depicted in Figure 3, where black edges indicate the neighborhoods evolving into zero and those evolving into one are shown by gray edges.The de Bruijn and subset diagrams were calculated using NXLCAU21 designed by McIntosh.The program is available from delta.cs.cinvestav.mx/~mcintosh.Figure 3 shows that there are four neighborhoods evolving into zero and four into one, meaning that each state has the same probability to appear during the evolution.This indicates the possibility that the automaton is surjective, that is, there are no Garden of Eden configurations.Classical analysis in graph theory has been applied over de Bruijn diagrams for studying topics such as reversibility [8]; cycles in the diagram indicate periodic elements in the evolution of the automaton if the label of the cycle corresponds to the sequence defined by its nodes, in periodic boundary conditions.The cycles in the de Bruijn diagram from Figure 3 are presented in Figure 4.The largest cycle in Figure 4 indicates that the undefined repetition of sequence w b  10 establishes a periodic structure without displacement in one generation during the evolution of rule 30.We then say that w b is the filter in rule 30.A filter is a periodic sequence that exists alone or in blocks during the evolution; thus, suppressing such a string produces a new view.In the present paper, we apply the filter to the original rule 30 and its modifications with memory.Thus, we can see how a de Bruijn diagram can recognize any periodic structures in a CA [3,9].ment in one generation during the evolution of rule 30.We then say that w b is the filter in rule 30.A filter is a periodic sequence that exists alone or in blocks during the evolution; thus, suppressing such a string produces a new view.In the present paper, we apply the filter to the original rule 30 and its modifications with memory.Thus, we can see how a de Bruijn diagram can recognize any periodic structures in a CA [3,9].
A de Bruijn diagram is nondeterministic in the sense that a given node may have several output edges with the same label.A classical approach to analyzing the diagram would be to construct the subset (or power) diagram in order to obtain a deterministic version for the de Bruijn diagram in the evolution rule [10,11].
The subset diagram is defined as   8, < where   8P P OE S ‹ «< is the set of nodes of  and the directed edges are defined by  Õ ä where for P 1 , P 2 oe  there is a directed edge HP 1 , P 2 L labeled by a oe S in  if and only if P 2 is the maximum subset such that for every c oe P 2 there exists b oe P 1 such that j Hb, cL  a.
The inclusion of the empty set assures that every edge has a welldefined ending node.For a CA with k states, it is fulfilled that † §  2 k 2 r , which implies an exponential growth in the number of nodes in  when more states are considered.Every P oe  can be identified by a binary number showing the states belonging to this subset, that is, taking the states as an ordered list.The states in P can be signed by a 1 and the others by 0, making a unique binary sequence to identify the subset.The decimal value of this binary number can be taken to get a shorter representation where the empty set has a decimal number 0 and the full subset p  S has the number 2 k 2 r -1.The subset diagram corresponding to rule 30 is shown in Figure 5.In Figure 5, the subset diagram has no path starting from the full subset (node 15) going to the empty subset (node 0).This means that every sequence can be produced by the evolution of the automaton and there are no Garden of Eden sequences.Thus, the automaton is surjective.The subset diagram can also be used as a deterministic automaton for calculating ancestors of any desired sequence [12] by recognizing the regular expressions that may be generated by the corresponding automaton.Some of these expressions would be able to represent interesting structures as gliders [13]; however, more effort is needed in order to get a straightforward detection of such In Figure 5, the subset diagram has no path starting from the full subset (node 15) going to the empty subset (node 0).This means that every sequence can be produced by the evolution of the automaton and there are no Garden of Eden sequences.Thus, the automaton is surjective.The subset diagram can also be used as a deterministic automaton for calculating ancestors of any desired sequence [12] by recognizing the regular expressions that may be generated by the corresponding automaton.Some of these expressions would be able to represent interesting structures as gliders [13]; however, more effort is needed in order to get a straightforward detection of such constructions in the diagram.
Finally, such diagrams help get periodic strings that eventually represent a general filter w b working on the original rule 30 and rule 30 with memory.Also, we will take advantage of these results to find gliders in the strings.

Majority Memory Helps to Discover Complex Dynamics in Rule 30
This section reports on how the majority memory f helps in the discovery of complex dynamics in elementary CAs by experimentation.For an introduction to elementary CAs with memory, see [14|16].
Figure 6 displays different scenarios where the majority memory f maj works on rule 30 to extract the complex dynamics.The evolutions should be read from left to right and up to down.All of these evolutions use the same random initial density and filter w b (including the original rule 30).Thus, the first evolution shown in Figure 6 is the original rule 30, that is, without majority memory.In the original evolution we can see gaps that the filter can clean.Traditionally, it was difficult to distinguish such a filter, but when f maj was applied to rule 30 its presence was more evident.A general technique for getting filters was developed by Wuensche in [17].
Initially, even values of t seem to extract gliders more quickly and odd values fight to reach an order.Eventually, the majority memory will converge to one stability in F while t increases.
The first snapshot calculating f maj with t  3 is shown by the second evolution in Figure 6.It is not yet clear how memory induces another behavior because the global behavior is still similar to the original with only small changes.
On the other hand, the third evolution with t  4 does extract periodic patterns.The evolution might not display impressive gliders but it already allows picking out more diversity in mobile localizations on lattices of 100ä100 cells.Thus, we have enumerated and ordered values of t from Figure 6 based on the space-time dynamics they are responsible for:

Morphological Complexity in Rule 30 with Memory
In this section we explore some techniques for finding global complex dynamics in rule 30 with and without majority memory.
We evaluate the morphological complexity of a CA using the morphological richness approach in [18].We calculate the statistical morphological richness m as follows.Given the space-time configuration of a one-dimensional CA, we extract the 3ä3 cell neighborhood state for each site of the configuration and build a distribution of the neighborhood states over an extended period of the automaton's development time.
Examples of morphological richness m are shown in Figure 7.A control case, where the next state of a cell is calculated at random from the distribution of space-time neighborhood states, is uniform (Figure 7 Incorporating memory in the cell-state transition rules leads to an erosion of the distribution (Figure 7(c)) and thus slight increases in m.With an increase in the memory depth, the shape of the morphological distribution changes just slightly, up to minor height variations in the major peaks (Figures 7(d) through (f)).The number r of 3ä3 blocks (of states 0 and 1) that never appear in the space-time configuration of a CA can be used to express an estimate of the nominal morphological richness; smaller r indicate a richer nominal configuration.
The difference between statistical m and nominal r measures of morphological richness is that m allows picking most common configurations of local domains, while r just shows how many blocks of 3ä3 states appeared in the automaton evolution at least once.
For the case of randomly updating cell states, all blocks are present in the space-time configuration and r  0. For the case of randomly updating cell states, all blocks are present in the space-time configuration and r  0.
Memoryless automata governed by rule 30 have r  434 so the total number of possible blocks is 512.When memory is first incorporated into the cell-state transition function, richness decreases, for example, with t  1 we have r  448.Then we observe a consistent increase in complexity.Thus, rule 30 with small-depth memory (t  2) r  140, drastically decreases to r  68 for t  3. The richness is stabilized, or rather oscillates around r values of 20 to 40 with a further increase of memory.
In summary, we found that majority memory increases the nominal complexity of a CA but decreases its statistical complexity.

Gliders in Rule 30 with Memory t  8
Most frequently the complex dynamics of an elementary CA is related to gliders, glider guns, and nontrivial reactions between localizations, for example, rules 110 or 54 [2,19].The phenomena, and their regular expressions [3,9], may lead to the discovery of novel systems with computational universality [20,21].Gliders emerging in rule 30 with f maj and t  8.This evolution shows how some kinds of gliders arise and still interact from random initial conditions.The evolution was calculated on a ring of 590 cells to 320 generations, with an initial density of 50%.
Among the sets of complex dynamics in rule 30 determined by t (shown in Figure 6), we have chosen the memory f maj with t  8.In this way, Figure 8 illustrates an ample evolution space of its global dynamics.
Of course, these gliders may not be as impressive as others from such well-known complex rules as 110, 54, or some other one-dimensional rules [1,2,19,22,23].However, it is interesting that f maj is able to open complex patterns from chaotic rules.
Nevertheless, even though rule 30 does not offer an ample range of complex dynamics, it is useful for describing gliders and collisions.So, we shall illustrate how a chaotic CA can be decomposed as a complex system.We now classify the family of gliders and enumerate some of their properties.
Figure 9 displays the family of gliders G R30m  9g 1 , g 2 , g 3 =.As was hoped, an immediate consequence is that gliders in CAs with memory have longer periods.

Structure v g
Lineal Volume Table 1 summarizes the basic properties of each glider.Practically, all gliders in this domain have a constant displacement of four cells to the right and no glider with speed zero was found, and yet finding a glider gun in this domain is more complicated.Nevertheless, some interesting reactions did originate from G R30m .
Structure w b does not have a displacement and it is also not a glider.This pattern is the periodic background in rule 30 and represents the filter.It was really hard to detect the existence of a periodic background evolving from the original rule.But when f maj was applied, a periodic pattern began to emerge that was inherited from j R30 .Finally, this filter was confirmed with its respective de Bruijn and cycle diagrams (see Section 3.1).

Reactions between Gliders from G R30m
We now demonstrate some simple examples of collisions between gliders.Codes for all gliders, necessary to generate the whole set of binary collisions, are presented in the Appendix.
Figure 10 shows how a stream of g 1 gliders is deleted from a reaction cycle: To obtain such a cycle by glider reactions, we can code an unlimited initial condition as ... g 3 ... g 1 .... g 1 .... g 1 .... , that can be reduced as ... g 3 ... g 1 H .... g 1 L * (where a dot represents a copy of w b ).Finally, the evolution produces the given cycle, with nine periods of g 3 and eight periods of g 2 .Thus, each column presents 1135, 2270, and 3405 generations, respectively.In such a representation, codes of gliders will be different from codes used in our previous papers [3,9,19].The glider reactions were produced using the OSXLCAU21 system available at uncomp.uwe.ac.uk/ genaro/OSXCASystems.html.
Since the better way to preserve j R30 and f maj is to code the gliders as "natural", we consider the codification from its original initial condition.See Appendix B where some strings are defined to get gliders with memory from their original functions.

HaL
HbL HcL Some simple but interesting reactions from G R30m are illustrated in Figure 11.The first reaction shows the annihilation of gliders g 2 and g 1 .The second reaction shows how a transformation g 3 glider transforms a g 1 glider into a g 2 .The third reaction shows a soliton-like collision between gliders g 2 and g 1 .The soliton reaction between gliders is particularly promising because it can be used to implement computation, for example, as in the carry-ripple adder embedded by phase coding solitons in parity CAs [24,25].

Quasi-Chemistry of Gliders
Assuming gliders g 1 , g 2 , and g 3 are chemical species a, b, and c in a well-stirred chemical reactor, we can derive the following set of quasichemical reactions from the interactions between them: where reaction rates are evaluated from the frequencies of the interactions.
We evaluated global dynamics of the quasi-chemical system (6) with constant volume (reflecting the finite size of an automaton lattice), constant temperature, and variable pressure using Chemical Kinetics Simulator (available at www.almaden.ibm.com/st/computa-tion_science/ck/?cks).Figure 12 shows the temporal dynamics of species concentrations in the system with 10 7 molecules.
When all three species are present in equal concentrations at the beginning (Figure 12

Glider Machines
Table 2 shows the interactions found between gliders, depending on distance s between the interacting gliders.Taking into account the gliders' velocities from Table 1, we can construct the following finite state indeterministic machine with an internal state h and input state p, h, p oe 8a, b, c, «<.The machine can be characterized by an input-output transition matrix M  Im i j M i,joe9a,b,c,«= , where for j  h t , i  p t , m i j  h t+1 .The matrix has the following form: Starting at a randomly chosen initial state and subjected to random uniformly distributed input strings, the machine will end in the state c with probability 1 4 and in the state set with probability Starting at a randomly chosen initial state and subjected to random uniformly distributed input strings, the machine will end in the state c with probability 1 4 and in the state set with probability

Discussion
We enriched elementary CA rule 30 with majority memory and demonstrated that by applying certain filtering procedures we can extract rich dynamics of traveling localizations, or gliders.We inferred a sophisticated system of quasi-chemical reactions between the gliders.It was shown that the majority memory increases nominal complexity but decreases statistical complexity of patterns generated by the CA.By applying methods of de Brujin diagrams and graph theory, we proved the surjectivity of rule 30 CA with memory and provided blue prints for future detailed analysis of glider dynamics.
Recalling previous results on the classification of one-dimensional CA [17,23,26], we envisage that introducing majority memory f maj into elementary CA will open a new field of research in the selection of nontrivial rules of cell-state transitions and precise mechanics of relationships between chaotic and complex systems.This is because rule 30 was grouped into a cluster of rules with similar behavior, that can be transformed one to another using combinations of reflection, negation, and complement (as done by Wuensche in [26]).Figure 13 shows a diagram that explains how the original cluster for rule 30 is presented in [26].Obviously, the cluster can be arbitrarily enriched using not only f maj but any type of memory and t.Thus, the dynamical complexity of automata with f maj is the same as for the set of functions 9j R30 , j R86 , j R135 , j R149 =, particularly because the local functions j R86 and j R149 are responsible for the leftward motion of gliders.
Therefore, memory in elementary and other CA families offers a new approach for discovering complex dynamics based on gliders and nontrivial interactions between gliders.This can be substantiated by a number of different techniques, for example, number-conservation [27,28], exhaustive search [29], tiling [9,30], de Bruijn diagrams [3], Z-parameter [17], genetic algorithms [31], mean field theory [32], or from a differential equations viewpoint [33].

Figure 1 .
Figure 1.The effect of majority memory with increasing depths on rule 30 starting from a single site live cell.

Figure 2 .
Figure 2. (a) Typical behavior of rule 30, where a single cell in state one leads to a chaotic state.(b) Shows the automaton behavior from a random initial condition with an initial density of 50% for each state.Both automata evolved on a ring of 497 cells (with a periodic boundary property) to 417 generations.White cells represent state zero and dark cells the state one.

Figure 3 .
Figure 3. De Bruijn diagram for the elementary CA rule 30.

Figure 4 .
Figure 4. Cycles in the de Bruijn diagram and the corresponding periodic evolution for cycle H1, 2L.

Figure 6 .
Figure 6.Complex dynamics emerging in rule 30 with majority memory f maj from a range of values from t  3 to t  21.The first evolution shows the original function.Evolutions were calculated on a ring of 104 cells in 104 generations with a random initial density of 50% and the same initial conditions were used in all cases.Also, the filter w b was applied to clearly show the structures.
(a)).Two-dimensional random configurations are morphologically rich.The morphology of memoryless, classical rule 30 is characterized by few peaks in the local domain distributions, where several space-time templates dominate in the global space-time configuration (Figure 7(b)).The statistical morphological richness m Examples of morphological richness m are shown in Figure 7.A control case, where the next state of a cell is calculated at random from the distribution of space-time neighborhood states, is uniform (Figure 7(a)).Two-dimensional random configurations are morphologically rich.The morphology of memoryless, classical rule 30 is characterized by few peaks in the local domain distributions, where several space-time templates dominate in the global space-time configuration (Figure 7(b)).The statistical morphological richness m decreases.

Figure 8 .
Figure 8.Gliders emerging in rule 30 with f maj and t  8.This evolution shows how some kinds of gliders arise and still interact from random initial conditions.The evolution was calculated on a ring of 590 cells to 320 generations, with an initial density of 50%.

Figure 9 .
Figure 9. Set of gliders G R30m with memory f maj and t  8.

Figure 10 .
Figure 10.Deleting streams of g 1 gliders initialized with a single g 3 glider.

Figure 11 .
Figure 11.Some simple reactions display how to (a) delete, (b) read, and (c) preserve information with gliders using rule 30 with memory.
(a)), we observe an exponential decay of species b and c and a stabilization of the concentration of species a.When only species b and c are initially present in a well-stirred reaction, species c is produced by their reactions.This leads to an outburst in species a concentration (Figure12(b)) on the background of an exponential decline of species c and b, until species b and c disappear and the concentration of species a becomes constant.
beginning (Figure12(a)), we observe an exponential decay of species b and c and a stabilization of the concentration of species a.When only species b and c are initially present in a well-stirred reaction, species c is produced by their reactions.This leads to an outburst in species a concentration (Figure12(b)) on the background of an exponential decline of species c and b, until species b and c disappear and the concentration of species a becomes constant.

Figure 12 .
Figure 12.Dynamics of concentrations of species a (circle), b (diamond), and c (square) governed by the reactions in equation (6).(a) Initial concentrations of all species are 0.001 mole/l.(b) Initial concentrations of species b and c are 0.001 mole/l, species a is nil.

3 4 .
The machine starting in the initial h generates the string l HhL as follows: .Martínez et.al Complex Systems, 18 © 2009 Complex Systems Publications, Inc.

3 4 .
The machine starting in the initial h generates the string l HhL as follows:l H«L  « * , l HaL  Ha b * a * L * « * , l HbL  Hb * a * L * « * , l HcL  c * .

Figure 13 .
Figure 13.A new family of elementary CA that can be composed.
Complex Dynamics Emerging in Rule 30 with Majority Memory 353Complex Systems, 18 © 2009 Complex Systems Publications, Inc.

Table 1 .
Properties of gliders G R30m with memory f maj and t  8.