Novel Numerical Spiking Neural P Systems with a Variable Consumption Strategy

A novel variant of NSN P systems, called numerical spiking neural P systems with a variable consumption strategy (NSNVC P systems), is proposed. Like the spiking rules consuming spikes in spiking neural P systems, NSNVC P systems introduce a variable consumption strategy by modifying the form of the production functions used in NSN P systems. Similar to the delay feature of the spiking rules, NSNVC P systems introduce a postponement feature into the production functions. The execution of the production functions in NSNVC P systems is controlled by two, i.e., polarization and threshold, conditions. Multiple synaptic channels are used to transmit the charges and the production values in NSNVC P systems. The proposed NSNVC P systems are a type of distributed parallel computing models with a directed graphical structure. The Turing universality of the proposed NSNVC P systems is proved as number generating/accepting devices. Detailed descriptions are provided for NSNVC P systems as number generating/accepting devices. In addition, a universal NSNVC P system with 66 neurons is constructed as a function computing device.


Introduction
Membrane computing is a class of distributed parallel-computing models introduced by Păun [1], which is inspired by the structure and function of living cells and their cooperation in tissues, organs, and biological neural networks. These computing models are called P systems or membrane systems [2]. There are three main types of P systems, i.e., cell-like P systems, tissue-like P systems and neural-like P systems. Specifically, the cell-like P systems were proposed based on the hierarchical structure of biological membranes in cells, the tissue-like P systems were abstracted from the communication and cooperation of cells in biological tissues, and the neural-like P systems were inspired by the facts that neurons communicate with each other by firing short electrical impulses or spikes.
Spiking neural P (SN P) systems, proposed by Ionescu et al. [3], are a main form of neural-like P systems. A SN P system consists of a network of neurons connected together in a directed graph and can be regarded as the third generation of neural network models.
In the past few years, many variants of SN P systems have been proposed and studied as being inspired by various biological activities and/or by combining methods and ideas in computer science and mathematics. SN P systems with astrocytes, having excitatory and inhibitory influences on synapses, were discussed by Păun [4] and Pan et al. [5]. SN P systems with anti-spikes were constructed by Pan and Păun [6] with anti-spikes abstracted from inhibitory impulses that participate in spiking and forgetting rules and annihilate spikes when they are in the same neuron. Motivated by the biological phenomenon that each neuron has a positive or negative charge, SN P systems with polarizations are established by Wu et al. [7]. SN P systems with rules on synapses were proposed 1.
By modifying the form of the production functions, NSNVC P systems adopt a new variable consumption strategy, in which the values of the variables involved will have a prescribed consumption rate without all being set to 0 after a production function execution.

2.
In addition to assigning a threshold to each production function to control the firing of the neurons, polarizations of the neurons, where the production functions are located, are also used to control production function executions in NSNVC P systems. Therefore, both the polarization and the threshold can control the execution of a production function. 3.
The proposed NSNVC P systems also introduce postponement features and multiple synaptic channels to reduce the complexity and the number of computing units, i.e., neurons, of the systems.
Some variants of P systems with their abbreviations and full names cited in this work are listed in Table 1. Comparisons of performances of the proposed NSNVC P systems with some of these variants of P systems listed in Table 1 are given in Section 5. Table 1. Abbreviations and corresponding full names of some P systems cited in this work.

System
Full Name SNP systems [3] Spiking neural P systems PSN P systems [7] Spiking neural P systems with polarizations SNP-MC systems [17] Small universal asynchronous spiking neural P systems with multiple channels NP systems [37] Numerical P systems NSN P systems [41] Numerical spiking neural P systems SNP-IR systems [42] Spiking neural P systems with inhibitory rules PASN P systems [43] Simplified and yet Turing universal spiking neural P systems with polarizations optimized by anti-spikes PSNRS P systems [44] Spiking neural P systems with polarizations and rules on synapses The main motivation of this work is to design NSNVC P systems to improve the computation performance of NSN P systems. In NSNVC P systems, a new variable consumption strategy is proposed, which not only improves the computation mechanism, but also increases the controlling ability of NSN P systems. In addition, the improvement in the computation performance of NSN P systems will be investigated when both polarization and threshold are used to control the execution of the production functions. The improvement in computation performance of NSN P systems is made by enhancing their controlling ability, improving their operating efficiency, and reducing the number of neurons used. As a result, the new variant of NSN P systems, i.e., the NSNVC P systems, is expected to be more suitable for solving real-world problems.
The rest of this paper is organized as follows. A formal definition and an illustrative example of NSNVC P systems are presented in Section 2. The proof of the universality of NSNVC P systems as number accepting/generating devices is given in Section 3. Section 4 Processes 2021, 9, 549 4 of 21 investigates the universality of NSNVC P systems as function computing devices. Section 5 draws conclusions and outlines future research directions.

NSNVC P Systems
A formal definition of the proposed NSNVC P systems is presented and notations used in NSNVC P systems are defined in this section. An example is then given to facilitate the understanding of the proposed NSNVC P systems. The set of natural numbers, the set of positive integers, and the set of integers are represented by N, N + and Z, respectively.

1.
L ⊆ N + represents the set of channel labels. 2. σ 1 , σ 2 , . . . , σ m represents m neurons with the form The specifics of a neuron are given below. L i ⊆ L is a finite set of channel labels of neuron σ i , indicating its synaptic channels. A synaptic channel of neuron σ i may involve one or more synapses connecting neuron σ i to other neurons and a synapse may be involved in a number of synaptic channels. (c) Pr f i represents a finite set of production functions associated with neuron α, β ∈ {+, 0, −}; l is the channel label indicating the synaptic channel of neuron σ i associated with the function; 1 ≤ h ≤ |Pr f i | is used to distinguish the production functions contained in neuron σ i ; C h ∈ N is the consumption rate of the variables when the production function f h,i . executes; T h ∈ N + refers to the threshold at which the production function can execute; and d ≥ 0 indicates the postponement future of the production function. If d = 0, the form of production function is simplified to α/ f h,i (x l,i , . . . , . . , m} × {1, 2, . . . , m} × L with i = j is the set of synapses among the m neurons with their channel labels, where (i, j, l) ∈ syn means that neuron σ i connects to neuron σ j via synaptic channel l. If a synapse connects from neuron σ i to neuron σ j , neuron σ i is called a presynaptic neuron of neuron σ j and neuron σ j is called a postsynaptic neuron of neuron σ i .

4.
in indicates the input neuron.

5.
out indicates the output neuron.
Numerical variables in NSNVC P systems are represented by x with subscripts. Specifically, the first subscript of a variable indicates the order of the variable among all the variables in the same neuron, and the second subscript is the label of the neuron. For example, variable x q,i represents variable q in neuron σ i . The value of variable x q,i at time t is expressed as x q,i (t) for 1 ≤ q ≤ k i and 1 ≤ i ≤ m. Usually, the values of the variables are real numbers. This work restricts the values of the variables to an interval of integers in order to simplify the computation, although NSNVC P systems have the computational capability of processing real umbers. The subscripts of the production functions are used in the same ways as those of the numerical variables, e.g., production function f h,i represents function h in neuron σ i . In fact, production functions can be any mathematical functions. However, NSNVC P systems are able to achieve the same capabilities as Turing machines under the condition of only using linear functions. Two forms of, i.e., non-threshold f h,i (x l,i , . . . , x k i ,i ) and threshold f h,i (x l,i , . . . , x k i ,i ) T h , production functions exist in NSN P systems. When T h ≤ min(x 1,i (t), . . . , x k,i (t)), the threshold production function f h,i (x l,i , . . . , x k i ,i ) T h can execute, i.e., the neuron where the production function f h,i (x l,i , . . . , x k i ,i ) T h is located can fire. However, the neuron where the non-threshold production function f h,i (x l,i , . . . , x k i ,i ) is located lost the firing feature. In addition, the values of all variables involved in the production function, whether threshold or non-threshold, will be reset to 0 immediately after the function execution.
The execution of production functions in NSNVC P systems will be described below. At time t, the execution of a production function α/ f h,i (x l,i , . . . , (l) in neuron σ i can be roughly divided into three, i.e., comparison, production and distribution, stages.

1.
Comparison stage: Only when neuron σ i contains just charge α and the current values of the variables x 1,i (t), . . . , x k i ,i (t) involved in the production function are all equal to the threshold T h , i.e., x 1,i (t) = · · · = x k,i (t) = T h , the production func- (l) can apply. Otherwise, the production function cannot apply.

2.
Production stage: (l) can be applied at time t, then its production value prv h,i (t) = f h,i (x l,i , . . . , x k i ,i ) is calculated based on the current values of the variables x 1,i (t), . . . , x k i ,i (t).

3.
Distribution stage: The distribution of the production value prv h,i (t) and a charge β is based on the repartition protocol, which is stated in the following. The production value prv h,i (t) and the charge β are transmitted to all postsynaptic neurons σ j of neuron σ i through synaptic channel l at time t + d. If d = 0, the transmission happens immediately at time t. If d ≥ 1, then neuron σ i is dormant, i.e., cannot fire nor receive new production values, at time t, t + 1, . . . , t + d − 1. At time t + d, neuron σ i becomes active again and the transmission occurs. In particular, the value received by neuron σ j will be immediately passed to its variables, which will increase or decrease the values of the variables.
Based on the variable consumption strategy, after the execution of production function (l), all variables involved will "consume" a value of C h , while the variables not involved will keep their current values. Moreover, the condition C h ≤ min(x 1,i (t), . . . , x k,i (t)) must be satisfied before the execution of the production function. If neuron σ i receives several production values at time t, prv(t) will be the sum of all these production values. Then, the value of variable x q,i in neuron σ i at time t + 1 is updated according to (1) in the following: At the same time, neuron σ i also receives the charges delivered by all its presynaptic neurons. The charge calculation rules are as follows:

•
Multiple positive, neutral and negative charges will degenerate to a single charge of the same kind. • A positive charge plus a negative charge will produce a neutral charge. • A positive or negative charge will not change after a neutral charge is added to it.
In NSNVC P systems, at most one production function can execute in a single neuron at each time moment, and all neurons in system Π work in parallel. At a certain time moment, when more than one production function can satisfy the condition to execute in a neuron, one production function in the neuron will be chosen non-deterministically to apply. A configuration of system Π is represented by the polarizations of all neurons and the current values of all the variables contained therein. At time t, the configuration of system Π is represented by a vector C t = α 1 , x 1,1 (t), . . . , x k i ,1 (t) , . . . , α m , x 1,m (t), . . . , where α i ∈ {+, 0, −} indicates the charge of neuron σ i , and x q,i (t) ∈ Z is the current value of x q,i , for 1 ≤ q ≤ k i and 1 ≤ i ≤ m. Therefore, the initial configuration of the system is C 0 = α 1 , x 1,1 (0), . . . , x k i ,1 (0) , . . . , α m , x 1,m (0), . . . , x k i ,m (0) . A transition of system Π is defined as an update from one configuration to another, i.e., C t ⇒ C t+1 This transition is realized by the system by applying production functions in parallel. Starting from the initial configuration C 0 , a series of finite or infinite transitions of system Π, i.e., C 0 ⇒ C 1 ⇒ · · · ⇒ C s with s ∈ N, is called a system calculation. When system Π progresses to a configuration where no production functions can apply, the system halts and the calculation terminates. A NSNVC P system Π can be used as a number generating device, also called a number generator, and can generate a number n. In this case, the output neuron σ out is used to output the computation result. The number generated by system Π is related to the moments when the output neuron σ out fires. Specifically, if t 1 and t 2 are the first two time moments when the output neuron emits a nonzero value to the environment, then the time interval t 2 − t 1 is defined as the computation result, i.e., the number generated by system Π. In this way, the entire system needs a global clock to pace the time for all neurons, and system Π is assumed to start working at time t = 1. All computation results produced by system Π are represented by N 2 (Π), where the subscript 2 represents the interval between the first two time moments when the output neuron fires. A NSNVC P system Π can also be used as a number accepting device, also called a number acceptor. In this case, the input neuron σ in is used to introduce numbers into the system. The output neuron is removed from the system when it is used as a number accepting device. The number n ∈ N + introduced into the system is encoded by the time interval between the first two time moments when the input neuron fires. When the system computation stops, the number n is accepted by the system. The set of all numbers accepted by system Π is represented by N acc (Π).
The family of all sets of numbers generated/accepted by NSNVC P systems is represented by N ch p η I NSNP poly λ (r) , where η ∈ {2, acc}, ch p indicates that the system uses at most p charges, and poly λ (r) indicates that each production function is a polynomial with a degree of at most λ ≥ 0 and with at most r ≥ 0 variables.

An Illustrative Example
The example system Π ex shown in Figure 1 is used to clarify the components, the definitions, and the functions of NSNVC P systems. System Π ex consists of four neurons σ 1 , σ 2 , σ 3 and σ out , represented by four rectangles and labeled with 1, 2, 3, and out, respectively. Each neuron contains one or more production functions and a list, where the first item in the list is the initial charge of the neuron, and the other items are the variables with the initial values in parentheses. A neuron may contain multiple variables. The output neuron σ out is used to transmit calculation results to the environment. A synapse is represented by an arrow connecting two neurons. A synaptic channel of a neuron is represented by the channel label marked on one or more synapses connecting from the neuron to other neurons.
respectively. Each neuron contains one or more production functions and a list, where the first item in the list is the initial charge of the neuron, and the other items are the variables with the initial values in parentheses. A neuron may contain multiple variables. The output neuron out σ is used to transmit calculation results to the environment. A synapse is represented by an arrow connecting two neurons. A synaptic channel of a neuron is represented by the channel label marked on one or more synapses connecting from the neuron to other neurons. Apparently, the initial Since neuron 1 σ contains the initial charge + and the initial value of variable 1,1 x is equal to the threshold 2, the production function x will decrease by 1 after production function Similarly, production function Apparently, the initial Since neuron σ 1 contains the initial charge + and the initial value of variable x 1,1 is equal to the threshold 2, the production function +/ f 1,1 = x 1,1 − 1| 1 2 ; +; (1) can be enabled. At time t = 1, without a postponement feature, i.e., d = 0, production function +/ f 1,1 = x 1,1 − 1| 1 2 ; +; (1) executes and neuron σ 1 immediately transmits a value of 1 and a positive charge to neurons σ 2 and σ 3 via synaptic channel (1). According to the variable consumption strategy, the value of variable x 1,1 will decrease by 1 after production function (1) in output neuron σ out also meets the execution condition at time t = 1, so that output neuron σ out sends the first nonzero value of 1 to the environment and the value of variable x 1,out becomes 0. However, neurons σ 2 and σ 3 cannot fire because their functions do not satisfy their execution conditions.
Due to the firing of neuron σ 1 , neurons σ 2 and σ 3 both receive a positive charge and the values of variables x 1,2 , x 2,2 and x 3,1 all increase by 1. Therefore, the configuration of system Π ex at time t = 1 becomes C 1 = ([+, 1], [+, 2, 2], [+, 1], [+, 0]). Accordingly, production function +/ f 1,2 = x 1,2 + x 2,2 − 3| 1 2 ; +; (1) of neuron σ 2 satisfies the execution condition and neuron σ 2 sends a value of 1 and a neutral charge to neurons σ out and σ 1 via synaptic channel (1) at time t = 2. From the charge calculation rules, the transmission of neutral charges does not have any effect on the polarization of the postsynaptic neurons. Therefore, the polarizations of neurons σ out and σ 1 do not change but the values of variables x 1,1 and x 1,out increase by 1.
The two production functions (2) of neuron σ 3 also satisfy their execution conditions at time t = 2, but only one of them will be selected non-deterministically for application. Assuming production function (1) is selected, neuron σ 3 sends a value of −1 and a neutral charge to neuron σ out via synaptic channel (1). Since neurons σ 2 and σ 3 send values of 1 and −1, respectively, to neuron σ out at the same time, the value of variable x 1,out in neuron σ out does not change. Therefore, neuron σ out will not fire. The configuration of system Π ex at time At time t = 3, only production function +/ f 1,1 = x 1,1 − 1| 1 2 ; +; (1) in neuron σ 1 meets the execution condition, so that neuron σ 1 sends a positive charge and a value of 1 to neurons σ 2 and σ 3 . As a result of this transmission, only the values of the variables change. Thus, the configuration of system Π ex at time t = 3 becomes C 3 = ([+, 1], [+, 2, 2], [+, 1], [+, 0]). Obviously, the configuration of system Π ex at time t = 3 is the same as that at time t = 1. If the production function +/ f 1,3 = −x 1,3 | 1 1 ; 0; (1) in neuron σ 3 continues to execute, system Π ex will loop between these two configurations indefinitely. Suppose production function +/ f 2,3 = −x 1,3 | 1 1 ; 0; 1; (2) in neuron σ 3 is chosen to execute at time t = 2t + 2 for t ∈ N. However, since production function +/ f 2,3 = −x 1,3 | 1 1 ; 0; 1; (2) needs to postpone the execution for a time span of d = 1, it will execute at time t = 2t + 3. Thus, the configuration of system Π ex at time t = 2t + 2 becomes 1]). At time t = 2t + 3, neuron σ out fires and sends the second nonzero value to the environment. At the same time, production functions in neurons σ 1 and σ 3 also satisfy their execution conditions. Therefore, neuron σ 3 sends a neutral charge and a value of −1 to neurons σ 1 , σ 2 and σ out via synaptic channel (2), and neuron σ 1 transmits a positive charge and a value of 1 to neurons σ 2 and σ 3 via synaptic channel (1). Thus, the config- At time t = 2t + 4, neuron σ 3 faces two choices again, but neuron σ out will not fire no matter which production function is applied. The final configuration of system Π ex becomes Figure 2 shows the configuration dynamics of system Π ex . Each configuration in turn involves variables in neurons σ 1 , σ 2 , σ 3 and σ out . The number generated by system Π ex is the time interval between the first two time moments when the output neuron σ out sends non-zero values to the environment, i.e., (2t + 3) − 1 = 2t + 2, with t ∈ N. In other words, system Π ex can generate even numbers other than 0. Hence, system Π ex can be used as a number generating device.
Processes 2021, 9, x FOR PEER REVIEW 9 of 24 is selected, or becomes Figure 2 shows the configuration dynamics of system Π ex . Each configuration in turn involves variables in neurons 1 2 3 ,, σ σ σ and out σ . The number generated by system Π ex is the time interval between the first two time moments when the output neuron out σ sends non-zero values to the environment, i.e.,   In other words, system Π ex can generate even numbers other than 0. Hence, system Π ex can be used as a number generating device.

Turing Universality of NSNVC P Systems as Number Generating/Accepting Devices
The focus of this section is on the computation power of NSNVC P systems as number generating/accepting devices. Specifically, the Turing universality of NSNVC P systems is proved as number generators and number acceptors by simulating register machines, i.e., NSNVC P systems can generate/accept all recursively enumerable sets of numbers. The family of all recursively enumerable sets of numbers is represented by NRE.
A register machine is usually represented as a five-tuple 1. m is the number of registers.

2.
H represents a limited set of instruction labels.

Turing Universality of NSNVC P Systems as Number Generating/Accepting Devices
The focus of this section is on the computation power of NSNVC P systems as number generating/accepting devices. Specifically, the Turing universality of NSNVC P systems is proved as number generators and number acceptors by simulating register machines, i.e., NSNVC P systems can generate/accept all recursively enumerable sets of numbers. The family of all recursively enumerable sets of numbers is represented by NRE.
A register machine is usually represented as a five-tuple M = (m, H, l 0 , l h , I), where: 1.
m is the number of registers.

2.
H represents a limited set of instruction labels.

3.
l 0 , l h ∈ H correspond to the START and HALT instruction labels, respectively.

4.
I is a set of labeled instructions. The instructions in I have the following three forms: (a) ADD instructions l i : (ADD(r), l j , l k ), whose function is to add 1 to the value in register r, and move non-deterministically to one of the instructions with labels l j and l k ; (b) SUB instructions l i : (SUB(r), l j , l k ), whose function is to subtract 1 from the value of register r, and then go to the instruction marked by l j if the number stored in r is nonzero, or go to the instruction marked by l k otherwise; (c) The HALT instruction l h : H ALT, whose function is to terminate the operation of the register machine.

NSNVC P Systems as Number Generating Devices
The register machine M can generate a set of numbers N(M) in the generating mode. When all the registers are empty, machine M continuously executes a series of instructions starting from the initial instruction l 0 . When M reaches the HALT instruction, the number stored in the first register is considered to be the number generated by M. In addition, it is well known that register machines can characterize the NRE family.

Proof.
Based on the characterization of NRE, the proof of the inclusion NRE ⊆ N ch 2 2 NSNVC P poly 1 (1) can be obtained by simulating nondeterministic register machines running in the generating mode, while the converse inclusion is achieved by the Turing-Church thesis [41]. A NSNVC P system Π 1 is constructed to simulate the register machine M. Generally, register 1 is used as an output register, and the number that it stores is never decremented during the computation. Specifically, system Π 1 contains three types of modules, i.e., an ADD module to simulate the ADD instruction, a SUB module to simulate the SUB instruction, and a FIN module to output the computation result.
Considering that each production function of any neuron in system Π 1 is only related to one variable, the first index of the variables is omitted and only the second index identifying the neuron housing the variable is retained. For example, the variable x 1,i in neuron σ i is simplified to x i . Similarly, when a neuron contains only one production function, its first index will also be omitted. Although the value of a variable x i changes dynamically, it is always an integer during the entire computation process of system Π 1 , i.e., x i (t) ∈ Z with t ∈ N. In addition, all production functions in system Π 1 are polynomial functions.
In order to simulate M correctly, there is a correspondence between the elements, i.e., the neurons, of system Π 1 and the elements, i.e., the registers and the instructions, of M. Each register r of M corresponds to a neuron σ r in system Π 1 . If register r stores a number n ≥ 0, then the value of variable x r in neuron σ r is −3n. Each labeled instruction is also associated with a neuron, e.g., an instruction with label l i is related to a unique neuron σ l i . Moreover, some auxiliary neurons are also introduced into system Π 1 .
The values of all the variables are 0 in the initial configuration of system Π 1 . System Π 1 starts the simulation of M when variable x l 0 in neuron σ l 0 is assigned a value of 4. Similarly, the ADD module and the SUB module will simulate the corresponding instructions l i : (ADD(r), l j , l k ) and l i : (SUB(r), l j , l k ), respectively, once the value of variable x l i in neuron σ l i is equal to 4 in the simulation process. System Π 1 starts to simulate the HALT instruction l h : H ALT and the entire simulation terminates when variable x l h in neuron σ l h receives a value of 4 at any time moment. Then the FIN module is activated to output the computation results.
To better clarify the whole process of using system Π 1 to simulate M, the ADD, SUB, and FIN modules are shown step by step to simulate the relevant instructions of M.  the operation of adding 1 to the value stored in register r . According to the charge calculation rules, the neutral charge has no effect on the polarization of a neuron, so that the descriptions of the neutral charges will be omitted below. Meanwhile, neuron  x (2) has a postponement feature, production function 0/ f 1,l i = 1 4 x l i | 1 4 ; +; (1) will execute first. Thus, neuron σ l i fires to transmit a positive charge and a value of 1 to neuron σ i 1 via synaptic channel (1). After production function 0/ f 1,l i = 1 4 x l i | 1 4 ; +; (1) executes, the value of variable x l i will decrease by 1 according to the variable consumption strategy. Thus, the configuration of system Π 1 at time

Module ADD-Simulating an ADD Instruction
After a one-step delay, i.e., at time t = t + 2, production function 0/ f 2,l i = 1 − x l i | 3 4 ; 0; 1; (2) executes and neuron σ l i transmits a neutral charge and a value of −3 to neuron σ r via synaptic channel (2), indicating that system Π 1 has completed the operation of adding 1 to the value stored in register r. According to the charge calculation rules, the neutral charge has no effect on the polarization of a neuron, so that the descriptions of the neutral charges will be omitted below. Meanwhile, neuron σ i 1 fires by executing one of the production functions +/ f 1,i 1 = x i 1 | 1 1 ; +; (1) and +/ f 2,i 1 = x i 1 | 1 1 ; 0; (2) nondeterministically.

1.
If production function +/ f 1,i 1 = x i 1 | 1 1 ; +; (1) is selected for execution at time t = t + 2, then neuron σ i 1 sends a positive charge and a value of 1 to neuron σ i 2 . As a result, the polarization of neuron σ i 2 becomes positive and variable x i 2 gets a value of 1. Therefore, the configuration of system Π 1 at time t = t + 2 becomes (1) satisfies the execution condition, so that neuron σ i 2 transmits a value of 4 to neuron σ l j , causing system Π 1 to start simulating the instruction with label l j in M.

2.
If production function +/ f 2,i 1 = x i 1 | 1 1 ; 0; (2) is selected for execution at time t = t + 2, neuron σ i 1 sends a value of 1 to neuron σ i 3 . Therefore, the configuration of system Π At time t = t + 3, neuron σ i 3 transmits a value of 4 to neuron σ l k , causing system Π 1 to start simulating the instruction with label l k in M.
As described above, the ADD module shown in Figure 3 can correctly simulate the ADD instruction l i : (ADD(r), l j , l k ) of M. Specifically, system Π 1 is activated when variable x l i receives the value of 4, and then 1 is added to the value stored in register r. Subsequently, an instruction, l j or l k , is selected non-deterministically for simulation.
3.1.2. Module SUB-Simulating an SUB Instruction l i : SUB(r), l j , l k Figure 4 displays the architecture of the SUB module and the state of the neurons it contains. Suppose system Π 1 starts to simulate the SUB instruction l i : (SUB(r), l j , l k ) at a certain time moment t = t after variable x l i of neuron σ l i has received a value of 4. Thus, production functions 0/ f 1,i 1 = x i 1 − 1| 1 4 ; 0; (1) and 0/ f 1,i 1 = x i 1 − 1| 3 4 ; 0; 1; (2) satisfy the application condition. Production function 0/ f 1,i 1 = x i 1 − 1| 1 4 ; 0(1) executes first and neuron σ l i sends a value of 3 to neuron σ r , indicating that system Π 1 has completed the operation of subtracting 1 from the value stored in register r. The following two situations will occur for neuron σ r .

1.
One situation is that the value of variable x r , i.e., the number stored in register r, is 0 at time t = t . Production function 0/ f r = x r − 2| 3 3 ; +; (1) satisfies the threshold condition after variable x r receives a value of 3. At time t = t + 1, with the execution of this production function, neuron σ r transmits a positive charge and a value of 1 to neurons σ i 1 and σ i 2 , respectively. Since production function 0/ f 2,i 1 = x i 1 − 1| 3 4 ; 0; 1; (2) has a postponement feature, neuron σ l i sends a value of 3 to neuron σ i 1 at time t = t + 1. After production functions 0/ f r = x r − 2| 3 3 ; +; (1) and 0/ f 1,i 1 = x i 1 − 1| 3 4 ; 0; 1; (2) execute, the polarization of neuron σ i 1 becomes positive, and the value of variable x i 1 becomes 4. Therefore, production function +/ f 2,i 1 = x i 1 + 3| 4 4 ; 0; (2) executes at time t = t + 2. Then, neuron σ i 1 transmits a value of 7 to neuron σ i 2 via synaptic channel (2). Consequently, the polarization of neuron σ i 2 becomes positive and the value of variable x i 2 accumulates to 8, causing neuron σ i 2 to transmit a value of 4 to neuron σ l k . Since neuron σ l k receives a value of 4, system Π 1 starts to simulate instruction l k . The other situation is that the value of variable x r is −3n with n ∈ N + at time t = t , i.e., the value stored in register r is greater than 0. After getting a value of 3 from neuron σ l i , the value of variable x r becomes 3 − 3n, which does not satisfy the threshold condition of production function 0/ f r = x r − 2| 3 3 ; +; (1). Thus, neuron σ r will not fire at time t = t + 1. However, due to the execution of production function 0/ f 1,i 1 = x i 1 − 1| 3 4 ; 0; 1; (2), variable x i 1 receives a value of 3 from neuron σ i 1 at time t = t + 1, causing production function 0/ f 1,i 1 = x i 1 + 1| 3 3 ; 0; (1) to execute at time t = t + 2. Ultimately neuron σ l j receives a value of 4 from neuron σ i 1 , leading system Π 1 to start simulating instruction l j .
Consequently, the SUB module can simulate the SUB instruction l i : (SUB(r), l j , l k ) correctly. Specifically, system Π 1 is activated when variable x l i receives the value of 4, then 1 is subtracted from the value stored in register r, and finally an instruction, l j or l k , is selected non-deterministically for simulation according to the value contained in register r. Assuming the value of variable x 1 in neuron σ 1 is −3n with n ∈ N + at time t = t , meaning that a number n is stored in register 1. At time t = t + 1, due to the execution of production function 0/ f l h = x l h − 1| 4 4 ; 0; (1), both variables x out and x h 1 get a value of 3. At the next time moment t = t + 2, both production functions 0/ f 1,out = x out | 3 3 ; 0; 3; (1) and 0/ f 1,h 1 = x h 1 | 0 3 ; 0; (1) can apply. With the execution of production function 0/ f 1,h 1 = x h 1 | 0 3 ; 0; (1), variable x 1 gets a value of 3, indicating that 1 is subtracted from the number stored in register 1. Because production function 0/ f 1,out = x out | 3 3 ; 0; 3; (1) needs to postpone by three steps to execute, neuron σ out emits the first nonzero value of 3 to the environment at time t = t + 4. Since the consumption rate of variable x h 1 is 0, i.e., the value of variable x h 1 is still 3 at time t = t + 3, production function 0/ f 1,h 1 = x h 1 | 0 3 ; 0; (1) in neuron σ h 1 can continue to execute until time t = t + n + 2.
From time t = t + 2 to time t = t + n + 2, variable x 1 gets a total value of 3n + 3. Therefore, the value of variable x 1 at time t = t + n + 2 is 3, which is equal to the threshold of production function 0/ f 1 = 1 − x 1 | 3 3 ; +; (1). With the execution of production function 0/ f 1 = 1 − x 1 | 3 3 ; +; (1), a value of −2 and a positive charge are transmitted to neuron σ h 1 . Thus, production function +/ f 2,h 1 = x h 1 + 3| 1 1 ; +; (1) is activated at time t = t + n + 3. Since the polarization of neuron σ out becomes positive and variable x out gets a value of 4, production function 0/ f 2,out = x out − 1| 4 4 ; 0; (2) executes and neuron σ out emits the second nonzero value of 3 into the environment via synaptic channel (2) at time t = t + n + 4. Production function 0/ f 1 = 1 − x 1 | 3 3 ; +; (1) in neuron σ 1 can also execute at time t = t + n + 3, leading the value of variable x h 1 to become −2. At this point, the system runs to the final configuration because the values of the variables in the neurons no longer satisfy the conditions for the production functions to execute.
From the above discussions, the time interval between the two firings of the output neuron is (t + n + 4) − (t + 4) = n, which is exactly the same as the number stored in register 1. As specified in the definition, the computation result of system Π 1 is equal to n.
Through the discussions of the operating mechanism of the ADD, SUB, and FIN modules, system Π 1 is verified to simulate register machine M correctly in its generating mode, i.e., N 2 (Π 1 ) = N(M). In addition, system Π 1 uses only two types of, i.e., neutral and positive, polarizations, and all production functions are linear with at most one variable. Accordingly, N ch 2 2 NSNVC P poly 1 (1) = NRE holds.

NSNVC P Systems as Number Accepting Devices
When used as a number accepting device, a NSNVC P system Π can accept a number n. In this situation, the function of the input neuron σ in is to accept values from the external environment. Initially, the number n to be computed is accepted by system Π in the form 40 n−1 4, where 4 and 0 are the values introduced into the system. Specifically, assuming that input variable x in receives a value of 4 at time t = t 1 and t = t 2 respectively, the time interval between t = t 1 and t = t 2 , i.e., n = t 2 − t 1 is defined as the number accepted by system Π. Afterwards, the number n is processed by a series of instructions. When it runs to the final configuration, system Π is considered to have accepted the number n. Proof. The proof of the inclusion NRE ⊆ N ch 2 acc NSNVC P poly 1 (1) is verified by simulating deterministic register machines working in the accepting mode, while the converse inclusion is directly confirmed by the Turing-Church thesis [41].
The form of a deterministic register machine is M = (m, H, l 0 , l h , I). Each element of M has the same meaning as that of the corresponding element of the non-deterministic register machine M working in the generating mode. The only difference between M and M is in the form of the ADD instructions. The ADD instructions in M are defined as a deterministic form l i : ADD(r), l j . In addition, the set consisting of all the numbers accepted by M is represented by N acc (M). A NSNVC P system Π 2 is designed to simulate machine M with a similar structure to that of system Π 1 in the generating mode. Especially, system Π 2 consists of a deterministic ADD module, a SUB module, and an INPUT module. The INPUT module is used to introduce numbers to be processed into system Π 2 . The functions of the other two modules remain the same as those in system Π 1 .
The architecture of the INPUT module is shown in Figure 6. In the initial configuration, the values of all the variables in system Π 2 are 0. The input variable x in is assumed to have a value of 4 at time t = t , so that production function 0/ f 1,in = x in | 0 4 ; +; (1) satisfies the execution condition. Consequently, neuron σ in sends a positive charge and a value of 4 to neuron σ in 1 via synaptic channel (1). Because the consumption rate of variable x in is 0, the value of variable x in is still 4 at time t = t + 1. Therefore, production function 0/ f 1,in = x in | 0 4 ; +; (1) will continue to execute at each subsequent time moment until variable x in again has a value of 4.

Turing Universality of NSNVC P Systems for Computing Functions
The lower limit on the number of neurons needed in a NSNVC P system as a universal function computing device is discussed in this section. In order to compute function , H, l 0 , l h , I works as follows. First, generally registers 1 to k of machine M c store the values of the k arguments, and all other registers are empty. Then, machine M c starts a computation by executing the instruction labeled l 0 , and executes a series of instructions to continue the computation. Finally, the value of function f computed by M c is stored in another specific register r t when the HALT instruction l h is reached. Assume (ϕ 0 , ϕ 1 , . . .) is a fixed admissible enumeration of a unary partially recursive function. If a recursive function f satisfies ϕ X (y) = M u ( f (x), y) for natural numbers x and y, then the register machine is considered universal.
Korec [45] introduced a small universal register machine M u = (8, H, l 0 , l h , I) for function computing, as illustrated in Figure 9. The register machine M u consists of 23 instructions and 8 registers numbered from 0 to 7. Initially, two arguments f (x) and y are introduced into registers 1 and 2, respectively, which enable machine M u to compute any ϕ x (y). Moreover, when the computation of M u halts, the number stored in register 0 is the computation result of function ϕ x (y). A NSNVC P system is designed to simulate machine M u . For this purpose, M u is modified as follows. A new register 8 is added, and the original HALT instruction is replaced by three instructions l 22 : (SUB(0), l 23 , l h ), l 23 : (ADD(8), l 22 ) and l h : H ALT. In this way, the calculation result is stored in register 8. The modified register machine is represented by M u , which consists of 9 registers, labeled from 0 to 8, and 25 instructions, including 14 SUB instructions, 10 ADD instructions and 1 HALT instruction.    ADD and/or SUB instructions will not be further discussed in this work. Therefore, a universal NSNVC P system requiring only 66 neurons is obtained as a function computing device. : (2), l ADD l and   21 18 : Compared with NSN P systems, each module of NSNVC P systems needs fewer neurons, indicating that a series of improvements to NSN P systems are successful. These improvements include the proposed variable consumption strategy, the use of polarization and threshold as two conditions to control the execution of production functions, the postponement feature assigned to production functions and the introduction of multiple synaptic channels.
Some of the latest computing models [17,[42][43][44] and a classic computing model [13] as function computing devices are listed in Table 2 along with their numbers of computing units, i.e., neurons. As shown in Table 2, NSNVC P systems need fewer neurons than SNP-IR systems [42], PASN P systems [43], PSNRS P systems [44], and DTNP systems [13] to obtain Turing universality as function computing devices. Although SNP-MC systems [17] need only 38 neurons, fewer than that of NSNVC P systems, to obtain Turing universality as function computing devices, they are in the type of discrete computing models due to the use of spiking rules. However, NSNVC P systems are in the type of continuous computing models with numerical attributes and are more suitable for solving practical problems due to the use of production functions instead of spiking rules. The comparison in Table 2 shows the computational power of NSNVC P systems. Apparently, NSNVC P systems have better computing capability and performance than most other P systems. Table 2. Comparison of different computing models in the number of neurons.

Conclusions
A new variant of NSN P systems, called NSNVC P systems, is proposed by improving the NSN P systems. The improvements are the proposed variable consumption strategy, the use of polarization and threshold, the postponement features of the production functions, and the use of multiple synaptic channels. By simulating register machines, the computational completeness of NSNVC P systems as number generating/accepting devices is proved. Furthermore, a universal NSNVC P system with 66 neurons is constructed to compute Turing computable functions. Compared with NSN P systems, each module of NSNVC P systems needs fewer neurons, indicating that a series of improvements to NSN P systems are successful. These improvements include the proposed variable consumption strategy, the use of polarization and threshold as two conditions to control the execution of production functions, the postponement feature assigned to production functions and the introduction of multiple synaptic channels.
Some of the latest computing models [17,[42][43][44] and a classic computing model [13] as function computing devices are listed in Table 2 along with their numbers of computing units, i.e., neurons. As shown in Table 2, NSNVC P systems need fewer neurons than SNP-IR systems [42], PASN P systems [43], PSNRS P systems [44], and DTNP systems [13] to obtain Turing universality as function computing devices. Although SNP-MC systems [17] need only 38 neurons, fewer than that of NSNVC P systems, to obtain Turing universality as function computing devices, they are in the type of discrete computing models due to the use of spiking rules. However, NSNVC P systems are in the type of continuous computing models with numerical attributes and are more suitable for solving practical problems due to the use of production functions instead of spiking rules. The comparison in Table 2 shows the computational power of NSNVC P systems. Apparently, NSNVC P systems have better computing capability and performance than most other P systems. Table 2. Comparison of different computing models in the number of neurons.

Conclusions
A new variant of NSN P systems, called NSNVC P systems, is proposed by improving the NSN P systems. The improvements are the proposed variable consumption strategy, the use of polarization and threshold, the postponement features of the production functions, and the use of multiple synaptic channels. By simulating register machines, the computational completeness of NSNVC P systems as number generating/accepting devices is proved. Furthermore, a universal NSNVC P system with 66 neurons is constructed to compute Turing computable functions.
The new variable consumption strategy makes NSNVC P systems more flexible and practical. Different from NSN P systems, each production function in NSNVC P systems is assigned a threshold and a polarization. A production function must simultaneously satisfy the threshold and polarization conditions to execute. It is precisely because of these two conditions, NSNVC P systems achieved Turing universality by using only positive and