On maximal parallel application of rules in rewriting P systems

In rewriting P systems, that is P systems using structured strings instead of atomic symbols, rules can be applied in parallel on all strings, but a single rule at a time can be applied on each string. Nonetheless, parallel application of rules also on each string has been considered in various works. This leads to possible application of rules with conflicting target indications on the same string, and different strategies have been considered to face this problem; relations among different classes of languages generated in this way have been investigated in the literature. We continue the investigation on this subject, by highlighting some relations among different classes of maximally parallel rewriting P systems by means of direct simulations. The advantages of such simulations are highlighted, by showing how theoretical results concerning one such type of systems can immediately be adapted to the corresponding simulating systems.


Introduction
Membrane systems (or P systems) have been defined in [43] as a new computing model of a biochemical inspiration.In the basic model, several membranes are embedded, in a hierarchical way, in an external membrane, that is called skin.The membranes define regions containing atomic objects which, in the basic variant, are represented using symbols from a finite alphabet.At each computation step, objects are processed in a maximally parallel way by means of rewriting rules; then, evolved objects are eventually communicated to inner or outer regions, according to some target indications associated with each rewriting rule [45].
Various research works related to P systems have appeared, concerning their computing power [20,43] or the computing power of some variants with limited features, like in [3,54].Such systems have also been considered to study computational complexity aspects for a variant where membranes can be created by division [44], resembling the process of cell mitosis.These studies concern both time complexity aspects [30-34, 41, 49, 51] as well as space complexity [1,2,4,47,48,50,55,58].A recent survey on this subject can be found in [53].
Crossing of membrane systems with other kind of systems have also been proposed (see, e.g., population P systems [17] or water based computing [25]), as well as application of Membrane systems to computational problems (we refer the reader to [12,15,18,38,40,61] for some examples and details), or to more general problems (some recent examples can be found in [14,21,26,27,35,46,57,60]).
The use of membrane systems to model different processes has also been considered in many papers appeared in the literature.For example, an epidemiological model developed in the context of the fight against SARS-CoV-2 has been presented in [5], while [23] models the vertical migration of zooplankton in shallow and deep water, just to cite some very recently appeared works.
In this work, we consider a variant of Membrane systems named Rewriting P systems [22,36,37,43,59] (or RP systems, for short): in such a variant, objects are described by finite strings over a finite alphabet.The rules allowing a string to evolve are context-free rewriting rules.
This variant has been investigated under different aspects.For instance, in [13] systems of this type where communication is controlled according to the contents of the strings are considered.More recently, the use of splicing rules in RP systems has been the subject of other works like [42], while systems using sets of pictures made of symbols in a two dimensional lattice (array languages) have been considered in [16,56].In [39] authors consider the use the use of such systems applied to chain code picture generation.
In particular, we concentrate on the computational properties of maximally parallel RP systems, that is rewriting P systems where, as it happens for standard P systems, all strings evolve in parallel and all regions evolve in parallel but, moreover, at each computation step all rules that can be applied simultaneously to the same string must be applied.Other kinds of parallelism can also be considered: we recall some of them in the last section (to highlight some research topics on this subject).In this kind of systems, when considering parallel application of rules also on single strings, a problem arises: in fact, different rules applied on a single string in a single computing step can have different target membranes.In this case, it is not immediately clear in which region the resulting string must be communicated, and some strategies must then be considered.
Three main such strategies, considered in the literature, are the following: 1.In Krishna-Rama Parallel Rewriting P systems (KRPRP systems) [29], when a conflict occurs the string is moved by choosing the region indicated by the target occurred exactly once among the applied rules (if any).In case more than one target has occurred once, then a nondeterministically choice occurs.If no target have occurred exactly once, then the string is blocked.2. In P systems with deadlock [6,7,9], when different rules having different target indications are applied on a single string at the same time, a deadlock state is obtained: the string is blocked, and it will not be processed anymore by any other rules.3.In P systems without target conflicts [8], the situation is avoided a priori: only set of rules with the same target indication can be applied at the same time on the same string.
Some partial results concerning the computing power of such systems have already been presented in the literature [6][7][8][9]29], by comparing such systems with classic systems from the formal languages area of research.
In this work, we present various new results regarding the relationships between parallel rewriting P systems achieved through direct simulations.These simulations involve systems that employ different strategies to resolve conflicts.Specifically, we demonstrate: • How to simulate a parallel RP system with Deadlock using a KRPRP system • How to simulate a parallel RP system without target conflicts using a parallel RP system with Deadlock Such direct simulations between systems having different features offer several advantages.Firstly, an advantage of employing direct simulations between systems lies in their potential practical implementations.For instance, if we were to implement these systems using a biological medium, certain operations that are theoretically feasible might become practically restricted, at least in an easy manner.By leveraging the simulation, one can design a computational system based on a specific theoretical model and then translate it into another model for practical implementation, while taking into account the limitations imposed by the chosen implementation medium.Another advantage concerns theoretical results pertaining to properties of the simulated system can be directly applied to the simulating system, leveraging the relationships between the two systems identified through the direct simulation.To illustrate this aspect, in particular, we provide results concerning the relationships between parallel rewriting P systems with deadlock and other systems such as Lindenmayer systems, Matrix grammars, and classical Chomsky grammars.We then report the corresponding results that can be obtained exploiting the direct simulation provided before using KRPRP systems.For instance, we prove that parallel rewriting P systems with deadlock using a single membrane are capable of generating all contextfree languages, including some non-context-free languages.By utilizing the outcome of the direct simulation, we can readily establish that the same languages can be generated by KRPRP systems using two membranes of depth one.Considering another example, we also recall a result from [11], stating that various classes of languages generated by different Lindenmayer systems can be generated by parallel rewriting P systems with deadlock using 4 membranes in a structure of depth three.An immediate consequence of the provided simulations is that these results (and, similarly, all results related to such systems) can be immediately translated to state that the same classes of languages can be generated by KRPRP systems using eight membranes arranged in a structure of depth four.
The rest of the paper is organized as follows.In Sect. 2 we recall main definitions used in the rest of the paper.In Sect. 3 we describe relations among classes of parallel rewriting P systems using different ways of solving target conflicts, by means of direct simulations between systems.In Sect. 4 we provide some results considering specific languages to highlight some relations among parallel RP systems, Lindenmayer systems, Matrix grammars, and Chomsky grammars.Finally, in Sect. 5 we draw some conclusions and describe some open problems related to this work.

Maximally parallel rewriting P systems
In this section, we recall main definitions of P systems and of maximally parallel rewriting P systems.
A membrane structure is obtained by embedding, in a hierarchical way, various membranes which are surrounded by a unique membrane, that is called skin.A membrane structure can be described in various ways, for instance by a string of matching parentheses, where each pair identifies a specific membrane.another way of describing such a structure is by means of a tree graph; the height of this tree is called the depth of the corresponding membrane structure.
The membranes in a membrane structure identify regions, that is the space delimited by a membrane and by the membranes that are immediately inside it.If a membrane does not contain other membranes inside, then it is called elementary.
By using symbols or strings over an alphabet V, we identify objects; in standard P systems, one usually considers multisets of objects.In parallel rewriting P systems, the subject of this work, only strings are considered: in each region i = 0, 1, … , n of we consider multisets of finite support over V.In other words, there is a map Evolution rules of the systems are context free rewriting rules of the following form: a → (tar) , where a ∈ V, ∈ V * , and tar ∈ {here, out, in} denotes the target membrane.After the application of an evolution rule, the object can be sent to another membrane, according to the target indication: when tar = here , the object stays in the same region; when tar = out , the object is sent out from the region where the rule was applied; when tar = in , the object is sent to one (nondeterministically chosen) of the membranes that are immediately inside the actual region.
We can now formally define a parallel rewriting P system.
Definition 1 A parallel rewriting P system of degree n + 1 is a construct where: 1. V denotes the alphabet of the system; 2. T ⊆ V denotes the terminal alphabet; 3. denotes a membrane structure, having n + 1 mem- branes injectively labeled by means of numbers in {0, 1, … , n}; 4. M 0 , … , M n are multisets over the alphabet V; they rep- resent the strings initially present in the corresponding regions 0, 1, … , n; 5. R 0 , … , R n denotes finite sets of evolution rules associ- ated with each region of ; the rules are of the form a → (tar) , where a ∈ V, ∈ V * , tar ∈ {here, out, in}; 6. 0 , … , n are partial order relations over R 0 , … , R n .
A configuration of the system at a specific time step is defined by the multisets of objects associated with each region together with the membrane structure.The initial configuration is the ( n + 2)-tuple A transition from a configuration is obtained by applying the rules present in the regions, following the prescriptions of the specific parallel RP system.
A computation is a sequence of transitions.A computation halts when, in the current configuration, no rule can be further applied; in case at least one rule can be applied forever, then we have a non-halting computation.
In this work, we will consider extended RP systems: the output is the set of strings containing only symbols of the terminal alphabet T sent out of the system during a halting computation.If a string sent out from the system contains non-terminal symbols, then it does not contribute to the output.If a computation never halts, then it produces no output.

Krishna-Rama parallel P systems
In a Krishna-Rama parallel P system [28,29], at each computation step all rules in the system are applied in a nondeterministic and maximally parallel manner on all strings, in all the regions.Then, the obtained string is sent to the region that has occurred exactly once among all targets defined in the applied rules.In case different targets have occurred exactly once, one of them is chosen in a non deterministic way, and the string is sent to the corresponding region.If, on the contrary, no target has occurred exactly once, then the string is blocked and the computation freezes.Formal definitions concerning Krishna-Rama parallel P system can be found in [29].In the same work, it is shown that extended parallel P systems of this type are computationally complete.
In the following, we will consider a slightly modified version of such systems, using generic target indications of the form {here, out, in} .In other words, instead of using targets {in j } (allowing to send a string to a specific inner membrane with label j), the generic target indication {in} sends the string to an inner membrane non-deterministically chosen among all membranes immediately inside the membrane where the rule has been applied.It is easy to prove that the system obtained is equivalent to the original one.
In the following, we will denote the families of languages that are generated by (extended) Krishna-Rama systems (using maximal parallelism) by EKRP k n (M) , where n is the degree of the system and k is the depth of the membrane structure.If the number of membranes is not bounded a-priori, then we will replace the subscript n by * .

Parallel rewriting P systems with deadlock
Also in a maximally parallel P system with deadlock [6], at each step all rules are applied in a nondeterministic and maximally parallel manner on all strings, in all the regions.
The difference between these systems and KRPRP systems lies in the action taken when rules with conflicting target indications are applied.When rules with conflicting targets are applied at the same time on a string, the system enters in a deadlock state.The string remains inside the membrane where conflicting rules have been applied, and it will not be processed anymore by any other rule.In the following we will consider deadlock state applied to single strings; this means that, when a string is deadlocked, the remaining strings (if any) can continue their computation within the system, and eventually can produce some outputs.In case all strings are deadlocked during the computation, then the system halts producing no output.It is also possible to consider systems that halt as soon as a single string is deadlocked: we refer the reader to [6] for details.
In P systems with deadlock, any sequence of transitions producing no deadlock or producing only some local deadlock configurations forms a computation.The non-deadlocked strings (of terminal symbols) that exit the system are the output of the computation.
By EParRP k n (M, D) we will denote the family of languages generated by extended rewriting P systems of degree n and membrane structure of depth k, where M denotes the use of maximal parallel application of rules, and D denotes the possibility of having deadlocks.Again, when the number of membranes is not limited, we will substitute the subscript n by * .

Parallel rewriting P systems without target conflicts
In a parallel P system without target conflicts [8,10], only rules with the same target indication can be applied on a string at the same computation step, avoiding in this way the possibility of conflicting targets.More formally, each set R i of evolution rules of each region is divided into mutually disjoint subsets of rules, each subset having the same target indications: R i (here), R i (in), or R i (out) .When we have to apply rules in parallel on a string in region i, we first non-deterministically select one target among {here, out, in} that have at least one applicable rule on the string with the selected target (assume, for instance, it is the target in); then, we apply in a maximally parallel way all rules from the subset having the selected target indication that can be applied on the string (in our example, all rules from the set R i (in) ).Finally, the string is communicated according to the specific selected target.
By EMPRP k n , we denote the family of languages generated by extended RP systems without target conflicts, having degree at most n and membrane structure depth k, using the maximal parallelism method in the way just described.When the number of membranes is not limited, the subscript n is replaced by * .

Simulations of systems using different types of parallelism
It is known ( [11] that parallel P systems without target conflicts are strictly included in parallel P systems with Deadlock and, moreover, that these last systems are included in KR parallel P systems.Nonetheless, no direct simulations have been proposed so far.In this section, we thus propose such direct simulations between systems using different types of parallelism.
First of all, we propose a direct simulation of parallel P systems without target conflicts by means of parallel P systems with Deadlock.In the simulation we propose, the membrane structure of the simulating systems requires two levels more than the simulated one.

in) , and H → T(here).
A summary of required changes is presented in Table 1.
Each initial string w is then replaced by a string Tw (i.e.we add a symbol T to it).All symbols T, T ′ , O, I, H, L are special symbols not initially present.The symbol L (lock symbol) is a symbol that, once introduced in the string, is never removed (thus the string produces no output).Consider now a string Tw in membrane i.The idea is to simulate a parallel application of rules without the possibility to have conflicts concerning their target indications and, as a consequence, without deadlocks.In order to do this, we send the string to one inner added membrane, containing only rules having the same target indication.The movement of the string is then managed by means of the symbol added to the string: T corresponds to choosing the target, replaced then by O (out), I (in), or H (here) to simulate the correct movement of the string to a target membrane.
Initially, the only applicable rule in membrane i is the rule T → T � (in) , which replaces T by T ′ and non-deterministically sends the string to an inner membrane.If such a membrane is a membrane j ≠ i originally already present inside mem- brane i, then the rule T ′ → L is applied, that introduces the loop symbol in the string (in fact, the string cannot reach such membranes without applying any original rules).If, on the contrary, the string reaches one of the added membrane Out i , In i , or Here i , then the simulation of all possible applicable rules having the same target indication is started.Assume, for instance, that the chosen membrane is In i .The symbol T ′ is then replaced by I, and the string is sent to membrane Here, all applicable rules to w are applied in parallel (and all of them have now target Out), together with the rule I → I(out) .The string is sent back to membrane In i , where the only applicable rule is I → I(out) that sends the string back to membrane i.Having started from Tw we have now Iw ′ , such that w ′ has been obtained by w having applied in a maximal parallel way all rules with a target indication In.
In membrane i we can apply now only the rule I → T(in) , producing a string Tw ′ that is then sent to an inner membrane (in the discussed case; otherwise, the string is sent to the membrane immediately outside -in case of target Out -or it stays in the same membrane -in case of target Here).Notice that if the string reaches again an added membrane Out i , In i , or Here i when the symbol T is present (instead of T ′ ), then T is replaced by the loop symbol L, and then sent back to membrane i.
Fig. 1 Simulating a parallel P system without target conflicts by means of a parallel P system with deadlock  We conclude the proof by highlighting the fact that small differences are needed for elementary membranes and for the skin membrane.For elementary membranes, no rules with target In are present, hence we do not need to add the submembranes to manage this target, nor the rule I → T(in) .For the skin membrane, we simply need one small change: the rule O → T(out) is replaced by O → (out) , which removes the symbol used to manage the movement of the string, and sends the string in the environment.If the string contains only terminal symbol, then it is a valid output.
It is easy to see that the computation produces the same results as the original parallel P system without target conflicts Π.
In order to explain the result, we consider now a simple example illustrating the simulation.
Example 1 Let us consider a maximally para l l e l P s y s t e m w i t h o u t t a r g e t c o n f l i c t s Π = (V, T, , M 0 , … , M n , (R 0 , 0 ), … , (R n , n )) and a string ABCDEF inside a generic membrane i of Π .Moreover, let us assume that the rules in membrane i are the following: In a P system without target conflicts, rules are applied in a maximally parallel way, but avoiding conflicting target indications.Thus, one possible way to apply the rules in our example is by non-deterministically choosing to apply the first two rules, thus obtaining the string uvCDEF, that is then sent to a membrane immediately inside membrane i; another possibility is to apply the third rule and the fourth rules, thus obtaining the string ABwxEF, that is then sent to the membrane immediately outside membrane i; finally, a further possibility is to apply the fifth rule and the sixth rule, obtaining the string ABCDyz, that remains in membrane i.
As explained above, the parallel P system with Deadlock Π � simulating Π has, inside membrane i, three membranes labeled by Out i , In i , and Here i .Inside each of these added membranes, there is a further membrane labeled by Out The only applicable rule in membrane i is now the rule T → T � (in) , which produces the string T ′ ABCDEF , and then send it in an inner membrane, non-deterministically chosen among all membranes inside membrane i.Let's assume the string reaches membrane Out i .The symbol T ′ is thus replaced by O, and the string OABCDEF Here, all applicable rules (that is, C → w(out) , and D → x(out) ) are applied in parallel, together with the rule O → O(out) .The obtained string OABwxEF is sent back to membrane Out i , where the only applicable rule is O → O(out) that sends the string back to membrane i.Here we finally apply the rule O → T(out) , thus obtaining TABwxEF which is sent to the membrane immediately outside membrane i.We started from TABCDEF and we correctly simulated the parallel application of the two rules having target (out), and then sent the obtained string to the membrane outside membrane i.
We now propose a direct simulation of maximal parallel P systems with Deadlock by means of Krishna-Rama maximal parallel P systems.In this case, the membrane structure of the simulating systems requires just one level more than the simulated one.

Theorem 2 EParRP k n (M, D) ⊆ EKRP k+1 2n (M)
Proof We recall that the difference between Krishna-Rama maximal parallel P systems and maximal parallel P systems with Deadlock is related to the management of conflicting target indications in the application of the rules in parallel.
In fact, while in maximal parallel P systems with Deadlock a string is locked every time rules with different target indications are applied, in KR parallel P systems if a target indication is specified in exactly one rule among those applied, then it is used to denote the used target.We thus proceed with the simulation of parallel P systems with deadlock by using KR P systems in which we check the use of conflicting rules, even for the case with a single rule using a specific target indication.Thus, consider a parallel P system with deadlock Π .The KR parallel P systems simulating Π can be built as follows.Consider a generic membrane i of Π , and add inside it a membrane labeled by Check i .
Every rule A → x(in) , B → y(out) , and C → z(here) in membrane i is moved to membrane Check i , and replaced by A → xII(out) , B → yOO(out) and C → zHH(out) , respectively.In membrane Check i we also add the rules T → L(here) and T � → (out).
In membrane i we add the rules → L(here) is applied, which introduces the lock symbol in the string.If, on the contrary, the string reaches membrane Check i , then we apply modified rules originally present in membrane i.Every such rule introduces now two symbols, corresponding to the target indication.These two symbols are used to avoid the possibility that a single rule with a specific target indication can be applied on the string.In fact, consider an application of two conflicting rules, such that one of them is applied exactly once (e.g., assume that a rule with target (in) is applied exactly once and other rules with target (out) are applied at the same time).While in a parallel system with deadlock this would lead to a conflict, in the case of Krishna-Rama systems this would not lead to a conflict: the target of the rule applied exactly once will be chosen as the target of the string.
Adding two copies of the same target allows to avoid this problem.In fact, the string is now sent back to membrane i, and it contains two copies of the symbols I, O, and H for each applied rule with target In, Out, and Here, respectively.At the same time, all symbols T ′ in the string are deleted.
If the string contains conflicting symbols (that is, at least two different symbols among I, H, and O are present), then the computation is blocked in membrane i.In fact, at least two rules among I → T(in) , H → T(here) , and O → T(out), can be applied and, moreover, each rule is applied at least two times, since every target symbol is introduced in couples, as explained above.
If, on the contrary, only rules with a unique target indication were applied, then only copies of one symbol among I, O, and H are present when the string reaches membrane i.If the symbols in the string are I, then we apply the rule I → T(in) ; the string is sent to an inner membrane.If it is again membrane Check i , then T is replaced by L and the string is locked.If, instead the string reaches one of the membrane originally inside i, then the computation can continue, exploiting the symbols T just introduced.
If the string contains only symbols O, then they are replaced by T and the string is sent outside.Finally, if the string contains only symbols H, then they are replaced by T and the string remains in i, where it is ready to simulate another computation step.
As for the previous proof, we point out that for the skin membrane we simply need one small change: the rule O → T(out) is replaced by O → (out) , which removes the symbol used to manage the movement of the string, and sends the string in the environment.If the string contains only terminal symbols, then it is a valid output.
It is easy to see that the computation produces the same results as the original parallel P system without target conflicts Π.
As for the previous case, we consider now a simple example illustrating the simulation.
Moreover, let us assume that the rules in membrane i are the following: We recall that in a KR parallel P system rules are applied in a maximally parallel way and, if a target indication is specified in exactly one rule among those applied, then it is used to select the used target.In the example above, while in P systems with deadlock we would have a conflict, that would result in a locked string, in KR systems the (unique) rule with the target out would select the target where the string is sent, allowing the computation to proceed.
In order to correctly simulate the parallel system with deadlock, we thus need to produce a KR P systems in which we check the use of conflicting rules, even for the case with a single rule using a specific target indication.
As explained above, the KR parallel P system simulating Π is built adding inside each membrane i a membrane labeled by Check i .Then, all rules in membrane i are moved to membrane Check i , with some added symbols: In membrane Check i we have the rules T → L(here) and T � → (out) , while in membrane i we have the rules and The original string ABCEF is replaced by the string TABCEF.
The only applicable rule in membrane i is now the rule T → T � (in) , which produces the string T ′ ABCEF , and then send it in an inner membrane, non-deterministically chosen among all membranes inside membrane i.
If it reaches one membrane originally present in membrane i, then the rule T � → L(here) is applied, thus producing the string LABCEF; since this string contains the lock symbol L it will not produce any output.Let's assume, on the contrary, that the string reaches membrane Check i .Here, we apply all rules in parallel, thus obtaining the string uIIvIIwOOyHHzHH, that is then sent back to membrane i.In this membrane, each symbol I, O, and H is replaced by T, thus obtaining the string uTTvT-TwTTyTTzTT; since the rules replacing those symbols have conflicting target indications, the string is then locked, thus producing no output; as one can notice, this happens even if the original rule with target out is unique, since we introduced two symbols O in the string, to avoid this problem.
Of course, considering a combination of these two simulations is possible: starting from a Parallel Rewriting P System without Target Conflicts, we first obtain an equivalent system using Deadlock, and then we simulate this one by means of a Krishna-Rama parallel system.A direct consequence of the previous two theorems is thus the following: Regarding simulations in the opposite direction, the following points should be noted.Firstly, we recall that parallel P systems without target conflicts are strictly included by parallel P systems with Deadlock.Therefore, it is not possible to simulate all systems in the opposite direction in this case.
In the case of P systems with Deadlock and KR parallel P systems, it remains uncertain whether a simulation in the opposite direction is always feasible.This uncertainty arises from the fact that we do not have conclusive information on whether the inclusion between these two classes is strict or not, as mentioned earlier in this section.Establishing a direct simulation of KR parallel P systems using P systems with Deadlock would also solve the open problem concerning their relationship.

Further results: Lindenmayer systems, matrix grammars and Chomsky grammars
As we saw, it is known that EKRP systems are Turing equivalent.On the contrary, the exact computing power of maximal parallel P systems with Deadlock and of maximal parallel P systems without conflict target indications is not known.In this section, we present some (partial) results in this respect.The goal of this section is twofold.On the one hand, we prove some specific results concerning comparison of RP systems (in particular, using a limited amount of membranes) with other classic computing models.On the other hand, we show how to exploit the results obtained in the previous section to extend the results obtained for one type of parallel RP systems to other types of parallel RP systems.
We start by recalling from [7] the definition of Lindenmayer systems.An ET0L system is a tuple G = (V, T, w, P 1 , … , P m ) , m ≥ 1 , where V is a finite alpha- bet of symbols, T ⊆ V, w ∈ V + , and P i , 1 ≤ i ≤ m , are finite sets (usually called tables) of context-free rules defined over the alphabet V; for each A ∈ V there is at least one rule A → x in each set P i (tables are complete).
In each computation step, all the symbols in the current sentential form are rewritten by means of one table.The l a n g u a g e g e n e r a t e d b y G i s d e n o t e d b y The following results concerning such systems are known: CF ⊂ ET0L ⊂ CS ; CF and CS denote, respectively, the families of context free languages and the families of context sensitive languages.Details on L systems can be found in [52].
It is known [11] that ET0L systems are properly included in the class of languages generated by maximal parallel P systems with Deadlock using at most four membranes.By considering the relations among classes of languages generated by Lindenmayer systems, we can state the following: By exploiting this result and the result obtained in Theorem 2 we have: Proof The result in Theorem 3 is obtained by using a system having four membranes organized so that the skin contains a single membrane, containing a single membrane, and so on.The corresponding membrane structure is of depth 3.Such systems can be simulated by Krishna-Rama Parallel P systems having twice the number of membranes of the original systems, and requiring a membrane structure having one added level of depth.
Considering context-free grammars in the Chomsky hierarchy, it is easy to see that they can be generated by maximal parallel P systems with Deadlock using a single membrane: Proof Consider a CF grammar G, and the axiom S. We can generate the same language generated by G by means of a maximal parallel P system with Deadlock Π (with a single membrane) as follows.Add the axiom S ′ to Π .For every rule A → x in G add the rule A → x(here) in Π .Moreover, add the rules S � → S � (here) and S � → (out).Context free rules are applied (in parallel, but this is not an issue since no interactions among different non terminal symbols are possible) on the string in Π .At the same time, the rule S � → S � (here) is also applied.After some time, the rule S � → (out) is applied.If the string still contains non- terminal symbols, then also other rules with target Here are also applied, thus producing a deadlock.On the contrary, S ′ is removed, and the terminal string is sent out, thus producing a valid output.
It is also possible to show that also some non-context free languages can be generated by maximal parallel P systems with Deadlock using a single membrane: all having target Here, plus the rules A → (out), B → (out), C → (out).
Starting from the axiom S, we apply the rule S → ABC .Now, consider a generic string of the form Aa k Bb k Cc k for some k ≥ 0 .If we apply in parallel rules At some point (or even immediately, for the string ABC) we can apply the rules A → (out), B → (out), C → (out) , producing the string a h b h c h (for some h ≥ 0 ) which is then sent out, thus producing a valid string.
In case of parallel application of rules having on the left side the symbols A, B, C but with different target indications on the right (Here or Out), the string produces a deadlock, and no output is obtained.
As a consequence, context free languages are strictly included in the class of languages generated by maximally parallel rewriting P systems with deadlock using a single membrane.Considering the results obtained in the previous section, such systems can be simulated by Krishna-Rama parallel systems by simply adding a membrane inside the unique membrane used to obtain the results just described.Thus, we can immediately state the following: Other classes of formal languages that can be considered are those generated by Matrix grammars.A matrix grammar is a grammar G = (N, T, S, M, C) , where N, T denote finite disjoint alphabets of symbols, S ∈ N , M denotes a finite set of sequences of context-free rules over N ∪ T (nonterminal and terminal alphabets) of the form The symbol S is called the axiom, and the elements of the set M are the matrices.For w, z ∈ (N ∪ T) * , we have w ⇒ z if and only if there is a matrix or w i = w i+1 , A i does not appear in w i , and the rule A i → x i appears in C (all the rules that are in a matrix must be applied following the order; it is only possible to skip the rules in the set C, in case they cannot be applied to the string; these rules are said to be applied in the appearance checking mode.)If the set C is empty, then the matrix grammar is without appearance checking.
We denote by L(G) = {w ∈ T * |S ⇒ * w} the language generated by G, where the symbol ⇒ * denotes the reflexive and transitive closure of the relation ⇒ .By MAT ac we denote the family of languages generated in this way, and by MAT the family generated by matrix systems without appearance checking.We refer the reader to [19] for further details on matrix grammars.
Relations between such classes and the class of languages generated by maximal parallel P systems with Deadlock are not known, but the following partial result can be shown, proving that maximal parallel P systems with Deadlock can generate languages not in the class MAT.Proof It is known [24] that all the one-letter languages in MAT are regular.
Starting from A, if we apply in parallel on all symbols the rule A → AA(here) , then we duplicate them.After k steps, we have a string of the form A 2 k .If we then apply in parallel on all symbols the rule A → a(out) , we produce a correct output string.If, at some point, we apply the first rule to some symbols and the second rule to the remaining symbols, then a deadlock is obtained and no output is produced.
It is easy to see that the language generated by such a system is then L = {a 2 n |n ≥ 0}.
A s f o r t h e p r e v i o u s T h e o r e m , L = {a 2 n |n ≥ 0} ∈ EKRP 1  2 (M) follows immediately from the result of the direct simulation obtained in the previous section.
A direct consequence of this result is that either the class MAT is strictly included EParRP * * (M, D) or the two classes are incomparable, but this is still an open problem.

Conclusions
In this work, we shortly recall definitions and results concerning maximally parallel rewriting P systems, and we illustrate relations among systems using different strategies to solve conflict problems, by means of direct simulations.In particular, we show how to systems without target conflicts by means of systems with deadlock, and how to simulate systems with deadlock by means of Krishna-Rama parallel rewriting systems.Partial results concerning relations with standard Chomsky grammars, and with Lindenmayer systems and Matrix grammars have also been presented.
We conclude the work with some open problems.First, while it is known that Krishna-Rama systems are Turing universal, complete characterizations for systems without target conflict or with Deadlock have not yet been defined.
As already pointed out in some previous works, another interesting research topic is to consider other types of parallelism, and to consider relations among parallel systems described in this work but using, instead of maximal parallelism, different parallel semantics.Some possibilities have been discussed in [6]: we recall them shortly.
• In unique parallel semantic, the occurrences of exactly one symbol are substituted using exactly one rule; the rule to be used is nondeterministically chosen among the set of all applicable rules.• In symbol parallel semantic, we substitute all occurrences of one symbol according to exactly one rule, but different symbols can be modified in parallel in the same computing step.• In table parallel semantic, we divide the set of rewriting rules into tables (like in Lindenmayer systems); at each step, the rules from a single table (non-deterministically chosen) is applied to the string.• In limited parallel semantic, we define a constant k and, at each step, we apply exactly k rules in parallel.Subvariants that can be considered are the application of at most k rules or at least k rules.
permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.To view a copy of this licence, visit http:// creat iveco mmons.org/ licen ses/ by/4.0/.
′ i , those with target In are moved in membrane In ′ i , and those with target Here are moved in membrane Here ′ i , replacing in all of them the original target by the target Out.We also add rules T � → O(in) , O → O(out) , and T → L(out) in membrane Out i , rules T � → I(in) , I → I(out) , and T → L(out) in membrane In i , and rules T � → H(in) , H → H(out) , and T → L(out) in membrane Here i .Finally we add to membrane i the rules

′ii
Rules with target (In)Moved in added membrane In ′ i Rules with target (Here) Moved in added membrane Here ′ Add in membrane Out i rules T � → O(in) , O → O(out) , and T → L(out) Add in membrane In i rules T � → I(in) , I → I(out) , and T → L(out) Add in membrane Here i rules T � → H(in) , H → H(out) , and T → L(out) Add in membrane i rules T → T � (in) , T � → L(here) , O → T(out) I → T(in) , and H → T(here) Each initial string w Replaced by Tw . The rules with target in ( A → u(in) , B → v(in) ) are moved in membrane In ′ i , those with target out ( C → w(out) , D → x(out) ) are moved in membrane Out ′ i , and those with target here are moved in membrane Here ′ i , replacing in all of them the original target by the target Out.We also add rules T � → O(in) , O → O(out) , and T → L(out) in membrane Out i , rules T � → I(in) , I → I(out) , and T → L(out) in membrane In i , and rules T � → H(in) , H → H(out) , and T → L(out) in membrane Here i .Finally we add to membrane i the rules T → T � (in) , T � → L(here) , O → T(out) , I → T(in) , and H → T(here) .The original string ABCDEF is replaced by the string TABCDEF.

Table 1
Summary of modifications required EMPRP EParRPRules with target (Out) Moved in added membrane Out here) , O → T(out), and T A summary of required changes is presented in Table2.Consider a string TTw in membrane i.We apply the rule T → T � (in) : if the string reaches a membrane j originally present in membrane i, then the rule T �

Table 2
Summary of modifications required Rules A → x(in) in membr.i Replaced by A → xII(out) in Check i Rules B → y(out) in membr.i Replaced by B → yOO(out) in Check i Rules C → z(here) in membr.i Replaced by C → zHH(out) in Check i Add T → L(here) , T � → (out) to Check i Add rules T → T � (in) , I → T(in) , H → T(here) O → T(out), and T � → L(here) to membrane i Each initial string w in i Replaced by TTw