0% found this document useful (0 votes)
9 views

KAMIKAWA_UMEO__A Design of Algorithms for Real Time Generation of Linear Recursive Sequences on Cellular Automata

The paper presents algorithms for real-time generation of linear-recursive sequences using cellular automata (CA). It demonstrates that the Fibonacci sequence can be generated in real-time with a CA consisting of five states, and explores other sequences like tribonacci and pell. The authors detail the mechanics of wave propagation in the CA to facilitate the generation of these sequences efficiently.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

KAMIKAWA_UMEO__A Design of Algorithms for Real Time Generation of Linear Recursive Sequences on Cellular Automata

The paper presents algorithms for real-time generation of linear-recursive sequences using cellular automata (CA). It demonstrates that the Fibonacci sequence can be generated in real-time with a CA consisting of five states, and explores other sequences like tribonacci and pell. The authors detail the mechanics of wave propagation in the CA to facilitate the generation of these sequences efficiently.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

The Fourteenth International Symposium on Artificial Life and Robotics 2009 (AROB 14th ’09),

B-Con Plaza, Beppu, Oita, Japan, February 5 - 7, 2009

A Design of Algorithms for Real-Time Generation of Linear-Recursive Sequences on


Cellular Automata

Naoki Kamikawa Hiroshi Umeo


Graduate School of Engineering Graduate School of Engineering
Univ. of Osaka Electro-Communication Univ. of Osaka Electro-Communication
Neyagawa-shi, Hatsu-cho 18-8, Neyagawa-shi, Hatsu-cho 18-8,
Osaka, 572-8530, Japan Osaka, 572-8530, Japan

Abstract connected to its left- and right-neighbor cells via a commu-


nication link. Each cell can know state of its left- and right-
A model of cellular automata (CA) is considered to be
neighbor cells via communication link. One distinguished
a non-linear model of complex systems in which an infinite
leftmost cell C1 , the communication cell, is connected to
one-dimensional array of finite state machines (cells) up-
the outside world. A cellular automaton (abbreviated by
dates itself in a synchronous manner according to a uniform
CA) consists of an infinite array of finite state automata
local rule. We study a sequence generation problem on the
A = (Q, δ, F ), where
CA and propose several state-efficient real-time sequence
generation algorithms for non-regular sequences. We show 1. Q is a finite set of internal states.
that Fibonacci sequence can be generated in real-time by 2. δ is a function defining the next state of a cell, such
a CA with 5 states. We also study infinite linear-recursive that δ: Q × Q × Q → Q, where δ(p, q, r) = s, p, q, r,
sequences, such as tribonacci, tetranacci and pell sequences s ∈ Q has the following meaning: We assume that at
generated on the CA. step t the cell Ci is in state q, the left cell Ci−1 is in
state p and the right cell Ci+1 is in state r. Then, at
1 Introduction the next step t+1, Ci assumes state s. The leftmost
cell C1 is connected to the outside world. The outside
A model of cellular automata (CA) was devised orig- world is expressed by *. A quiescent state q ∈ Q has
inally for studying self-reproduction by John von Neu- a property such that δ(q, q, q) = q.
mann. It is now studied in many fields such as complex 3. F ⊆ Q is a special subset of Q. The set F is used to
systems. We study a sequence generation problem on the specify a designated state of C1 in the definition of
CA. Arisawa[1], Fischer[2], Korec[3] and Kamikawa and sequence generation.
Umeo[5], [6] studied generation of a class of natural num-
bers on CA. In this paper, we show that Fibonacci se- We now define the sequence generation problem on
quence can be generated in real-time by a CA with 5 states. CA. Let M be a CA and {tn | n = 1, 2, 3, ...} be an infinite
We also study infinite linear-recursive sequences, such as monotonically increasing positive integer sequence defined
tribonacci sequence, tetranacci sequence and pell sequence natural numbers, such that tn ≥ n for any n ≥ 1. We then
generated on the CA. We show a design of algorithm for have a semi-infinite array of cells, as shown in Figure 1,
real-time generation of linear-recursive sequences on CA. and all cells, except for C1 , are in the quiescent state at
time t = 0. The communication cell C1 assumes a special
state r in Q for initiation of the sequence generator. We
2 Real-time sequence generation prob- say that M generates a sequence {tn | n = 1, 2, 3, ...} in k
lem on CA linear-time if and only if the leftmost end cell of M falls
into a special state in F ⊆ Q at time t = k · tn , where k is
A cellular automaton consists of an infinite array of a positive integer. We call M a real-time generator when
identical finite state automata, each located at a positive k = 1.
integer point (See Figure 1).
C1 C2 C3 C4 Cn-1 Cn 3 Generation Algorithms of Linear-
Recursive Sequences
In this section, we propose generation algorithm of
Figure 1: Cellular automaton. linear-recursive sequences. First, we show a design of algo-
rithm for real-time generation of linear-recursive sequences
Each automaton is referred to as a cell. A cell at point on CA. Next, we show that Fibonacci sequence can be gen-
i is denoted by Ci , where i ≥ 1. Each Ci , except for C1 , is erated on a CA with 5 states.

©ISAROB 2009 281


The Fourteenth International Symposium on Artificial Life and Robotics 2009 (AROB 14th ’09),
B-Con Plaza, Beppu, Oita, Japan, February 5 - 7, 2009

3.1 A Design of Algorithm speed 1-cell/3-step in cell space. Therefore, state A1, A2
and A3 which propagate in cell space is called a-wave. A
Let m be any natural number, such that m ≥ 1. Let
sequence generation algorithm is designed geometrical by
k be natural number given, such that k ≥ 1, k < m. Let
using wave which propagates in cell space. The a-wave
b1 , b2 , . . . , bk , c1 , c2 , . . . , ck be natural number given,
propagates in the right direction at 1/3 speed. Figure 3
such that b1 , b2 , · · · , bk ≥ 1, c1 < c2 < · · · < ck . Let am
shows a number of snapshots of the cell configuration at the
be kth order linear-recursive sequences, such that am =
propagation of the a-wave. The a-wave moves to cell C2 at
b1 · am−1 + b2 · am−2 + · · · + bk · am−k , a1 = c1 , a2 = c2 ,
time t = 1. Afterwards, the a-wave moves by one cell every
. . ., ak = ck . We show a design of algorithm for real-time
3 steps. When we assume Pa (t) to be a function whitch
generation of sequence am on CA.
shows the position of the a-wave at time t, it is approved
that Pa (t) = ⌈ 3t ⌉ + 1. At time t = am−1 , cell C1 is in a
3.2 First Order Linear-Recursive Se- state included F and the b-wave is generated on C1 . The
quences b-wave propagates in the right direction at 1/1 speed, and
the b-wave reaches the a-wave. When the a-wave collides
We propose the generation algorithm for k = 1. It is with the b-wave, the a-wave keeps propagating, the b-wave
approved that am = b1 · am−1 , a1 = c1 . However, it is is eliminated, the d-wave is generated and the e-wave is
limited to b1 ≥ 2. Because all terms take c1 for b1 = 1, generated. When am−1 is an even number, the b-wave
and am is not an infinite monotonically increasing positive collides with the second state of 3 states to compose the a-
integer sequence. Figure 2 shows a time-space diagram for wave and the e-wave is generated (See Figure 3). Let r be
generation of the term am , when the term am−1 is an even natural number. When the cell which collides the a-wave
number. with the b-wave is assumed to be cell Cr , it is approved that
a
C1 C am-1 +1 r = Pa (am−1 + r − 1) = m−1 2
+ 1. Therefore, the e-wave
a
2 is generated on cell C am−1 +1 at time t = am−1 + m−1 .
t=0 2
2
The e-wave keeps staying on cell C am−1 +1 . The d-wave
2
࡮࡮࡮࡮࡮

a-wave
1 2 3 4 5 6 7 8 9 propagates in the left direction at 1/1 speed, and the d-
0
1
A3 Q Q Q Q Q Q Q Q
W1A1 Q Q Q Q Q Q Q
wave reaches the leftmost cell C1 at time t = 2 · am−1 .
1/3
2 W2A2 Q Q Q Q Q Q Q When the d-wave collides with the leftmost cell C1 , the
3 W3A3 Q Q Q Q Q Q Q
t = am-1 4 W4 R A1 Q Q Q Q Q Q d-wave is eliminated and the c-wave is generated. The c-
5 W5 R A2 Q Q Q Q Q Q wave propagates in the right direction at 1/1 speed, and
1/1 6 G R A3 Q Q Q Q Q Q
b-wave
7 Q B R A1 Q Q Q Q Q the c-wave reaches the e-wave at time t = 2 . . . am−1 +
8 Q R B A2 Q Q Q Q Q am−1
9 Q R R E1 Q Q Q Q Q 2
. When the c-wave collides with the e-wave, the b-
1/1 10 Q R D E2A1 Q Q Q Q wave is eliminated and the d-wave is generated. The d-
t = 2 am-1 d-wave 11 Q D R E2A2 Q Q Q Q
12 t1 R R E2A3 Q Q Q Q wave propagates in the left direction at 1/1 speed. The
1/1
13
14
t2 C R E2 R A1 Q Q Q
t2 R C E2 R A2 Q Q Q d-wave reaches cell C1 at time t = 3 · am−1 . Therefore,
c-wave 15 t2 R R D R A3 Q Q Q Time where the b-, c- and d-waves reciprocate between
b1-1 16 t2 R D R R R A1 Q Q
e-wave
17 t2 D R R R R A2 Q Q the leftmost cell C1 and the e-wave is am−1 steps. The
18 G R R R R R A3 Q Q
b-, c- and d-waves reciprocate b1 − 1 times between the
t = 3 am-1 19 Q B R R R R R A1 Q
20 Q R B R R R R A2 Q leftmost cell C1 and the e-wave (See Figure 2). When the
d-wave of times b1 − 1 reaches the cell C1 , a state of C1
࡮࡮࡮࡮࡮

Figure 3: A changes to a state included F at time t = b1 · am−1 .


con guration Figure 4 shows a time-space diagram for generation
of generation of the term am , when the term am−1 is an odd num-
t = am of the term am ber. When am−1 is an odd number, the o-wave is gen-
= b1 am-1 (when the term erated by the collision of the a-wave and the b-wave. The
am 1 is an even b-wave collides with the third state of 3 states to com-
Figure 2: Time-space dia- number). pose the a-wave and the o-wave is generated (See Fig-
gram for generation of the ure 5). When the cell which collides the a-wave with
the b-wave is assumed to be cell Cr , it is approved that
term am (when the term a
r = Pa (am−1 +r −1) = ⌊ m−1 2
⌋+1. Because am−1 is an odd
am 1 is an even number). a −1
number, it is approved that r = m−1 2
+1. Therefore, the
o-wave is generated on cell C am−1 −1 . he c-wave propa-
Generation of the term am is described in terms of 6 2
+1
waves: a-wave, b-wave, c-wave, d-wave, e-wave and o-wave. gates in the right direction at 1/1 speed, and the c-wave
a −1
The a-wave is generated on C1 at time t = 0. Figure reaches the o-wave at time t = am−1 + m−1 2
. When the
3 shows a number of snapshots of the cell configuration c-wave collides with the o-wave, the b-wave is eliminated.
at the propagation of the a-wave shown in Figure 2. In The d-wave is generated after 1 step. The d-wave propa-
Figure 3, state A1, A2 and A3 advance toward the right at gates in the left direction at 1/1 speed. The d-wave reaches

©ISAROB 2009 282


The Fourteenth International Symposium on Artificial Life and Robotics 2009 (AROB 14th ’09),
B-Con Plaza, Beppu, Oita, Japan, February 5 - 7, 2009

a −1 a −1
cell C1 at time t = am−1 + m−12
+1+ m−1 2
= 2·am−1 . the e- or o-wave is generated on cell C⌊ am−2 ⌋+1 . At time
2
Therefore, Time where the b-, c- and d-waves reciprocate t = am−1 , cell C1 is in a state included F and the b-wave
between the leftmost cell C1 and the o-wave is am−1 steps. is generated on C1 . The b-wave propagates in the right
The b-, c- and d-waves reciprocate b1 − 1 times between direction at 1/1 speed, and the b-wave reaches the e- or o-
the leftmost cell C1 and the o-wave (See Figure 4). When wave generated on cell C⌊ am−2 ⌋+1 . When the e- or o-wave
the d-wave of times b1 − 1 reaches the cell C1 , a state of 2
collides with the b-wave, the b-wave keeps propagating and
C1 changes to a state included F at time t = b1 · am−1 .
the d-wave is generated. The b-wave propagates, and the
C1 C am-1 -1 +1 b-wave reaches the a-wave. When the a-wave collides with
2
t=0 the b-wave, the b-wave is eliminated and the e- or o-wave
is generated on cell C⌊ am−1 ⌋+1 . The d-wave propagates in
࡮࡮࡮࡮࡮

a-wave 2
1 2 3 4 5 6 7 8 9
the left direction at 1/1 speed, and the d-wave reaches the
0 A3 Q Q Q Q Q Q Q Q
1/3 1 W1A1 Q Q Q Q Q Q Q leftmost cell C1 at time t = am−1 +am−2 . The b-, c- and d-
2 W2A2 Q Q Q Q Q Q Q
3 W3A3 Q Q Q Q Q Q Q
waves reciprocate b2 times between the leftmost cell C1 and
t = am-1 4 W4 R A1 Q Q Q Q Q Q the e- or o-wave generated on cell C⌊ am−2 ⌋+1 . When the e-
5 W5 R A2 Q Q Q Q Q Q 2
1/1 6 W6 R A3 Q Q Q Q Q Q or o-wave generated on cell C⌊ am−2 ⌋+1 collides with the b-
7 G R R A1 Q Q Q Q Q 2
b-wave
1 step 8 Q B R A2 Q Q Q Q Q or c-wave b2 times, the e- or o-wave is eliminated. At the
next, The c- and d-waves reciprocate b1 − 1 times between
9 Q R B A3 Q Q Q Q Q
10 Q R R O1A1 Q Q Q Q
1/1
11
12
Q R R O2A2 Q Q Q Q
Q R D O3A3 Q Q Q Q
the leftmost cell C1 and the e- or o-wave generated on cell
t = 2 am-1 d-wave 13 Q D R O3 R A1 Q Q Q C⌊ am−1 ⌋+1 . When The b-, c- and d-waves reciprocate b2
14 t1 R R O3 R A2 Q Q Q 2
1/1 15 t2 C R O3 R A3 Q Q Q times between cell C1 and the e- or o-wave generated on
c-wave 16
17
t2 R C O3 R R A1 Q Q
t2 R R O4 R R A2 Q Q cell C⌊ am−2 ⌋+1 and reciprocate b1 −1 times between cell C1
1 step
b1-1 2
18 t2 R R D R R A3 Q Q
19 t2 R D R R R R A1 Q
and the e- or o-wave generated on cell C⌊ am−1 ⌋+1 , a state
2
20 t2 D R R R R R A2 Q
21 G R R R R R R A3 Q
of the leftmost cell C1 changes a state included F . The
t = 3 am-1 o-wave 22 Q B R R R R R R A1 first some terms and some e- and o-waves are generated in
an internal state. For example, Figure 8 shows generation
࡮࡮࡮࡮࡮

1 step
Figure 5: A of pell sequence (am = 2 · am−1 + am−2 , a1 = 1, a2 = 2).
con guration
of generation 1 2 3 4 5 6 7 8 9 10 11 12
C1C am-2 C am-1
0 A3 Q Q Q Q Q Q Q Q Q Q Q +1 +1
t = am of the term am 1 W1A1 Q Q Q Q Q Q Q Q Q Q t=0 2 2

= b1 am-1 2 W2A2 Q Q Q Q Q Q Q Q Q Q a-wave


(when the term 3 G A3 Q Q Q Q Q Q Q Q Q Q ࡮࡮࡮࡮࡮
1/3
am 1 is an odd 4
5
Q O1A1 Q Q Q Q Q Q Q Q Q
Q O2A2 Q Q Q Q Q Q Q Q Q
Figure 4: Time-space dia- number). 6 t1 O3A3 Q Q Q Q Q Q Q Q Q
7 t2 O4 R A1 Q Q Q Q Q Q Q Q
gram for generation of the 8 t2 D R A2 Q Q Q Q Q Q Q Q
t = am-1
9 G R R A3 Q Q Q Q Q Q Q Q
term am (when the term 10 Q B R R A1 Q Q Q Q Q Q Q 1/1
11 Q R B R A2 Q Q Q Q Q Q Q b-wave
am 1 is an odd number). 12 Q R R B A3 Q Q Q Q Q Q Q
13 Q R R R O1A1 Q Q Q Q Q Q t = am-1+am-2
14 Q R R R O2A2 Q Q Q Q Q Q b2
The first term a1 = c1 is generated in an internal state. 15 Q R R D O3A3 Q Q Q Q Q Q
16 Q R D R O3 R A1 Q Q Q Q Q
A state of the leftmost cell C1 is changed a state included 17 Q D R R O3 R A2 Q Q Q Q Q e-wave
or
F at time t = c1 by counting the c1 − 1 step by using an 18 t1 R R R O3 R A3 Q Q Q Q Q o-wave
19 t2 C R R O3 R R A1 Q Q Q Q t = am-1+b2 am-2
internal state. And the b-wave is generated. Therefore, 1st 20 t2 R C R O3 R R A2 Q Q Q Q
1/1
21 t2 R R C O3 R R A3 Q Q Q Q
Order Linear-Recursive Sequences can be generated on CA 22 t2 R R R O4 R R R A1 Q Q Q c-wave
23 t2 R R R D R R R A2 Q Q Q
in real-time. In Figure 6, we show a number of snapshots 24 t2 R R D R R R R A3 Q Q Q 1/1
of the configuration for b1 = 3 and c1 = 3 from t = 0 to 25
26
t2 R D R R R R R R A1 Q Q
t2 D R R R R R R R A2 Q Q t = 2 am-1+b2 am-2 d-wave
b1-1
29. 27 G R R R R R R R R A3 Q Q
28 Q B R R R R R R R R A1 Q
29 Q R B R R R R R R R A2 Q

3.3 Second Order Linear-Recursive Se-


quences Figure 6: A t = am
con guration of = b1 am-1+b2 am-2
Next, we consider the case of k = 2. We propose the real-time genera-
generation algorithm of second order linear-recursive se- tion of a rst order Figure 7: Time-space
quences which enhance the algorithm described in section linear-recursive diagram for generation
3.2. It is approved that am = b1 · am−1 + b2 · am−2 , a1 = c1 , sequence (am = of a second order linear-
a2 = c2 . Figure 7 shows a time-space diagram for gen-
3  am 1 , a1 = 3). recursive sequence.
eration of a second order linear-recursive sequence. The
a-wave is generated on C1 at time t = 0. We assume that

©ISAROB 2009 283


The Fourteenth International Symposium on Artificial Life and Robotics 2009 (AROB 14th ’09),
B-Con Plaza, Beppu, Oita, Japan, February 5 - 7, 2009

1 2 3 4 5 6 7 8 9 10 11 12
C am-k +1
C am-k+1 +1
0 A3 Q Q Q Q Q Q Q Q Q Q Q 2 2
1 G A1 Q Q Q Q Q Q Q Q Q Q
2 G A2 Q Q Q Q Q Q Q Q Q Q
3 W3E3 Q Q Q Q Q Q Q Q Q Q C1 C am-2 +1
C am-1 +1
4 W4E3A1 Q Q Q Q Q Q Q Q Q 2 2
5 G E3A2 Q Q Q Q Q Q Q Q Q t=0

࡮࡮
6 Q E4A3 Q Q Q Q Q Q Q Q Q
7
8
t1 R O1A1 Q Q Q Q Q Q Q Q
t2 C O1A2 Q Q Q Q Q Q Q Q
t = am-1 e-wave
or
9 t2 R O2A3 Q Q Q Q Q Q Q Q t = am-1+am-k o-wave bk

࡮࡮
10 t2 R O3 R A1 Q Q Q Q Q Q Q ࡮࡮࡮
11 t2 D O4 R A2 Q Q Q Q Q Q Q t = am-1+bk am-k
12 G R O4 R A3 Q Q Q Q Q Q Q
13 Q C O4 R R A1 Q Q Q Q Q Q a-wave
14 Q R O5 R R A2 Q Q Q Q Q Q
15 Q R D B R A3 Q Q Q Q Q Q b-wave
16 Q D R R B R A1 Q Q Q Q Q t = am-1+bk am-k+am-k+1 1/3 bk

࡮࡮࡮࡮࡮
17 t1 R R R R B A2 Q Q Q Q Q 1/1
18 t2 C R R R R E1 Q Q Q Q Q
19 t2 R C R R R E1A1 Q Q Q Q
20 t2 R R C R R E1A2 Q Q Q Q
21 t2 R R R C R E1A3 Q Q Q Q t = am-1+bk am-k+bk-1 am-k+1

࡮࡮
࡮࡮࡮
22 t2 R R R R C E1 R A1 Q Q Q
23 t2 R R R R R E2 R A2 Q Q Q t = am-1+bk am-k+bk-1 am-k+1+
24 t2 R R R R D E3 R A3 Q Q Q
25 t2 R R R D R E3 R R A1 Q Q
+b3 am-
26 t2 R R D R R E3 R R A2 Q Q
27 t2 R D R R R E3 R R A3 Q Q
28 t2 D R R R R E3 R R R A1 Q
29 G R R R R R E3 R R R A2 Q
30 Q C R R R R E3 R R R A3 Q

Figure 8: A con guration of real-time generation of t = am-1+bk am-k+bk-1 am-k+1+ b2


pell sequence (am = 2  am 1 + am 2 , a1 = 1, a2 = 2). +b3 am- +am-2
࡮࡮࡮࡮࡮

3.4 kth Order Linear-Recursive Se-


quences
t = am-1+bk am-k+bk-1 am-k+1+
Next, we generalize the generation algorithm described +b3 am- +b2 am-2
in section 3.3, and propose the generation algorithm of
kth Order Linear-Recursive Sequences. Figure 9 shows a
c-wave
time-space diagram for generation of a kth order linear-
1/1
recursive sequence. The a-wave is generated on C1 at
time t = 0. We assume that the e- or o-waves are gen-
erated on cell C⌊ am−k ⌋+1 , C⌊ am−k+1 ⌋+1 , · · ·, C⌊ am−3 ⌋+1
2 2 2
and C⌊ am−2 ⌋+1 . At time t = am−1 , cell C1 is in a state
2 d-wave
included F and the b-wave is generated on C1 . The b-wave
1/1
propagates in the right direction at 1/1 speed, and the b- t = 2 am-1+bk am-k+bk-1 am-k+1+ b1-1
wave reaches the e- or o-wave generated on cell C⌊ am−k ⌋+1 . +b3 am- +b2 am-2
2
When the e- or o-wave collides with the b-wave, the b-wave
keeps propagating and the d-wave is generated. The b-
࡮࡮࡮࡮࡮

wave propagates by passing the e- or o-waves generated on


cell C⌊ am−k+1 ⌋+1 , · · ·, C⌊ am−3 ⌋+1 , and the b-wave reaches
2 2
the a-wave. When the a-wave collides with the b-wave,
the b-wave is eliminated and the e- or o-wave is generated
on cell C⌊ am−1 ⌋+1 . The d-wave propagates by passing the
2
e- or o-waves in the left direction at 1/1 speed, and the d-
wave reaches the leftmost cell C1 at time t = am−1 +am−k .
t = am= b1 am-1+b2 am-2+
The b-, c- and d-waves reciprocate bk times between the bk-1 am-k+1+bk am-k
leftmost cell C1 and the e- or o-wave generated on cell
C⌊ am−k ⌋+1 . When the e- or o-wave generated on cell
2 Figure 9: Time-space diagram for generation of a kth
C⌊ am−k ⌋+1 collides with the b- or c-wave bk times, the
2 order linear-recursive sequence.
e- or o-wave is eliminated. At the next, The c- and d-

©ISAROB 2009 284


The Fourteenth International Symposium on Artificial Life and Robotics 2009 (AROB 14th ’09),
B-Con Plaza, Beppu, Oita, Japan, February 5 - 7, 2009

waves reciprocate bk−1 times between the leftmost cell C1 algorithm of Fibonacci sequence on CA is not exist. A
and the e- or o-wave generated on cell C⌊ am−k+1 ⌋+1 , re- consists of an infinite array of finite state automata A =
(Q, δ, F ), where Q = {Q, A, B, C, D}, F = {A}. We show
2
ciprocate bk−2 times between the leftmost cell C1 and the
e- or o-wave generated on cell C⌊ am−k+2 ⌋+1 , · · ·, recip- that Fibonacci sequence can be generated in real-time by
2 a CA with 5 states that is given in Table 1. In Figure 11,
rocate b2 times between the leftmost cell C1 and the e-
we show a time-space diagram for real-time generation of
or o-wave generated on cell C⌊ am−2 ⌋+1 and reciprocate
2 Fibonacci sequence.
b1 − 1 times between the leftmost cell C1 and the e- or
o-wave generated on cell C⌊ am−1 ⌋+1 . At time t = am =
2
b1 · am−1 + b2 · am−2 + · · · + bk · am−k , a state of the leftmost Table 1: Transition rules for real-time generation of
cell C1 changes a state included F . The first some terms Fibonacci sequence.
and some e- and o-waves are generated in an internal state.
For example, Figure 10 shows generation of tetranacci se- Right State Right State Right State

quence (am = am−1 + am−2 + am−3 + am−4 , a1 = 1, a2 =


Q Q A B C D
A Q A B C D
B Q A B C D
2, a3 = 4, a4 = 8). Q Q Q Q C Q Q Q Q Q Q B D
A B Q D A A C A C C C D

Left State

Left State

Left State
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 B Q B A B C
0 A3 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q
1 G A1 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q C Q D C D C C B
2 G A2 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q
3 Q t1 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q D B D A B A A A D C B B B B
4 G t1 A1 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q
5 Q t2 A2 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q A Q Q A A Q
6 Q t3 E1 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q
7 Q t4 E1A1 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q
8 G t2 E1A2 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Right State Right State
9
10
C2 t1 E1A3 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q
t2 E11E2 R A1 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q
C Q A B C D
D Q A B C D
11 C3 E7 E1C1A2 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q
12 Q E8 E1 R E1 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q D D Q D Q C C
13 Q E7 E3 R E1A1 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q
14 Q E9 E4 R E1A2 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q A D Q C C A C A A A
15 G E7 E4 R E1A3 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q
Left State

Left State
16 t1 E10E4 R E1 R A1 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q B D C C B D C
17 C2 R E5 R E1 R A2 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q
18 t2 C2 E4C1 E1 R A3 Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q C D C C C C C D D
19 t2 R E6 R E2 R R A1 Q Q Q Q Q Q Q Q Q Q Q Q Q Q
20 t2 D2 E7 R E1 B R A2 Q Q Q Q Q Q Q Q Q Q Q Q Q Q D A D D D D B D D D D
21 C3 R E7 R E1 R B A3 Q Q Q Q Q Q Q Q Q Q Q Q Q Q
22 Q C3 E7 R E1 R R O1A1 Q Q Q Q Q Q Q Q Q Q Q Q Q A
23 Q R E8 R E1 R R O1A2 Q Q Q Q Q Q Q Q Q Q Q Q Q
24 Q R E7C3 E1 R R O1A3 Q Q Q Q Q Q Q Q Q Q Q Q Q
25 Q R E7 R E3 R R O1 R A1 Q Q Q Q Q Q Q Q Q Q Q Q
26 Q R E7D3 E4 R R O1 R A2 Q Q Q Q Q Q Q Q Q Q Q Q
27 Q R E9 R E4 R R O1 R A3 Q Q Q Q Q Q Q Q Q Q Q Q
28 Q D3 E7 R E4 R R O1 R R A1 Q Q Q Q Q Q Q Q Q Q Q
29
30
G R E7 R E4 R R O1 R R A2 Q Q Q Q Q Q Q Q Q Q Q
t1 C1 E7 R E4 R R O1 R R A3 Q Q Q Q Q Q Q Q Q Q Q
Real-time generation of Fibonacci sequence is described
31
32
t1 RE10 R E4 R R O1 R R R A1 Q Q Q Q Q Q Q Q Q Q
t1 D1 R C1 E4 R R O1 R R R A2 Q Q Q Q Q Q Q Q Q Q in terms of 5 waves: a-wave, b-wave, d-wave, we-wave, wo-
33 C2 R R R E5 R R O1 R R R A3 Q Q Q Q Q Q Q Q Q Q
34 t2 C2 R R E4C1 R O1 R R R R A1 Q Q Q Q Q Q Q Q Q wave. Fibonacci sequence is 2nd linear-recursive sequence.
35 t2 R C2 R E4 R C1O1 R R R R A2 Q Q Q Q Q Q Q Q Q
36 t2 R R C2 E4 R R O2 R R R R A3 Q Q Q Q Q Q Q Q Q Therefore, When each the we- or wo-wave collide with the
37 t2 R R R E6 R R O1 B R R R R A1 Q Q Q Q Q Q Q Q
38
39
t2 R R D2 E7 R R O1 R B R R R A2 Q Q Q Q Q Q Q Q
t2 R D2 R E7 R R O1 R R B R R A3 Q Q Q Q Q Q Q Q
b- or c-wave 1 time, the we- or wo-wave is eliminated. The
40
41
t2 D2 R R E7 R R O1 R R R B R R A1 Q Q Q Q Q Q Q
C3 R R R E7 R R O1 R R R R B R A2 Q Q Q Q Q Q Q
initial configuration is the leftmost cell C1 takes state D
42
43
Q C3 R R E7 R R O1 R R R R R B A3 Q Q Q Q Q Q Q
Q R C3 R E7 R R O1 R R R R R R O1A1 Q Q Q Q Q Q
and other cells take a quiescent state Q. At time t = 0, the
44 Q R R C3 E7 R R O1 R R R R R R O1A2 Q Q Q Q Q Q
45 Q R R R E8 R R O1 R R R R R R O1A3 Q Q Q Q Q Q a-wave is generated on the leftmost cell C1 . The a-wave
46 Q R R R E7C3 R O1 R R R R R R O1 R A1 Q Q Q Q Q
47 Q R R R E7 R C3O1 R R R R R R O1 R A2 Q Q Q Q Q propagates in the right direction at 1/3 speed. State B,
48 Q R R R E7 R R O3 R R R R R R O1 R A3 Q Q Q Q Q
49
50
Q R R R E7 R R O4 R R R R R R O1 R R A1 Q Q Q Q
Q R R R E7 R D3O5 R R R R R R O1 R R A2 Q Q Q Q
State C and State D are used for the propagation of the
51
52
Q R R R E7D3 R O5 R R R R R R O1 R R A3 Q Q Q Q
Q R R R E9 R R O5 R R R R R R O1 R R R A1 Q Q Q
a-wave. At time t = 0, δ(C, Q, Q) = B are applied in cell C2 .
53
54
Q R R D3 E7 R R O5 R R R R R R O1 R R R A2 Q Q Q
Q R D3 R E7 R R O5 R R R R R R O1 R R R A3 Q Q Q
At the next step, a state of C2 changes to B. At time t = 1,
55 Q D3 R R E7 R R O5 R R R R R R O1 R R R R A1 Q Q
56 G R R R E7 R R O5 R R R R R R O1 R R R R A2 Q Q δ(A, B, Q) = C are applied in cell C2 . At the next step, a
57 t1 C1 R R E7 R R O5 R R R R R R O1 R R R R A3 Q Q
58 t1 R C1 R E7 R R O5 R R R R R R O1 R R R R R A1 Q state of C2 changes to C. At time t = 2, δ(A, C, Q) = D are
59 t1 R R C1 E7 R R O5 R R R R R R O1 R R R R R A2 Q
60 t1 R R RE10 R R O5 R R R R R R O1 R R R R R A3 Q applied in cell C2 . At the next step, a state of C2 changes
to D. At time t = 3, δ(D, Q, Q) = B are applied in cell C3 .
Figure 10: A con guration of real-time generation of At the next step, a state of C3 changes to B. The a-wave
tetranacci sequence (am = am 1 + am 2 + am 3 + propagates by repeating the application of these transition
am 4 , a1 = 1, a2 = 2, a3 = 4, a4 = 8). rules. State A and State D are used for the propagation
of the b-wave. State C is used for the propagation of the
d-wave. The first 5 terms, the we-wave generated on cell
C5 and the d-wave to generate the 6th term are generated
with an internal state. At time t = 11, the d-wave is gener-
3.5 Fibonacci Sequence ated on cell C3 . The d-wave propagates in the left direction
In this section, we show real-time generation algorithm at 1/1 speed, and reaches the leftmost cell C1 . When the
of Fibonacci sequence. In a past research, Arisawa showed d-wave reaches the leftmost cell C1 , δ(*, Q, C) = A are ap-
that Fibonacci sequence can be generated in 2 linear-time plied in cell C1 . At time t = 13, a state of C1 changes to
by a CA with 9 states. However, real-time generation A, and the b-wave is generated. The b-wave propagates in

©ISAROB 2009 285


The Fourteenth International Symposium on Artificial Life and Robotics 2009 (AROB 14th ’09),
B-Con Plaza, Beppu, Oita, Japan, February 5 - 7, 2009

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

t=0
C1 C5 C7 C11 0 D Q Q Q Q Q Q Q Q Q Q Q Q Q Q
1 A B Q Q Q Q Q Q Q Q Q Q Q Q Q
2 A C Q Q Q Q Q Q Q Q Q Q Q Q Q
3 A D Q Q Q Q Q Q Q Q Q Q Q Q Q
4 Q C B Q Q Q Q Q Q Q Q Q Q Q Q
5 A Q C Q Q Q Q Q Q Q Q Q Q Q Q
6 Q D D Q Q Q Q Q Q Q Q Q Q Q Q
7 Q C B B Q Q Q Q Q Q Q Q Q Q Q
8 A Q B C Q Q Q Q Q Q Q Q Q Q Q
9 Q Q B D Q Q Q Q Q Q Q Q Q Q Q
10 Q Q D D B Q Q Q Q Q Q Q Q Q Q
11 Q Q C D C Q Q Q Q Q Q Q Q Q Q
12 Q C D D A Q Q Q Q Q Q Q Q Q Q
t = 13 13 A D D D A B Q Q Q Q Q Q Q Q Q
we-wave 14 Q A D D A C Q Q Q Q Q Q Q Q Q
15 Q Q A D A D Q Q Q Q Q Q Q Q Q
16 Q Q Q A A C B Q Q Q Q Q Q Q Q
17 Q Q Q Q C Q C Q Q Q Q Q Q Q Q
a-wave 18 Q Q Q C D D D Q Q Q Q Q Q Q Q
b-wave 19 Q Q C D D D B B Q Q Q Q Q Q Q
1/1 20 Q C D D D D B C Q Q Q Q Q Q Q
t = 21 1/3 21 A D D D D D B D Q Q Q Q Q Q Q
22 Q A D D D D B D B Q Q Q Q Q Q
wo-wave 23 Q Q A D D D B C C Q Q Q Q Q Q
24 Q Q Q A D D B C D Q Q Q Q Q Q
b-wave 25 Q Q Q Q A D B C C B Q Q Q Q Q
26 Q Q Q Q Q A B C C C Q Q Q Q Q
1/1
27 Q Q Q Q Q Q D C C D Q Q Q Q Q
28 Q Q Q Q Q Q C D C C B Q Q Q Q
29 Q Q Q Q Q C D D D C C Q Q Q Q
30 Q Q Q Q C D D D D D D Q Q Q Q
d-wave
31 Q Q Q C D D D D D D B B Q Q Q
1/1 32 Q Q C D D D D D D D B C Q Q Q
t = 34 33
34
Q
A
C
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
B
B
D
D
Q
B
Q
Q
Q
Q
35 Q A D D D D D D D D B C C Q Q
36 Q Q A D D D D D D D B C D Q Q

Figure 11: Time-space diagram for real-time genera-


tion of Fibonacci sequence. Figure 12: A con guration of real-time generation of
Fibonacci sequence.

the left direction at 1/1 speed, and reaches the we-wave References
generated on cell C5 at time t = 17. When the we-wave
collides with the b-wave, the we-wave is eliminated, the d- [1] M. Arisawa; On the generation of integer series by the
wave is generated and the b-wave keeps propagating. The one-dimensional iterative arrays of finite state machines (in
Japanese), The Trans. of IECE, 71/8 Vol. 54-C, No.8, pp.759-
d-wave reaches the a-wave. When the a-wave collides with 766, (1971).
the b-wave, the b-wave is eliminated, the wo-wave is gener- [2] P. C. Fischer; Generation of primes by a one-dimensional real-
ated. The d-wave generated on cell C5 reaches the leftmost time iterative array. J. of ACM, Vol.12, No.3, pp.388-394,
cell C1 at time t = 21. When the d-wave reaches the left- (1965).
most cell C1 , a state of C1 changes to A, and the b-wave [3] I. Korec; Real-time generation of primes by a one-dimensional
cellular automaton with 9 states. Proc. of MCU ’98, pp.101-
is generated. Therefore, Fibonacci sequence can be gen- 116, (1998).
erated by repeating the propagation of 5 waves. We have
[4] N. Kamikawa and H. Umeo; Some Algorithms for Real-Time
implemented the algorithm on a computer. We have tested Generation of Non-Regular Sequences on One-Bit Inter-Cell-
the validity of the rule set from t = 0 to t = 20000 steps. Communication Cellular Automata, SICE Annual Conference
2007, pp.953-958, (2007).
We obtain the following theorem. In Figure 12, we show a
number of snapshots of the configuration from t = 0 to 36. [5] N. Kamikawa and H. Umeo : Some state-efficient algorithms
for real-time generation of non-regular sequences on cellular au-
tomata. The Thirteenth International Symposium on Artificial
Life and Robotics (AROB 13th ’08), pp.47-50, (2008).
[6] N. Kamikawa and H. Umeo : A Note on Sequence Generation
Power of Two-States Cellular Automata. SICE Annual Confer-
4 Conclusions ence 2008, pp.3315-3320, (2008).

We have studied a sequence generation problem on CA.


A design of algorithm for real-time generation of linear-
recursive sequences on CA has been given. We have shown
that Fibonacci sequence can be generated in real-time by
a CA with 5 states. A future study in sequence generation
problem on CA is to compare sequence generation power
of CA and sequence generation power of 1-bit inter-cell-
communication CA.

©ISAROB 2009 286

You might also like