P systems with limited number of objects

P systems are a model of compartmentalized multiset rewriting inspired by the structure of living cells and the way they function. In this paper, we focus of a variant in P systems in which membranes have limited capacity, i.e., the number of objects they may hold is limited by a fixed bound. This feature corresponds to an important physical property of cellular compartments. We propose several possible semantics of limited capacity and show that one of them allows real-time simulations of partially blind register machines, while the other one allows for obtaining computational completeness.


Introduction
Membrane systems were introduced in [11] as a multisetrewriting model of computing inspired by the structure of cells and the way they function. Among the basic features of the original model are the hierarchical arrangement of the membranes and the parallel evolution of the objects contained in the membrane compartments. Usually a result is obtained if the computation halts, i.e., if no rule is applicable any more.
In this paper, we consider an additional feature also inspired by biology, namely the limited capacity of cells to include objects-in total or of a specific kind. When the number of cells is not bounded as in P systems with active membranes, this biological feature of limited capacity can be implemented by keeping the number of objects in every cell below a given fixed bound. On the other hand, in the standard hierarchical model with a static number of cells, or, even if we allowed membrane dissolution, with a fixed upper bound for the number of cells, we can only limit the number of specific objects and have to allow an unbounded number of other objects when aiming at non-trivial theoretical results.
When the number of cells is not bounded because of using membrane creation and/or membrane division (together with membrane dissolution), the number of objects in one cell/ membrane can even be restricted to one, still allowing for obtaining computational completeness, thereby counting the number of membranes/cells instead of the number of objects in an output membrane/cell; for example, see [1,3,6].
In this paper, we investigate P systems limiting the number of (specific) objects to be contained in a membrane region and two different semantics of how to treat the situation when the application of a (multiset of) rule(s) would violate this limiting condition, either aborting or blocking computations which try to apply a multiset of rules leading to a violation of the limited capacity conditions. For the first variant, we show that it allows for real-time simulations of partially blind register machines, while the other variant allows for obtaining computational completeness.
The development of the fascinating area of membrane computing during the last 2 decades is documented in two textbooks, see [12] and [13]. For actual information, see the P systems webpage [15] and the issues of the Bulletin of 1 3 the International Membrane Computing Society and of the Journal of Membrane Computing.

Definitions
For an alphabet V, by V * , we denote the free monoid generated by V under the operation of concatenation, i.e., containing all possible strings over V. The empty string is denoted by . For any string w over V, |w| denotes the total number of symbols in w (also called the length of w), and for any a ∈ V , |w| a denotes the number of symbols a in w.
A multiset M is called empty or finite if its support is the empty set or a finite set, respectively. If M = (A, f ) is a finite multiset over A such that supp(M) = {a 1 , … , a k } , then it can also be represented by the string a f (a 1 ) 1 … a f (a k ) k over the alphabet {a 1 , … , a k } , and, moreover, all permutations of this string precisely identify the same multiset M. For any multiset M over V, |M| denotes the total number of symbols in M, and for any a ∈ V , |M| a denotes the number of symbols a in M.
For further notions and results in formal language theory, we refer to textbooks like [7] and [14].

Register machines
Register machines are well-known universal devices for computing (or generating or accepting) sets of vectors of natural numbers.

Definition 1 A register machine is a construct
where m is the number of registers, -P is the set of instructions bijectively labeled by elements of B, -l 0 ∈ B is the initial label, and l h ∈ B is the final label.
The instructions of M can be of the following forms: Increase the value of register r by one, and non-deterministically jump to instruction q or s.
If the value of register r is not zero then decrease the value of register r by one (decrement case) and jump to instruction q, otherwise jump to instruction s (zero-test case).
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. M is called deterministic if the ADD-instructions all are of the form p ∶ (ADD(r), q).
In the accepting case, a computation starts with the input of an l-vector of natural numbers in its first l registers and by executing the first instruction of P (labeled with l 0 ); it terminates with reaching the HALT-instruction. Without loss of generality, we may assume all registers to be empty at the end of the computation.
In the generating case, a computation starts with all registers being empty and by executing the first instruction of P (labeled with l 0 ); it terminates with reaching the HALT-instruction and the output of a k-vector of natural numbers in its last k registers. Without loss of generality, we may assume all registers except the last k output registers to be empty at the end of the computation.
In the computing case, a computation starts with the input of an l-vector of natural numbers in its first l registers and by executing the first instruction of P (labeled with l 0 ); it terminates with reaching the HALT-instruction and the output of a k-vector of natural numbers in its last k registers. Without loss of generality, we may assume all registers except the last k output registers to be empty at the end of the computation.
For useful results on the computational power of register machines, we refer to [10]; for example, for proving computational completeness results for specific variants of P systems, usually the following formulations of results for register machines generating or accepting recursively enumerable sets of vectors of natural numbers with k components or computing partial recursive relations on vectors of natural numbers are helpful: Proposition 1 Deterministic register machines can accept any recursively enumerable set of vectors of natural numbers with l components using precisely l + 2 registers. Without loss of generality, we may assume that at the end of an accepting computation all registers are empty.

Proposition 2
Register machines can generate any recursively enumerable set of vectors of natural numbers with k components using precisely k + 2 registers. Without loss of generality, we may assume that at the end of an accepting computation the first two registers are empty, and, moreover, on the output registers, i.e., the last k registers, no SUB -instruction is ever used.

Proposition 3 Register machines can compute any partial recursive relation on vectors of natural numbers with l components as input and vectors of natural numbers
with k components as output using precisely l + 2 + k registers, where without loss of generality, we may assume that at the end of a successful computation the first l + 2 registers are empty, and, moreover, on the output registers, i.e., the last k registers, no SUB-instruction is ever used.
In all cases it is essential that the output registers never need to be decremented.

Partially blind register machines
We now consider one-way nondeterministic machines which have registers allowed to hold positive or negative integers and which accept by reaching the HALT-instruction with all registers being zero. Such machines are called blind if their actions depend on state and input alone and not on the register configuration. They are called partially blind if they block when any register is negative (i.e., only non-negative register contents is allowed) but do not know whether or not any of the registers contains zero.

Definition 2 A partially blind register machine (PBRM) is a construct
where m is the number of registers, -P is the set of instructions bijectively labeled by elements of B, -l 0 ∈ B is the initial label, and l h ∈ B is the final label.
The instructions of M can be of the following forms: Increase the value of register r by one, and non-deterministically jump to instruction q or s.
If the value of register r is not zero then decrease the value of register r by one and jump to instruction q, otherwise abort the computation.
Stop the execution of the register machine.
Again, a configuration of a partially blind 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.
A computation works as for a register machine, yet with the restriction that a computation is aborted if one tries to decrement a register which is zero. Moreover, computing, accepting or generating now also requires all registers (except output registers) to be empty at the end of the computation.

P systems
The standard model of hierarchical P systems can be defined as follows, for example, see [13] for several variants: is a membrane structure of degree m with membranes labeled in a one-to-one manner with the natural numbers 1, … , m; -w 1 , … , w m ∈ O * are the multisets of objects initially present in the m regions of ; The membrane structure and the multisets in constitute a configuration of the P system; the initial configuration is given by the initial multisets w 1 , … , w m . A transition between configurations is governed by the application of the evolution rules, which is done in the maximally parallel way, i.e., only applicable multisets of rules which cannot be extended by further rules are to be applied to the objects in all membrane regions.
The application of a rule u → v in a region containing a multiset M results in subtracting from M the multiset identified by u, and then in adding the multiset identified by v. The objects can eventually be transported through membranes using the targets in and out.
The P system continues with applying multisets of rules in the maximally parallel way until there remain no applicable rules in any region of . Then, the system halts. We consider the number of objects from O contained in the output region i 0 at the moment when the system halts as the result of the underlying computation of . The set of results of all computations possible in is called the set of natural numbers generated by and it is denoted by N( ) if we only count the total number of objects in the output membrane; if we distinguish between the multiplicities of different objects, we obtain a set of vectors of natural numbers denoted by Ps( ) . We refer to [13] for further details and examples.
A special variant of P systems uses so-called catalysts, which are objects which allow other objects to evolve, but never evolve themselves.
the other ingredients are defined as for hierarchical P systems in Definition 3. A catalytic P system is called purely catalytic if all rules are catalytic ones.
Since the beginning, the question how many catalysts are needed in catalytic and purely catalytic P systems for obtaining computational completeness has been a challenging theoretical question. The following result was shown in [9], establishing a lower bound for the computational power of catalytic P systems with only one catalyst: Proposition 4 ([9]) Catalytic P systems with only one catalyst have at least the computational power of partially blind register machines. Example 1 In [9], it was shown that the vector set (which is not semi-linear) can be generated by some (even extended version of a) PBRM and, therefore, by a P system with only one catalyst and 19 rules.
As already shown in [8], register machines with n ≥ 2 decrementable registers can be simulated by catalytic P systems with n catalysts and by purely catalytic P systems with n + 1 catalysts. Hence, both catalytic P systems and purely catalytic P systems are computationally complete.

Limited capacity
In most of the variants of P systems considered in the literature, the number of objects in a membrane region is not limited. In [4], we proposed variants in which the number of objects a membrane may contain is bounded, with the bound already being given in the definition of the system, either limiting the total number of objects in a cell or only limiting the number of specific objects in a cell, respectively. The following definitions are given as in [4].
Definition 5 A P system with per-membrane limited capacity is a construct where k i ∈ ℕ ∪ {∞} is the total capacity of membrane i, 1 ≤ i ≤ n , meaning that, for v i denoting the contents of membrane i in the current configuration, the condition |v i | ≤ k i must always be enforced, unless k i = ∞ ; the other components of the tuple are as in Subsection 2.3.

Semantics of limited capacity
What should happen if a membrane is about to exceed its capacity (total or per-symbol)? Multiple kinds of behaviors may be considered, for example, the following variants: 1. Blocking behavior Prohibit the application of (multisets of) rules which would produce more objects. Attempting to apply such rules blocks the system, and yields no result. 2. Destructive behavior Completely remove the offending membrane from the system, together with its contents. 3. Dissolutive behavior Dissolve the offending membrane, dumping its contents into its parent membrane; in this case, (one of) the parent membrane(s) must allow for more objects, as otherwise the whole system would be dissolved.
4. Separation behavior Divide the offending membrane separating its contents across the child membranes.
Since every child membrane only receives a part of the contents of the parent, the capacity constraints may be satisfied.
The separation behavior may be useful for P systems with active membranes, whereas the first three behaviors may also be applied for hierarchical P systems. Yet in this paper, we will focus on P systems with per-symbol limited capacity, i.e., we limit the number of specific symbols.

Remark 1
We immediately remark that the flattening technique, which is folklore in the membrane computing community, can be applied in the case of P systems with per-symbol limited capacity. Without loss of generality, in Sect. 4 we will only consider 1-membrane systems, which can be written in a simplified version as follows with omitting the trivial membrane structure and taking the skin membrane 1 as the output membrane: Although in this paper, we want to focus on the blocking behavior, (see variant 1 of the possible semantics of limited capacity above), there are still at least two possible semantics for the blocking behavior itself under the maximally parallel derivation mode: Semantics 1 Take all the applicable multisets of rules in the maximally parallel derivation mode, but discard all those multisets which would violate the constraints. Semantics 2 Take all the applicable multisets of rules in the asynchronous derivation mode, discard the multisets which would violate the constraints, and then pick the nonextendable, i.e., maximal multisets out of these applicable multisets of rules.
To illustrate the difference between these two semantics, consider the following 1-membrane system with limited capacity: In the case of Semantics 1, no multisets of rules not violating the constraint of limiting the capacity of symbols c in the resulting configuration would be applicable, and the P system will block/abort this computation.
On the other hand, under Semantics 2, ab would be allowed to apply either a → c or b → c , but not both.

Computational power
In this section, we investigate the computational power of P systems with limited per-symbol capacity: when operating with Semantics 1, they at least can simulate partially blind register machines in real time; when operating with Semantics 2, they can simulate purely catalytic P systems (and thus register machines) and therefore are computationally complete.

Semantics 1 allows for simulating a PBRM in real time
In this subsection, we will show that P systems with limited per-symbol capacity operating under Semantics 1 can simulate partially blind register machines (PBRM) in real time: an instruction of the register machine is simulated in one step of the P system. An additional cleanup procedure at the end of the computation takes 3 more steps. In comparison with the result stated in [9] showing that P systems with one catalyst can simulate partially blind register machines (without any further ingredients), we here obtain a real-time simulation, whereas the result there needs a cycle of n + 3 for each step of the register machine, with n being the number of decrementable registers.

Theorem 1 Catalytic P systems with one catalyst and persymbol limited capacity operating with Semantics 1 can simulate partially blind register machines (PBRM) in real time, plus three additional cleanup steps at the end of the computation.
Proof Consider an arbitrary partially blind register machine The following proof is given for the most general case of a partially blind register machine computing a partial recursive relation on vectors of natural numbers with l components as input and vectors of natural numbers with k components as output as well as using n decrementable registers, no matter how many of them are the first l input registers and the working registers, respectively. Moreover, we may assume that on the output registers, i.e., the last k registers, no SUB-instruction is ever used. On the other hand, the computation of the PBRM yields a result if and only if at the end of the computation all registers except the output registers are empty. We now construct the P system with per-symbol limited capacity operating under Semantics 1 and simulating the PBRM M.
The set of objects of the construction includes register symbols a r for representing the contents of register r, the catalyst c, and the state symbols p ∈ B . Moreover, we use decrement witness symbols r for every decrementable register r, 1 ≤ r ≤ n , the trap symbol # and, finally, the additional symbols a 0 , 0 , l h ′ . As we will see later, a 0 can be interpreted as a register symbol for an additional decrementable register 0, which during the whole computation has the value 1, i.e., in every configuration we have exactly one copy of a 0 , and it is only eliminated in the final cleanup procedure. Observing that n = m − k , in total, we get the following set of objects: The capacity of the symbols in D is limited to 1, while all other symbols may appear in an unlimited number of copies: Moreover, let D ∅ denote the multiset containing exactly one copy of each object in D and D r the multiset containing exactly one copy of each object in D except r .
Then, the starting configuration of the P system is defined as where 0 is the multiset encoding the initial values of the registers.
The set of rules now is going to be described in several parts below.
First, we want all symbols in D to disappear after one step: We also include the traditional trap rule # → # ∈ R.
Increment p ∶ (ADD(r), q, s): To simulate the ADD instruction p ∶ (ADD(r), q, s) without letting the catalyst block the system or do unwanted decrements, the catalyst is forced to process the state symbol: When a label of an ADD instruction is present in the configuration, the catalyst cannot act on any of the register symbols a r , 0 ≤ r ≤ m , because this would leave the state symbol p to be transformed to # due to the maximally parallel derivation mode. This evolution will not violate the capacity constraints, but introducing the trap symbol will prevent the system from ever halting. Therefore, the catalyst must be used in one of the two rules simulating the increment. Incidentally, these rules also replenish the supply of the symbols from D.
Decrement p ∶ (SUB(r), q) (no zero test): Consider the configuration c p D ∅ a 0 , where is a string of register symbols describing the current contents of the registers. The following rules have to be applied in this configuration: All the symbols from D ∅ from the current configuration will disappear in the next configuration. The rule p → qD r will reintroduce almost all of the symbols, except for the particular r corresponding to the register to be decremented. This allows ca r → c r to be applied in the current step, because in the next configuration, there is still room for r . All catalytic rules involving a wrong r ′ (and therefore a wrong a r ′ ) cannot be applied, because they would introduce a second instance of r ′ , thus blocking the system. Therefore, the only possible evolution from the configuration c p D ∅ a 0 is to the configuration c q D ∅ a 0 where = − a r . Note that if the expected register symbol a r is not present in , then there will be no non-extendable multiset of rules including the correct ca r → c p , because then at least the rule ca 0 → c 0 described below would become applicable, thus blocking (aborting) the computation without producing any result. This behavior corresponds to a crash in the PBRM when it tries to decrement a register which is already empty.

Final zero test, cleanup, and halting
The simulation of the decrement instruction on register r only works correctly when there are still some register symbols a r left. Indeed, as already mentioned above, to force the computation in the P system to abort if a decrement on an empty register would be tried, we at least would have the rule ca 0 → c 0 , but as long as the decrement symbol 0 is re-introduced by applying a rule p → qD r simulating a decrement on register r, the computation in the P system will be forced to crash as two symbols 0 are not allowed in a configuration.
On the other hand, if finally, the PBRM has reached a configuration with all decrementable registers r, 1 ≤ r ≤ n being empty, we have to allow for a final zero test: in this case the rule ca 0 → c 0 is welcome to be applied if we have reached the final (halting) label l h : The additional label l h ′ is used to check whether all decrementable registers are empty as required for a computation of the PBRM to be successful: In this step, the catalyst is free to use one of the rules ca r → c# 0 for any non-empty register r without violating the limiting condition for 0 , hence, the trap symbol # is introduced if and only if any of the decrementable registers is not empty.
If all decrementable registers have been empty, in the final step, the system will just erase the symbols of D 0 , which will disappear and the system will halt with only symbols a r for the output registers n + 1 ≤ r ≤ m.
This final cleanup phase takes one step to erase a 0 , one more step to test the presence of register symbols a r , 1 ≤ r ≤ n , and one final step to erase the last symbols of D 0 . Hence, in a successful computation, this final phase takes three steps.
In the case of the simulation of a non-successful computation of the PBRM, there may be many more steps applying rules ca r → c# 0 , possibly already in the second step, but with the trap rule # → # ∈ R causing an infinite computation we need not take care about this situation in detail. ◻ Remark 2 (Trapping by limited capacity) When following the proofs as given in [8] for simulating register machines by [purely] catalytic P systems, often rules introducing the trap symbol # as well as the rule # → # are used to guarantee an infinite computation and thus any computation introducing it to not be successful. Instead of introducing the trap symbol # and having the rule # → # to guarantee that any computation introducing # is not successful, we can limit its capacity to 1 and use rules of the form u → v## instead of u → v# . Alternatively, we could limit the capacity of # to 0, meaning that even having to pick the rule u → v# will already block the evolution. This means that, if all non-extendable multisets of rules contain a rule of the form u → v# , then we must discard all multisets, thereby blocking the evolution without producing any result. This blocking of computations reflects the concept of using toxic objects as introduced in [2].
Taking advantage of the idea described in Remark 2, we can get an improved version of Theorem 1: Proof We follow the proof of Theorem 1 also taking into account Remark 2 with using K(#) = 0.
Consider an arbitrary partially blind register machine Let n be the number of decrementable registers; let B SUB(r) denote the set of labels of SUB-instruction p ∶ (SUB(r), q) of decrementable registers r, 1 ≤ r ≤ n , B SUB = ⋃ 1≤r≤n B SUB(r) , and B ADD denote the set of labels of ADD-instructions, i.e., We now construct the P system with per-symbol limited capacity operating under Semantics 1 for simulating the PBRM M; except for K, this is the same P system as constructed in the proof of Theorem 1. 0 is the multiset encoding the initial values of the registers. D ∅ and D r are defined as in the proof of Theorem 1.
The P system now works as described in the proof of Theorem 1 with the difference that no rules introducing the trap symbol # can ever be used, as this would contradict the limiting condition K(#) = 0 , i.e., whenever such a rule would have to be applied according to the maximally parallel derivation mode, the computation is aborted immediately without yielding a result. This means that a computation in is aborted if the computation step of the PBRM would crash the PBRM because a decrement on an empty register would be carried out, whereas every allowed decrement is simulated in a deterministic way as required. ◻ M = m, B, l 0 , l h , P .

Semantics 2 allows for computational completeness
In this subsection, we show that P systems with limited per-symbol capacity are computationally complete when operating with Semantics 2 without any additional ingredients, especially without needing any catalyst.
Remark 3 (Simulating catalytic rules) We first observe that when operating with Semantics 2 we can limit the parallelism of a non-cooperative rule by producing a marker symbol whose capacity is limited to one. For example, consider the rule p ∶ a → u p together with the rule p → and the limiting condition K( p ) = 1 , i.e., the symbol p may not appear in more than one copy. Then, in any multiset of rules allowed to be applied, p may appear in at most one copy. This effectively prohibits applying p more than once in any step. Moreover, we can ensure that the rules compete for the marker symbol just as catalytic rules would compete for a catalyst. For example, consider two catalytic rules ca → cu and cb → cv . These two rules cannot be applied at the same time, even if both a and b are present, because the catalyst is only present in a single copy. We can ensure the same mutual exclusion by having the symbol c with the capacity limited to 1 ( K( c ) = 1 ), and the rules a → u c and b → v c . Remark 4 (No catalysts needed) As elaborated in Remark 3, catalytic rules can be replaced by non-cooperative rules, i.e., P systems with per-symbol limited capacity operating with Semantics 2 do not need catalysts for simulating purely catalytic P systems.
All together, these observations imply the following results: Theorem 2 P systems with per-symbol limited capacity operating with Semantics 2 without catalysts can simulate purely catalytic P systems.
Proof Let = (O, C, w, K, R) be an arbitrary purely catalytic P system. We now construct a P system � = (O, w, K, R � ) with per-symbol limited capacity, operating with Semantics 2, without catalysts: 0 is the multiset encoding the initial values of the registers.
In the construction of ′ the symbols c ∈ C now are not catalysts any more as in , but guarantee the same effect by their number being limited by 1.
As described in Remark 3, any catalytic rule ca → cu ∈ R , c ∈ C , can be simulated by the non-cooperative rule a → cu . The limited capacity of the symbols c guarantees that for each catalyst c at most one catalytic rule ca → cu ∈ R can be simulated, but on the other hand if one of these catalytic rules can be applied, according to the maximally parallel derivation mode also in ′ one of the corresponding noncooperative rules has to be applied. As the "catalyst symbol" c immediately vanishes in the next step, the room is free for generating it again at most once in the next derivation step in ′ again. ◻ Corollary 2 P systems with per-symbol limited capacity operating with Semantics 2 without catalysts can simulate catalytic P systems.
Proof Let = (O, C, w, K, R) be an arbitrary catalytic P system. As in the Proof of Theorem 2 we construct a P system � = (O, w, K, R � ) with per-symbol limited capacity, operating with Semantics 2, without catalysts: In fact, we have just added the non-cooperative rules a → u from R to R ′ . ◻ Since catalytic as well as purely catalytic P systems are computationally complete, for example see [8], we immediately derive the following corollary. Corollary 3 P systems with per-symbol limited capacity operating with Semantics 2 are computationally complete, even without using catalysts.

Conclusion
In this paper, we have introduced the idea of bounding the number of symbols that may appear in the membranes of a P system. This is a quite natural restriction to consider, given that actual biological membranes are of limited capacity, too. We defined per-membrane and per-symbol limited capacities, and defined two possible semantics for handling the overflow. We then showed that Semantics 1 allows non-cooperative P systems to simulate partially blind register machines in real time, with 3 additional cleanup steps at the end of the computation. We also showed that non-cooperative P systems operating under Semantics 2 of limited capacity directly simulate purely catalytic and catalytic P systems (in real time), yet without needing catalysts, and therefore are computationally complete. This paper only scratches the surface of the study of P systems with limited capacity. One immediate open problem is that of computational completeness of (catalytic, purely catalytic) P systems with limited capacity operating with Semantics 1 or else characterizing the computational power of these systems. Furthermore, Sect. 3 gives three more different behaviors which P systems may adopt when their membranes overflow. In particular, the separation and the dissolutive behaviors may even better represent the phenomena one would expect to observe in overfull membranes in biological cells.