A new method to simulate restricted variants of polarizationless P systems with active membranes

According to the P conjecture by Gh. Păun, polarizationless P systems with active membranes cannot solve NP\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbf {NP}}$$\end{document}-complete problems in polynomial time. The conjecture is proved only in special cases yet. In this paper we consider the case where only elementary membrane division and dissolution rules are used and the initial membrane structure consists of one elementary membrane besides the skin membrane. We give a new approach based on the concept of object division polynomials introduced in this paper to simulate certain computations of these P systems. Moreover, we show how to compute efficiently the result of these computations using these polynomials.


Introduction
P systems with active membranes, introduced in [23], are among the most investigated variants of P systems. Using the polarizations of the membranes and the possibility of dividing elementary (or even non-elementary) membranes these systems can solve computationally hard problems efficiently. More precisely, with elementary membrane division they can solve -complete problems [12,23,28,33], while with non-elementary membrane division they can solve even -complete problems in polynomial time [1,30]. Solving computationally hard problems with P systems with active membranes has a huge literature in Membrane Computing, see, e.g. [2,5,7,21,22,27,29,31], and the references therein.
It is also widely investigated how certain restrictions on P systems with active membrane affect the computation power of these systems (see for example [6,8,9,11,13,14,16,17,19,20,25]). Probably, the most investigated question in this research line is whether these P systems are still powerful enough to solve hard problems in polynomial time when the polarizations of the membranes are not used. In the case when non-elementary membrane division is allowed the answer to this question is positive since in [3] the -complete QSAT problem was solved in polynomial time without polarizations. On the other hand, no polynomial-time solutions for hard problems exist when neither polarization nor non-elementary membrane division is allowed. In fact, Gh. Păun conjectured already in 2005 that without polarization and non-elementary membrane division P systems with active membranes cannot solve -complete problems in polynomial time [24]. Păun's conjecture, often called the P conjecture, has not been proven yet although there are some partial solutions for it (see, e.g. [10,15,18,32]). A direct attempt to calculate efficiently all the elementary membranes of a computation of a P system with active membranes fails as in general, the number of these membranes can grow exponentially and, moreover, these membranes can contain pairwise different multisets. However, it was discovered in [10] that if dissolution rules are not allowed to use, then there is no need to simulate all the elementary membranes to determine the result of a computation. Instead, it is enough to consider a certain graph, called the dependency graph [4] of the P system. Roughly, this graph describes how the rules of the P system can evolve and move objects through the membranes. To determine the result of a computation in this case it is enough to check whether a distinguished object is reachable from certain objects in the dependency graph. Using dependency graphs it was shown in [10] that polarizationless P systems with active membranes using no dissolution rules and working in polynomial time can solve only problems in .
If dissolution rules are also allowed, then things become much more complicated. Consider a P system with active membranes and assume, for example, that contains a membrane sub-structure [[a b] 2 ] 1 . Assume moreover that a can dissolve membrane 2 but b cannot. Then dissolves membrane 2 using a and b releases to membrane 1 without directly being involved in any application of a rule. Notice that in this case b immediately "knows" that contained an occurrence of a in the membrane with label 2. This way the objects can send information to each other, and this kind of behaviour cannot be captured by dependency graphs.
Using generalizations of dependency graphs the P conjecture was already proved in some special cases where the P systems were allowed to use dissolution rules as well. In [32], for example, the P conjecture was proved using object division graphs in the case where the initial membrane structure of the P system is a linearly nested sequence of membranes and the system can employ only dissolution and elementary membrane division rules. In [15] the P conjecture was proved in another case using a generalization of dependency graphs. Here the P systems are deterministic, can use all types of rules except send-in communication rules, and the membrane structure is such that the skin contains only elementary membranes. In these papers the authors used these generalizations of dependency graphs to simulate a reasonable small part of the configurations in a computation of the investigated P systems.
In this paper we propose a new method to address Păun's conjecture. With this method we are able to simulate efficiently an entire computation of a P system. More precisely, we can compute in polynomial time the multiset content of the skin membrane at the end of certain computations of a P system. To make our ideas as clear as possible, we give our method only for a rather restricted variant of P systems, called halting simple divide-dissolve P systems. The computations of these P systems always terminate, initially they have only one elementary membrane in the skin, and they can employ only membrane division and membrane dissolution rules (see Definition 1 for further properties of these P systems). Moreover, we simulate only particular computations of these P systems, where, for example, division rules have priority over dissolution rules. We will call these computations division-driven computations (see Definition 2 for further details).
Our approach can be roughly described as follows. Consider a halting simple divide-dissolve P system , its input multiset 1 , and a division-driven computation C of . First, based on the concept of object division graphs, we define object division polynomials (Definition 3). The object division polynomial of an object a describes which and how many objects can be created from a using only division rules of . Then, we consider a polynomial P 1 which is, roughly, the multiplication of the object division polynomials of objects in 1 (Definition 5). After that, we show that there is a strong relationship between the monomials of P 1 and the numbers of certain membranes and their contents in C (Lemma 3). Then, using P 1 , we show how to calculate in polynomial time which and how many objects are released to the skin membrane in each step of C (Theorem 1). Using this we conclude that the multiset content of the skin membrane in the last configuration of C can be computed in polynomial time (Corollary 1).
We believe that our method can be extended to more general variants of P systems. In particular, a generalization to P systems having also send-out communication rules and a more general initial membrane structure seems to be achievable as it is discussed in the Conclusions section.

Preliminaries
Here we recall the necessary notions used later. Nevertheless, we assume that the reader is familiar with the basic concepts of membrane computing techniques (for a comprehensive guide see, e.g. [26]).
ℕ denotes the set of natural numbers including zero and, for every i, j ∈ ℕ , i ≤ j , [i, j] denotes the set {i, … , j} . If i = 1 , then [i, j] is denoted by [j]. We will use polynomials with coefficients in ℕ . A polynomial of the form p = cx where c, n, j 1 , … , j n ∈ ℕ and x 1 , … , x n are variables is called a monomial and c is called the coefficient of p. An n × m matrix has n rows and m columns. We will consider matrices with entries in ℕ . ( ) ij denotes the jth element of the ith row of . By a vector we mean an n × 1 matrix, for some n ≥ 1 . T denotes the transpose of , and instead of ( ) j1 and ( T ) 1j (j ∈ [n]) we will write simply ( ) j and ( T ) j , respectively. If a vector has n entries, for some n ≥ 1 , then is called an n-dimensional vector or just an n-vector. Next, we define a variant of polarizationless P systems with active membranes.
Definition 1 A simple divide-dissolve P system (sdd P system, for short) is a polarizationless P system with active membranes having the following properties.  1 ] s is the initial membrane structure containing two membranes labelled with 1 and s, respectively, s being the skin membrane, • 1 ∈ O * is the initial multiset of objects placed in the membrane with label 1 (initially, the skin membrane is empty), and • R is a finite set of rules defined as follows: (membrane dissolution rules; in reaction with an object, a membrane can be dissolved, the objects of a dissolved membrane remain in the region surrounding it) and (division rules for elementary membranes; in reaction with an object, the membrane is divided into two membranes with the same label; the object specified in the rule is replaced in the two new membranes by possibly new objects; all other objects are duplicated in the two new copies of the membrane).
Moreover, for every a ∈ O , R has at most one division rule of the form As it is usual in membrane computing, sdd P systems work in a maximally parallel manner: at each step the system first nondeterministically assigns appropriate rules to the objects of the system such that the assigned multiset S of rules satisfies the following properties: (i) at most one rule from S is assigned to any object of the system, (ii) a membrane can be the subject of at most one rule in S, and (iii) S is maximal among the multisets of rules satisfying (i) and (ii). 1 , R) be a halting sdd P system. For any rule r of the form u → v , u (resp. v) is called the left-hand side (resp. the right-hand side) of r. We call membranes with label 1 working membranes (notice that as the skin cannot be divided or dissolved, the objects in the skin remain unchanged during all computations of , that is, only objects in working membranes can be changed).

Results
In this paper we consider only halting sdd P systems. In the rest of this section is always a halting sdd P system of the form In this section we show that the multiset content of the skin membrane of at the end of so-called divisiondriven computations can be computed in polynomial time in nm. In a division-driven computation division rules have priority over dissolution rules and there is a certain order between the division rules too. To specify these computations precisely we need some preparation.
Consider a halting computation C ∶ C 0 ⇒ C 1 ⇒ ⋯ ⇒ C t of . We first assign to each occurrence of an object occurring in a working membrane a label defined inductively as follows. The label of an object , and consider an occurrence of an object a in M with label ( ∈ [m]) . Then we have exactly one of the following three cases: (i) this occurrence of a is not involved in the application of any rule, or (ii) it is involved in the application of a division rule r In Case (i) the same occurrence of a occurs in C i+1 too. Then let the label of this occurrence of a in C i+1 be . In Case (ii) r divides M into two new membranes in C i+1 . Then let the label of the occurrences of b and c introduced by r in these two new membranes be . In Case (iii) no objects are introduced in the working membranes by the considered occurrence of a, thus no labelling is necessary in this case. If a is an object with label , then we will often denote this by a ( ) .
Notice that the multiset content of a working membrane in C always has the form a (1) . Using the labels of the objects we can define now division-driven computations as follows.

Definition 2 Let
be a halting sdd P system with object alphabet O = {a 1 , … , a n } and initial multiset 1 = a i 1 … a i m . A halting computation C of is called division-driven if the following conditions hold.
1. If can apply both division and dissolution rules to a membrane in C , then applies a division rule, and 2. when a division rule is applied to a membrane M in C with an object a ( ) Intuitively, in a division-driven computation C of the computation goes as follows. Assume that the labels of those objects in 1 that can divide working membranes are 1 < ⋯ < k , for some k ∈ [m] . Then first objects with label 1 are used to divide working membranes, then those objects which have label 2 , and so on until at the end those objects are used which have label k . Then those objects are used which can dissolve working membranes, and if no more working membranes can be dissolved, the computation terminates. Notice that if a non-divider object with label occurs in a working membrane, then this object remains unchanged until the computation halts. Figure 1 shows a division-driven computation of ex . Recall that the numbers in parentheses are the labels of the corresponding objects. Notice that each working membrane contains two objects with label 1 and 2, respectively. One can see that this computation is indeed a division-driven one. In the first step, a (1) 1 is used to divide the working membrane. Then, in the second step the upper working membrane is divided by a (1) 2 and the other working membrane is divided by a (2) 1 (no dividers with label 1 are present in this membrane). In the third step, the upper two working membranes are divided by a (2) 1 , the working membrane containing a (1) 3 a (2) 2 is divided by a (2) 2 , and the remaining working membrane is unchanged. Then, the computation continues according to the definition of division-driven computations: dividers have priority over dissolvers and dividers (resp. dissolvers) with label 1 have priority over dividers (resp. dissolvers) with label 2. ◻ As it is mentioned in the introduction, our work is based on the concept of object division polynomials. To define this concept precisely we first define object division trees similarly as object division graphs were defined, for example, in [32]. Let be a halting sdd P system with object alphabet O = {a 1 , … , a n } . The object division tree of a i ( i ∈ [n] ), denoted by odt a i , is the smallest binary tree satisfying the following conditions: ) is a rule of , then N has exactly two children with labels a k and a l , respectively.
Since is an sdd P system, it does not have different division rules with the same left-hand side. Thus odt a i is well defined. Notice that in odt a i a subtree with a root labelled by an object a j (j ∈ [n]) is equal to odt a j . The height of odt a i , denoted by h(odt a i ) , is defined inductively as follows. If odt a i is a single node labelled by a i , then h(odt a i ) = 0 . Otherwise let h max be the maximum of the heights of subtrees of the root in odt a i . Then h(odt a i ) = h max + 1.

Example 2
Consider again ex from Example 1. The tree odt a 1 can be seen in Fig. 2. Notice that odt a 2 and odt a 3 are equal to the first and second subtrees of odt a 1 , respectively, and odt a 4 is equal, for example, to the first subtree of odt a 2 . ◻ Next we show a useful property of object division trees.

Lemma 1
Let be a halting sdd P system with object alphabet O = {a 1 , … , a n } and initial multiset 1 . Let i ∈ [n] such that a i occurs in 1 . Then h(odt a i ) < n. Proof We give an indirect proof. Assume that h(odt a i ) ≥ n . Then there exists a path P in odt a i with length at least n. Due to the pigeonhole principle, there exists j ∈ [n] such that a j occurs at least twice in P. Let N 1 and N 2 be the first two nodes of P (counted from the root) labelled by a j . Let t 1 and t 2 be the subtrees of odt a i with roots N 1 and N 2 , respectively. Clearly, t 2 is a proper subtree of t 1 . Moreover, by our above note t 1 = t 2 = odt a j . This implies that odt a i is infinite, which further implies that a division-driven computation will never halt. However, this contradicts to the fact that is a halting sdd P system, proving our statement. ◻ Every object division tree defines an object division polynomial as follows. where m jk is the number of leaves in odt a i at depth j labelled by a k .

Example 3
Consider ex from Example 1 and the object division trees considered in Example 2. The corresponding object division polynomials are as follows: Proof Let l = h(odt a i ) and, for every j ∈ [0, l] , let j be an n-vector such that ( j ) k (k ∈ [n]) is the number of nodes labelled by a k on the j th level of odt a i . Let ndiv = {j ∈ [n] | a j is a non-divider} . As the set of labels of leaves in odt a i is included in the set {a j | j ∈ ndiv} , we get that where k (k ∈ [n]) is an n-vector defined as follows: To compute j (j ∈ [0, l]) let us define, for every k ∈ [n] , the n-vector k as follows: for every ∈ [n] , if there is a rule r of with a on the left-and a k on the right-hand side, then let ( k ) be the number of occurrences of a k on the righthand side of r. If there is no such rule of , then let ( k ) be 0. It can be clearly seen that if we multiply T , we get the number of occurrences of a k on the (j + 1) th level of odt a i . Thus, for every where is the n × n matrix whose kth column (k ∈ [n]) is k . Since matrix multiplication is associative, we get that T j = T 0 j (j ∈ [l]) . This implies that Notice that since the 0th level of odt a i contains only the root of odt a i , ( 0 ) k = 1 if k = i , and ( 0 ) k = 0 otherwise. Therefore, the coefficient of a factor x k x j in odp a i is ( j ) ik . Thus, we only have to compute j for every j ∈ [0, l] . Since every row in contains at most two non-zero elements and the sum of these elements is two, it is easy to see that the largest value in j is at most 2 j . So these values can be stored using n bits and thus computing one entry of j+1 can be done in O(n) steps. Since is an n × n matrix, computing every necessary value can be done in polynomial time in n. ◻

Example 4
Consider odp a 1 and odp a 2 given in Example 3. According to the proof of Lemma 2, we can compute these polynomials as follows. We will use i (i ∈ [4]) and j (j ∈ [0, 2]) in the computation of each polynomial. These have the following values:   be a halting sdd P system with object alphabet O = {a 1 , … , a n } and initial multiset 1 = a i 1 … a i m . Consider a division-driven computation C ∶ C 0 ⇒ C 1 ⇒ ⋯ ⇒ C t of . First we specify certain working membranes of C , then show how to use object division polynomials to calculate the multiset contents of these working membranes.  [4] [0 0 0 2] k x k x 2 = (0x 1 + 0x 2 + 0x 3 + 0x 4 ) 1],k∈ [4] T 0 j k x k x j = ∑ k∈ [4] [0 1 0 0] k x k + ∑ k∈ [4] [0 0 0 2] k x k x = (0x 1 + 0x 2 + 0x 3 + 0x 4 ) Let M be a working membrane in C and ∈ [m] . If M contains no dividers with label ′ ≤ , then M is called -divider-stable. Moreover, m-divider-stable working membranes are called non-dividing. Consider an -divider-stable membrane M in C i ( ∈ [m], i ∈ [t]) . M is called primary if either i = 0 or the following holds. Let N be that membrane in C i−1 from which derives M. Then N is not -divider-stable.
Example 5 Let ex be the P system given in Example 1 and consider the working membrane M containing a (1) 3 a (2) 2 in C 2 . Then M is 1-divider-stable, as the only object in M having label 1 or less is a 3 which is a non-divider. However, this M is not 2-divider-stable, since it contains a 2 having label 2 and a 2 is a divider. M is neither primary, as M is derived from the working membrane N in C 1 containing a (1) 3 a (2) 1 , but N is 1-divider-stable too. However, N is primary, since it is derived from the working membrane in C 0 containing a (1) 1 a (2) 2 , which is not 1-divider-stable. The only working membrane in C 5 is non-dividing, as it is 2-divider-stable, and 2 is the greatest label in this example. Notice that non-dividing working membranes are those which do not contain dividers. ◻ Let C be a division-driven computation of . To calculate the multiset contents of primary non-dividing working membranes of C , we extend first the definition of object division polynomials to objects having labels.  [n] m jk x k x j (that is, we added to the indices of certain variables of odp a i , referring this way to the label of the corresponding object).
Next we define a product of labelled object division polynomials of objects in 1 .

Definition 5 Let
be a halting sdd P system with object alphabet O = {a 1 , … , a n } and initial multiset 1 = a i 1 … a i m . The 1 -product of is It is easy to see that all monomials in P 1 have the form x 1j 1 … x mj m x j , for some , j ∈ ℕ and j 1 , … , j m ∈ [n] . Using the next lemma we can determine the multiset contents of primary non-dividing working membranes of the computation C by calculating the monomials of P

Lemma 3
Let be a halting sdd P system with object alphabet O = {a 1 , … , a n } and initial multiset 1 = a i 1 … a i m . Consider the 1 -product P 1 and a division-driven computation and j ∈ [0, t] . Then the coefficient of x 1j 1 … x mj m x j in P 1 equals to the number of those primary non-dividing working membranes in C j which contain a (1) Proof We show the statement by induction on m. If m = 1 , then P 1 = lodp a (1) i 1 . Then, by Definitions 3 and 4, P 1 contains a monomial m jk x 1k x j if and only if the number of leaves in odt a 1 at depth j labelled by a k is m jk . Thus, the number of those non-dividing working membranes in C j which contain a (1) k equals to the coefficient of x 1k x j in P 1 . Then the statement follows taking into consideration that every non-dividing working membrane in C is primary. Now assume that the statement holds if m = m � , for some m ′ ≥ 1 . We show it for m = m � + 1 . Let be the coefficient of a monomial x 1j 1 … x mj m x j in P 1 . Let moreover ̂ be the number of those primary m-divider-stable working membranes in C j which contain a (1) respectively. One can see that can be calculated by summing up the products j ′ j ′′ , for every j � , j �� ∈ [t] with j � + j �� = j.
On the other hand, let j � , j �� ∈ [t] and denote ̂j′ the number of those primary m ′ -divider-stable working membranes in C j ′ which contain a (1) j m � . Denote, moreover, ̂j ′′ the number of leaves labelled by a j m in odt a i m at depth j ′′ . Consider now a membrane M in C j containing a (1) One can see that the only way for to create M is the following. First creates a membrane N containing a (1) ) using only dividers having labels m ′ or less. Then, using dividers with label m, creates M in j �� = j − j � steps. Thus ̂ can be calculated by summing up the products ̂j′̂j′′ , for every j � , j �� ∈ [t] with j � + j �� = j.
By induction hypothesis, j � =̂j� , for every j � ∈ [t] . Moreover, by the definition of object division polynomials, j �� =̂j�� , for every j �� ∈ [t] . Thus we have that which finishes the proof of the lemma. ◻ We show now through an example how to use the 1 -product P 1 to calculate multiset contents of primary nondividing working membranes.

Example 6
Consider ex from Example 1 and the computation C given in Fig. 1. From Example 3 we know that we get that Figure 3 shows the correspondence between the monomials of P a (1) 1 a (2) 1 and the primary non-dividing working membranes of C . Notice that the variables x ij (i ∈ [2], j ∈ [4]) correspond to objects a (i) j , the coefficient of a monomial corresponds to the number of the corresponding membranes, and the power of x shows the index of the corresponding configuration. ◻ Consider a halting sdd , the 1 -product P 1 of , and a division-driven computation C of . As we have seen, the multiset content of the primary non-dividing working membranes of C can be calculated by determining the monomials of P 1 . Clearly, if we know these multisets, then we can tell which and how many objects are released to the skin (by applying membrane dissolution rules) in each step of C . However, the size of P 1 can be exponential in nm, which

Fig. 3
Representing primary non-dividing working membranes of ex by monomials means that we cannot use P 1 directly to calculate efficiently the number of these objects. Instead, we will use another polynomial yielded by using the next definition.

Definition 6
Consider a halting sdd P system with object alphabet O = {a 1 , … , a n } and initial multiset 1 = a i 1 … a i m . Let P be a polynomial over the variables and y be a new variable not occurring in V. The i-reduction of P is the polynomial P ⟨i⟩ which we get from P using the following operations. First, for every ∈ [m], k ∈ [n] with k ≠ i , we substitute x k in P with z, where Let the given new polynomial be P ′ and let P ⟨i⟩ be the polynomial created from P ′ by substituting x i with x i , for every ∈ [m].

Example 7 The i-reductions
given in Example 6 are as follows: Lemma 4 Let be a halting sdd P system with object alphabet O = {a 1 , … , a n } and initial multiset 1 = a i 1 … a i m . Consider the 1 -product P 1 of . Let moreover i ∈ [n] . Then the i-reduction of P 1 can be calculated in polynomial time in nm.
Proof One can see using basic properties of polynomials that where P odp ⟨i⟩ a i , Using the i-reduction of P 1 we can compute which and how many objects are released to the skin membrane during a division-driven computation of as follows.

Theorem 1 Let
be a halting sdd P system with object alphabet O = {a 1 , … , a n } and initial multi- . Let moreover i ∈ [n], j ∈ [0, t − 1] and denote N ij the number of copies of a i released to the skin membrane by dissolutions of elementary membranes during the step C j ⇒ C j+1 . Then N ij can be computed in polynomial time in nm.
Proof Let P 1 be the 1 -product of and P ⟨i⟩ 1 be the i-reduction of P 1 . Clearly, P ⟨i⟩ 1 can be written in the form Using Lemma 3 and the definition of i-reductions, we get the following. A monomial m j x i y x j in P ⟨i⟩ 1 represents that there are m j primary m-divider-stable membranes in C j containing copies of a i and copies of such objects different from a i which can dissolve the membrane. Distinguishing between the cases whether a i is a dissolver or not, we get the following equations.
if a i is a non-dissolver, and otherwise. As we have seen in Lemma 4, P We show that these values can be calculated using the i-reductions given in Example 7 and the equations (1) and (2) given in the proof of Theorem 1. If i ∈ [2] , then a i is a (1) Corollary 1 Let be a halting sdd P system with object alphabet O = {a 1 , … , a n } and initial multiset

Conclusions
In this paper we proposed a polynomial-time method for calculating the number of each object occurring in the skin membrane at the end of a division-driven computation of a halting sdd P system . To calculate these numbers we used multiplications of certain polynomials which were created from the object division polynomials of the objects initially contained in the working membrane of . Although our method considers only division-driven computations of halting sdd P systems, we can use it to simulate recognizer P systems too. Recognizer P systems [28] are common tools in membrane computing to solve decision problems with P systems. They have only halting computations and they are confluent, which means that all of their computations yield the same result. That is, a division-driven computation gives the same result as that of the other computations.
By definition, sdd P systems have no different rules with the same left-hand side. In fact, we can safely assume that a recognizer P system having only dissolution and division rules possesses this property, too. To see this consider such a recognizer P system . If has two different rules r 1 and r 2 with the same left-hand side, then there is a computation of where in each situation when r 2 is applicable, applies r 1 instead (clearly, if r 2 is applicable, then r 1 should be applicable, too). That is, if we remove r 2 from , then the remaining part of will still compute the same result as before.
Concerning the future work, we would like to extend our method to P systems having other types of rules or different initial membrane structures. The method can easily be extended to the case when the dissolution rules can have arbitrary objects in their right-hand sides. Indeed, in this case we only need to change the calculation of the value N ij in the proof of Theorem 1 accordingly.
It seems that we can extend our method to send-out communication rules too. To this end, we need to extend the definition of division-driven computations, for example such that send-out communication rules have less priority than that of dissolution rules. Moreover, in the calculation of N ij in the proof of Theorem 1 we should add a case where a i is a non-dissolver but can trigger a send-out communication rule. Notice that a working membrane can contain more than one occurrence of such an object a which can trigger sendout communication rules. However, during one step only one a can be used by a rule. Therefore, in the computation of N ij we might need to consider such monomials too which contain x j ′ , for some j ′ < j.
Moreover, our method seems to be suitable for generalisation to such P systems which initially have more than one working membranes (possibly with different labels). On the other hand, to extend it to such P systems where the initial membrane structure is deeper than one is not so trivial. Consider for example a P system having an initial membrane structure of the form [… [ [ ] 1 ] 2 …] n , where n ≥ 3 and n is the skin. Assume also that the other properties of correspond to those of the sdd P systems. Since membranes with label i > 1 cannot be divided until membranes with label 1 are present, we could use our method to calculate the number of objects in the regions of until the last membrane with label 1 is dissolved. Assume that at this point the elementary membrane has label i, for some i ∈ [2, n] . We can use our method again to calculate the number of objects in the regions of until the last membrane with label i is dissolved. Continuing this way the application of our method, we can calculate the number of objects occurring in the skin membrane when the computation of halts. However, we cannot assume that the above-described computation is efficient because of the following reasons. Consider that point of the computation when the last membrane with label 1 is dissolved and the new elementary membrane is the one with label i. Then this membrane can contain exponentially many objects, which means that to apply our method we should multiply exponentially many polynomials. Nevertheless, it is more or less clear that if works in polynomial time, then only a polynomially large number of these objects are used by during the computation. This means that we can apply our method taking into consideration only a polynomially large number of objects.