You are on page 1of 17

International Journal of Foundations of Computer Science Vol. 13 No.

5 (2002) 733-749
© World Scientific Publishing Company

PARALLEL FINITE AUTOMATA SYSTEMS


COMMUNICATING BY STATES*

CARLOS MARTIN-VIDE
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

Research Group in Mathematical Linguistics


Rovira i Virgili University
Pea. Imperial Tarraco 1, ^3005 Tarragona, Spain
cmvQcorreu.urv.es

ALEXANDRU MATEESCU
Faculty of Mathematics, University of Bucharest,
Str. Academiei 14, 70109, Bucharest, Romania
mateescuQfuninf.cs.unibuc.ro

VICTOR MITRANA
Faculty of Mathematics, University of Bucharest,
Str. Academiei 14, 70109, Bucharest, Romania
mitranaQfuninf.cs.unibuc.ro

Received 29 November 2000


Revised 13 December 2001
Communicated by O. H. Ibrra

ABSTRACT
An accepting device based on the communication between finite automata working
in parallel is introduced. It consists of several finite automata working independently
but communicating states to each other by request. Several variants of parallel com-
municating finite automata systems are investigated from their computational power
point of view. We prove that all of them are at most as powerful as multi-head finite
automata. Homomorphical characterizations of recursively enumerable languages are
obtained starting from languages recognized by all variants of parallel communicating
finite automata systems having at most three components. We present a brief compar-
ison with the parallel communicating grammar systems. Some remarks suggesting that
these devices might be mildly context-sensitive ones as well as a few open problems and
directions for further research are also discussed.
Keywords: Parallel communicating finite automata system, multihead finite automaton,
centralized and non-centralized systems, returning and non-returning systems.

*Work supported by Direccio General de Recerca, Generalitat de Catalunya (programme PIV)


and Academy of Finland, project 137358.

733
734 C. Martin-Vide, A. Mateescu & V. Mitrana

1. Introduction
In many areas of computer science (parallel computers, computer networks,
DNA computing, artificial intelligence) many models based on cooperation and
communication among agents have been reported. The formal language theory
has been involved in most of these circumstances e.g. for modelling aspects whose
essence can be captured at the level of abstract symbol systems, see, e.g., [3], [6],
[14], etc. Thus, in [3] there is introduced the concept of system of grammars, mo-
tivated by the so called "blackboard model" in problem solving theory [6]. Many
grammars working together, following a prescribed strategy, is a grammar system.
Two essentially different strategies are discussed depending on the communication
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

protocol among the components of the system. In the case of cooperating distributed
grammar systems the communication is done by means of the sentential form; all
components may rewrite, in turn, the sentential form according to their own strate-
gies. When a component is active, all the others are inactive. A bit different is
the communication in parallel communicating grammar systems, where the compo-
nents are working in parallel, and from time to time some components ask for the
work of other ones, this system corresponding to a problem solving model called
the classroom model in [3]. This model appears to be suitable for many activities
of one-leader teams. More precisely, a parallel communicating grammar system is
a construct consisting of several usual grammars, working synchronously, each on
its own sentential form, and communicating by request; special (query) symbols are
provided, each query symbol identifying biunivocally a component of the system;
when a component j introduces a query symbol identifying another component i,
the current sentential form of the component i is sent to the component j , where it
replaces the occurrence(s) of the query symbol in the sentential form of component
j . The language generated by a specified component of the system (the master),
after a series of such rewriting and communication steps (each component starts
from its axiom), is the language generated by the system.
Two important classifications of PC grammar systems concern the communica-
tion graph and the returning feature: a system is called centralized when only the
master may introduce query symbols and non-centralized in the non-restricted case;
a system is called returning if after communicating, a component resumes working
from its axiom and non-returning when it has to continue processing the current
string. Many papers were devoted in the last years to the study of PC grammar
systems. We refer to [3] and [4] for details.
Systems of cooperating automata have also been considered as models for some
computing systems, but the strategies of coordinating their work in order to per-
form some computation were very different from those considered in the grammar
systems theory. We mention here two such systems. A so-called multiprocessor
automaton consists of several finite automata, called processors [1], that are co-
ordinated by a central processing unit that decides which processor is to become
active or "frozen" at a given step. Each processor works independently according
to its internal transition function depending only on its internal state and the input
symbol scanned. The central processing unit inspects the states achieved by all
Parallel Finite Automata Systems Communicating by States 735

processors (a frozen processor preserves its internal state and reading head posi-
tion) and determines which processors are active or frozen for the next step. Note
that the states achieved by the processors depend exclusively on their current state
and input symbol. The strategy of cooperation takes into consideration all internal
states at a given step and is limited to timing through which the central unit lets
some processors proceed.
The other extreme is that each automaton is allowed to know the states of all
automata. The transition function of one automaton depends on the input symbol
currently read and the states of all automata determining a move of its reading head
and a new state. An equivalent form of this system is the multihead automaton
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

that reduces all components to just reading heads controlled by a single processing
unit with finitely many internal states.
Only one cooperating mechanism for recognizing, working under strategies sim-
ilar to those in grammar systems area, has been considered so far [5], in spite of the
fact that in practice we deal more with accepting processes than with generating
ones. In the present paper we are going to develop systems of finite automata work-
ing in parallel on the same input tape and communicating by states, in order to
recognize the word placed on the common input tape. Such a device lies somewhere
in-between the two extreme situations briefly presented above. Furthermore, the
working strategy is very similar to that of parallel communicating grammar systems
mentioned above.
In the non-centralized case, every component is entitled to request the state
of any other component; the contacted component communicates its current state
and remains in the same state (in the non-returning variants) or enters again the
initial state (in the case of returning variants). In the centralized variants only
one component (the master of the system) is entitled to require states from all the
others. We want to stress that each step in an automata system is either a usual
accepting step or a communication one; moreover, the communication steps have
priority to accepting ones. We also want to mention that, whenever a component
requests a state, that state must be communicated.

2. Definitions and Examples


We shall assume the reader to be familiar with the fundamental concepts of
formal language theory and automata theory, particularly the notions of grammars
and finite automata [15].
An alphabet is always a finite set of letters. The set of all words over an alphabet
V is denoted by V*. The empty word is written e; moreover, V+ = V* — {e}. For
a finite set A we denote by card(A) the cardinality of A. Sometimes, for a given
alphabet V and a word x — a\a,2 • •. ani ai G V, 1 < i < n, we write V — {a\a G V}
and x = did2 . . . an.
Here V is a disjoint copy of V.
We proceed now towards the main definition of our paper, namely the concept
of parallel communicating finite automata system.
736 C. Martin-Vide, A. Mateescu & V. Mitrana

A parallel communicating finite automata system of degree n is a construct

A = (V,A1,A2,...,An,K),

where
• V is the input alphabet,

• Ai = (Qi,V,fi,qi,Fi),l < i < n, are finite automata with the set of states
Qi, Qi £ Qi (the initial state of the automaton i), Fi C Q^ (the set of final
states), and fi is the transition mapping of the automaton i defined as follows
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

/i:Q*x(VU{e})—>2*\

Note that Qi are not necessary disjoint sets.

• K = {K±,K2, • • •, Kn} C IJlLi 0« is the set of query states.


The automata Ai,A2,--.,An are called the components of the system A. If
there exists just one 1 < i < n such that K C Qi, then the system is said to
be centralized, the master of this system being the component i. For the sake of
simplicity, whenever a system is centralized, the first component is its master. If
the following conditions

(i) card(fi(s,a)) < 1 for all s G Qi and a eV U {e},


(ii) if card(fi(s,e)) / 0 for some s G Qi, then
card(fi(s,a)) = 0 for all a eV,

are fulfilled for all 1 < i < n, then the automata system is deterministic.
By a configuration of a parallel communicating automata system as above, we
mean an 2n-tuple
(s1,xi,s2,x2,...,sn,xn)
where
- Si is the current state of the component i,
- Xi is the remaining part of the input word which has not been read
yet by the component i, 1 < i < n.
We define two binary relations on the set of all configurations of A in the fol-
lowing way:

(si,Xi,82,X2, • • • ,Sn,Xn) h (pi,2/l,P2,2/2, • • • iPmVn)

iff one of the following two conditions holds:

(i) K n { s i , S 2 , . . . , s n } = 0 and
Xi = diyi, a,i eVU {e}, Pi G /*(si, a*), 1 < i < n
(ii) for all 1 < i < n such that Si — Kji and Sj{ £ K put pi = Sji,
pr — sr, for all the other 1 < r < n, and yt = xt, 1 < t < n.
Parallel Finite Automata Systems Communicating by States 737

(Sl,Xl,S2,X2,...,Sn,Xn) l"r (Pi •> Vl >P2, 2/2, • • • , P n , Vn)

iff one of the following two conditions holds:

{%) K n {si,S2,.--,5„} = 0 and


Xi — aiyi,di eVU {e}, pi e fi(si,cii), 1< i < n
(ii) for all 1 < i < n such that Si = Kj{ and Sj{ £ K put pi = Sj., Pj. = qj{,
p r = sr, for all the other 1 < r < n, and yt = xt, 1 < t < n.

The difference between the two relations defined above may be easily noticed
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

when the current states of some components are query states: these components get
into communication with those components identified by the query states, which
are forced to send their current states, if they are not query states, these states
becoming the new states of the receiver components. The next states of the sender
components remain the same in the case of relation h whereas they become the
initial states when relation h> has been applied.
A parallel communicating automata system whose all moves are based on the
relation h r is said to be returning.
Informally, the language accepted by a PCFAS A, consists of all strings x €V*
such that the system starts in an initial configuration (qi,x,q2,x,... ,qn,x) and
reaches a final configuration, that is a configuration of the form (si, e, 52, e , . . . , s n , e),
with Si G Fi. Formally

Rec(A) = {xeV*\(qi x) h* ( s i , e , S 2 , e , . . . , s n , e ) ,
Si e Fi,l < i < n } ,
Recr(A) = {x e V*\(q!,x,q2,x,... ,qn,x) h* (s1,e,s2,e,... ,sn,e),
Si e Fi, 1 < i < n}.

We shall denote by:

• rcpcfa(n) - a returning centralized parallel communicating finite automata


system of degree n;

• rpcfa(n) - a returning parallel communicating finite automata system of de-


gree n;

• cpcfa(n) - a centralized parallel communicating finite automata system of


degree n;

• pcfa(n) - a parallel communicating finite automata system of degree n.

We add the prefix d in order to denote deterministic variants. If x{n) is a type


of automata system, then X(n) is the class of all languages accepted by automata
systems of type x. For example, RCPCFA(n) is the class of all languages accepted
by rcpcfa(n) automata systems.
738 C. Martin-Vide, A. Mateescu & V. Mitrana

Example 1 Consider the cpcfa(2)

A = ({a,b,c},A1,A2,{K1,K2}),

where A\ and A2 are two deterministic finite automata with e-moves whose transi-
tion mappings are listed below

fi(Qi,e) == K2 f2(Q2,a) =q2,


fi(si,a) == K2 f2(q2,b) = 5i,
fi(Q2,e) == K2 f2(si,b) = «i,
/ l ( * 2 , & ) =~-K2 /2(«1,C) =52,
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

fi(sf,c) == Qf /2(»2,C) =52,


fi(Qf,c) == Qf f2(s2,e) = sf,
f2(sf,e) = sf.

By taking the sets of final states as being F\ = {#/} and F2 = {sf} we get L(A) =
{anbncn\n > 1}7 which is a non-context-free language.
Note that
Lemma 1 1. RCPCFA{n) C i?PCFA(n) and C F C F ^ ( n ) C PCFA(n), for all
n > 1. Moreover, every family X (I), X G {RCPCFA,RPCFA,CPCFA,PCFA},
equals the family of regular languages.
2. X(n) C X(n + 1) /or a// X G {RCPCFA,RPCFA,CPCFA,PCFA}.
3. All the above relations hold for deterministic variants as well.

3. Computational Power
In the first part of this section we compare the computational power of the au-
tomata systems previously introduced with the computational power of multi-head
finite automata. For technical reasons, we shall use here the following definition of
multi-head finite automata.
A (nondeterministic) fc-head finite automaton is a quintuple

A = (k,Q,V,f,q0,F),

where Q,V,qo,F have the same meaning as for a usual finite automaton, and /
is a mapping from Q x (V U {s})k into the subsets of Q. The above definition
is essentially similar to that found in [8] and [9]. Thus, q G f(s,ai,a2,...,ak)
indicates that the automaton in state s each head i reading ai may enter state q.
The input heads are idealized in the sense that they may pass over one another
freely and they are prevented from going off the right end of the input. Moreover,
if a head reads e, it does not move to the right and if it reads a symbol in V, it
moves to the right one square. Acceptance is defined as follows: a string is accepted
if the automaton starts in the initial state with the string on the input tape, all
heads being positioned on the leftmost symbol of the input, and enters, after finitely
many moves, in a final state, the input being completely read by all heads. In all
the other cases, the input string is rejected. For a multi-head finite automaton A
as above denote by Rec(A) the set of all strings accepted by A.
Parallel Finite Automata Systems Communicating by States 739

T h e o r e m 1 1. X{ri) is included in the class of lanaguages accepted by n-head finite


automata for all X G {RCPCFA, RPCFA, CPCFA, PC FA}.
2. X(n) is included in the class of lanaguages accepted by deterministic n-head
finite automata for all X G {D RCPCFA,D RPCFA,DCPCFA,DPCFA}.
Proof. 1. We give the proof for X = RPCFA only; the other cases
may be treated similarly. Let A = (V, Ai, A2,... ,An,K) be a rpcfa(n); A\ —
(Qi, V, fu Qi,Fi), 1 <i <n. Construct the following n-head finite automaton

A= (n,(Q1UK)x(Q2UK)x...x(QnUK),V,f,(q1,q2,...,qn),F1xF2x...xFn),
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

where

f((s1,s2,...,sn),a1,a2,...,an) = {(pi,P2,.. .,Pn)|p» € fi(si,ai),ai G VU{e},


1 < i <n}, iS {s1,s2,...,sn}f]K = 0,
f ((81,82, • • •, sn),e,e,... ,e) = (pi,P2, • • • ,Pn),

{ sj{ £ K, if Si - Kj.
qi, if there exists j such that Sj = K{
Si, otherwise,
for all 1 < i < n.
The idea is very simple; each current state of the multi-head finite automaton
encodes all current states of the automata system. It is easy to see that Recr(A) =
Rec(A).
2. Clearly, A is deterministic if A is deterministic. •
T h e o r e m 2 1. A language is accepted by an n-head finite automaton if and only
if it belongs to PCFA(n).
2. A language is accepted by a deterministic n-head finite automaton if and only
if it belongs to DPCFA(n).
Proof. 1. Let A— (n,Q,V,f,qo,F) be an n-head finite automaton. Construct
the pcfa(n) A = (V, Ai, A2,..., An,K), where Ai = (Qu V, fi, q0, F), where

Qi = K U Q U (Q x (V U {e})1-1) U (Q x (V U {e})1) U X{ U Y{

with
2
' " I {Pl\P eQ,l<i<i-2},i>2,
_ ( <b,i-~
1
" I {*i I i + 1 < i < n},i < n.
The transition mappings fi are defined as follows. We give also some explanations
about the working mode of the system.

% = 1: h(p,a) = {(p,a)},ae V U {e},p G Q,


fi((p,a),e) = {s2},ae V U {e},p G Q,
fi(sj,e) = {s j + i},2< j < n - l ,
740 C. Martin-Vide, A. Mateescu & V. Mitrana

The first component, being in a state from Q, either effectively reads an input
symbol or reads e and "stores" this symbol in the current state. This state is
sent to the second component which has required it. All the other components are
waiting.

i = 2: f2(p,e) = {K1},
f2((p,b),a) = {(p,b,a)}ia,b e V U {e},p e Q,
f2((Pla,b),e) = {s3},a,b e V U {e},p e Q,
f2(sj,e) = { s i + i } , 3 < j <n- 1,
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

f2(sn,e) = {Kn}.

The second component does the same, namely stores, the symbol (possibly the
empty one) read by its reading head in the current state, besides the symbol stored
by the first component, and sends this new state to the third component. Again
the other components, including the first one, are waiting.

2<i <n: fi(p,e) = {pi},


fi(Pj,e) = {Pj+i}, 1 < J < * - 3,
fi(pi-2,e) = {#*-i},
/*((p>ai,a2, • "ai-i)ja) — {(P,ai,a2, • • .a»-i,a)},
a,aj e F U { e } , l <j< i - l , p G Q,
/ « ( ( p , a i , a 2 , . . . a * - i , a i ) , e ) = {si+i},
aj 6 V U {e}, 1 < j < i,p e <9,
fi(sj,e) = {8j + i},i + l < j < n - 1,
fi(sn,e) = {X n }-

The process goes on this way until the last component receives the state which
encodes the state of the first component when the process started as well as all
symbols read, in turn, by all the other components so far.

i =n fn(p,e) = {pi},
fn(Pj,e) = {Pj+i}, 1 < j < n - 3,
fn(Pn-2,e) = {Kn-x},

fn((p, oi, a 2 , • • • fln-i),fl) = {(P, ai, a 2 , . . . a»_i, a)},


a, a, G V U {e}, 1 < j < n - l , p G Q,
/n((p,ai,a2,...an),e) = /(p,ai,a2,...,on).

Now, according to the transition mapping of the n-head automaton the last com-
ponent enters a state from Q which is sent to all the other components at the same
time. Thus, the system simulates a move in the n-head automaton. It follows that
Rec(A) = Rec(A).
2. Note that when A is deterministic, A has the same property. •
Parallel Finite Automata Systems Communicating by States 741

In the sequel we define two operations on words and languages useful in our
considerations. A homomorphism which erases some symbols and leaves unchanged
the others is said to be a projection. A projection h : (V U V')* —> V* that erases
the symbols in V only is denoted by pry. The other operation is a wellknown
operation in formal language theory and in parallel programming theory, called
shuffle. A shuffle of two strings is an arbitrary interleaving of the substrings of the
original strings, like shuffling two decks of cards. More precisely, for two strings
x,y E V* and two symbols a,b eV,

(i) x\lle = eUlx = x,


by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

(ii) ax Ml by — a(x ill by) U b(ax ill y).

For two languages L\, L2 we define

Li 111 L2 = (J x ill y.
xeLi,yeL2

The following representation of recursively enumerable languages is well known, see,


e.g., [14]:
Theorem 3 Each recursively enumerable language L C T* can be written as L —
prT(TS(V) fl R), where V is an alphabet including T, R is a regular language
and TS(V) is the twin shuffle language over the alphabet V defined by TS(V) =
LUv* xUlx.
Theorem 4 1. A language L C T* is recursively enumerable if and only if L —
prT(Recr(A)), where A is an automata system in {rcpcfa(S),rpcfa(3)}.
2. A language L C.T* is recursively enumerable iff L = prT(Rec(A)), where A
is a cpcfa(3).
3. A language L CT* is recursively enumerable iff L — prT(Rec(A)), where A
is a pcfa(2).
Proof. Case 1: A G {rcpcfa,rpcfa}.
According to the aforementioned representation it suffices to prove that for any
alphabet V and any regular language R C V*, there exists a rcpcfa(3) which
accepts TS(V) n R. Firstly, we construct the rcpcfa(2)

A = (VUV,A1,A2,{KUK2}),

where

Ai = ({quKuK2,}U{sa\aeV},VUVJuqu{qi}),
M = (fe}U{« f l |oGV},VUV,/ 2 ,ft,fe}),

and
fi(qi,e) = {QuK2} f2(q2,e) = {92},
fi(Qi,a) = {01,^2} /2(tf2,a) = {^2},
fi(sa,a) = {91} h(q2*a) = sa,
742 C. Martin-Vide, A. Mateescu & V. Mitrana

for all a G V. It is easy to check that the system accepts a word x over V UV, if
and only if, the word obtained from x by erasing all symbols from V is the barred
copy of the word obtained from x by removing all symbols from V. Therefore
Recr(A) = TSV.
Now, just add one more component working independently that accepts the
input word if and only if it belongs to the regular language R. This component
is constructed as follows. One takes a finite automaton without e-moves such that
no move is defined in a final state and these states are the only states with this
property. One extends the transition function such that it allows e-moves from a
final state to itself and one gets the transition function of the new component. The
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

construction is completed by defining, in the first component, an £-move from q\


to a query state referring to the third component. Thus, the master of the system
checks whether or not the input word has been accepted by the third component.
Consequently, the new automata system recognizes exactly the language TSy D -R,
which completes the proof.
Case 2: A is a cpcfa
We define the cpcfa(3)

A = {VUV,A1,A2,{Ki,K2,K3}),

where

A1 = ({quK2iK3j}U{8aipa\aeV},VUVJuql9{q1})9
M = (te}u{Sa|aGy},yu1/,/2,g2,te}),
A3 = ({q3}U{pa\aeV},V\JV,f3,q3,{Q3}),
and
fi(qi,e) = {Qi,K2,K3} f2(q2,e) = {q2} f3(q3,e) = {q3},
h(Pa,a) = {<?i} f2(q2,a) = {q2} fs(qs,a) = {<?3},
fi(sa,Q>) = til} f2(q2,a) = sa fs(qs,a) = {pa},
f2(sa,e) = {q2} fs(pa,s) = {q3}.
for all a G V. The first two components check whether or not the input string
is in x ill y, where # is a scattered substring of y whereas the first and the third
component checks whether or not the input string is in x HI y, where y is a scattered
substring of x. Consequently, Rec(A) = TSy>
Now, one of the last two components can be modified in the aim of verifying
the membership of the input word to a given regular language R. This can be done
here because the system is non-returning so that the current state of the modified
component can encode also the current state of the finite automaton recognizing R.
A similar construction is presented below. We leave to the reader this modification.

Case 3: A is a pcfa.
By Theorem 2, we present a deterministic 2-head automaton that recognizes ex-
actly the language TSy^R, for a given regular language R. Let A' = (Q', V, / , qf0, F')
Parallel Finite Automata Systems Communicating by States 743

be a deterministic finite automaton which recognizes the language L. The 2-head


automaton is defines as follows:

A = (2, {g 0 } x Q',V U V,6, (q0,q'0),{Qo} x F'),


where

S((qo,q),s,a) = (q0,q),a G V,q G <2'


*((^o,g),a,e) = (qoJ(q,a)),ae V,qeQ'
S((Qo, Q), a, a) = (q0, f(q, a)), aeV,qeQ'.
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

As one can easily see, Rec(A) = TSy H i? that concludes the proof. •

4. A u t o m a t a Systems and Grammar Systems


The following problem is very natural and legitimitate: Do parallel communi-
cating finite automata systems constitute an automata characterization of parallel
communicating grammar systems with regular components? In any case, it is natu-
ral to compare the computational power of parallel communicating finite automata
systems with that of parallel communicating grammar systems with regular com-
ponents. To this aim, we are going to recall the definition of the last devices.
A parallel communicating system of degree n > 1 is a construct

-Y = (N,K,T,(Si,p1),(s2,p2),...,(sn,pn)),

where N, T are two disjoint alphabets, Si, 1 < i < n are the axioms of the com-
ponents of 7, Pi, 1 < i < n, are finite sets of production rules over JVUT, and
K — {Qi,Q2, • • •, Qn} is the set of query symbols; their indices point to the com-
ponents of 7. Moreover, N,T,K are mutually disjoint.
For two n-tuples (x1,x2,... ,xn), (2/1,2/2, ••• ,yn),xuyi G (iVUKUT)*, x{,yi G
(N U T)*, 2 < i < n, the derivation in a parallel communicating grammar system
as above is defined as follows:

(x1,x2,...,xn) = ^ 7 (2/i,2/2,--.,2/n)
if one of the next two cases holds:
• no query symbol appears in x\, and then we have a component-wise
derivation, Xi =>pi yi, 1 < i < n, excepting the cases when Xi €T* and
then yi—Xi\
• in the case of query symbols appearing, a communication step
is performed as these symbols impose: each occurence of Qj in x\ is
replaced by Xj, and, after that, the j t h component resumes working
from its axiom. Moreover, the communication has priority over the
effective rewriting.
We have preferred this informal definition instead a formal one because it is more
suggestive and needs no further notations. The reader interested in a formal defi-
nition can consult [3]. Note here that the above definition identifies the centralized
744 C. Martin-Vide, A. Mateescu & V. Mitrana

and returning (to axioms) variant of parallel communicating grammar system. Fol-
lowing the definition of parallel communicating finite automata systems, the reader
may easily infer the definitions of non-centralized or/and non-returning variants.
The language generated by a system 7 as above is

L(7)-{xGT*|(51,52,...,5n)^*(^«2,...,an),aiG(iVur)*,2<i<n}

We denote by:

• RCPCGS(n) - the class of languages generated by returning centralized par-


allel communicating grammar system of degree n with regular components;
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

• RPCGS(n) - the class of languages generated by returning non-centralized


parallel communicating grammar system of degree n with regular components;

• CPCGS(n) - the class of languages generated by non-returning centralized


parallel communicating grammar system of degree n with regular components;

• PCGS(n) - the class of languages generated by non-returning non-centralized


parallel communicating grammar system of degree n with regular components.

Theorem 5
1. CPCGS(n) and CPCFA(m) are incomparable for any n > 2 and m > 3.
2. RCPCFA(n) \ RCPCGS(m) ^ 0 for any n,ra > 2.
3. PCGS(n) \ PCFA(m) ^ 0 for any n,m>2.
I (i) RPCFA{2) \ RPCGS(2) / 0.
(ii) RPCGS{n) \ RPCFA(m) ^ 0 for anyn>3 and m > 2.
Proof. The following statements are taken from Theorem 4.1 in [4]:

(a) {a n + 1 ) 2 n + 2 ) I n > 1} G (CPCGS(2) n PCGS(2)),


7 2 6
(b) {a ' "" I n > 1} <E RPCGS(S),
(c) {anbmcbman I n , m > 1} g (CPCGS(n) U RCPCGS(n)),n > 2.

That all classes RCPCFA(k),RPCFA(k),CPCFA(k),PCFA(k), k > 1, con-


tain only semilinear languages is due to the fact that the languages accepted by
multihead nondeterministic pushdown automata satisfy the semilinearity property
[10]. By Theorem 1 this property is extended to all classes mentioned above.
Now the items 3 and 4(h) of the theorem are proved.
The following rcpcfa with three components recognizes the language {anbmcbman \
n,m > 1} (we list only the transition mappings, the initial states are qi,q2,Q2,
Parallel Finite Automata Systems Communicating by States 745

respectively, and the final states are q[, q{, q{, respectively):

fi(qi,e) = {qi,K3} h{q2,a) = {q2,q2} h(fL3,a) = {q'3,q(~_


Mqha) = {K3] h{q2,b) = {q'2} f3(q'3,a) = {q's}
h{q'3,a) = {K3} h{q'2,b) = {q'2} f3(q'3,b) = {«#}
fi(q(,a) = {q'1} h{q'2,c) = {q2^ M<£,b) = W£}
h{q[,e) = {K2} f2W,e) = {t&} h{q'i,c) = {q3"}
f1(q?,b) = {K2} M&b) = {<£'} M<#',b) = {q?)
h{q'2,b) = {K2} h{q2,a) = {qi) f3(qiv,b) = {q™}
Mq2,b) = {q(} f2{q{,e) = {qi] h{ql,e) = {ql}
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

fi(q{,x) = {q{},xe {a,b} f3{qf,a) = {ql}.


Now the first two items follows. Finally, For 4(i) it suffices to note that any lan-
guage in RPCGS{2) is a context-free language while the non-context-free language
{anbncn I n > 1} lies in RPCFA(2) (see Example 1 slightly modified). •
We finish this section by pointing out that whenever no communication step is
observed in the generation process of a parallel communicating grammar system,
the language generated is regular. As we shall see, this is not valid anymore for
automata systems. We consider here this problem in a more general framework.
Let A — (V, Ai,A2,... ,An,K) be a centralized parallel communicating finite
automata system; we associate with each configuration a number between 1 and n
which is 1 if no query state appears in the configuration, or 2 < j < n where Kj
is the only query state in the given configuration, that is the state of the master
component in the considered configuration.
Now, given an accepting path of length k ( s i , x i , 5 2 , x 2 , . . . ,sn,xn) \-k (pi,yi,P2,
2/2 5 • • • 5Pn> Vn) in a non-returning system we define

trace((s1,x1,s2,x2,...,sri,xn) \-k (pi,2/i,P2,2/2,...,Pn,2/n)) = * i * 2 . . . U + i


where ij, 1 < j < k 4- 1 are the number associated with the configurations which
form the accepting path.
The same definition applies to accepting path of length A: in a returning system.
Then we write

trace(A) = {trace((qi,x,q2,x,... ,qn,x) h* (si,e, s 2 , e , . . . , sn,e)) \


Si € Fi,l < i < n } ,

provided that A is a cpcfa, and


trace(A) = {trace((qi,x,q2,x,... ,qn,x) h* (s1,e,s2,e,..., sn,e)) |
Si e Fi,l <i< n},
provided that A is a rcpcfa. Given a cpcfa/rcpcfa A we say that trace(A) is the
trace language of A.
T h e o r e m 6 1. There are cpcfa(2) and rcpcfa{2) accepting non-regular languages
but having regular trace languages.
2. There are cpcfa(S) and rcpcfa(S) accepting non-context-free languages but
having regular trace languages.
746 C. Martin-Vide, A. Mateescu & V. Mitrana

Proof. We give a proof for the second item only; to this aim we consider the
following deterministic cpcfa(3):
fi(Qi,£) = si /2(tf2,a) = n fs(qs,a) = tu
fi(si,a) = s2 f2(ri,a) = r i h{ti,a) -tu
fi(s2,e) = si f2{rue) = r2 /3(*i,&) =*2,
fi(si,b) = s3 f2(r2,b) = r 3 h(h,b) =t2,
fi(83,b) = s3 /2(r 3 ,£) = r 2 f3(t2,e) = t3,
/i(«3,c) = s4 hiT2,c) =n fo(h,c) =t4,
/i(s 4 ,c) = s4 /2(r 4 ,c) = r 4 h(U,e) = t3,
with Fi = {s 4 },F 2 = {r 4 },F 3 = {t 4 }. One can easily check that this automata
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

system recognizes the language {a n 6 n c n | n > 1}. Indeed, the system recognizes
words of the form alVck only, with

that is z = j — A;. Moreover, the accepting process for each word requires no
communication step, that is the trace language of the above cpcfa(S) is the regular
language {l 4 n + x | n > 1}. •
Is it true that the accepted language of a centralized system is non-regular
whenever its trace language is non-regular?

5. Automata Systems as Mildly Context-Sensitive Acceptors


This part is dedicated to a brief discussion regarding a possible connection be-
tween the classes of languages accepted by the parallel communicating automata
systems defined in this paper and the so-called mildly context-sensitive class [11].
This class contains the context-free languages, and covers the specific non-context-
free constructions in natural languages, but the languages are parsable in polyno-
mial time and have the "bounded growth property" (the length difference between
two words, such that no word of an intermediate length is in the language, is
bounded). The last property is sometimes replaced by semilinearity which is a
much stronger property. As we have mentioned in the previous section, all classes
RCPCFA(k), RPCFA(k), CPCFA(k), PCFA(k) contain only semilinear lan-
guages for any k > 1.
It is known that every nondeterministic fc-head pushdown automata language
can be recognized by a deterministic Turing machine in n281k time, see, e.g., [16] or
[2]. By the translation provided by Theorem 1 we conclude that all classes defined
here are polynomially parsable.
As far as some specific non-context-free constructions in natural languages are
concerned, the reader is referred to [7] and [13] for a detailed discussion. We present
here three of them which linguists seem to agree upon: replication (modelled by
the formal language L\ — {x#x \ x G {a,6} + }), multiple agreements (ilustrated by
L2 = {anbncn | n > 1}), and crossed dependencies (as in L 3 = {anbmcndm | n , m >
1}). The next result shows that parallel communicating finite automata systems
having just two components are able to recognize the the languages L\ ,L2,L3 under
all strategies of communication.
Parallel Finite Automata Systems Communicating by States 747

Proposition 1 1. The languages £2,^3 lie in all of the families RCPCFA{2),


CPCFA{2), RPCFA(2), PCFA(2).
2. The languages Lx lies in all of the families RCPCFA{2), CPCFA(?>),
RPCFA{2), PCFA{2).
Proof. 1. Example 1 provides a cpcfa{2) recognizing the language L^. The
reader may follow the same idea for designing automata systems of all types, with
two components for L2 as well as for L3.
2. An analogous construction to that from Theorem 4 works also for L\. We
prefer some informal explanations instead of a formal construction. We describe
below the work of a returning centralized automata system with two components
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

that accepts L\. The first component always moves its head to the right one cell,
remaining all this time in its initial state. The second component decides nonde-
terministically when it starts to move effectively to the right and stores the symbol
currently read into its current state. For this new state no move is defined anymore.
As soon as the first component reads the symbol # , at each step from that moment
on, it asks for the state of the second component and checks whether its head is
reading the symbol stored in the state just received. No move is defined in the first
component in the initial state of the second component. This process goes on until
the first component receives a state that stored the symbol # . From that moment
on, the first automaton reads no input symbol anymore preserving continuously,
by £-moves, its current state which is also its final state. The second component,
remaining in the same state as the first one, reads completely the rest (the second
half) of the input string. This state is a final state for the second component, too.

6. Final Remarks
We start this final section by pointing out some natural questions concerning
the results in the previous sections.
1. Do the first two items of Theorem 4 remain valid for automata systems with
two components?
2. What are the precise interrelationships between the automata systems and
grammars systems in the framework of Theorem 5?
3. By Theorem 2 and [17] we infer that n + 1 components can do more than n
components in a pcfa. In the aforementioned paper, Yao and Rivest consider the
languages

Lm = { w i # w 2 # . . . w 2 m I Wi £ {a,&}*, and iu* = w 2 m - i + i , l < i < m}.

They show that L/h\ can be recognized by a &-head finite automaton but there is
no k — 1-head finite automaton able to recognize it. Each language Lm is in both
families RCPCFA(m + 1) and RPCFA(m + 1), consequently

X(fc-l)cX((*)+l),

holds for X G {RCPCFA, RPCFA}. However we were not able to prove a hierar-
748 C. Martin-Vide, A. Mateescu & V. Mitrana

chy result
X(k) cX(HI)
for some constant I. R e m a r k t h a t such a hierarchy does exist for g r a m m a r systems,
namely RCPCGS(n) C RCPCGS(n + 1) and RPCGS(n) C RPCGS{n + 1) for
all n > 1.
Are t h e inclusions X(n) C P C F A ( r a ) , X G { P C P C F ^ P P C F A } , strict for all
n > 1?
4. T h e same questions refer also t o t h e families CPCFA(n). We are not
aware of any result regarding the existence of an infinite hierarchy CPCGS(n) C
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

CPCGS(n + l).
5. It will be of special interest to use trajectories and t h e operation of shuffle
on trajectories in order t o control the communication inside of such parallel finite
a u t o m a t a systems. T h e reader may consult [12] for results on this line.

References

1. A. O. Buda, "Multiprocessor automata", Inform. Proces. Lett. 25 (1977) 257-261.


2. S. A. Cook, "Characterizations of pushdown machines in terms of time - bounded
computers", Journal of ACM 18 (1971) 4-18.
3. E. Csuhaj-Varju, J. Dassow, J. Kelemen, Gh. Paun, Grammar Systems. A gram-
matical approach to distribution and cooperation (Gordon and Breach, 1994).
4. J. Dassow, Gh. Paun, G. Rozenberg, Grammar systems, in [15].
5. J. Dassow, V. Mitrana, "Stack cooperation in multi-stack pushdown automata", J.
Comput. System Sci. 58 (1999) 611-621.
6. E. H. Durfee et al., "Cooperative distributed problem solving" in The Handbook of
Al, vol. 4, eds. A. Barr, P. R. Cohen, E. A. Feigenbaum (Addison-Wesley, Reading
Mass., 1989).
7. G. Gazdar, G. K. Pullum, "Computationally relevant properties of natural languages
and their grammars", New Generation Computing 3 (1985), 273-306.
8. J. Hartmanis, "On nondeterminancy in simple computing devices", Acta Informatica
1 (1972) 336-344.
9. O.H.Ibarra, "One two-way multihead automata", J. Comput. System Sci. 7(1973)
28-36.
10. O. H. Ibarra, "A note on semilinear sets and bounded-reversal multihead pushdown
automata", Inform. Process Lett. 3 (1974) 25-28.
11. A. K. Joshi, "How much context-sensitivity is required to provide reasonable struc-
tural descriptions? Tree adjoining grammars." in Natural Language Processing:
Psycholinguistic, Computational and Theoretic Perspectives eds. D. R. Dowty et al.
(Cambridge Univ. Press, New York, 1985) pp 206-250.
12. A. Mateescu, G. Rozenberg and A. Salomaa, "Shuffle on trajectories: Syntactic
constraints", Theoretical Computer Science 197 (1998) 1-56.
13. B. H. Partee, A. ter Meulen, R. E. Wahl, Mathematical Methods in Linguistics
(Kluwer Academic Publ., Dordrecht, Boston, London, 1990).
14. G. Paun, G. Rozenberg, A. Salomaa, DNA Computing. New Computing Paradigms
(Springer-Verlag, 1998).
Parallel Finite Automata Systems Communicating by States 749

15. G. Rozenberg, A. Salomaa (eds.), The Handbook of Formal Languages (Springer-


Verlag, 1997).
16. I. H. Sudborough, "Some remarks on multihead automata", R.A.I.R.O. Informa-
tique theorique 11 (1977) 181-195.
17. A. C. Yao, R. L. Rivest, "k+1 heads are better than k", Journal of ACM 25 (1978)
337-340.
by EINDHOVEN UNIVERSITY OF TECHNOLOGY on 01/25/15. For personal use only.
Int. J. Found. Comput. Sci. 2002.13:733-749. Downloaded from www.worldscientific.com

You might also like