Self-Replicating Patterns in 2D Linear Cellular Au
Self-Replicating Patterns in 2D Linear Cellular Au
net/publication/260289638
CITATIONS READS
24 1,288
4 authors:
All content following this page was uploaded by Su Uğuz on 30 December 2015.
International Journal of Bifurcation and Chaos, Vol. 24, No. 1 (2014) 1430002 (24 pages)
c World Scientific Publishing Company
DOI: 10.1142/S021812741430002X
useee@rit.edu
Hasan Akin
by 198.136.31.68 on 12/27/15. For personal use only.
This paper studies the theoretical aspects of two-dimensional cellular automata (CAs), it classi-
fies this family into subfamilies with respect to their visual behavior and presents an application
to pseudo random number generation by hybridization of these subfamilies. Even though the
basic construction of a cellular automaton is a discrete model, its macroscopic behavior at large
evolution times and on large spatial scales can be a close approximation to a continuous system.
Beyond some statistical properties, we consider geometrical and visual aspects of patterns gen-
erated by CA evolution. The present work focuses on the theory of two-dimensional CA with
respect to uniform periodic, adiabatic and reflexive boundary CA (2D PB, AB and RB) condi-
tions. In total, there are 512 linear rules over the binary field Z2 for each boundary condition
and the effects of these CA are studied on applications of image processing for self-replicating
patterns. After establishing the representation matrices of 2D CA, these linear CA rules are clas-
sified into groups of nine and eight types according to their boundary conditions and the number
of neighboring cells influencing the cells under consideration. All linear rules have been found to
be rendering multiple self-replicating copies of a given image depending on these types. Multiple
copies of any arbitrary image corresponding to CA find innumerable applications in real life
situation, e.g. textile design, DNA genetics research, statistical physics, molecular self-assembly
and artificial life, etc. We conclude by presenting a successful application for generating pseudo
numbers to be used in cryptography by hybridization of these 2D CA subfamilies.
∗
Author for correspondence
1430002-1
January 29, 2014 6:59 WSPC/S0218-1274 1430002
S. Uguz et al.
CA could operate any computable operation. Mean- investigates the one-dimensional case [Inokuchi &
while, because of its complexity, von Neumann rules Sato, 2000]. Note that two-dimensional (2D) CA has
were never operated on a computer. In the early found applications in traffic modeling. For instance
multivalue (including ternary) cellular automaton
by 198.136.31.68 on 12/27/15. For personal use only.
1430002-2
January 29, 2014 6:59 WSPC/S0218-1274 1430002
In other words, we are interested in cases when a The organization of the paper is presented as
CA replicates under some special number of evolu- follows. Section 2 discusses the technical preliminar-
tion (i.e. iteration number), that is, makes copies ies of the subject and their details. A mathemati-
of a finite collection of finite configurations, called cal model for CA with the earlier works is given in
self-replicating patterns. Our aim is to investigate Sec. 3. In Sec. 4, the rule matrices of 2D finite peri-
self-replicating patterns for some special bound- odic CA with linear rules and their properties are
aries with their effects. We investigate their clas- presented. The application of 2D CA in image pro-
sification under periodic, adiabatic and reflexive cessing for the self-replicating patterns are given in
boundary conditions over the binary field Z2 . We Sec. 5. The classifications are presented in Sec. 6.
obtain the rule matrix (or representation matrix) In Sec. 7, an application to cryptography obtained
of 2D finite CA for all rules and boundary condi- by the hybridization of these families of CA is pre-
tions. Further, applications of image processing as sented. Finally a conclusion is drawn in Sec. 8.
self-replicating patterns corresponding to the lin-
ear rules of 2D uniform CA with periodic, adia- 2. Technical Preliminaries
batic and reflexive boundary conditions over Z2 are
also studied. We present some illustrative exam- In this section, we introduce 2D CA over the binary
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
ples and figures. Using the rule matrices obtained field Z2 = {0, 1} by using the uniform linear local
in this work, the present paper contributes fur- rules. We recall the definition of a CA. Further, we
ther to the algebraic structure of these CA and consider the two-dimensional lattice Z2 and the con-
by 198.136.31.68 on 12/27/15. For personal use only.
2
relates the results to applications studied by dif- figuration space Ω = {0, 1}Z with elements
ferent authors previously (i.e. [Choudhury et al., σ : Z2 → {0, 1}.
2010; Packard & Wolfram, 1985; Wolfram, 1983]).
The paper introduces the 2D nine-neighborhood The value of σ at a point v ∈ Z2 will be denoted
CA and the rules by which the dependencies of a by σv . Let u1 , . . . , us ∈ Z2 be a finite set of distinct
cell are governed. The application of such linear vectors and f : {0, 1}s → {0, 1, 2} be a function.
rules on designed matrices is demonstrated which CA with local rule f is defined as a pair (Ω, Ff ),
forms the basis of self-replicating image processing. where the global transition map Ff : Ω → Ω is
The paper also studies the effect of these 512 linear given by
rules on a particular image. Especially, these rules (Ff σ)v = f (σv+u1 , . . . , σv+us ), v ∈ Z2 .
are used for image transformations as translation,
The function f is called the local rule. The space
multiplication of one image into several replicating
Ω is assumed to be equipped with a (metrizable)
images. While the translation and multiplication
Tychonoff topology; it is easily seen that the global
can be carried out on any arbitrary image, struc-
transition map Ff introduced above and the shift
tured images are needed for others. Some rules yield
operator Uv are continuous in this topology. The
weird and wonderful patterns as seen in the next
2D finite CA consists of m × n cells arranged in m
sections.
rows and n columns, where each cell takes one of
The self-replicating implications of von Neu-
the values of 0 or 1. A configuration of the system
mann for research in nanotechnology, theoretical
is an assignment of states to all the cells. Every
biology and artificial life were discussed in [Smith
configuration determines a next configuration via
et al., 2003]. Self-replication is the process in
a linear transition rule that is local in the sense
which an object or structure produces a copy of
that the state of a cell at time (t + 1) depends
itself. Of course there is some difference between
only on the states of some of its neighbors at time t
self-replication and self-reproduction. In the self-
using modulo 2. For 2D CA nearest neighbors, there
replication side, an exact duplicate is made (see
Figs. 2–12). Since multiple copies of an arbitrary
image have innumerable applications in real life sit- Table 1. Local rule number conventions
for 2D finite CA.
uations (for example, textile design, DNA genetics
research, etc., see [Chua & Mainzer, 2011; Dogaru & 26 = 64 27 = 128 28 = 256
Chua, 1999, 2000; Schadschneider & Schreckenberg, 5
2 = 32 0
2 =1 21 = 2
1993; Rubio et al., 2004; Smith et al., 2003]), the
24 = 16 23 = 8 22 = 4
findings of this study are interesting.
1430002-3
January 29, 2014 6:59 WSPC/S0218-1274 1430002
S. Uguz et al.
(t)
(FRule=PB x)(i,j)
are nine cells arranged in a 3 × 3 matrix center-
ing that particular cell (see [Chattopadhyay et al.,
by 198.136.31.68 on 12/27/15. For personal use only.
1430002-4
January 29, 2014 6:59 WSPC/S0218-1274 1430002
(TRule=PB )mn×mn .
.. = ..
est neighborhood structures to construct the rule
matrices over two-dimensional CAs. In the cellu-
(t) (t+1)
xm1 xm1 lar automaton iteration, the value of the center
.. ..
by 198.136.31.68 on 12/27/15. For personal use only.
1430002-5
January 29, 2014 6:59 WSPC/S0218-1274 1430002
S. Uguz et al.
rule matrix T170NB as note is that these Type n rules are not related to
the types given by Wolfram [1983].
0 1 0 1 0 0 0 0 0
1 0
0 1 0 1 0 0 0 Remark 3.1. In [Choudhury et al., 2010], these clas-
0 1 0 0 0 1 0 0 0 sifications are referred to as Group n rules (we call
1 0 0 0 1 0 1 0 0 Type n rules just in case they are confused with the
algebraic group structure), the grouping has been
T170NB = 0 1 0 1 0 1 0 1 0
Group n for n = 1, 2, . . . , 9, including the rules that
0 0 1 0 1 0 0 0 1
refer to the dependency of current cell on N neigh-
0 0
0 0 1 0 0 0 1 boring cells amongst top, bottom, left, right, top-
0 0 0 0 1 0 1 0 1 left, top-right, bottom-left, bottom-right and itself
0 0 0 0 0 1 0 1 0 (see Fig. 1).
S3 I3 03 Here we briefly mention how Type 1 rules dif-
fer when the boundary conditions change. For the
= I3 S3 I3
null and periodic boundary case (see Fig. 5), Type 1
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
0 1 0 17, 32, 33, 64, 65, 128, 129, 256 and 257. Simi-
S3×3 = 1 0 1. larly rules belonging to other Type n have been
0 1 0 obtained. It is noted that number of 1’s presented
in the binary sequence of a rule is the same as its
The evolution of 2D CAs from seeds called type number. These T ype n rules are obtained by
as a first image in Figs. 4–20, consist of a few the number n of self-replicating number of the first
nonzero initial sites. Similar cases in one dimen- image (see Figs. 2–12). These rules are classified in
sion, some CA give regular and self-similar patterns, Tables 5 and 6 with respect to the chosen boundary
others give complicated and random patterns (see conditions.
Figs. 14–17). Some new features in two dimensions
are the generation of patterns with different bound-
aries observed in many natural systems. Detailed 4. Rule Matrices of 2D Finite
analysis will be given in Sec. 5. CA Rules
For simplicity, we consider only 2D CA lin-
ear rules. The rule convention is organized as fol- In this section, we obtain the rule matrix corre-
lows. When we consider the nearest neighbors of sponding to a 2D finite CA with the periodic bound-
2D CA, there are nine variables which are under ary generated by the local rules over the field Z2
consideration as given in Fig. 2. The center cell by presenting the auxiliary matrices that play an
marked xij (see Fig. 1) is the cell under consid- important role in the rule matrix of a 2D cellular
eration. In 2D CA, the state of the cell which is automaton. Further, this will be established for each
under consideration depends on its neighboring cell boundary case.
states. Each of the cells could be considered as a The rule matrices of rule number R are denoted
variable and thus for 2D CA there are nine vari- by TR . We study the rule matrix TR such that TR
ables to be studied. The number of linear rules can operates on the current CA states [X t ] (the binary
be realized in the following way. The number of matrix of dimension (m×n)) and generates the next
rules combined state [X t+1 ] of (m × n).
by a combination
of
these nine vari-
ables is 90 + 91 + 92 + · · · + 99 = 512 which
includes rules characterizing no dependency. Note
4.1. Rule matrices with primary
that, these 512 linear rules were previously classi-
fied by taking into account the number of cells under
rules under null boundary
just null boundary consideration [Choudhury et al., condition
2010] (see Table 5). The classification presented in The auxiliary matrices T1 and T2 for the null bound-
Tables 5 and 6 defines Type n rules. An important ary are defined as follows:
1430002-6
January 29, 2014 6:59 WSPC/S0218-1274 1430002
0 1 0 0 . 0 0 0 . 0
0 . 1 . .
0 1 0 0 .
.
T1 = . . . . and T2 = 0 1 0 . . .
. . . . 1 . . . . .
0 0 0 0 0 0 0 . 1 0
Lemma 1 [Choudhury et al., 2005]. The representation of the next state of all primary rules
(1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 and 256 ) under the null boundary condition can be given by using the auxil-
iary matrices T1 and T2 defined above in the following way:
Rule 1N : [Xt+1 ] = [Xt ] Rule 2N : [Xt+1 ] = [Xt ][T2 ]
Rule 4N : [Xt+1 ] = [T1 ][Xt ][T2 ] Rule 8N : [Xt+1 ] = [T1 ][Xt ]
Rule 16N : [Xt+1 ] = [T1 ][Xt ][T1 ] Rule 32N : [Xt+1 ] = [Xt ][T1 ]
Rule 64N : [Xt+1 ] = [T2 ][Xt ][T1 ] Rule 128N : [Xt+1 ] = [T2 ][Xt ]
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
4.2. Rule matrices with primary rules under periodic boundary condition
by 198.136.31.68 on 12/27/15. For personal use only.
The auxiliary matrices T1p and T2p for periodic boundary case are defined as follows:
0 1 0 0 . 0 0 . 0 1
0 0 1 0 . 1 0 . . .
T1p = . . . . . and T2p = 0 1 0 . . . (5)
. . . . 1 . . . . .
1 0 0 0 0 0 0 . 1 0
Proposition 1. The fundamental periodic number rule matrices T1PR , T2PR , T4PR , T8PR , T16PR , T32PR ,
T128PR , T256PR are respectively given by
In 0 0 0 . T1p 0 0 0 . T2p 0 0 0 .
0 In 0 0 . 0 T2p 0 0
0 T1p 0 0 . .
. T2PR =
T1PR = . . . . . . . . . T32PR = . . . . .
. 0 0 In 0 . 0 0 T1p 0 . 0 0 T2p 0
. 0 0 0 In . 0 0 0 T1p . 0 0 0 T2p
0 T1p 0 0 . 0 0 0 0 T2p 0 In 0 0 .
0 0 T1p 0 . T2p 0 0 0 . 0 0 In 0
.
T4PR = . . . . . T64PR = 0 T2p 0 0 . T8PR =. . . .
.
0 0 0 0 T1p . . . . . 0 0 0 0 In
T1p 0 0 0 . . 0 0 T2p 0 In 0 0 0 .
0 0 0 0 In 0 T2p 0 0 . 0 0 0 0 T1p
In 0 0 0 . 0 0 T2p 0 . T1p 0 0 0 .
T128PR = 0 In 0 0 . T16PR = . . . . T256PR = 0 T1p 0
. 0 .
. . . . . 0 0 0 0 T2p . . . . .
. 0 0 In 0 T2p 0 0 0 . . 0 0 T1p 0
where T1p and T2p are given as in (5). Also In is an identity matrix n × n type.
1430002-7
January 29, 2014 6:59 WSPC/S0218-1274 1430002
S. Uguz et al.
Proof. In order to determine the rule matrix Lemma 2. The next state of all primary rules (1,
(TP R )mn×mn we need to determine the action of 2 , 4 , 8 , 16 , 32 , 64 , 128 , 256 ) of 2D periodic cellular
(TP R )mn×mn on the base vectors. First, we consider automaton over Z2 can be represented as follows:
the linear transformation (T) from m × n matrix
Rule 1P : [Xt+1 ] = [Xt ]
space to itself. Next, we relate the transformation
(T) with (TP R ). Let eij denote the matrix of size Rule 2P : [Xt+1 ] = [Xt ][T2p ]
m × n where the (i, j) position is equal to one and Rule 4P : [Xt+1 ] = [T1p ][Xt ][T2p ]
the rest of the entries equal to zero. It is well known
that these vectors give the standard basis for this Rule 8P : [Xt+1 ] = [T1p ][Xt ]
space. Given eij , the image of eij which is T (eij ) Rule 16P : [Xt+1 ] = [T1p ][Xt ][T1p ]
is related to the suitable nearest neighbors. Then Rule 32P : [Xt+1 ] = [Xt ][T1p ]
T (eij ) equals to a linear combination of its suit-
able neighbors corresponding to the rules. Hence, Rule 64P : [Xt+1 ] = [T2p ][Xt ][T1p ]
without getting into details, we obtain the rule Rule 128P : [Xt+1 ] = [T2p ][Xt ]
matrices.
Rule 256P : [Xt+1 ] = [T2p ][Xt ][T2p ].
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
From Proposition 1, one can easily see the fol- Proof. Let
lowing result which reduces the number of indepen-
dent primary rules from eight to four. The following x11 x12 x13
by 198.136.31.68 on 12/27/15. For personal use only.
is due to the matrix transpose equality (T1p )t = T2p . [Xt ] = x21 x22 x23
1430002-8
January 29, 2014 6:59 WSPC/S0218-1274 1430002
Corollary 4.2. Rank of the periodic auxiliary Table 4. 2D finite CA2×2 with
matrices [T1p ]n×n and [T2p ]n×n is n. In other words, adiabatic boundary condition.
the periodic auxiliary matrices are invertible.
x11 x11 x12 x12
Example 4.1 [von Neumann Neighborhood]. Since x11 x11 x12 x12
Rule 170P = Rule 2P + Rule 8P + Rule 32P + x21 x21 x22 x22
Rule 128P, we have
x21 x21 x22 x22
[Xt+1 ] = [Xt ][T2p ] + [T1p ][Xt ] + [Xt ][T1p ]
+ [T2p ][Xt ].
Then we obtain the following description:
x11 x12 x13
T170P ([Xt ]) = T170P x21 x22 x23
x31 x32 x33
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
x12 + x21 + x13 + x31 x11 + x13 + x22 + x32 x12 + x23 + x11 + x33
= x11 + x22 + x31 + x23 x12 + x23 + x32 + dx21 x13 + x33 + x22 + x21
x21 + x32 + x11 + x33 x22 + x33 + x31 + x12 x23 + x32 + x31 + x13
by 198.136.31.68 on 12/27/15. For personal use only.
x31 x32 x33 x12 x13 x11 x21 x22 x23 x13 x11 x12
= x11 x12 x13 + x22 x23 x21 + x31 x32 x33 + x23 x21 x22
x21 x22 x23 x32 x33 x31 x11 x12 x13 x33 x31 x32
= [Xt ][T2p ] + [T1p ][Xt ] + [Xt ][T1p ] + [T2p ][Xt ].
4.3. Rule matrices with primary rules under adiabatic boundary condition
The auxiliary matrices T1a and T2a for the adiabatic boundary case are defined as follows:
0 1 0 0 . 1 0 0 . 0
0 0 1 0 . 1 0 . . .
. . and T2a =
T1a = . . . 0 1 0 . . . (6)
. . . . 1 . . . . .
0 0 0 0 1 0 0 . 1 0
Proposition 2. The fundamental adiabatic boundary (AB), rule number (n), rule matrices TnAB : T1AB ,
T2AB , T4AB , T8AB , T16AB , T32AB , T128AB , T256AB are
In 0 0 0 . T1a 0 0 0 . T2a 0 0 0 .
0 I 0 0 . 0 T . 0 T .
n 1a 0 0 2a 0 0
T1AB = . . . . . T2AB = .
. . . . T32AB =
. . . . .
. 0 0 In 0 . 0 0 T1a 0 . 0 0 T2a 0
. 0 0 0 In . 0 0 0 T1a . 0 0 0 T2a
0 T1a 0 0 . T2a 0 0 0 0 0 In 0 0 .
0 0 T .
1a 0 . T2a 0 0 0 . 0 0 In 0
T4AB = . . . . . T64AB = 0
T2a 0 0 . T8AB = . .
. . .
0 0 0 0 T1a . . . . . 0 0 0 0 In
0 0 0 0 T1a . 0 0 T2a 0 0 0 0 0 In
1430002-9
January 29, 2014 6:59 WSPC/S0218-1274 1430002
S. Uguz et al.
In 0 0 0 0 0 T2a 0 0 . T1a 0 0 0 0
I . 0 0 T . T .
n 0 0 0 2a 0 1a 0 0 0
T128AB =
0 In 0 0 . T16AB
= . . . . . T256AB =
0 T1a 0 0 .
. . . . . 0 0 0 0 T2a . . . . .
. 0 0 In 0 0 0 0 0 T2a . 0 0 T1a 0
where T1a and T2a are given as in (6). Also In is the identity matrix n × n type.
Proof. In order to determine the rule matrix (TAB )mn×mn we need to determine the action of (TAB )mn×mn
on the base vectors. The rule matrix related to these equations is obtained after similar calculations as in
the proof of Proposition 1.
Hence we get the following general rule matrix result for the adiabatic case as a theorem.
Theorem 2 [Adiabatic Case]. The rule matrix for any adiabatic boundary CA rule (AB) can be represented
as
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
Aa Ba 0 0 . 0 0
Ca Aa Ba 0 . . 0
0 .
by 198.136.31.68 on 12/27/15. For personal use only.
Ca Aa Ba 0 .
.
[TAB ]mn×mn = . . . . . .
. . 0 Ca Aa Ba 0
0 . . 0 Ca Aa Ba
0 0 . . 0 Ca Aa
where Aa , Ba , Ca are one of the following matrices of the order of n × n : 0, I, T1a , T2a , I + T1a , I + T2a ,
T1a + T2a and I + T1a + T2a .
Lemma 3. The next state of all primary rules (1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , 256 ) of 2D adiabatic cellular
automaton with Z2 can be represented as follows:
Rule 1AB: [Xt+1 ] = [Xt ] Rule 2AB: [Xt+1 ] = [Xt ][T1a ]t
Rule 4AB: [Xt+1 ] = [T1a ][Xt ][T1a ]t Rule 8AB: [Xt+1 ] = [T1a ][Xt ]
Rule 16AB: [Xt+1 ] = [T1a ][Xt ][T2a ]t Rule 32AB: [Xt+1 ] = [Xt ][T2a ]t
Rule 64AB: [Xt+1 ] = [T2a ][Xt ][T2a ]t Rule 128AB: [Xt+1 ] = [T2a ][Xt ]
Rule 256AB: [Xt+1 ] = [T2a ][Xt ][T1a ]t .
It is easily seen that the adiabatic auxiliary matrices are not invertible.
Corollary 4.3. The rank of the adiabatic auxiliary matrices [T1a ]n×n and [T2a ]n×n is (n − 1).
4.4. Rule matrices with primary rules under reflexive boundary condition
The auxiliary matrices T1r and T2r for the reflexive boundary case are defined as follows:
0 1 0 0 . 0 1 0 . 0
0 0 1 0 0 . . .
. 1
T1r = . . . . . and T2r = 0 1 0 . . . (7)
. . . . 1 . . . . .
0 0 0 1 0 0 0 . 1 0
1430002-10
January 29, 2014 6:59 WSPC/S0218-1274 1430002
Proposition 3. The fundamental reflexive boundary (RB), rule number (n), rule matrices TnRB : T1RB ,
T2RB , T4RB , T8RB , T16RB , T32RB , T128RB , T256RB are
In 0 0 0 . T1r 0 0 0 . T2r 0 0 0 .
0 I 0 0 . 0 T . 0 T .
n 1r 0 0 2r 0 0
T1RB = . . . . . T2RB = .
. . . .
T32AB = . . . . .
. 0 0 In 0 . 0 0 T1r 0 . 0 0 T2r 0
. 0 0 0 In . 0 0 0 T1r . 0 0 0 T2r
0 T1r 0 0 . 0 T2r 0 0 0 0 In 0 0 .
0 . T . 0 0 I .
0 T1r 0 2r 0 0 0 n 0
T4RB =
. . . . . T64RB =
0 T2r 0 0 .
T8RB
= . . . . .
0 0 0 0 T1r . . . . . 0 0 0 0 In
0 0 0 T1r 0 . 0 0 T2r 0 0 0 0 In 0
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
0 In 0 0 0 0 T2r 0 0 . 0 T1r 0 0 0
I . 0 0 T .
n 0 0 0 2r 0 . T1r 0 0 0
by 198.136.31.68 on 12/27/15. For personal use only.
T128RB =
0 In 0 0 .
T16RB
= . . . .
. T256RB =
0 T1r 0 0 .
. . . . . 0 0 0 0 T2r . . . . .
. 0 0 In 0 0 0 0 T2r 0 . 0 0 T1r 0
1430002-11
January 29, 2014 6:59 WSPC/S0218-1274 1430002
S. Uguz et al.
Fig. 2. An application of Rule 8 with null (NB), periodic (PB), adiabatic (AB) and reflexive (RB) boundary respectively
after 16 iterations of the first image.
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
by 198.136.31.68 on 12/27/15. For personal use only.
1430002-12
January 29, 2014 6:59 WSPC/S0218-1274 1430002
Fig. 10. An application of Rule 415 after 16 iterations of the first image.
Fig. 11. An application of Rule 510 after 16 iterations of the first image.
1430002-13
January 29, 2014 6:59 WSPC/S0218-1274 1430002
S. Uguz et al.
Fig. 12. An application of Rule 511 after 16 iterations of the first image.
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
by 198.136.31.68 on 12/27/15. For personal use only.
Fig. 13. An application of Rule 315 after 5, 12, 15 and 16 iterations of the first image.
1430002-14
January 29, 2014 6:59 WSPC/S0218-1274 1430002
Fig. 14. An application of Rule 413 after 7, 12, 15 and 16 iterations of the first image.
Fig. 15. An application of Rule 510 after 5, 11, 12 and 16 iterations of the first image.
1430002-15
January 29, 2014 6:59 WSPC/S0218-1274 1430002
S. Uguz et al.
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
by 198.136.31.68 on 12/27/15. For personal use only.
Fig. 16. An application of Rule 171 after 7, 12, 13 and 15 iterations of the first image.
diagram [Chattopadhyay et al., 1999] to determine In the next section, by applying the rule
its reversibility. Thus, in order to determine the matrices to the patterns, we generate the new pat-
dimension of the kernel of a 2D CA, one can study terns and classify CA linear rules based on the
the rank of (Trules )mn×mn . For finite CA, in order behavior of the rule in the nth iteration and their
to obtain the inverse of a 2D finite linear CA many boundaries.
authors [Khan et al., 1997, 1999; Siap et al., 2011b]
have made use of the rule matrices. Since we have
5. Application of 2D CA in Image
already found the rule matrix Trules correspond-
ing to 2D finite CA, we can state the following
Processing: Self-Replicating
relation between the column vectors X (t) and the Patterns
rule matrix Trules : X (t+1) = Trules X (t) (mod 2). If Self-replicating pattern generation is one of the
the rule matrix Trules is nonsingular, then we have most interesting topics and research areas in non-
linear science. A motif is considered as a basic
X (t) = (Trules )−1 X (t+1) (mod 2). subpattern. Pattern generation is the process of
transforming copies of the motif about the array
Thus a main problem will be whether the rule (1D), plane (2D) or space (3D) in order to cre-
matrix Trules is invertible or not. If the rule matrix ate the whole repeating pattern with no overlaps
Trules has full rank, then it is invertible, so the 2D and blanks [Gravner & Griffeath, 2011; Packard &
finite CA is reversible, otherwise it is irreversible. Wolfram, 1985; von Neumann, 1966; Wolfram,
Reversibility investigation on the rule matrices 1983]. These patterns have some mathematical
given in Theorems 1–3 is left for another work or properties which make generating algorithm possi-
for the interested readers as open problems. ble. A cellular automaton is a good candidate for
1430002-16
January 29, 2014 6:59 WSPC/S0218-1274 1430002
Fig. 17. An application of Rule 171 after 4, 8, 12 and 16 iterations of the first image.
an algorithmic approach used for pattern gener- this kind of trivial self-replicating procedure is eas-
ation. The history of self-replicating pattern pro- ily implemented in any programming language.
grams starts with John von Neumann who contrived Creating an algorithmic approach for generat-
a cellular automaton that took some input, and pro- ing self-replicating patterns of digital images (motif
duced as output that input [von Neumann, 1966]. as in first image) is important and sometimes
However if the automaton itself was given as input, a difficult task. Meanwhile many researchers are
the automaton will reproduce itself as output. faced with many challenges in building and devel-
von Neumann’s automaton program is an exam- oping tiling algorithms such as providing simple
ple of what is known as trivial self-replicating pro- and applicable algorithm to describe high com-
gram because the structure to reproduce is encoded plex patterns models. Growth from simple motif
directly within the program or the input. Hence in 2D CAs can produce self-replicating patterns
Fig. 18. An application of nonsymmetric pattern for Rule 312 after 16 iterations of the first image.
1430002-17
January 29, 2014 6:59 WSPC/S0218-1274 1430002
S. Uguz et al.
with complicated boundaries (null, periodic, adia- Remark 5.1. In Figs. 13 and 14, one can see that the
batic and reflexive), characterized by a variety of evolutions from steps 15 to 16 change drastically
growth dimensions. The approach given here leads on the number of live cells. For visual inspection,
to an interesting algorithm for generating different the density population always seems to increase
patterns. In this paper we use the CAs with all gradually but in step 16 many cells die quickly
the nearest neighborhoods to generate self-replicate [Chopard & Droz, 1998; Reggia et al., 1998; Mar-
patterns of digital images. For applying 2D null, tinez et al., 2011, 2012; von Neumann, 1966]. Such
periodic, adiabatic and reflexive CA linear rules in evolutions become more important for some appli-
image processing, we take a binary matrix of size cations areas of CA.
(100 × 100) due to computational limitations. We
We present an illustrative example for the case
map each element of the matrix to a unique pixel
n = 4, i.e. the iteration number 24 = 16. It may also
on the screen (writing new MATLAB codes) and we
be observed that the rules belong to the same type
color a pixel white for 0, black for 1 for the matrix
though they create equal number of copies, the dis-
elements. Then we take another image (as a motif)
tributions of these copies differ (see Figs. 6 and 7).
whose size is less than (30 × 30) for which patterns
For example (see Fig. 10), the Rule 415 is of Type 7
are to be generated and put it in the center of the
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
1430002-18
January 29, 2014 6:59 WSPC/S0218-1274 1430002
whether its size is larger than 30% of the length of The entire classification for four different type of
row or column of the display matrix. Our examples boundaries is shown in Tables 5 and 6.
of programmatic CAs and repetition of simple rules
can create very nice complex patterns of archety-
pal beauty (see Fig. 16). There is also an important 6.1. Null and periodic boundary
observational result in Fig. 17. If the first image rules
exceeds 30% of the length of row or column of the Remark 6.1. The problem of deciding self-
display matrix, the self-replication pattern when the replicating patterns (i.e. m) for Rule n with NB,
iteration number t reaches 16 does not occur. Also PB, AB, RB algebraically is interesting. This is
behaviors for different boundaries produce different equivalent to determining which Rule n corresponds
shapes when t = 16. Hence we have a classifica- to T ype m classification scheme given in Tables 5
tion device and tables up to self-replicating pattern and 6. Also there is a need for more research effort
number and for the case the seed image is less than to explain why only t = 24 = 16 times iteration of
30% of the display matrix. These will be presented the rules causes the appearance of self-replicating
in the next section. pattern phenomena.
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
Table 5. Null and periodic boundary linear 2D CA rules can be classified based on the natural number of the pattern
generated. Type m means that m copies of the images appear after the first image iterates.
(Continued)
1430002-19
January 29, 2014 6:59 WSPC/S0218-1274 1430002
S. Uguz et al.
Table 5. (Continued)
Type 6 63, 95, 119, 125, 126, 159, 182, 183, 187, 190, 207, 215, 221, 222, 231, 237, 245, 246, 249, 252, 287, 311, 317,
318, 335, 343, 347, 349, 350, 359, 365, 366, 373, 374, 377, 378, 380, 399, 407, 413, 414, 423, 429, 430, 435, 437,
438, 444, 455, 459, 461, 462, 467, 469, 470, 473, 474, 476, 483, 485, 486, 489, 490, 492, 497, 498, 500, 504, 111,
123, 175, 187, 219, 231, 235, 238, 243, 250, 315, 365, 371, 411, 442, 427, 435, 441
Type 7 127, 191, 223, 247, 253, 254, 319, 351, 367, 375, 379, 381, 382, 415, 431, 439, 445, 446, 463, 471, 475, 477, 478,
487, 491, 493, 494, 499, 501, 502, 505, 506, 508, 239, 251, 443
Type 8 255, 383, 447, 479, 495, 503, 507, 509, 510
Type 9 511
when the different boundaries are applied to the Since rule matrices are necessarily square
fixed seed image. Let us consider for example how matrices (i.e. mn×mn), the nonsingular rule matrix
the pattern for Rule 149 is generated. For Rule called reversible CA deserves to be studied closely
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
149, the cells under consideration are highlighted because a nonsingular matrix must produce cyclic
as shown in Fig. 5. Applying this rule on an ini- state transition diagram having enumerable appli-
tial seed produces Fig. 5 at the 16th iteration. Rule cations in different areas such as Pattern Classifica-
by 198.136.31.68 on 12/27/15. For personal use only.
149 is of Type 4 for Null and Periodic boundaries tion, Clustering, Encryption and Decryption, Data
(see Table 5), whereas Rule 149 is Type 3 for Adia- Compression etc. [Martinez et al., 2011, 2012; Stin-
batic and Reflexive boundaries (see Table 6). This son, 2005; Wuensche & Adamatzky, 2006; Wuen-
is easily observed from Fig. 5. sche, 2009].
Table 6. Adiabatic and reflexive boundary linear 2D CA rules can be classified based on the natural number of the
pattern generated.
Type 1 1, 2, 3, 4, 5, 8, 9, 16, 17, 32, 33, 64, 65, 128, 129, 256, 257
Type 2 6, 7, 10, 11, 12, 13, 18, 19, 20, 21, 24, 25, 34, 35, 36, 37, 40, 41, 48, 49, 66, 67, 68, 69, 72, 73, 80, 81, 96, 97,
130, 131, 132, 133, 136, 137, 144, 145, 160, 161, 192, 193, 258, 259, 260, 261, 264, 265, 272, 273, 288, 289, 320,
321, 384, 385
Type 3 112, 113, 134, 135, 138, 139, 140, 141, 146, 147, 148, 149, 152, 153, 162, 163, 164, 165, 168, 169, 176, 177, 194,
195, 196, 197, 200, 201, 208, 209, 224, 225, 262, 263, 266, 267, 268, 269, 274, 275, 276, 277, 280, 281, 290, 291,
292, 293, 296, 297, 304, 305, 322, 323, 324, 325, 328, 329, 336, 337, 352, 353, 386, 387, 388, 389, 392, 393, 400,
401, 416, 417, 448, 449
Type 4 30, 31, 46, 47, 54, 55, 58, 59, 60, 61, 78, 79, 86, 87, 90, 91, 92, 93, 102, 103, 106, 107, 108, 109, 114, 115, 116,
117, 120, 121, 142, 143, 150, 151, 154, 155, 156, 157, 166, 167, 170, 171, 172, 173, 178, 179, 180, 181, 184, 185,
198, 199, 202, 203, 204, 205, 210, 211, 212, 213, 216, 217, 226, 227, 228, 229, 232, 233, 240, 241, 270, 271, 278,
279, 282, 283, 284, 285, 294, 295, 298, 299, 300, 301, 306, 307, 308, 309, 312, 313, 326, 327, 330, 331, 332, 333,
338, 339, 340, 341, 344, 345, 354, 355, 356, 357, 360, 361, 368, 369, 390, 391, 394, 395, 396, 397, 402, 403, 404,
405, 408, 409, 418, 419, 420, 421, 424, 425, 432, 433, 450, 451, 452, 453, 456, 457, 464, 465, 480, 481
Type 5 62, 63, 94, 95, 110, 111, 118, 119, 122, 123, 124, 125, 158, 159, 174, 175, 182, 183, 186, 187, 188, 189, 190, 191,
206, 207, 214, 215, 218, 219, 220, 221, 230, 231, 234, 235, 236, 237, 242, 243, 244, 245, 248, 249, 286, 287, 302,
303, 310, 311, 314, 315, 316, 317, 334, 335, 342, 343, 346, 347, 348, 349, 358, 359, 362, 363, 364, 365, 370, 371,
372, 373, 376, 377, 398, 399, 406, 407, 410, 411, 412, 413, 422, 423, 426, 427, 428, 429, 434, 435, 436, 437, 440,
441, 454, 455, 458, 459, 460, 461, 466, 467, 468, 469, 472, 473, 482, 483, 484, 485, 488, 489, 496, 497
Type 6 126, 127, 222, 223, 238, 239, 246, 247, 250, 251, 252, 253, 318, 319, 350, 351, 366, 367, 374, 375, 378, 379, 380,
381, 414, 415, 430, 431, 438, 439, 442, 443, 444, 445, 462, 463, 470, 471, 474, 475, 476, 477, 486, 487, 490, 491,
492, 493, 498, 499, 500, 501, 504, 505
Type 7 254, 255, 382, 383, 446, 447, 478, 479, 494, 495, 502, 503, 506, 507, 508, 509
Type 8 510, 511
1430002-20
January 29, 2014 6:59 WSPC/S0218-1274 1430002
7. An Application in Cryptography IV. Run Test: The run test aims to see if the devi-
ation of the number of runs for several lengths from
An important need in applications of cryptography
the expected values is negligible or not.
is to generate a random number of binary bits of
particular length. This is a very difficult problem
since the generation of such sequence of bits relies V. Autocorrelation Test: This test determines
on algorithms and programs that are built system- the correlation between the sequence and noncyclic
atically. Further, a method of deciding the random- shifted version of it.
ness is an important and challenging issue. In order
to solve this problem a method of randomizing the Pseudo random numbers or bits are used for
sequences is needed. In this section we present such several purposes in cryptography but one of the
a method by utilizing the hybrid structure of the 2D main applications is the generation of a key for a
CA studied in the previous sections. Though this is cryptosystem [Stinson, 2005]. The algorithm used in
not a new method, the success of CA on generating a cryptosystem may be very efficient, however if the
pseudo numbers is not always possible. For instance, key is vulnerable to some attacks, then the cipher
if the hybridization is not used, in general, such a will be insecure. Therefore, generating pseudo ran-
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
process fails. Further, the success even in the case dom numbers or bits is vital.
of hybridization is still not straight forward. How- CAs are used for pseudo random bit genera-
ever, in this section we prove statistically that a tors as besides some other methods [Martin & Solé,
by 198.136.31.68 on 12/27/15. For personal use only.
suggested specific hybridization is very successful. 2008; Schiff, 2010; Guan & Tan, 2004]. In [Rubio
In order to test such a sequence for randomness we et al., 2004] the use of one-dimensional linear hybrid
have applied five basic tests [Menezes et al., 1996]. CAs as pseudo random bit generators is investi-
In a sequel we present these five basic tests briefly gated. Here in this work, we also show that, two-
with the application under the consideration. dimensional linear hybrid CAs can be used as a
The following basic tests are applied to pseudo random bit generator.
the sequences obtained herein for testing their To this end, we generated 100 sequences of bits
randomness: of length 1024 in a such a way that we evolved a
5 × 5 lattice of cells which are chosen randomly
I. Frequency Test: The aim of this test is to 1024 times and we concatenate a fixed cell of each
determine whether the number of 0’s and 1’s in a time step. The cells were evolved by hybridization
sequence of bits are approximately the same, as we of the rule numbers 109 and 308 respectively. In
would expect for a random sequence. the sequel, 99 of the sequences that we generated
passed the frequency test, all of them passed the
II. Serial Test: The aim of this test is to deter-
serial test, 95 of them passed the poker test, 98 of
mine if the number of occurrences of 00, 01, 10 and
them passed the run test and all of them passed the
11 are approximately the same or not.
autocorrelation test.
III. Poker Test: The poker test aims to deter- Now we present an example to illustrate the
mine if the number of the distinct subsequences of application among the tested sequences that passed
length m are approximately the same or not such all the tests. We use the hexadecimal notation in
that n/m ≥ 5 · 2m . order to save space of a sequence of bits that we
generated and that is as follows:
1430002-21
January 29, 2014 6:59 WSPC/S0218-1274 1430002
S. Uguz et al.
8. Conclusion
In this paper, we discuss in theory two-dimensional,
uniform periodic, adiabatic and reflexive boundary
CAs of linear rules and applications of image pro-
cessing. It is seen that CAs theory can be applied
successfully in self-replicating patterns of image
processing. Just a nontrivial self-replicating pat-
tern is shown in the paper (see Fig. 18). We inves-
Fig. 19. Lena’s original image. tigate 2D CA transition matrix rules with these
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
Acknowledgments
The first author thanks Prof. Dr. Ferat Sahin and
especially Dr. Ugur Sahin for the kind hospitality
during the visit at the Rochester Institute of Tech-
Fig. 20. Lena’s encrypted image. nology (RIT). S. Uguz would also like to thank
1430002-22
January 29, 2014 6:59 WSPC/S0218-1274 1430002
The Council of Higher Education (YOK) for the Das, A. K. [1990] “Additive cellular automata: Theory
support of his visit in RIT. The authors wish to and application as a built-in self-test structure,” PhD
thank TUBITAK (Project Number: 110T713) as thesis, I. I. T. Kharagpur, India.
well for their support. We would also like to thank Dihidar, S. K. & Choudhury, P. P. [2004] “Matrix alge-
the anonymous referees for their valuable sugges- braic formulae concerning some exceptional rules of
two dimensional cellular automata,” Inform. Sci. 165,
tions that has lead to an improved version.
91.
Dogaru, R. & Chua, L. O. [1999] “Emergence of uni-
References cellular organisms from a simple generalized cellular
automata,” Int. J. Bifurcation and Chaos 9, 1219–
Adamatzky, A., Martinez, G. J. & Mora, J. C. [2006]
1236.
“Phenomenology of reaction–diffusion binary-state
Dogaru, R. & Chua, L. O. [2000] “Mutations of the game
cellular automata,” Int. J. Bifurcation and Chaos 16,
of life: A generalized cellular automata perspective of
2985–3005.
Akın, H. [2005] “On the directional entropy of Z2 -actions complex adaptive systems,” Int. J. Bifurcation and
generated by additive cellular automata,” Appl. Math. Chaos 10, 1821–1866.
Comput. 170, 339–346. Gravner, J. & Griffeath, D. [2011] “The one-dimensional
exactly 1 cellular automaton: Replication, periodicity,
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
lular automata,” Inform. Sci. 178, 4382. tion in one-dimensional cellular automata,” Physica D
Bilotta, E., Pantano, P. & Lohn, J. D. [2005] “Emer- 240, 1460–1474.
gent patterning phenomena in 2D cellular automata,” Guan, S. U. & Tan, S. K. [2004] “Pseudorandom
Artif. Life 11, 339–362. number generation with self-programmable cellular
Blackburn, S. R., Murphy, S. & Peterson, K. G. [1997] automata,” IEEE Trans. Computer-Aided Design of
“Comments on theory and applications of cellular Integrated Circuits and Systems 23, 1095–1101.
automata in cryptography,” IEEE Trans. Comput. Hedlund, G. A. [1969] “Endomorphisms and automor-
46, 637. phisms of full shift dynamical system,” Math. Syst.
Chattopadhyay, P., Choudhury, P. P. & Dihidar, S. K. Th. 3, 320.
[1999] “Characterisation of a particular hybrid trans- Inokuchi, S. & Sato, T. [2000] “On limit cycles and
formation of two-dimensional cellular automata,” transient lengths of cellular automata with threshold
Comput. Math. Appl. 38, 207–216. rules,” Bull. Inform. Cybernet. 32, 2360.
Chopard, B. & Droz, M. [1998] Cellular Automata Julian, P. & Chua, L. O. [2002] “Replication properties
Modelling of Physical Systems (Cambridge University of parity cellular automata,” Int. J. Bifurcation and
Press). Chaos 12, 477–494.
Chou, H. H. & Reggia, J. A. [1997] “Emergence of self- Khan, A. R., Choudhury, P. P., Dihidar, K., Mitra,
replicating structures in a cellular automata space,” S. & Sarkar, P. [1997] “VLSI architecture of a cel-
Physica D 110, 252–276. lular automata machine,” Comput. Math. Appl. 33,
Choudhury, P. P., Nayak, B. K., Sahoo, S. & Rath, S. P. 79.
[2005] “Theory and applications of two-dimensional, Khan, A. R., Choudhury, P. P., Dihidar, K. & Verma,
null-boundary, nine-neighborhood, cellular automata R. [1999] “Text compression using two dimensional
linear rules,” Tech. Report No. ASD/2005/4, 13 cellular automata,” Comput. Math. Appl. 37, 115.
arXiv: 0804.2346. Martin, B. & Solé, P. [2008] Pseudo-Random Sequences
Choudhury, P. P., Sahoo, S., Hassan, S. S., Basu, S., Generated by Cellular Automata, Int. Conf. Relations,
Ghosh, D., Kar, D., Ghosh, Ab., Ghosh, Av. & Ghosh, Orders and Graphs: Interactions with Computer Sci-
A. K. [2010] “Classification of cellular automata rules ence (Mahdia, Tunisie).
based on their properties,” Int. J. Comp. Cogn. 8, Martinez, G. J., Adamatzky, A., Stephens, C. R. & Hoe-
50–54. flich, A. F. [2011] “Cellular automaton supercollid-
Chua, L. O. & Yang, L. [1988] “Cellular neural networks: ers,” Int. J. Mod. Phys. C 22, 419–439.
Theory,” IEEE Trans. Circuits Syst. 35, 1257–1272. Martinez, G. J., Adamatzky, A. & Sanz, R. A. [2012]
Chua, L. O. & Mainzer, K. [2011] The Universe as “Complex dynamics of elementary cellular automata
Automaton: From Simplicity and Symmetry to Com- emerging from chaotic rules,” Int. J. Bifurcation and
plexity (Springer). Chaos 22, 1250023.
1430002-23
January 29, 2014 6:59 WSPC/S0218-1274 1430002
S. Uguz et al.
Menezes, A. J., Oorschot, P. C., Menezes, A. & Van- Siap, I., Akın, H. & Sah, F. [2011a] “Characterization
stone, S. A. [1996] Handbook of Applied Cryptography of two dimensional cellular automata over ternary
(CRC Press). fields,” J. Franklin Instit. 348, 1258.
Mihaljevic, M., Zheng, Y. & Imai, H. [1999] “A family of Siap, I., Akın, H. & Uguz, S. [2011b] “Structure and
fast dedicated one-way hash functions based on linear reversibility of 2D hexagonal cellular automata,”
cellular automata over GF(q),” IEICE Trans. Fund. Comput. Math. Appl. 62, 4161.
E82-A, 40–47. Smith, A., Turney, P. & Ewaschuk, R. [2003] “Self-
Mitra, S. & Kumar, S. [2005] “Fractal replication in time- replicating machines in continuous space with virtual
manipulated one-dimensional cellular automata,” physics,” Artif. Life 9, 21–40.
Compl. Syst. 16, 191–208. Stinson, D. R. [2005] Cryptography: Theory and Practice
Nishinari, K. & Takahashi, D. [2000] “Multi-value cel- (Chapman and Hall/CRC Press, Ontario).
lular automaton models and metastable states in a Uguz, S., Siap, I. & Akın, H. [2013a] “2-dimensional
congested phase,” J. Phys. A 33, 7709. reversible hexagonal cellular automata with periodic
Packard, N. H. & Wolfram, S. [1985] “Two-dimensional boundary,” Acta Physica Polonica A 123, 480–483.
cellular automata,” J. Stat. Phys. 38, 901. Uguz, S., Akın, H. & Siap, I. [2013b] “Reversibility algo-
Reggia, J. A., Chou, H. H. & Lohn, J. D. [1998] rithms for 3-state hexagonal cellular automata with
“Emergence of self-replicating structures in a cellular periodic boundaries,” Int. J. Bifurcation and Chaos
Int. J. Bifurcation Chaos 2014.24. Downloaded from www.worldscientific.com
lular automata as pseudorandom bit generators in Wolfram, S. [1983] “Statistical mechanics of cellular
cryptography,” Neural Parall. Scient. Comput. 12, automata,” Rev. Mod. Phys. 55, 601.
175. Wuensche, A. & Adamatzky, A. [2006] “On spiral
Schadschneider, A. & Schreckenberg, M. [1993] “Cellular glider-guns in hexagonal cellular automata: Activator-
automaton models and traffic flow,” J. Phys. A 26, inhibitor paradigm,” Int. J. Mod. Phys. C 17, 1009.
679–683. Wuensche, A. [2009] “Cellular automata encryption: The
Schiff, J. L. [2010] Cellular Automata: A Discrete View reverse algorithm, z-parameter and chain-rules,” Par-
of the World (Wiley & Sons). all. Process. Lett. 19, 283.
Siap, I., Akın, H. & Sah, F. [2010] “Garden of eden Ying, Z., Zhong, Y. & Pei-Min, D. [2009] “On behavior
configurations for 2-D cellular automaton with rule of two-dimensional cellular automata with an excep-
2460N,” Inform. Sci. 180, 3562. tional rule,” Inform. Sci. 179, 613.
1430002-24