This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Two Graphs: Resolving the Periodic Reversibility of One-dimensional Finite Cellular Automata

Chen Wang [email protected] Junchi Ma [email protected] Chao Wang [email protected] Defu Lin [email protected] Weilin Chen [email protected] Address: College of Software, Nankai University, Tianjin 300350, China
Abstract

Finite cellular automata (FCA) are widely used in simulating nonlinear complex systems, and their reversibility is closely related to information loss during the evolution. However, only a relatively small portion of their reversibility problems has been solved. In this paper, we perform calculations on two graphs and discover that the reversibility of any one-dimensional FCA exhibits periodicity as the number of cells increases. We also successfully provide a method to compute the reversibility sequence that encompasses the reversibility of one-dimensional FCA with any number of cells. Additionally, the calculations in this paper are applicable to FCA with various types of boundaries. This means that we will have an efficient method to determine the reversibility of almost all one-dimensional FCA, with a complexity independent of cell number.

keywords:
finite cellular automata , graph , circuit , reversibility sequence , period
volume: 00
\journalname\runauth

Chen Wang et al. \jidprocs \jnltitlelogo \CopyrightLine2023Published by Elsevier Ltd.

\dochead

1 Introduction

Cellular Automaton (CA) is a discrete model, consisting of a rule and a grid of one or more dimensions. Each grid position has a state, and these states are updated in parallel at discrete time steps based on a fixed local rule. The concept of CA was formally introduced by John von Neumann in 1951 to simulate the self-replication of cells in biological development [20]. CA has a wide range of applications in simulation, encryption, pseudorandom number generation, and more [11, 12, 21].

Reversibility in CA is one of the most important issues in the field. A reversible CA means that given its state at a certain time step, its state in the previous time step can be accurately determined. In other words, its evolution is reversible. Reversible CA can be used to simulate certain physical processes, such as time-reversal symmetry in quantum mechanics [6]. In information processing, the ability to trace and recover previous states is useful, and a reversible CA offers this possibility [24]. Reversibility can also be used in the design of encryption algorithms where the decryption process requires the recovery of the original state [17]. The earliest study of reversibility was the concept of the “Garden-of-Eden” configuration, first proposed by John Myhill in the 1960s and further studied by Moore [18, 19]. A “Garden-of-Eden” configuration is a special configuration that has no predecessor, implying a CA exhibiting the “Garden-of-Eden” is not surjective. Amoroso and Patt in the 1970s discovered decision algorithms for injective and surjective CA and organized the relationship between injectivity and surjectivity [1, 2], marking a milestone breakthrough. Bruckner proved that injective and surjective CA must be “balanced” [5]. Sutner, based on the de Bruijn graph, provided another decision algorithm for injectivity and surjectivity and proved its complexity is quadratic time [23]. In 1994, Kari proved that the reversibility of two-dimensional and higher-dimensional CA is undecidable, making it difficult to discuss the reversibility of high-dimensional CA [13, 14]. In recent years, Wolnik et al. have solved the reversibility problem of number-conserving CA using a very elegant method [9, 25, 26]. However, the reversibility of one-dimensional CA has not been fully resolved.

Finite cellular automata (FCA) introduce boundaries to the earliest models of CA. After Kari, many researchers shifted the study of reversibility to linear FCA, using tools like matrices and polynomials. Del Rey made extensive attempts in this area: he analyzed the periodic relationship between the reversibility of a series of specific linear CA and the increase in the number of cells. This approach is feasible when there are few types of linear FCA [7, 16]. However, as the number of types increases and the analysis becomes complicated due to the enlargement of neighborhoods and the number of states, it becomes difficult to carry out. Building on this, Wang extended the computation to the general case of linear FCA, finding the periods of reversibility for any linear FCA through DFA and shift registers [8, 27]. This is already a significant breakthrough.

However, the complexity and functionality of linear FCA is much lower compared to nonlinear FCA. There are only 23=82^{3}=8 elementary linear FCA, while there are a total of 223=2562^{2^{3}}=256 general ones. Therefore, only a very small part of the problem has been solved. Of course, there are several algorithms for determining the reversibility of general FCA, but these algorithms have their limitations: not only are they overly complex and unable to determine the period, but they are also only applicable to 3-neighborhood-size FCA and are suitable for only one type of boundary, either null boundary or periodic boundary [4, 15].

In this paper, we perform calculations on two new kinds of graphs to discover that the reversibility of any nonlinear FCA shows periodicity as cell number nn grows. We successfully provide a method to calculate a sequence (reversibility sequence), which contains the reversibility of FCA with all numbers of cells. This means we will have an efficient way to determine the reversibility of any FCA completely. The complexity of this algorithm is independent of nn, a significant leap compared to Maiti’s algorithm [15]. This algorithm is both applicable to null boundaries and periodic boundaries. Our paper demonstrates that, even for complex one-dimensional nonlinear FCA, the computation of their reversibility is efficient.

This paper consists of four sections. The second section introduces the FCA and related concepts. The core content of the algorithm is in the third section. The fourth section summarizes the work of the entire paper.

2 Preliminaries

In this section, we give the formal definitions used in the article. We first define the finite cellular automata (FCA) and relevant problems. Then we define different boundaries of one-dimensional FCA.

2.1 Finite cellular automata

Finite cellular automaton (FCA) is the most basic and important concept in this paper. It is usually defined by a quintuple: FCA = {Zd,S,Nm,f,b}\{Z^{d},S,N_{m},f,b\}

  • 1.

    ZdZ^{d} is the dimension of the cellular space. Each point cZdc\in Z^{d} is called a cell. In this paper, the dimension d=1d=1. The number of cells in Z1Z^{1} is denoted as nn in this paper.

  • 2.

    S={0,1,,s1}S=\{0,1,\ldots,s-1\} is a finite set of states representing a cell’s state in CA. At any time, the state of each cell is an element in this set. We use ss to count the number of elements in this set.

  • 3.

    Nm=(n1,n2,,nm)N_{m}=(\vec{n}_{1},\vec{n}_{2},\ldots,\vec{n}_{m}) represents neighbor vectors, where nid\vec{n}_{i}\in\mathbb{Z}^{d}, and ninj\vec{n}_{i}\neq\vec{n}_{j} when iji\neq j (i,j=1,2,,m)(i,j=1,2,\ldots,m). Thus, the neighbors of the cell nd\vec{n}\in\mathbb{Z}^{d} are the mm cells n+ni,i=1,2,,m\vec{n}+\vec{n}_{i},i=1,2,\cdots,m. The neighborhood size of this CA is denoted as mm in this paper. We use l+1+rl+1+r to express a function containing ll neighbor on the left and rr neighbor on the right. For example, the rule of an elementary FCA can be expressed as 1+1+11+1+1.

  • 4.

    ff: SmSS^{m}\rightarrow S is the local rule (or simply the rule). The rule maps the current state of a cell and all its neighbors to this cell’s next state.

  • 5.

    bb is the type of boundary which includes the null boundary (b=``n"b=``n") and the periodic boundary (b=``p"b=``p"). The algorithm in this paper is also applicable to the reflective boundary, but it will not be further elaborated upon.

A configuration is a mapping CC : ZdSZ^{d}\rightarrow S which assigns each cell a state. Function τ\tau : CCC\rightarrow C is used to represent the global transformation of ff.

The Wolfram number is a shorthand for the rule. For instance, for a FCA={Z1,{0,1},N3,f,b}FCA=\{Z^{1},\{0,1\},N_{3},f,b\} the rule ff is shown as follows:

f(0,0,0)=0,f(0,0,1)=0,f(0,1,0)=0,f(0,1,1)=0,f(1,0,0)=1,f(1,0,1)=1,f(1,1,0)=1,f(1,1,1)=1.\begin{split}f(0,0,0)=0,\ \ \ \ f(0,0,1)=0,\ \ \ \ f(0,1,0)=0,\ \ \ \ f(0,1,1)=0,\\ f(1,0,0)=1,\ \ \ \ f(1,0,1)=1,\ \ \ \ f(1,1,0)=1,\ \ \ \ f(1,1,1)=1.\end{split} (1)

Then, we can use the Wolfram number 11110000 to abbreviate this rule. This FCA can be represented as a quintuple {Z1,{0,1},N3,11110000,b}\{Z^{1},\{0,1\},N_{3},11110000,b\}. The length of the Wolfram number is sms^{m}.

2.2 Boundaries of one-dimensional FCA

There are several different boundaries of one-dimensional FCA. The most important ones studied at present are the null (fixed) boundary and the periodic boundary. Now, we will introduce these boundaries respectively.

Now we suppose the rule of an FCA is 1+1+11+1+1, Then the leftmost cell has no left neighbor, and the rightmost cell has no right neighbor. In this case, the leftmost and rightmost cells in the next transformation will lose their corresponding value. To avoid this, we need to fill their neighbors outside the boundary with certain values. These two boundaries correspond to different values of their neighbors.

The null boundary is also called the zero boundary, which always fills “0” in the cell outside the configuration. The example of a null boundary is shown in Fig. 1.

Refer to caption
Figure 1: The null boundary of one-dimensional FCA

Periodic boundary regards the configuration as a circle, which fills the cells left-outside the configuration according to the rightmost cells. The example of the periodic boundary is also shown in Fig. 2.

Refer to caption
Figure 2: The periodic boundary of one-dimensional FCA

2.3 Reversibility problem

Definition 2.1.

The surjectivity of a FCA={Z1,S,Nm,f,b}FCA=\{Z^{1},S,N_{m},f,b\} can be expressed as, for any configuration c1Cc_{1}\in C, there exists a configuration c2Cc_{2}\in C, we have τ(c2)=c1\tau(c_{2})=c_{1}. This means that every configuration can find its predecessor, indicating that there is no “Garden-of-Eden” configuration.

Definition 2.2.

The injectivity of a FCA={Z1,S,Nm,f,b}FCA=\{Z^{1},S,N_{m},f,b\} can be expressed similarly: for any two configurations c1,c2Cc_{1},c_{2}\in C, if τ(c1)=τ(c2)\tau(c_{1})=\tau(c_{2}), then there must be c1=c2c_{1}=c_{2}. That means all configurations have one and only one predecessor.

Proposition 1.

For a FCA, surjective and injective are equivalent and are also referred to as bijective or reversible.

Proof.

For a FCA, since the number of cells is fixed, the two sets before and after the mapping by the global mapping function τ\tau have an equal number of elements. Therefore, the surjectivity is equivalent to injectivity, which is a bijectivity, also known as reversibility. ∎

Definition 2.3.

If all nn-cell-configurations (the number is sns^{n}) of a FCA={Z1,S,Nm,f,b}FCA=\{Z^{1},S,N_{m},f,b\} has one and only one predecessor, then this FCA is nn-cell-reversible.

Definition 2.4.

If for any nn, the FCA is always nn-cell-reversible, then this FCA is strictly reversible. Conversely, if it is never nn-cell-reversible, then it is strictly irreversible.

Definition 2.5.

The reversibility sequence is an infinite sequence of 0s and 1s, where the nnth number from the left is 0 indicates that the FCA is irreversible when it has nn cells, and 1 indicates its reversibility. Due to the presence of periodicity, we underline a complete period in the sequence. For example, if an FCA’s reversibility sequence is 010001, then this FCA is reversible only when the number of cells is in {2}{3k|k>1\{2\}\cup\{3k\ |\ k>1 and k+}k\in\mathbb{Z_{+}}\}. Its reversibility period is 3.

Our goal is to quickly determine whether any given FCA is strictly reversible or strictly irreversible. If it is neither, we should obtain its reversibility sequence directly by calculating the period. Specifically, for various widely used boundary conditions, the algorithm should be fully compatible (without significant differences).

2.4 Amoroso’s algorithm

Amoroso’s algorithm is used to determine the surjectivity of infinite CA. It can be described in brief step by step.

Step 1

For a CA with neighborhood size mm and state set S={0,1,,p1}S=\{0,1,\ldots,p-1\}, get its local rule ff.

Step 2

If f(m)=0f(m)=0, add mm into the root node.

Step 3

For each node MM in layer ii (i0)(i\geq 0), construct its children M0,M1,,Mp1M_{0},M_{1},\cdots,M_{p-1}. For each tuple a1a2ama_{1}a_{2}\cdots a_{m} in MM and all 0j<p0\leq j<p, if f(a2a3amj)=tf(a_{2}a_{3}\cdots a_{m}j)=t, then a2a3amja_{2}a_{3}\cdots a_{m}j is added to MtM_{t}. If a node is the same as a node that has appeared before, its children will not be constructed. If there are not any m-tuples in a node, then the CA has a Garden-of-Eden which decides the CA is not surjective.

Step 4

If the three steps above are completed and the CA is not decided as non-surjective, then the CA is surjective.

3 Main result

The main process of the algorithm is divided into three steps: The first step is to construct the reversibility graph. The second step is to find all circuits in the reversibility graph and construct the circuit graph. The third step is to list the expressions of all irreversible vertices and ultimately provide the reversibility period and sequence.

3.1 Reversibility graph

Definition 3.1.

For FCA = {Z1,S,Nm,f,``n"}\{Z^{1},S,N_{m},f,``n"\} (m=l+1+r)(m=l+1+r), its reversibility graph GR=(V,E)G_{R}=(V,E) is defined as follows:

  • 1.

    V={v:vSm1, and there is a path from vroot to v}V=\{v:v\subseteq S^{m-1},\text{ and there is a path from $v_{root}$ to $v$}\}.

  • 2.

    vroot={a1,,am1:a1,,am1Sm1 and i{1,,l},ai=0}v_{root}=\{a_{1},\cdots,a_{m-1}:a_{1},\cdots,a_{m-1}\in S^{m-1}\text{ and }\forall i\in\{1,\cdots,l\},a_{i}=0\}.

  • 3.

    vend={a1,,am1:a1,,am1Sm1 and i{l+1,,m1},ai=0}v_{end}=\{a_{1},\cdots,a_{m-1}:a_{1},\cdots,a_{m-1}\in S^{m-1}\text{ and }\forall i\in\{l+1,\cdots,m-1\},a_{i}=0\}.

  • 4.

    For u,vVu,v\in V, there is an edge (u,v)(u,v) labeled ee from uu to vv iff a={a1,,am1}v\forall a=\{a_{1},\cdots,a_{m-1}\}\in v and i{1,,m2}i\in\{1,\cdots,m-2\}, b={b1,,bm1}u\exists b=\{b_{1},\cdots,b_{m-1}\}\in u, there are ai=bi+1a_{i}=b_{i+1} and f(b1,a1,,am1)=ef(b_{1},a_{1},\cdots,a_{m-1})=e

Definition 3.2.

For FCA = {Z1,S,Nm,f,``p"}\{Z^{1},S,N_{m},f,``p"\} (m=l+1+r)(m=l+1+r), its reversibility graph GR=(V,E)G_{R}=(V,E) is defined as follows:

  • 1.

    V={v:vS2m2,and there is a path from vroot to v}V=\{v:v\subseteq S^{2m-2},\text{and there is a path from $v_{root}$ to $v$}\}.

  • 2.

    vroot=vend={a1,,a2m2:a1,,a2m2S2m2 and i{1,,m1},ai=ai+m1}v_{root}=v_{end}=\{a_{1},\cdots,a_{2m-2}:a_{1},\cdots,a_{2m-2}\in S^{2m-2}\text{ and }\forall i\in\{1,\cdots,m-1\},a_{i}=a_{i+m-1}\}.

  • 3.

    For u,vVu,v\in V, there is an edge (u,v)(u,v) labeled ee from uu to vv iff a={a1,,am1}v\forall a=\{a_{1},\cdots,a_{m-1}\}\in v, i{1,,m2}i\in\{1,\cdots,m-2\}, and j{1,,m1}j\in\{1,\cdots,m-1\}, b={b1,,bm1}u\exists b=\{b_{1},\cdots,b_{m-1}\}\in u, there are aj=bja_{j}=b_{j}, ai+m1=bi+ma_{i+m-1}=b_{i+m} and f(bm,am,,a2m2)=ef(b_{m},a_{m},\cdots,a_{2m-2})=e

Definition 3.3.

The negative vertex set VN={vV:vend}V_{N}=\{v\in V:v\cap end\neq\emptyset\}.

Theorem 1.

FCA = {Z1,S,Nm,f,b}\{Z^{1},S,N_{m},f,b\} is strictly reversible iff VN=V_{N}=\emptyset in GRG_{R}.

Proof.

GRG_{R} is very similar to the tree constructed by Amoroso’s algorithm introduced in Subsection 2.4. The difference lies in the removal of duplicate vertices from the tree and the addition of vrootv_{root} and vendv_{end} to accommodate the boundary conditions of FCA, thus the proofs are also similar.

If there are no negative vertices in GRG_{R}, for any configuration cc, there exists a corresponding path starting from vrootv_{root}, and among the vertices the path traverses, there must be a valid configuration cc^{\prime} that satisfies τ(c)=c\tau(c^{\prime})=c. Since any configurations can find predecessors through the vertices on the path, this FCA is strictly reversible. Conversely, if there is at least one negative vertex in GRG_{R}, the corresponding configurations have no predecessors and are Garden-of-Eden configurations, meaning that the FCA is not strictly reversible. ∎

Proposition 2.

GRG_{R} can be constructed within O(smV)O(s^{m}V).

Proof.

For FCA, the complexity of the rule ff is sms^{m}. Therefore, the complexity of GRG_{R} is linearly related to both VV and the rule complexity sms^{m}, resulting in an overall complexity of O(smV)O(s^{m}V). Fig. 3 and Algorithm 1 shows the structure and a detailed pseudocode of GRG_{R}. ∎

Refer to caption
Figure 3: The left side is the reversibility graph for FCA={Z1,{0,1},N3,10100101,``n"}\{Z^{1},\{0,1\},N_{3},10100101,``n"\}, while the right side is for FCA = {Z1,{0,1},N3,10011001,``p"}\{Z^{1},\{0,1\},N_{3},10011001,``p"\}. Negative vertices are marked in red.
Data: one-dimensional finite CA {Z1,S,Nm,f,b}(m=l+1+r)\{Z^{1},S,N_{m},f,b\}(m=l+1+r)
Result: reversibility graph GRG_{R}
1 let GRG_{R} be an empty directed graph, QQ be an empty queue;
2 if b==“n” then
3       vroot={a1a2am1|a1a2am1Sm1,aj=0,1jl}v_{root}=\{a_{1}a_{2}\cdots a_{m-1}|a_{1}a_{2}\cdots a_{m-1}\in S^{m-1},a_{j}=0,1\leq j\leq l\};
4       vend={a1a2am1|a1a2am1Sm1,aj=0,mrjm1}v_{end}=\{a_{1}a_{2}\cdots a_{m-1}|a_{1}a_{2}\cdots a_{m-1}\in S^{m-1},a_{j}=0,m-r\leq j\leq m-1\};
5      
6else b==“p”
7       vroot=vend={a1a2am1b1b2bm1|a1a2am1b1b2bm1S2m2,ai=bi,1im1}v_{root}=v_{end}=\{a_{1}a_{2}\cdots a_{m-1}b_{1}b_{2}\cdots b_{m-1}|a_{1}a_{2}\cdots a_{m-1}b_{1}b_{2}\cdots b_{m-1}\in S^{2m-2},a_{i}=b_{i},1\leq i\leq m-1\};
8      
9 end if
10d(vroot)=0d(v_{root})=0;
11 add vrootv_{root} to GRG_{R} and QQ;
12 while QQ is not empty do
13       pop the first vertex in QQ and denote it with vcurv_{cur};
14       if vcurvend==v_{cur}\cap v_{end}==\emptyset then
15             mark vcurv_{cur} red;
16            
17       end if
18      for each eSe\in S do
19             if b==“n” then
20                   ve={a1a2am1|a1a2am1Sm1,a0S,a0a1am2vcurv_{e}=\{a_{1}a_{2}\cdots a_{m-1}|a_{1}a_{2}\cdots a_{m-1}\in S^{m-1},\exists a_{0}\in S,a_{0}a_{1}\cdots a_{m-2}\in v_{cur} and f(a0a1am1)=e}f(a_{0}a_{1}\cdots a_{m-1})=e\};
21                  
22            else b==“p”
23                   ve={a1a2am1b1b2bm1|a1a2am1b1b2bm1S2m2,b0S,a1a2am1b0b1bm2vcurv_{e}=\{a_{1}a_{2}\cdots a_{m-1}b_{1}b_{2}\cdots b_{m-1}|a_{1}a_{2}\cdots a_{m-1}b_{1}b_{2}\cdots b_{m-1}\in S^{2m-2},\exists b_{0}\in S,a_{1}a_{2}\cdots a_{m-1}b_{0}b_{1}\cdots b_{m-2}\in v_{cur} and f(b0b1bm1)=e}f(b_{0}b_{1}\cdots b_{m-1})=e\};
24                  
25             end if
26            if vsame==ve\exists v_{same}==v_{e} in GRG_{R} then
27                   add an edge (vcur,vsame)(v_{cur},v_{same}) labeled ee into GRG_{R};
28                  
29            else
30                   d(ve)=d(vcur)+1d(v_{e})=d(v_{cur})+1 ;
31                   add an edge (vcur,ve)(v_{cur},v_{e}) labeled ee into GRG_{R};
32                   add vev_{e} to GRG_{R} and QQ;
33                  
34             end if
35            
36       end for
37      
38 end while
39
40return GRG_{R};
Algorithm 1 the reversibility graph GRG_{R}

3.2 Circuit graph and reversibility period

In the previous section, we introduce the construction of the reversibility graph GRG_{R} and use it to determine if an FCA is strictly reversible. For FCA with a specific number of cells, GRG_{R} remains available, but the concept of “depth” needs to be introduced.

Definition 3.4.

The depth of vVv\in V in GRG_{R} is d(v)=min{d(u)+1:(u,v)E}d(v)=min\{d(u)+1:(u,v)\in E\} (d(vroot)=0d(v_{root})=0).

Refer to caption
Figure 4: Replace the content of each vertex vv of GRG_{R} in Fig. 3 with its depth d(v)d(v).
Theorem 2.

If vVNv\in V_{N}, then the FCA is irreversible when it has d(v)d(v) cells.

Proof.

There is always a path from vrootv_{root} to vv. The configuration corresponding to this path cannot find predecessors, indicating the existence of a “Garden of Eden” configuration. For example, in Fig. 3 left, the configuration with one cell, 0, is a “Garden-of-Eden” configuration. ∎

Theorem 3.

If vVNv\in V_{N}, and vv is included in ii elementary circuits of length r1,r2,,rir_{1},r_{2},\cdots,r_{i} . then the FCA is irreversible when it has d(v)+x1r1+x2r2++xirid(v)+x_{1}r_{1}+x_{2}r_{2}+\cdots+x_{i}r_{i} cells (x1,x2,,xi0)(x_{1},x_{2},\cdots,x_{i}\in\mathbb{N}_{0}).

Proof.

Starting from vv, there are ii different paths that return to vv, and continuing the search, there are ii different paths again, essentially forming a linear combination of r1,r2,,rir_{1},r_{2},\cdots,r_{i}. ∎

The aforementioned theorems are still not sufficient. We can find that in Fig. 3 left, 000(01)*10 is also a “Garden-of-Eden” configuration, yet we have not included it in our calculations. To address this issue, we define a new type of graph called the ”circuit graph.”

Definition 3.5.

For FCA = {Z1,S,Nm,f,b}\{Z^{1},S,N_{m},f,b\}, its circuit graph GC=(VC,EC)G_{C}=(V_{C},E_{C}) is defined as follows:

  • 1.

    GCG_{C} is an undirected graph.

  • 2.

    VC=VEVNV_{C}=V_{E}\cup V_{N}, where VEV_{E} is the set of elementary circuit in GRG_{R}.

  • 3.

    For u,vVCu,v\in V_{C}, there is (u,v)EC(u,v)\in E_{C} iff uu and vv include at least one same vertex.

  • 4.

    For uVNu\in V_{N}, vVCv\in V_{C}, there is (u,v)EC(u,v)\in E_{C} iff uu is included in vv.

  • 5.

    The d(u)d(u) of uVNu\in V_{N} is its depth in GRG_{R} and l(v)l(v) of vVCv\in V_{C} is its length in GRG_{R}.

Theorem 4.

If vVNv\in V_{N}, v1,,viVEv_{1},\cdots,v_{i}\in V_{E} and they are connected to vv in GCG_{C}, then the FCA is irreversible when it has k+x1l(v1)+x2l(v2)++xil(vi)k+x_{1}l(v_{1})+x_{2}l(v_{2})+\cdots+x_{i}l(v_{i}) cells where x1,x2,,xi0x_{1},x_{2},\cdots,x_{i}\in\mathbb{N}_{0} and the subgraph consisting of vjv_{j} where xj0x_{j}\neq 0 and their related edges is a connected graph.

Example 1.

The proof of this theorem is similar to that of the previous theorems, so we use an example in place of a formal proof here. Fig. 5 provides GCG_{C} corresponding to GRG_{R} in Fig. 3 right. For convenience of representation, we assign an order number to each vertex in the top left corner.

Refer to caption
Figure 5: The circuit graph GCG_{C} of FCA={Z1,{0,1},N3,10011001,``p"}FCA=\{Z^{1},\{0,1\},N_{3},10011001,``p"\}.

We can quickly list the irreversible number for the FCA based on the above theorems.

{1+3x1+2x2+x3+4x4+3x5+x62+3y1+2y2+y3+4y4+3y5+y6\left\{\begin{matrix}1+3x_{1}+2x_{2}+x_{3}+4x_{4}+3x_{5}+x_{6}\ \ \\ 2+3y_{1}+2y_{2}+y_{3}+4y_{4}+3y_{5}+y_{6}\ \ \end{matrix}\right. (2)

From GCG_{C}, we know that y1=y3=y4=0y_{1}=y_{3}=y_{4}=0 is a sufficient condition for y5=y6=0y_{5}=y_{6}=0. Many similar conditions are all easy to discern, so we will not list them all here. The union of all these irreversible number forms the reversibility sequence of the FCA. Ultimately, we can determine that the reversibility sequence for this FCA is: 0.

Definition 3.6.

For a connected component Gsub=(Vsub,Esub)G_{sub}=(V_{sub},E_{sub}) of GCG_{C}, the sub-period is gcd(VsubVC)\gcd(V_{sub}\cap V_{C}), where the function gcd\gcd is to find the maximum common divisor of the lengths of all circuits in set.

Theorem 5.

The reversibility period of FCA is lcm(P)\mathrm{lcm}(P), where PP is the set of sub-periods and function lcm\mathrm{lcm} is to get the minimum common multiple of a set, then .

Proof.

The proof of this theorem stems from the Frobenius Coin Problem [3, 22]. This problem can be briefly described as determining the largest amount of money that cannot be made with given denominations of coins. The problem has been widely explored in number theory and combinatorial mathematics. In this paper, we utilize it to calculate the reversibility period. ∎

Corollary 1.

If vVNv\in V_{N}, uVE\exists u\in V_{E} in GCG_{C} and l(u)=1l(u)=1, then the FCA is irreversible when the number nn of cells satisfies

nd(v)+wVEl(w).n\geq d(v)+\sum_{w\in V_{E}}l(w). (3)
Corollary 2.

If vVNv\in V_{N}, u1,u2VE\exists u_{1},u_{2}\in V_{E} in GCG_{C} and gcd(l(u1),l(u2))=1\gcd(l(u_{1}),l(u_{2}))=1, then the number nn of cells satisfies

n>d(v)+l1l2+wVE{u1,u2}l(w).n>d(v)+l_{1}l_{2}+\sum_{w\in V_{E}\setminus\{u_{1},u_{2}\}}l(w). (4)
Proof.

Corollary 1 is obvious, while the proof of Corollary 2 comes from the precise conclusion of the Frobenius Coin Problem. ∎

These two corollaries can help us make reversibility determinations more quickly and directly, sometimes even eliminating the need to construct GCG_{C}. In Example 1, we can determine that the FCA is irreversible when the number of cells is greater than or equal to 2, simply by finding there is a negative vertex in GRG_{R} with a self-circuit.

Through the aforementioned analysis, we have resolved the most significant issues. Only two minor problems remain to be addressed: one is finding all the circuits in GRG_{R}, and the other is the construction of GCG_{C}.

Proposition 3.

[10] We can find all elementary circuits of a directed graph in time bounded by O((V+E)(l+1))O((V+E)(l+1)), where there are VV vertices, EE edges and ll circuits in the graph.

We can find all the circuits of GRG_{R} in O(sVl)O(sVl), where the FCA has ss states and GRG_{R} has VV vertices and ll circuits.

Proposition 4.

We can construct GCG_{C} in time bounded by O(Vl2)O(Vl^{2}), where there are VV vertices and ll circuits in GRG_{R}.

Proof.

In GCG_{C}, there are ll points, so there are at most l2l^{2} edges. When determining whether two points are adjacent, we need to check whether at most VV vertices appear simultaneously in these two circuits. Therefore, the complexity is O(Vl2)O(Vl^{2}). Algorithm 2 shows the detailed pseudocode of GCG_{C}. ∎

Data: a reversibility graph GR=(V,E)G_{R}=(V,E)
Result: the circuit graph GCG_{C}
1 let GC=(VC,EC)G_{C}=(V_{C},E_{C}) be an empty directed graph;
2 Get the negative vertex set VNV_{N} in GRG_{R};
3 Calculate the elementary circuit setVEV_{E} in GRG_{R} by algorithm in [10];
4 VC=VNVEV_{C}=V_{N}\cup V_{E};
5 for each v,vVEv,v^{\prime}\in V_{E} do
6       if uu and vv include at least one same vertex then
7             add (v,v)(v,v^{\prime}) into ECE_{C};
8            
9       end if
10      
11 end for
12for each vVN,vVEv\in V_{N},v^{\prime}\in V_{E} do
13       if vv is included in vv^{\prime} then
14             add (v,v)(v,v^{\prime}) into ECE_{C};
15            
16       end if
17      
18 end for
19return GC=(VC,EC)G_{C}=(V_{C},E_{C});
Algorithm 2 the circuit graph GCG_{C}

Thus, the reversibility problem of one-dimensional FCA has been efficiently resolved. Actually, determining whether an FCA with nn cells is reversible is not straightforward. However, we approach this problem from a novel perspective: we list all the irreversible scenarios, and what remains are naturally reversible, as a substitute for individually determining the reversibility for every cell count. This approach significantly simplifies the complexity of analyzing the entire problem. Next, let’s fully recapitulate our algorithm.

Step 1

Construct GRG_{R} according to Algorithm 1 with the complexity of O(smV)O(s^{m}V).

Step 2

Find all circuits using Johnson’s algorithm with the complexity of O(sVl)O(sVl) [10].

Step 3

Construct GCG_{C} according to Algorithm 2 with the complexity of O(Vl2)O(Vl^{2}).

Step 4

List all irreversible number polynomials and solve the reversibility sequence.

We list several reversibility sequences for a series of rules in Table 1. Some of the rules in this chapter are linear and can be compared with existing results for linear FCA to verify the correctness of our algorithm. The underlined portions represent a period. ss is the number of states; mm is the neighborhood size; bb is the boundary and ff is the rule.

Table 1: List of reversibility sequence
ss , mm , bb ff reversibility sequence
10101010 000000000000¯\underline{0}
10101001 100000000000¯\underline{0}
2 , 3 , “n” 10100110 100000000000¯\underline{0}
10100101 010101010101¯\underline{01}
10010110 101101101101¯\underline{101}
11100001 000000000000¯\underline{0}
11010010 101010101010¯\underline{10}
11000011 000000000000¯\underline{0}
2 , 3 , “p” 10101001 000000000000¯\underline{0}
10100110 101010101010¯\underline{10}
10010110 110110110110¯\underline{110}
0010101111010100 101101000000¯\underline{0}
2 , 4 , “n” 0011001100111100 100000000000¯\underline{0}
0011101011000011 101000000000¯\underline{0}
1001011001101001 100110011001¯\underline{1001}
022211222000011200010212111 100000000000¯\underline{0}
3 , 3 , “n” 110002222110011222010022011 100000000000¯\underline{0}
012012012120120120201201201 010101010101¯\underline{01}
012120201120201012201012120 110111011101¯\underline{1101}

During the experimental process, we found that a large number of nonlinear FCA have a period of 1, meaning that starting from a certain length, configurations of greater lengths are all non-reversible. However, there is still a small portion of nonlinear FCA whose reversibility exhibits periodicity (e.g. the rule 11010010).

4 Conclusion

Our algorithm allows for the computation of the reversibility of configurations of any length for any FCA, with the complexity of O(smV+sVl+Vl2)O(s^{m}V+sVl+Vl^{2}). Moreover, the characteristic of finding periods makes this algorithm particularly suitable for computing configurations of greater lengths. However, there are still some issues that remain. First, is there still room for optimization in this algorithm, to further reduce unnecessary computations? Second, during our experiments, we found that there are very few non-linear CA with a period larger than 1; is there a sufficient and necessary condition to identify these CA?

Acknowledgments

This study is financed by Tianjin Science and Technology Bureau, finance code:21JCYBJC00210.

Declaration of generative AI

Generative AI is only used for translation and language polishing in this paper.

References

  • Amoroso et al. [1975] Amoroso, S., Cooper, G., Patt, Y., 1975. Some clarifications of the concept of a garden-of-eden configuration. Journal of Computer and System Sciences 10, 77–82.
  • Amoroso and Patt [1972] Amoroso, S., Patt, Y.N., 1972. Decision procedures for surjectivity and injectivity of parallel maps for tessellation structures. Journal of Computer and System Sciences 6, 448–464.
  • Bardomero and Beck [2020] Bardomero, L., Beck, M., 2020. Frobenius coin-exchange generating functions. The American Mathematical Monthly 127, 308–315.
  • Bhattacharjee and Das [2015] Bhattacharjee, K., Das, S., 2015. Reversibility of d-state finite cellular automata. arXiv preprint arXiv:1502.01187 .
  • Bruckner [1979] Bruckner, L.K., 1979. On the garden-of-eden problem for one-dimensional cellular automata. Acta Cybern. 4, 259–262. URL: http://dblp.uni-trier.de/db/journals/actaC/actaC4.html#Bruckner80.
  • Brun and Mlodinow [2020] Brun, T.A., Mlodinow, L., 2020. Quantum cellular automata and quantum field theory in two spatial dimensions. Physical Review A 102, 062222.
  • Del Rey and Sánchez [2009] Del Rey, A.M., Sánchez, G.R., 2009. Reversibility of a symmetric linear cellular automata. International Journal of Modern Physics C 20, 1081–1086.
  • Du et al. [2022] Du, X., Wang, C., Wang, T., Gao, Z., 2022. Efficient methods with polynomial complexity to determine the reversibility of general 1d linear cellular automata over zp. Information Sciences 594, 163–176. URL: https://www.sciencedirect.com/science/article/pii/S0020025522000743, doi:https://doi.org/10.1016/j.ins.2022.01.045.
  • Dzedzej et al. [2020] Dzedzej, A., Wolnik, B., Nenca, A., Baetens, J.M., De Baets, B., 2020. Efficient enumeration of three-state two-dimensional number-conserving cellular automata. Information and Computation 274, 104534. URL: https://www.sciencedirect.com/science/article/pii/S0890540120300225, doi:https://doi.org/10.1016/j.ic.2020.104534. aUTOMATA 2017.
  • Johnson [1975] Johnson, D.B., 1975. Finding all the elementary circuits of a directed graph. SIAM Journal on Computing 4, 77–84.
  • Jun [2009] Jun, J., 2009. Image encryption method based on elementary cellular automata, in: IEEE Southeastcon 2009, IEEE. pp. 345–349.
  • Kang et al. [2008] Kang, B.H., Lee, D.H., Hong, C.P., 2008. Pseudorandom number generation using cellular automata, in: Novel algorithms and techniques in telecommunications, automation and industrial electronics. Springer, pp. 401–404.
  • Kari [1990] Kari, J., 1990. Reversibility of 2d cellular automata is undecidable. Physica D: Nonlinear Phenomena 45, 379–385.
  • Kari [1994] Kari, J., 1994. Reversibility and surjectivity problems of cellular automata. Journal of Computer and System Sciences 48, 149–182.
  • Maiti et al. [2010] Maiti, N.S., Ghosh, S., Munshi, S., Pal Chaudhuri, P., 2010. Linear time algorithm for identifying the invertibility of null-boundary three neighborhood cellular automata. Complex Systems 19, 89.
  • Martı´n del Rey and Rodrı´guez Sánchez [2011] Martı´n del Rey, A., Rodrı´guez Sánchez, G., 2011. Reversibility of linear cellular automata. Applied Mathematics and Computation 217, 8360–8366. URL: https://www.sciencedirect.com/science/article/pii/S0096300311003997, doi:https://doi.org/10.1016/j.amc.2011.03.033.
  • Mohamed [2014] Mohamed, F.K., 2014. A parallel block-based encryption schema for digital images using reversible cellular automata. Engineering Science and Technology, an International Journal 17, 85–94.
  • Moore [1962] Moore, E.F., 1962. Machine models of self-reproduction, pp. 17–33.
  • Myhill [1963] Myhill, J.R., 1963. The converse of moore’s garden-of-eden theorem, pp. 685–686.
  • von Neumann and Burks [1966] von Neumann, J., Burks, A.W., 1966. Theory of self reproducing automata.
  • Rosin et al. [2014] Rosin, P., Adamatzky, A., Sun, X., 2014. Cellular automata in image processing and geometry. Springer.
  • Shallit [2008] Shallit, J., 2008. The frobenius problem and its generalizations, in: International Conference on Developments in Language Theory, Springer. pp. 72–83.
  • Sutner [1991] Sutner, K., 1991. De bruijn graphs and linear cellular automata. Complex Syst. 5, 19–30.
  • Toffoli and Margolus [1990] Toffoli, T., Margolus, N.H., 1990. Invertible cellular automata: a review. Physica D: Nonlinear Phenomena 45, 229–253.
  • Wolnik and De Baets [2020] Wolnik, B., De Baets, B., 2020. Ternary reversible number-conserving cellular automata are trivial. Information Sciences 513, 180–189. URL: https://www.sciencedirect.com/science/article/pii/S0020025519310369, doi:https://doi.org/10.1016/j.ins.2019.10.068.
  • Wolnik et al. [2022] Wolnik, B., Dziemiańczuk, M., Dzedzej, A., De Baets, B., 2022. Reversibility of number-conserving 1d cellular automata: Unlocking insights into the dynamics for larger state sets. Physica D: Nonlinear Phenomena 429, 133075. URL: https://www.sciencedirect.com/science/article/pii/S0167278921002323, doi:https://doi.org/10.1016/j.physd.2021.133075.
  • Yang et al. [2015] Yang, B., Wang, C., Xiang, A., 2015. Reversibility of general 1d linear cellular automata over the binary field z2 under null boundary conditions. Information Sciences 324, 23–31.