An exploration of reversible septenary number-conserving cellular automata: a survey of known methods

Little is known about the dynamics of k-ary (binary, ternary, quaternary, quinary, etc.) reversible number-conserving cellular automata. Here, we present some preliminary results in the case of seven states. In particular, we examine one of the most complex seven-state reversible and number-conserving rules and provide a full description of its dynamics.


Introduction
A popular class of multi-state cellular automata (CAs) is the class of so-called k-ary CAs having {0, 1, 2, . . ., k − 1} as state set, for some natural number k greater than 1.Since each state is a nonnegative integer, it can, for instance, be interpreted as the number of particles occupying a given cell and, for this reason, these CAs are readily used for modeling various physical phenomena.Unfortunately, we cannot equip the state set {0, 1, 2, . . ., k − 1} with a nice mathematical structure as, for example, in the case of the ring Z k , to resort to methods that have been developed so far.
When physical phenomena governed by some conservation law (e.g., of mass or energy) are simulated, usually a special subclass of CAs is used: number-conserving CAs (NCCAs), i.e., CAs that preserve the sum of the states of all the cells upon every update (see, e.g., Durand et al. 2003).The second very desirable property of CAs used for modeling physical phenomena is reversibility, which ensures preservation of information.As a result, from the modeling point of view, k-ary CAs that are both number conserving and reversible are the most interesting ones.
The dynamics of reversible k-ary NCCAs has been very little studied, even in the one-dimensional case.However, when the smallest possible radius of the neighborhood is considered, i.e., radius 1/2, it is known that all reversible k-ary NCCAs can be seen as shift-identity product cellular automata (García-Ramos 2012).Of course, such CAs have a very simple dynamics and therefore their computing abilities are seriously limited.On the other hand, it has been shown that when the radius is increased to 3/2, then it is possible to find a reversible k-ary NCCA that is computationally universal (Morita 2017).
The study of the dynamics of reversible k-ary NCCAs with radius 1 has gained momentum in recent years, in particular thanks to the establishment of complete lists of such CAs for k ∈ {5, 6, 7} (previously, complete lists were known only for k ≤ 4).These investigations revealed, inter alia, that for k = 7 all reversible k-ary NCCAs (septenary NCCAs), except for shifts, have a finite order.More precisely, each of them repeats each configuration in a 60-cycle (Wolnik et al. 2022).Hence, their dynamics is definitely simpler than that of reversible k-ary NCCAs for k = 6 (senary NCCAs), as most of the latter (306 out of 471) do not have a finite order.For example, this means that there is a particle interpretation of a reversible septenary NCCA, where each particle moves in a restricted space, while for reversible senary NCCAs the particles can move arbitrarily far (see Figs. 1a, b for a visual comparison of the dynamics of reversible senary and septenary NCCAs).It is worth pointing out here that Kari and Ollinger (2008) showed that, in general, the problem of determining if a given reversible one-dimensional cellular automata has a finite order (is periodic) is undecidable.
It is not known why the reversible septenary NCCAs with radius 1 are so simple, but intuition says that it has to do with the fact that 7 is a prime number.Indeed, if k is a composite number, then there exist methods (see, e.g., Wolnik et al. 2022) that allow to construct reversible k-ary NCCAs with radius 1 having infinite order (other than shifts).Hence, such a simple dynamics can happen only for prime k.Moreover, we observe such a simple dynamic for k ∈ {2, 3, 5} (see, for example, Wolnik et al. 2022 or Sect.2.2).But does it happen for every prime k?In an attempt to answer this question, we initiated the study of reversible septenary NCCAs and present our first observations.

Basic definitions
We decided to only sketch the notations needed, as we hope that the readers are familiar with cellular automata.In the paper we consider only CAs with radius 1, even if we do not emphasize it in some places.
A configuration on C N is any mapping from the grid C N to [0..k).The set of all possible configurations on the grid C N is denoted by X N and is identified with [0..k) N .The set of all configurations is denoted by X * , i.e., Analogously, an infinite configuration is any mapping from the grid C ∞ to [0..k).The set of all possible infinite configurations is denoted by X ∞ and is identified with For a given configuration x (infinite or not), the value of cell n is denoted by x n and #(x) denotes the sum of the states in x, i.e., #(x) = n∈C x n , where C stands for C ∞ or C N .Additionally, in the case of x ∈ X ∞ , we define the partial sum of x between the index −n and the index n as # n (x) = n i=−n x i .Furthermore, by X fin we denote the subset of X ∞ consisting of all infinite configurations with finite sum of states, or equivalently while by X per we denote the subset of X ∞ consisting of all periodic configurations, i.e., A given local rule f induces the following three global functions: -the global rule F : X * → X * , which we identify with the cellular automaton and which is defined in the usual way where, in view of periodic boundary conditions, all operations on the indices are performed modulo N ; -the infinite global rule Additionally, one can consider the restriction of F ∞ to the set X per , which we will denote by F. Of course F : X per → X per .The differences between the definitions of F, F ∞ and F bl are shown in Fig. 2. The de Bruijn representation allows to see configurations (infinite or not) as paths in this graph.Moreover, it enables a very simple way to read the value of the functions F, F ∞ and F bl .Indeed, for any configuration x ∈ ∞ N =3 X N , the value F bl (x) is given by a word consisting of labels of edges along the corresponding path x 0 x 1 x 2 , x 1 x 2 x 3 , . . ., x N −1 x N x N +1 .For any configuration x ∈ X N the value F(x) is given by a word consisting of labels of edges along the corresponding cycle Similarly, values of F ∞ are given by labels of edges along bi-infinite paths.
In our investigation, we focus on k-ary CAs that have two important (from the point of view of applications) properties.The first one is number conservation, which means that the sum of all states in any configuration remains constant throughout the evolution of the automaton.
If a local rule f satisfies f (0, 0, 0) = 0, then it is called legal (or we say that 0 is a quiescent state).Obviously, if a global rule F is number conserving, then the corresponding local rule has to be legal, i.e., the following necessary condition holds (see, e.g., Boccara and Fukś 1998).Remark 2.2 Let f : [0..k) 3 → [0..k) be a local rule and F : X * → X * be the corresponding global rule.If F : X * → X * is number conserving, then f (0, 0, 0) = 0.
In the case of the infinite grid C ∞ , the definition of the property of being number conserving is a little bit complicated.
Definition 2.3 An infinite global rule F ∞ is number conserving if the following conditions hold: (1) f (0, 0, 0) = 0, (2) for each non-zero infinite configuration x ∈ X ∞ , Fortunately, according to Proposition 1 in Dennunzio et al. (2013) An equivalent formulation of the above condition is also The second property of k-ary CAs we are interested in is reversibility.Since X * is a disjunctive sum of finite sets X N , 123 bijectivity of F is equivalent to injectivity.We thus use this property as a definition.Definition 2.6 A global rule F : X * → X * is reversible if F is an injection, i.e., for any x 1 , x 2 ∈ X * such that x 1 = x 2 , it holds that F(x 1 ) = F(x 2 ).
Of course, for any k > 1 there are at least three global rules that are both number conserving and reversible: the identity rule f Id (x, y, z) = y, the left-shift rule f L (x, y, z) = z and the right-shift rule f R (x, y, z) = x.We will call these rules trivial.For k < 4, there is no other reversible k-ary NCCA (even in a multi-dimensional case-see Wolnik andDe Baets 2019, 2020).However, for k ≥ 4, there are some non-trivial ones.Until advances were made recently, the complete lists of reversible k-ary NCCAs were known only for k ≤ 4. First, the theory introduced in Wolnik et al. ( 2020) made it possible to find all quinary NCCAs (k = 5) and then check which of them are reversible.Next, using the method described in Wolnik et al. (2022) it was possible to enumerate all reversible senary and septenary NCCAs, without listing all the NCCAs first.The cardinalities of the obtained sets are shown in Table 1 and the mentioned lists can be found in Dziemiańczuk et al. (2020).
The following definition is formulated in the language of group theory.
Definition 2.7 Let F be a global rule.If there exists a natural number m such that the function F m is the identity on X * , then we say that F has finite order and we define the order of F as the smallest natural number with this property.
If a global rule F has a finite order, then it is not very interesting for applications as it repeats each configuration in an m-cycle, where m is the order of F. In particular, such a CA cannot be computationally universal (in any reasonable sense).
At the end of this section, in Fig. 4 we present the dependencies between the surjectivity and injectivity of F ∞ , F, F and F fin (in the case of a legal local rule f ).Since we deal with one-dimensional CAs, all the dependencies between F ∞ , F and F fin are known (see, e.g., Hedlund 1969or Kari 2005a), while the presented dependencies between F and F are obvious.
It is known that in the case of the infinite global rule F ∞ the concepts of injectivity, bijectivity and reversibility are equivalent (see, e.g., Kari 2005b).Thus, according to Remark 2.4, for a given local rule f the infinite global rule F ∞ is reversible and number conserving if and only if the global rule F is so.
Although in this paper we focus on the global rules F only, we present the other ones and the dependences between them, since we will use results from papers that consider infinite grids and, accordingly, F ∞ , F fin or F are used.

The description of reversible quinary NCCAs
Although our investigation concerns reversible septenary NCCAs, we start by recalling the description of the dynamics of reversible quinary NCCAs (since k = 5 is also a prime number).The full description of all 21 such CAs is given in Wolnik et al. (2022), but we decided to present it here for two reasons: for the readers' convenience and to have the possibility to introduce the language of swaps.
Since the state set [0..5) is sufficiently rich, we can easily design a quinary CA that is both number conserving and reversible.Indeed, if we pick some swap (ab) ↔ (cd), where a, b, c, d are different elements from [0..5) such that a +b = c + d, then we can define a CA of radius 1 by a simple relation: if in a given time step in a configuration there is the pattern 'ab', then in the next time step it will be replaced by the pattern 'cd', while each pattern 'cd' will be replaced by the pattern 'ab'.Such a CA is obviously number conserving (since we assume that a + b = c + d) and reversible (since it has order 2, i.e., it is self-inverse).In the case of [0..5), there are exactly 12 possible swaps, thus we can easily design 12 reversible quinary NCCAs using this method.

An exploration of the dynamics of reversible septenary NCCAs
We have been able to find all reversible NCCAs with state set [0..7) and radius 1 (Wolnik et al. 2022).It turns out that there are as many as 1669 of them.It is not possible to list all of them in this paper, but the complete list can be found in Dziemiańczuk et al. (2020).A computational study of the obtained CAs has shown that all reversible septenary NCCAs have a very limited dynamical behavior: for each global rule F, except for two shifts, there exists m ∈ {1, 2, 3, 4, 6, 12, 30, 60} such that F m is the identity rule (see Table 3), i.e., all of them have finite order.Additionally, 1249 reversible septenary NCCAs have an inverse CA with radius 1 and only 420 rules have an inverse CAs with radius 2.Moreover, if F is the global rule of a CA with radius 1, then its m-th power F m can even have radius m.For non-trivial reversible septenary NCCAs, however, we have found that the actual radius of any power is at most 2 (thanks to this property, the calculation of F 60 was possible).More general approach to determining the minimal radius of an inverse CA was studied by Czeizler (2004).
Unfortunately, the language of swaps used for quinary CAs proved to be insufficient to describe the rules with seven states: only 634 of them allow for a description using swaps only.These are exactly the ones having order 2.
In [0..7) we can consider longer pattern cycles than just swaps (one can see a swap (ab) ↔ (cd) as a pattern 2-cycle (ab) → (cd) → (ab)).There are 72 new global rules that can be described by using pattern 3-cycles (ab) → (cd) → (e f ) → (ab), where {a, b, c, d, e, f } ⊂ {0, 1, 2, 3, 4, 5, 6} and a + b = c + d = e + f ∈ {6, 7, 8}.Obviously, these global rules have order 3 and their inverse CA has radius 1, since it can be described by the reverse pattern 3-cycles (the reverse pattern 3-cycle of (ab Considering the combination of swaps and pattern 3cycles (taking into account grade separation), we obtain another set of 540 global rules.These rules have order 6 and their inverse rules are to be found among them (in particular the inverse is of radius 1).
There are 420 remaining rules that do not allow for a simple description as above.They need to be more complicated as their orders are 4, 12, 30 or 60.Moreover, we know that their inverses have radius 2. We set forth to create another description of these rules in order to understand them better and explain their order.
It is known that there always exists a particle representation of an NCCA, however, it is usually not unique (see, e.g., Boccara andFukś 2006 or Pivato 2002).We decided to base our particle representation on 2-cell patterns, which 123 could be seen as a generalization of the descriptions in the language of swaps and pattern 3-cycles.
Consider a global rule F. We will write the arrow a The set of all arrows for the global rule F will be denoted as α(F).Note that the corresponding local rule f can be obtained by the following simple formula: does not contain any of these arrows, then we put 0 as the corresponding term).This approach also allows us to introduce a partial order on the set of all reversible septenary NCCAs: Although this partial order is quite sparse (as there are as many as 416 maximal elements), it seems to be a decent measure of the complexity of the considered global rules.
We decided to choose one of the most complex rules to carry out a more comprehensive study and the choice fell on Rule2 (we use this name because this rule has number 2 in the dataset in Dziemiańczuk et al. (2020)), since (i) it is a maximal element in the partial order, (ii) it is one of 28 global rules having order 60 and (iii) its inverse has radius 2. Below we present the lookup table of Rule2 as the sequence of 7 3 values f (0, 0, 0), f (0, 0, 1), f (0, 0, 2), . . ., f (6, 6, 6) with additional spaces after each seven values for the reader's convenience: A detailed study of Rule2 allows to explain where the order 60 originates from and fully describe its dynamics.More precisely, the dynamics of Rule2 can be described easily in terms of the rows of the following seven matrices: .
(3) Indeed, let any initial configuration x ∈ X * be given.We can cut it into small pieces (with a length of at most three) according to the following procedure.First, we find and mark all positions in x at which there is some row of A or B. Next, in parts of x not marked at this time, we find and mark all positions at which there is some row of C, D, E, F or G.
Finally, all unmarked parts of x are cut into one-cell pieces.
It turns out that Rule2 acts on each of the obtained pieces separately.The pieces with length one remain unaltered.The pieces with length two or three change cyclically, according to the cycle given by the appropriate matrix.Below we describe this more formally.
For M ∈ {A, B, C, D, E, F, G}, let M denote the number of rows of M and for i ∈ {1, 2, . . ., M}, let M i denote the i-th row of M. Then in each time step, Rule2 acts as follows: where mod(t, m) denotes the remainder of the division of t by m.Since 60 is the least common multiple of 5, 4, 3 and 2, it is the order of Rule2. Figure 5 illustrates the above description on a sample configuration.Following this description, it is easily to see that any power of Rule2 has radius at most 2. Indeed, the mth power of Rule2 acts as follows: B, C, D, E, F, G} has a length of at most three, so the radius 2 is sufficient to define Rule2 m .
We are able to theoretically prove all the facts about Rule2 presented above, however, our proof is strongly based on properties of Rule2's lookup table, thus it cannot be easily adapted to other rules.In the future, more general

The neighborhood scope of inverse automata
The description of the inverse rule by indicating its radius expressed as a natural number, as was done in the previous section, is very imprecise.A more detailed description uses the notion of scope of the neighborhood (for a given local rule f , the scope of its neighborhood means the number of consecutive cells whose states are needed to calculate the values of f ).Indeed, suppose that we consider a local rule f with radius r , i.e., F(x) n = f (x n−r , . . ., x 0 , . . ., x n+r ).
It may happen that f does not depend on x n+r −1 and x n+r .In such case, the scope of the neighborhood is definitely smaller than 2r + 1.For example, the left-shift rule and the right-shift rule both have radius 1, but the scope of their neighborhood is not 3, but only 1.In this section we present a very useful tool introduced in Nasu (1977) for surjective legal CAs that allows to easily determine the scope of the neighborhood of the inverse automaton (see Theorem 4.9 below).

Bundle graphs for reversible NCCAs
The theory presented in Nasu (1977) has been developed for the general case of an arbitrary surjective F ∞ (in particular, there is no condition on the radius).According to Fig. 4, we can use this theory in the case of a reversible F. Below we recall the definitions and facts from Nasu (1977) reformulated to the present setting, i.e., with state set [0..k) and radius equal to 1.Note that we can use this theory to study reversible NCCAs, since they are surjective (see Fig. 4) and their local rules are legal (which is additionally required for some theorems in Nasu (1977)).
For a given x ∈ X N +2 , let us define the left end and the right end of x as l(x) = x 0 x 1 and r (x) = x N x N +1 , respectively.Using the de Bruijn representation, we can say that the path corresponding to the configuration x starts at the vertex x 0 x 1 and ends at the vertex x N x N +1 .Definition 4.1 Let f be a local rule, u ∈ [0..k) 2 and x ∈ X N .The right bundle R f (u, x) is the set of all v ∈ [0..k) 2 such that there exists y ∈ X N +2 with l(y) = u, r (y) = v and F bl (y) = x.
In the language of the de Bruijn representation, the right bundle R f (u, x) is the set of all vertices v such that there exists a path y from the vertex u to v satisfying F bl (y) = x.To illustrate this definition, let us look at Fig. 3 showing the de Bruijn representation of the elementary cellular automaton ECA110.One can see, for example, that R f (00, 1) = {01}, R f (00, 10) = ∅, and R f (01, 111) = {01, 11}.
Analogously, we define the left bundle L f (u, x) as the set of all vertices v such that there exists a path y from the vertex v to u satisfying F bl (y) = x.Definition 4.2 Let F be a local rule, u ∈ [0..k) 2 and x ∈ X N .The left bundle L f (u, x) is the set of all v ∈ [0..k) 2 such that there exists y ∈ X N +2 with l(y) = v, r (y) = u and F bl (y) = x.
Note that for any u ∈ [0..k) 2 and x ∈ X N , the cardinality of R f (u, x) does not exceed k 2 (since R f (u, x) ⊆ [0..k) 2 ).Thus, we can define maximal right bundles as those that have the maximum cardinality among all the right bundles of f .Analogously, L f (u, x) is said to be maximal if it has the maximum cardinality among all the left bundles of f .Let R f and L f denote the set of all maximal right bundles and all maximal left bundles, respectively.
The following theorem collects essential facts about the sets R f and L f proved in Nasu (1977).
Theorem 4.3 Let F be a reversible k-ary CA.
Note that in the above theorem, it is not required that F is number conserving.The following lemma shows the additional benefit of number conservation.
see Fig. 6).We will show that all x i have to be zero.If not, then there exists x m with minimal index m such that x m = 0.But then, according to Eq. ( 1), we have (if needed, we put x k 2 −1 = u 1 and which means that all terms x m , f (0, x m+1 , x m+2 ), f (0, 0, x m+1 ) are zero.In particular, x m = 0 contrary to the assumption.As all x i are zero, then both f (0, 0, u 1 ) = 0 and f (0, ) is similar and is based on Eq. (2).
Properties (P1) and (P2) allow to construct a directed graph R f having R f as set of vertices and labelled arcs.Indeed, let R ∈ R f , i.e.R = R f (u, x) for some u ∈ [0..k) 2 and x ∈ X N , then for any y ∈ [0..k) we add an arc from R to R f (u, xy) labelled by y.Analogously, properties (P1') and (P2') allow to construct a directed graph L f having L f as set of vertices and labelled arcs created as follows: if L = L f (u, x) ∈ L f , then for any y ∈ [0..k) we add an arc from L to L f (u, yx) ∈ L f labelled by y.
Theorem 4.5 Let F be a reversible k-ary CA.Both graphs R f and L f are strongly connected.
A useful consequence of the above theorem is the possibility of constructing the entire graph R f (or L f ) knowing at least one vertex of it.By Lemma 4.4, we know that the right bundle R f (00, 00) is maximal, so it is one of the vertices of R f .Moreover, the right bundle R f (00, 00) is very simple to calculate.Thus, we can generate the entire graph R f using Algorithm 1; the algorithm for generating the graph L f is analogous.
Figure 7 shows the graphs R f and L f for the reversible quinary NCCA with f being the local rule with index 18 listed in Table 2.The vertices of these graphs are maximal (left and right, respectively) bundles and are listed below.It appears that for all reversible quinary NCCAs except for the shifts (i.e., the quinary NCCAs listed in Table 2 with indices 2-20), the bundle graphs have a similar structure.Each of them has five vertices representing pairwise disjoint sets.For the right-shift rule, the left bundle graph has 25 Algorithm 1 Generating the right bundle graph R F

Input: a local rule f given as a lookup table (LUT).
Output: right bundle graph R F given as (V , E), where V is the set of vertices, E is the set of labelled arcs represented as triples (u, v, z), where (u, v) is a directed edge from vertex u to vertex v with label z.
2. Construction of the first vertex v 0 (using Lemma 4.4) Set v 0 = ∅.for x, y in {0, 1, . . ., k − 1} do if f (0, 0, x) = 0 and f (0, x, y) = 0 then Add (x, y) to v 0 .end if end for 3. Calculate the remaining vertices and edges using the BFS algorithm starting at vertex v 0 using the procedure newEdge(v, z) which creates the outgoing edge with label z from the vertex v. procedure newEdge(v,z): vertices (each is a singleton), while the right bundle graph has only one vertex (equal to [0..k) 2 ).For the left-shift rule, of course, it is the opposite.

Definite finite automata
Any labelled directed graph can be considered as a finite automaton.Let us recall the definition and some useful properties of this concept (see, e.g., Nasu 1977 for details).

Definition 4.6 A finite automaton A is a triple
, S, T , where is an input alphabet, S is a finite set of states and T : S × → S is a transition function.
Any transition function T can be extended in a natural way to * , where * is the set of all finite strings of elements of , as follows: (s, ε) = s and T (s, xy) = T (T (s, x), y), for any s ∈ S, x ∈ * and y ∈ (here ε denotes the string of length zero).
In the theory of finite automata, the notion of definiteness is of importance.A finite automaton A = , S, T is 0definite if it has only one state, while it is d-definite, with d ≥ 1, if for each string x ∈ * of length d and any states s 1 and s 2 , it holds that T (s 1 , x) = T (s 2 , x), while there are two states s 1 and s 2 and a string y ∈ * of length d − 1 such that T (s 1 , y) = T (s 2 , y).An automaton A is definite if it is d-definite for some d ≥ 0. Definition 4.7 Let A = , S, T be a finite automaton.Two states s 1 , s 2 ∈ S are said to be one-equivalent if T (s 1 , y) = T (s 2 , y) for each y ∈ .The fact that states s 1 and s 2 are one-equivalent is denoted by s 1 s 2 .
Note that the relation is indeed an equivalence relation.Hence, starting from any finite automaton A = , S, T , we can define the contraction of A w.r.t., which yields the finite automaton A/ = , S/ , T where S/ = {[s] : s ∈ S} is the quotient set of S w.r.t.(the set of all equivalence classes) and T acts as follows: If S contains at least two one-equivalent states, then the resulting finite automaton has less states, so it is easier to study.We will use the following facts concerning definite automata (Perles et al. 1963) (see also Nasu 1977).
Theorem 4.8 Let A = , S, T be a finite automaton with at least two states.If A is d-definite, for some d ≥ 1, then there exist two distinct one-equivalent states in S.Moreover, the contracted automaton A/ = , S/ , T is (d − 1)definite.
According to the above theorem, for any definite automaton A with at least two states, repeatedly applying contraction, we get a sequence of simpler and simpler finite automata: A d has only one state.Moreover, since A d is 0-definite, the initial finite automaton A then is d-definite.

Definiteness of bundle graphs
For a given k-ary global rule F, the graph R f is a finite automaton R f = [0..k), R f , T , where the transition function T is determined by the arcs of R f in the following way: for R 1 , R 2 ∈ R f and y ∈ [0..k), it holds that T (R 1 , y) = R 2 if and only if there is an arc in R f from R 1 to R 2 labelled by y.The main result of Nasu (1977) states the following.Theorem 4.9 Let F be a reversible k-ary NCCA.There exist natural numbers d r and d l such that R f is d rdefinite and L f is d l -definite.Moreover, d r + d l − 1 is the least scope of the neighbourhood of the local rule g of the inverse automaton of F.More specifically, x i = g(y i−(d r −1) , . . ., y i , . . ., y i+(d l −1) ).Note that according to the above theorem, the neighborhood of the inverse automaton includes d r − 1 cells on the left, the cell itself and d l − 1 cells on the right.Hence, the radius of the inverse automaton equals max(d r , d l ).
Using Theorem 4.8, we can calculate d r and d l for a given reversible k-ary NCCA.For example, let us start with the right bundle graph R f given in Fig. 7.This graph has five vertices v0, v1, v2, v3 and v4.Among them, three vertices have the same set of outgoing arcs (w.r.t. the labels): v2, v3 and v4 (see Fig. 8(a)).Therefore, we use the contraction to obtain a new graph with three vertices only, given in Fig. 8(b).These three vertices have the same set of outgoing arcs and contracting them we obtain a new graph with one vertex and one loop arc with all labels, as shown in Fig. 8(c).We applied contraction twice and therefore R f is 2-definite.
To conclude our exploratory study of reversible septenary NCCAs, we have applied the above theorems to all 1669 rules.The results are gathered in Table 4.We were curious what the bundle graphs for reversible septenary NCCAs look like.In particular, we were interested whether their vertices are disjoint subsets of [0..7) or not.Additionally, we wanted to see if there were any dependencies between the description of reversible septenary NCCAs via bundle graphs and the previously considered descriptions in the terminology of patterns or arrows.As we have not observed any relationship with the number of arrows from α(F) in the representation of the rule (we had expected such a dependence at the beginning of the study), we do not mention these numbers in the table.
Below we present the main results of our investigation, but, to make the description more clear, we exclude the trivial rules and focus on the remaining 1666 reversible septenary NCCAs (rows 4-7 in Table 4).
First of all, unlike in the quinary case, the bundle graphs for reversible septenary NCCAs need not have disjoint ver-tices.However, L f has disjoint vertices if and only if R f is 2-definite.Moreover, all 1246 reversible septenary NCCAs that allow for a description in the language of pattern 2and 3-cycles (and only these) have bundle graphs L f and R f with disjoint vertices.For this reason, both L f and R f are 2-definite, which agrees with the fact that their inverse automaton has radius 1, but now we have additional information that the scope of the neighborhood of their local rules is really equal to 3 (see row 4 in Table 4).
We already knew that the other 420 reversible septenary NCCAs are more complicated-in particular, their inverse automata have radius 2. It appeared that only for 72 of them the scope of the neighborhood really equals 5.Moreover, these CAs have only order 4, 12 or 60 (see row 7 in Table 4).The vast majority of reversible septenary NCCAs having an inverse automaton of radius 2 have to be, in a way, less complicated, since the scope of the neighborhood of their inverse automata is only 4. Note that these CAs have only order 4, 30 or 60 (see rows 5 and 6 in Table 4).
Our exploratory study suggests that there is hope to incorporate the property of number conservation in the theory developed in Nasu (1977) in order to make some general statements about the scope of inverse automata.The goal would be to find considerably sharper estimates for inverse automata of reversible NCCAs.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made.The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material.If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.To view a copy of this licence, visit http://creativecomm ons.org/licenses/by/4.0/.

Appendix A
Below we present the reasoning that leads to finding a description of Rule2 dynamics in terms of the matrices A, B, C, D, E, F, G.We start with the following definition.
Definition A.1 Let F be the global rule of a reversible septenary NCCA and let a, b ∈ [0..7).We will say that the string ab is a left barrier (resp.a right barrier) for F, if for each q ∈ [0..7) it holds that F(xab) = F(0ab) (resp.F(abx) = F(ab0)).
Note that the barriers for a given global rule F are very easy to see in its lookup table, as long as it is presented as Each rule has graphs L f and R f with 7 disjoint vertices.Each rule is described in the language of pattern 2-cycles and pattern 3-cycles.Each of these rules of order 2, 3 or 6 The next definition highlights those parts of an initial configuration where the global rule F always behaves the same, no matter what the rest of the configuration looks like.Definition A.2 Let F be the global rule of a reversible septenary NCCA and let q 1 q 2 . . .q s ∈ [0..7) be a string of length s.We will say that F is locally number-conserving on q 1 q 2 . . .q s , if the following holds: there exists a string q 1 q 2 . . .q s such that q 1 + q 2 + • • • + q s = q 1 + q 2 + • • • + q s and as soon as the string q 1 q 2 . . .q s appears in a configuration, F always converts it to the string q 1 q 2 . . .q s .It appears that if ab and cd are a left and a right barrier for F, respectively, then F is locally number-conserving on each string starting with ab and ending with cd.
Lemma A.3 Let F be the global rule of a reversible septenary NCCA and let q 1 q 2 . . .q s ∈ [0..7) be a string of length s ≥ 2. If q 1 q 2 is a left barrier and q s−1 q s is a right barrier for F, then F is locally number-conserving on q 1 q 2 . . .q s .Proof If q 1 q 2 is a left barrier and q s−1 q s is a right barrier for F, then F always converts q 1 q 2 . . .q s to q 1 q 2 . . .q s = f (0, q 1 , q 2 ) f (q 1 , q 2 , q 3 ) . . .f (q s−1 , q s , 0).Thus, for the configuration x = q 1 q 2 . . .q s ∈ X s we have F(q 1 q 2 . . .q s ) = q 1 q 2 . . .q s , which gives Let us note that the above lemma also holds for a very short string, for example for abc if ab is a left barrier and bc is a right barrier, or even for ab in the case when ab is both left and right barrier for F.
For a given matrix M let M denote the number of rows of M and for i ∈ {1, 2, . . ., M}, let M i denote the i-th row of M. Proof Let us consider M = A. First of all, let us note that Rule2 is locally number-conserving on the first row 360 (since 36 is a left barrier and 60 is a right barrier) as well as on each of the other rows.Moreover, it is easily to check that Rule2 converts q 1 q 2 q 3 = 360 to q 1 q 2 q 3 = 504, 504 to 144, 144 to 324, 324 to 540 and 540 back to 360.According to Lemma A.3 the proof in the case of M = A is finished.The case of M = B is similar.
The above theorem has a very significant impact on the form of space-time diagrams for Rule2.Indeed, let us consider some initial configuration x ∈ X * .If we find and mark all positions in x at which there is some row of A or B, then Theorem A.4 describes the look of parts of the space-time diagram for x below the marked parts: these will be columns of width 3 repeating some patterns in a cycle of length 5 or 4.Moreover, in the parts of x not marked at this time, there is no strings identical with rows of A or B. Thus, to calculate F(x) for these parts, we do not need the values f (3, 6, 0), f (5, 0, 4) and so on.If so, then we can use the following lookup table (LUT*): where by * we denote all the unused values, so these places we can fill in any way, for example, keeping the seven-element strings or columns homogeneous.Note that after such a procedure, we get additional barriers for, so now the list of all barriers is as follows: L e f t : 1 The next theorem describes how Rule2 works on each of the unmarked segment of x separately.
Theorem A.5 Let x ∈ X * and let x n . . .x m be a segment of x that contains no rows of A or B. On each row M i of a matrix M ∈ {C, D, E, F, G} occurring in the segment x n . . .x m Rule2 acts as follows: and leaves all other parts of the segment x n . . .x m unchanged.
Proof First of all, let us note that the formula given in Eq. ( 4) holds for t = 1.Indeed, is some row M i of a matrix Additionally, if we want to calculate Rule2 on the rest of the segment x n . . .x m , then we do not need the values f (q, a, b) and f (a, b, q), where ab is any row of C, D, E, F, G and q ∈ [0..7).Thus we can use the following lookup table: so, we see that Rule2 acts on the rest of the segment x n . . .x m as the identity.
To the end, it is sufficient to show that F(x) n . . .F(x) m also contains no rows of A or B, since then the principle of mathematical induction will do the rest.But it is easily (though arduous) to check.

Fig
Fig. 1 A sample space-time diagram of a reversible senary (a) and a reversible septenary (b) NCCA

Fig. 2
Fig. 2 Differences between the functions F, F ∞ and F bl

Fig. 3
Fig. 3 The de Bruijn representation of the elementary cellular automaton ECA110

Fig. 4
Fig. 4 Implications between the injectivity and surjectivity properties of F ∞ , F, F and F fin , in the case of a legal local rule f x −→ b, where a, b ∈ [0..7) and x > 0, to indicate that F acts as follows: exactly x particles from state a move to the right, whenever the cell on the right is in state b (and analogously a x ←− b).For example, a swap (ab)↔(cd), with a > c, can be described as a pair of arrows a x −→ b and c x ←− d, where x = a − c.Similarly, for a < c, we get c x −→ d and a x ←− b, where x = c − a.

Fig. 5
Fig. 5 Illustration on a sample configuration with periodic boundary conditions of how Rule2 acts in terms of the rows of the matrices listed in (3)

Fig. 6
Fig. 6 The example used in the proof of Lemma 4.4

Fig. 7
Fig. 7 Bundle graphs for the quinary NCCA with f being the local rule with index 18 listed in Table 2

Fig. 8 a
Fig. 8 a The right bundle graph R f for the quinary NCCA with f being the local rule with index 18 listed in Table 2, b the contraction of the graph in a, c the contraction of the graph in b

Theorem A. 4
If M ∈ {A, B}, then Rule2 is locally numberconserving on each row of M. Moreover in each time step, Rule2 acts as follows on a given row M i :M i (Rule2) t − −−−−→ M mod(i+t,M) ,where mod(t, m) denotes the remainder of the division of t by m.

Table 1
Numbers of specific types of one-dimensional k-aryCAs with radius 1

Table 4
Description of all 1669 reversible septenary NCCAs partitioned into seven classes according to values of d l and d r M ∈ {C, D, E, F, G} occurs in the segment x n . . .x m , then to calculate Rule2 on M i we can use LUT*, since the segment x n . . .x m contains no rows of A or B. Note that each row M i of C, D, E, F, G is both a left and a right barrier for LUT*.Moreover, as one can easily check, M i is converted to M mod(i+t,M) .