Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Spiking Neural P Systems with Neuron Division and Dissolution

Spiking Neural P Systems with Neuron Division and Dissolution

  • Yuzhen Zhao, 
  • Xiyu Liu, 
  • Wenping Wang
PLOS
x

Abstract

Spiking neural P systems are a new candidate in spiking neural network models. By using neuron division and budding, such systems can generate/produce exponential working space in linear computational steps, thus provide a way to solve computational hard problems in feasible (linear or polynomial) time with a “time-space trade-off” strategy. In this work, a new mechanism called neuron dissolution is introduced, by which redundant neurons produced during the computation can be removed. As applications, uniform solutions to two NP-hard problems: SAT problem and Subset Sum problem are constructed in linear time, working in a deterministic way. The neuron dissolution strategy is used to eliminate invalid solutions, and all answers to these two problems are encoded as indices of output neurons. Our results improve the one obtained in Science China Information Sciences, 2011, 1596-1607 by Pan et al.

Introduction

Spiking neural P systems (in short, SN P systems) are a class of bio-inspired parallel computing models, initiated by Ionescu, Păun and Yokomori in 2006 [1], which are inspired from information processing strategy and communication strategy between neurons. A SN P system is constructed by a group of neurons (a class of cells with only one membrane) communicating by sending signals (spikes, represented by object a) to neighboring neurons through synapses. Each neuron has a certain number of spikes and rules. Spikes can evolve through application of rules. Since SN P systems were proposed, they become a rapid developing area of membrane computing [215].

Researchers pay close attention to computational efficiency of SN P systems, especially the judgement whether NP-complete problems have solutions or not in feasible time [1626]. If a NP-complete problem has a solution, the output neuron outputs a spike; otherwise, the output neuron outputs nothing. However, we need to find out the solutions in many situations. For instance, the register allocation problem is an application of SAT problem. This problem aims to build a mapping relationship between the virtual registers and the physical registers, and realize the rational utilization of physical register resources. In this case, we need to judge whether a good solution exists, while searching the solution by distributing the physical register resources according to the solution. In applications, many problems can be transformed into graph coloring problems, which is equivalent to SAT problems. To solve these problems, exact solutions are also essential.

For this purpose, neuron dissolution, which is a basic biological phenomenon aiming to remove unnecessary neurons, is introduced into SN P systems [27, 28], and a new class of SN P systems, SN P systems with neuron division and dissolution (DDSN P systems, for short) is proposed in this work. In DDSN P systems, division rules can generate exponent work space (in terms of neurons) which can be used to enumerate all possible results (one result is contained in one neuron), and dissolution rules can dissolve redundant neurons which can be used to remove wrong results. Neurons which represent all possible results are set as output neurons, and these output neurons with invalid results are dissolved in computational process. When the computation halts, the remaining output neurons show all right results. Uniform solutions to SAT problem and Subset Sum problem, which work in a deterministic way, are constructed as examples in this work.

The contributions of this work focus on the following three aspects. 1. The computational space efficiency is improved. If these redundant neurons are reserved, they will occupy huge computational resources such as storage. The dissolution rule can reduce the computational space needed and improve the computational space efficiency. 2. The system structure is clearer. If the redundant neurons are reserved, the SN P system will become complicated, and the useful neurons are not highlighted enough. By introducing the neuron dissolution mechanism, redundant neurons are dissolved immediately, and each of the remaining neuron has its function. 3. Exact solutions to NP-complete problems can be obtained in linear time. Invalid solutions are eliminated during the computational process by neuron dissolution, and all solutions are encoded as indices of specific output neurons at halting, which can provide more valuable information for applications. Uniform solutions to SAT and Subset Sum problems are solved as examples.

The paper is organized as follows. Section 1 defines the SN P systems with neuron division and dissolution. Uniform solutions to SAT and Subset Sum problems in linear time using the proposed SN P systems with neuron division and dissolution are presented in section 2 and section 3. Conclusions are given in section 4.

1 SN P Systems with Neuron Division and Dissolution

1.1 Background

Biological systems, such as cells, tissues, and human brains, have deep computational intelligence. Biologically inspired computing, or bio-inspired computing in short, focuses on regenerating computing architecture from biological systems to construct computing models and algorithms. Membrane computing is a novel research branch of bio-inspired computing, initiated by Gh. Păun in 2002, which seeks to discover new computational models from the study of biological cells, particularly of the biological membranes [29, 30]. The obtained models are distributed and parallel bio-inspired computing devices, usually called P systems. There are three mainly investigated P systems, cell-like P systems, tissue P systems, and neural-like P systems (also known as spiking neural P systems). P systems, known as powerful computing models, are able to do what Turing machine can do, even solving computational hard problems [3137].

SN P systems, as a new branch of membrane computing, are a shift from the cell-like architecture to the neural-like architecture. The topological structure of SN P systems is a directed graph: neurons are placed in the vertices of the graph, and synapses act as edges. Each neuron can have a certain number of objects a (spikes) and a certain number of firing rules and forgetting rules. Through a firing rule, a neuron can send information to other neurons by emitting spikes to these neurons. Through a forgetting rule, a certain amount of spikes can be removed from a neuron. Both the firing rules and the forgetting rules have conditions of applied. If the number of spikes in a neuron is contained within in the number set of spikes determined by a regular expression, a rule can have the possibility to be applied. At each time step, one rule is non-deterministically chosen to be applied in each neuron. That is to say, rules are applied in a sequential manner from the view of the neuron, and in parallel from the view of the whole system.

Pan et al. introduced a novel idea to solve SAT problem in polynomial time by using neuron division and budding [25], which uses the neuron division and budding rules to generate more neurons according to the need in the computational process. Wang et al. proved that SN P systems with neuron division, not using neuron budding, can also solve SAT problem in polynomial time [26]. The biological motivation of neuron division and budding comes from the neural stem cells division. The neural stem cells have the ability to proliferate and differentiate into neurons, astrocytes and oligodendrocytes, therefore, they can supply massive tissue cells. In these SN P systems, neuron division rules and neuron budding rules are used to regenerate the above biological phenomena.

In neurons, there is another biological phenomenon called neuron apoptosis, which has a close relationship with neuron division and budding. Neuron apoptosis is a programmed neuron death controlled by a series of activities controlled by genes, such as the activation, expression and regulation of genes. It is not a self damage phenomenon under the pathological condition, but a actively death process. When unnecessary neurons or abnormal neurons occur in the process of neuron development or under the influence of some factors, neuron apoptosis can remove these neurons in multicellular organism to maintain a stable internal environment and to adapt to the environment better. It plays an important role in the evolution of the organism, the stability of internal environment and the development of multiple systems.

For the above biological phenomena, the neuron apoptosis mechanism is introduced into SN P systems, and neuron dissolution rule is designed. In this way, redundant neurons can be eliminated immediately.

1.2 System description

A SN P system with neuron division and dissolution of degree m is a construct of the form where:

  1. O = {a} represents the singleton alphabet where a is the spike;
  2. H represents the set of labels for neurons;
  3. synH × H represents a synapse dictionary (for each 1 ≤ im, (i, i) ∉ syn);
  4. ni ≥ 0 represents the spike numbers in neuron σi in the initial state (1 ≤ im);
  5. R represents the set of all developmental rules of the following four forms
    • firing rule [E/acap; d]i, where, iH, E is a regular expression over a, c ≥ 1, p ≥ 1, cp, d ≥ 0. If E = ac, the firing rule is simply written as [acap; d]i. If d = 0, the firing rule is simply written as [E/acap]i. If E = ac and d = 0, the firing rule is simply written as [acap]i;
    • forgetting rule [E/as → λ]i, where, iH, E is a regular expression over a, s ≥ 1. If E = as, the forgetting rule is simply written as [as → λ]i;
    • neuron division rule [E]i → [ ]j || [ ]k, where, i, j, kH, E is a regular expression over a;
    • neuron dissolution rule [E]iδ, where, iH, E is a regular expression over a, object δ represents that neuron σi is dissolved;
  6. in, outH represent the input and output neurons of Π, respectively.

The synapse dictionary syn shows the initial structure of the system and guides how to establish new synapses when new neurons are established.

If neuron σi has h spikes, and ahL(E), hc, the firing rule [E/acap; d]i can be applied. c spikes are consumed (hc spikes remain in neuron σi.), and p spikes are emitted after d time units (steps). If d = 0, p spikes are emitted immediately; if d = 1, p spikes are emitted at the next step; if this firing rule is applied at step t and d ≥ 1, p spikes are emitted at step t + d. Neuron σi is closed at steps t, t + 1, t + 2, …, t + d − 1, which means no rule will be applied and no spike will be received in this period. At step t + d, neuron σi becomes open again, and can receive new spikes. Once these p spikes are emitted from neuron σi, they reach each neuron σj which has a synapse going from neuron σi to neuron σj and is open. The spikes sent to a closed neuron are lost.

If neuron σi has h spikes, and ahL(E), hs, the forgetting rule [E/as → λ]i can be applied. s spikes are consumed immediately.

If (1). neuron σi has h spikes, and ahL(E), and (2). no synapse (i, j), (j, i), (i, k), (k, i) exists in the system, the neuron division rule [E]i → [ ]j || [ ]k can be applied. All h spikes in neuron σi are consumed and neuron σi is divided into two neurons σj and σk. No spike is in neurons σj and σk at this moment. The labels of the two generated neurons can be different or the same, and the labels of the two generated neurons can be different from or the same with the label of their father neuron σi, too. The new generated neurons inherit the synapses of their father neuron σi. That is to say, if there is a synapse (i, g) going from neuron σi to neuron σg, two synapses (j, g) and (k, g) are established after the division rule is applied; if there is a synapse (g, i) going from neuron σg to neuron σi, two synapses (g, j) and (g, k) are established after the division rule is applied. In addition to inheritance of synapses, new generated neurons also have synapses provided by the synapse dictionary syn. Synapses not existing in the synapse dictionary syn may appear because of inheritance of synapses. The condition (2) avoids the situation that the start and the end of a synapse are the same neuron. For example, if synapse (i, j) exists in the system, synapses (j, j), (k, j) will appear which is not permitted.

A simple example shown in Fig 1 is used to show how division rules are applied. One spike and two division rules are in neuron σ3. Considering the two conditions mentioned in the above paragraph, 1). Neuron σ3 has one spike a and the regular expressions of both two division rules are exactly {a}, where a ∈ {a}. Therefore, both of these two division rules meet the condition (1). 2). For rule [a]3 → [ ]2 || [ ]3, the label 3 of the father neuron σ3 corresponds to i in the normalization rule, and the label 2 and 3 of the two new neurons σ2 and σ3 corresponds to j and k in the normalization rule. Synapses (i, j), (j, i), (i, k), (k, i) cannot exist in the system. That is to say, (3, 2), (2, 3), (3, 3), (3, 3) cannot exist in this system. However, a synapse (2, 3) is in this system, therefore rule [a]3 → [ ]2 || [ ]3 cannot be applied. Only rule [a]3 → [ ]3 || [ ]4 meet the two conditions. The spike a in neuron σ3 is consumed, neuron σ3 is divided into two neurons σ3 and σ4, and two synapses (2, 3), (2, 4) going from neuron σ2 to these two new neurons are established because there is a synapse going from neuron σ2 to the father neuron σ3 of the two new neurons (the inheritance of synapses). Because rules in this system are related to the labels of neurons, the new neuron σ3 contains these two rules. The system is changed to Fig 2 after applying rule [a]3 → [ ]3 || [ ]4.

If neuron σi has h spikes, and ahL(E), the neuron dissolution rule [E]iδ can be applied. All h spikes in neuron σi are consumed and neuron σi is dissolved. All synapses going from/to neuron σi are dissolved, too.

A simple example shown in Fig 3 is used to show how dissolution rules are applied. Neuron σ1 has one spike a and the regular expression of the dissolution rule is exactly {a}, where a ∈ {a}. Then rule [a]1δ is applied and the system is changed to Fig 4 (Neuron σ1 is dissolved, and synapse (1, 2) connected with neuron σ1 is also dissolved.).

At each step, if only one rule in neuron σi can be applied, this rule must be applied; if two or more rules in neuron σi can be applied, one of these rules is applied non-deterministically. Rules are applied in a sequential manner in each neuron and in parallel between neurons.

The configuration of the system is described by the synapses connections, the spikes number in each neuron, and the state of each neuron (open or closed). By applying rules, the configuration is transformed from one to the next one. The transition sequence starting from the initial configuration is called a computation, and a computation halts if it reaches a configuration where all neurons are open and no rule can be applied.

SN P systems can used to solve the decision problem IX, ΘX both in a semi-uniform way and in a uniform way, where IX is a language over a finite alphabet and ΘX is a total boolean function over IX (The elements in IX are instances.). In the semi-uniform way, a specified SN P system is constructed for each instance of a decision problem, in which the instance parameters are embedded in the SN P system. In the uniform way, a SN P system is constructed for all instances of a decision problem, in which the different instances parameters enter the SN P system as input spikes. The uniform solutions are preferred because they only relate to the structure of a problem.

The input of a SN P system is a spike train , where r ≥ 1, ij ≥ 0 for each 1 ≤ jr, which means ij spikes enter the system through input neuron σin at step j. Specially, ij = 0 means no spike enters the system at step j.

2 A Uniform Solution to SAT Problem

SAT (the satisfiability of conjunctive normal form expression) problem is one of the most typical NP-complete problems. For a Boolean variable set X = {x1, x2, …, xn}, a literal li is xi or ¬xi for 1 ≤ in. A clause Ci is a disjunction of literals Ci = ln1ln2 ∨ … ∨ lnr, 1 ≤ rn. A conjunctive normal form (CNF, for short) is a conjunction of clauses C1C2 ∧ … ∧ Cm. An assignment is a mapping X → {0, 1} from each variable xi to its value (Value 1 represents true and value 0 represents false.). For example, X = {x1, x2, x3}, the conjunctive normal form is (x1 ∨ ¬x2) ∧ (x1x3). The x1 ∨ ¬x2 and x1x3 are the two clauses. The first clause contains two literals x1 and ¬x2, and the second clause contains two literals x1 and x3. If an assignment of x1, x2, …, xn can be found, which makes at least one literal true in each clause and then makes all m clauses true, this SAT problem is satisfiable. Otherwise, this SAT problem is unsatisfiable [38]. In the above example, let x1 = x2 = x3 = 1, the value of the conjunctive normal form is (1 ∨ 0) ∧ (1 ∨ 0) = 1 ∧ 1 = 1. Therefore, the SAT problem is satisfiable.

The formal definition of SAT problem is as follows.

Problem 1. NAME: SAT.

  • INSTANCE: a set of clauses C = {C1, C2, …, Cm}, which is built on a Boolean variable set X = {x1, x2, …, xn}.
  • QUESTION: is there an assignment of Boolean variables x1, x2, …, xn that can make the value of all clauses true?

SAT(n, m) denotes the set of all instances of the SAT problem having n variables and m clauses. In this section, a uniform solution working in a deterministic way is constructed by DDSN P system, which can solve all SAT(n, m) problems in linear time.

The instance parameters need to enter a SN P system, therefore the clauses need to be encoded as spikes form. Each clause contains either xj, or ¬xj, or none of these two. Different numbers of spikes are introduced into the system to distinguish these three situations.

A clause is represented by αi,1αi,2 ⋅ … ⋅ αi,n in this way. For instance, a clause ¬x1x2x3 is represented by a2aa.

In order to generate the necessary workspace before computing, a spike train (a0 ⋅)2n is introduced into the front of each spike train.

The formal definition of DDSN P systems for SAT(n, m) problems (shown in Fig 5) is as follows. where:

  1. O = {a};
  2. H = {0, 1, 2, 3, d, inxi, Cxi1, Cxi0, ot1, t2, …, tn}(i, t1, t2, …, tn = 1,2);
  3. syn = {(3, 2), (2, 1), (1, 2), (1, 0), (3, d)}
    ⋃{(d, inxi)|i = 1, 2, …, n} ⋃{(inxi, Cxi1), (inxi, Cxi0)|i = 1, 2, …, n}
    ⋃{(Cx11, o1), (Cxi1, ot1, t(i − 1)1)|i = 2, 3, …, n}
    ⋃{(Cx10, o0), (Cxi0, ot1, t(i − 1)0)|i = 2, 3, …, n};
  4. n0 = 1, n2 = 1, n3 = 1, nd = 2m, the number of spikes in other neurons is zero;
  5. in = σinxi, out = σot1, t2, …, tn(i, t1, t2, …, tn = 0, 1);
  6. firing rule:
    [aa]i, i = 1, 2
    [aa; 2n − 1]3
    [a(a2)+/a2a]d
    [aa]inxi, i = 1, 2, …, n
    [a2a2]inxi, i = 1, 2, …, n
    [a3a3]inxi, i = 1, 2, …, n
    [aa]Cxi1, i = 1, 2, …, n
    [a3a]Cxi1, i = 1, 2, …, n
    [aa]Cxi0, i = 1, 2, …, n
    [a2a]Cxi0, i = 1, 2, …, n
    forgetting rule:
    [a2 → λ]2
    [a2 → λ]Cxi1, i = 1, 2, …, n
    [a3 → λ]Cxi0, i = 1, 2, …, n
    [a → λ]ot1 t2tn, t1, t2, …, tn = 0, 1
    [a2 → λ]ot1 t2tn, t1, t2, …, tn = 0, 1

    [an −1 → λ]ot1 t2tn, t1, t2, …, tn = 0, 1
    neuron division rule:
    [a]0 → [ ]o1 || [ ]o0
    [a]ot1 → [ ]ot11 || [ ]ot10, t1 = 0, 1
    [a]ot1 t2 → [ ]ot1 t21 || [ ]ot1 t20, t1, t2 = 0, 1

    [a]ot1 t2tn−1 → [ ]ot1 t2tn−11 || [ ]ot1 t2tn−10, t1, t2, …, tn−1 = 0, 1
    neuron dissolution rule:
    [an]ot1 t2tnδ, t1, t2, …, tn = 0, 1.

Computation starts when spike trains enter the system through input neurons σinx1, σinx2, …, σinxn, respectively. Neuron σ0 and its children neurons need 2n steps to generate 2n neurons (workspace) to enumerate all assignments of variables by applying neuron division rules (One neuron represents one assignment of variables.), therefore (a0 ⋅)2n are added to the front of each spike train.

Generation Stage: At step one, neuron σ0 has one spike, the division rule [a]0 → [ ]o1 || [ ]o0 is applied to generate neurons σo1 and σo0, which means an assignment in regard to x1 has two choices: 1 or 0. Synapses (1, o1) and (1, o0) are established through the inheritance of synapse (1, 0), and synapses (Cx11, o1) and (Cx10, o0) are established through synapse dictionary syn. Synapse (Cx11, o1) establishes a channel between the input and the assignment including x1 = 1; synapse (Cx10, o0) establishes a channel between the input and the assignment including x1 = 0. At the same time, auxiliary neuron σ2 has one spike, rule aa is applied and one spike is emitted to neuron σ1; auxiliary neuron σ3 has one spike, rule aa; 2n − 1 is applied and one spike will be emitted to neurons σ2 and σd at step 2n. The system after step one is shown in Fig 6.

At step two, neuron σ1 has one spike, the firing rule aa is applied, and one spike is emitted to neurons σ2, σo1 and σo0.

At step three, each of neurons σo1 and σo0 has one spike, the division rule [a]ot1 → [ ]ot11 || [ ]ot10(t1 = 1, 0) is applied to generate neurons σo11, σo10, σo01 and σo00, which means an assignment in regard to x1 and x2 has four choices: 11, 10, 01, 00. Synapses (1, o11), (1, o10), (1, o01) and (1, o00) are established through the inheritance of synapses (1, o1), (1, o0); synapses (Cx11, o11), (Cx11, o10), (Cx10, o01) and (Cx11, o00) are established through the inheritance of synapses (Cx11, o1), (Cx10, o0); synapses (Cx21, o11), (Cx21, o01), S(Cx20, o10) and (Cx20, o00) are established through synapse dictionary syn. Synapses (Cx11, o11) and (Cx11, o10) establish channels between the input and the assignments including x1 = 1; synapses (Cx10, o01) and (Cx10, o00) establish channels between the input and the assignments including x1 = 0; synapses (Cx21, o11) and (Cx21, o01) establish channels between the input and the assignments including x2 = 1; synapses (Cx20, o10) and (Cx20, o00) establish channels between the input and the assignments including x2 = 0. At the same time, auxiliary neuron σ2 has one spike, rule aa is applied and one spike is emitted to neuron σ1. The system after step three is shown in Fig 7.

Similar process repeats. At step 2n − 1, 2n neurons labeled ot1 t2tn(t1, t2, …, tn = 0, 1) are generated. The system after step 2n − 1 is shown in Fig 8.

At step 2n, each neuron σot1 t2tn receives one spike emitted from neuron σ1 which will be deleted at the next step by the forgetting rule [a → λ]ot1 t2tn. Neuron σ2 receives two spikes (One is emitted from neuron σ1, and another one is emitted from σ3), the forgetting rule a2 → λ is applied at step 2n + 1, and no spike will be emitted to neuron σ1 later. At the same time, neuron σd receives one spike emitted from σ3. The system after step 2n is shown in Fig 9.

Input Stage: At step 2n + 1, the first clause of the conjunctive normal form expression enters the system through input neurons σinxi, i = 1, 2, …, n. The literal in regard to x1 enters neuron σinx1; the literal in regard to x2 enters neuron σinx2; … the literal in regard to xn enters neuron σinxn. At the same time, one spike is emitted to neuron σinxi from neuron σd.

At step 2n + 2, the spikes in neuron σinxi are replicated, and are emitted to neurons σCxi1 and σCxi0.

At step 2n + 3, different rules are applied according to the number of spikes in neurons σCxi1 and σCxi0.

For neuron σCxi1:

  • If one spike is in neuron σCxi1, which means neither xi nor ¬xi is in the clause, rule aa is applied. One spike is emitted to neurons having synapses going from neuron σCxi1 to them. It aims to show that xi = 1 makes no contribution to let the clause true.
  • If two spikes are in neuron σCxi1, which means xi is in the clause, rule a2 → λ is applied. These two spikes are deleted. It aims to show that xi = 1 makes contribution to let the clause true.
  • If three spikes are in neuron σCxi1, which means ¬xi is in the clause, rule a3a is applied. One spike is emitted to neurons having synapses going from neuron σCxi1 to them. It aims to show that xi = 1 makes no contribution to let the clause true.

For neuron σCxi0:

  • If one spike is in neuron σCxi0, which means neither xi nor ¬xi is in the clause, rule aa is applied. One spike is emitted to neurons having synapses going from neuron σCxi0 to them. It aims to show that xi = 0 makes no contribution to let the clause true.
  • If two spikes are in neuron σCxi0, which means xi is in the clause, rule a2a is applied. One spike is emitted to neurons having synapses going from neuron σCxi0 to them. It aims to show that xi = 0 makes no contribution to let the clause true.
  • If three spikes are in neuron σCxi0, which means ¬xi is in the clause, rule a3 → λ is applied. These three spikes are deleted. It aims to show that xi = 0 makes contribution to let the clause true.

Satisfiability Stage: Each neuron σot1 t2tn(t1, t2, …, tn = 0, 1) receives zero or more spikes at step 2n + 3. If one neuron σot1 t2tn receives n spikes which means the clause contains n literals that make no contribution to let the clause true, the dissolution rule [an]ot1 t2tnδ is applied at step 2n + 4 to dissolve this neuron (The value of the first clause is false, therefore this assignment is not the answer to this SAT problem.). Otherwise, at least one literal is true in this assignment and this assignment is reserved to check the next clause.

Due to m clauses are in a SAT problem, the satisfiability checking stage lasts for m + 3 steps. If some neurons σot1 t2tn are still in the system at step 2n + m + 3, the labels of these neurons σot1 t2tn are all solutions to this SAT problem, i.e., this SAT problem is satisfiable. Otherwise, this SAT problem is unsatisfiable.

It can be seen that any SAT(n, m) problem can be solved in linear time, and all solutions can be obtained through this system.

Some steps comparison results between our solution and other solutions, which use the neuron division to solve the NP-complete problems, are shown in Table 1.

thumbnail
Table 1. Steps comparison results of some uniform solutions to SAT problem.

https://doi.org/10.1371/journal.pone.0162882.t001

Considering a SAT problem SAT (3, 3): (x1x2) ⋀ (¬x2x3) ⋀ (¬x1x2x3), the DDSN P system Π3,3 is used to solve it. After 12 computational steps, neurons σo111, σo101 and σo011 are remaining which shows that {x1 = true, x2 = true, x3 = true}, {x1 = true, x2 = false, x3 = true} and {x1 = false, x2 = true, x3 = true} are all solutions to this SAT problem.

The SN P system with neuron division and budding and the SN P system with neuron division need 21 steps and 26 steps to judge this problem has solutions, respectively, while our DDSN P system need only 12 steps.

SAT problems with different sizes (1 ≤ n, m ≤ 50) are solved using the three systems in Table 1 and the computational steps of each system are shown in Figs 10, 11 and 12 by MATLAB R2014a. As can be seen from these figures, the computational steps of DDSN P system are stable and much fewer, especially when the problem size is larger.

thumbnail
Fig 10. The computational steps of SN P system with neuron division and budding solving SAT problem.

https://doi.org/10.1371/journal.pone.0162882.g010

thumbnail
Fig 11. The computational steps of SN P system with neuron division solving SAT problem.

https://doi.org/10.1371/journal.pone.0162882.g011

3 A Uniform Solution to Subset Sum Problem

Subset Sum problem is one of the most typical NP-complete problems. The formal definition of it is as follows [38].

Problem 2. NAME: SUBSET SUM.

  • INSTANCE: a set of positive integers X = {x1, x2, …, xn} and a positive integer S.
  • QUESTION: is there a subset BX that ?

Subset Sum problem (n) denotes the set of all instances of the Subset Sum problem having n integers. In this section, a uniform solution working in a deterministic way is constructed by DDSN P system, which can solve all Subset Sum problem (n) problems in linear time.

An integer is represented by corresponding number of spikes. In order to generate necessary workspace before computing, a spike train (a0 ⋅)2n is introduced into the front of each spike train.

The formal definition of DDSN P Systems for Subset Sum problem (n) (shown in Fig 13) is as follows. where:

  1. O = {a};
  2. H = {0, 1, 2, 3, 4, s, ini, di1, di2}(i = 1, 2, …, n);
  3. syn = {(3, 2), (2, 1), (1, 2), (1, 0), (4, s), (s, 0)}
    ⋃{(ini, di1), (ini, di2), (di1, 4)|i = 1, 2, …, n}
    ⋃{(d1,2, o1)}⋃{(di2, ot1, …, t(i − 1)1)|i = 2, 3, …, n};
  4. n0 = 1, n2 = 1, n3 = 1, the number of spikes in other neurons is zero;
  5. in = σini, σs, out = σot1, t2, …, tn(i, t1, t2, …, tn = 0, 1);
  6. firing rule:
    [aa]i, i = 1, 2
    [aa; 2n − 1]3
    [a3(a3)+/a3a3]ini, i = 1, 2, …, n
    [a3a]ini, i = 1, 2, …, n
    [aa]di1, i = 1, 2, …, n
    [a3a3]di2, i = 1, 2, …, n
    [ana]4
    [a(a2)+/a2a2]s
    [aa]s
    forgetting rule:
    [a2 → λ]2
    [a3 → λ]di1, i = 1, 2, …, n
    [a → λ]di2, i = 1, 2, …, n
    [a2(a3)+/a5 → λ]ot1 t2tn, t1, t2, …, tn = 0, 1
    [a → λ]ot1 t2tn, t1, t2, …, tn = 0, 1
    neuron division rule:
    [a]0 → [ ]o1 || [ ]o0
    [a]ot1 → [ ]ot11 || [ ]ot10, t1 = 0, 1
    [a]ot1 t2 → [ ]ot1 t21 || [ ]ot1 t20, t1, t2 = 0, 1

    [a]ot1 t2tn−1 → [ ]ot1 t2tn−11 || [ ]ot1 t2tn−10, t1, t2, …, tn−1 = 0, 1
    neuron dissolution rule:
    [a(a3)+]ot1 t2tnδ, t1, t2, …, tn = 0, 1
    [a2]ot1 t2tnδ, t1, t2, …, tn = 0, 1.

Computation starts when spike trains enter the system thrgouth input neurons σin1, σin2, …, σinn and σs, respectively. Neuron σ0 and its children neurons need 2n steps to generate 2n neurons (workspace) to enumerate all subsets of x1, x2, …, xn by applying neuron division rules (One neuron represents one subset.), therefore (a0 ⋅)2n are added to the front of each spike train.

Generation Stage: At step one, neuron σ0 has one spike, the division rule [a]0 → [ ]o1 || [ ]o0 is applied to generate neurons σo1 and σo0, which means one subset in regard to x1 has two choices: x1 is included in this subset (represent by 1) and x1 is not included in this subset (represent by 0). Synapses (1, o1) and (1, o0) are established through the inheritance of synapse (1, 0); synapses (s, o1) and (s, o0) are established through the inheritance of synapse (s, 0); the synapse (d12, o1) is established through synapse dictionary syn. The synapse between neurons d12 and o1 establishes a channel between the input and the subset having x1. At the same time, auxiliary neuron σ2 has one spike, rule aa is applied and one spike is emitted to neuron σ1; auxiliary neuron σ3 has one spike, ruleaa; 2n − 1 is applied and one spike will be emitted to neurons σ2 at step 2n. The system after step one is shown in Fig 14.

At step two, neuron σ1 has one spike, the firing rule aa is applied, and one spike is emitted to neurons σ2, σo1 and σo0.

At step three, each of neurons σo1 and σo0 has one spike, the division rule [a]ot1 → [ ]ot11 || [ ]ot10(t1 = 1, 0) is applied to generate neurons σo11, σo10, σo01 and σo00, which means one subset in regard to x1 and x2 has four choices: x1x2 are included in this subset (represent by 11), x1 is included in this subset and x2 is not included in this subset (represent by 10), x1 is not included in this subset and x2 is included in this subset (represent by 01), and x1x2 are not included in this subset (represent by 00). Synapses (1, o11), (1, o10), (1, o01), (1, o00), (s, o11), (s, o10), (s, o01), (s, o00), (d12, o11) and (d12, o10) are established through the inheritance of synapse (1, o1), (1, o0), (s, o1), (s, o0) and (d12, o1); synapses (d22, o11) and (d22, o01) are established through synapse dictionary syn. Synapses (d12, o11) and (d12, o10) establish channels between the input and the subsets having x1; synapses (d22, o11) and (d22, o01) establish channels between the input and the subsets having x2. At the same time, auxiliary neuron σ2 has one spike, rule aa is applied and one spike is emitted to neuron σ1. The system after step three is shown in Fig 15.

Similar process repeats. At step 2n − 1, 2n neurons labeled ot1 t2tn(t1, t2, …, tn = 1, 2, …, n) are generated. The system after step 2n − 1 is shown in Fig 16.

At step 2n, each neuron σot1 t2tn receives one spike emitted from neuron σ1 which will be deleted at the next step by the forgetting rule [a → λ]ot1 t2tn. Neuron σ2 receives two spikes (One is emitted from neuron σ1, and another one is emitted from neuron σ3.), the forgetting rule a2 → λ is applied at step 2n + 1, and no spike will be emitted to neuron σ1 later. The system after step 2n is shown in Fig 17.

Input Stage: At step 2n + 1, x1, x2, …, xn enter the system through input neurons σini(i = 1, 2, …, n). 3x1 + 3 spikes (a3x1+3) enter neuron σin1; 3x2 + 3 spikes (a3x2+3) enter neuron σin2;… 3xn + 3 spikes (a3xn+3) enter neuron σinn.

At step 2n + 2, the firing rule a3(a3)+/a3a3 is applied, and three spikes are replicated and are emitted to neurons σdi1 and σdi2. Spikes in neuron σdi1 are forgotten, and spikes in neuron σdi2 are emitted to these σot1 t2…,tn having synapses going from neuron σdi2 to them (These neurons represent the subsets having the integer xi.) at step 2n + 3. This process repeats until only 3 spikes are in neuron σini.

At step 2n + xi + 2, the firing rule a3a is applied, and one spike is replicated and is emitted to neurons σdi1 and σdi2.

At step 2n + xi + 3, the spike in neuron σdi1 is emitted to neuron σ4 showing that all spikes in neuron σini have been passed to neurons σot1 t2…,tn having synapses going from neuron σdi2 to them. The spike in neuron σdi2 is forgotten. Up to this step, 3xi spikes are emitted to neurons σot1 t2…,tn which represent the subsets having the integer xi.

When all input spikes in neurons σini are passed to neurons σot1 t2tn at step 2n + xmax + 3(xmax represents the maximum integer of all n integers.), neuron σ4 receives n spikes, and one spike is emitted to neuron σs at step 2n + xmax + 4. Up to this step, the number of spikes in neurons σot1 t2…,tn is .

Checking Stage: At step 2n + xmax + 5, 2s + 1 spikes are in neuron σs, the firing rule a(a2) + /a2a2 is applied, two spikes are emitted to neurons σot1 t2tn. This process lasts for S circles.

At step 2n + xmax + s + 4, only one spike is in neuron s, and this spike is emitted to neurons σot1 t2tn.

There are three rule execution situations in neurons σot1 t2tn.


  1. spikes are in neuron σot1 t2tn initially. 2 spikes are emitted to this neuron from neuron σS, then forgetting rule a2(a3)+/a5 → λ can be applied with 5 spikes consumed. The number of spikes decreases to . This process repeats S times, and all spikes in neuron σot1 t2tn are consumed. At this step, the last one spike is emitted to this neuron from neuron σS, forgetting rule a → λ can be applied to consume this spike.

  2. spikes are in neuron σot1 t2tn initially. 2 spikes are emitted to this neuron from neuron σS, then forgetting rule a2(a3)+/a5 → λ can be applied with 5 spikes consumed. The number of spikes decreases to . This process repeats times, and all spikes in neuron σot1 t2tn are consumed. At this step, two spikes are emitted to this neuron from neuron σS, and neuron dissolution rule [a2]ot1 t2tnδ(t1 t2tn = 1, 2, …, n) is applied to dissolve this neuron.

  3. spikes are in neuron σot1 t2tn initially. 2 spikes are emitted to this neuron from neuron σS, then forgetting rule a2(a3)+/a5 → λ can be applied with 5 spikes consumed. The number of spikes decreases to . This process repeats S times, and spikes are remaining. At the next step, the last one spike in neuron σS is emitted to this neuron, and dissolution rule [a(a3)+]ot1 t2tnδ(t1 t2tn = 1, 2, …, n) is applied to dissolve this neuron.

If some neurons σot1 t2tn are still in the system after step 2n + xmax + s + 5, the labels of these neurons σot1 t2tn are all solutions to this Subset Sum problem.

It can be seen that any Subset Sum problem (n) can be solved in linear time, and all solutions can be obtained through this system.

Some steps comparison results between our solution and other solutions, which use the non-deterministic method to solve the NP-complete problems, are shown in Table 2, where, k means that all x1, …, xn, S can be transformed into k-bit binary numbers.

thumbnail
Table 2. Steps comparison results of some uniform solutions to Subset Sum problem.

https://doi.org/10.1371/journal.pone.0162882.t002

The conventional methods use the nondeterminism of SN P systems to solve Subset Sum problem, which means that whether a random combination of integers is one of the solutions or not can be checked by one computational process. These SN P systems can only judge whether a certain subset is the answer or not, but cannot search all solution space to judge whether a Subset Sum problem has solutions. Even if we let all combinations be traversed artificially to determine whether a Subset Sum problem has solutions or not, (2n − 1)-times computations should be processed. Although the time complexity of each computation is a constant, the whole time complexity cannot be a polynomial of n. The proposed DDSN P system can solve the Subset Sum problem in a linear time, which improves the computational efficiency.

Considering a Subset Sum problem Subset Sum problem (4): X = {1, 2, 3, 4}, S = 5, the DDSN P system Π4 is used to solve it. After 22 computational steps, neurons σo0110 and σo1001 are remaining which shows that {2, 3} and {1, 4} are all solutions to this Subset Sum problem. Methods proposed in [19, 20, 23] need 165 steps, 330 steps and 270 steps, respectively to judge this problem.

A series of Subset Sum problems: X = {1, 2, …, n}, S = 5 are solved using the five systems in Table 2 and the computational steps of these systems are shown in Fig 18 by MATLAB R2014a. The computational steps of DDSN P system are much fewer, especially when the problem size is larger.

thumbnail
Fig 18. The computational steps of five types of SN P system solving Subset Sum problem.

https://doi.org/10.1371/journal.pone.0162882.g018

4 Conclusions

The new mechanism called neuron dissolution is introduced into the framework of SN P systems in this work. By this mechanism, redundant neurons can be dissolved immediately. The computational resources can be saved, which means more work can be done using the same resources, or the same work can be done using less resources. We also proved that this new variant of SN P system can obtain all solutions to NP-complete problems (Invalid solutions are eliminated by neuron dissolution.), such as SAT problem and the Subset Sum problem, in linear time, which enhances the application fields of SN P systems such as the register allocation problem.

This work provides a new thought of storing information in SN P systems, which can be used to store other information. The dissolution rule can be used to many situations to decrease the space complexity of a SN P system. This variant of SN P system can be used to solve other NP-complete problems and application problems. It is also an attractive direction to introduce other biological phenomena into SN P systems to reduce computational resources and enhance computational space efficiency.

Author Contributions

  1. Conceptualization: YZ XL.
  2. Formal analysis: YZ WW.
  3. Funding acquisition: XL.
  4. Methodology: YZ XL.
  5. Project administration: XL.
  6. Resources: WW.
  7. Software: YZ WW.
  8. Supervision: XL.
  9. Validation: YZ WW.
  10. Visualization: XL.
  11. Writing – original draft: YZ WW.
  12. Writing – review & editing: XL.

References

  1. 1. Ionescu M, Păun G, Yokomori T. Spiking neural P systems. Fundamenta Informaticae. 2006 Aug;71(2):279–308.
  2. 2. Cabarle F G C, Adorna H N, Pérez-Jiménez M J, Song T. Spiking neural P systems with structural plasticity. Neural Computing and Applications. 2015 Feb;26(8):1905–1917.
  3. 3. Cabarle F G C, Buño K C, Adorna H N. On the delays in spiking neural P systems. Symposium on Mathematical Aspects of Computer Science. 2012 Dec;12(12):25–29.
  4. 4. Cabarle F G C, Buño K C, Adorna H N. Time after time: notes on delays in spiking neural P systems. Theory and Practice of Computation. 2012 Sep;7:82–92.
  5. 5. Cabarle F G C, Adorna H N, Pérez-Jiménez M J. Sequential spiking neural P systems with structural plasticity based on max/min spike number. Neural Computing and Applications. 2016 Jul;27(5):1337–1347.
  6. 6. Song T, Pan L. Spiking neural P systems with rules on synapses working in maximum spikes consumption strategy. IEEE Transactions on Nanobioscience. 2015 Jan;14(1):38–44. pmid:25389243
  7. 7. Song T, Pan L. Spiking neural P systems with rules on synapses working in maximum spiking strategy. IEEE Transactions on Nanobioscience. 2015 Jun;14(4):465–477.
  8. 8. Song T, Zou Q, Zeng X, Liu X. Asynchronous spiking neural P systems with rules on synapses. Neurocomputing. 2015 Mar;151(1):1439–1445.
  9. 9. Song T, Xu J, Pan L. On the universality and non-nniversality of spiking neural P systems with rules on synapses. IEEE Transactions on Nanobioscience. 2015 Dec;14(8):960–966. pmid:26625420
  10. 10. Pan L, Zeng X, Zhang X, Jiang Y. Spiking neural P systems with weighted synapses. Neural Processing Letters. 2012 Feb;35(1):13–27.
  11. 11. Tu M, Wang J, Peng H, Shi P. Application of adaptive fuzzy spiking neural P systems in fault diagnosis model of power systems. Chinese Journal of Electronics. 2014 Jan;23(1):87–92.
  12. 12. Zhang G, Rong H, Neri F, Pérez-Jiménez M J. An optimization spiking neural P system for approximately solving combinatorial optimization problems. International Journal of Neural Systems. 2014 Aug;24(05):1–16.
  13. 13. Zhang X, Pan L, Păun A. On universality of axon P systems. IEEE Transactions on Neural Networks and Learning Systems. 2015 Nov;26(11):2816–2829. pmid:25680218
  14. 14. Zeng X, Zhang X, Zhang J, Liu J. Simulating spiking neural P systems with circuits. Journal of Computational and Theoretical Nanoscience. 2015 Sep;12(9):2023–2026.
  15. 15. Song T, Zheng P, Wong M L D, Wang X. Design of logic gates using spiking neural P systems with homogeneous neurons and astrocytes-like control. Information Sciences. 2016 Dec; 372: 380–391.
  16. 16. Chen H, Ionescu M, Ishdorj T O. On the efficiency of spiking neural P systems. Fourth Brainstormming Week on Membrane Computing. 2006 Jan;1:195–206.
  17. 17. Ishdorj T O, Leporati A. Uniform solutions to SAT and 3-SAT by spiking neural P systems with pre-computed resources. Natural Computing. 2008 Dec;7(4):519–534.
  18. 18. Leporati A, Gutiérrez-Naranjo M A. Solving Subset Sum by spiking neural P systems with pre-computed resources. Fundamenta Informaticae. 2008 Nov;87(1):61–77.
  19. 19. Leporati A, Zandron C, Ferretti C, Mauri G. Solving numerical NP-complete problems with spiking neural P systems. Membrane Computing. 2007 Jun;4860:336–352.
  20. 20. Leporati A, Mauri G, Zandron C, Păun Gh, Pérez-Jiménez M J. Uniform solutions to SAT and Subset Sum by spiking neural P systems. Natural Computing. 2009 Dec;8(4):681–702.
  21. 21. Leporati A, Zandron C, Ferretti C, Mauri G. On the computational power of spiking neural P systems. International Journal of Unconventional Computing. 2009 Jan;5(5):459–473.
  22. 22. Cabarle F G C, Hernandez N H S, Martínez-del Amor M A. Spiking Neural P Systems with Structural Plasticity: Attacking the Subset Sum Problem. Membrane Computing. 2015 Aug;9504:106–116.
  23. 23. Song T, Luo L, He J, Chen Z, Zhang K. Solving subset sum problems by time-free spiking neural P systems. Applied Mathematics and Information Sciences. 2014 Jan;8(1):327–332.
  24. 24. Song T, Zheng H, He J. Solving vertex cover problem by tissue P systems with cell division. Applied Mathematics and Information Science. 2014 Jan;8(1):333–337.
  25. 25. Pan L, Păun Gh, Pérez-Jiménez M J. Spiking neural P systems with neuron division and budding. Science China Information Sciences. 2011 Aug;54(8):1596–1607.
  26. 26. Wang J, Hoogeboom H J, Pan L. Spiking neural P systems with neuron division. Membrane Computing. 2011 Aug;361–376.
  27. 27. Galli R, Gritti A, Bonfanti L, Vescovi A L. Neural stem cells an overview. Circulation Research. 2003 May;92(6):598–608. pmid:12676811
  28. 28. Brown D A, Yang N, Ray S D. Encyclopedia of Toxicology (Third Edition). Amsterdam: Elsevier.; 2014.
  29. 29. Păun Gh. Computing with membranes. Journal of Computer and System Sciences. 2000 Aug;61(1):108–143.
  30. 30. Păun Gh., Rozenberg G., Salomaa A.. The Oxford handbook of membrane computing. Oxford: Oxford University Press.; 2010.
  31. 31. Song T, Pan L. Spiking neural P systems with request rules. Neurocomputing. 2016 Jun;193(12):193–200.
  32. 32. Wang X, Song T, Gong F, Zheng P. On the computational power of spiking neural P systems with self-organization. Scientific Reports. 2016 Jun;6:27624. pmid:27283843
  33. 33. Song T, Wang X. Homogenous spiking neural P systems with inhibitory synapses. Neural Processing Letters. 2015 Aug;42(1):199–214.
  34. 34. Song T, Liu X, Zeng X. Asynchronous spiking neural P systems with anti-spikes. Neural Processing Letters. 2015 Dec;42(3):633–647.
  35. 35. Díaz-Pernil D, Berciano A, Pena-Cantillana F, Gutiérrez-Naranjo M A. Segmenting images with gradient-based edge detection using membrane computing. Pattern Recognition Letters. 2013 Jun;34(8):846–855.
  36. 36. Păun Gh, Păun R. Membrane computing and economics: numerical P systems. Fundamenta Informaticae. 2006 Sep;73(1–2):213–227.
  37. 37. Pan L, Păun Gh, Song B. Flat maximal parallelism in P systems with promoters. Theoretical Computer Science. 2016 Apr;623(11):83–91.
  38. 38. Michael R G, David S J. Computers and intractability: a guide to the theory of NP-completeness. San Francisco: WH Freeman and Co.; 1979.