On the Power of Deterministic and Sequential ... - Semantic Scholar

5 downloads 0 Views 195KB Size Report
li : (ADD(r),lj,lk) Add one to the content of multicounter r and proceed, in a nondeterministic way, with the instruction labeled lj or lk. In the deterministic variant lj ...
On the Power of Deterministic and Sequential Communicating P Systems Ludˇek Cienciala1 , Lucie Ciencialov´a1 , Pierluigi Frisco2 , and Petr Sos´ık1,3 1

Institute of Computer Science, Silesian University in Opava, Czech Republic {ludek.cienciala,petr.sosik}@fpf.slu.cz, [email protected] 2 School of Mathematical and Computer Sciences, Heriot-Watt University, Edinburgh, EH14 4AS, UK [email protected] 3 Facultad de Inform´ atica, Universidad Polit´ecnica de Madrid, Campus de Montegancedo s/n, Boadilla del Monte 28660, Madrid, Spain

Abstract. We characterize the computational power of several restricted variants of communicating P systems. We show that 2-deterministic communicating P systems with 2 membranes, working in either minimally or maximally parallel mode, are computationally universal. Considering the sequential mode, 2 membranes are shown to characterize the power of partially blind multicounter machines. Next, a characterization of the power of 1-deterministic communicating P systems is given. Finally, we show that the non-deterministic variant in maximally parallel mode is universal already with 1 membrane. These results demonstrate differences in computational power between nondeterminism, 2-determinism and 1-determinism, on one hand, and between sequential, minimally and maximally parallel modes, on the other hand.

1

Introduction

Lately several computability models inspired by direct observation of living systems have been proposed. Cells and their biochemical processes are studied as computational devices. The complex structure of the cell may be modeled as a set of (nested) compartments delimited by membranes, each compartment containing objects that may interact between themselves or pass to another compartment. These reflections brought forth the definition of a model called membrane systems (also known as P systems) introduced in [11] and object of an intensive research [15]. Communicating P systems, one of the variants of the general P system model, was introduced in [12]. In this variant only a synchronized movement of the objects present in the membrane compartments is allowed. Communicating P systems have been studied in order to relate their computational power to some features present in their definition. Maximal parallel, minimal parallel, and sequential mode are different ways in which they can operate [1, 6, 12, 13]. Moreover each of these modes can be classified according to the maximal number of rules applied during a computation [7, 8]. In this paper we further study these systems

improving some existing results and characterizing their computational power under certain restrictions.

2

Definitions

We assume the reader to have familiarity with basic concepts of formal language theory [5], and in particular with the topic of communicating P systems [12, 13]. In this section we recall particular aspects relevant to our presentation. We use N·RE to denote the family of recursively enumerable sets of natural numbers. Let V be a finite set of objects, N the set of natural numbers, and N0 = N ∪ {0}. A multiset (over V ) is a function M : V → N0 ∪ {+∞}; for a ∈ V , M (a) defines the multiplicity of a in the multiset M . We will say that an element a of a multiset M has infinite multiplicity if M (a) = +∞. The support of a multiset M is the set supp(M ) = {a ∈ V | M (a) > 0}. We will say that an element a belongs to a multiset M (indicating a ∈ M ) if a ∈ supp(M ). The symbol φ indicates the empty multiset, that is, the multiset whose support is the empty set ∅. In the sequel we describe finite multisets by a listing of objects they contain, including their multiplicities. Let M1 , M2 : V → N0 ∪ {+∞} be two multisets. The union of M1 and M2 is the multiset M1 ∪ M2 : V → N0 ∪ {+∞} defined by (M1 ∪ M2 )(a) = M1 (a)+M2 (a), for all a ∈ V . The difference M1 \M2 , for two multisets such that M1 (a) ≥ M2 (a) for all a ∈ V, is defined by (M1 \M2 )(a) = M1 (a) − M2 (a) for all a ∈ V . Of course, if M1 (a) = +∞ and M2 (a) is finite, then M1 (a)\M2 (a) = +∞. If M2 (a) = +∞, then by convention, M1 (a)\M2 (a) = 0.

2.1

Multicounter Machines

Definition 1. A multicounter machine (introduced as program machine [10], and called (multi)counter machine in [4]) is the construct M = (n, B, l0 , lh , I) where: – – – – –

n is the number of counters; B is a set of labels; l0 is the initial/start label; lh is the final label; I is a finite set of instructions having an injective relation with the elements of the set B. Instructions of a multicounter machine are of the following forms:

li : (ADD(r), lj , lk ) Add one to the content of multicounter r and proceed, in a nondeterministic way, with the instruction labeled lj or lk . In the deterministic variant lj = lk and then the instruction is written in the form li : (ADD(r), lj ). li : (SUB (r), lj , lk ) If the counter r is not empty, then subtract one from its content and go to the instruction labeled lj , otherwise proceed with the instruction labeled lk . lh : HALT

Stop the machine. The final label lh is only assigned to this instruction.

A deterministic multicounter machine can compute on an input m ∈ N0 , initially stored into counter 1, the input counter. This value is accepted if and only if the machine executes the halt instruction. We denote by N (M ) the set of numbers accepted by a multicounter machine M . It is proved [10] that a multicounter machine with two counters can recognize N·RE. 2.2

Partially Blind Multicounter Machines

Partially blind multicounter machines (PBCM) were introduced in [4] At every step the machine can decrement or increment any counter or leave it unchanged. However, an attempt to decrement a counter containing zero leads to abortion of the computation and the input is not accepted. The input, initially stored into an input counter, is accepted when the machine eventually reaches a final state. The following facts are (among others) shown in [4]: – The emptiness problem for PBCM is decidable; – PBCM accepts a proper subset of N·RE. We can assume (without loss of generality) that each instruction of a PBCM is in one of the two forms li : (ADD(r), lj , lk ) or li : (SUB (r), lj ). The ADD instruction has the same semantics as in the case of a multicounter machine. The SUB instruction is interpreted as follows: if r > 0, then decrement r and proceed to the instruction labeled lj , else abort the computation. 2.3

Communicating P Systems

Communicating P systems (CPS) were introduced in [12] as a variant of P systems using symbol objects. A CPS of degree n, n ≥ 1 is defined as Π = (V, µ, env, Ei , Ri , i0 ), 1 ≤ i ≤ n, where: V is a finite, non-empty alphabet whose elements are called objects;

µ is a tree-like membrane structure consisting of n membranes. Membrane 1 is by convention the root of µ and it is called skin. If in the underlying tree a membrane j is a child of a membrane i, then we say that membrane i contains membrane j (or that membrane j is contained in i); env : V → +∞ is the multiset of objects initially present in the environment; Ei : V → N0 , 1 ≤ i ≤ n are multisets of objects over V ; Ri , 1 ≤ i ≤ n are sets of rules of the form: 1. a → aτ ; 2. ab → aτ1 bτ2 ; 3. ab → aτ1 bτ2 ccome ; where a, b, c ∈ V and τ, τ1 , τ2 ∈ {here, out}∪{ink | 2 ≤ k ≤ n}. In the sequel the subscript here will be omitted. i0 ∈ {1, . . . , n} is the input membrane. Furthermore, i0 is elementary, i.e., it does not contain any other membrane. A configuration of a CPS Π of degree n is given by (Fenv , F1 , . . . , Fn ) where Fenv and Fk , 1 ≤ k ≤ n are multisets of objects from V. The initial configuration of a CPS Π is (env, E1 , . . . , En ). We say that an object a is present in a membrane containing a multiset F if a ∈ supp(F ). A CPS can perform a computational step (i.e. change its configuration) in one of three elementary modes: – In maximally parallel mode a maximal multiset of applicable rules (such that no rule can be added to it) is applied simultaneously in each membrane. If in a membrane there are more than one such maximal multisets, then one of them is randomly chosen. – In minimally parallel mode an arbitrary number but at least one of all applicable rules are applied simultaneously in each membrane. – In sequential mode exactly one nondeterministically chosen rule is applied. 0 Given two configurations (Fenv , F1 , . . . , Fn ) and (Fenv , F10 , . . . , Fn0 ) of a CPS, 0 we define a computational step as the relation (Fenv , F1 , . . . , Fn ) ⇒ (Fenv , F10 , . . . , Fn0 ) as follows. The application of a rule of the kind ab → ainj , bout ∈ Ri , 1 ≤ i ≤ n, with membrane j contained in membrane i and membrane i contained in membrane 0 m is such that Fi0 = Fi \ {ab}; Fj0 = Fj ∪ {a}, and Fm = Fm ∪ {b}. If m = 1, 0 i.e. m is the skin membrane, then Fm = Fm ∪ {b} only if b 6∈ env. The lack of a subscript (meaning here) indicates that an object remains in the same membrane. Similarly for rules of the kind a → aτ , τ ∈ {out} ∪ {ink | 2 ≤ k ≤ n}. Rules of the kind ab → aτ1 bτ2 ccome , τ1 , τ2 ∈ {out} ∪ {ink | 2 ≤ k ≤ n}, can only be present in the set R1 associated with the skin membrane. Their semantics is similar to the rules ab → aτ1 bτ2 described above, augmented by: 0 0 F10 = F1 ∪ {c} and Fenv = Fenv \ {c} only if c 6∈ env, otherwise Fenv = Fenv . Considering each object present in env has an infinite multiplicity, Fenv contains only those objects which are not in env. The semantics of rules with other combination of targets from {out} ∪ {ink | 2 ≤ k ≤ n} is analogous. The reflexive and transitive closure of ⇒ is indicated by ⇒∗ .

A computation of a CPS Π is a finite sequence of configuration starting with the initial configuration. Let (env, E1 , . . . , En ) ⇒∗ (Fenv , F1 , · · · , Fn ) and let (Fenv , F1 , · · · , Fn ) be a halting configuration (i.e. no rule is applicable). Then we say that Π accepts the number card(Ei0 ) (given a set A, card(A) denotes its cardinality, i.e., the number of elements in A). The set of integers accepted by a CPS Π is denoted by N (Π). The class of sets of integers accepted by all CPS’s of a degree n ≥ 1 is denoted by NCPAn (mode), where mode ∈ {maxpar, minpar, seq} for CPS’s working in maximally parallel, minimally parallel or sequential mode, respectively. In [3] it is proved that a nondeterministic communicating P system with two membranes in maximally parallel mode is computationally complete, hence NCPA2 (maxpar) = N·RE. A CPS is called deterministic if given an initial configuration the sequence of configurations is unique, i.e., at each computation step the applicable multiset of rules (due to the selected mode of computation) is unique. In the case of minimally parallel mode this implies that in each membrane there is at most one applicable rule. We denote by NCPAn (mode, det) the class of sets of integers accepted by deterministic CPS’s of degree n. It is proved [6, Theorem 4] that there exists a fixed positive integer k (whose value, however, is not specified), such that a deterministic communicating P systems with k membranes is computationally universal. Hence, NCPAk (maxpar, det) = N·RE. A CPS is k-deterministic, k ≥ 1 [7] if it is deterministic and at each step the cardinality of the applicable multiset of rules (of the whole system) is at most k. Of a special interest are the cases k = 2 or k = 1. Obviously, each 1-deterministic CPS behaves sequentially (although, by definition, it can still be minimally or maximally parallel). Hence, any set accepted by a 1-deterministic CPS (in whichever mode) can be also accepted by a CPS working in sequential mode but not conversely. In [7, 8] it is proved that sequential CPS’s (with an unlimited number of membranes) are computationally equivalent to PBCM and hence can accept only a proper subclass of recursively enumerable sets.

3

The Universality of 2-Deterministic CPS

In this section we describe how to construct a 2-deterministic communicating P system Π of degree 2, simulating deterministic multicounter machine M . So this result defines a value for the degree k (k ≥ 2) for [6, Theorem 4]. As in the following proof in each computational step for each membrane there is at most one applicable rule, the result is valid for both maximally and minimally parallel modes. However, due to [7, 8], our result does not hold for the sequential mode (see also Section 4). Theorem 1. NCPAk (maxpar, det) = NCPAk (minpar, det) = N·RE, k ≥ 2. Proof. We show that each set accepted by a deterministic multicounter machine is also accepted by a 2-deterministic CPS’s of degree 2 working in minimally or maximally parallel mode. Consider a deterministic multicounter machine M =

(n, B, l0 , lh , I) with n counters {c1 , . . . , cn }. Let assume that c1 is the input counter and that x is its initial value. We construct a CPS Π simulating M with input x. Let Π = (V, µ, env, E1 , R1 , E2 , R2 , i0 ) with: o n (1) (2) (3) (4) – V = {H, J, I, V } ∪ li , li0 , li00 , li , li , li , li | li ∈ B ∪ {ai | 1 ≤ i ≤ n}; – – – – –

µ = [ 1 [2 ]2 ]1 ; env is such that supp(env) = V ; E1 = {H, l0 } , E2 = {ax1 } ; i0 = 2; Ri will be defined in the following.

The content of a counter i will be represented by the number of copies of a specific object ai in membrane 2. The system Π starts its computation with x copies of the objects a1 placed in membrane i0 since M starts with number x in counter 1. For every instruction of the kind li : (ADD(r), lj ) ∈ I the sets R1 and R2 contain the following rules:

R1 : (1)

1. H li → H li,in2 li,come This rule starts the simulation of the instruction li : (ADD(r), lj ). (1) (1) 2. H li → Hout li,in2 ar,come One copy of ar enters membrane 1. R2 : (1)

3. li li

(1)

→ li,out li,out

R1 : 4. li ar → li,out ar,in2 Jcome One occurrence of the object ar passes to membrane 2, this simulates the increase of one of counter r. (1) (1) 5. li J → li,out J lj,come 6. J lj → Jout lj Hcome The CPS is ready to simulate the instruction with label lj .

For every instruction of the kind li : (SUB (r), lj , lk ) ∈ I the sets R1 and R2 contain the following rules:

R1 : 7. 8.

9.

(1)

H li → H li,out li,come This rule starts the simulation of the instruction li : (SUB (r), lj , lk ). (1) (1) (2) H li → H li,in2 li,come (1) This rule sends object li to membrane 2 to check whether there is any ar , hence whether r contains a nonzero value. (2) (2) (3) H li → Hout li,in2 li,come R2 : (1)

(1)

10. li ar → li,out ar,out If there is any occurrence of ar in membrane 2, it is sent together with (1) object li to membrane 1. R1 : (3)

(1)

(1)

(3)

(4)

11. li li → li,out li,out li,come With this rule the CPS checks if the simulation of the decrement counter r was performed. R2 : (2)

(2)

12. li

→ li,out

R1 : (2)

(4)

(2)

(4)

(2)

(3)

(2)

(3)

0 13. li li → li,out li lj,come If the decrement of counter r was performed, then object lj enters membrane 1. 0 14. lj0 ar → lj,out ar,out lj,come (4) (4) 15. lj li → lj li,out Hcome The CPS is ready to simulate the instruction with label lj . 0 16. li li → li,out li lk,come If the decrement was not performed, then the object l30 enters membrane 1. (3) (3) → lk0 li,out Icome 17. lk0 li 00 0 Iin2 lk,come → lk,out 18. lk0 I

R2 : (1)

19. li

I

(1)

→ li,out Iout

R1 : (1)

20. li

(1)

I → li,out Iout Vcome

21. lk00 V

00 → lk,out V lk,come

22. lk V → lk Vout Hcome The CPS is ready to simulate the instruction with label lk .

The first instruction executed by the CPS is the one with label l0 , and accordingly the CPS starts with simulation of this instruction as l0 ∈ E1 . An instruction li : (ADD(1), lj ) is simulated by the following sequence of steps:

step 1. 2. 3. 4. 5. 6. 7.

configuration of Π F1 F2 k H li an1 am 2 a3 (1) n m k H li a1 a2 a3 li (1) n m k a1 a1 a2 a3 li li (1) n m k a1 li li a1 a2 a3 (1) k li J an+1 am 2 a3 1 n+1 m k lj J a 1 a2 a3 k lj H an+1 am 2 a3 1

applicable rules R1 R2 1 2 3 4 5 6

An instruction li : (SUB (1), lj , lk ) is simulated by the following sequence of steps: if counter 1 is not empty,

step 1. 2. 3. 4. 5. 6. 7. 8.

configuration of Π F1 F2 n+1 m k H li a1 a2 a3 (1) k am H li an+1 2 a3 1 (2) n+1 m k (1) H li a1 a2 a3 li (3) (1) k (2) li li a1 an1 am 2 a3 li (4) (2) k li a1 li an1 am 2 a3 0 (4) n m k l2 li a1 a1 a2 a3 (4) k li lj an1 am 2 a3 n m k lj H a1 a2 a3

applicable R1 7 8 9 11 13 14 15

rules R2

10 12

if counter 1 is empty, step 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.

configuration of Π F1 F2 k H li am 2 a3 (1) m k H li a2 a3 (2) (1) m k H li li a2 a3 (3) (1) k (2) li li am 2 a3 li (3) (2) (1) m k li li li a2 a3 (1) (3) k li am li l30 2 a3 (1) k I l30 li am 2 a3 (1) m k 00 l3 I li a2 a3 (1) 00 k l3 I li am 2 a3 00 m k l3 V a2 a3 k lk V am 2 a3 m k lk H a2 a3

applicable rules R1 R2 7 8 9 12 16 17 18 19 20 21 22

Instructions related to counters different than counter 1 are simulated in a similar way. The computation of Π halts when the object lh is in the skin membrane; when this happens, no further rule is applicable. This corresponds to the halting instruction of M labeled lh . Hence N (M ) ⊆ N (Π). The rest of the proof follows by the Church-Turing thesis, by the computational universality of the multicounter machine [10], and by elementary properties of CPS’s. u t

4

The Power of Sequential CPS

In this section we describe how non-deterministic CPS’s of a degree n ≥ 2 working in sequential mode are shown to be computationally equivalent to PBCM. Our Theorem 2 improves the analogous result in [7, 8] which assumes an unbounded number of membranes of the CPS. Theorem 2. A set I ⊆ N0 is accepted by a CPS of a degree n ≥ 2 working in sequential mode iff it is accepted by a PBCM. Proof. By [7, 8], any CPS working in sequential mode (with an unbounded number of membranes) can be simulated by a PBCM. It remains to show that a PBCM can be simulated by a sequential CPS of degree 2. In the following we consider nondeterministic PBCM. The construction of the CPS is based on the one of Theorem 1, the differences are indicated in the following. Every instruction of a PBCM of the kind li : (ADD(r), lj , lk ) is simulated by rules 1–6, augmented with another two rules analogous to 5 and 6: (1) (1) li J → li,out J lk,come J lk → Jout lk Hcome

These rules allow the simulation to proceed nondeterministically with the instruction labeled lj or lk . When simulating an instruction of the kind li : (SUB (r), lj ), if r = 0, then PBCM aborts its computation without accepting the input. Consequently, in such a case the simulating CPS must not halt. We replace the original rules 7–22 with the following rules. R1 : (1)

7. H li → H li,out li,come This rule starts the simulation of the instruction li : (SUB (r), lj ). (1) (1) (2) 8. H li → H li,in2 li,come (1) This rule sends object li to membrane 2 to decrement the number of objects ar present in this membrane. R2 : 9.

(1)

(1)

li → li If there is no ar in membrane 2, then this rule is iterated and the system Π never halts. (1) (1) 10. li ar → li,out ar,out If an occurrence of ar is present in membrane 2, then this rule can be (1) nondeterministically chosen, sending ar together with li to the skin membrane. R1 : (1)

(1)

11. li ar → li,out ar,out lj,come (2) (2) 12. li lj → li,out lj Hcome The CPS is ready to simulate the next instruction with label lj . The CPS Π halts (and accepts its input) if and only if the PBCM M reaches its halting state. u t

5

The Power of 1-Deterministic CPS

In this section we characterize the computational power of 1-deterministic communicating P systems. Theorem 3. Each set of integers accepted by a 1-deterministic CPS is in one of the forms ∅, N0 , {0, 1, . . . , n}, n ≥ 0.

Proof. Trivially, there exists a 1-deterministic CPS that accepts the empty set, as well as a one accepting N0 . A CPS accepting a set {0, 1, . . . , n}, n ≥ 0, is Π = (V, [1 ]1 , env, E1 , R1 , 1), where V = {a, b1 , . . . , bn+1 }, supp(env) = {b2 , . . . , bn+1 }, E1 = {am , b1 }. The rules present in R1 are: abi → aout bi,out bi+1,come for 1 ≤ i ≤ n and abi+1 → abi+1 (this last rule forces the system to an endless computation in the case when its input is m > n). To prove that 1-deterministic CPS’s can not accept anything more, it is enough to show that, for an arbitrary n ≥ 1 and for a 1-deterministic CPS Π, n ∈ N (Π) implies (n − 1) ∈ N (Π.) Therefore, assume that n ∈ N (Π) for a 1deterministic CPS Π of a degree k ≥ 1. Let i0 be the input membrane of Π, and let an input for Π be represented by the number of objects a present in i0 in the initial configuration. Denote by left(r) the multiset of objects on the left-hand side of a rule r. Now consider the rules applied in i0 during the computation of Π with input n, which contain at their left-hand side object a. (i) Let there be no such rules, or let each such rule r be applied in a configuration (Fenv , F1 , . . . , Fk ) such that Fi0 (a) > left(r)(a). Then Π with the input n−1 passes the same sequence of configurations as with the input n, except that the multiplicity of a in i0 in each configuration is reduced by one. However, the same sequence of rules is applicable and therefore Π halts and accepts n − 1. (ii) Let there be such a rule r applied in a configuration (Fenv , F1 , . . . , Fk ) such that Fi0 (a) = left(r)(a). Simultaneously let (Fenv , F1 , . . . , Fk ) be the first reached configuration where the equality Fi0 (a) = left(r)(a) holds. Then Π with the input n − 1 reaches an analogous configuration, but with Fi00 = Fi0 \{a}. Therefore rule r cannot be applied and, due to 1-determinism of Π, there is no other applicable rule and the system halts. Consequently, Π again accepts n − 1. This completes the proof as no other case than (i) or (ii) described above can occur. u t Corollary 1. NCPAk (seq, det) = NCPA1 (minpar, det) = {{0, 1, . . . , n} | n ≥ 0} ∪ {∅, N0 }, for an arbitrary k ≥ 1. Proof. Observe that each deterministic CPS working in minimally parallel mode with degree 1, or working in sequential mode with an arbitrary degree, is necessarily 1-deterministic.

6

The Power of Non-Deterministic CPS of degree 1

In this section we will study the computational power of non-deterministic CPS of degree 1, improving the result in [3] which shows that these systems with a degree ≥ 2 are universal. Theorem 4. NCPAk (maxpar) = N·RE, k ≥ 1.

Proof. Consider a multicounter machine M = (n, B, l0 , lh , I) with n counters c1 , . . . , cn , and denote B = {l0 , . . . , lm }, m ≥ 0. Let c1 be the input counter and let x be its initial value. We construct a CPS Π simulating M with input x. Let Π = (V, [1 ]1 , env, E1 , R1 , 1) with: (1)

– V = {Ak , A0k , A00k , lk , lk , lk0 , lk00 , Ck , Dk , Hk | 0 ≤ k ≤ m} ∪ {ai | 1 ≤ 1 ≤ n} ∪ {B, z, z 0 }; (1) – supp(env) = {lk , lk , lk0 , lk00 , | 0 ≤ k ≤ m} ∪ {ai | 1 ≤ 1 ≤ n}; – E1 = {ax1 , B, z} ∪ {Ak , A0k , A00k , Ck , Dk , Hk | 0 ≤ k ≤ m}; – R1 will be defined bellow. Our proof uses a technique similar to the one introduced in [14]. The simulation is composed of two parts: in its initial configuration first the CPS is initialized, then the simulation starts. The initialization of the CPS consists of sending all the Ci , Di , Hi , i 6= 1, to the environment and introducing the symbol l0 . This is done by the following rules. I.

Initialization

i.

Aj Cj → Aj,out Cj,out , 1 ≤ j ≤ m A0 C0 → A0,out C0 l0,come All the Cj , j 6= 0 are sent out.

ii. A0j Dj → A0j,out Dj,out , 1 ≤ j ≤ m A00 D0 → A00,out D0 All the Dj , j 6= 0 are sent out. iii. A00j Hj → A00j,out Hj,out , 1 ≤ j ≤ m A000 H0 → A000,out H0 All the Hj , j 6= 0 are sent out. iv. Aj B A0j B A00j B

0 ,0≤j≤m → Aj Bzcome 0 0 → Aj Bzcome ,0≤j≤m 0 → A00j Bzcome ,0≤j≤m

The rules in group iv ensure that each Cj , Dj and Hj is subject to a rule from the group i, ii, and iii, respectively, in the first step. If rule 6 (described bellow) was applied instead, then, due to the maximal parallelism, a rule from the group iv would also be applied. This rule would introduce the symbol z 0 into the membrane, forcing the system into an infinite loop (see rule 8 bellow). The simulation of the multicounter machine starts when the symbol l0 (corresponding to the initial label of M ) is introduced in the membrane. Consider an instruction of the kind li : (ADD(r), lj , lk ) of machine M. We can assume

without loss of generality that i 6= j and i = 6 k. For each such instruction the following rules are present in R1 : II. Simulation of an instruction li : (ADD(r), lj , lk ) 1. 2. 3. 4. 5. 6. 7. 8.

Hi li (1) li Ci ls Di ls Cs Cs D s Hi D i ls Cs z0

→ → → → → → → →

(1)

Hi li,out li,come (1) li,out Ci,out ls,come , s ∈ {j, k} ls Di,out Cs,come , s ∈ {j, k} ls Cs Ds,come , s ∈ {j, k} Cs Ds Hs,come , s ∈ {j, k} Hi,out Di ar,come 0 , s ∈ {j, k} ls,out Cs,out zcome 0 z

In order to simulate correctly the instruction li : (ADD(r), lj , lk ), these rules have to be applied in the following sequence: 1, (2, 6), 3, 4, 5. So rules 2 and 6 are applied in the same time step. If rule 6 is applied before rule 1, then the CPS will never halt due to rules 7 and 8 (this will be explained in a while). Rules 4 and 5 can only be applied once as there are unique copies of Ds and Hs in the environment. Rule 5 cannot be applied during the initialization phase as Cs , Ds , and Hs are together in the membrane. Rule 7 is useful in the following situation. Let M have two instructions li : (ADD(r), lj , lk ) and lj : (ADD(r), lj 0 , lk0 ), and assume that rule 7 is not present in R1 . Rule 5 associated to instruction li and rule 6 associated to instruction lj could be applied in an iterative way, letting several instances of ar to be introduced in the membrane. The computation of the CPS could then go on with the application of rule 1 associated to instruction lj . This would not be a simulation of M . With rule 7 such a situation is impossible. The described application of rule 6 associated to instruction lj is performed together (because of maximal parallelism) with an application of rule 7 associated to instruction li . (Observe that rule 4 cannot be applied instead of rule 7 as Ds is not present in env). Therefore object z 0 will enter the membrane, forcing the system Π to never halt due to rule 8. Analogous situation is caused when, during the simulation of instruction li , rule 6 is applied before rule 1.

Consider now instructions of the kind li : (SUB (r), lj , lk ) of the multicounter machine M. Again we can assume that i 6= j and i 6= k. For each such instruction the following rules are present in R1 :

III. Simulation of an instruction li : (SUB (r), lj , lk ) 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19.

Hi li (1) Ci li a r Hi li0 B F Di li00 Oi li00 Hi ls Di ls Cs Cs Ds Ci li

→ → → → → → → → → → →

(1)

Hi li,out li,come (1) 0 Ci,out li,out li,come ar,out Hi,out Fcome 00 li,out Bli,come Fout Di Oi,come 00 Oi,out lj,come li,out 00 li,out Hi,out lk,come ls Di,out Cs,come , s ∈ {j, k} ls Cs Ds,come , s ∈ {j, k} Cs Ds Hs,come , s ∈ {j, k} 0 Ci,out li,out zcome

For a correct simulation of instruction li : (SUB (r), lj , lk ) these rules have to be applied in the following sequences: (a) if counter r is not empty (there is some ar in F1 ): 9, (10, 11), (12, 13),14, 16, 17, 18, (b) if counter r is empty: 9, 10, 12, 15, 16, 17, 18. The function of rule 19 is similar to that of rule 7 explained above. The reader can verify that the sequence of rules described above simulate correctly the instruction SUB. Any other sequence leads the system into an infinite loop. The simulation of the instruction lh : HALT of the multicounter machine M is performed by: IV. Simulation of an instruction lh :HALT 20. Ch Dh → Ch,out Dh,out 21. lh z → lh,out zout 22. z → z. Recall that CPS Π has object z present in the initial multiset E1 . Rule 22 obliges the CPS not to halt until the object lh (associated to the label of the instruction HALT ) appears in the membrane. The application of rule 21 will halt the computation of the CPS. ¤

7

Concluding remarks

We have characterized the power of 2-deterministic, 1-deterministic and sequential communicating P systems, as well as non-deterministic systems of degree 1. Our results indicate differences in computational power between (a) sequential

and minimally parallel mode (in the case of deterministic systems of degree ≥ 2), and (b) 1-deterministic and 2-deterministic systems. The power of deterministic CPS’s of degree 1 working in maximally parallel mode remains open. Notice that the results contained in this paper are transferable also to the case of CPS’s working as language acceptors [2, 8]. Each time one or more rules of the form ab → aτ1 bτ2 ccome are applied, a multiset of objects is imported into the skin membrane. A sequence of these multisets form an input word. Actually, one can assume without loss of generality that, at every step, at most one symbol from an input alphabet is imported [6]. If CPS’s are regarded as acceptors, then the proofs present in this paper imply that k-deterministic CPS’s of a degree n, for k, n ≥ 2, working in maximally or minimally parallel mode, accept all recursively enumerable languages, while sequential CPS’s of degree n ≥ 2 accept the same class of languages as PBCM.

Acknowledgments The research of P. Sos´ık was partially supported by Czech Science Foundation, Grant No. 201/06/0567, and by the Programa Ram´on y Cajal, Ministerio de Ciencia y Tecnolog´ıa, Spain.

References 1. G. Ciobanu, L. Pan, and G. P˘ aun. P systems with minimal parallelism, 2005. submitted. 2. E. Csuhaj-Varj´ u. P automata. In Mauri et al. [9], pages 19–35. 3. R. Freund and A. P˘ aun. Membrane systems with symport/antiport rules: Universality results. volume 2597 of Lecture Notes in Computer Science, pages 270–287. Springer-Verlag, Berlin, Heidelberg, New York, 2002. 4. S. A. Greibach. Remarks on blind and partially blind one-way multicounter machines. Theoretical Computer Science, 7:311–324, 1978. 5. J. E. Hopcroft and D. Ullman. Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, 1979. 6. O. H. Ibarra. On the computational complexity of membrane systems. Theoretical Computer Science, 320:89–109, 2004. 7. O. H. Ibarra, S. Woodworth, H-C. Yen, and Z. Dang. On the computational power of 1-deterministic and sequential P systems. In L. Wang, editor, COCOON, volume 3595 of Lecture Notes in Computer Science, pages 905–914. Springer-Verlag, Berlin, Heidelberg, New York, 2005. 8. O. H. Ibarra, S. Woodworth, H-C. Yen, and Z. Dang. On the computational power of 1-deterministic and sequential P systems. Fundamenta Informaticae, 2006. to appear. 9. G. Mauri, G. P˘ aun, and C. Zandron, editors. Membrane Computing, International Workshop, WMC 2004, Milano, Italy, Revised Papers, volume 3365 of Lecture Notes in Computer Science. Springer-Verlag, Berlin, Heidelberg, New York, 2005. 10. M. L. Minsky. Computation: Finite and Infinite Machines. Automatic computation. Prentice-Hall, 1967.

11. G. P˘ aun. Computing with membranes. Journal of Computer and System Sciences, 1(61):108–143, 2000. 12. P. Sos´ık. P systems versus register machines: two universality proofs. In PreProc. Workshop on Membrane Computing (WMC-CdeA2002), Curtea de Arges, Romania, pages 371–382, 2002. 13. P. Sosik and J. Matysek. Membrane computing: when communication is enough. In C.S. Calude, M.J. Dinneen, and F. Peper, editors, Proc. Unconventional Models of Computation 2002, volume 2509 of Lecture Notes in Computer Science, pages 264–275. Springer-Verlag, Berlin, Heidelberg, New York, 2002. 14. G. Vaszil. On the size of P systems with minimal symport/antiport. In Mauri et al. [9], pages 422–431. 15. C. Zandron. P-systems web page: http://psystems.disco.unimib.it.

Suggest Documents