Time-Free Solution to Hamilton Path Problems Using P Systems with d-Division

P systems with d-division are a particular class of distributed and parallel computing models investigated in membrane computing, which are inspired from the budding behavior of Baker’s yeast (a cell can generate several cells in one reproducing cycle). In previous works, such systems can theoretically generate exponential working space in linear time and thus provide a way to solve computational hard problems in polynomial time by a space-time tradeoff, where the precise execution time of each evolution rule, one time unit, plays a crucial role. However, the restriction that each rule has a precise same execution time does not coincide with the biological fact, since the execution time of biochemical reactions can vary because of external uncontrollable conditions. In this work, we consider timed P systems with d-division by adding a time mapping to the rules to specify the execution time for each rule, as well as the efficiency of the systems. As a result, a time-free solution to Hamiltonian path problem (HPP) is obtained by a family of such systems (constructed in a uniformway), that is, the execution time of the rules (specified by different timemappings) has no influence on the correctness of the solution.


Introduction
Membrane computing, introduced in [1], is one of the recent branches of natural computing.The computing systems investigated in membrane computing are distributed and parallel computing devices, usually called P systems.The aim is to abstract computing concepts and ideas (i.e., models, data structures, data manipulation operations, operation control modes, etc.) from the structure and the functioning of living cells, considered both individually and as part of complexes, such as tissues and organs like the brain.There are two main classes of P systems investigated: cell-like P systems [1] and tissue-like P systems [2].In the cell-like P systems, the membrane structure graphically represented by a tree and in tissue-like P systems, the membrane structure is a general graph.In tissue-like P systems, we can find tissue P systems, neural P systems, and numerical P systems.Such three models have different alphabets, rules, and semantics, but all three keep the same membrane structure [3].During the past years, many variants of P systems have been developed and proved to be universal (do what Turing machine can do) [4][5][6], and a particular class of P systems with cell reproduction properties (such as P systems with active membranes [7], tissue P systems with cell division [8], and spiking neural P systems with budding [5]) that can theoretically generate exponential working space in linear time have been used to solve computational hard problems in polynomial (even in linear) time [8][9][10].An introduction to the area of membrane computing can be found in [7], while an overview of this field can be found in [3,11], with up-to-date information available at the membrane computing website [12].In the present work, we deal with a variant of cell-like P systems with active membranes, called P systems with -division, which was inspired from the budding behavior of Baker's yeast (a cell can generate several new cells in a reproducing cycle) [7].
Briefly, a P system with -division consists of a hierarchical membrane structure, a number of objects and evolution rules.In every membrane, objects (represented by multisets over a given alphabet) and evolution rules are present, where objects correspond to the chemical compounds that exist inside the cells, and the evolution rules correspond to the chemical reactions taking place in the cells.By using the evolution rules, objects can evolve to other objects, and the membrane structure can change.The membranes can also have an electrical charge, positive (+), negative (−), or neutral (0).A global clock is assumed to mark the time for the system.In each instant, if a rule is applicable over objects existing inside a membrane, the rule must be applied on the tick of the clock.If more than one rule is applicable at certain moment, one of these rules is nondeterministically chosen to use.Each cell in the systems works in a sequential way; in each time unit only one evolution can be used, but; for different cells, they work in a synchronous way.The configuration of the systems at a given instant of time is described by both the membrane structure and the multisets of objects present in each membrane.The systems can proceed from one configuration to another by applying evolution rules (it is said that a transition takes place from one configuration to the next one), which takes exactly one time unit.A sequence of transitions between configurations define a computation.A computation halts if it reaches a configuration where no rule can be applied in any membrane.In this case, the result of the computation can be interpreted as the number of objects inside a specified output membrane.P systems with -division ( ≥ 2) can theoretically generate exponential working space in linear time and thus provide a way to solve computational hard problems in polynomial time by a time-space tradeoff, where the precise execution time of each evolution rule (one time unit) plays a crucial role [7].
In [8], inspired by the mitosis function of living cells, tissue P systems with cell division were proposed.The system can generate working space (cells) by using cell division rules and thus can generate exponential working space in linear steps.The newly generated working space provides a rich source for computation, particular for solving computational hard problems.In [8], tissue P systems with cell division can solve SAT problem in a polynomial time.
In [7,12], many variants of P systems with different strategies of generating working space have been reported, such as P systems with cell separation and SN P systems with budding.These systems can expand working space (by generating new cells or neurons) during the computation and thus can be used to solve computation hard problems in feasible (polynomial or even linear) time.
In the results, the time cost of a computation is obtained by counting the steps used in the computation to solve the problem.In the systems, a global clock is assumed to mark the time of the systems, and there is a restriction that each biological operation should be completed in exactly one time unit, even for different operations.In P systems, each operation usually corresponds to a particular biochemical reaction, so it is not natural to impose that different operation should cost the same time.
However, programming living things cannot assume neither general restrictions on execution time nor the presence of global clocks synchronizing the execution of different parallel processes.Moreover, the time of execution of certain biological processes could vary because of external uncontrollable conditions.Therefore, it seems crucial to investigate P systems when such timing assumption is not used.
In this work, we consider P systems with -division without the time assumption, which is achieved by adding a time mapping to specify the execution time of all the rules in the systems.The obtained systems are close to the biological fact, and their computational properties, particularly in computational efficiency, need to be investigated.The systems with -division are considered by adding a time mapping to the rules to specify the execution time of each rule.The obtained systems are called timed tissue P systems with -division.Particularly interesting are time-free P systems with -division where, given an arbitrary time mapping for a system, results computed by the system are always the same, independent of the assigned time mapping.Following this line of work, finding solutions for hard computational problems by means of time-free systems was explored in [13] from a theoretical point of view.In this paper, we prove (in a constructive way) that we can solve NP-complete problems by means of time-free P systems with -division.Specifically, a family of time-free P systems with -division, constructed in a uniform way, capable of solving HPP problem are presented.

Preliminaries
In what follows some required concepts of formal language theory are presented as the necessary background for the topics covered in subsequent sections of this paper.Readers needing additional background can refer to works such as [14].
For an alphabet ,  * denotes the set of all finite strings of symbols from , while the empty string is denoted by , and the set of all nonempty strings over  is denoted by  + .
By N we denote the set of nonpositive integers.Let  be arbitrary set.A multiset (over ) is a mapping  :  → N. The multiplicity of  in the multiset  can be denoted by () with any  ∈ .It can be expressed by the pair (, ()).If the set  = { 1 ,  2 , . . .,   } is finite, a multiset  over , represented by the set of mappings {( 1 , ( 1 )), ( 2 , ( 2 )), . . ., (  , (  ))} can also be represented by a string  = or by any of its permutations.
In what concern to the rest of this paper, we will not distinguish between the representation of multiset in mapping form or string form.

Time-Free Solutions to Decision Problems by Means of P Systems with 𝑑-Division
It is started by briefly recalling the formal definition of P systems with -division introduced in [7], and then a timed extension of such systems is reviewed, followed by a description of time-free P systems with -division.Finally, some notions of time-free solutions to decision problems by means of such systems are discussed.

P Systems with 𝑑-Division. A P system with 𝑑-division
(i)  ≥ 1 is the initial number of membranes of the system; (ii)  is the alphabet of objects; (iii)  is a finite set of labels for membranes; (iv)  is the initial membrane structure, consisting of  membranes; membranes are labelled (not necessarily in an injective way) with elements of  and are electrically polarized, being possible charge positive (+), negative (−), or neutral (0); (v)  1 , . . .,   are strings over , describing the initial multisets of objects placed in the  regions of ; (vi)  is a finite set of evolution rules, of the following types: Rules of type (a) are objects evolution rules, whose application is controlled by both the label and the charge of the membranes.Rules of type (b) and (c) are communication rules, by which an object can be sent into or out of the membrane.The objects can be possibly modified during this process, as well as the polarization of the membrane can be changed, but not its label.The dissolving rules are of type (d), by which a membrane can be dissolved, while the object specified in the rule can be modified.The division rules for elementary membranes are of type (e).In reaction with an object, the elementary membrane can be divided into  membranes with the same labels, possibly of different polarizations; the object specified in the rule is replaced by some newly generated objects in the newly membranes.As shown in rules of type (f), if a membrane contains other membranes that have charges + or − but have globally neutral charge, these membranes with same charges can be be separated into two new membranes.The previous rules can be considered as "standard" rules; two possible extensions for rules of type (e) can be also considered: By rules of type (e  ), the membranes produced by division possibly have different labels with the divided membrane, and the polarizations of the new membranes can be different from the polarization of the initial one.Division rules (e  ) allow the division of nonelementary membranes, where all membranes from the initial membranes will be replicated and will appear in the new copies of this membrane.
In each time unit (a global clock is assumed, marking the time for the whole system), the selected rules to be executed in each cell are applied on the tick of the clock, taking exactly one time unit to complete their execution.In a given time, if an object can evolve by more than one rules, only one of the rules is nondeterministically selected.All objects and membranes not specified in any executed rule remain unchanged.
If a membrane is dissolved, all the objects contained in the region delimited by such membrane are left free in the surrounding region.If in a given computation step a membrane is divided and there are objects in this membrane which can evolve, it is assumed that evolution of objects takes place first; thus, the evolved objects will be present in the divided membranes.Objects that do not evolve are replicated.Thus, rules are applied "bottom-up"; that is, rules in the innermost membrane are applied first and, subsequently, level by level up to the region of the skin membrane.The skin membrane can never divide, but it can be "electrically charged." Note that every cell in the systems works in a sequential way, in each time unit only one evolution can be used, but, for different cells, they work in a synchronous way.
The configuration of the system at a given time unit is described by both the membrane structure and the multisets of objects present in each cell.By applying the rules specified above, one can define a transition between configurations.A sequence of transitions starting from the initial configuration are called a computation.A computation halts if it reaches a configuration such that no rules can be applied in any membrane.During a computation, objects can leave the skin membrane and pass to the environment.The result of a halting computation is defined as the number of objects that are sent out of the system during the computation.A nonhalting computation provides no result.

Timed and
and a mapping  :  → N, it is said that is a timed P system with -division such that  :  → N specifies the execution time of each rule of the system.A timed P system with -division Π() works in the following way.An external clock is assumed, which marks time units of equal length, starting from instant 0. According to this clock, the step  of computation is defined by the period of time that goes from instant  − 1 to instant .If a membrane  contains some rule  from types (a)-(e  ) selected to be executed, execution of such rule takes () time units to complete.Therefore, if the execution is started at instant , the rule is completed at instant  + () and the resulting objects and membranes become available only at the beginning of step  + () + 1.
For a given P systems with -division, by adding different time mappings, we can obtain a family of timed P systems with -division.The systems obtained, although in the same family, may produce different computation results for having different time mapping.A timed P system with -division Π() is said to be time-free if and only if, for any time mapping , the system Π() produces the same computation result (if any); that is, the execution time of the rules has no influence on the computation result of such systems.
Time-free P systems with -division are particularly interesting because they allow modelling biological phenomena where the execution time of the processes involved can vary unexpectedly.Similarly, a system like that, if implemented, would be robust against environmental changes that could affect, in an unpredicted manner, the execution time of the evolution rules of the system.

Uniform Time-Free Solutions to Decision Problems by
Timed P Systems with -Division.In order to formally define the concept of uniform time-free solution to decision problems by timed P systems (in our case with -division), following from [9,13], some notions related to solving decision problems with P systems with -division are reviewed.It is started by introducing recognizer timed P systems with division.
A recognizer P system with -division is the one such that (i) the working alphabet contains two distinguished elements yes and no; (ii) all computations halt; and (iii) if  is a computation of the system, either object yes or object no (but not both) must have been released into the environment when the system halts.The recognizer P systems with division can be used to solve decision problems as follows.For an instance  of the problem , the computations of the systems start from an initial configuration by adding the code of the problem cod() to the systems.If the computations of the systems finally halt with object yes (no) present in the environment, we say that the problem has a positive (negative) answer.In recognizer P systems with -division, a computation is said to be accepting (rejecting) if the object yes (no) appears in the environment associated with the corresponding halting configuration.
In the following description, we will formally describe the notions of solutions to decision problems by P systems with -division.Let  = (  , Θ  ) be a decision problem, where   is a set of instances and Θ  is a predicate over   , and let Π = {Π() |  ∈ N} be a family of recognizer P systems with -division.We say that the decision problem  is solvable in polynomial time by a (countable) family of P systems with -division Π if the following holds.
(i) The family Π is polynomial uniform by Turing machine; that is, there exists a deterministic Turing machine constructing the system Π() for  ∈ N in polynomial time.
( Finally, we define the concept of uniform timefree solution to decision problems.Let  = (  , Θ  ) be a decision problem.A family of timed recognizer P systems Π = {Π((), ) |  ∈   } is a uniform time-free solution to decision problem  if the following statements are true: (k) the family Π is polynomially uniform with respect to Turing machines; that is, there exists a deterministic Turing machine working in polynomial time which constructs the system Π() with knowledge involving only the size of the problem  for every instance of ; (l) The family Π is time-free polynomially bounded (halts in a polynomial number of RS-steps); (m) the family Π is time-free sound and time-free complete.
Given a decision problem , if there exists a family of timed P system Π = {Π((), ) |  ∈   } which computes a solution of the instance  of , and the correctness of the solution does not depend on the execution time of the rules involved in the computation, then the solution is called a time-free solution to problem  computed by the systems Π.

A Uniform Time-Free Solution to HPP
In this section, we prove that a family of timed P systems with -division can solve HPP in polynomial RS-steps, and the systems are constructed in a uniform way.It is noticed that in our systems we extend the number of objects involved in the rules of type (a).Specifically, the extended rules of type (a) are of the form (a  ) [ → V]  ℎ , ℎ ∈ ,  ∈ {+, −, 0}, , V ∈  * , by which a multiset of objects can evolve.After that, we will prove that the correctness of our solution does not depend on the execution time of the rules; that is, for any time mapping , we will obtain the same answer to the instances of the problems.
Hamiltonian Path Problem (HPP) is one of the best known NP-complete problems, which asks whether or not for a given graph  = (, ) ( is the set of nodes and  is the set of edges in ) contains a Hamiltonian path, that is a path of length  that visits all nodes from  exactly once; we do not specify the first and last nodes of a path, and each node in node set  can be the first node or the last one.
Theorem 1.The HPP can be solved in polynomial RS steps with respect to the number of nodes of a directed graph by a family of timed P systems with -division using rules of types (  ), (b), (c), and (  ).
Proof.Let us consider a directed graph  = (, ), where  = {V 1 , V 2 , . . ., V  } is the set of vertices and  is the set of edges.We codify  by multiset cod() =  1  2 ⋅ ⋅ ⋅   , where variable   represents vertex V  .In this way, we pass from  to cod() in linear steps with respect to .The instance  will be processed by timed P systems with -division Π(()) with input cod(), where () = .
We construct the family of timed P system with -division of degree 2: Π (, ) = (, , ,  0 ,   , , ) , where In what follows, a detailed explanation of how the system Π(, ) computes a solution to HPP is present.Three stages in the computation process are considered: generating, checking, and outputting.

Generating stage:
At the beginning of the computation, object no can be ejected to the environment after ( 1 ) steps by the rule  1 .By using the rule  2 , we start to create the paths in  starting from all the nodes V  , 1 ≤  ≤ .This process will be completed in ( 2 ) time units, costing only one RS step.
Prolonging the paths with one node, where all the nodes are assumed to have an edge between each node.For the membrane with same label, the rule  3 will be used in parallel; thus, for each , the application of rule  3 costs one RS step to prolong one node to all the nodes:  4 : [   ℎ → ]  with 1 ≤  ≤  and , ℎ ∈ {1, 2, . . ., } if there is no edge between node V  and V ℎ .
By using rules  4 , the objects representing the edges that are not in  can evolve into empty string (thus are removed out of the systems), and only the objects representing the edges in  are left in the system.In the worst case, each pair of (V  , V ℎ ) is not in , so the membrane with label  will use at most  2 rules in parallel, so this process will cost at most  2 RS-steps for each  ∈ {1, 2, . . ., }.Note that it is assumed that when division rules and evolutions can both be used (in our case it is possible that rules  3 and  4 can be applied at the same time), evolution of objects takes place first; thus, the objects evolved by rule  3 will be present in the divided membranes by rule  4 for any  ∈ {1, 2, . . ., }: Since the length of Hamiltonian path is , we need to check all the paths in  with length .After the application of rules  4 is completed, the membranes with label  containing object  can divide.The generating stage will finish when membranes with label  + 1 are generated.

Checking stage:
After generating all the possible paths with length not more than  (each in a separated membrane with label ), we need to check whether there exist some paths that contain all the nodes V 1 , V 2 , . . ., V  .This process is started by checking object  1 in the membranes  + 1.For each membrane  + 1, if it contains object  1 , rule  11 can be applied, and after ( 11 ) steps, membranes with label  + 2 are produced.Membranes +1 without object  1 can not evolve any more, and no further rule can be used over them.After membranes labelled with  + 2 are generated, object  2 in the membranes can evolve by using the rule  12 , and so forth.The checking stage will cost  RS steps at most (in case there is at least one membrane  + 1 that contains all the objects  1 ,  2 , . . .,   ).
If there is no membrane  + 1 containing all the objects  1 ,  2 , . . .,   , the checking stage halts and cannot go to outputting stage.There are the following two cases.If the rule  1 has completed its application, that is object no presents in the environment.In this case, we get object no in the environment when system halts; hence, the answer to the decision problem is negative.When the computation of the system halts the application of rule  1 does not complete.In this case, the system halts as soon as the application of rule  1 is finished.We also get object no in the environment, hence the answer of the problem is negative.
If there exists at least one membrane  + 1 that contains all the objects  1 ,  2 , . . .,   , the computation proceeds to the outputting stage.
Outputting stage: Membranes with label 2 + 1 that contains object  will be produced.Object  in membrane 2 + 1 can be sent out of the membrane and evolves into object yes.This process costs one RS step.In this way, object yes passes to membrane .Subsequently, by using rule  2 , object yes in membrane  is sent out to the environment and object no goes into membrane .After that, the system halts with object yes placed in the environment, so the answer to the decision problem is positive.
We can easily check that the presented system Π(, ) can be built in polynomial time with respect to  (the number of nodes in  of ).Specifically, the necessary resources to build the system Π(, ) are shown as follows: the size of the alphabet, 2 + 7 ∈ (); the initial number of cells, 2 ∈ (1); the initial number of objects, 2 + 2 ∈ (); and the number of rules (in the most case),  3 + 2 + 4 ∈ ( 3 ).
Therefore, there exists a deterministic Turing machine working in polynomial time which constructs the system with knowledge only of the number of nodes in the graph; that is, the family of P systems with -division Π(, ) is constructed in a uniform way.It is easy to check that the family of systems Π(, ) are timed sound and timed complete.
In the generating stage, the applications of rules  1 and  2 cost two RS steps; every membrane  applies rules  3 , 1 ≤  ≤  − 1 in parallel; thus,  − 1 RS-steps are required to start their execution; for any membrane , the application of rule  4 costs  2 RS steps at most to start their execution, (since in each membrane , in the worst case it contains all the rules [   ℎ → ]  with ℎ,  = 1, 2, . . ., ); for all the  membranes, totally we need  3 RS-steps for the execution of rules  4 ; one RS step is needed to start the execution of rule  5 .In the checking stage, it costs at most  RS steps in the case that there exists at least one membrane  + 1, contains all the variables  1 ,  2 , . . .,   .Two RS steps are needed to output the object yes (if any) to the environment.Therefore,  3 +2+4 RS-steps are required at most to complete the computation of Π(, ), which is polynomial.
As explained above, we can conclude that the family of timed P systems Π(, ) with -division is a uniform solution to HPP.Corollary 2. For any time mapping , by means of the family of P systems with -division Π(, ) constructed in Theorem 1, the same solution can be obtained for a given instance of the HPP; that is, the correctness of the solution does not depend on the execution time of the rules.
Proof.It is easy to check that (for any time mapping ) the family of P systems with -division Π(, ) constructed in Theorem 1 are time-free sound, time-free complete, and timefree polynomially bounded.Therefore, the solution to HPP by the family of timed P systems with -division Π(, ) is time-free.

Conclusions and Future Work
In this paper, inspired from the biological fact that execution time of biochemical reactions can vary because of external uncontrollable conditions, we consider timed P systems with -division by adding a time mapping to each evolution rule.In the systems, the general restriction on the constant execution time of the rules as defined in classical P systems is removed.We consider rule starting steps (RS-steps) as "valid" computation steps; that is, only those ticks of the clock in which at least one rule starts its execution are considered as the beginning of a computation step.The ticks, in which no object "begins" to evolve or no membrane "begins" to change, are omitted from computation steps.In this way, we can avoid the inherently possible exponential execution time of the rules in such systems.We investigate the efficiency of timed P systems with -division.As a result, a time-free uniform solution to HPP is obtained.
ii) There is a pair of polynomial computable functions (cod, ) over the problem  such that (a) for each instance  ∈   , cod() is the input of the system Π and () ∈ N; (b) the family Π is sound with respect to , cod, ;that is, for each instance of the problem  ∈   if there exists an accepting computation of Π(()) with input cod(), we haveΘ  () = 1; (c)the family Π is complete with respect to , cod, ; that is, for each instance of the problem  ∈   if Θ  () = 1, every computation of Π(()) is an accepting computation; (d) the family Π is polynomial bounded if there exists a polynomial function  such that, for each  ∈  the family Π is timed polynomial bounded if there exists a polynomial function  such that, for each  ∈   and given time mapping , all computations in Π((), ) halt in, at most, (||) RS-steps.(h) the family Π is time-free sound with respect to , cod, ; that is, for each instance of the problem  ∈   and any time mapping , if there exists an accepting computation of Π((), ) with input cod(), then we have Θ  () = 1; (i) the family Π is time-free complete with respect to , cod, ; that is, for each instance of the problem  ∈   and any time mapping , if Θ , all computations in Π(()) halt in, at most, (||) steps.The notions of soundness and completeness described above can be extended to timed P systems with -division, with the exception that the polynomially bounding needs to be reconsidered.In timed P systems with -division, execution of time of rules is determined by the time mapping ; thus, the existence of with input cod(), we have Θ  () = 1; (f) the family Π is timed complete with respect to , cod, ; that is, for each instance of the problem  ∈   and a given time mapping , if Θ  () = 1, every computation of Π((), ) is an accepting computation;(g)  () = 1, every computation of Π((), ) is an accepting computation; (j) the family Π is time-free polynomial bounded if there exists a polynomial function  such that, for each  ∈   and any time mapping , computations in Π((), ) halt in, at most, (||) RS-steps.