Keywords

1 Introduction

Cellular Automata (CA) have long been of interest to researchers for their theoretical properties and practical applications. It was initiated in the early 1950’s by John von Neumann [12] and Stan Ulam as a general framework for modeling complex structures capable of self-reproduction and self-repair. In 1986, Wolfram first applied CA in pseudorandom number generation [15]. CA has made understanding of many occurrences in nature easier. The simple and regular structure of CA has attracted researchers and practitioners of different fields. In the last two decades, one-dimensional (1-D) CA based Pseudorandom Number Generators (PRNGs) have been extensively studied [2, 5, 10, 11]. Though the recent interest is more focused on two-dimensional (2-D) CA PRNGs [9, 13] since it seems that their randomness is much better than that of 1- D CA PRNGs, but considering the design complexity and computation efficiency, it is quite difficult to conclude which one is better. Compared to 2-D CA PRNGs, 1-D CA PRNGs are easier to be implemented in a large scale [3, 8, 14]. Random bit generators play an important role in different computer simulation methods such as Monte Carlo techniques, Browmian dynamics, stochastic optimization, computer-based gaming, test pattern generation for VSLI circuit test, error-correcting codes, image processing, neural networks and cryptography etc. Most of these works are devoted to the study of cellular automata as pseudorandom bit generators. A central problem in any stream cipher scheme is to generate long, unpredictable random key sequences and Cellular Automata resolves this problem.

In most of all these applications, 1-D elementary cellular automata (i.e. three-neighborhood CA) are used. There are also some applications [6, 9, 13] of five or more neighborhood 2-D CA but that need more hardware complexity. In [7], it has been shown a 4-neighborhood nonlinear 1-D CA as a better cryptographic primitive. The randomness and diffusion properties of the CA can be developed with the increase of the size of neighborhood radius of the CA cell. More diffusion property of CA can make fast initialization of a stream cipher. In this paper, we study 5-neighborhood linear 1-D CA for providing very good pseudorandom sequences and high diffusion. We present an algorithm for synthesizing the CA.

This paper is organized as follows. Following the introduction, the basics of CA are presented in Sect. 2. In Sect. 3, we present 5-neighborhood Linear Hybrid Cellular Automata with the CA transition matrix and the characteristic polynomial. A recurrence relation is introduced for determining the characteristic polynomial and a CA synthesis algorithm is presented. We also present the randomness and diffusion properties of 5-neighborhood CA rule vectors and the comparison of their properties with 3/4 neighborhood CA. Finally, the paper is concluded in Sect. 4.

2 Basics of Linear Cellular Automata

Cellular Automata are studied as mathematical model for self organizing statistical systems [12]. CA can be one-dimensional or multi-dimensional. One-dimensional CA random number generators have been extensively studied in the past [4, 11, 15]. In one-dimensional CA, they can be considered as an array of cells where each cell is a one bit memory element. The neighbor set N(i) is defined as the set of cells on which the state transition function of the i-th cell is dependent on each iteration. In three-neighborhood CA, each cell evolves in every time step based on some combinatorial logic on the cell itself and its two nearest neighbors. More formally, for a three-neighborhood CA, the neighbor set of i-th cell is defined as \(N(i) = \{s_{i-1}, s_i, s_{i+1}\}\). The state transition function of is i-th cell of 3-neighborhood CA is as follows:

$$\begin{aligned} s_i^{t + 1} = f_i(s_{i-1}^{t}, s_i^{t}, s_{i+1}^{t}) \end{aligned}$$

where, \(s_i^{t}\) denotes the current state of the i-th cell at time step t and \(s_i^{t+1}\) denotes the next state of the i-th cell at time step t+1 and \(f_i\) denotes some combinatorial logic for i-th cell. The set of all feedback functions is considered as ruleset for the CA. Since, a three-neighborhood CA having two states (0 or 1) in each cell, can have \(2^3 = 8\) possible binary states, there are total \(2^{2^3} = 256\) possible boolean functions, called rules. Each rule can be represented as an decimal integer from 0 to 255. If the combinatorial logic for the rules have only Boolean XOR operation, then it is called linear or additive rule. Some of the three-neighborhood additive CA rules are 0, 60, 90, 102, 150 etc. Moreover, if the combinatorial logic contains AND/OR operations, then it is called non-linear rule. An n cell CA with cells \(\{s_1, s_2,\cdots , s_n\}\) is called null boundary CA if \(s_{n+1} = 0\) and \(s_0 = 0\). Similarly for a periodic boundary CA \(s_{n+1} = s_1\). A CA is called uniform, if all its cells follow the same rule. Otherwise, it is called non-uniform or hybrid CA. If all the ruleset of a hybrid CA are linear, then we call the CA a linear one. However, out of all possible Boolean functions, called rules, only two are of prime interest i.e. Rule 90 and 150 (ascertained from the decimal value of their position in the truth table). The state of the i-th cell at time instant t can be expressed as:

$$\begin{aligned} s_i^{t+1}= s_{i- 1}^{t} \oplus d_i. s_i^{t} \oplus s_{i+1}^{t}, d_i=\left\{ \begin{array}{ll} 0, &{} \text{ if } d_i \rightarrow \text{ Rule } \; 90\\ 1, &{} \text{ if } d_i \rightarrow \text{ Rule } \; 150 \end{array}\right. \end{aligned}$$

Thus, an LHCA can be completely specified by a combination of Rule 90 and 150, denoted as an n-tuple \( [d_1, d_2,\cdots , d_n] \). An example of a 5-cell CA \(\mathcal {L}\) can be found in Fig. 1, specified by the rule vector [1, 1, 1, 1, 0]. Further details of CA can be found in [4].

Fig. 1.
figure 1

3-neighborhood null boundary LHCA \(\mathcal {L}\) with rule vector [1, 1, 1, 1, 0]

3 5-Neighborhood Linear Cellular Automata

In the previous section, we have studied 1D elementary CA (i.e. 3-neighborhood CA) [4, 11]. In this section, we consider a 5-neighborhood null boundary n-cell Linear Hybrid CA (LHCA) denoted by \(\{s_1, s_2, \cdots , s_n\}\), where the state of a cell at a given instant is updated based upon its five neighboring cells including itself and because of null boundary \(s_{-1}=s_0=0\), \(s_{n+1}=s_{n+2}=0\). More formally, for a five-neighborhood CA, the neighbor set of i-th cell is defined as \(N(i) = \{s_{i-2}, s_{i-1}, s_i, s_{i+1},s_{i+2}\}\). The state transition function of is i-th cell of 5-neighborhood CA is as follows:

$$\begin{aligned} s_i^{t + 1} = f_i(s_{i-2}^t,s_{i-1}^{t}, s_i^{t}, s_{i+1}^{t},s_{i+2}^t) \end{aligned}$$

where, \(s_i^{t}\) denotes the current state of the i-th cell at time step t and \(s_i^{t+1}\) denotes the next state of the i-th cell at time step t+1 and \(f_i\) denotes some combinatorial logic for i-th cell. Since, a 5-neighborhood CA having two states (0 or 1) in each cell, can have \(2^5 = 32\) possible binary states, there are total \(2^{2^5} = 2^{32}\) possible boolean functions. Out of all possible Boolean functions, called rules, there are total \(2^5 = 32\) possible linear rules. Based on neighborhood radius exactly 5, there are only \(2^3 = 8\) liner rules shown in Table 1.

Table 1. Linear rules of 5-neighborhood LHCA
Table 2. Counting rule vectors of max. period 5-bit 5-neighborhood CA

For all possible pair of these 8 linear rules, maximum period 5-neighborhood CA rule vectors can be obtained. Table 2 shows the number of rule vectors obtained for maximum period 5-bit 5-neighborhood CA against each pair of the linear rules shown in Table 1. From Table 2, we see that only the pair of rule combinations, (\(Rule_5\), \(Rule_7\)), provides largest number of rule vectors (i.e. 8). Therefore, we consider these two linear rules (i.e. \(Rule_5\), \(Rule_7\)), denoted as \(R_0\) and \(R_1\), respectively, to design 5-neighborhood LHCA. These two linear rules can again be specified as follows:

$$\begin{aligned} R_0: s_i^{t+1}= & {} s_{i- 2}^{t} \oplus s_{i- 1}^{t} \oplus s_{i+1}^{t}\oplus s_{i+2}^{t}\\[3pt] R_1: s_i^{t+1}= & {} s_{i- 2}^{t} \oplus s_{i- 1}^{t} \oplus s_i^{t} \oplus s_{i+1}^{t}\oplus s_{i+2}^{t} \end{aligned}$$

where, \(s_i^t\) is the current state and \(s_i^{t+1} \) is the next state of the i-th cell of the CA. Thus, the state transition function of i-th cell of the CA can be expressed as:

$$\begin{aligned} s_i^{t+1}= s_{i- 2}^{t} \oplus s_{i- 1}^{t} \oplus d_i. s_i^{t} \oplus s_{i+1}^{t}\oplus s_{i+2}^{t},\; d_i= {\left\{ \begin{array}{ll} 0, &{} \text{ if } i^{th} \text{ cell } \text{ follows } \text{ rule } R_0\\ 1, &{} \text{ if } i^{th} \text{ cell } \text{ follows } \text{ rule } R_1 \end{array}\right. } \end{aligned}$$

Thus, a five-neighborhood n-cell LHCA \(\mathcal {L}\) denoted by \(\{s_1, s_2, \cdots , s_n\}\), can be completely specified by a combination of these two rules \(R_0\) and \(R_1\), denoted as an n-tuple \( [d_1, d_2,\cdots , d_{n}]\), called the rule vector of the CA. An example of a 5-cell null boundary 5-neighborhood CA can be found in Fig. 2, specified by the rule vector [1, 1, 1, 0, 0].

Fig. 2.
figure 2

5-neighborhood null boundary LHCA \(\mathcal {L}\) with rule vector [1, 1, 1, 0, 0]

A five-neighborhood n-cell LHCA \(\mathcal {L}\) can be characterised by an \(n\times n\) matrix, called characteristic matrix. The characteristic matrix A for the n-cell CA rule vector \( [d_1, d_2,\cdots , d_{n}]\) is as follows:

$$A=\left[ \begin{array}{ccccccccccc} d_1&{} 1 &{}1 &{}0 &{}0&{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}0 &{}0 \\ 1 &{}d_2&{} 1 &{}1&{}0&{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{} 0\\ 1 &{}1&{} d_3 &{}1&{}1&{}\cdots &{} \cdots &{}\cdots &{}\cdots &{}\cdots &{} \vdots \\ 0&{} 1&{} 1&{} d_4&{} 1&{}\cdots &{}\cdots &{} \cdots &{}\cdots &{}\cdots &{} \vdots \\ \vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{} \vdots &{}\vdots &{}\vdots &{}\vdots \\ \vdots &{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}\cdots &{}1&{} d_{n-3}&{} 1 &{}1 &{}0\\ \vdots &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}1&{}1 &{}d_{n-2} &{}1 &{}1\\ 0 &{}\cdots &{}\cdots &{} \cdots &{}\cdots &{}\cdots &{}0&{} 1&{} 1 &{}d_{n-1}&{} 1\\ 0 &{}0&{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}0 &{}0&{} 1 &{}1&{} d_n \end{array} \right] $$

The state of a CA at time step t is an n-tuple formed from the states of the individual cells. The CA state is expressed in matrix form as follows

$$\begin{aligned} S^{t}=[s_1^{t},\cdots ,s_n^{t}] \end{aligned}$$

The next state of the CA is denoted as

$$\begin{aligned} S^{t+1}=[s_1^{t+1},\cdots ,s_n^{t+1}] \end{aligned}$$

The next-state of the CA, \(S^{t+1}\), is computed as

$$\begin{aligned} (S^{t+1})^T= & {} A\cdot (S^{t})^T\\ \text {or,}\qquad S^{t+1}= & {} ( (S^{t+1})^T)^T \end{aligned}$$

where, A is the CA transition matrix and \((S^{t})^T=[s_1^{t},\cdots ,s_n^{t}]^T\) (the superscript T represents the transpose of the vector) and the product is a matrix-vector multiplication over GF(2). It has been shown that \(A\cdot (S^{t})^T\) is indeed the next state of the CA. Therefore, the next state of the \(i^{th}\) cell is computed as the product of the \(i^{th}\) row of A and \((S^{t})^T\) as follows:

$$\begin{aligned} s_i^{t+1}= & {} [0,\cdots ,0,1,1,d_i,1,1,0,\cdots ,0]\\&\cdot [s_1^{t},\cdots ,s_{i-2}^{t},s_{i-1}^{t},s_i^{t},s_{i+1}^{t},s_{i+2}^{t}\cdots ,s_n^{t}]^T\\[3pt]= & {} s_{i-2}^{t}+s_{i-1}^{t}+d_i\cdot s_i^{t}+s_{i+1}^{t}+s_{i+2}^{t}\end{aligned}$$

The characteristic polynomial \(\varDelta _n\) of the n-cell CA is defined by

$$\begin{aligned} \varDelta _n=|x\mathcal {I}-A| \end{aligned}$$

where, x is an indeterminate, \(\mathcal {I}\) is the identity matrix of order n, and A is the CA transition matrix. The matrix \(x\mathcal {I}-A\) is called the characteristic matrix of the CA. The characteristic polynomial is a degree n polynomial in x.

The following example clearly illustrates how the characteristic polynomial of a 5-neighborhood linear CA can be computed using the characteristic matrix of the CA.

Example 1: Let us consider a 5-cell null boundary 5-neighborhood linear CA with the rule vector [1, 1, 1, 0, 0]. We have \([d_1, d_2, d_3, d_4, d_5]=[1, 1, 1, 0, 0]\). The transition matrix A is as follows:

$$ A=\left[ \begin{array}{ccccc} d_1&{}1&{}1&{}0&{}0\\ 1&{}d_2&{}1&{}1&{}0\\ 1&{}1&{}d_3&{}1&{}1\\ 0&{}1&{}1&{}d_4&{}1\\ 0&{}0&{}1&{}1&{}d_5\\ \end{array} \right] =\left[ \begin{array}{ccccc} 1&{}\quad 1&{}\quad 1&{}\quad 0&{}\quad 0\\ 1&{}\quad 1&{}\quad 1&{}\quad 1&{}\quad 0\\ 1&{}\quad 1&{}\quad 1&{}\quad 1&{}\quad 1\\ 0&{}\quad 1&{}\quad 1&{}\quad 0&{}\quad 1\\ 0&{}\quad 0&{}\quad 1&{}\quad 1&{}\quad 0\\ \end{array} \right] $$

The corresponding characteristic matrix is as follows:

$$x\mathcal {I}-A=\left[ \begin{array}{ccccc} x+d_1&{}1&{}1&{}0&{}0\\ 1&{}x+d_2&{}1&{}1&{}0\\ 1&{}1&{}x+d_3&{}1&{}1\\ 0&{}1&{}1&{}x+d_4&{}1\\ 0&{}0&{}1&{}1&{}x+d_5\\ \end{array} \right] =\left[ \begin{array}{ccccc} x+1&{}1&{}1&{}0&{}\quad 0\\ 1&{}x+1&{}1&{}1&{}\quad 0\\ 1&{}1&{}x+1&{}1&{}\quad 1\\ 0&{}1&{}1&{}x&{}\quad 1\\ 0&{}0&{}1&{}1&{}\quad x\\ \end{array} \right] $$

where, x is an indeterminate, \(\mathcal {I}\) is the identity matrix with dimension 5, and A is the CA transition matrix shown above. The characteristic polynomial \(\varDelta _5\) of the 5-cell CA is defined as follows:

$$\begin{aligned} \varDelta _5=|x\mathcal {I}-A| \end{aligned}$$
$$\varDelta _5=\left| \begin{array}{ccccc} x+1&{}1&{}1&{}0&{}\quad 0\\ 1&{}x+1&{}1&{}1&{}\quad 0\\ 1&{}1&{}x+1&{}1&{}\quad 1\\ 0&{}1&{}1&{}x&{}\quad 1\\ 0&{}0&{}1&{}1&{}\quad x\\ \end{array} \right| \begin{array}{c} =x^5+x^4+x^2+x+1\\ \end{array} $$

Theorem 1

Let \(\varDelta _n\) be the characteristic polynomial of a n-cell null boundary 5-neighborhood Linear CA with rule vector \( [d_1, d_2,\cdots , d_{n}]\). \(\varDelta _n\) satisfies the following recurrence relation:

$$\begin{aligned} \varDelta _{-3}= & {} 0,\quad \varDelta _{-2}=0,\quad \varDelta _{-1}=0,\quad \varDelta _0=1\nonumber \\ \varDelta _n= & {} (x+d_n)\varDelta _{n-1}+\varDelta _{n-2}+(x+d_{n-1})\varDelta _{n-3}+\varDelta _{n-4},\; n>0 \end{aligned}$$
(1)

Proof: Consider the transition matrix A for the n-cell null boundary 5-neighborhood Linear CA with rule vector \( [d_1, d_2,\cdots , d_{n}]\)

$$ A=\left[ \begin{array}{ccccccccccc} d_1&{} 1 &{}1 &{}0 &{}0&{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}0 &{}0 \\ 1 &{}d_2&{} 1 &{}1&{}0&{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{} 0\\ 1 &{}1&{} d_3 &{}1&{}1&{}\cdots &{} \cdots &{}\cdots &{}\cdots &{}\cdots &{} \vdots \\ 0&{} 1&{} 1&{} d_4&{} 1&{}\cdots &{}\cdots &{} \cdots &{}\cdots &{}\cdots &{} \vdots \\ \vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{} \vdots &{}\vdots &{}\vdots &{}\vdots \\ \vdots &{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}\cdots &{}1&{} d_{n-3}&{} 1 &{}1 &{}0\\ \vdots &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}1&{}1 &{}d_{n-2} &{}1 &{}1\\ 0 &{}\cdots &{}\cdots &{} \cdots &{}\cdots &{}\cdots &{}0&{} 1&{} 1 &{}d_{n-1}&{} 1\\ 0 &{}0&{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}0 &{}0&{} 1 &{}1&{} d_n \end{array} \right] $$

The characteristic polynomial \(\varDelta _n\) of the CA is defined by

$$\begin{aligned} \varDelta _n=|x\mathcal {I}-A| \end{aligned}$$
$$ \varDelta _n=\left| \begin{array}{ccccccccccc} x+d_1&{} 1 &{}1 &{}0 &{}0&{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}0 &{}0 \\ 1 &{}x+d_2&{} 1 &{}1&{}0&{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{} 0\\ 1 &{}1&{} x+d_3 &{}1&{}1&{}\cdots &{} \cdots &{}\cdots &{}\cdots &{} \cdots &{} \vdots \\ 0&{} 1&{} 1&{} x+d_4&{} 1&{}\cdots &{}\cdots &{} \cdots &{}\cdots &{}\cdots &{} \vdots \\ \vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{} \vdots &{}\vdots &{} \vdots &{}\vdots \\ \vdots &{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}\cdots &{}1&{} x+d_{n-3}&{} 1 &{}1 &{}0\\ \vdots &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}1&{}1 &{}x+d_{n-2} &{}1 &{}1\\ 0 &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}0&{} 1&{} 1 &{}x+d_{n-1}&{} 1\\ 0 &{}0&{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}0 &{}0&{} 1 &{}1&{} x+d_n \end{array} \right| $$

By expanding the determinant shown above with respect to the last row, we can compute \(\varDelta _n\) as follows: \(\varDelta _n=(x+d_n)*\varDelta _{n-1}+1*B+1*C\), where B and C with dimension \((n-1)\times (n-1)\) are as follows:

$$ B=\left| \begin{array}{cccccccccc} x+d_1&{} 1 &{}1 &{}0 &{}0&{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}0 \\ 1 &{}x+d_2&{} 1 &{}1&{}0&{}\cdots &{}\cdots &{}\cdots &{} \cdots &{} 0\\ 1 &{}1&{} x+d_3 &{}1&{}1&{}\cdots &{} \cdots &{}\cdots &{}\cdots &{} \vdots \\ 0&{} 1&{} 1&{} x+d_4&{} 1&{}\cdots &{}\cdots &{} \cdots &{}\cdots &{} \vdots \\ \vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{} \vdots &{}\vdots &{} \vdots \\ \vdots &{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}\cdots &{}1&{} x+d_{n-3}&{} 1 &{}0\\ \vdots &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}1&{}1 &{}x+d_{n-2} &{}1\\ 0 &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}0&{} 1&{} 1 &{} 1 \end{array} \right| $$

and

$$ C=\left| \begin{array}{cccccccccc} x+d_1&{} 1 &{}1 &{}0 &{}0&{}\cdots &{}\cdots &{}\cdots &{}0 &{}0 \\ 1 &{}x+d_2&{} 1 &{}1&{}0&{}\cdots &{}\cdots &{}\cdots &{}\cdots &{} 0\\ 1 &{}1&{} x+d_3 &{}1&{}1&{}\cdots &{} \cdots &{}\cdots &{} \cdots &{} \vdots \\ 0&{} 1&{} 1&{} x+d_4&{} 1&{}\cdots &{}\cdots &{} \cdots &{}\cdots &{} \vdots \\ \vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{} \vdots &{} \vdots &{}\vdots \\ \vdots &{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}\cdots &{}1&{} x+d_{n-3} &{}1 &{}0\\ \vdots &{}\cdots &{}&{}\cdots &{}\cdots &{} \cdots &{}1&{}1 &{}1 &{}1\\ 0 &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}0&{} 1 &{}x+d_{n-1}&{} 1 \end{array} \right| $$

By expanding the determinant B with respect to the last column, we can compute B as follows: \(B=\varDelta _{n-2}+D\), where D with dimension \((n-2)\times (n-2)\) is as follows:

$$ D=\left| \begin{array}{ccccccccc} x+d_1&{} 1 &{}1 &{}0 &{}0&{}\cdots &{}\cdots &{}\cdots &{}0 \\ 1 &{}x+d_2&{} 1 &{}1&{}0&{}\cdots &{}\cdots &{}\cdots &{}\cdots \\ 1 &{}1&{} x+d_3 &{}1&{}1&{}\cdots &{} \cdots &{}\cdots &{}\cdots \\ 0&{} 1&{} 1&{} x+d_4&{} 1&{}\cdots &{}\cdots &{} \cdots &{}\cdots \\ \vdots &{}\vdots &{}\vdots &{}\vdots &{} \vdots &{} \vdots &{}\vdots &{}\vdots &{} \vdots \\ \vdots &{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}\cdots &{}1&{} x+d_{n-3}&{} 1 \\ 0 &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}0&{} 1&{} 1 \end{array} \right| $$

By expanding the determinant C with respect to the last column, we can compute C as follows: \(C=E+F\), where E and F with dimension \((n-2)\times (n-2)\) are as follows:

$$ E=\left| \begin{array}{ccccccccc} x+d_1&{} 1 &{}1 &{}0 &{}0&{}\cdots &{}\cdots &{}\cdots &{}0 \\ 1 &{}x+d_2&{} 1 &{}1&{}0&{}\cdots &{}\cdots &{}\cdots &{}\cdots \\ 1 &{}1&{} x+d_3 &{}1&{}1&{}\cdots &{} \cdots &{}\cdots &{}\cdots \\ 0&{} 1&{} 1&{} x+d_4&{} 1&{}\cdots &{}\cdots &{} \cdots &{}\cdots \\ \vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{} \vdots &{} \vdots \\ \vdots &{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}\cdots &{}1&{} x+d_{n-3} &{}1 \\ 0 &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}1&{}1 &{}1 \end{array} \right| $$

and

$$ F=\left| \begin{array}{ccccccccc} x+d_1&{} 1 &{}1 &{}0 &{}0&{}\cdots &{}\cdots &{}\cdots &{}0 \\ 1 &{}x+d_2&{} 1 &{}1&{}0&{}\cdots &{}\cdots &{}\cdots &{}\cdots \\ 1 &{}1&{} x+d_3 &{}1&{}1&{}\cdots &{} \cdots &{}\cdots &{}\cdots \\ 0&{} 1&{} 1&{} x+d_4&{} 1&{}\cdots &{}\cdots &{} \cdots &{}\cdots \\ \vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{} \vdots &{}\vdots &{} \vdots &{} \vdots \\ \vdots &{}\cdots &{}\cdots &{}\cdots &{} \cdots &{}\cdots &{}1&{} x+d_{n-3} &{}1 \\ 0 &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}\cdots &{}0&{} 1 &{}x+d_{n-1} \end{array} \right| $$

By expanding the determinant F with respect to the last column, we can compute F as follows:

$$\begin{aligned} F=(x+d_{n-1})*\varDelta _{n-3}+\varDelta _{n-4} \end{aligned}$$

Note that the determinant E can be easily found by changing rows into columns and columns into rows of the determinant D, therefore, D and E determines the same polynomial and so, D+E determines zero in GF(2). Finally, we have

$$\begin{aligned} \varDelta _n= & {} (x+d_n)*\varDelta _{n-1}+1*B+1*C\\= & {} (x+d_n)*\varDelta _{n-1}+(\varDelta _{n-2}+D)+(E+F)\\= & {} (x+d_n)*\varDelta _{n-1}+\varDelta _{n-2}+F \\= & {} (x+d_n)*\varDelta _{n-1}+\varDelta _{n-2}+(x+d_{n-1})*\varDelta _{n-3}+\varDelta _{n-4} \end{aligned}$$

Theorem 1 provides an efficient algorithm to compute the Characteristic polynomial of a CA. Initially, \(\varDelta _{-3}\), \(\varDelta _{-2}\), \(\varDelta _{-1}\) are all set to zero and \(\varDelta _0\) is set to one. Equation (1) is applied to obtain \(\varDelta _1\). It is then reapplied to calculate \(\varDelta _2\) from \(\varDelta _{-2}\) to \(\varDelta _1\), Continuing, the polynomials \(\varDelta _3,\varDelta _4,\cdots ,\varDelta _n \) are computed.

The following example clearly illustrates how the characteristic polynomial of a 5-neighborhood linear CA can be computed using the recurrence relation shown above. Table 3 shows characteristic polynomials of a 5-cell null boundary 5-neighborhood linear CA.

Example 2: Let us consider a 5-cell null boundary 5-neighborhood linear CA with the rule vector [1, 1, 1, 0, 0]. We have, \([d_1, d_2, d_3, d_4, d_5]=[1, 1, 1, 0, 0]\)

$$\begin{aligned} \varDelta _{-3}= & {} 0,\quad \varDelta _{-2}=0,\quad \varDelta _{-1}=0,\quad \varDelta _0=1\\ \varDelta _1= & {} (x+d_1)\varDelta _0+\varDelta _{-1}+(x+d_0)\varDelta _{-2}+\varDelta _{-3}\\= & {} (x+1).1 +0+0+0=x+1\\ \varDelta _2= & {} (x+d_2)\varDelta _1+\varDelta _0+(x+d_1)\varDelta _{-1}+\varDelta _{-2}\\= & {} (x+1)(x+1)+1+0+0=x^2\\ \varDelta _3= & {} (x+d_3)\varDelta _2+\varDelta _1+(x+d_2)\varDelta _0+\varDelta _{-1}\\= & {} (x+1)x^2+(x+1)+(x+1)+0\\= & {} x^3+x^2\\ \varDelta _4= & {} (x+d_4)\varDelta _3+\varDelta _2+(x+d_3)\varDelta _1+\varDelta _0\\= & {} (x+0)(x^3+x^2)+x^2+(x+1)(x+1)+1\\= & {} x^4+x^3+x^2+x^2+1+1\\= & {} x^4+x^3\\ \varDelta _5= & {} (x+d_5)\varDelta _4+\varDelta _3+(x+d_4)\varDelta _2+\varDelta _1\\= & {} (x+0)(x^4+x^3)+(x^3+x^2)+(x+0)(x^2)+(x+1)\\= & {} x^5+x^4+x^3+x^2+x^3+x+1\\= & {} x^5+x^4+x^2+x+1 \end{aligned}$$
Table 3. Characteristic polynomials of null boundary 5-neighborhood LHCA

3.1 Synthesis of 5-Neighborhood Linear CA

In this section, we present an algorithm Algorithm 1 for synthesizing 5-neighborhood CA from its characteristic polynomial.

figure a

Explanation: Suppose, \(\varDelta _{n-1}\), \(\varDelta _{n-2}\) and \(\varDelta _{n-3}\) are known. Here, all operations are done in GF(2). We consider the recurrence relation:

$$\begin{aligned} \varDelta _n=(x+d_n)\varDelta _{n-1}+\varDelta _{n-2}+(x+d_{n-1})\varDelta _{n-3}+\varDelta _{n-4} \end{aligned}$$

Now, we follow the Table 4. In the step 1, \(\varDelta _n\) and \(\varDelta _{n-1}\) are known. By the polynomial division algorithm, considering \(\varDelta _n\) as dividend and \(\varDelta _{n-1}\) as divisor, the degree 1 quotient polynomial \((x+d_n)\) is uniquely determined and easily calculated; since, the remainder polynomial in the relation (i.e. \(\varDelta _{n-2}+(x+d_{n-1})\varDelta _{n-3}+\varDelta _{n-4}\)) is of degree less than \(n-1\). In the step 2, \(\varDelta _n\), \(\varDelta _{n-1}\), \(\varDelta _{n-2}\) and \(\varDelta _{n-3}\) are known. In the above relation, the polynomial \(\varDelta _n+(x+d_n)\varDelta _{n-1}+\varDelta _{n-2}\) is of degree \(n-2\). Now, if the polynomial division algorithm is again applied considering \(\varDelta _n+(x+d_n)\varDelta _{n-1}+\varDelta _{n-2}\) as dividend and \(\varDelta _{n-3}\) as divisor then, it will calculate \((x+d_{n-1})\) as quotient and \(\varDelta _{n-4}\) as remainder from the above relation. In the step 3, we consider the relation:

$$\begin{aligned} \varDelta _{n-1}=(x+d_{n-1})\varDelta _{n-2}+\varDelta _{n-3}+(x+d_{n-2})\varDelta _{n-4}+\varDelta _{n-5} \end{aligned}$$

Now, \(\varDelta _{n-1}\), \(\varDelta _{n-2}\), \(\varDelta _{n-3}\) and \(\varDelta _{n-4}\) are known and \((x+d_{n-1})\) is also known as it is computed in the previous step. If we apply the division algorithm considering \(\varDelta _{n-1}+(x+d_{n-1})\varDelta _{n-2}+\varDelta _{n-3}\) as dividend and \(\varDelta _{n-4}\) as divisor, it can calculate \((x+d_{n-2})\) as quotient and \(\varDelta _{n-5}\) as remainder from the above relation. In this way, if we proceed for n steps, then we get the sequence of degree 1 quotient polynomials as follows:

$$\begin{aligned}{}[(x+d_n),(x+d_{n-1}), (x+d_{n-2}),\cdots ,(x+d_2),(x+d_1)] \end{aligned}$$

where \(d_k (1 \le k \le n)\) is either 0 or 1. By taking the constant terms of these quotient polynomials and reversing, we get the rule vector \([d_1, d_2, \cdots , d_n]\) for a 5-neighborhood LHCA with the characteristic polynomial \(\varDelta _n\). The total number of polynomial divisions performed is O(n), where, n is degree of the characteristic polynomial \(\varDelta _n\) of n-bit CA. Each polynomial division needs O(\(n^2\)) time. Therefore, the required time complexity for this algorithm is O(\(n^3\)).

Table 4. Synthesis of 5-neighborhood linear CA

3.2 Randomness of 5-Neighborhood Linear CA Rule Vectors

A statistical test suite is developed by National Institute of Standards and Technology (NIST) that is known as NIST-statistical test suite [1]. The NIST Test Suite is a statistical package consisting of 15 tests that were developed to test the randomness of (arbitrarily long) binary sequences produced by either hardware or software based cryptographic random or pseudorandom number generators. To test the randomness of 5-neighborhood linear CA rule vectors, we consider a 24-bit 5-neighborhood maximum period LHCA with rule vector

$$\begin{aligned}{}[1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,0,1] \end{aligned}$$

where \(d_i=0\) in the rulevector \([d_0, \cdots , d_{23}]\) represents that \(i^{th}\) cell of the CA follows rule \(R_0\) and \(d_i=1\) in the rulevector \([d_0, \cdots , d_{23}]\) represents that \(i^{th}\) cell of the CA follows rule \(R_1\). 100 bit-streams with each stream of 1,00,000 bits are generated from the middle cell (\(12^{th} cell\)) of this 24-bit LHCA and stored in a data file, and then the data file is fed to NIST test suite. The generated bit-streams show high randomness property as depicted in Table 5.

Table 5. Results of NIST-statistical test suite
Table 6. Diffusion of 5-neighborhood LHCA rule vector
Table 7. Comparison of 5-neighborhood linear CA with 3/4 neighborhood CA

3.3 Diffusion Property of 5-Neighborhood Linear CA Rule Vectors

To test the diffusion property of 5-neighborhood linear CA rule vectors, we consider a 24-bit 5-neighborhood maximum period LHCA \([s_0, \cdots , s_{23}]\) with the same rule vector

$$\begin{aligned}{}[1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,0,1] \end{aligned}$$

as considered in the previous section, and some CA initial values and we notice the status of the CA cells in some clock cycles. The result of the CA states for some clock cycles is depicted in Table 6. The result shows that the diffusion rate of CA cell contents is 2 times faster than 3-neighborhood CA. For the sake of simplicity, the rule value of the CA is given in hexadecimal notation i.e. a CA rule value 0xA5 denotes the rule vector [1, 0, 1, 0, 0, 1, 0, 1] and a CA initial value 0xA5 denotes the CA value [10100101].

3.4 Comparison of Properties of 5-Neighborhood Linear CA with 3/4 Neighborhood Linear CA

In this section, we study the comparison of properties of 5-neighborhood linear CA with 3/4 neighborhood linear CA, shown in Table 7. Delay will obviously increase for 5-neighborhood CA with respect to 3-neighborhood CA. On the other hand, one clock cycle period is at least the time period required for one time CA evolving and the average diffusion rate for 5-neighborhood CA is 2 times faster than 3-neighborhood CA. Therefore, because of high diffusion rate, 5-neighborhood CA is also suitable for high speed application.

4 Conclusion

In this paper, we have studied 5-neighborhood null boundary linear CA with two linear rules. The characteristic polynomial has been realized from 5-neighborhood rule vector of the CA. We have presented an algorithm for synthesizing the 5-neighborhood CA from its characteristic polynomial by assuming some CA sub-polynomials. We have shown the randomness and diffusion properties of the 5-neighborhood CA rule vectors and the comparison of their properties with 3/4 neighborhood CA. At present, we are working on how the CA can be synthesized from its characteristic polynomial without the knowledge of CA sub-polynomials.