Evaluating space measures in P systems

P systems with active membranes are a variant of P systems where membranes can be created by division of existing membranes, thus creating an exponential amount of resources in a polynomial number of steps. Time and space complexity classes for active membrane systems have been introduced, to characterize classes of problems that can be solved by different membrane systems making use of different resources. In particular, space complexity classes introduced initially considered a hypothetical real implementation by means of biochemical materials, assuming that every single object or membrane requires some constant physical space (corresponding to unary notation). A different approach considered implementation of P systems in silico, allowing to store the multiplicity of each object in each membrane using binary numbers. In both cases, the elements contributing to the definition of the space required by a system (namely, the total number of membranes, the total number of objects, the types of different membranes, and the types of different objects) was considered as a whole. In this paper, we consider a different definition for space complexity classes in the framework of P systems, where each of the previous elements is considered independently. We review the principal results related to the solution of different computationally hard problems presented in the literature, highlighting the requirement of every single resource in each solution. A discussion concerning possible alternative solutions requiring different resources is presented.


Introduction
P systems with active membranes have been introduced in [29], considering the idea of generating new membranes through division of existing ones. The exponential amount of resources that can be obtained in this way, in a polynomial number of computation steps, naturally leads to the definition of new complexity classes to be compared with the standard ones.
Initially, the research activity focused on the investigation of time complexity. It was proved that, to go beyond the complexity class P , the creation of new membranes is a necessary feature to gain enough computation efficiency [44], unless non-confluent systems are used [37]. In [38], it was proved that P systems with active membranes can solve all problems in the class in polynomial time, a result which is valid also for uniform systems, as proved in [7]. Relations with the classes and were investigated in [36].
A series of works then defined various complexity classes characterized by P systems that make use of different features. For instance, the works [13,14] focused on the crucial 1 3 role of membrane dissolution; polarizationless systems have been investigated in [5,6,12,17]; constraints on membrane division [24] or on depth of membrane structure [19] have been the subjects of other papers, while [40,41] focused on the role of cooperation.
More recently, other aspects have also been studied. In [1,27], a different kind of membrane division, called separation (since objects are separated between new membranes, rather than duplicated) is considered in the framework of P systems with active membranes; in [26] such kind of rules are applied in a different variant of P systems, having proteins on membranes. In [8,11], solutions for the SAT problem are proposed which use different strategies than previously proposed solutions. Systems of a shallow depth are the subject of [20][21][22]. A recent survey on different strategies to approach computationally hard problems by P systems with active membranes can be found in [39].
Besides time complexity, space complexity has been also considered. This notion was firstly introduced in the framework of P systems in [31], with a definition based on a hypothetical real implementation by means of biochemical materials such as cellular membranes and chemical molecules. Under this assumption, it was assumed that every single object or membrane requires some constant physical space, and this is equivalent to using a unary encoding to represent multiplicities. The relations between standard computational complexity classes and the space complexity classes defined in these terms have been studied, both when at least a linear amount of space is used [32,33], as well as when only sublinear [35] or even constant amount of space [18] is available. A recent survey concerning results obtained by considering different bounds on space can be found in [43].
A different approach to define space complexity for P systems was considered in [2], focusing the definition of space on the simulative point of view. In fact, by considering an implementation of P systems in silico (like the ones in, e.g., [9,10]), it is not strictly necessary to store information concerning every single object: the multiplicity of each object in each membrane can be stored using binary numbers, thus reducing the amount of needed space.
In both cases, the definition of the space required by a system was considered as a unique total measure obtained by considering all the elements contributing to it: the total number of membranes, the total number of objects, the types of different membranes, and the types of different objects.
In this paper, we introduce a different definition for space complexity classes in the framework of P systems, where each of the previous elements is considered independently, thus proposing a vector measurement of previously defined scalar measures. This allows to consider the amount of each element separately, thus highlighting the requirement of each of them in every solution considered, instead of a global value. We review the principal results present in the literature and we discuss possible alternative solutions, requiring different resources balances.
The paper is organized as follows. In Sect. 2 we recall some definitions concerning P systems with active membranes and space requirements in P systems computations. In Sect. 3, we introduce a definition of space to measure the contribution by each component, namely the total number of membranes, the total number of objects, the types of different membranes, and the types of different objects. Moreover, we survey some main results concerning complexity in the framework of P systems, highlighting the use of each single resource. Section 4 presents some conclusions and future research topics.

Basic definitions
In this section, we shortly recall some definitions that will be useful while reading the rest of the paper. For a complete introduction to P systems, we refer the reader to The Oxford Handbook of Membrane Computing [30].
• is an alphabet, i.e., a finite non-empty set of symbols, usually called objects; in the following, we assume • is a finite set of labels for the membranes; • is a membrane structure (i.e., a rooted unordered tree, usually represented by nested brackets) consisting of d membranes, labeled by elements of , defining regions (the space between a membrane and all membranes immediately inside it, if any); • w h 1 , … , w h d , with h 1 , … , h d ∈ , are strings over describing the initial multisets of objects placed in the d regions of ; • R is a finite set of rules over .
Membranes are polarized, that is, they have an attribute called electrical charge, which can be neutral (0), positive (+ ) or negative (−).
A P system can make a computation step by applying its rules to modify the membrane structure and/or the membrane content. The following types of rules can be used during the computation: • Object evolution rules, of the form [a → w] h They can be applied inside a membrane labeled by h, having charge and containing at least an occurrence of the object a; the copy of the object a to which the rule is applied is rewritten into the multiset w (i.e., a is removed from the multiset in h and replaced by the objects in w).
They can be applied to a membrane labeled by h, having charge and such that the external region contains at least an occurrence of the object a; the copy of the object a to which the rule is applied is sent into h becoming b and, simultaneously, the charge of h is changed to .
They can be applied to a membrane labeled by h, having charge and containing at least an occurrence of the object a; the copy of the object a to which the rule is applied is sent out from h to the outside region becoming b and, simultaneously, the charge of h is changed to . • Dissolution rules, of the form [a] h → b They can be applied to a membrane labeled by h, having charge and containing at least an occurrence of the object a; the copy of the object a to which the rule is applied is replaced by b, the membrane h is dissolved and its contents are left in the surrounding region.
They can be applied to a membrane labeled by h, having charge , containing at least an occurrence of the object a but having no other membrane inside (in this case, the membrane is said to be elementary); the membrane is divided into two membranes having both label h and charges and , respectively; the copy of the object a to which the rule is applied is replaced, respectively, by b and c in the two new membranes, while the other objects in the initial multiset are copied to both membranes.
h These rules operate just like division for elementary membranes, but they can be applied to non-elementary membranes, containing membrane substructures and having a label h. Like the objects, the substructures inside the dividing membrane are replicated in the two new copies of it.
A configuration of a P system with active membranes is described by the current membrane structure (including the electrical charge of each membrane) and the multisets located in the corresponding regions. A computation step changes the current configuration according to the following set of principles: • Each object and membrane can be subject to at most one rule per step, except for object evolution rules: this means that inside each membrane several evolution rules can be applied simultaneously, but each membrane can be involved only in a single communication, dissolution, or division rule per step.
• The application of rules is maximally parallel: each object appearing on the left-hand side of evolution, communication, dissolution or division rules must be subject to exactly one of them (unless the current charge of the membrane prohibits it, and according to the fact that a membrane can be involved in a single communication, dissolution, or division rule per step). The same principle applies to each membrane that can be involved in communication, dissolution, or division rules. In other words, the only objects and membranes that do not evolve are those associated with no rule, or only to rules that are not applicable due to the electrical charges. • When several conflicting rules can be applied at the same time, a nondeterministic choice is performed; this implies that, in general, multiple possible configurations can be reached as a result of a computation step. • In each computation step, all the chosen rules are applied simultaneously (in an atomic way). We stress the fact that the membranes evolve only after their internal configuration has been updated. For instance, before a membrane division occurs, all chosen object evolution rules must be applied inside it; in this way, the objects that are duplicated during the division are already the final ones. • The outermost membrane cannot be divided or dissolved, and any object sent out from it cannot re-enter the system again.
A halting computation of the P system is a finite sequence of configurations C = (C 0 , … , C k ) , where C 0 is the initial configuration, every C i+1 is reachable from C i via a single computation step, and no rules of are applicable in C k . If this last condition is never reached (that is, in each configuration of the sequence there is at least one applicable rule), then a non-halting computation C = (C i ∶ i ∈ ℕ) is obtained, that consists of infinitely many configurations, again starting from the initial one and generated by successive computation steps. P systems can be used as language recognizers by employing two distinguished objects yes and no ; exactly one of these must be sent out from the outermost membrane, and only in the last step of each computation, to signal acceptance or rejection, respectively; we also assume that all computations are halting.
To solve decision problems (i.e., recognize languages over an alphabet ), we use families of recognizer P sys- Each input x is associated with a P system x in the family that decides the membership of x in the language L ⊆ ⋆ by accepting or rejecting. The mapping x ↦ x must be efficiently computable for each input length [25].
These families of recognizer P systems can be used to solve decision problems as follows. Definition 2 Let be a P system whose alphabet contains two distinct objects yes and no , such that every computation of is halting and during each computation exactly one of the objects yes, no is sent out from the skin (in the last computation step) to signal acceptance or rejection. If all computations of agree on the result, then is said to be confluent; if this is not necessarily the case, then it is said to be non-confluent and the global result is acceptance if and only if there exists at least an accepting computation.

Definition 3
Let L ⊆ ⋆ be a language, D a class of P systems (i.e., a set of P systems using a specific subset of features; in the following, we will consider some main classes: AM, active membranes-division for both elementary and non-elementary membranes, NAM, non active membranesmembranes cannot be divided, and EAM, elementary active membranes-only elementary membranes can be divided) and let = { x | x ∈ ⋆ } ⊆ D be a family of P systems, either confluent or non-confluent. We say that decides L when, for each x ∈ ⋆ , x ∈ L if and only if x accepts.
Complexity classes for P systems are defined by imposing a uniformity condition on and restricting the amount of time or space available for deciding a language.
Definition 4 Consider a language L ⊆ ⋆ , a class of recognizer P systems D , and let f ∶ ℕ → ℕ be a proper complexity function (i.e., a "reasonable" one, see [28, Definition 7.1]). We say that L belongs to the complexity class MC ⋆ D (f ) if and only if there exists a family of confluent P systems = { x | x ∈ ⋆ } ⊆ D deciding L such that: • is semi-uniform, i.e., there exists a deterministic Turing machine which, for each input x ∈ ⋆ , constructs the P system x in polynomial time with respect to |x|; • operates in time f, i.e., for each x ∈ ⋆ , every computation of x halts within f(|x|) steps.
In particular, a language L ⊆ ⋆ belongs to the complexity class PMC ⋆ D if and only if there exists a semi-uniform family of confluent P systems The analogous complexity classes for non-confluent P systems are denoted by NMC ⋆ D (f ) and NPMC ⋆ D .
Another set of complexity classes is defined in terms of uniform families of recognizer P systems: Definition 5 Consider a language L ⊆ ⋆ , a class of recognizer P systems D , and let f ∶ ℕ → ℕ be a proper complexity function. We say that L belongs to the complexity class MC D (f ) if and only if there exists a family of confluent P systems = { x | x ∈ ⋆ } ⊆ D deciding L such that: • is uniform, i.e., for each x ∈ ⋆ deciding whether x ∈ L is performed as follows: first, a polynomial-time deterministic Turing machine, given the length n = |x| as a unary integer, constructs a P system n with a distinguished input membrane; then, another polynomial-time deterministic Turing machine computes an encoding of the string x as a multiset w x , which is finally added to the input membrane of n , thus obtaining a P system x that accepts if and only if x ∈ L.
• operates in time f, i.e., for each x ∈ ⋆ , every computation of x halts within f(|x|) steps.
In particular, a language L ⊆ ⋆ belongs to the complexity class PMC D if and only if there exists a uniform family of The analogous complexity classes for non-confluent P systems are denoted by NMC D (f ) and NPMC D .
As stated in the Introduction, the first definition of space complexity for P systems introduced in [31] considered a possible real implementation with biochemical materials, thus assuming that every single object and membrane requires some constant physical space. Such a definition (in the improved version from [23], taking into account also the space required by the labels for membranes and the alphabet of symbols) is the following:

Definition 6
Considering a configuration C of a P system , its size |C| is the number of membranes in the current membrane structure multiplied by log | | , plus the total number of objects from they contain multiplied by log | | . If C = (C 0 , … , C k ) is a computation of , then the space required by C is defined as The space required by itself is defined as the supremum of the space required by all computations of : Following what has been done for time complexity classes, we can define space complexity classes. By MCSPACE D (s(n)) (resp. MCSPACE ⋆ D (s(n)) ) we denote the class of languages which can be decided by uniform (resp. semi-uniform) families, , of confluent P systems of type D (for example, when we refer to P systems with active membranes, we denote this by setting D = AM ), where each x ∈ operates within space bound s(|x|). In particular, the class of problems solvable in a polynomial space by uniform confluent systems is denoted by PMCSPACE D , and the class of problems solvable in an exponential space by uniform confluent systems is denoted by EXPMCSPACE D (adding a star in case of semi-uniform classes). The corresponding classes for non-conf luent systems are NPMCSPACE D and NEXPMCSPACE D .
A different approach to define space complexity for P systems was introduced in [2], considering the information stored in the objects of the systems, and not the single objects themselves. Binary notation, instead of unary, was used to store the amount of objects in each region, with the following definition of binary space: Definition 7 Consider a configuration C of a P system . Let us denote by h 1 , h 2 , ..., h z the membranes of the current membrane structure (we stress the fact that z can be smaller, equal, or greater than the initial number of membranes d, due to dissolution and duplication of membranes; we also stress the fact that we do not need to store unique IDs for membranes having the same label as we can, for example, indicate multisets of objects inside a string-like bracketed expression), and by |O i,j | the multiplicity of object i within region j. The binary size |C| B of a configuration C is defined as: that is the number of membranes in the current membrane structure multiplied by log | | , plus the number of bits required to store the description of the multiset in each region.
If C = (C 0 , … , C k ) is a computation of , then the binary space required by C is defined as The binary space required by itself is then obtained by computing the binary space required by all computations of and taking the supremum: Finally, let = { x ∶ x ∈ ⋆ } be a family of recognizer P systems, and let s ∶ ℕ → ℕ . We say that operates within binary space bound s if and only if | x | B ≤ s(|x|) for each x ∈ ⋆ .
Corresponding space complexity classes, that consider this different size measure, can be considered.

Considering separate feature contributions to space definition
In both cases of space definition considered in the previous Section, the amount of space required by a system was a single total measure obtained, in different ways, by considering all the elements contributing to it: the total number of membranes (denoted by me), the total number of objects (ob), the membrane types (met), and the object types (obt).
We introduce now a different definition of space in the framework of P systems, based on a vector measurement, instead of a scalar one, where each of the previous elements is considered independently, thus allowing to consider the contribution given by each element separately, and highlighting the requirement of each of them in every solution to complex computational problems considered in the literature.
The use of vector measurements has been successfully considered in many different domains. Just to cite some examples, it has been considered to define size for insertion-deletion systems [16], with the size measured by six numbers (insertion, left insertion context, right insertion context, size of deletion, left deletion context, right deletion context), or in splicing systems [15], using four numbers to consider the sizes of the recombination points in the strings involved in a splicing operation. Definition 8 Consider a P system with active membranes, and a computation C = (C 0 , … , C k ) of . Let us denote the set of membrane labels of by , and the alphabet of objects by . Moreover, let us denote by MaxMe the maximum number of membranes present at the same time in during some steps of C , and by MaxOb the maximum number of objects present at the same time in during some steps of C (we stress the fact that the maximum number of membranes and objects do not necessarily appear in the same computation step).
We say that the computation C of is bounded by Space(me, ob, met, obt) if and only if MaxMe ≤ me , MaxOb ≤ ob , | | ≤ met , and | | ≤ obt.
The space required by itself is then obtained by computing the corresponding space required by all computations of and taking the supremum.
Finally, let = { x ∶ x ∈ ⋆ } be a family of recognizer P systems. We say that operates within Space(me, ob, met, obt) if and only if each member x of the family operates within the above space.
Of course, complexity classes corresponding to this definition of space can be defined in a similar way as already done in the previous Section; as an example, by MCSPACE D (me, ob, met, obt) we denote the class of problems solved by P systems with active membranes of type D having features limited according to me, ob, met, obt.
Having defined the contribution of each element to the space requirements, we are ready to survey some main results present in the literature, to analyze the requirements in terms of single features required by each proposed solution.

P r o p o s i t i o n 1 P ⊆ MCSPACE * NAM
In this proposition, it is proved that semi-uniform systems with active membranes that do not use membrane division can solve all problems in P in constant space. In fact, all the work is done by the deterministic Turing machine used to build the system (a deterministic polynomial time uniformity condition is considered). The obtained system simply sends out a yes or no answer, in one step. Similar considerations remain valid also for the uniform case. As a consequence, in both cases we have me = ob = mt = obt = 1. Considering the corresponding proposition, we have: The next proposition exploits the results from [44], in particular concerning the problems SAT with n variables and m clauses, and Hamiltonian Path over an undirected graph with n nodes.
The solution for the Hamiltonian Path problem tries all possible paths, to check if at least one of them satisfies the required conditions. In this case, we have me = O(n n ) , In [38], it was shown how to exploit membrane division to solve the -complete problem Satisfiability of Quantified Boolean Formulas (QBF), using semi-uniform P systems with active membranes: In [4], the same last result was proved for uniform systems. In [34], systems with limited power were considered; in particular, division rules for non-elementary membranes and dissolution rules were avoided. It was proved that such systems can solve all problems in the complexity class in polynomial time. In fact, a solution for the -complete problem SQRT3SAT was proposed.

Proposition 4 ⊆ ndiss EAM
The features of that solution are the following: In [42], it was shown that a deterministic Turing machine working in polynomial space, with respect to the input length, can be efficiently simulated (both in terms of time and space) by a semi-uniform family of P systems with active membranes, using only communication rules.

Proposition 5 A Deterministic Turing machine M working in space s(n) and time t(n) can be simulated by a semi-uniform family of P systems in space O(s(n)) and time O(t(n))
The main idea to prove this result was to store information bits by using polarizations associated with membranes, instead of objects inside them. As a consequence, the required amount of resources needed is very low: me = s(n) + 2, ob = O(n) initially, then 1, met = 3 , obt = 5 + 3 * |Q| , where Q is the set of states of the Turing machine M.

Proposition 5' A Deterministic Turing machine M working in space s(n) and in time t(n) can be simulated by a semiuniform family of P systems in space MCSPACE
In [3], similar results for uniform families of P systems with active membranes were proved, using a cubic slowdown and a quadratic space overheads: Proposition 6 A deterministic Turing machine M working in space s(n) and time t(n) can be simulated by uniform confluent or non-confluent P systems within polynomial bounds for space and time.

Proposition 6' A deterministic Turing machine M working in space s(n) and time t(n) can be simulated by uniform confluent or non-confluent P systems in space
We conclude this analysis by recalling a result from [33]. In this work, it was proved that recognizer P systems with active membranes that use polynomial space characterize the complexity class . In particular, the result holds for both confluent and non-confluent systems, and independently of the use of membrane division rules.
This generic result allows to relate the number of computation steps to the maximum number of objects and the maximum number of membranes that can be obtained after those steps. In particular, let us consider a non-confluent P system with active membranes, defined using a description of length m made in any reasonable encoding (e.g., where the membrane structure is represented using strings of brackets), and where multisets are represented in unary. After t steps of computation of , we have the following: me = O(2 t * m+m * log(m) ), and ob = O(2 t * t * m * log(m) ).
We conclude this section by summarizing in the following table the results we presented in the paper. For instance, the first result can be read as "deterministic MCSPACE * (c) (1, 1, 1, 1) ⊇ P , see [31]".

Conclusions
We introduced a definition for space complexity classes in the framework of P systems, where each element contributing to the definition of space used by the system (that is, the total number of membranes, the total number of objects, the types of different membranes, and the types of different objects) is considered independently. In this way, the contribution of each element in defining the total space required by the system to execute a computation can be highlighted independently. Many different constructions by various authors have been presented in the literature to attack computationally hard problems. After presenting here some of them, we think it will be interesting to check the possibility to propose alternative solutions where the considered parameters are different (i.e., of a different asymptotic order) with respect to those already published. As an example, would it be possible to find solutions similar to those of Propositions 3 and 4 by using a constant amount of object types or of membrane types?
Moreover, we want to stress the fact that, under the usual uniformity condition considered, a polynomial time precomputing by a deterministic Turing machine is allowed and, in this case, membrane types and object types are forced to be at most polynomial. However, different uniformity conditions can also be considered, to highlight their impact on these features. For instance, how to factor the input for sublinear space complexity classes if we would like to have more object types with respect to those allowed by the input size (maybe not all of them present since the beginning of the computation), but the uniformity condition forbids that?
It would also be useful to clarify how to proceed when the size of the problem instance is given by a few numbers like, e.g., the number of clauses and variables for SAT. Luca Manzoni is an associate professor at the University of Trieste, Italy. He obtained his PhD in Computer Science at the University of Milano-Bicocca in 2013. In 2012, he obtained a JSPS postdoctoral fellowship. In 2017, he obtained an award as the best young postdoc in Computer Science and Mathematics at the University of Milano-Bicocca. He has published more than 80 papers in international journal, conferences, and workshops. His interests are in the areas of natural computing models, like P systems, reactions systems, and cellular automata, and in the area of evolutionary computation, and genetic programming in particular.
Giancarlo Mauri is professor emeritus of Computer Science at the University of Milano-Bicocca. His research interests include natural computing and unconventional computing models, in particular membrane systems and splicing systems; bioinformatics, in particular algorithms for NGS data analysis; computational systems biology, in particular stochastic modeling and simulation of biological systems and processes. On these subjects, he published about 500 scientific papers in international journals, contributed volumes and conference proceedings. He is or has been member of the steering committees of the International Conferences on DNA Computing, Membrane Computing, Unconventional Computing and Natural Computing, Developments in Language Theory, and of the International workshop on Cellular Automata for Research and Industry.
Claudio Zandron got the PhD in Computer Science from the University of Milan in 2002. Since 2006, he is associate professor at the Department of Informatics, Systems and Communication of the University of Milano-Bicocca, Italy. His research interests concern the areas of formal languages, molecular computing models, DNA computing, Membrane Computing, and computational complexity.