1 Introduction

P systems with active membranes have been introduced in [27], considering the idea of generating new membranes through the 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 \(\bf {P}\), the creation of new membranes is a necessary feature to gain enough computation efficiency [40], unless non-confluent systems are used [34]. In [35] it was proved that P systems with active membranes can solve all problems in the class \(\bf {PSPACE}\) in polynomial time, a result which is valid also for uniform systems, as proved in [6]. Relations with the classes \(\bf{EXP}\) and \(\bf {EXPSPACE}\) were investigated in [33].

A series of works then defined various complexity classes characterized by P systems that make use of different features. For instance, the works [12, 13] focused on the crucial role of membrane dissolution; polarizationless systems have been investigated in [4, 5, 11, 14]; constraints on membrane division [22] or on the depth of membrane structure [16] have been the subjects of other works, while [37, 38] focused on the role of cooperation.

More recently, other aspects have also been studied. In [1, 25] 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 [24] such kind of rules are applied in a different variant of P systems, having proteins on membranes. In [7, 10] solutions for \(\mathrm {SAT}\) are proposed which use different strategies than previously proposed solutions. Systems of a shallow depth are the subject of [17,18,19]. A recent survey on different strategies to approach computationally hard problems by P systems with active membranes can be found in [36].

A natural research topic that has been approached after the first works on time complexity concerns space complexity, a notion introduced for the first time in the framework of P systems in [29]. The definition was 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 [30, 31], as well as when only sublinear [32] or even constant amount of space [15] is available. A recent survey concerning results obtained by considering different bounds on space can be found in [39].

When defining space complexity for P systems, a different approach can also be considered, 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., [8, 9]), 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 this paper, we consider this option: we introduce a formal definition for this alternative space complexity measure, we define the corresponding complexity classes and we compare such classes both with standard space complexity classes defined for Turing machines and with complexity classes defined in the framework of P systems considering the original definition of space [29]. We will give results concerning the use of a constant, polynomial or exponential amount of space, respectively, trying to understand whether or not the classes of solvable problems differ.

The paper is organized as follows. In Section 2 we recall some definitions concerning P systems with active membranes and space requirements in P systems computations. In Section 3, we introduce a different definition for measuring space (which we call binary space to underline that information concerning objects is stored in binary) and we give some results following immediately from this definition. In Section 4 we compare the new binary space complexity classes with standard complexity classes and with space complexity classes for P systems based on the standard definition of space. Finally Section 5 draws some conclusions and presents some future research topics on this subject.

2 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 [28].

Definition 1

A P system with active membranes having initial degree \(d \ge 1\) is a tuple \(\varPi = (\varGamma , \varLambda , \mu , w_{h_1}, \ldots , w_{h_d}, R)\), where:

  • \(\varGamma\) is an alphabet, i.e., a finite non-empty set of symbols, usually called objects; in the following, we assume \(\varGamma =\{O_1, O_2,\ldots , O_n\}\);

  • \(\varLambda\) is a finite set of labels for the membranes;

  • \(\mu\) is a membrane structure (i.e., a rooted unordered tree, usually represented by nested brackets) consisting of d membranes, labelled by elements of \(\varLambda\) in a one-to-one way, defining regions (the space between a membrane and all membranes immediately inside it, if any);

  • \(w_{h_1}, \ldots , w_{h_d}\), with \(h_1, \ldots , h_d \in \varLambda\), are strings over \(\varGamma\) describing the initial multisets of objects placed in the d regions of \(\mu\);

  • R is a finite set of rules over \(\varGamma\).

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 \rightarrow w]_h^\alpha\)

    They can be applied inside a membrane labelled by h, having charge \(\alpha\) 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).

  • Send-in communication rules, of the form \(a \, [\;]_h^\alpha \rightarrow [b]_h^\beta\)

    They can be applied to a membrane labelled by h, having charge \(\alpha\) 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 \(\beta\).

  • Send-out communication rules, of the form \([a]_h^\alpha \rightarrow [\;]_h^\beta \, b\)

    They can be applied to a membrane labelled by h, having charge \(\alpha\) 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 \(\beta\).

  • Dissolution rules, of the form \([a]_h^\alpha \rightarrow b\)

    They can be applied to a membrane labelled by h, having charge \(\alpha\) 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.

  • Elementary division rules, of the form \([a]_h^\alpha \rightarrow [b]_h^\beta \, [c]_h^\gamma\)

    They can be applied to a membrane labelled by h, having charge \(\alpha\), 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 \(\beta\) and \(\gamma\), 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.

  • (Weak) Non-elementary division rules, of the form \([a]_h^\alpha \rightarrow [b]_h^\beta \, [c]_h^\gamma\)

    These rules operate just like division for elementary membranes, but they can be applied to non–elementary membranes, containing membrane substructures and having 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). However, to clarify the operational semantics, each computation step is conventionally described as a sequence of micro-steps as follows. First, all evolution rules are applied inside the elementary membranes, followed by all communication, dissolution and division rules involving the membranes themselves; this process is then repeated on the membranes containing them, and so on towards the root (outermost membrane). In other words, 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 \(\varPi\) is a finite sequence of configurations \(\bf {{\mathcal {C}}}= ({\mathcal {C}}_0, \ldots , {\mathcal {C}}_k)\), where \({\mathcal {C}}_0\) is the initial configuration, every \({\mathcal {C}}_{i+1}\) is reachable from \({\mathcal {C}}_i\) via a single computation step, and no rules of \(\varPi\) are applicable in \({\mathcal {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 \(\bf {{\mathcal {C}}}= ({\mathcal {C}}_i : i \in {\mathbb {N}})\) 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.

In order to solve decision problems (i.e., recognize languages over an alphabet \(\varSigma\)), we use families of recognizer P systems \(\varvec{\Pi }= \{ \varPi _x : x \in \varSigma ^\star \}\). Each input x is associated with a P system \(\varPi _x\) in the family \(\varvec{\Pi }\) that decides the membership of x in the language \(L \subseteq \varSigma ^\star\) by accepting or rejecting. The mapping \(x \mapsto \varPi _x\) must be efficiently computable for each input length [23].

These families of recognizer P systems can be used to solve decision problems as follows.

Definition 2

Let \(\varPi\) be a P system whose alphabet contains two distinct objects \(yes\) and \(no\), such that every computation of \(\varPi\) is halting and during each computation exactly one of the objects \(yes , no\) is sent out from the skin to signal acceptance or rejection. If all the computations of \(\varPi\) agree on the result, then \(\varPi\) 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 an accepting computation.

Definition 3

Let \(L \subseteq \varSigma ^\star\) be a language, \({\mathcal {D}}\) a class of P systems (i.e. a set of P systems using a specific subset of features) and let \(\varvec{\Pi }= \{\varPi _x \mid x \in \varSigma ^\star \} \subseteq {\mathcal {D}}\) be a family of P systems, either confluent or non-confluent. We say that \(\varvec{\Pi }\) decides L when, for each \(x \in \varSigma ^\star\), \(x \in L\) if and only if \(\varPi _x\) accepts.

Complexity classes for P systems are defined by imposing a uniformity condition on \(\varvec{\Pi }\) and restricting the amount of time or space available for deciding a language.

Definition 4

Consider a language \(L \subseteq \varSigma ^\star\), a class of recognizer P systems \({\mathcal {D}}\), and let \(f :{\mathbb {N}}\rightarrow {\mathbb {N}}\) be a proper complexity function (i.e. a “reasonable” one, see [26, Definition 7.1]). We say that L belongs to the complexity class \(\bf{MC}^\star _{\mathcal {D}}(f)\) if and only if there exists a family of confluent P systems \(\varvec{\Pi }= \{\varPi _x \mid x \in \varSigma ^\star \} \subseteq {\mathcal {D}}\) deciding L such that:

  • \(\varvec{\Pi }\) is semi-uniform, i.e. there exists a deterministic Turing machine which, for each input \(x \in \varSigma ^\star\), constructs the P system \(\varPi _x\) in polynomial time with respect to |x|;

  • \(\varvec{\Pi }\) operates in time f, i.e. for each \(x \in \varSigma ^\star\), every computation of \(\varPi _x\) halts within f(|x|) steps.

In particular, a language \(L \subseteq \varSigma ^\star\) belongs to the complexity class \(\bf{PMC}^\star _{\mathcal {D}}\) if and only if there exists a semi-uniform family of confluent P systems \(\varvec{\Pi }= \{\varPi _x \mid x \in \varSigma ^\star \} \subseteq {\mathcal {D}}\) deciding L in polynomial time.

The analogous complexity classes for non-confluent P systems are denoted by \(\bf{NMC}^\star _{\mathcal {D}}(f)\) and \(\bf{NPMC}^\star _{\mathcal {D}}\).

Another set of complexity classes is defined in terms of uniform families of recognizer P systems:

Definition 5

Consider a language \(L \subseteq \varSigma ^\star\), a class of recognizer P systems \({\mathcal {D}}\), and let \(f :{\mathbb {N}}\rightarrow {\mathbb {N}}\) be a proper complexity function. We say that L belongs to the complexity class \(\bf{MC}_{\mathcal {D}}(f)\) if and only if there exists a family of confluent P systems \(\varvec{\Pi }= \{\varPi _x \mid x \in \varSigma ^\star \} \subseteq {\mathcal {D}}\) deciding L such that:

  • \(\varvec{\Pi }\) is uniform, i.e. for each \(x \in \varSigma ^\star\) deciding whether \(x \in 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 \(\varPi _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 \(\varPi _n\), thus obtaining a P system \(\varPi _x\) that accepts if and only if \(x \in L\).

  • \(\varvec{\Pi }\) operates in time f, i.e. for each \(x \in \varSigma ^\star\), every computation of \(\varPi _x\) halts within f(|x|) steps.

In particular, a language \(L \subseteq \varSigma ^\star\) belongs to the complexity class \(\bf{PMC}_{\mathcal {D}}\) if and only if there exists a uniform family of confluent P systems \(\varvec{\Pi }= \{\varPi _x \mid x \in \varSigma ^\star \} \subseteq {\mathcal {D}}\) deciding L in polynomial time.

The analogous complexity classes for non-confluent P systems are denoted by \(\bf{NMC}_{\mathcal {D}}(f)\) and \(\bf{NPMC}_{\mathcal {D}}\).

As stated in the Introduction, the first definition of space complexity for P systems introduced in [29] 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 [20], 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 \({\mathcal {C}}\) of a P system \(\varPi\), its size \(|{\mathcal {C}}|\) is the number of membranes in the current membrane structure multiplied by \(\log |\varLambda |\), plus the total number of objects from \(\varGamma\) they contain multiplied by \(\log |\varGamma |\). If \(\bf {{\mathcal {C}}}= ({\mathcal {C}}_0, \ldots , {\mathcal {C}}_k)\) is a computation of \(\varPi\), then the space required by \(\bf {{\mathcal {C}}}\) is defined as

$$\begin{aligned} |\bf {{\mathcal {C}}}| = \max \{ |{\mathcal {C}}_0|, \ldots , |{\mathcal {C}}_k| \}. \end{aligned}$$

The space required by \(\varPi\) itself is defined as the supremum of the space required by all computations of \(\varPi\):

$$\begin{aligned} |\varPi | = \sup \{ |\bf {{\mathcal {C}}}| : \bf {{\mathcal {C}}}\text { is a computation of }\varPi \}. \end{aligned}$$

Finally, let \(\varvec{\Pi }= \{ \varPi _x : x \in \varSigma ^\star \}\) be a family of recognizer P systems, and let \(s :{\mathbb {N}}\rightarrow {\mathbb {N}}\). We say that \(\varvec{\Pi }\) operates within space bound s if and only if \(|\varPi _x| \le s(|x|)\) for each \(x \in \varSigma ^\star\).

Following what has been done for time complexity classes, we can define space complexity classes. By \({\bf{MCSPACE}}_{\mathcal {D}}(f(n))\) (resp. \({\bf{MCSPACE}}^\star _{\mathcal {D}}(f(n))\)) we denote the class of languages which can be decided by uniform (resp. semi-uniform) families, \(\varvec{\Pi }\), of confluent P systems of type \({\mathcal {D}}\) (for example, when we refer to P systems with active membranes, we denote this by setting \({\mathcal {D}}={\mathcal {AM}}\)), where each \(\varPi _x \in \varvec{\Pi }\) operates within space bound f(|x|).

In particular, the class of problems solvable in polynomial space by uniform confluent systems is denoted by \(\bf{PMCSPACE}_{\mathcal {D}}\), and the class of problems solvable in exponential space by uniform confluent systems is denoted by \(\bf{EXPMCSPACE}_{\mathcal {D}}\) (adding a star in case of semi–uniform classes).

The corresponding classes for non-confluent systems are \(\bf{NPMCSPACE}_{\mathcal {D}}\) and \(\bf{NEXPMCSPACE}_{\mathcal {D}}\).

3 An alternative definition of space complexity for P systems

In this section, we first give a different definition of space complexity for P systems with active membranes. This definition considers the information stored in the objects of the systems, and not the single objects themselves. In other words, we store, using binary numbers, the multiplicity of each object in each membrane, thus reducing the amount of needed space with respect to the definition of space given in the previous section.

We will do this considering, for each region, a sequence of couples, describing how many occurrences of each object are present (only for objects having at least one occurrence in the region). As an example, considering an (ordered) alphabet \(\varGamma =\{a,b,c,d\}\), a multiset \(a^2,b^5,d^6\) can be described by the sequence of couples (010, 00), (101, 01), (110, 11) (where (010,00) corresponds to 2 occurrences of the first symbol in \(\varGamma\), that is a, (101,01) to 5 occurrences of the second symbol b, etc.). Of course, different descriptions can also be considered: for instance, the bits describing the object can be avoided if we give, in order, the amount of each object, including objects having zero occurrences (sometimes this would allow to save space, but sometimes this would require more space, like in the case of sparse information - see, e.g., [21]). We leave as an open research topic the question whether or not different descriptions allow improvements in space usage.

We will refer to this definition of space by binary space, and we will add a symbol B where appropriate, to distinguish between the definitions referring to this new measure and the definitions recalled in the previous section.

Definition 7

Consider a configuration \({\mathcal {C}}\) of a P system \(\varPi\). 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 \(|{\mathcal {C}}|_B\) of a configuration \({\mathcal {C}}\) is defined as:

$$\begin{aligned} |{\mathcal {C}}|_B = z \cdot \log |\varLambda | + \displaystyle \sum _{j=1}^{z}\sum _{i=1}^{n} \Bigl ( \lceil \log (|O_{i,j}|+1) \rceil + \log |\varGamma | \Bigr ) \end{aligned}$$

that is the number of membranes in the current membrane structure multiplied by \(\log |\varLambda |\), plus the number of bits required to store the description of the multiset in each region.

If \(\bf {{\mathcal {C}}}= ({\mathcal {C}}_0, \ldots , {\mathcal {C}}_k)\) is a computation of \(\varPi\), then the binary space required by \(\bf {{\mathcal {C}}}\) is defined as

$$\begin{aligned} |\bf {{\mathcal {C}}}|_B = \max \{ |{\mathcal {C}}_0|_B, \ldots , |{\mathcal {C}}_k|_B \}. \end{aligned}$$

The binary space required by \(\varPi\) itself is then obtained by computing the binary space required by all computations of \(\varPi\) and taking the supremum:

$$\begin{aligned} |\varPi |_B = \sup \{ |\bf {{\mathcal {C}}}|_B : \bf {{\mathcal {C}}}\text { is a computation of}~\varPi \}. \end{aligned}$$

Finally, let \(\varvec{\Pi }= \{ \varPi _x : x \in \varSigma ^\star \}\) be a family of recognizer P systems, and let \(s :{\mathbb {N}}\rightarrow {\mathbb {N}}\). We say that \(\varvec{\Pi }\) operates within binary space bound s if and only if \(|\varPi _x|_B \le s(|x|)\) for each \(x \in \varSigma ^\star\).

We can thus define space complexity classes considering this newly introduced size measure, like we did in the previous section. By \({\bf{MCBSPACE}}_{\mathcal {D}}(f(n))\) (resp. \({\bf{MCBSPACE}}^{*}_{\mathcal {D}}(f(n))\)) we denote the class of languages which can be decided by uniform (resp. semi–uniform) families, \(\varvec{\Pi }\), of confluent P systems of type \({\mathcal {D}},\) where each \(\varPi _x \in \varvec{\Pi }\) operates within space bound f(|x|), considering this new definition of binary space. Similarly, we can define the usual complexity classes like we did in the previous section, simply adding a B to underline the use of this new definition of space. For instance, the class of problems solvable by uniform (resp. semi–uniform) systems in polynomial binary space will be denoted by \(\bf{PMCBSPACE}_{\mathcal {D}}\) (resp. \(\bf{PMCBSPACE}^{*}_{\mathcal {D}}\)).

Once these notions have been defined, we are ready to state some results obtained by considering various complexity classes defined in terms of binary space. Just like it happens with the classes based on the original definition of space given in [29], some results follow immediately from the definitions (we denote a result that holds for both semi-uniform and uniform systems by \([\star ]\)):

Proposition 1

The following inclusions hold:

$$\begin{aligned} \bf{PMCBSPACE}^{[\star ]}_{\mathcal {D}}&\subseteq \bf{EXPMCBSPACE}^{[\star ]}_{\mathcal {D}}\\ \bf{NPMCBSPACE}^{[\star ]}_{\mathcal {D}}&\subseteq \bf{NEXPMCBSPACE}^{[\star ]}_{\mathcal {D}}. \end{aligned}$$

Proposition 2

\({\bf{MCBSPACE}}^{[\star ]}_{\mathcal {D}}(f) \subseteq \bf{NMCBSPACE}^{[\star ]}_{\mathcal {D}}(f)\) for each \(f :{\mathbb {N}}\rightarrow {\mathbb {N}}\), and in particular

$$\begin{aligned} \bf{PMCBSPACE}^{[\star ]}_{\mathcal {D}}&\subseteq \bf{NPMCBSPACE}^{[\star ]}_{\mathcal {D}}\\ \bf{EXPMCBSPACE}^{[\star ]}_{\mathcal {D}}&\subseteq \bf{NEXPMCBSPACE}^{[\star ]}_{\mathcal {D}}. \end{aligned}$$

The results describing closure properties and providing an upper bound for time requirements of P systems operating in bounded binary space are still valid, too:

Proposition 3

The complexity classes \(\bf{PMCBSPACE}^{[\star ]}_{\mathcal {D}}\), \(\bf{NPMCBSPACE}^{[\star ]}_{\mathcal {D}}\), \(\bf{EXPMCBSPACE}^{[\star ]}_{\mathcal {D}}\), and \(\bf{NEXPMCBSPACE}^{[\star ]}_{\mathcal {D}}\) are all closed under polynomial-time reductions.

Proof

Consider a language \(L \in \bf{PMCBSPACE}^\star _{\mathcal {D}}\) and let M be the Turing machine constructing the family \(\varvec{\Pi }\) that decides L. Let \(L'\) be reducible to L via a polynomial-time computable function f.

We can build a Turing machine \(M'\) working as follows: on input x of length n, \(M'\) computes f(x); then it behaves like M on input f(x), thus constructing \(\varPi _{f(x)}\) (we stress the fact that, for the corresponding result concerning the uniform case, the construction of the P system involves two Turing machines, both operating in polynomial time; in this case, we simulate the composition of the two machines). Since \(|f(x)|\) is bounded by a polynomial, \(M'\) operates in polynomial time and \(\varPi _{f(x)}\) in polynomial binary space; it follows that \(\varvec{\Pi }' = \{ \varPi _{f(x)} \mid x \in \varSigma ^\star \}\) is a polynomially semi-uniform family of P systems deciding \(L'\) in polynomial binary space. Thus \(L' \in \bf{PMCBSPACE}^\star _{\mathcal {D}}\).

The proofs for the three other classes and for the corresponding uniform classes are analogous. \(\square\)

Proposition 4

\({\bf{MCBSPACE}}^{[\star ]}_{\mathcal {D}}(f)\) is closed under complement for each function \(f :{\mathbb {N}}\rightarrow {\mathbb {N}}\).

Proof

By reversing the roles of objects \(yes\) and \(no\), the complement of a language can be decided. \(\square\)

Proposition 5

For each function \(f :{\mathbb {N}}\rightarrow {\mathbb {N}}\)

$$\begin{aligned} {\bf{MCBSPACE}}^{[\star ]}_{\mathcal {D}}(f(n))&\subseteq \bf{MC}^{[\star ]}_{\mathcal {D}}\big ( 2^{O(f(n)} \big ) \\ \bf{NMCBSPACE}^{[\star ]}_{\mathcal {D}}(f(n))&\subseteq \bf{NMC}^{[\star ]}_{\mathcal {D}}\big ( 2^{O(f(n)} \big ). \end{aligned}$$

Proof

Let \(L \in {\bf{MCBSPACE}}^\star _{\mathcal {D}}(f(n))\) be decided by the semi-uniform family \(\varvec{\Pi }\) of recognizer P systems in binary space f; let \(\varPi _x \in \varvec{\Pi }\) with \(|x| = n\) and let \({\mathcal {C}}\) be a configuration of \(\varPi _x\).

The configuration \({\mathcal {C}}\) is described by the membrane structure and the objects inside it. The information concerning objects is stored using bits, as described above. The membrane structure can be stored directly using a bracketed expression. For z membranes the binary space allocated requires \(z\times log(|\varLambda |)\) bits; even by adding a constant number of bits for each bracket corresponding to each membrane, the space required is \(O(z\times log(|\varLambda |))\). The binary space required by \(\varPi _x\) is then \(O \biggl ( z \cdot \log |\varLambda | + \displaystyle \sum _{j=1}^{z}\sum _{i=1}^{n} \Bigl ( \lceil \log (|O_{i,j}|+1) \rceil + \log |\varGamma | \Bigr ) \biggr ) = O (f(n))\).

Since \(\varPi _x\) is a recognizer P system, by definition every computation halts: then it must halt within \(2^{O(f(n))}\) steps in order to avoid repeating a configuration.

The same argument, with only some small differences, also works in the non-confluent case. All possible computations halt, even if not necessarily agreeing on the answer. Due to non-confluence, each computation can also contain repeated configurations. Nonetheless, for each computation containing a repeated configuration, there exists an equivalent one obtained by removing cycles in the computation path.

The proof for the uniform classes is analogous. \(\square\)

4 Comparison with standard computational complexity classes

In this section, we compare the standard computational complexity classes with the complexity classes defined in the framework of P systems working in binary space.

Most results are an immediate consequence of the results given in [29], simply considering that \({\bf{MCSPACE}}_{\mathcal {D}}(f(n)) \subseteq {\bf{MCBSPACE}}_{\mathcal {D}}(f(n))\).

Thus, recalling various results from [29], we have:

Proposition 6

Let us denote by \(\mathcal {EAM}\) and \({\mathcal {AM}}^0\) the classes of P systems with active membranes using only elementary membrane division and without polarizations, respectively. The following results hold:

$$\begin{gathered} {\mathbf{NP}} \cup {\mathbf{coNP}} \subseteq {\mathbf{EXPMCSPACE}}_{{{\mathcal{EAM}}}}^{{ \star }} \hfill \\ \subseteq {\mathbf{EXPMCBSPACE}}_{{{\mathcal{EAM}}}}^{{ \star}} \end{gathered}$$
$$\begin{gathered} {\mathbf{PSPACE}} \subseteq {\mathbf{EXPMCSPACE}}_{{{\mathcal{AM}}}}^{{ \star }} \hfill \\ \subseteq {\mathbf{EXPMCBSPACE}}_{{{\mathcal{AM}}}}^{{ \star}} \end{gathered}$$
$$\begin{gathered} {\mathbf{PSPACE}} \subseteq {\mathbf{EXPMCSPACE}}_{{{\mathcal{AM}}}} \hfill \\ \subseteq {\mathbf{EXPMCBSPACE }}_{{{\mathcal{AM}}}}^{{ \star}}\end{gathered}$$
$$\begin{gathered} {\mathbf{PSPACE}} \subseteq {\mathbf{EXPMCSPACE}}_{{{\mathcal{AM}}^0}} ^{[{ \star}]}\hfill \\ \subseteq {\mathbf{EXPMCBSPACE}}_{{{\mathcal{AM}}^0}}^{[{ \star}]}\end{gathered}$$

An interesting research topic concerns the classes for which the inclusion \({\bf{MCSPACE}}_{\mathcal {D}}(f(n)) \subseteq {\bf{MCBSPACE}}_{\mathcal {D}}(f(n))\) is proper and, considering the above inclusions, whether or not the same results can be obtained with stricter binary space classes, by exploiting the improved information storage related to objects with respect to the standard space definition.

By considering a constant amount of space, in the semiuniform case, the following result holds:

Theorem 7

\({\bf {P}}= {{\bf{MCSPACE}}}^\star _{{\mathcal {AM}}}(O(1)) = {{\bf{MCBSPACE}}}^\star _{{\mathcal {AM}}}(O(1))\).

Proof

The inclusion \({\bf {P}}\subseteq {{\bf{MCSPACE}}}^\star _{{\mathcal {AM}}}(O(1))\) follows immediately from the definition of semiuniform P systems. Consider a language L in \(\bf {P}\) and a string x; a deterministic Turing machine can create in polynomial time a P system having a single membrane and one single object \(yes\) or \(no\), directly answering the question whether or not \(x \in L\). The inclusion \({\bf{MCSPACE}}^\star _{\mathcal {AM}}(O(1)) \subseteq {\bf{MCBSPACE}}^\star _{\mathcal {AM}}(O(1))\) follows, as stated above, from the definition of binary space.

For the converse, we simply need to recall that a confluent semiuniform P system without membrane division can be simulated, in polynomial time, by a deterministic Turing machine, like it was shown in [40]. It is easy to see that the proof works both considering the standard space definition as well as the binary space definition for P systems. Even when the division of membranes is allowed, but the system can only use an amount of space that is limited to a constant, the total number of membranes is limited by a constant and, as a consequence, the total number of configurations is polynomially bounded. Hence, the same simulation is still valid. \(\square\)

It follows that, for semiuniform systems, when we allow only a constant amount of space, the improved storage allowed by binary space does not lead to improved efficiency.

Another interesting result concerning the standard definition of space in the framework of P systems was presented in [30], and it focuses on the type of resources used. In particular, a solution for the \(\bf {PSPACE}\)-complete problem Quantified \(\mathrm {3SAT}\) was given, for uniform systems using only communication rules (hence no evolution, membrane division and dissolution rules were used), thus proving the inclusion of \(\bf {PSPACE}\) in this class. Once again, since the definition of binary space allows a more efficient allocation of space, the result is still valid:

Proposition 8

Let us denote by \({{\mathcal {AM}}(\mathrm {-ev,+com,-dis,-div})}\) the class of P systems with active membranes using only communication rules (while rules for object evolution, dissolution, and division of membranes are not used). Then \(\bf {PSPACE}\subseteq \bf{PMCBSPACE}^{[\star ]}_{{\mathcal {AM}}(\mathrm {-ev,+com,-dis,-div})}\).

Once again, it would be interesting to understand whether or not the result remains valid for a smaller binary space class. In this case, the question can be answered negatively, by considering a result presented in [31]. In the article, it was shown that recognizer P systems with active membranes using polynomial space characterize the complexity class \(\bf {PSPACE}\). The result holds for both confluent and nonconfluent systems, and even in the case that non-elementary division is used. In particular, it was pointed out that such systems can be simulated by polynomial space Turing machines.

By considering the alternative definition for binary space, we can thus obtain the corresponding theorem:

Theorem 9

Let \(\varPi\) be a nonconfluent P system with active membranes, running in binary space S. Then, it can be simulated by a deterministic Turing machine in space \(O(S^2)\).

Proof

We simulate \(\varPi\) by means of a non-deterministic Turing machine N. The current configuration of \(\varPi\) can be stored explicitly by N: the membrane structure is represented directly by using a bracketed expression, while multisets of objects inside each region are stored by means of tuples of integers encoded in binary. Of course, the same considerations we made in the proof of Proposition 5 hold also in this case.

For the simulation, we can use the same algorithm as in [31]: the space required by N to store further information needed to carry on the simulation is then limited by S. It follows that the total amount of space required by N is of the same order as the one required by \(\varPi\), that is, O(S).

Using Savitch’s theorem [26], it is straightforward to see that N (and thus \(\varPi\)) can be simulated by a deterministic Turing machine in space \(O(S^2)\). \(\square\)

It follows immediately from this theorem, from the results in [31], and from Proposition 8:

Theorem 10

Let \({\mathcal {D}}\) be a class of P systems with active membranes using at least communication rules. Then

$$[{\bf {N}}]\bf{PMCBSPACE}_{\mathcal {D}}^{[\star ]} = [{\bf {N}}]\bf{PMCSPACE}_{\mathcal {D}}^{[\star ]} = \bf {PSPACE},$$

where \([{\bf {N}}]\) denotes optional nonconfluence, and \([\star ]\) optional semi-uniformity.

Hence, even when a polynomial amount of space is used, the complexity classes defined on the basis of the definition of binary space coincide with the complexity classes defined in terms of the original definition of space (for systems using at least communication rules).

In [3] it was shown that exponential space Turing machines can be simulated by polynomially uniform exponential-space P systems with active membranes. In view of this result and of Theorem 9, and of the definition of binary space, we have the following:

Theorem 11

The following equivalences hold for an exponential amount of space:

$${\bf {EXPSPACE}} = {\bf {EXPMCBSPACE}}_{{\mathcal {AM}}}={\bf {EXPMCBSPACE}}_{{\mathcal {AM}}}^\star = {\bf {NEXPMCBSPACE}}_{{\mathcal {AM}}}^\star . $$

Proof

The following inclusions hold by definition:

$${\bf {EXPMCBSPACE}}_{{\mathcal {AM}}}\subseteq {{\bf {EXPMCBSPACE}}_{{\mathcal {AM}}}^{\star }} \subseteq {{\bf {NEXPMCBSPACE}}_{{\mathcal {AM}}}^\star} .$$

For what concerns the inclusion \({{\bf {NEXPMCBSPACE}}_{{\mathcal {AM}}}^\star} \subseteq {\bf {EXPSPACE}}\), it is an immediate corollary of Theorem 9.

Finally, the inclusion of \({\bf EXPSPACE}\) in \({\bf {EXPMCSPACE}}_{{\mathcal {AM}}}\) is proved in [3, Theorem 8]. Recalling that \({\bf {EXPMCSPACE}}_{{\mathcal {AM}}}\subseteq {{\bf {EXPMCBSPACE}}}_{{\mathcal {AM}}}\), it follows \({\bf {EXPSPACE}}\subseteq {\bf {EXPMCBSPACE}}_{{\mathcal {AM}}}\). \(\square\)

Also in this case, considering binary space instead of the standard one does not result in improved efficiency. In fact, considering the theorem just proved and recalling [2, Corollary 1] proving the same results for classes with the original definition of space for P systems, we can prove that such classes are equal to \({\bf EXPSPACE}\):

Corollary 12

$${\bf {EXPSPACE}} = {\bf {EXPMCSPACE}}_{{\mathcal {AM}}}= {\bf {EXPMCSPACE}}_{{\mathcal {AM}}}^\star ={\bf {NEXPMCSPACE}}_{{\mathcal {AM}}}^\star = {\bf {EXPMCBSPACE}}_{{\mathcal {AM}}}= {\bf {EXPMCBSPACE}}_{{\mathcal {AM}}}^\star ={\bf {NEXPMCBSPACE}}_{{\mathcal {AM}}}^\star$$

.

5 Conclusions

We have proposed an alternative space complexity measure for P systems with active membranes, where the multiplicity of each object in each membrane is stored by using binary numbers. We have defined the corresponding complexity classes and we have compared some of them both with standard space complexity classes and with complexity classes defined in the framework of P systems considering the original definition of space [29].

It turned out that, for various considered systems, the computational classes defined on the basis of binary space do not differ from the corresponding classes defined on the basis of the original space definition for P systems. Among the various systems for which we proved such a result, we underline in particular that this is the case when we consider systems using all features of P systems with active membranes and a polynomial or exponential amount of space, as well as for semiuniform systems working in a constant space.

It would be interesting to find other classes for which the improved store efficiency obtained by considering binary space does not make any difference in computational efficiency, and to understand which features can be used/are necessary to obtain the same result. It also remains as an open problem to find, on the contrary, specific classes where this difference exists, thus proving that storing the information concerning objects in an efficient way can really be exploited in some cases. We conjecture, for instance, that this is the case for complexity classes defined by systems using a logarithmic amount of space.

Another possible research direction is to consider further variants of definition for space, and compare them with standard and binary space, or to consider the space required to describe the whole system executing the computation, that is including not only the data (object and membranes, in our case) but also the program (the rules, in our case).