Enjoying Natural Computing pp 120  Cite as
Chocolate P Automata
 262 Downloads
Abstract
We introduce several variants of inputdriven tissue P automata – we also will call them chocolate automata – where the rules to be applied only depend on the input symbol. Both strings and multisets are considered as input objects; the strings are either read from an input tape or defined by the sequence of symbols taken in, and the multisets are given in an input cell at the beginning of a computation, enclosed in a vesicle. Additional symbols generated during a computation are stored in this vesicle, too. An input is accepted when the vesicle reaches a final cell and it is empty. The computational power of some variants of inputdriven tissue P automata (chocolate automata) is illustrated by examples and compared with the power of the inputdriven variants of other automata as register machines and counter automata.
1 Introduction
In the basic model of membrane systems as introduced at the end of the last century by Gheorghe Păun, e.g., see [9, 30], the membranes are organized in a hierarchical membrane structure (i.e., the connection structure between the compartments/regions within the membranes being representable as a tree), and the multisets of objects in the membrane regions evolve in a maximally parallel way, with the resulting objects also being able to pass through the surrounding membrane to the parent membrane region or to enter an inner membrane. Many variants of membrane systems, for obvious reasons mostly called P systems, have been investigated during nearly two decades, most of them being computationally complete, i.e., being able to simulate the computations of register machines. If an arbitrary graph is used as the connection structure between the cells/membranes, the systems are called tissue P systems, see [21].
Instead of multisets of plain symbols coming from a finite alphabet, P systems quite often operate on more complex objects (e.g., strings, arrays), too. A comprehensive overview of different variants of (tissue) P systems and their expressive power is given in the handbook which appeared in 2010, see [32]. For a short view on the state of the art on the domain, we refer the reader to the P systems website [35] as well as to the Bulletin series of the International Membrane Computing Society [34].
The notion and concept of inputdriven pushdown automata goes back to the seminal paper [22] as well as the papers [6, 10] improving the complexity measures shown in [22]. The main idea of inputdriven pushdown automata is that the input symbols uniquely determine whether the automaton pushes a symbol, pops a symbol, or leaves the pushdown unchanged. Inputdriven pushdown automata have been rediscovered at the beginning of this century under the name of visibly pushdown automata, see [3, 4]. Since then, variants of inputdriven pushdown automata have gained growing interest, especially because closure properties and decidable questions of the language classes defined by these devices turn out to be similar to those of regular languages. Several new variants of inputdriven automata have been developed, for example, using stacks or queues, see [5, 19, 20]. For complexity issues of inputdriven pushdown automata, the reader is referred to [24, 25, 26, 27].
The socalled point mutations, i.e., insertion, deletion, and substitution, which mean inserting or deleting one symbol or replacing one symbol by another one in a string or multiset are very simple biologically motivated operations. For example, on strings graphcontrolled insertiondeletion systems have been investigated in [13], and P systems using these operations at the left or right end of string objects were introduced in [16], where also a short history of using these point mutations in formal language theory can be found.
The operations of insertion and deletion in multisets show a close relation with the increment and decrement instructions in register machines. The power of changing states in connection with the increment and decrement instructions then can be mimicked by moving the whole multiset representing the configuration of a register machine from one cell to another one in the corresponding tissue system after the application of an insertion or deletion rule. Yet usually moving the whole multiset of objects in a cell to another one, besides maximal parallelism, requires target agreement between all applied rules, i.e., that all results are moved to the same target cell, e.g., see [15].
A different approach has been introduced in [2]: in order to guarantee that the whole multiset is moved even if only one point mutation is applied, the multiset is enclosed in a vesicle, and this vesicle is moved from one cell to another one as a whole, no matter if a rule has been applied or not. Requiring that one rule has to be applied in every derivation step, a characterization of the family of sets of (vectors of) natural numbers defined by partially blind register machines, which itself corresponds with the family of sets of (vectors of) natural numbers obtained as number (Parikh) sets of string languages generated by graphcontrolled or matrix grammars without appearance checking, is obtained.
The idea of using vesicles of multisets has already been used in variants of P systems using the operations drip and mate, corresponding with the operations cut and paste wellknown from the area of DNA computing, see [14]. Yet in that case, always two vesicles (one of them possibly an axiom available in an unbounded number) have to interact. In the model as introduced in [2] and also to be adapted in this paper, the rules are always applied to the same vesicle. The point mutations, i.e., insertion, deletion, and substitution, wellknown from biology as operations on DNA, have also widely been used in the variants of networks of evolutionary processors (NEPs), which consist of cells (processors) each of them allowing for specific operations on strings, and in each derivation step, after the application of a rule, allow the resulting string to be sent to another cell provided specific conditions (for example, random context output and input filters). A short overview on NEPs is given in [2], too.
In this paper, we now introduce inputdriven tissue P automata – which we will also call chocolate automata – where the rules to be applied only depend on the input symbol. Taking strings as input objects, these are either read from an input tape or defined by the sequence of symbols taken in, and as a kind of additional storage we use a multiset of different symbols enclosed in a vesicle which moves from one cell of the tissue P system to another one depending on the input symbol; the input symbol at the same time also determines whether (one or more) symbols are added to the multiset in the vesicle or removed from there. The given input is accepted if the whole input has been read and the vesicle has reached a final cell and is empty at this moment. When using multisets as input objects, these are enclosed in the vesicle in the input cell at the beginning of a computation, which vesicle then will also carry the additional symbols. The given input multiset is accepted if no input symbols are present any more and the vesicle has reached a final cell and is empty at this moment.
As rules operating on the multiset enclosed in the vesicle when reading/consuming an input symbol we use insertion, deletion, and substitution of multisets, applied in the sequential derivation mode. As restricted variants, we consider systems without allowing substitution of multisets and systems only allowing symbols to be inserted or deleted (or substituted) as it is common when using point mutation rules.
Multiset automata have already been considered in [7], where models for finite automata, linear bounded automata, and Turing machines working on multisets are discussed. When dealing with multisets only, the tissue P automata considered in this paper can be seen as one of the variants of multiset pushdown automata as investigated in [18], where no checking for the emptiness of the multiset memory during the computation is possible. Various lemmas proved there then can immediately be adapted for our model. Moreover, also the inputdriven variants can be defined in a similar manner, although inputdriven multiset pushdown automata have not yet been considered in that paper.
We should also like to mention that the control given by the underlying communication structure of the tissue P system could also be interpreted as having a P system with only one membrane but using states instead. For a discussion on how to use and interpret features of (tissue) P systems as states we refer to [1], where also an example only using the point mutation rules insertion and deletion is given. Moreover, we will also consider another alternative model very common in the P systems area, i.e., P systems with antiport and symport rules, which were introduced in [29]; for overviews on P automata, we refer to [32], Chapter 5, [31], and [11]. Onemembrane P systems using antiport rules in a sequential manner and with specific restrictions on the rules then are an adequate model for (inputdriven) P automata, yet the restrictions are less visible than in the model of inputdriven tissue P automata. On the other hand, when dealing with strings instead of multisets, the way how to read or define the input string in P systems with antiport rules has already been investigated thoroughly, e.g., see [8, 11, 28] for an overview.
Interpreting this story in an abstract way, the different chocolate sorts correspond to the different nonterminal symbols used as intermediate symbols during the computation. The events like going to a specific store as well as the coffee breaks and the awardgiving events correspond with the terminal input symbols. There is no time condition on the sequence of these events except that chocolates have to be bought before they can be given away. This perfectly corresponds with the use of a mutiset bag (vesicle) as a storage, where the sequence does not matter as it is the case when dealing with strings stored in the stack of a pushdown automaton. Finally, the acceptance condition of empty vesicle at the end of the computation corresponds with having an empty chocolate bag at the end of the Brainstorming Week. Even several variants of the inputdriven automata model can be derived from this chocolate story: for example, it is natural to buy several pieces in one store or to give away several chocolates at the same event, which nicely corresponds with putting more than one symbol into the vesicle or deleting more than one symbol from the vesicle at the same moment when reading/consuming an input symbol.Preparing for the forthcoming week in Sevilla, expecting to meet many friends and colleagues as well as to have long nights of intensive discussions with his friends from Moldova, Artiom, Sergiu, and Sergey, Rudi thinks about how to fill his bag with a lot of chocolates. Moreover, a special birthday anniversary has to be celebrated, so some special chocolate cake is needed for this occasion. Starting to buy the cake, Rudi visits the famous Sacher in Vienna, and a big Sacher Torte as well as some other special Sacher sweets find their way into Rudi’s chocolate bag.
A lot more sweets are expected to be needed, so Rudi at his home town Stockerau visits several stores to buy Austrian sweets like the famous Mozart Kugeln. With his chocolate bag well filled, Rudi now is ready and Open image in new window to start his journey from Vienna to Sevilla together with Marion. The friendly atmosphere established by Mario’s Sevillan group immediately invites the teams from Austria – Rudi and Marion – and from Moldova – Artiom, Sergiu, and Sergey – to discuss new ideas on membrane computing. During the whole Brainstorming Week, a lot of chocolate is needed as brain fuel for the team members.
The famous churros are announced to be served in the middle of the week, during the morning coffee break; hence, to not interfere with this tradition, already on the second day the Sacher Torte is presented to Mario on the occasion of his special Open image in new window anniversary, and he happily shares it with the participants of the meeting during the morning coffee break.
At the end of the Brainstorming Week, special chocolate awards are given to some participants: as usual, Artiom has had the most questions during all the talks, so he gets the chocolate award for the “most active participant in discussions”. From all the young researchers present in Sevilla, Sergiu has contributed the most with new ideas especially on the last day, when results obtained during the current Brainstorming Week have been presented; therefore, he receives the chocolate award as the “most innovative young P scientist”. During the closing ceremony, the members of the Sevillan group of Open image in new window finally get a lot of chocolates as a special thankyou gift for their outstanding friendly organization.
After the Brainstorming Week Rudi returns home to Vienna together with Marion, with his chocolate bag being empty, but with his brain full of new “P ideas” obtained based on the discussions with the participants of the meeting, especially with his friends from Moldova.
The rest of the paper now is structured as follows: In Sect. 2 we recall some wellknown definitions from formal language theory. The main definitions for the model of (inputdriven) tissue P automata as well as its variants to be considered in this paper are given in Sect. 3, and there we also present the definition of the alternative model of (inputdriven) onemembrane P automata with (restricted) antiport rules; moreover we also give some first examples and results. Further illustrative examples and some more results, especially for inputdriven tissue P automata are exhibited in Sect. 4. As upper bound for the family of sets of vectors of natural numbers accepted by inputdriven tissue P automata we get the family of sets of vectors of natural numbers generated by partially blind register machines, and as upper bound for the family of sets of strings accepted by inputdriven tissue P automata we get the family of sets of strings accepted by partially blind counter automata. A summary of the results obtained in this paper and an outlook to future research are presented in Sect. 5.
2 Prerequisites
We start by recalling some basic notions of formal language theory. An alphabet is a nonempty finite set of symbols. A finite sequence of symbols from an alphabet V is called a string over V. The set of all strings over V is denoted by \(V^{*}\); the empty string is denoted by \(\lambda \); moreover, we define \(V^{+}=V^{*}\setminus \{\lambda \}\). The length of a string x is denoted by x, and by \(x_{a}\) we denote the number of occurrences of the symbol a in a string x.
A multiset M with underlying set A is a pair (A, f) where \(f:\,A\rightarrow \mathbb {N}\) is a mapping, with \(\mathbb {N}\) denoting the set of natural numbers (i.e., nonnegative integers). If \(M=(A,f)\) is a multiset then its support is defined as \(supp(M)=\{x\in A \,\,f(x)> 0\}\). A multiset is empty (respectively finite) if its support is the empty set (respectively a finite set). If \(M=(A,f)\) is a finite multiset over A and \(supp(M)=\{ a_1,\ldots ,a_k\}\), then it can also be represented by the string \(a_1^{f(a_1)} \dots a_k^{f(a_k)}\) over the alphabet \(\{ a_1,\ldots ,a_k\}\) (the corresponding vector \(({f(a_1)}, \dots ,{f(a_k)})\) of natural numbers is called Parikh vector of the string \(a_1^{f(a_1)} \dots a_k^{f(a_k)}\)), and, moreover, all permutations of this string precisely identify the same multiset M (they have the same Parikh vector). The set of all multisets over the alphabet V is denoted by \(V^{\circ }\).
The family of all recursively enumerable sets of strings is denoted by RE, the corresponding family of recursively enumerable sets of Parikh vectors is denoted by PsRE. For more details of formal language theory the reader is referred to the monographs and handbooks in this area, such as [33].
2.1 Insertion, Deletion, and Substitution
For an alphabet V, let \(a\rightarrow b\) be a rewriting rule with \(a,b\in V\cup \{\lambda \}\), and \(ab\ne \lambda \); we call such a rule a substitution rule if both a and b are different from \(\lambda \) and we also write S(a, b); such a rule is called a deletion rule if \( a\ne \lambda \) and \(b=\lambda \), and it is also written as D(a); \(a\rightarrow b\) is called an insertion rule if \(a=\lambda \) and \(b\ne \lambda \), and we also write I(b). The sets of all insertion rules, deletion rules, and substitution rules over an alphabet V are denoted by \(Ins_{V}\), \(Del_{V}\), and \(Sub_{V}\), respectively. Whereas an insertion rule is always applicable, the applicability of a deletion and a substitution rule depends on the presence of the symbol a. We remark that insertion rules, deletion rules, and substitution rules can be applied to strings as well as to multisets. Whereas in the string case, the position of the inserted, deleted, and substituted symbol matters, in the case of a multiset this only means incrementing the number of symbols b, decrementing the number of symbols a, or decrementing the number of symbols a and at the same time incrementing the number of symbols b.
These types of rules and the corresponding notations can be extended by allowing more than one symbol on the lefthand and/or the righthand side, i.e., \(a,b\in V^*\), and \(ab\ne \lambda \). The corresponding sets of all extended insertion rules, deletion rules, and substitution rules over an alphabet V are denoted by \(Ins^*_{V}\), \(Del^*_{V}\), and \(Sub^*_{V}\), respectively.
2.2 Register Machines
Register machines are wellknown universal devices for computing (generating or accepting) sets of vectors of natural numbers.
Definition 1

m is the number of registers,

B is a set of labels bijectively labeling the instructions in the set P,

\(I\subseteq B\) is the set of initial labels, and

\(h\in B\) is the final label.

\(p:\left( ADD\left( r\right) ,K\right) \), with \(p\in B\setminus \left\{ h\right\} \), \(K\subseteq B\), \(1\le r\le m\). Increase the value of register r by one, and nondeterministically jump to one of the instructions in K.

\(p:\left( SUB\left( r\right) ,K,F\right) \), with \(p\in B\setminus \left\{ h\right\} \), \(K,F\subseteq B\), \(1\le r\le m\). If the value of register r is not zero then decrease the value of register r by one (decrement case) and jump to one of the instructions in K, otherwise jump to one of the instructions in F (zerotest case).

h : HALT. Stop the execution of the register machine.
A configuration of a register machine is described by the contents of each register and by the value of the current label, which indicates the next instruction to be executed.
In the accepting case, a computation starts with the input of a kvector of natural numbers in its first k registers and by executing one of the initial instructions of P (labeled with \(l\in I\)); it terminates with reaching the HALTinstruction. Without loss of generality, we may assume all registers to be empty at the end of the computation.
By \(\mathcal {L}(RM)\) we denote the family of sets of vectors of natural numbers accepted by register machines. It is well known (e.g., see [23]) that \(PsRE = \mathcal {L}(RM)\).
Partially Blind Register Machines. In the case when a register machine cannot check whether a register is empty we say that it is partially blind: the registers are increased and decreased by one as usual, but if the machine tries to subtract from an empty register, then the computation aborts without producing any result (that is we may say that the subtract instructions are of the form \(p:\left( SUB\left( r\right) ,K,abort\right) \); instead, we simply will write \(p:\left( SUB\left( r\right) ,K\right) \).
Moreover, acceptance now by definition also requires all registers to be empty at the end of the computation, i.e., there is an implicit test for zero at the end of a (successful) computation, that is why we say that the device is partially blind. By \(\mathcal {L}(PBRM)\) we denote the family of sets of vectors of natural numbers accepted by partially blind register machines. It is known (e.g., see [12]) that partially blind register machines are strictly less powerful than general register machines (hence, than Turing machines); moreover, \(\mathcal {L}(PBRM)\) characterizes the Parikh sets of languages generated by graphcontrolled or matrix grammars without appearance checking.
2.3 Counter Automata
It is well known (e.g., see [23]) that the family of string languages accepted by counter automata equals RE (in fact, only two counters are needed).
Partially Blind Counter Automata. As in the case of register machines, a counter automaton is called partially blind if it cannot check whether a register is empty, and acceptance by definition requires the whole input to be read and all counters to be empty at the end of the computation. For basic results on partially blind counter automata we refer to the seminal paper [17]. The family of string languages accepted by partially blind counter automata is denoted by \(\mathcal {L}(PBCA)\).
2.4 InputDriven Register Machines and Counter Automata
An inputdriven register machine/counter automaton (an \(IDRM^*\) and \(IDCA^*\), respectively, for short) can be defined in the following way: any decrement of an input register r/any reading of a terminal symbol a is followed by fixed sequences of instructions on the working registers/counters only depending on the input register r/the terminal symbol a. If each such sequence is of length exactly one, then we speak of a realtime inputdriven register machine/counter automaton (an IDRM and IDCA, respectively, for short).
Remark 1
We emphasize that we have chosen a very restricted variant of what it means that the actions on the working registers only depend on the input symbol just read: no matter which label the read instruction read(a) has, it must always be followed by the same sequence \(\alpha (r)\); only the branching to labels from \(\bigcup _{q\in K}K_q\) allows for taking different actions – in fact, readinstructions followed by the corresponding sequences of instructions – afterwards. \(\square \)
Remark 2
Allowing a set of initial labels as well as sets of labels in the ADD and SUBinstructions may look quite unusual, but especially for the inputdriven automata this feature turns out to be essential:
Assume we had allowed only one initial label i in any inputdriven counter automaton. Now consider the finite multiset language \(\{a,b\}\): assume there is an inputdriven partially blind counter automaton accepting \(\{a,b\}\). By definition, the instruction assigned to the initial label i must be a read instruction. With the initial label i, only one of the read instructions read(a) or read(b) can be assigned, hence, only a or only b can be accepted, a contradiction.
A similar argument holds for partially blind register machines taking the input set of twodimensional vectors \(\{(1,0),(0,1)\}\): the instruction assigned to i must be a SUBinstruction either on register 1 or on register 2, again leading to a contradiction.
On the other hand, with our more general definition, these sets are in \(\mathcal {L}(IDCA^*)\) and \(\mathcal {L}(IDRM^*)\), respectively. Still, in general we do not have closure under union, as the sequences of instructions after a readinstruction or a SUBinstruction in two different counter automata or register machines, respectively, need not be the same. \(\square \)
3 Tissue P Automata as Multiset Pushdown Automata
We now define a model of a tissue P automaton and its inputdriven variants, first for the case of working with multisets as input objects:
Definition 2

L is a set of labels identifying in a onetoone manner the L cells of the tissue P system \(\varPi \);

V is the alphabet of the system;

\(\varSigma \subseteq V\) is the (nonempty) input alphabet of the system;

\(\varGamma \subseteq V\) is the (possibly empty) memory alphabet of the system, \(\varGamma \cap \varSigma = \emptyset \);

R is a set of rules of the form (i, p) where \(i\in L\) and \(p\in Ins^*_{V}\cup Del^*_{V}\cup Sub^*_{V}\), i.e., p is an extended insertion, deletion or substitution rule over the alphabet V; we may collect all rules from cell i in one set and then write \(R_i=\{(i,p)\mid (i,p)\in R\}\), so that \(R=\bigcup _{i\in L}R_i\); moreover, for the sake of conciseness, we may simply write \(R_i=\{p\mid (i,p)\in R\}\), too;

g is a directed graph describing the underlying communication structure of \(\varPi \), \(g=(N ,E)\) with \(N =L\) being the set of nodes of the graph g and the set of edges \(E\subseteq L\times L\);

\(I\subseteq L\) is the set of labels of initial cells one of them containing the input multiset w at the beginning of a computation;

\(F\subseteq L\) is the set of labels of final cells.
If in the definition above we take \(p\in Ins_{V}\cup Del_{V}\cup Sub_{V}\) instead of \(p\in Ins^*_{V}\cup Del^*_{V}\cup Sub^*_{V}\), then we speak of a tPA instead of a \(tPA^*\).
A \(tPA^*\) \(\varPi \) now works as follows: The computation of \(\varPi \) starts with a vesicle containing the input multiset w in one of the initial cells \(i\in I\), and the computation proceeds with derivation steps until a specific output condition is fulfilled.
In each derivation step, with the vesicle enclosing the multiset w being in cell k, one rule from \(R_k\) is applied to w and the resulting multiset in its vesicle is moved to a cell m such that \((k,m)\in E\).
As we are dealing with membrane systems, the classic output condition is to only consider halting computations; yet in case of automata, the standard acceptance condition is reaching a final state, which in our case means reaching a final cell h, and, moreover, the vesicle to be empty. We will combine these two conditions to define acceptance in this paper, as with the vesicle being empty no decrement rule can be applied any more and, moreover, it is guaranteed that we have “read the whole input”. Only requiring the vesicle to be empty or else requiring to have reached a final cell with the vesicle containing no input symbol any more, are two other variants of acceptance.
The set of multisets accepted by \(\varPi \) is denoted by \(Ps_{acc}(\varPi )\). The families of sets of vectors of natural numbers accepted by \(tPA^*\) and tPA with at most n cells are denoted by \(\mathcal {L}_n(tPA^*)\) and \(\mathcal {L}_n(tPA)\), respectively. If n is not bounded, we simply omit the subscript in these notations. In order to specify which rules are allowed in the \(tPA^*\) and tPA, we may explicitly specify \(I^*,D^*,S^*\) and I, D, S, respectively, to indicate the use of (extended) insertion, deletion, and substitution rules. For example, \(\mathcal {L}(tPA,ID)\) then indicates that only insertion and deletion rules are used.
Remark 3
The model of a \(tPA^*\) comes very close to the model of a multiset pushdown automaton as introduced in [18]; in fact, the family of sets of vectors of natural numbers accepted by these multiset pushdown automata equals \(\mathcal {L}(tPA^*)\). A formal proof would go far beyond the scope of this short paper, but the basic similarity of these two models becomes obvious when identifying the cells in the \(tPA^*\) with the states in the multiset pushdown automaton; moving the vesicle from one cell to another one corresponds to changing the states. As shown for the states of the multiset pushdown automata in [18], we could also restrict ourselves to only one initial as well as only one final cell in the general case, as this does not restrict the computational power of a \(tPA^*\). On the other hand, for any of the following restricted variants this need not be true any more, especially for the inputdriven variants defined later; in this context we also remind the arguments given in Remark 2. \(\square \)
The following result shows that having more than one rule in a cell is not necessary:
Lemma 1
For any \(tPA^*\) \(\varPi \) there exists an equivalent \(tPA^*\) \(\varPi ^{\prime }\) such that every cell contains at most one rule.
Proof
(Sketch). Let \(\varPi = \left( L,V,\varSigma ,\varGamma ,R,g,I,F\right) \) be a \(tPA^*\). The equivalent \(tPA^*\) \(\varPi ^{\prime }= \left( L^{\prime },V,\varSigma ,\varGamma ,R^{\prime },g^{\prime },I^{\prime },F^{\prime }\right) \) then is constructed as follows:
Remark 4
Remark 5
The following result is based on the fact that the insertion, deletion, or substitution of a multiset over V can easily be simulated by a sequence of insertions and deletions:
Lemma 2
For any \(tPA^*\) \(\varPi \) there exists an equivalent tPA \(\varPi ^{\prime }\) even not using substitution rules.
Now let \(\mathcal {L}(mARB)\) denote the family of sets of multisets generated by arbitrary multiset grammars.
Corollary 1
\(\mathcal {L}(tPA^*,IDS)=\mathcal {L}(tPA,ID)=\mathcal {L}(mARB) =\mathcal {L}(PBRM)\).
Proof
(Sketch). The equality \(\mathcal {L}(tPA^*,IDS)=\mathcal {L}(tPA,ID)\) follows from the definitions and Lemma 2.
The equality \(\mathcal {L}(tPA^*,IDS)=\mathcal {L}(mARB)\) is a consequence of the observation discussed above in Remark 3 that \(\mathcal {L}(tPA^*,IDS)\) corresponds to the family of sets of multisets accepted by multiset pushdwon automata as defined in [18]. In a similar way, interpreting the cells in a tissue P automaton as the states of a partially blind register machine and seeing the correspondence of the acceptance conditions, we also infer the equality \(\mathcal {L}(tPA^*,IDS)=\mathcal {L}(PBRM)\). The details are left to the reader. \(\square \)
3.1 Accepting Strings
The tissue P automata defined above can also be used to accept sets of strings by assuming the input string to be given on a separate input tape, from where the symbols of the input string are read from left to right. As when going from register machines to counter automata, we use the additional instruction (read instruction) read(a) with \(a\in \varSigma \), \(\varSigma \) being the input alphabet. The corresponding automata then are defined as follows:
Definition 3
If we only take rules from \(Ins_{V}\cup Del_{V}\cup Sub_{V}\) instead of \(Ins^*_{V}\cup Del^*_{V}\cup Sub^*_{V}\), then we speak of a tPAL instead of a \(tPAL^*\).
A \(tPAL^*\) \(\varPi \) works as follows: The computation of \(\varPi \) starts with the input string on the input tape as well as an empty vesicle in one of the initial cells \(i\in I\), and the computation proceeds with derivation steps until the whole input string has been read and the vesicle has reached a final cell, again being empty at the end of the computation.
In each derivation step, with the vesicle enclosing the multiset w being in cell k, one rule from \(R_k\) is applied, either reading a symbol from the input tape or affecting w, and the resulting multiset in its vesicle then is moved to a cell m such that \((k,m)\in E\).
The set of strings accepted by \(\varPi \) is denoted by \(L(\varPi )\). The families of sets of strings accepted by \(tPAL^*\) and tPAL with at most n cells are denoted by \(\mathcal {L}_n(tPAL^*)\) and \(\mathcal {L}_n(tPAL)\), respectively. If n is not bounded, we simply omit the subscript in these notations. In order to specify which rules are allowed in the \(tPAL^*\) and tPAL, we again may explicitly specify \(I^*,D^*,S^*\) and I, D, S, respectively, to indicate the use of (extended) insertion, deletion, and substitution rules.
As for tissue P automata accepting multisets, also for the ones accepting strings we obtain some similar results as shown above:
Lemma 3
For any \(tPAL^*\) \(\varPi \) there exists an equivalent \(tPAL^*\) \(\varPi ^{\prime }\) such that every cell contains at most one rule.
Lemma 4
For any \(tPAL^*\) \(\varPi \) there exists an equivalent tPAL \(\varPi ^{\prime }\) even not using substitution rules.
Corollary 2
\(\mathcal {L}(tPAL^*,IDS)=\mathcal {L}(tPAL,ID)=\mathcal {L}(PBCA)\).
3.2 InputDriven Tissue P Automata
We now define the inputdriven variants of \(tPA^*\) and tPA as well as \(tPAL^*\) and tPAL:
Definition 4

to each cell, (at most) one rule is assigned;

any decrement of an input register r is followed by some fixed sequence of instructions on the working registers only depending on the input register r before a cell with the next decrement instruction on an input register is reached. Such a sequence of instructions may even be of length zero.
If each such sequence is of length exactly one, then we speak of a realtime inputdriven \(tPA^*\) (a \(rtIDtPA^*\) for short).
Definition 5

to each cell, (at most) one rule is assigned;

any reading of a terminal symbol a by a read instruction read(a) is followed by some fixed sequence of instructions on the working registers only depending on the terminal symbol a before a cell with the next read instruction is reached. Such a sequence of instructions may even be of length zero.
If each such sequence is of length exactly one, then we speak of a realtime inputdriven \(tPAL^*\) (a \(rtIDtPAL^*\) for short).
The corresponding families of sets of vectors of natural numbers and of sets of strings accepted by tissue P automata of type X with X being one of the types \(IDtPA^*\), IDtPA, \(rtIDtPA^*\), rtIDtPA as well as \(IDtPAL^*\), IDtPAL, \(rtIDtPAL^*\), rtIDtPAL, are denoted by \(\mathcal {L}(X)\).
Remark 6
As already discussed in Remark 1 for inputdriven register machines and counter automata, we emphasize that we have chosen a very restricted variant of what it means that the actions on the multiset in the vesicle only depend on the input symbol just read: no matter in which cell we have the read instruction read(a), it must always be followed by the same finite sequence of instructions not including read instructions. \(\square \)
Remark 7
If we only have SUBinstructions on input registers/read instructions, i.e., if the \(tPA^*\)/\(tPAL^*\) does not use the vesicle at all for storing any intermediate information of working registers, then such a \(tPA^*\)/\(tPAL^*\) can be interpreted as a finite automaton accepting a regular multiset/string language. In this case, the condition of not having rules on the vesicle for symbols representing working registers, already subsumes the condition of the P automaton being inputdriven. In fact, P systems of that kind exactly characterize the regular multiset/string languages. \(\square \)
3.3 OneMembrane Antiport P Automata
The idea of using states instead of cells can also be “implemented” by using a wellinvestigated model of membrane systems using antiport rules:
Definition 6

V is the alphabet of the system;

\(\varSigma \subseteq V\) is the (nonempty) input alphabet of the system;

\(\varGamma \subseteq V\) is the (possibly empty) memory alphabet of the system, \(\varGamma \cap \varSigma = \emptyset \);

\(Q \subseteq V\), \(Q\cap (\varGamma \cup \varSigma ) = \emptyset \), is the set of states;

R is a set of rules of the form \(pu\rightarrow qv\), \(p,q\in Q\), \(u\in (\varGamma \cup \varSigma )^*\), \(v\in \varSigma ^*\);

\(I\subseteq Q\) is the set of initial states;

\(F\subseteq Q\) is the set of final states.
The \(1APA^*\) can be seen as a membrane system consisting of only one membrane with the rules \(pu\rightarrow qv\) interpreted as antiport rules (pu, out; qv, in), i.e., the multiset pu leaves the membrane region and the multiset qv enters the membrane region.
\(\varPi \) starts with an input multiset \(w_0\) together with one of the initial states \(p_0\), i.e., with \(w_0p_0\) in its single membrane region, and then applies rules from R until a configuration with only \(p_f\in F\) in the membrane region is reached, thus accepting the input multiset \(w_0\).
For antiport P automata the acceptance of strings can be defined without needing an input tape as follows, e.g., see [28]: the rules in R now are of the form \(pu\rightarrow qv\), \(p,q\in Q\), \(u\in \varGamma ^*\) and \(v\in (\varGamma \cup \varSigma )^*\), i.e., the input symbols are now taken from outside the membrane (from the environment); the sequence how the input symbols are taken in defines the input string (we may assume v to contain only one symbol from \(\varSigma \); otherwise, if in one step several symbols are taken in, we have to take any permutation of these symbols, in which way several input strings are defined).
Using such rules and the interpretation of the input string as defined above, we obtain the model of a onemembrane antiport P automaton for strings (a \(1APAL^*\) for short).
As in the preceding subsections we now can define specific variants of \(1APA^*\) and \(1APAL^*\), e.g., the corresponding inputdriven automata. Yet as we have introduced these models especially to show the correspondence with an automaton model wellknown in the area of P systems, we leave the technical details to the interested reader.
4 Examples and Results
The concepts of \(IDtPA^*\) and \(IDPBRM^*\) are closely related:
Theorem 1
\(\begin{array}[t]{rcl} \mathcal {L}(IDtPA^*)&{}\subseteq &{}\mathcal {L}(PBRM^*) \text { and}\\ \mathcal {L}(IDtPA^*)&{}=&{}\mathcal {L}(IDtPA^*,ID) =\mathcal {L}(IDPBRM^*). \end{array}\)
Proof
(Sketch). The inclusion \(\mathcal {L}(IDPBRM^*) \subseteq \mathcal {L}(PBRM^*)\) is obvious from the definitions.
The equality \(\mathcal {L}(IDtPA^*,ID)=\mathcal {L}(IDPBRM^*)\) follows from the definitions of these types of inputdriven automata: as already mentioned earlier, the cells in a \(tPA^*\) correspond to the states in a PBRM. The acceptance conditions – the vesicle being empty in a final cell in a \(tPA^*\) and all registers being empty in a PBRM when reaching the final label – directly correspond to each other, too. Moreover, insertion and deletion rules directly correspond to ADD and SUBinstructions. Finally, the conditions for the inputdriven variants requiring the same actions for a consumed input symbol and the decrement of the corresponding register are equivalent, too.
The equality \(\mathcal {L}(IDtPA^*)=\mathcal {L}(IDtPA^*,ID)\) follows from the possibility to simulate substitution rules by a sequence of insertion and deletion rules. This observation completes the proof. \(\square \)
Using similar arguments as in the preceding proof, now considering read instructions instead of decrements on input registers, we obtain the corresponding result for the string case:
Theorem 2
\(\begin{array}[t]{rcl} \mathcal {L}(IDtPAL^*)&{}\subseteq &{}\mathcal {L}(PBCA^*) \text { and}\\ \mathcal {L}(IDtPAL^*)&{}=&{}\mathcal {L}(IDtPAL^*,ID) =\mathcal {L}(IDPBCA^*). \end{array}\)
In the realtime variants, we cannot use substitution rules in the inputdriven tissue P automata, as the simulation by deletion and insertion rules takes more than one step:
Theorem 3
\(\begin{array}[t]{rcl} \mathcal {L}(rtIDtPA,ID)&{}=&{}\mathcal {L}(rtIDPBRM) \text { and}\\ \mathcal {L}(rtIDtPAL,ID)&{}=&{}\mathcal {L}(rtIDPBCA). \end{array}\)
We now illustrate the computational power of inputdriven tissue P automata accepting strings by showing how wellknown string languages can be accepted. We remark that in all cases the automaton has only one initial label and one final label.
Example 1

for every prefix of w, the number of closing brackets ] must not exceed the number of opening brackets [;

the number of closing brackets ] in w equals the number of opening brackets [.
Hence, during the whole computation, the (nonnegative) difference between the number of opening and the number of closing brackets is stored as the number of symbols \(a_1\); at the end, this number must be zero, which is guaranteed by the acceptance conditions. \(\square \)
\(\mathcal {L}(rtIDPBCA)\) even contains a noncontextfree language:
Example 2
By this construction, we conclude \(L_{il}\in \mathcal {L}(rtIDtPAL,ID)\). \(\square \)
For the language considered in the next example we show that it is in \(\mathcal {L}(rtIDtPAL^*)\), but we claim that it is not in \(\mathcal {L}(rtIDtPAL)\):
Example 3
5 Conclusion and Future Research
In this paper, we have introduced tissue P automata as a specific model of multiset automata as well as inputdriven tissue P automata – which we also called chocolate automata – where the rules to be applied depend on the input symbol. Taking strings as input objects, these are either read from an input tape or defined by the sequence of symbols taken in, and as an additional storage of a multiset of different symbols we use a vesicle which moves from one cell of the tissue P system to another one depending on the input symbol; the input symbol at the same time determines whether (one or more) symbols are added to the multiset in the vesicle or removed from there and where the vesicle moves afterwards. The given input is accepted if it has been read completely and the vesicle has reached a final cell and/or is empty at this moment. When using multisets as input objects, these are enclosed in the vesicle in the input cell at the beginning of a computation, which vesicle then will also take the additional symbols. The given input multiset is accepted if no input symbols are present any more and the vesicle has reached a final cell and is empty at this moment.
As rules operating on the multiset enclosed in the vesicle when reading/consuming an input symbol we have used insertion, deletion, and substitution of multisets, working in the sequential derivation mode. As restricted variants, we have considered systems without allowing substitution of multisets and systems only allowing symbols to be inserted or deleted (or substituted).
We have shown how chocolate automata with multisets and strings can be characterized by inputdriven register machines and inputdriven counter automata, respectively. Moreover, we have exhibited some illustrative examples, for example, how the Dyck language or even some noncontextfree languages can be accepted by simple variants of chocolate automata.
Several challenging topics remain for future research: for example, a characterization of the language classes accepted by several variants of tissue P automata accepting multisets or strings, especially for the inputdriven variants (chocolate automata), introduced in this paper is still open.
As acceptance condition we have only considered reaching the final cell h with an empty vesicle. The other variants of acceptance, i.e., only requiring the vesicle to be empty or else requiring to have reached the final cell with the vesicle containing no input symbol any more, are to be investigated in the future in more detail.
Footnotes
 1.
The idea of “chocolate automata” first came up in the relaxed atmosphere of the conference dinner at AFL 2017, the 15th International Conference on Automata and Formal Languages, taking place in Debrecen, Hungary, at the beginning of September, 2017; the ideas initiated there then were further developed during the Brainstorming Week on Membrane Computing at the beginning of February, 2018.
Notes
Acknowledgements
The authors appreciate the helpful comments of the unknown referees.
References
 1.Alhazov, A., Freund, R., Heikenwälder, H., Oswald, M., Rogozhin, Yu., Verlan, S.: Sequential P systems with regular control. In: CsuhajVarjú, E., Gheorghe, M., Rozenberg, G., Salomaa, A., Vaszil, Gy. (eds.) CMC 2012. LNCS, vol. 7762, pp. 112–127. Springer, Heidelberg (2013). https://doi.org/10.1007/9783642367519_9CrossRefGoogle Scholar
 2.Alhazov, A., Freund, R., Ivanov, S., Verlan, S.: (Tissue) P systems with vesicles of multisets. In: CsuhajVarjú, E., Dömösi, P., Vaszil, Gy. (eds.) Proceedings 15th International Conference on Automata and Formal Languages. AFL 2017, 4–6 September 2017, Debrecen, Hungary, vol. 252, pp. 11–25. EPTCS (2017). https://doi.org/10.4204/EPTCS.252.6MathSciNetCrossRefGoogle Scholar
 3.Alur, R., Madhusudan, P.: Visibly pushdown languages. In: Babai, L. (ed.) Proceedings of the 36th Annual ACM Symposium on Theory of Computing, 13–16 June 2004, Chicago, IL, USA, pp. 202–211. ACM (2004). https://doi.org/10.1145/1007352.1007390
 4.Alur, R., Madhusudan, P.: Adding nesting structure to words. J. ACM 56(3), 16:1–16:43 (2009). https://doi.org/10.1145/1516512.1516518MathSciNetCrossRefzbMATHGoogle Scholar
 5.Bensch, S., Holzer, M., Kutrib, M., Malcher, A.: Inputdriven stack automata. In: Baeten, J.C.M., Ball, T., de Boer, F.S. (eds.) TCS 2012. LNCS, vol. 7604, pp. 28–42. Springer, Heidelberg (2012). https://doi.org/10.1007/9783642334757_3CrossRefGoogle Scholar
 6.von Braunmühl, B., Verbeek, R.: Inputdriven languages are recognized in log n space. In: Karpinski, M. (ed.) FCT 1983. LNCS, vol. 158, pp. 40–51. Springer, Heidelberg (1983). https://doi.org/10.1007/3540126899_92CrossRefGoogle Scholar
 7.CsuhajVarjú, E., MartínVide, C., Mitrana, V.: Multiset automata. In: Calude, C.S., Păun, Gh., Rozenberg, G., Salomaa, A. (eds.) WMC 2000. LNCS, vol. 2235, pp. 69–83. Springer, Heidelberg (2001). https://doi.org/10.1007/354045523X_4Google Scholar
 8.CsuhajVarjú, E., Vaszil, Gy.: P automata or purely communicating accepting P systems. In: Păun, Gh., Rozenberg, G., Salomaa, A., Zandron, C. (eds.) WMC 2002. LNCS, vol. 2597, pp. 219–233. Springer, Heidelberg (2003). https://doi.org/10.1007/3540364900_14CrossRefGoogle Scholar
 9.Dassow, J., Păun, Gh.: On the power of membrane computing. J. UCS 5(2), 33–49 (1999). https://doi.org/10.3217/jucs005020033
 10.Dymond, P.W.: Inputdriven languages are in log n depth. Inf. Process. Lett. 26(5), 247–250 (1988). https://doi.org/10.1016/00200190(88)901482MathSciNetCrossRefGoogle Scholar
 11.Freund, R.: P automata: new ideas and results. In: Bordihn, H., Freund, R., Nagy, B., Vaszil, Gy. (eds.) Proceedings of Eighth Workshop on NonClassical Models of Automata and Applications. NCMA 2016, 29–30 August 2016, Debrecen, Hungary, vol. 321, pp. 13–40. Österreichische Computer Gesellschaft (2016). https://shop.ocg.at/de/books.html
 12.Freund, R., Ibarra, O., Păun, Gh., Yen, H.C.: Matrix languages, register machines, vector addition systems. In: Third Brainstorming Week on Membrane Computing, pp. 155–167 (2005). https://www.gcn.us.es/3BWMC/bravolpdf/bravol155.pdf
 13.Freund, R., Kogler, M., Rogozhin, Yu., Verlan, S.: Graphcontrolled insertiondeletion systems. In: Proceedings Twelfth Annual Workshop on Descriptional Complexity of Formal Systems. DCFS 2010, 8–10 August 2010, Saskatoon, Canada, pp. 88–98 (2010). https://doi.org/10.4204/EPTCS.31.11CrossRefGoogle Scholar
 14.Freund, R., Oswald, M.: Tissue P systems and (mem)brane systems with mate and drip operations working on strings. Electron. Notes Theor. Comput. Sci. 171(2), 105–115 (2007). https://doi.org/10.1016/j.entcs.2007.05.011CrossRefzbMATHGoogle Scholar
 15.Freund, R., Păun, Gh.: How to obtain computational completeness in P systems with one catalyst. In: Proceedings Machines, Computations and Universality 2013. MCU 2013, 9–11 September 2013, Zürich, Switzerland, pp. 47–61 (2013). https://doi.org/10.4204/EPTCS.128.13MathSciNetCrossRefGoogle Scholar
 16.Freund, R., Rogozhin, Yu., Verlan, S.: Generating and accepting P systems with minimal left and right insertion and deletion. Nat. Comput. 13(2), 257–268 (2014). https://doi.org/10.1007/s1104701393963MathSciNetCrossRefGoogle Scholar
 17.Greibach, S.A.: Remarks on blind and partially blind oneway multicounter machines. Theor. Comput. Sci. 7, 311–324 (1978). https://doi.org/10.1016/03043975(78)900208MathSciNetCrossRefzbMATHGoogle Scholar
 18.Kudlek, M., Totzke, P., Zetzsche, G.: Multiset pushdown automata. Fundam. Inform. 93(1–3), 221–233 (2009). https://doi.org/10.3233/FI20090098MathSciNetCrossRefzbMATHGoogle Scholar
 19.Kutrib, M., Malcher, A., Wendlandt, M.: Tinputdriven pushdown, counter, and stack automata. Fundam. Inform. 155(1–2), 59–88 (2017). https://doi.org/10.3233/FI20171576MathSciNetCrossRefzbMATHGoogle Scholar
 20.Kutrib, M., Malcher, A., Wendlandt, M.: Queue automata: foundations and developments. In: Adamatzky, A. (ed.) Reversibility and Universality. ECC, vol. 30, pp. 385–431. Springer, Cham (2018). https://doi.org/10.1007/9783319732169_19CrossRefGoogle Scholar
 21.MartínVide, C., Pazos, J., Păun, Gh., RodríguezPatón, A.: A new class of symbolic abstract neural nets: tissue P systems. In: Ibarra, O.H., Zhang, L. (eds.) COCOON 2002. LNCS, vol. 2387, pp. 290–299. Springer, Heidelberg (2002). https://doi.org/10.1007/3540456554_32Google Scholar
 22.Mehlhorn, K.: Pebbling mountain ranges and its application to DCFLrecognition. In: de Bakker, J., van Leeuwen, J. (eds.) ICALP 1980. LNCS, vol. 85, pp. 422–435. Springer, Heidelberg (1980). https://doi.org/10.1007/3540100032_89CrossRefGoogle Scholar
 23.Minsky, M.L.: Computation: Finite and Infinite Machines. Prentice Hall, Englewood Cliffs (1967)zbMATHGoogle Scholar
 24.Okhotin, A., Salomaa, K.: Inputdriven pushdown automata: nondeterminism and unambiguity. In: Bensch, S., Drewes, F., Freund, R., Otto, F. (eds.) Proceedings of Fifth Workshop on NonClassical Models for Automata and Applications. NCMA 2013, 13–14 August 2013, Umeå, Sweden, vol. 294, pp. 31–33. Österreichische Computer Gesellschaft (2013). https://shop.ocg.at/de/books.html
 25.Okhotin, A., Salomaa, K.: Inputdriven pushdown automata with limited nondeterminism. In: Shur, A.M., Volkov, M.V. (eds.) DLT 2014. LNCS, vol. 8633, pp. 84–102. Springer, Cham (2014). https://doi.org/10.1007/9783319096988_9CrossRefGoogle Scholar
 26.Okhotin, A., Salomaa, K.: Descriptional complexity of unambiguous inputdriven pushdown automata. Theor. Comput. Sci. 566, 1–11 (2015). https://doi.org/10.1016/j.tcs.2014.11.015MathSciNetCrossRefzbMATHGoogle Scholar
 27.Okhotin, A., Salomaa, K.: State complexity of operations on inputdriven pushdown automata. J. Comput. Syst. Sci. 86, 207–228 (2017). https://doi.org/10.1016/j.jcss.2017.02.001MathSciNetCrossRefzbMATHGoogle Scholar
 28.Oswald, M.: P automata. Ph.D. thesis, Faculty of Computer Science, TU Wien (2003)Google Scholar
 29.Păun, A., Păun, Gh.: The power of communication: P systems with symport/antiport. New Gener. Comput. 20(3), 295–306 (2002). https://doi.org/10.1007/BF03037362CrossRefGoogle Scholar
 30.Păun, Gh.: Computing with membranes. J. Comput. Syst. Sci. 61(1), 108–143 (2000). https://doi.org/10.1006/jcss.1999.1693MathSciNetCrossRefGoogle Scholar
 31.Păun, Gh., PérezJiménez, M.J.: P automata revisited. Theor. Comput. Sci. 454, 222–230 (2012). https://doi.org/10.1016/j.tcs.2012.01.036MathSciNetCrossRefGoogle Scholar
 32.Păun, Gh., Rozenberg, G., Salomaa, A. (eds.): The Oxford Handbook of Membrane Computing. Oxford University Press, Oxford (2010)Google Scholar
 33.Rozenberg, G., Salomaa, A. (eds.): Handbook of Formal Languages, vol. 1–3. Springer, Heidelberg (1997)zbMATHGoogle Scholar
 34.Bulletin of the International Membrane Computing Society (IMCS). http://membranecomputing.net/IMCSBulletin/index.php
 35.The P Systems Website. http://ppage.psystems.eu/