Finite Automata with Multiset Memory: A New ... - IOS Press

5 downloads 311 Views 331KB Size Report
31. DOI 10.3233/FI-2015-1196. IOS Press. Finite Automata with Multiset Memory: A New Characterization of Chomsky Hierarchy. Fumiya Okubo∗. Faculty of Arts ...
Fundamenta Informaticae 138 (2015) 31–44

31

DOI 10.3233/FI-2015-1196 IOS Press

Finite Automata with Multiset Memory: A New Characterization of Chomsky Hierarchy Fumiya Okubo∗ Faculty of Arts and Science, Kyushu University Center Zone, Ito Campus, 744 Motooka, Nishi-ku, Fukuoka 819-0395, Japan [email protected]

Takashi Yokomori†‡ Department of Mathematics, Faculty of Education and Integrated Arts and Sciences Waseda University 1-6-1 Nishiwaseda, Shinjuku-ku, Tokyo 169-8050, Japan [email protected]

Abstract. This paper concerns new characterizations of language classes in the Chomsky hierarchy in terms of a new type of computing device called FAMM (Finite Automaton with Multiset Memory) in which a multiset of symbol objects is available for the storage of working space. Unlike the stack or the tape for a storage, the multiset might seem to be less powerful in computing task, due to the lack of positional (structural) information of stored data. We introduce the class of FAMMs of degree d (for non-negative integer d) in general form, and investigate the computing powers of some subclasses of those FAMMs. We show that the classes of languages accepted by FAMMs of degree 0, by FAMMs of degree 1, by exponentially-bounded FAMMs of degree 2, and by FAMMs of degree 2 are exactly the four classes of languages REG, CF, CS and RE in the Chomsky hierarchy, respectively. Thus, this unified view from multiset-based computing provides new insight into the computational aspects of the Chomsky hierarchy. Keywords: finite automata, multiset memory, computation power, Chomsky hierarchy of languages ∗

The work of F. Okubo was in part supported by Grants-in-Aid for JSPS Fellows No.25.3528, Japan Society for the Promotion of Science. † The work of T.Yokomori was in part supported by a Grant-in-Aid for Scientific Research on Innovative Areas ”Molecular Robotics”(No.24104003) of The Ministry of Education, Culture, Sports, Science, and Technology, Japan, and Waseda University grant for Special Research Projects: 2013B-063 and 2013C-159. ‡ Address for correspondence: Department of Mathematics, Faculty of Education and Integrated Arts and Sciences, Waseda University, 1-6-1 Nishiwaseda, Shinjuku-ku, Tokyo 169-8050, Japan

32

F. Okubo and T. Yokomori / Finite Automata with Multiset Memory

1. Introduction In the research on traditional computation theory of automata and Turing machines, the computing power and the role of auxiliary storage devices such as a pushdown stack and a queue have been intensively studied for more than a half century, while we have a relatively short history of research concerning the computing power of multiset for data storage or data structure. During the last decade, the notion of a multiset has received more and more attention, in the context of “multiset processing” and “multisetbased computing”, particularly in the new areas of biochemical computing and molecular computing ([2, 6, 9, 12]). One can find a comprehensive collection of many suggestive works on this subject in [5]. Quite a few models of multiset-based computing have been so far proposed from the various motivations such as concurrent/distributed computing, membrane computing, abstract chemical computing, and so forth. Those computing models may be classified into two categories: In the first category, a multiset is the objective to compute for those models, while the second category concerns computing models that utilize a multiset as one of the computing resources. In fact, most of the literature in [5] address the issues in the former category. In contrast, recent research on new types of automata such as P automata ([7]), urn automata ([4]) and reaction automata ([14]) may belong to the second category. In a series of our previous work on reaction automata (RAs) ([13, 14, 15]), we have investigated the computational capability of an RA that is formulated as a string acceptor with the multiset storage. An RA employs two types of applying reaction rules: maximally parallel manner and sequential manner in the computation process, and it has been shown that RAs have the Turing computational capability in either manner of rule applications. (As for some details about P automata and urn automata, refer to the related work in Section 4.1.) The present paper is motivated by our earlier work on RAs, and we are interested in exploring the computational capability of the multiset storage working under the finite-state controller. To this aim, we introduce a new type of finite automata with multiset memory (named FAMMs) in which, given an input symbol, the current state and the current multiset, the finite-state controller changes its state and updates the multiset by its transition function. One may imagine a computing device that is something like a generalization of a counter machine or a pushdown automaton, but it has a multiset storage (instead of a pushdown stack). In fact, we admit that an FAMM consists of the same components as an urn automaton. However, a clear distinction of an FAMM from others lies in the manner of changing the storage (i.e., the manner of applying the rules of multiset replacing). Intuitively, an FAMM adopts a special manner of applying transition functions that looks like a hybrid of sequential and maximally parallel manners. We consider several classes of FAMMs and investigate the computational powers of them in comparison to the classes of languages in the Chomsky hierarchy. As results, new characterizations of the well-known four language classes in the hierarchy are obtained through the unified view of FAMM formulation, which provides new insight into the computational aspect of the Chomsky hierarchy. The remainder of this paper is organized in the following way. After providing the basic definitions and notations, Section 2 introduces a new type of computing models called FAMMs and presents a supporting simple example of an FAMM and its accepted language. Then, the main results concerning new characterizations of Chomsky hierarchy in terms of FAMM formulation are described and summarized up in an illustrative diagram in Section 3. Finally, concluding remarks including related work and future work are given in Section 4.

F. Okubo and T. Yokomori / Finite Automata with Multiset Memory

33

2. Preliminaries 2.1. Basic Definitions and Notations We assume that the reader is familiar with the basic notions of formal language theory. For unexplained details, refer to [10]. Let V be a finite alphabet. For a set U (⊆ V ), the cardinality of U is denoted by |U |. The set of all finite-length strings over V is denoted by V ∗ . The empty string is denoted by λ. For a string x ∈ V ∗ , |x| denotes the length of x. The set of all strings of length l over V is denoted by V l . We use the basic notations and definitions concerning multisets that follow [5]. A multiset over an alphabet V is a mapping µ : V → N, where N is the set of non-negative integers, and for each a ∈ V , µ(a) represents the number of occurrences of a in the multiset µ. The set of all multisets over V is denoted by V # , including the empty multiset denoted by µλ , where µλ (a) = 0 for all a ∈ V . µ(a ) µ(a ) We can represent the multiset µ over V by any permutation of the string x = a1 1 · · · an n , where V = {a1 , a2 , · · · , an }. Conversely, with any string x ∈ V ∗ one can associate the multiset µx : V → N defined by µx (a) = |x|a for each a ∈ V . In this sense, a multiset µ is often identified with its string representation xµ or any permutation of xµ . Note that the string representation of µλ is λ, i.e., xµλ = λ. A usual set U (⊆ V ) is regarded as a multiset µU such that µU (a) = 1 if a is in U and µU (a) = 0 otherwise. In particular, for each symbol a ∈ V , a multiset µ{a} is often denoted by a itself. For two multisets µ1 , µ2 over V , we define one relation and two operations as follows: • Inclusion : µ1 ⊆ µ2 iff µ1 (a) ≤ µ2 (a), for each a ∈ V , • Sum : (µ1 + µ2 )(a) = µ1 (a) + µ2 (a), for each a ∈ V , • Difference : (µ1 − µ2 )(a) = µ1 (a) − µ2 (a), for each a ∈ V (for the case µ2 ⊆ µ1 ). For string representations of multisets, the dot P “ · ” is used for sum instead of +. The sum for a family of multisets M = {µi }i∈I is denoted by i∈I µi . For a multiset µ andPn ∈ N, µn is defined by µn (a) = n · µ(a) for each a ∈ V . The size of a multiset µ over V is |µ| = a∈V µ(a). We assume the convention that for a set S, S 0 = {λ} and a direct product S × {λ} is identified with S. We introduce an injective function stm : V ∗ → V # that maps a string to a multiset in the following manner: n−1

• stm(a1 a2 · · · an ) = a1 a22 · · · a2n

(for n ≥ 1),

• stm(λ) = λ.

2.2. Multiset Rewriting By recalling [2], we shall introduce the notion of multiset rewriting in maximally parallel manner which plays an important role in this paper. Definition 1. For a set S, a multiset rewriting rule a in S is a construct a : Ra → Pa with Ra , Pa ∈ S # .

34

F. Okubo and T. Yokomori / Finite Automata with Multiset Memory

This notation is extended to a multiset of reactions as follows: For a set of multiset rewriting rules A and a multiset α ∈ A# , X α(a) X α(a) Rα = Ra , Pα = Pa . a∈A

a∈A

Definition 2. Let A be a set of multiset rewriting rules in S. For a multiset T ∈ S # , we say that the results obtained by applying A to T in maximally parallel manner, denoted by Resmp A (T ), is defined as follows: # Resmp A (T ) = {T − Rα + Pα | Rα ⊆ T, α ∈ A ,

there is no β ∈ A# such that α ⊂ β and Rβ ⊆ T }.

2.3. Finite Automata with Multiset Momery: FAMMs For an alphabet Σ, let Σλ = Σ ∪ {λ}. In what follows, we assume that : ˆ be the hat version of X, i.e., X ˆ = {ˆ (1). for a set X, let X x | x ∈ X}, # ˆ (2). for any x ∈ X , it holds that x ˆ=x. We now introduce a new type of computing model based on multiset replacing operations. Definition 3. (Finite Automata with Multiset Momery: FAMMs) Let d be an non-negative integer. An FAMM of degree d is a tuple: ˆ q0 , T0 , F ), M = (Q, Σ, S, δ ∪ δ, where • Q is a finite set of states, • Σ is a finite set of input symbols, • S = S1 ∪ · · · ∪ Sd is a finite union of the finite sets of objects, where each of Si , Q and Σ is pairwise-disjoint, ˆ ˆ ˆ = stm(Sˆ# ) × · · · × stm(Sˆ# ) • δ : Q × Σλ × S1 · · · Sd → 2Q×K is a transition function, where K 1 d ˆ × Σλ × Sˆ1 · · · Sˆd → 2Q×K is the counterpart of δ satisfying that and δˆ : Q

r : (ˆ q , stm(xˆ1 ), stm(xˆ2 ), . . . , stm(xˆd )) ∈ δ(p, a, α) ˆ p, a, α), ⇐⇒ rˆ : (q, stm(x1 ), stm(x2 ), . . . , stm(xd )) ∈ δ(ˆ ˆ • q0 is the initial state in Q, • T0 is the initial multiset in S d , • F is the set of final states in Q. Intuitively, a transition of M is performed in two different phases. Let T be a multiset in S # (Sˆ# ). On ˆ is applied to T , which results in T ′ . Then, on the second stage, the first stage, a transition function δ(δ) T ′ is transformed into Tˆ in Sˆ# (in S # ) by applying a specific set of multiset rewriting rules in maximally parallel manner. Thus, a configuration of M moves over between S # and Sˆ# in an alternate way. Forˆ Sˆ# . A transition of M mally, a configuration of M is an element in C = Σ∗ ×Q×S # or in Cˆ = Σ∗ × Q× is a binary relation ⊢M on C ∪ Cˆ defined as follows: for a ∈ Σλ and w ∈ Σ∗ , (aw, p, T ) ⊢M (w, qˆ, Tˆ)

F. Okubo and T. Yokomori / Finite Automata with Multiset Memory

input tape!

···

a b

···

a b

···

Stage 1 finite state controller!

p∈Q

T! multiset memory!

···

···

a b

···

Stage 2 ˆ qˆ ∈ Q

(ˆ q , β) ∈ δ(p, a, α)

T’! α

35

ˆ qˆ ∈ Q

T! β

β

reactions An are applied to T’! in maximally parallel manner

Figure 1. The notion of a transition of FAMM of degree 1: When α is in T and (ˆ q , β) ∈ δ(p, a, α) is applied to T , T ′ (= T − α + β) is first created. Then, Tˆ is eventually obtained by applying reaction rules of An to T ′ in maximally parallel manner, where n = |β|.

ˆ if and only if, provided that (ˆ q , stm(xˆ1 ), stm(xˆ2 ), . . . , stm(xˆd )) ∈ (δ ∪ δ)(p, a, α) and α ∈ T , ′ [Stage 1]. let T = T − α + stm(xˆ1 ) + stm(xˆ2 ) + · · · + stm(xˆd ) and n Ani = {s2 → sˆ2 i | s ∈ Si ∪ Sˆi , ni = |xi |} for each 1 ≤ i ≤ d. [Stage 2]. Tˆ is the result in S # ∪ Sˆ# obtained by applying Ani to T ′ in maximally parallel manner, ′ # ˆ# for each 1 ≤ i ≤ d, that is, Tˆ = Resmp A (T ) ∩ (S ∪ S ), where A = An1 ∪ · · · ∪ And . (See Figure 1 for the transition of FAMM of degree 1.) The reflexive and transitive closure of ⊢M is denoted by ⊢∗M .

ˆ ˆ Notes. (1). From our assumption (2) mentioned above, it follows that Tˆ = {ˆ x | x ∈ T }, Tˆ = {x ˆ|x∈ ˆ ˆ T } = T and Q = Q. (2). By definition, for a sequence of configurations : (w, q0 , Z0 ) = (w0 , q0 , T0 ) ⊢M (w1 , q1 , T1 ) ⊢M · · · ⊢M (wk , qk , Tk ) ⊢M · · · ,

ˆ × Sˆ# (if k it always holds that (wk , qk , Tk ) ∈ Σ∗ × Q × S # (if k is even), and (wk , qk , Tk ) ∈ Σ∗ × Q is odd). Definition 4. (Languages Accepted by FAMMs) ˆ q0 , T0 , F ), a language accepted by M is defined by For a given FAMM M = (Q, Σ, S, δ ∪ δ, L(M ) = {w ∈ Σ∗ | (w, q0 , T0 ) ⊢∗M (λ, f, T ), f ∈ F ∪ Fˆ , T ∈ S # ∪ Sˆ# }. ˆ q0 , s0 , {f }) be an FAMM of degree 1, where Example 1. Let M = ({q0 , q1 , f }, {a, b}, {s0 , s1 }, δ ∪ δ, a transition function δ is defined as r1 : δ(q0 , a, s0 ) = {(ˆ q0 , stm(ˆ s1 sˆ0 ))}, r2 : δ(q0 , a, s1 ) = {(ˆ q0 , stm(ˆ s1 sˆ1 ))}, r3 : δ(q0 , b, s1 ) = {(ˆ q1 , λ)}, r4 : δ(q1 , b, s1 ) = {(ˆ q1 , λ)}, r5 : δ(q1 , λ, s0 ) = {(f, λ)}.

36

F. Okubo and T. Yokomori / Finite Automata with Multiset Memory

For an input string w = aabb, M accepts w by the following computation: (aabb, q0 , s0 )

⊢rM1 (abb, qˆ0 , stm(ˆ s1 sˆ0 ))

(1)

ˆ2 ⊢rM ⊢rM3 ˆ4 ⊢rM ⊢rM4

(bb, q0 , stm(s1 s1 s0 ))

(2)

(b, qˆ1 , stm(ˆ s1 sˆ0 ))

(3)

(λ, q1 , s0 ) (λ, fˆ, λ).

(4) (5)

For example, in the step (3), the transition rule r3 : δ(q0 , b, s1 ) = {(ˆ q1 , λ)} is applied to the configuration (bb, q0 , stm(s1 s1 s0 )). In Stage 1, T ′ = T − α + stm(x1 ) = s1 + s21 + s40 − s1 + λ = s21 + s40 is obtained, and A0 = {s2i → sˆi | 0 ≤ i ≤ 1}. Then, in Stage 2, applying A0 to T ′ in maximally parallel s1 sˆ0 ). Hence, the next configuration (b, qˆ1 , stm(ˆ s1 sˆ0 )) is manner, it holds that Tˆ = sˆ1 + sˆ20 = stm(ˆ n n obtained. We can easily confirm that L(M ) = {a b | n ≥ 1}.

3. Main Results 3.1. Characterizing Context-Free Languages Theorem 1. A language L is context-free if and only if L is accepted by an FAMM of degree 1. Proof: Taking into consideration the following one-to-one correspondence between a PDA and an FAMM of degree 1, defined by 1:1 M1 = (Q, Σ, Γ, δ, q0 , Z0 , F ) ←→ M2 = (Q, Σ, Γ, δ′ ∪ δˆ′ , q0 , Z0 , F ), where (ˆ q , stm(ˆ x)) ∈ δ′ (p, a, s) iff (q, x) ∈ δ(p, a, s),

we shall show that L(M1 ) = L(M2 ) holds. To this aim, it suffices to show the following claim. Claim 1. The following relation holds for any k ≥ 0: ( (w, q0 , Z0 ) ⊢kM2 (wk , p, stm(xk )) k (w, q0 , Z0 ) ⊢M1 (wk , p, xk ) ⇐⇒ (w, q0 , Z0 ) ⊢kM2 (wk , pˆ, stm(ˆ xk ))

if k is even, if k is odd.

By induction on k, we show Claim 1. For k = 0, the claim obviously holds. Assume that for even number k, the claim holds. Then, for wk = awk+1 and xk = b1 b2 · · · bn with b1 , b2 , . . . , bn ∈ S, (wk , p, b1 b2 · · · bn ) ⊢M1 (wk+1 , q, c1 c2 · · · cm b2 · · · bn ) ⇐⇒ (q, c1 c2 · · · cm ) ∈ δ(p, a, b1 ) ⇐⇒ (ˆ q , stm(ˆ c1 cˆ2 · · · cˆm )) ∈ δ′ (p, a, b1 ) ⇐⇒ (wk , p, stm(b1 b2 · · · bn )) ⊢M2 (wk+1 , qˆ, stm(ˆ c1 cˆ2 · · · cˆmˆb2 · · · ˆbn )).

(∗) (∗∗)

F. Okubo and T. Yokomori / Finite Automata with Multiset Memory

37

Here, the equality relation (∗) ⇔ (∗∗) is proved as follows. [(∗) ⇒ (∗∗)] : Suppose that we have T = stm(b1 b2 · · · bn ) and apply (ˆ q , stm(ˆ c1 cˆ2 · · · cˆm )) ∈ δ′ (p, a, b1 ) to a configuration (wk , p, T ). Then, by following the definition, it holds that T ′ = T − b1 + stm(ˆ c1 cˆ2 · · · cˆm ) = stm(b1 b2 · · · bn ) − b1 + stm(ˆ c1 cˆ2 · · · cˆm ) m−1

= cˆ1 cˆ22 · · · cˆ2m

n−1

b22 · · · b2n

m

and Am = {s2 → sˆ2 | s ∈ S}. By applying Am to T ′ , we obtain m−1 m m+n−2 Tˆ = cˆ1 cˆ22 · · · cˆ2m ˆb22 · · · ˆb2n = stm(ˆ c1 cˆ2 · · · cˆmˆb2 · · · ˆbn ).

[(∗∗) ⇒ (∗)]: Suppose that the transition (∗∗) is realized by (ˆ q , stm(ˆ x)) ∈ δ′ (p, a, bi ), where x ˆ ∈ Sˆ∗ and 2 ≤ i ≤ n. Then, T ′ contains the odd number of the symbol of bi , because T = stm(b1 b2 · · · bn ) contains the even number of the symbol of bi (6= b1 ). From the manner of constructing the set of reactions An , Tˆ also contains bi without hat, which contradicts to the precondition. Thus, for a configuration of the form (wk , p, stm(b1 b2 · · · bn )), only possible transitions are due to the rules of the form (ˆ q , stm(ˆ c1 cˆ2 · · · cˆm )) ∈ δ′ (p, a, b1 ). This equality together with the inductive hypothesis implies that the claim holds for k + 1. A similar argument can apply to the proof of the claim for odd number k. (End of the proof for Claim 1) From Claim 1 it follows that if we have a sequence of configurations of M2 (w, q0 , Z0 ) = (w0 , q0 , T0 ) ⊢M2 (w1 , q1 , T1 ) ⊢M2 · · · ⊢M2 (wk , qk , Tk ) ⊢M2 · · · , then it must hold that

( (wk , p, stm(xk )) if k is even, (wk , qk , Tk ) = (wk , pˆ, stm(ˆ xk )) if k is odd,

for some wk ∈ Σ∗ , p ∈ Q and xk ∈ S ∗ . Hence, by taking a state p as any final state f ∈ F and wk = λ in Claim 1, it is seen that L(M1 ) = ⊔ ⊓ L(M2 ) holds.

3.2. Characterizing Regular, Context-sensitive and Recursively Enumerable Languages Theorem 2. A language L is regular if and only if L is accepted by an FAMM of degree 0. Proof: There is a one-to-one correspondence between a finite automaton and an FAMM of degree 0, defined by 1:1

M1 = (Q, Σ, δ, q0 , F ) ←→ M2 = (Q, Σ, S, δ′ ∪ δˆ′ , q0 , λ, F ), where qˆ ∈ δ′ (p, a, λ) iff q ∈ δ(p, a). Then, it is obviously holds that L(M1 ) = L(M2 ).

⊔ ⊓

Theorem 3. A language L is recursively enumerable if and only if L is accepted by a FAMM of degree 2.

38

F. Okubo and T. Yokomori / Finite Automata with Multiset Memory

Proof: By Church-Turing Thesis, we have only to prove that any recursively enumerable language is accepted by an FAMM of degree 2. Recall that any recursively enumerable language is accepted by a 2-stack machine (see, e.g., Theorem 8.13 in [10]). Similarly to the proof of Theorem 1, for a given 2-stack machine M1 , we construct FAMM M2 of degree 2 as follows: M1 = (Q, Σ, Γ1 , Γ2 , δ, q0 , Z01 , Z02 , F ) 7→ M2 = (Q, Σ, Γ1 ∪ Γ2 , δ′ ∪ δˆ′ , q0 , Z01 Z02 , F ), where (ˆ q , stm(ˆ x), stm(ˆ y )) ∈ δ′ (p, a, s1 s2 ) iff (q, x, y) ∈ δ(p, a, s1 , s2 ). (Note that we may assume that Γ1 and Γ2 are disjoint.) By applying to each stack of M1 the stack simulation technique of the proof for Theorem 1, the following relation holds for any k ≥ 0: (w, q0 , Z01 , Z02 ) ⊢kM1 (wk , p, xk , yk ) ( (w, q0 , Z01 Z02 ) ⊢kM2 (wk , p, stm(xk ) + stm(yk )) ⇐⇒ (w, q0 , Z01 Z02 ) ⊢kM2 (wk , pˆ, stm(ˆ xk ) + stm(ˆ yk ))

if k is even, if k is odd.

Hence, it holds that L(M1 ) = L(M2 ).

⊔ ⊓

Corollary 1. For each d ≥ 2, the computational power of FAMMs of degree d is equal to that of Turing machines. We now consider space complexity classes of FAMMs and investigate their relationships to the language classes in the Chomsky hierarchy. Let M be an FAMM and s be an increasing function defined on N. For an input w ∈ Σ∗ , consider any sequence of configurations of M for w πw : (w, q0 , Z0 ) = (w0 , q0 , T0 ) ⊢M (w1 , q1 , T1 ) ⊢M · · · ⊢M (wk , qk , Tk ). Then, the workspace of M for w, denoted by W S(M, w), is defined by max{|Ti | | π,i

Ti appears in πw }. An FAMM M is said to be s(n)-space bounded if for any w ∈ Σ∗ with n = |w|, W S(M, w) is bounded by s(n). We say that M is exponentially-bounded if s(n) is an exponential function. Theorem 4. A language L is context-sensitive if and only if L is accepted by an exponentially-bounded FAMM of degree 2. Proof: [only if part] From the proof in [10], it immediately follows that an s(n) space-bounded Turing machine M is equivalent to an s(n)-space bounded 2-stack machine M1 . Now, in the proof of Theorem 3, a configuration (wk , p, x, y) of the 2-stack machine M1 is corresponding to a configuration either (wk , p, stm(x) + stm(y)) or (wk , pˆ, stm(ˆ x) + stm(ˆ y)) of the FAMM of degree 2 M2 . Assume that M1 is linear-bounded. Then, it always holds that |x| + |y| ≤ cn for some constant c. Further, it holds that for |x| + |y| = m, the workspace of M2 for w with |w| = n is bounded by O(2m )(≤ O(2cn )). Therefore, a linear-bounded automaton M can be simulated by an exponentially-bounded FAMM M2 . [if part] M = (Q, Σ, S, δ′ ∪ δˆ′ , q0 , s01 s02 , F ) be a FAMM of degree 2, where S = S1 ∪ S2 = {s1 , . . . , sk }. Assume that for an input w = a1 · · · an ∈ Σ∗ , the workspace of M for w is bounded by the exponential function s(n) = c1 cn2 , where c1 , c2 are constants. We construct a nondeterministic (k

F. Okubo and T. Yokomori / Finite Automata with Multiset Memory

39

+ 1)-tape linear-bounded automaton M ′ in which the length of each tape is bounded by ckn for some constant c. Then, M ′ simulates an accepting sequence of configurations (w, q0 , T0 ) ⊢∗M (λ, f, Tm ) for some m ≥ 0, in the following manner: 1. At first, Tape-1 has the input w and Tape-(i + 1) has the number of si in T0 represented by c2 -ary number, for each 1 ≤ i ≤ k. 2. Let Tj be the current multiset of M . When M ′ reads the symbol si in the input, add one to the content of Tape-(i + 1). Then, by checking all tapes except Tape-1, compute an element of Tj+1 and the next state in the nondeterministic way and rewrite the contents in the tapes. 3. After reading through the input w, if M reaches a final state, then M ′ accepts w. Since we use c2 -ary number for representing the number of symbols, the length logc2 (c1 ) + n of each tape is enough to memorize Tj with |Tj | ≤ c1 cn2 . Therefore, it holds that L(M ) = L(M ′ ). ⊔ ⊓

3.3. Further Complexity Issues We now introduce into FAMMs another complexity measure that is concerned with the size of the set S of objects. In this section a slightly restricted type of FAMMs is considered and defiend as follows. ˆ q0 , T0 , F ) is said to be m-ary if it satisfies An FAMM of degree d M = (Q, Σ, S, δ ∪ δ, (1). T0 = Z1 · · · Zd , where Zi (∈ Si ) is the initial symbol for Si only appearing in and never being removed from T0 , and (2). the cardinality of Si − {Zi } is at most m, for all 1 ≤ i ≤ d. In particular, we say that M is called unary if m = 1 and M is called binary if m = 2. From the definitions, it immediately follows: Corollary 2. A language L is accepted by a one-counter automaton if and only if L is accepted by a unary FAMM of degree 1. It is known that every recursively enumerable language is accepted by a two-counter machine (Theorem 8.15 in [10]). Together with this, the proof technique similar to Theorem 3 immediately implies the following corollary. Corollary 3. A language L is accepted by a Turing machine if and only if L is accepted by a unary FAMM of degree 2. Thus, this result offers a normal form theorem for FAMMs. Theorem 5. For any FAMM of degree 2, there exists an equivalent binary FAMM of degree 2. Further, it is easily seen that for each m ≥ 3, an m-ary FAMM of degree 1 can be simulated by a 2-ary FAMM of degree 1 by using a prefix-code. Therefore, we have: Theorem 6. For any m ≥ 2, the class of languages accepted by m-ary FAMMs of degree 1 is equal to the class of context-free languages.

40

F. Okubo and T. Yokomori / Finite Automata with Multiset Memory

(1)

FAMM 2

FAMM 2 ( FAMM )

exp-FAMM2

FAMM 1(2)

FAMM 1 1-CM

FAMM 1(1) FAMM 0

Figure 2. FAMM’s characterizations of the Chomsky hierarchy and their inclusion relations. In the diagram, (m) 1-CM denotes the class of languages accepted by one-counter machines. The notation F AMMd denotes the class of languages accepted by m-ary FAMMs of degree d, and the prefix exp denotes “exponentially-bounded”.

Thus, binary FAMMs of degree 1 also offers a normal form for FAMMs of degree 1. The obtained results are summarized in Figure 2. (m)

For each d ≥ 0, m ≥ 1 and an increasing function s(n), let s(n)-FAMMd be the class of languages accepted by s(n)-space bounded m-ary FAMMs of degree d. Then, we define: s(n)-FAMMd =

[

(m)

s(n)-FAMMd

m≥1

(= the class of languages accepted by s(n)-space bounded FAMMs of degree d) [ (m) s(n)-FAMMd s(n)-FAMM(m) = d≥1

(= the class of languages accepted by s(n)-space bounded m-ary FAMMs)

Now we shall show that the computational power of linear-space bounded FAMMs of degree 2 is equivalent to that of exponential-space bounded unary FAMMs (of arbitrary degree d). For this purpose, we use the lemma obtained from two propositions in [8]. (In what follows, we assume that a Turing machine (TM) is an off-line model.) Proposition 1. (“If part proof” of Theorem 3.1 in [8]) A Turing machine with m symbols in log s(n) space is simulated by a 3-counter machine in s(n)t space, where t = O(log m). Proposition 2. (Lemma 3.2 in [8]) A 1-counter machine in s(n)t space is simulated by a 2-counter machine in s(n)t/2 space. Remark. The reference paper [8] only considers deterministic counter machines, while it is confirmed that Theorem 3.1 and Lemma 3.2 in [8] also hold true for the case of non-deterministic counter machines. Applying this proposition repeatedly, we obtain the following propositions.

F. Okubo and T. Yokomori / Finite Automata with Multiset Memory

41

Proposition 3. A 1-counter machine in s(n)t space is simulated by a t-counter machine in s(n) space. Proposition 4. A 3-counter machine in s(n)t space is simulated by a 3t-counter machine in s(n) space. Then, from Propositions 1 and 4, the next lemma is easily obtained. Lemma 1. A Turing machine with m symbols in log s(n) space is simulated by a 3t-counter machine in s(n) space, where t = O(log m). Theorem 7. s(n)-FAMM2 = 2s(n) -FAMM(1) . Proof: [s(n)-FAMM2 ⊆ 2s(n) -FAMM(1) ] Let L be a language accepted by an m-ary FAMM of degree 2 in s(n) space. Then, the following relations holds: L is accepted by an m-ary FAMM of degree 2 in s(n) space. ⇒L is accepted by a TM (with (2m + 2) symbols) in log s(n) space. (Proof of Theorem 4) ⇒L is accepted by a 3t-counter machine in s(n) space, where t = O(log(2m + 2)). (Lemma 1) ⇒L is accepted by a unary FAMM of degree 3t in 2s(n) space, where t = O(log(2m + 2)). The last implication can be derived by using the argument similar to the proof for Theorem 4. (Note that counters are a special type of stacks.) [2s(n) -FAMM(1) ⊆ s(n)-FAMM2 ] Let L be a language accepted by a unary FAMM of degree d in 2s(n) space, for some d. Then, the following relations holds: L is accepted by a unary FAMM of degree d in 2s(n) space. ⇒L is accepted by a d-counter machine in s(n) space. (Proof of Theorem 4) d

⇒L is accepted by a TM (with 2 symbols) in log2 s(n) space.

(∗) (∗∗)

⇒L is accepted by an FAMM of degree 2 in s(n) space. (Proof of Theorem 4) The implication (∗) ⇒ (∗∗) is shown as follows: In a TM, the content of each counter is represented by a binary number, and a d-tuple consisting of each digit of the d numbers in the binary representation is coded as one symbol. Then, it is obviously holds that a TM in log2 s(n) space can simulate a d-counter machine in s(n) space. ⊔ ⊓ Corollary 4. lin-FAMM2 = exp-FAMM(1) .

4. Conclusion Remarks 4.1. Related Work As is mentioned in the introduction section, there exists much related work of computing models that share with FAMMs the idea of utilizing a multiset as a device of working memory or state-controller. Among others, here we focus on three models of computation of that kind: reaction automata, urn automata and P-automata.

42

F. Okubo and T. Yokomori / Finite Automata with Multiset Memory

Introducing the model of FAMMs has been motivated by a series of our recent work on reaction automata ([13, 14, 15]) that was proposed and investigated as a new computing model of automata based on biochemical reactions. A reaction automaton is a variant of a classical model in automata theory, with unbounded memory of a multiset in the general model, where reaction rules in the form of triples consisting of reactants, inhibitors, and products are applied to a current multiset (representing a configuration) to achieve one step transition. An FAMM may be regarded as a special and simpler form of a reaction automaton in its structural aspect, while the application modes of transition rules are different between these two accepting devices. Specifically, reaction automata employ application modes of either maximally parallel manner or sequential manner, while FAMMs adopt a kind of hybrid mode of those two in a special manner of rule applications. It has been shown, for instance, that reaction automata have the Turing universal computability in both application modes. (More results and developments in reaction automata theory may be found in recent articles [16],[17].) Urn automata have been introduced and explored in [4] to study the computational power of a new class of finite automata consisting of the two-way input tape and an urn containing tokens with a finite set of colors in the general form. A transition of the urn automaton is performed in such a manner that depending upon the current state and an input symbol, the urn automaton changes its state and, at the same time, updates its urn by replacing some tokens with some others. Thus, the urn plays the role of working memory (or the working space) such as a pushdown stack. Considering that the urn is regarded as a multiset of symbols (tokens), urn automata are the same as FAMMs in the construction. There are, however, some distinctions between these two. Since the urn performs uniform sampling to change its content, the language accepted by an urn automaton is probabilistic in nature. Further, the paper [4] investigates the computational powers of some restricted classes focusing on deterministic and conservative urn automata, for the motivational reason that urn automata were introduced to model populations of finite state machines with unpredictable interactions such as population protocol models (or sensor network models by mobile finite state agents) in [3]. In the research of P system theory, Alhazov and Rogozhin ([1]) investigate the lower-bounds of the computational power of one-membrane P systems with symport rules only. They prove that onemembrane and symport ruels with a few extra symbols are computationally Turing universal for the set of natural numbers (rather than strings). In [11] Ibarra and P˘aun raised an interesting open question how one can characterize the class of context-free languages in terms of P system formulation, for which Vaszil ([18]) introduced a restricted class of P automata called P stack-automata and showed that the class gives an exact characterization of the class of context-free languages. A P stack-automaton is defined as a P automaton having in the nested two membranes only communication rules of a specially restricted form. A configuration represented by two multisets is updated by either parallel or sequential manner of rule applications towards ending computation. The basic idea behind the manner of proving the main result is in part shared with the one used for Theorem 1 in this paper, while major differences between the two models lie in that no membrane structure is involved in FAMM and a P stack-automaton requires an extra assistance of a very special mapping to define the accepted language in the last stage.

4.2. Conclusion and Future Work We have investigated the computational powers of a new type of automata called FAMMs that are defined as finite automata with (unbounded) multiset memory. Within the FAMM models, we have introduced four subclasses of FAMM of degree 2, and obtained new characterizations of the four classes of lan-

F. Okubo and T. Yokomori / Finite Automata with Multiset Memory

43

guages in Chomsky hierarchy. That is, we have shown that • the class of recursively enumerable languages is equal to the class of languages accepted by FAMMs of degree 2, • the class of context-sensitive languages is exactly the class of languages accepted by exponentiallybounded FAMMs of degree 2, • the class of context-free languages coincides with the class of languages accepted by FAMMs of degree 1, and • the class of regular languages is nothing but the class of languages accepted by FAMMs of degree 0. Thus, the FAMM models provide us with a unified view of the well-known four classes of languages in the Chomsky hierarchy, from the viewpoint of computational capability of the computing devices based on multiset replacement mechanism. Several interesting problems remain open to solve concerning the subclasses of FAMMs of degrees 1 and 2. It is not known about the computing powers of the linear-bounded FAMMs of degree 1 and polynomial-bounded FAMMs of degrees 1 and 2. We only considered in this paper an FAMM model with nondeterministic transition function. For each of the subclasses of FAMMs introduced here, the deterministic case of the transition function in an FAMM should be investigated. Further, the time complexity issues on the subclasses of FAMMs remain as interesting open problems.

References [1] Alhazov,A. and Rogozhin,Y.: One-membrane symport with few extra symbols, International Journal of Computer Mathematics vol.90,No.4, pp.750-759, 2013. [2] Alhazov,A. and Verlan,S.: Minimization strategies for maximally parallel multiset rewriting systems, Theoretical Computer Science, vol.412, pp.1587-1591, 2011. [3] Angluin, D., Aspnes, J., and Eisenstat, D.: Stably computable predicates are semilinear, in Proceedings of the 25th annual ACM symposium on principles of distributed computing, ACM Press, New York, pp.292-299. 2006. [4] Angluin, D., Aspnes, J., Diamadi, Z., Fischer, M.J., and Peralta, R.: Urn automata, Technical Report YALEU/DCS/TR-1280, Yale University, Department of Computer Cience (2003). [5] Calude, C., P˘aun,Gh., Rozenberg,G., and Salomaa,A. (Eds.): Multiset Processing, Lect. Notes Comput. Sci. vol.2235, Springer, 2001. [6] Csuhaj-Varju,E., Martin-Vide,C., and Mitrana,V.: Multiset Automata, in: Multiset Processing, C. Calude, Gh. P˘aun, G. Rozenberg, A. Salomaa (Eds.), Lect. Notes Comput. Sci. vol.2235, Springer, pp.69-83, 2001. [7] Csuhaj-Varju,E. and Vaszil,Gv.: P automata, in The Oxford Handbook of Membrane Computing, pp.145-167, 2010. [8] Fischer,P.C., Meyer,A.R. and Rozenberg,A.L.: Counter Machines and Counter Languages, Mathematical Systems Theory, vol.2 (3), pp.265-283, 1968. [9] Hirshfeld,Y., Moller,F.: Pushdown automata, multiset automata, and Petri nets, Theoretical Computer Science, vol.256, pp.3-21, 2001. [10] Hopcroft,J.E., Motwani,T., and Ullman,J.D.: Introduction to automata theory, language and computation 3rd ed, Addison-Wesley, 2007.

44

F. Okubo and T. Yokomori / Finite Automata with Multiset Memory

[11] Ibarra, O.H., P˘aun, Gh.: Characterizations of context-sensitive languages and other language classes in terms of symport/antiport P systems, Theoretical Computer Science, vol.358, pp.88-103, 2006. [12] Kudlek,M., Totzke,P., and Zetzsche,G.: Multiset pushdown automata, Fundamenta Informaticae, vol.93, pp.221-233, 2009. [13] Okubo, F.: Reaction automata working in sequential manner, RAIRO Theoretical Informatics and Applications, vol.48, pp.23-38, 2014. [14] Okubo, F., Kobayashi,S., and Yokomori, T.: Reaction automata, Theoretical Computer Science, vol.429, pp.247-257, 2012. [15] Okubo, F., Kobayashi,S., and Yokomori, T.: On the properties of language classes defined by bounded reaction automata, Theoretical Computer Science, vol.454, pp.206-221, 2012. [16] Okubo, F. and Yokomori, T.: Recent developments on reaction automata theory: A survey, Proc. of 7th International Workshop on Natural Computing, Springer Japan, in press, 2014. [17] Okubo, F. and Yokomori, T.: The computational power of chemical reaction automata, Proc. 20th International Conference on DNA Computing and Molecular Programming, Kyoto, LNCS 8727, pp.53-66, 2014. [18] Vaszil, Gy.: A Class of P Automata for Characterizing Context-Free Languages, Proc. Fourth Brainstorming Week on Membrane Computing, Sevilla, vol. II (C. Graciani et al., eds.), pp.267-276, 2006.