Professional Documents
Culture Documents
5 (2002) 733-749
© World Scientific Publishing Company
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
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
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.
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.
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*\
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:
(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
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}.
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
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
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
{ 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.
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.
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},
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,
Li 111 L2 = (J x ill y.
xeLi,yeL2
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
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
As one can easily see, Rec(A) = TSy H i? that concludes the proof. •
-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:
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]:
respectively, and the final states are q[, q{, q{, respectively):
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?
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
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