# On real-time cellular automata and trellis automata

Post on 06-Jul-2016

216 views

Embed Size (px)

TRANSCRIPT

Acta Informatica 21, 393-407 (1984)

9 Springer-Verlag 1984

On Real-Time Cellular Automata and Trellis Automata*

C. Choffrut 1 and K. Culik II 2

1 Universit~ Paris 7, U.E.R. de Math~matiques, Tours 55-56, 2 P1. Jussieu, F-75221 Paris Cedex 05, France 2 Department Computer Science, University of Waterloo, Waterloo, Ontario N2L 3G1, Canada

Summary . It is shown that f(n)- t ime one-way cellular au tomata are equiva- lent to f (n)- t ime trellis automata , the real-time one-way cellular au tomata languages are closed under reversal, the 2n-time one-way cellular au tomata are equivalent to real-time cellular au tomata and the latter are strictly more powerful than the real-time one-way cellular automata.

1. Introduction

Motivated by the advent of VLSI technology there has been increasing interest in devices for parallel computation, in particular systolic arrays, cf. [10]. The simplest and presently probably practically the most important one is a 1- dimensional array (vector) of uniformly interconnected identical processors working in synchronous manner. Various abstract models of this type which differ in the way the inputs are read and the processors are interconnected have been studied already for long time. We will compare the computat ional power of the real t ime (bounded) cellular au tomata ([8, 1, 12, 13, 9]), the real t ime and 2n-time one-way (bounded) cellular au tomata ([8, 6, 14]), and the real-time iterative arrays ([4, 7, 11]). We will also show that, for an arbitrary time function f(n), the f (n)- t ime one-way (bounded) cellular au tomata (OCA) are equivalent to the f(n)- t ime homogenous trellis au tomata studied in I2] and [3]. In Sect. 2 we introduce a uniform and simple formalsism for all the models considered. In the next section we prove some technical results, namely that for the different devices (except for the iterative arrays) the notion for a language to be f (n)- t ime recognizable is defined modulo a constant. This enables us to show that the real-time OCA are equivalent to the real-time homogenous trellis automata , and that the real-time OCA languages are closed under reversal, an open problem stated in [6].

* This work has been done during the second author's visit at the University of Paris and during both authors' visit at the Institute f'tir Informationsverarbeitung Graz, Austria

394 C. Choffrut and K. Culik II

In the last section we show that 2n-OCA's are equivalent to the real-time CA's, which completes the result of [14] where it was proved only in one direction. Our proofs are very transparent because of the trellis-like representa- tion of both types of devices. We also compare the real-time computational power of IA's, CA's and OCA's. Because we are considering (as customary) CA's with output at the right-most cell we have to consider iterative arrays which read the input word backwards (IA). We show that real-time CA's are strictly more powerful than IA's and OCA's and that the last two devices are incomparable in recognition power.

2. Preliminaries

Throughout this paper, A is a fixed finite nonempty alphabet not containing the symbol # and A o ~_ A a distinguished subset.

The free monoid (resp. semigroup) generated by A is denoted by A* (resp. A +) and the empty word of A* is denoted by I : A = A * \ {1}.

Given any word w e A * we denote by Iwl its length and by ~ its mirror image i.e. the word 1 if w = l , and otherwise the word a~a,_ 1. . .a2a I if w = a l a 2 . . . a n _ l a ~ (aeA, l

On Real-Time Cellular Automata and Trellis Automata 395

t=0

t=l

t=2

.2

E Fig. 1

words of 2~ for which # f ( l ~ l ) ( w ) ends with a letter in Ao:

L = {w~27 [g:~lwb(w)~A* Ao}.

We also say that L is a f(n)-t ime CA language. Particularly important is the case when f ( n ) = n - 1 . Then L is a real-time CA (in short r.t. CA) lan- guage.

It is often convenient to represent the functioning of a cellular au tomaton on a time-space diagram (cf. e.g. 1"7] and [13]) each row corresponding to the configuration at a certain time t > 0 of a n-cell array. At t ime t = 0 , the i-th cell contains the i-th letter of the input word w. As time goes by, the different values are computed according to the transition function M. We denote by c~ the value of the i-th cell at time t > 0.

2.2. One-Way Cellular Automata

In a cellular au tomaton the transition of every cell depends upon both left and right neighbours. In a one way cellular au tomaton it only depends upon its right neighbour (and itself). Thus a one way cellular automaton (OCA for short) is a triple O=(A, Ao, R ) where R: (Au{~})2- -*Au{~#} is a transition function satisfying R(a,b)= 4~ iff a = b = #r

For any word a I ... annA + we define:

p(a l )=R(a l , # ) if n = 1

p(al ... a , ) = R ( a x, a2) R(a 2, a3) ... R(a,_ 1, a~)R(a,, # ) otherwise.

Then p is a length-preserving mapping of A into itself. Given a function f : N ~ N and a subset Z,~_A, the language L ~ Z + is

recognized by 0 in time f (n) if the words w ~ L are exactly those words of 27* for which pfdwl)(w) s t a r t s with a letter in A 0

L = {w~Z,+lp:(l'~l)(w)~Ao A*}.

We also say that L is a f(n)-time O CA language. In the special case when f (n ) = n - 1, L is a real-time OCA (in short r.t. OCA) language.

Observe that OCA's recognize "on the left" (first letter) while CA's recog- nize on the right (last letter).

396 C. Choffrut and K. Culik II

As for CA's, we may represent the functioning of an OCA on a time-space diagram:

9 ~ .

t=l

t=2

t=0

F i g . 2

2.3. Trellises

A trellis is a triple z=(A , Ao, F ) where F: (Au{~})2----~Au{~} is a mapping satisfying F(a,b)= # iff a = b = ~.

Given any word w = a I ... a,~(A u { :~ })n n=>2, we define:

(p(al ... an)= F(al, az) ... F(an_ 1,a,).

With the convention (pk(w)=w whenever k = 0 and w6(A u{~: })+, it is easy to check by induction on the length, that T~0k(w)[=[wl--k holds for all O

On Real-Time Cellular Automata and Trellis Automata 397

E

Fig. 3

2.4. Iterative Arrays

By an iterative array we mean a one way infinite sequence of cells each one being in a given state and communicat ing with itself and its right and left neighbours, except for the leftmost cell which has no left neighbour and communicates with the external world (see I-4]).

The computat ion on such a device works as follows. At the beginning, all cells are in a special "quiescent" state which we denote by ~ . Then, at each time step, every cell changes state according to its own current state and the states of its right and left neighbours, except the left most cell "which reads a new letter of the word being processed, changes states according to this letter, its own current state and the state of its right neighbour and outputs an accept or reject message. In a quiescent state, a cell may enter a new distinct state only if one of its neighbours is in a non quiescent state. The computat ion is real time since the recognition is fulfilled just after the last letter of the word has been read.

leftmost cell

Fig. 4

As in the preceding devices, a computat ion can be represented by a time- space diagram. The figure below shows the "useful" part of a computat ion at time t=4 .

Formally, we consider an alphabet B disjoint from A, a subset B o _ B and assume ~ r w B. An iterative array is a quadrupole I =(A,B,B o, N) where N: ( A w B w { ~ } ) x ( B u { # ~ } ) 2 ~ B u { ~ } is a mapping satisfying N(~:, 4~, ~ ) = ~:.

398 C. Choffrut and K. Culik II

t=O 01

t= l a 2

t=2 0 3

t=3 az,

t=z. a c c , or re j .

Fig. 5

Given any word w = a 1 .. .a,,b 1 . . . b m s A + B * (n>0, re>O, a i eA , l < i < n and bjeB, j < m ) define:

v(al . . . a , ) = a l . . . a , _ l N ( a , , # , # ) if m=0 ,

v ( a l . . . a , b l ) = a l . . . a , _ l N ( a , , b l , # ) N ( b l , # , # ) if m = l , and

v(a 1 ... a,,b 1 ... bm)=a 1 ... a,,_ 1M(a,, ,bl, b2).. . N (bm_s,b,, . ~ ) N (b,,,, 4~, 4#)

if m>2 . Given a subset X~_A, a language Lc_S_, + is recognized by I if L is exactly

the set of those words w e s + such that vlwl(w) starts with a letter in B 0 (observe that we consider here only the real time version of IA's).

3. Some Technical Results

In this section we prove for the different devices (except for the IA's), that the notion for a language to be f(n)- t ime recognizable is defined modulo a con- stant. This enables us to show that trellises and OCA's are two different formalisms of the same object, and in particular that r.t. OCA's are equivalent to r.t. trellises. As a consequence, OCA languages are closed under reversal, which was left as an open problem in [6].

Lemma 1. Let f : N- -*N be a function satisfying f (n )>=n-1 . Then f(n)- t ime CA's are equivalent to f ( n ) + 1 time CA's.

Observe that the restriction f (n )>=n-1 is necessary, since the output at time n - 2 is independent of the first letter.

Proof. If L is a f(n)- t ime CA language, in order to convert it into a f ( n ) + l - time CA language it suffices to introduce a delay of one unit of time. This can be done by considering the set B = A wA, where A is a disjoint copy of A ( ~ A

On Real-Time Cellular Automata and Trellis Automata 399

B

corresponding bijectively to a~A). By convention we set # = # and we define a new transition function M': (B w { # })3 ~ B w { # } by setting:

i) M'(x, # , z ) = # , for x, z ~ B u { # } ;

i i ) ' - M (a , b , c ) = b a n d ' - - M (a,b,c-)=M(a,b,c) for a, c s A w { ~ } , b~A; iii) M' (x, y, z) = b o, for some arbitrary bo s B, otherwise. Assume now that the language L is recognizable by a f (n )+ 1 time CA.

The simulation by a f(n)-time CA is best understood in terms of time space representation. We denote by c'~ and c'~' respectively the values of the i-th cell at time t > 0 during the computation on the f ( n ) + l CA and the f(n)-CA. By

l convention we set c i - # whenever i< 1 or i>n, and we define:

c'i~ =c ~ l

400 C. Choffrut and K. Culik 1I

ii) M'(a,b,c)=((a,b,c),F) where F: (A~){~})2---~A is a par t ia l function defined as follows:

- if a = # , F(#,x)=M(#,M(a,b ,c) ,M(b,c ,x)) for all x ~ A u { # } - if c = # , F(x, ~;)=M(M(x,a,b),M(a,b,c), # ) for all x ~ A w { # } - otherwise F(x, y) = M(M(x, a, b), M(a, b, c), M(b, c, y))

iii) M ' (((u 1, u 2, ua), F), ((vl, v 2, va), G), ((w 1, w 2, w3), n) ) = ((u 1, M(u 2 , v 2, w2), K) where

K (x, y) = M (F (x, v3), M (u2, v2, w2), n (v I, y))

whenever F(x, v3) and H(vl, y) are defined. iv) M'(x,y,z)=b 0 for an arbi t rary boB, otherwise. [ ]

L e m m a 2. Let f : N--*N be a function satisfying f ( n ) > n - 1 . Then f(n)-time trellises are equivalent to f (n)+ 1-time trellises.

Proof Assume F is a t ransi t ion funct ion defining L as a f (n ) - t ime trellis language. T o convert it into a f ( n ) + l t ime trellis language, it suffices to in t roduce a delay of one unit of time. This can be done as in L e m m a 1 by consider ing the set B = A w , 4 where A is a disjoint copy of A. By convent ion we set # = # . Then we define the new transi t ion function G: ( B w { ~ } 2 ~ B w { ~ } by setting:

i) G ( ~ , ~ ) =

ii) G(a,b)=~ and G(~,b)=F(a,b) for aeA, b e A w { # } iii) G(x,y)= b o for some arb i t ra ry boeB otherwise. It m a y be verified easily by induction that

Gk+ 1 (w # fdwl)-Iwl + 2) = Fk(w ~: f(Iwl)- Iwl + t)

holds for all k > 0 . It then suffices to set B 0 = , 4 0. Conversely, denote by F the function defining L as a (f(n)+ 1)-time trellis

language. The idea for the trellis recognizing in t ime f(n) is to assume at every t ime tha t the c o m p u t a t i o n hits the right bo rde r of the trellis. Thus we will define for example at the first step: G(a,b)=(F(a,b), F(F(a,b), F(b, #))) where the second c o m p o n e n t has the following mean ing (see Fig. 7): if b is the r igh tmost letter of the word then, in the compu ta t i on of L as a f(n)+ 1 t ime language, there exists an extra occurrence of # and the value of the lowest cell of the figure is F(F(a,b), F(b, ~)).

current computed value ~ . ~ . ~ ~

Fig. 7

On Real-Time Cellular Automata and Trellis Automata 401

In other words, we are guessing one step ahead. Formally, we consider B =AL~A ~ and B o = B n ( A x A o ) . Then the new transition function G: (B w { # })2 ~ B L~ { # } is defined by setting:

i) G(~:, ~:)= ~ : ii) G(a,b)=(F(a,b), F(F(a,b), F(b, ~))) for aEA b~Aw{ # } and G((a,b), :~)

=(F(a, 4~ ),F(F(a, ~), ~)), for a, bsA; iii) G((a,b),(c,d))=(F(a,c),F(F(a,c),d)), for a, b, c, dsA; iv) G(x,y)=b o for some arbitrary boEB, otherwise. []

Lemma 3. Let f : N ~ l q satisfy f(n)>_n-1 for all n>0. Then f(n)-time OCA's are equivalent to f (n)-time trellises.

Proof. The idea is to observe that those objects yield two equivalent represen- tations of the same computation

\ 'V I

completion of the diagram

computation on a f{n)-OCA equivatent computation on a f(n)-tre{lis

Fig. 8 Fig. 9

Intuitively, the equivalence is shown by first "completing" the useful part of the time-space diagram of the OCA in order to form a triangle and then by

i shifting the i-th row to the right by ~ times the distance of two consecutive

cells. Formally, assume that the transition functions R and F of the OCA and

the trellis respectively, are the same. Consider a word w ~ A of length Iwl=n. Then for all integers O < k < f ( n ) - n + 1 we have:

q~(w ~ I ( . ) - . + i ) = pk(w) # ,~(.)-. ~ -~

C. Choffrut and K. Culik II 402

In particular we obtain:

~f(n)--n.+ X(w:~ f(n)--n+ 1)~.pf(n)--n+ 1 (W)~A+"

Because of F = R we get:

~ps~")(w4~St")-"+l)=pSC")(w) as claimed. []

From Lemma 3 follows.

Corollary 1. Real-time OCA's are equivalent to real time trellises.

Corollary 2. Real-time OCA languages are closed under reversal.

Proof. This follows from the fact that real t ime trellis languages are closed under reversal.

4. Comparison of the Different Recognition Devices

Lemma 3 of last section established the equivalence between OCA's and trellises. We are thus essentially left with three different devices: CA's, OCA's and IA's.

Here we prove that 2n-OCA's are equivalent to n-CA's, which completes the result of [14"] where it was proved only in one direction. This result could actually be drawn, with some modifications of the original proof, from the Theorem 2 of I-5].

We also compare IA's and real time CA's and OCA's. We show that r.t. CA's are strictly more powerful than IA's and r.t. OCA's, and that these last two devices are incomparable in recognition power. Since we are considering (as common) the CA's with the output at the right most cell we have to consider IA's which read the input word backwards.

Theorem 1. 2 n-O CA's are equivalent to real time CA's.

Proof. In order to prove that 2n-OCA's are at least as powerful as real time CA's, we use the time space representation on a (n -1 )...