Keywords

1 Introduction

A 3-neighborhood 2-state Cellular Automaton (CA) can be viewed as an autonomous finite state machine [15]. While characterizing such CA state space, the researchers identified a set of CA states, called attractors, towards which the neighboring states asymptotically approach during evolution [3]. A single length cycle attractor (fixed point) is one where the number of states in the attractor is one [3]. Characterization of this class of CA is yet to be formalized.

The synthesis of fixed point attractor CA in linear/additive domain [1, 2, 4, 10] has been proposed in the literature [8, 11]. The identification of attractors, specially for null-boundary, is explored in [3, 14]. A tool called reachability tree is used in [13] to characterize and synthesize fixed point attractor CA in null-boundary. However, characterizations of fixed point PBCA, in non-linear domain, are yet to be explored. This motivates us to characterize the CA rules that can form fixed points in a PBCA state space. The NSRT Diagram (NSRTD) introduced in [12] is employed to explore existence of the multi-length cycle as well as the fixed points in a PBCA. It effectively identifies the SLCA (single length cycle attractor CA -that is, the CA with fixed point), specially, the class of SACA (single length cycle single attractor CA -that is, the CA with one and only one fixed point). It leads to the synthesis of uniform SACA of any length.

2 Preliminaries of Cellular Automata

In 3-neighborhood (self, left, right neighbors) CA, the next state (NS) (at time t+1) of the \(i^{th}\) cell is

                  \(S^{t+1}_i = f_i({S^t_{i-1}},{S^t_i},{S^t_{i+1}})\)

where \({S^t_{i-1}}\), \({S^t_i}\) and \({S^t_{i+1}}\) are the present states (PSs) of its neighbors. The \(f_i\) is the next state function. The collection of states \({\mathcal S}^t = (S^t_1,S^t_2,\cdots ,S^t_n)\) of the n cells at t is the state of CA at t. In a 2-state 3-neighborhood CA (ECA), there are 256 next state functions called rules. Three such rules 184, 226, and 232 are shown in Table 1. The first row lists the possible \(2^3\) (8) combinations of the PSs of \((i-1)^{th}\), \(i^{th}\) and \((i+1)^{th}\) cells [7]. Such a combination is referred to as the rule min term (RMT).

Table 1. Truth table for rule 184, 226, and 232

Figure 1 is the block diagram of an n-cell periodic boundary CA (PBCA). Its left (right) neighbor of leftmost (rightmost) cell is the rightmost (leftmost) cell.

Fig. 1.
figure 1

Block diagram of an n-cell PBCA

The set of rules \({<}{\mathcal {R}}_1, {\mathcal {R}}_2,\) \(\cdots , {\mathcal {R}}_i, \cdots , {\mathcal {R}}_n{>}\) that configures the cells of a CA is denoted as rule vector \({\mathcal{R}\mathcal{V}}\). If \(R_1\) = \(R_2\) = \(\cdots \) = \(R_n\), then the CA is uniform (Fig. 2(c)) otherwise, it is a non-uniform/hybrid CA (Fig. 2(a)).

A set of states can form cycle (0\(\,\rightarrow \,\)0, 10\(\,\rightarrow \,\)5\(\,\rightarrow \,\)10 and 15\(\,\rightarrow \,\)15 of Fig. 2(a)) and is called attractor. A self loop (0\(\,\rightarrow \,\)0/15\(\,\rightarrow \,\)15) is called single length cycle attractor or fixed point. Cycle involving multiple states (10\(\,\rightarrow \,\)5\(\,\rightarrow \,\)10) is a multi-length cycle attractor. An attractor forms a basin with the states that lead to the attractor. For example, (10\(\,\rightarrow \,\)5\(\,\rightarrow \,\)10)-basin of Fig. 2(a) contains 4 states.

An RMT is represented as T(m), m = {0, 1, 2, 3, 4, 5, 6, 7}; and T(m\(\in \) T, where T = {T(0), T(1), ..., T(7)}. The RMT for \(i^{th}\) cell based on which the cell changes its state at t is denoted as T\(_i^t\)(m). For example, T\(_1^t\)(0) denotes at time t cell 1 changes its state on RMT T(0). However, in the diagrams, an RMT is represented only by corresponding decimal number (m) -that is, T\(_i^t\)(0) is 0.

The RMT for which the next state is 0 (0-RMT), belongs to T/0 and that having next state as 1 (1-RMT) belongs to T/1, where T/0 \(\cap \) T/1 = \(\emptyset \) and T/0 \(\cup \) T/1 = T. An RMT x0y (respectively x1y), where x and y are the PSs of left and right neighbor in a rule \(\mathcal {R}\) is called passive if it belongs to T/0 (respectively T/1). On the other hand, if an RMT x0y (respectively x1y) belongs to T/1 (respectively T/0), it is active.

An RMT String (RS) is defined as a sequence of consecutive RMTs which appear in a state of CA. It is represented as (T\(_1\), T\(_2\),...,T\(_n\)) for an n-cell CA, where T\(_i\) \(\in \) T. For example, the state 1011 of a 4-cell CA can be represented by the RS (T\(_1\), T\(_2\), T\(_3\), T\(_4\)) = (T(6), T(5), T(3), T(7)).

Fig. 2.
figure 2

State transitions of CA

The CA having at least one fixed point attractor is the single length cycle attractor CA (SLCA). It can have multi-length cycle. The SLCA with only one fixed point is a single single length cycle attractor CA (SSLCA). Figure 2(b) is an SSLCA. The SLCA producing connected graph during its state transitions -that is, having one and only one fixed point attractor is called single length cycle single attractor CA (SACA). The rule that configures uniform SACA for all length is an SACA rule.

3 NSRTD

The NSRT diagram (NSRTD) is to characterize the 256 ECA rules to determine the presence of fixed points as well as multi-length cycles in a PBCA. The following terminologies are essential for describing the NSRTD [12].

If T\(_i^t\) is the RMT of \(i^{th}\)-cell rule based on which the cell i changes its state at \(t^{th}\) time step, then the next cell RMTs (NCRs) of T\(_i^t\) are the RMTs T\(_{i+1}^t\) = (2\(\times \)T\(_i^t\) mod 8) and ((2\(\times \)T\(_i^t\)+1) mod 8) of (i+1)\(^{th}\)-cell rule based on which the (i+1)\(^{th}\)-cell can change its state at \(t^{th}\) time step. For example, if RMT of R\(_i\) is T(1), then its NCRs are T(2) (=2\(\times \)T(1) mod 8) and T(3) (=(2\(\times \)T(1)+1) mod 8). The NCRs of all the 8 RMTs are shown in Table 2.

If T\(_i^t\) (respectively T\(_i^{t+1}\)) be the RMT of \(i^{th}\)-cell rule R\(_i\) based on which cell i changes its state at time t (respectively at time t+1), then T\(_i^{t+1}\) is the Next State RMT (NSR) of T\(_i^t\) for cell i. The sequence of NSRs based on which the \(i^{th}\)-cell changes its state during the state transitions of the CA is called Next State RMT Sequence (NSRS). That is, an NSRS for the \(i^{th}\)-cell (denoted as NSRS\(_i\)) is T\(_i^0\), T\(_i^1\), ..., T\(_i^t\), T\(_i^{t+1}\), ..., where T\(_i^{t+1}\) is the NSR of T\(_i^{t}\).

For the \(i^{th}\)-cell rule R\(_i\) of a CA, the all possible NSRSs can be represented by a directed graph G(V,E), called NSRS graph (NSRS-G), where all the T\(_i^t\)s \(\in \) V and \(e_i\)(T\(_i^t\), T\(_i^{t+1}\)\(\in \) E iff T\(_i^{t+1}\) is the NSR of T\(_i^t\).

The NCR, NSR, NSRS and NSRS-G of a CA enable construction of the set of directed graphs, called NSRTD, as 2-dimensional arrangement of nodes. Each node is an RMT and each graph in NSRTD represents an attractor of the CA. The edge (T\(_i^t\), T\(_i^{t+1}\)) \(\in \) E, such that T\(_i^{t+1}\) is the NSR of T\(_i^t\) and also the edge (T\(_i^t\), T\(_{i+1}^t\)) \(\in \) E, such that T\(_{i+1}^t\) is the NCR of T\(_i^t\). Further, the nodes T\(_i^t\) (\(\forall _t\)) form an NSRS for \(i^{th}\)-cell.

The two NSRSs defined for \(i^{th}\) and (i+1)\(^{th}\) cell (NSRS\(_i\) and NSRS\(_{i+1}\)) are called compatible if \(j^{th}\) NSR of these two are related in the sense that \(j^{th}\) NSR of NSRS\(_{i+1}\) is the NCR (Table 2) of \(j^{th}\) NSR of NSRS\(_i\).

Table 2. Relationship between T\(_i\) and T\(_{i+1}\) (NCR)

Figure 3 describes the computation of NSR of a cell of the uniform PBCA with rule 116. If the present RMT for \(i^{th}\) cell, based on which the cell changes its state, is xyz and l and r be the PSs of cell(\(i-2\)) and cell(\(i+2\)) respectively, then the NSR of cell i can be \(d_l\) \(d\) \(d_r\), where RMT xyz of \(R_i\) (here 116) T\(_i^{t}\)(xyz) is d and \(d_l\) = RMT lxy of \(R_{i-1}\) (here also 116) and \(d_r\) = RMT yzr of \(R_{i+1}\) (here is 116) - that is, T\(_{i-1}^{t}\)(lxy) = \(d_l\) and T\(_{i+1}^t\) (yzr) = \(d_r\). Now, if xyz = 000, then \(d_l\) = T\(_{i-1}^t\)(l00), where l can be either 0 or 1. That is, \(d_l\) = T\(_{i-1}^t\)(l00) = T\(_{i-1}^t\)(000) or T\(_{i-1}^t\)(100). The T(0) and T(4) of rule 116 are 0 and 1 respectively (Fig. 3(a)). Therefore, \(d_l\) = 0 or 1. On the other hand, \(d_r\) = T\(_{i-1}^t\)(yzr) = T\(_{i-1}^t\)(00r). That is, \(d_r\) = T\(_{i+1}^t\)(000) or T\(_{i+1}^t\) (001) = ‘0’ (Fig. 3(a)). Therefore, the NSR of RMT 000 (T(0)) is 0 or 4. The NSRS-G of rule 116 -that is, of a uniform PBCA with rule 116, is shown in Fig. 4(a).

The cycles in the NSRS-G are \(0\,\rightarrow \,0\), \(1\,\rightarrow \,1\), \(5\,\rightarrow \,6\,\rightarrow \,3\,\rightarrow \,5\), \(4\,\rightarrow \,6\,\rightarrow \,3 \,\rightarrow \,4\), \(0\,\rightarrow \,4\,\rightarrow \,6\,\rightarrow \,3\,\rightarrow \,1 \,\rightarrow \,0\), etc. Figure 4(b) shows the NSRTD of the uniform PBCA. It can be observed (in Fig. 4(bi)) that the NCR of cell i for T(5) is T(3). Now, the NSR of cell i in the NSRS (\(5\,\rightarrow \,6\,\rightarrow \,3\,\rightarrow \,5\)) is T(6). On the other hand, the NSR of T(3) at cell i+1 (also assuming the NSRS \(5\,\rightarrow \,6\,\rightarrow \,3\,\rightarrow \,5\)) is T(5) which is also the valid NCR of T(6) at cell i. Similarly, it can be shown that if cell i follows NSRS \(5\,\rightarrow \,6\,\rightarrow \,3\,\rightarrow \,5\) during its evolution, the cell i+1 follows NSRS \(3\,\rightarrow \,5\,\rightarrow \,6\,\rightarrow \,3\). It can be noted from Fig. 4(bi) that all the cells of the PBCA of length 3n (n = 1, 2, 3, ...) can follow the NSRS of length 3 (\(5\,\rightarrow \,6\,\rightarrow \,3\,\rightarrow \,5\), \(3\,\rightarrow \,5\,\rightarrow \,6\,\rightarrow \,3\)) during evolution. It points to the fact that the PBCA with rule 116 forms a multi-length cycle attractor of length 3. On the other hand, the graph of Fig. 4(bii) corresponds to a fixed point attractor.

Fig. 3.
figure 3

Computation of NSRs for a uniform PBCA with rule 116

Fig. 4.
figure 4

NSRTD of uniform PBCA with rule 116

The following properties [5] of NSRS-G and NSRTD guide the identification of CA rule (\(\mathcal {R}\)) that forms fixed point attractor PBCA.

Property 1

If there is no multi-length cycle in NSRS-G of rule R, then the uniform CA configured with rule R cannot have a multi-length cycle attractor.

Property 2

If there is no multi-length cycle in the NSRTD of a uniform PBCA, then the CA cannot have a multi-length cycle attractor in its state transitions.

Figure 5(a) shows the NSRS-G for rule 253. The self loops in the NSRS-G are \(3\,\rightarrow \,3\) and \(7\,\rightarrow \,7\). The NSRTD of the 4-cell uniform PBCA with rule 253 is shown in Fig. 5(b). It denotes 253 is an SACA rule. The NSRS-G of rule 116 in Fig. 4(a) points to the existence of multi-length cycles (for example, \(3\,\rightarrow \,6\,\rightarrow \,5\) \(\rightarrow \) 3, \(4\,\rightarrow \,6\,\rightarrow \,3\) \(\rightarrow \) 4, etc.). The NSRTD (Graph G\(_1\) of Fig. 4) denotes the multi-length cycle in uniform PBCA with rule 116. Following algorithm (Algorithm 1) checks whether an n-cell uniform PBCA with rule R is free from multi-length cycle.

Algorithm 1

COUNT_CYCLES_IN_PBCA (Rule R, length of CA (n), NCRs)

Input: Rule R, length of CA (n), NCRs for RMTs T(0), T(1), T(2), ..., T(7) forming the sets NCR0, NCR1, ..., NCR7

Output: Decision on multi-length cycles and number of fixed point attractors

  1. 1.

    Find NSRSs for cell i for rule R

  2. 2.

    Construct NSRS-G

  3. 3.

    (a) Find self loops SL = {SL\(_j\) | where j = 1, 2, ..., k, k is the number of self loops in NSRS-G} and multi-length cycles ML = {ML\(_r\), where r = 1, 2, ..., p, p is the number of multi-length cycles in NSRS-G};

    (b) LP = SL, ML

  4. 4.

    If the NSRS-G has only self-loops -that is, ML = \(\emptyset \), then

    • /*There is no multi-length cycle attractor*/

    • Call FIND_SEQUENCES_NSRTD_IN_SL(R, n, NCRs, SL)

    else Call FIND_SEQUENCES_NSRTD_IN_GN(R, n, NCRs, LP)

Algorithm 2

FIND_SEQUENCES_IN_NSRTD_SL (Rule R, n, NCRs, SL)

Input: Rule R, CA length n, NCRs and SL

Output: Number of fixed point attractors (SLA)

  1. 1.

    Find all unique sequences of RMTs (nodes) P\(_u\) of length n, where

    P\(_u\) = P\(_{1u}\) \(\rightarrow \) P\(_{2u}\) \(\rightarrow \) P\(_{3u}\) ... P\(_{(n-2)u}\) \(\rightarrow \) P\(_{(n-1)u}\) \(\rightarrow \) P\(_{nu}\),

    such that P\(_{iu}\) \(\in \) SL \(\forall _i\) and P\(_{iu}\) is NCR of P\(_{(i-1)u}\) \(\forall _{i\ne 1}\); P\(_{1u}\) is NCR of P\(_{nu}\);

  2. 2.

    SLA = number of P\(_u\)s (each of n-length);

  3. 3.

    return SLA

Algorithm 3

FIND_SEQUENCES_NSRTD_IN_GN (Rule R, n, NCRs, LP)

Input: Rule R, CA length n, NCRs and LP

Output: Number of fixed point attractors (SLA) if there is no multi-length cycle

  1. 1.

    Find compatibility class C among elements LP\(_{1}\), LP\(_{2}\), ...of LP, where

    C = {C\(_{j}\) | C\(_{j}\) is compatible pair (LP\(_{k}\), LP\(_{l}\)); LP\(_{k}\) and LP\(_{l}\) belong to L };

    /*(LP\(_{k}\), LP\(_{l}\)) is a compatible pair iff

    1. i)

      LP\(_{lq}\) \(\in \) LP\(_{l}\) is the NCR of LP\(_{kr}\) \(\in \) LP\(_{k}\), and

    2. ii)

      NSR(LP\(_{lq}\)) is NCR(NSR(LP\(_{kr}\))), \(\forall _q\)*/

  2. 2.

    Find all sequences of RMTs (nodes) P\(_u\) of length n, where

    P\(_u\) = P\(_{1u}\) \(\rightarrow \) P\(_{2u}\) \(\rightarrow \) P\(_{3u}\) \(\rightarrow \) P\(_{4u}\) ... P\(_{(n-2)u}\) \(\rightarrow \) P\(_{(n-1)u}\) \(\rightarrow \) P\(_{nu}\)

    such that

    1. a)

      for m=1 to n-1 {

      P\(_{(m+1)u}\) is an NCR of P\(_{mu}\), where P\(_{mu}\) \(\in \) LP\(_{o}\), P\(_{(m+1)u}\) \(\in \) LP\(_{p}\) for some o and p, and (LP\(_{o}\), LP\(_{p}\)\(\in \) C;

      PLP\(_m\) = LP\(_{0}\);

      LP\(_{0}\) = LP\(_{p}\); }

    2. b)

      P\(_{1u}\) is an NCR of P\(_{nu}\) and (PLP\(_n\), PLP\(_1\)\(\in \) C;

      /*PLP\(_1\) and PLP\(_n\) are resulted from (a)*/

  3. 3.

    LPA\(_u\) = PLP\(_1\), PLP\(_2\), PLP\(_3\), ... PLP\(_n\) selected in step 2;

  4. 4.

    Number of attractors = number of P\(_u\)s (n-length)

    /*The length of an attractor is the maximum of cycle lengths of PLP\(_{h}\) \(\in \) LPA\(_u\) for a P\(_u\);

  5. 5.

    if there exists an PLP\(_{h}\) \(\in \) LPA\(_u\) without self-loop for a P\(_{u}\), then

    /*that is, having multi-length cycle in the CA*/

    Exit (return 0); else {

    SLA = number of P\(_u\)s; return SLA }

Example 1

Let us consider uniform PBCA with rule 116. Here, the NSRSs are

0\(\,\rightarrow \,\)0; 1\(\,\rightarrow \,\)1; 1\(\,\rightarrow \,\)1\(\,\rightarrow \,\)0\(\,\rightarrow \,\); 2\(\,\rightarrow \,\)7\(\,\rightarrow \,\)0\(\,\rightarrow \,\)0; 2\(\,\rightarrow \,\)7\(\,\rightarrow \,\)1\(\,\rightarrow \,\)1; 4\(\,\rightarrow \,\)6\(\,\rightarrow \,\)3\(\,\rightarrow \,\)4;...

Its NSRS-G is shown in Fig. 4(a). The SL = 0\(\,\rightarrow \,\)0, 1\(\,\rightarrow \,\)1; and ML = 5\(\,\rightarrow \,\)6\(\,\rightarrow \,\)3\(\,\rightarrow \,\)5, 0\(\,\rightarrow \,\)4 \(\,\rightarrow \,\)3\(\,\rightarrow \,\)0, ... (step 3(a) of Algorithm 1). That is, LP = 0\(\,\rightarrow \,\)0, 1\(\,\rightarrow \,\)1, 5\(\,\rightarrow \,\)6\(\,\rightarrow \,\)3\(\,\rightarrow \,\)5, 0\(\,\rightarrow \,\)4 \(\,\rightarrow \,\)3\(\,\rightarrow \,\)0, ... (step 3(b)). As there is multi-length cycle in LP (ML\(\ne \) \(\emptyset \)), Algorithm 3 is called (step 4 of Algorithm 1).

As per step 1 of Algorithm 3, from the LP, the compatible pairs are ((0), (0)); ((0), (1)); ((5, 6, 3, 5), (3, 5, 6, 3)) and ((3, 5, 6, 3), (5, 6, 3, 5)). The NSRTD for the CA is shown in Fig. 4(b).

As per step 2 of Algorithm 3, the sequences of RMTs identified are

P\(_1\) = 0\(\,\rightarrow \,\)0\(\,\rightarrow \,\)0\(\,\rightarrow \,\)0 ... that corresponds to graph G1 of Fig. 4(bi), and

P\(_2\) = 5\(\,\rightarrow \,\)3\(\,\rightarrow \,\)6\(\,\rightarrow \,\)5 ... that corresponds to graph G2 of Fig. 4(bii).

Here, for P\(_1\), the PLP\(_1\) = PLP\(_2\) = ... PLP\(_n\) = 0\(\,\rightarrow \,\)0.

For P\(_2\), the PLP\(_1\) = 5\(\,\rightarrow \,\)6\(\,\rightarrow \,\)3\(\,\rightarrow \,\)5, PLP\(_2\) = 3\(\,\rightarrow \,\)5\(\,\rightarrow \,\)6\(\,\rightarrow \,\)3, PLP\(_3\) = 6\(\,\rightarrow \,\)3\(\,\rightarrow \,\)5\(\,\rightarrow \,\)6, PLP\(_4\) = 5\(\,\rightarrow \,\)6\(\,\rightarrow \,\)3\(\,\rightarrow \,\)5, ...

Now, the LPA\(_1\) = (0\(\,\rightarrow \,\)0), (0\(\,\rightarrow \,\)0), (0\(\,\rightarrow \,\)0) ...;

and

LPA\(_2\) = (5\(\,\rightarrow \,\)6\(\,\rightarrow \,\)3\(\,\rightarrow \,\)5), (3\(\,\rightarrow \,\)5\(\,\rightarrow \,\)6\(\,\rightarrow \,\)3), (6\(\,\rightarrow \,\)3 \(\,\rightarrow \,\)5\(\,\rightarrow \,\)6), ... (step 3).

As per step 4, the number of attractors in such a CA is 2. The cycles (PLP\(_{h}\)) in LPA\(_2\) are multi-length, therefore, Algorithm 3 exits (step 5).

Fig. 5.
figure 5

NSRS-G and NSRTD for rule 253

The step 1 of Algorithm 1 finds NSRs and it requires constant time. In an NSRS, the maximum number of nodes are 8 and the maximum out-degree of a node is 4. Therefore, construction of NSRS-G (step 2) also requires constant time. Now, the step 3 finds all possible Euler cycles from a graph of maximum 8 nodes, with maximum out-degree 4. The number of such cycles are of course finite and is independent of n (length of CA). Finding of all possible self-loops from the set of cycles is also independent of n (step 4).

Algorithm 2, finds all possible n-length sequence of RMTs following the condition mentioned in step 1. Extraction of each sequence is of O(n) complexity. The total number of such sequences (number of graphs in NSRTD) depends on the rule. There can be 2\(^n\)-number of n-length sequences (corresponding to 2\(^n\)-number of fixed point attractors) in worst case. Hence, worst case running time of this algorithm is exponential. However, for most of the rules, the number of such sequences are \({<}{<}\)2\(^n\). The step 2 of Algorithm 2 counts the number of such sequences p in O(p) time.

In step 1 of Algorithm 3, the time required to compute compatible classes depends on the maximum number of cycles in LP, and hence, it is independent of n. For a rule R, finding compatible classes is the one time cost. It is stored in a dictionary where against each rule there is the set C of compatible classes; and it is input to Algorithm 3. Extraction of sequences in step 2 has the same time complexity as that of step 1 of Algorithm 2. The steps 3, 4, and 5 count the number of cycles/sequences and have the same time complexity as that of step 2 of Algorithm 2.

4 SACA Rules

This section reports identification of SACA rules for PBCA out of the 256 ECA rules. The following properties are to reduce the search space.

Property 3

[9]. A rule R contributes to the formation of single length cycle attractor(s) if at least one of the RMTs T(0), T(1), T(4) or T(5) belongs to T/0 (that is, passive), or the RMT T(2), T(3), T(6) or T(7) belongs to T/1 (passive).

Based on this property, the 256 rules are classified in 9 groups (group 0–8) in [9]. The rule 207 (11001111) is in group 6 as it follows Property 3 for 6 RMTs (T(7), T(6), T(5), T(4), T(3), and T(2)).

Observation 1

In PBCA, an SACA rule must be unbalanced.

Observation 2

An SACA rule belongs to either group 4 or group 5.

The above properties reduce the number of candidate SACA rules to 89 [6].

Theorem 1

In uniform periodic boundary SACA, there can be either all 0s fixed point attractor or all 1s fixed point attractor [6].

Theorem 1 states that the even rules in between 128 and 254, and odd rules in between 1 and 127 cannot be the SACA rule. This reduces the number of candidate SACA rules from 89 to 52. The NSRTD for such 52 rules are constructed following Algorithm 4 and it identifies 6 SACA rules (Table 3) for \(n\ge \) 3.

Table 3. SACA rules for PBCA

Algorithm 4

FIND_SACA_RULE_IN_PBCA (Rule R, NCRs)

Input: Rule R, NCRs for RMTs T(0), T(1), T(2), ..., T(7) forming the sets NCR0, NCR1, ..., NCR7

Output: Decision on SACA rule

  1. 1.

    Find NSRSs of a cell for rule R

  2. 2.

    Construct NSRS-G

  3. 3.

    (a) Find self loops SL = {SL\(_j\) | where j = 1, 2, ..., k, k is the number of self loops in NSRS-G} and multi-length cycles ML = {ML\(_r\), where r = 1, 2, ..., p, p is the number of multi-length cycles in NSRS-G};

    (b) LP = SL, ML

  4. 4.

    If ML = \(\emptyset \), then

    /*There is no multi-length cycle attractor*/ {

  5. 5.

    Find all unique sequences of RMTs (nodes) P\(_u\) of length n, where

    P\(_u\) = P\(_{1u}\) \(\rightarrow \) P\(_{2u}\) \(\rightarrow \) P\(_{3u}\) ... P\(_{(n-2)u}\) \(\rightarrow \) P\(_{(n-1)u}\) \(\rightarrow \) P\(_{nu}\),

    such that P\(_{iu}\) \(\in \) SL \(\forall _i\) and P\(_{iu}\) is NCR of P\(_{(i-1)u}\) \(\forall _{i\ne 1}\); P\(_{1u}\) is NCR of P\(_{nu}\);

  6. 6.

    SLA = number of P\(_u\)s;

  7. 7.

    if SLA = 1, then rule R is an SACA rule

    else Exit (return 0) } else {

  8. 8.

    Find compatibility class C among elements LP\(_{1}\), LP\(_{2}\), ...of LP, where

    C = {C\(_{j}\) | C\(_{j}\) is compatible pair (LP\(_{k}\), LP\(_{l}\)); LP\(_{k}\) and LP\(_{l}\) belong to L };

    /*(LP\(_{k}\), LP\(_{l}\)) is a compatible pair iff

    1. i)

      LP\(_{lq}\) \(\in \) LP\(_{l}\) is the NCR of LP\(_{kr}\) \(\in \) LP\(_{k}\), and

    2. ii)

      NSR(LP\(_{lq}\)) is NCR(NSR(LP\(_{kr}\))), \(\forall _q\)*/

  9. 9.

    Find all sequences of RMTs (nodes) P\(_u\) of length n, where

    P\(_u\) = P\(_{1u}\) \(\rightarrow \) P\(_{2u}\) \(\rightarrow \) P\(_{3u}\) \(\rightarrow \) P\(_{4u}\) ... P\(_{(n-2)u}\) \(\rightarrow \) P\(_{(n-1)u}\) \(\rightarrow \) P\(_{nu}\) such that

    1. a)

      for m=1 to n-1 {

      P\(_{(m+1)u}\) is an NCR of P\(_{mu}\), where P\(_{mu}\) \(\in \) LP\(_{o}\), P\(_{(m+1)u}\) \(\in \) LP\(_{p}\) for some o and p, and (LP\(_{o}\), LP\(_{p}\)\(\in \) C;

      PLP\(_m\) = LP\(_{0}\); LP\(_{0}\) = LP\(_{p}\); }

    2. b)

      P\(_{1u}\) is an NCR of P\(_{nu}\) and (PLP\(_n\), PLP\(_1\)\(\in \) C;

      /*PLP\(_1\) and PLP\(_n\) are resulted from (a)*/

  10. 10.

    LPA\(_u\) = PLP\(_1\), PLP\(_2\), PLP\(_3\), ... PLP\(_n\) selected in step 2;

  11. 11.

    Number of attractors = number of P\(_u\)s (n-length)

    /*The length of an attractor is the maximum of cycle lengths of PLP\(_{h}\) \(\in \) LPA\(_u\) for a P\(_u\);

  12. 12.

    if there exists an PLP\(_{h}\) \(\in \) LPA\(_u\) without self-loop for a P\(_{u}\), then

    /*that is, having multi-length cycle in the CA*/

    Exit (return 0); else { SLA = number of P\(_u\)s;

  13. 13.

    if SLA = 1, then rule R is an SACA rule else Exit (return 0) }

5 Conclusion

The property of fixed point attractor CA, is explored in this work. A special class of irreversible CA, called SACA, has been introduced. The tool referred to as the NSRTD provides the analytical foundations to synthesize fixed point attractor CA having a single attractor (SACA).