Extended spiking neural P systems with white hole rules and their red–green variants

We consider extended spiking neural P systems with the additional possibility of so-called “white hole rules”, which send the complete contents of a neuron to other neurons, and we prove that this extension of the original model can easily simulate register machines. Based on this proof, we then define red–green variants of these extended spiking neural P systems with white hole rules and show how to go beyond Turing with these red–green systems. We also discuss the number of actor neurons needed, and the relation of this model to some special variants of Lindenmayer systems.


Introduction
Based on the biological background of neurons sending electrical impulses along axons to other neurons, several models were developed in the area of neural computation, e.g., see Maass (2002), Maass and Bishop (1999), and Gerstner and Kistler (2002). In the area of P systems, the model of spiking neural P systems was introduced in Ionescu et al. (2006). Whereas the basic model of membrane systems, see Pȃun (2000), reflects hierarchical membrane structures, the model of tissue P systems considers cells to be placed in the nodes of a graph. This variant was first considered in Pȃun et al. (2006) and then further elaborated, for example, in  and Martín-Vide et al. (2002). In spiking neural P systems, the cells are arranged as in tissue P systems, but the contents of a cell (neuron) consists of a number of so-called spikes, i.e., of a multiset over a single object. The rules assigned to a neuron allow us to send information to other neurons in the form of electrical impulses (also called spikes) which are summed up at the target neuron; the application of the rules depends on the contents of the neuron and in the general case is described by regular sets. As inspired from biology, the neuron sending out spikes may be ''closed'' for a specific time period corresponding to the refraction period of a neuron; during this refraction period, the neuron is closed for new input and cannot get excited (''fire'') for spiking again.
The length of the axon may cause a time delay before a spike arrives at the target. Moreover, the spikes coming along different axons may cause effects of different magnitude. All these biologically motivated features were included in the model of extended spiking neural P systems considered in Alhazov et al. (2006), the most important theoretical feature being that neurons can send spikes along This paper is an extended version of Alhazov et al. (2015a).
& Rudolf Freund rudi@emcc.at the axons with different magnitudes at different moments of time. In Wang et al. (2010), spiking neural P systems with weights on the axons and firing threshold were investigated, where the values of these weights and firing thresholds as well as the potential consumed by each rule could be natural numbers, integer numbers, rational numbers, and even (computable) real numbers.
In this paper, we will further extend the model of extended spiking neural P systems by using so-called ''white hole rules'', which allow us to use the whole contents of a neuron and send it to other neurons, yet eventually multiplied by some constant rational number.
In the literature, several variants how to obtain results from the computations of a spiking neural P system have been investigated. For example, in Ionescu et al. (2006) the output of a spiking neural P system was considered to be the time between two spikes in a designated output neuron. It was shown how spiking neural P systems in that way can generate any recursively enumerable set of natural numbers. Moreover, a characterization of semilinear sets was obtained by spiking neural P system with a bounded number of spikes in the neurons. These results can also be obtained with even more restricted forms of spiking neural P systems, e.g., no time delay (refraction period) is needed, as it was shown in Ibarra et al. (2006). In Chen et al. (2006), the generation of strings (over the binary alphabet 0 and 1) by spiking neural P systems was investigated; due to the restrictions of the original model of spiking neural P systems, even specific finite languages cannot be generated, but on the other hand, regular languages can be represented as inverse-morphic images of languages generated by finite spiking neural P systems, and even recursively enumerable languages can be characterized as projections of inverse-morphic images of languages generated by spiking neural P systems. The problems occurring in the proofs are also caused by the quite restricted way the output is obtained from the output neuron as sequence of symbols 0 and 1. The strings of a regular or recursively enumerable language could be obtained directly by collecting the spikes sent by specific output neurons for each symbol.
In the extended model considered in Alhazov et al. (2006), a specific output neuron was used for each symbol. Computational completeness could be obtained by simulating register machines as in the proofs elaborated in the papers mentioned above, yet in an easier way using only a bounded number of neurons. Moreover, regular languages could be characterized by finite extended spiking neural P systems; again, only a bounded number of neurons was needed.
In this paper, we now extend this model of extended spiking neural P systems by also using so-called ''white hole rules'', which may send the whole contents of a neuron along its axons, eventually even multiplied by a (positive) rational number. In that way, the whole contents of a neuron can be multiplied by a rational number, in fact, multiplied with or divided by a natural number. Hence, even one single neuron is able to simulate the computations of an arbitrary register machine.
The idea of consuming the whole contents of a neuron by white hole rules is closely related to the concept of the exhaustive use of rules, i.e., an enabled rule is applied in the maximal way possible in one step; P systems with the exhaustive use of rules can be used in the usual maximally parallel way on the level of the whole system or in the sequential way, for example, see Zhang et al. (2008Zhang et al. ( , 2012). Yet all the approaches of spiking neural P systems with the exhaustive use of rules are mainly based on the classic definitions of spiking neural P systems, whereas the spiking neural P systems with white hole rules as investigated in Alhazov et al. (2015a) are based on the extended model as introduced in Alhazov et al. (2006). In this paper we now use this new model of spiking neural P systems with white hole rules together the idea of considering infinite computations on finite inputs, which will allow us to ''go beyond Turing''.
Variants of how to ''go beyond Turing'' are discussed in van Leeuwen and Wiedermann (2012), for example, the definitions and results for red-green Turing machines can be found there. In Aman et al. (2014) the notion of redgreen automata for register machines with input strings given on an input tape (often also called counter automata) was introduced and the concept of red-green P automata for several specific models of membrane systems was explained. Via red-green counter automata, the results for acceptance and recognizability of finite strings by redgreen Turing machines were carried over to red-green P automata. The basic idea of red-green automata is to distinguish between two different sets of states (red and green states) and to consider infinite runs of the automaton on finite input objects (strings, multisets); allowed to change between red and green states more than once, red-green automata can recognize more than the recursively enumerable sets (of strings, multisets), i.e., in that way we can ''go beyond Turing''. In the area of P systems, first attempts to do that can be found in Calude and Pȃun (2004) and Sosík and Valík (2006). Computations with infinite words by P automata were investigated in .
The rest of the paper is organized as follows: In the next section, we recall some preliminary notions and definitions from formal language theory, especially the definition and some well-known results for register machines. Then we define red-green Turing machines and red-green register machines and recall some results from Aman et al. (2014). In Sect. 4 we recall the definitions of the extended model of spiking neural P systems as considered in Alhazov et al. (2006) as well as the most important results established there. Moreover, we show that extended spiking neural P systems with only one actor neuron have exactly the same computational power as register machines with only one register that can be decremented.
In Sect. 5, we define the model of extended spiking neural P systems extended by the use of white hole rules as introduced in Alhazov et al. (2015a). Besides giving some examples, for instance showing how Lindenmayer systems can be simulated by extended spiking neural P systems only using white hole rules, we prove that the computations of an arbitrary register machine can be simulated by only one single neuron equipped with the most powerful variant of white hole rules, i.e., extended spiking neural P systems equipped with white hole rules are even more powerful than extended spiking neural P systems, which need (at least) two neurons to be able to simulate the computations of an arbitrary register machine. Based on this result, we define the red-green variant of spiking neural P systems with white hole rules and show that their computational power is similar to the computational power of red-green register machines. A short summary of the results we obtained concludes the paper.

Preliminaries
In this section we recall the basic elements of formal language theory and especially the definitions and results for register machines; we here mainly follow the corresponding section from Alhazov et al. (2006Alhazov et al. ( , 2015a. For the basic elements of formal language theory needed in the following, we refer to any monograph in this area, in particular, to Rozenberg and Salomaa (1997). We just list a few notions and notations: V Ã is the free monoid generated by the alphabet V under the operation of concatenation and the empty string, denoted by k, as unit element; for any w 2 V Ã , w j j denotes the number of symbols in w (the length of w). N þ denotes the set of positive integers (natural numbers), N is the set of non-negative integers, i.e., The interval of non-negative integers between k and m is denoted by k::m ½ , and k Á N þ denotes the set of positive multiples of k. Observe that there is a one-to-one correspondence between a set M N and the one-letter language L M ð Þ ¼ a n j n 2 M f g ; e.g., M is a regular (semilinear) set of non-negative integers if and only if L M ð Þ is a regular language. By FIN N k À Á , REG N k À Á , and RE N k À Á , for any k 2 N, we denote the sets of subsets of N k that are finite, regular, and recursively enumerable, respectively. By REG (REG V ð Þ) and RE (RE V ð Þ) we denote the family of regular and recursively enumerable languages (over the alphabet V, respectively). By W T L ð Þ we denote the Parikh image of the language L T Ã , and by PsFL we denote the set of Parikh images of languages from a given family FL. In that sense, PsRE V ð Þ for a k-letter alphabet V corresponds with the family of recursively enumerable sets of k-dimensional vectors of non-negative integers.

Register machines
The proofs of the results establishing computational completeness in the area of P systems often are based on the simulation of register machines; we refer to Minsky (1967) for original definitions, and to Freund and Oswald (2002) for the definitions we use in this paper: An n-register machine is a tuple M ¼ n; B; l 0 ; l h ; P ð Þ , where n is the number of registers, B is a set of labels, l 0 2 B is the initial label, l h 2 B is the final label, and P is the set of instructions bijectively labeled by elements of B. The instructions of M can be of the following forms: • l 1 : ADD r ð Þ; l 2 ; l 3 ð Þ , with l 1 2 B n l h f g, l 2 ; l 3 2 B, 1 j n. Increases the value of register r by one, followed by a non-deterministic jump to instruction l 2 or l 3 . This instruction is usually called increment. • l 1 : SUB r ð Þ; l 2 ; l 3 ð Þ , with l 1 2 B n l h f g, l 2 ; l 3 2 B, 1 j n. If the value of register r is zero then jump to instruction l 3 ; otherwise, the value of register r is decreased by one, followed by a jump to instruction l 2 . The two cases of this instruction are usually called zero-test and decrement, respectively. • l h : halt (HALT instruction) Stop the machine. The final label l h is only assigned to this instruction.
A (non-deterministic) register machine M is said to generate a vector s 1 ; . . .; s b À Á of natural numbers if, starting with the instruction with label l 0 and all registers containing the number 0, the machine stops (it reaches the instruction l h : halt) with the first b registers containing the numbers s 1 ; . . .; s b (and all other registers being empty).
Without loss of generality, in the succeeding proofs we will assume that in each ADD instruction l 1 : ADD r ð Þ; l 2 ; l 3 ð Þ and in each SUB instruction l 1 : SUB r ð Þ; l 2 ; l 3 ð Þthe labels l 1 ; l 2 ; l 3 are mutually distinct (for a short proof see ).
Extended spiking neural P systems with white hole rules and their red-green variants 299 The register machines are known to be computationally complete, equal in power to (non-deterministic) Turing machines: they generate exactly the sets of vectors of nonnegative integers which can be generated by Turing machines, i.e., the family PsRE.
Based on the results established in Minsky (1967), the results proved in Freund and Oswald (2002) and  immediately lead to the following result: Proposition 1 For any recursively enumerable set L N b of vectors of non-negative integers there exists a nondeterministic b þ 2 ð Þ-register machine M generating L in such a way that, when starting with all registers 1 to b þ 2 being empty, M non-deterministically computes and halts with n i in registers i, 1 i b, and registers b þ 1 and b þ 2 being empty if and only if n 1 ; . . .; n b À Á 2 L. Moreover, the registers 1 to b are never decremented.
When considering the generation of languages, we can use the model of a register machine with output tape, which also uses a tape operation: • l 1 : write a ð Þ; l 2 ð Þ Write symbol a on the output tape and go to instruction l 2 : We then also specify the output alphabet T in the description of the register machine with output tape, i.e., we write M ¼ m; B; l 0 ; l h ; P; T ð Þ . The following result is folklore, too, e.g., see Minsky (1967): Proposition 2 Let L T Ã be a recursively enumerable language. Then L can be generated by a register machine with output tape with 2 registers. Moreover, at the beginning and at the end of a successful computation generating a string w 2 L both registers are empty, and finally, only successful computations halt.

The arithmetical hierarchy
The Arithmetical Hierarchy-e.g., see Budnik (2006)-is usually developed with the universal (8) and existential (9) quantifiers restricted to the integers. Levels in the Arithmetical Hierarchy are labeled as R n if they can be defined by expressions beginning with a sequence of n alternating quantifiers starting with 9; levels are labeled as P n if they can be defined by such expressions of n alternating quantifiers that start with 8. R 0 and P 0 are defined as having no quantifiers and are equivalent. R 1 and P 1 only have the single quantifier 9 and 8, respectively. We only need to consider alternating pairs of the quantifiers 8 and 9 because two quantifiers of the same type occurring together are equivalent to a single quantifier.

Red-green automata
The exposition of this section mainly follows the corresponding section in Alhazov et al. (2015a).
In general, a red-green automaton M is an automaton whose set of internal states Q is partitioned into two subsets, Q red and Q green , and M operates without halting. Q red is called the set of ''red states'', Q green the set of ''green states''. Moreover, we shall assume M to be deterministic, i.e., for each configuration there exists exactly one transition to the next one.

Red-green turing machines
Red-green Turing machines, see van Leeuwen and Wiedermann (2012), can be seen as a type of x-Turing machines on finite inputs with a recognition criterion based on some property of the set(s) of states visited (in)finitely often, in the tradition of x-automata, for example, see , i.e., we call an infinite run of the Turing machine M on input w recognizing if and only if • no red state is visited infinitely often and • some green states (one or more) are visited infinitely often.
A set of strings L & R Ã is said to be accepted by M if and only if the following two conditions are satisfied: For every string w 6 2 L, the computation of M on input w eventually stabilizes in red; in this case w is said to be rejected.
The phrase ''mind change'' is used in the sense of changing the color, i.e., changing from red to green or vice versa.
The following results were established in van Leeuwen and Wiedermann (2012): Theorem 1 A set of strings L is recognized by a redgreen Turing machine with one mind change if and only if L 2 R 1 , i.e., if L is recursively enumerable.
Theorem 2 (Computational power of red-green Turing machines) 1. Red-green Turing machines recognize exactly the R 2sets of the Arithmetical Hierarchy. 2. Red-green Turing machines accept exactly those sets which simultaneously are R 2and P 2 -sets of the Arithmetical Hierarchy.

Red-green register machines
In Aman et al. (2014), similar results as for red-green Turing machines were shown for red-green counter automata and register machines, respectively.
As it is well-known folklore, e.g., see Minsky (1967), the computations of a Turing machine can be simulated by a counter automaton with (only two) counters; in this paper, we will rather speak of a register machine with (two) registers and with string input. As for red-green Turing machines, we can also color the ''states'', i.e., the labels, of a register machine M ¼ m; B; l 0 ; l h ; P; T in ð Þby the two colors red and green, i.e., partition its set of labels B into two disjoint sets B red (red ''states'') and B green (green ''states''), and we then write RM ¼ m; B; B red ; ð B green ; l 0 ; P; T in Þ, as we can omit the halting label l h .
The following two lemmas were proved in Aman et al. (2014); the step from red-green Turing machines to redgreen register machines is important for the succeeding sections, as usually register machines are simulated when proving a model of P systems to be computationally complete. Therefore, in the following we always have in mind this specific relation between red-green Turing machines and red-green register machines when investigating the infinite behavior of specific models of P automata, as we will only have to argue how red-green register machines can be simulated.
Lemma 1 The computations of a red-green Turing machine TM can be simulated by a red-green register machine RM with two registers and with string input in such a way that during the simulation of a transition of TM leading from a state p with color c to a state p 0 with color c 0 the simulating register machine uses instructions with labels (''states'') of color c and only in the last step of the simulation changes to a label (''state'') of color c 0 .
Lemma 2 The computations of a red-green register machine RM with an arbitrary number of registers and with string input can be simulated by a red-green Turing machine TM in such a way that during the simulation of a computation step of RM leading from an instruction with label (''state'') p with color c to an instruction with label (''state'') p 0 with color c 0 the simulating Turing machine stays in states of color c and only in the last step of the simulation changes to a state of color c 0 .
As an immediate consequence, the preceding two lemmas yield the characterization of R 2 and R 2 \ P 2 by redgreen register machines as Theorem 2 does for red-green Turing machines, see van Leeuwen and Wiedermann (2012): Theorem 3 (Computational power of red-green register machines) 1. A set of strings L is recognized by a red-green register machine with one mind change if and only if L 2 R 1 , i.e., if L is recursively enumerable.
2. Red-green register machines recognize exactly the R 2sets of the Arithmetical Hierarchy. 3. Red-green register machines accept exactly those sets which simultaneously are R 2 -and P 2 -sets of the Arithmetical Hierarchy.

Extended spiking neural P systems
The reader is supposed to be familiar with basic elements of membrane computing, e.g., from Pȃun (2002) and Pȃun et al. (2010); comprehensive information can be found on the P systems web page (www.ppage.psystems.eu). Moreover, for the motivation and the biological background of spiking neural P systems we refer the reader to Ionescu et al. (2006). The definition of an extended spiking neural P system is mainly taken from Alhazov et al. (2006), with the number of spikes k still be given in the ''classical'' way as a k ; later on, we simple will use the number k itself only instead of a k . The definitions given in the following are taken from Alhazov et al. (2006).
• m is the number of cells (or neurons); the neurons are uniquely identified by a number between 1 and m (obviously, we could instead use an alphabet with m symbols to identify the neurons); • S describes the initial configuration by assigning an initial value (of spikes) to each neuron; for the sake of simplicity, we assume that at the beginning of a computation we have no pending packages along the axons between the neurons; • R is a finite set of rules of the form i; E=a k ! P; d À Á such that i 2 1::m ½ (specifying that this rule is assigned to neuron i), E REG a f g ð Þ is the checking set (the current number of spikes in the neuron has to be from E if this rule shall be executed), k 2 N is the ''number of spikes'' (the energy) consumed by this rule, d is the delay (the ''refraction time'' when neuron i performs this rule), and P is a (possibly empty) set of productions of the form l; w; t ð Þ where l 2 1::m ½ (thus specifying the target neuron), w 2 a f g Ã is the weight of the energy sent along the axon from neuron i to neuron l, and t is the time needed before the information sent from neuron i arrives at neuron l (i.e., the delay along the axon). If the checking sets in all rules are finite, then P is called a finite ESNP system.
Definition 2 A configuration of the ESNP system is described as follows: • for each neuron, the actual number of spikes in the neuron is specified; • in each neuron i, we may find an ''activated rule'' i; E=a k ! P; d 0 À Á waiting to be executed where d 0 is the remaining time until the neuron spikes; • in each axon to a neuron l, we may find pending packages of the form l; w; t 0 ð Þwhere t 0 is the remaining time until w j j spikes have to be added to neuron l provided it is not closed for input at the time this package arrives.
A transition from one configuration to another one now works as follows: • for each neuron i, we first check whether we find an ''activated rule'' i; E=a k ! P; d 0 À Á waiting to be executed; if d 0 ¼ 0, then neuron i ''spikes'', i.e., for every production l; w; t ð Þ occurring in the set P we put the corresponding package l; w; t ð Þ on the axon from neuron i to neuron l, and after that, we eliminate this ''activated rule'' i; E=a k ! P; d 0 À Á ; • for each neuron l, we now consider all packages l; w; t 0 ð Þ on axons leading to neuron l; provided the neuron is not closed, i.e., if it does not carry an activated rule i; E=a k ! P; d 0 À Á with d 0 [ 0, we then sum up all weights w in such packages where t 0 ¼ 0 and add this sum of spikes to the corresponding number of spikes in neuron l; in any case, the packages with t 0 ¼ 0 are eliminated from the axons, whereas for all packages with t 0 [ 0, we decrement t 0 by one; • for each neuron i, we now again check whether we find an ''activated rule'' i; E=a k ! P; d 0 À Á (with d 0 [ 0) or not; if we have not found an ''activated rule'', we now may apply any rule i; E=a k ! P; d À Á from R for which the current number of spikes in the neuron is in E and then put a copy of this rule as ''activated rule'' for this neuron into the description of the current configuration; on the other hand, if there still has been an ''activated rule'' i; E=a k ! P; d 0 À Á in the neuron with d 0 [ 0, then we replace d 0 by d 0 À 1 and keep i; E=a k ! P; d 0 À 1 À Á as the ''activated rule'' in neuron i in the description of the configuration for the next step of the computation.
After having executed all the substeps described above in the correct sequence, we obtain the description of the new configuration. A computation is a sequence of configurations starting with the initial configuration given by S. A computation is called successful if it halts, i.e., if no pending package can be found along any axon, no neuron contains an activated rule, and for no neuron, a rule can be activated.
In the original model introduced in Ionescu et al. (2006), in the productions l; w; t ð Þ of a rule i; E=a k ! À l; w; t ð Þ f g; dÞ, only w ¼ a (for spiking rules) or w ¼ k (for forgetting rules) as well as t ¼ 0 was allowed (and for forgetting rules, the checking set E had to be finite and disjoint from all other sets E in rules assigned to neuron i). Moreover, reflexive axons, i.e., leading from neuron i to neuron i, were not allowed, hence, for l; w; t ð Þ being a production in a rule i; E=a k ! P; d À Á for neuron i, l 6 ¼ i was required. Yet the most important extension is that different rules for neuron i may affect different axons leaving from it whereas in the original model the structure of the axons (called synapses there) was fixed. In Alhazov et al. (2006), the sequence of substeps leading from one configuration to the next one together with the interpretation of the rules from R was taken in such a way that the original model can be interpreted in a consistent way within the extended model introduced in that paper. As mentioned in Alhazov et al. (2006), from a mathematical point of view, another interpretation would have been even more suitable: whenever a rule i; E=a k ! P; d À Á is activated, the packages induced by the productions l; w; t ð Þ in the set P of a rule i; E=a k ! P; d À Á activated in a computation step are immediately put on the axon from neuron i to neuron l, whereas the delay d only indicates the refraction time for neuron i itself, i.e., the time period this neuron will be closed. The delay t in productions l; w; t ð Þ can be used to replace the delay in the neurons themselves in many of the constructions elaborated, for example, in Ionescu et al. (2006, and Chen et al. (2006). Yet as in (the proofs of computational completeness given in) Alhazov et al. (2006), we shall not need any of the delay features in this paper, hence we need not go into the details of these variants of interpreting the delays.
Depending on the purpose the ESNP system is to be used, some more features have to be specified: for generating k-dimensional vectors of non-negative integers, we have to designate k neurons as output neurons; the other neurons then will also be called actor neurons. There are several possibilities to define how the output values are computed; according to Ionescu et al. (2006), we can take the distance between the first two spikes in an output neuron to define its value. As in Alhazov et al. (2006), also in this paper, we take the number of spikes at the end of a successful computation in the neuron as the output value. For generating strings, we do not interpret the spike train of a single output neuron as done, for example, in Chen et al. (2006), but instead consider the sequence of spikes in the output neurons each of them corresponding to a specific terminal symbol; if more than one output neuron spikes, we take any permutation of the corresponding symbols as the next substring of the string to be generated.
Remark 1 As already mentioned, there is a one-to-one correspondence between (sets of) strings a k over the oneletter alphabet a f g and the corresponding non-negative integer k. Hence, in the following, we will consider the checking sets E of a rule i; E=a k ! P; d À Á to be sets of nonnegative integers and write k instead of a k for any w ¼ a k in a production l; w; t ð Þof P. Moreover, if no delays d or t are needed, we simply omit them. For example, instead of 2; a i f g=a i ! 1; a; 0 ð Þ; 2; a j ; 0

ESNP systems as generating devices
As in Alhazov et al. (2006), we first consider extended spiking neural P systems as generating devices. The following example gives a characterization of regular sets of non-negative integers: Example 1 Any semilinear set of non-negative integers M can be generated by a finite ESNP system with only two neurons. Let M be a semilinear set of non-negative integers and consider a regular grammar G generating the language L G ð Þ a f g Ã with N L G ð Þ ð Þ¼M; without loss of generality we assume the regular grammar to be of the form G ¼ N; a f g; A 1 ; P ð Þwith the set of non-terminal symbols N, N ¼ A i j 1 i m f g , the start symbol A 1 , and P the set of regular productions of the form B ! aC with B; C 2 N and A ! k. We now construct the finite ESNP system P ¼ 2; S; R ð Þthat generates an element of M by the number of spikes contained in the output neuron 1 at the end of a halting computation: we start with one spike in neuron 2 (representing the start symbol A 1 and no spike in the output neuron 1, i.e., S ¼ 1; 0 ð Þ; 2; 1 ð Þ f g . The production A i ! aA j is simulated by the rule 2; i f g=i ! 1; 1 ð Þ; 2; j ð Þ f g ð Þ and A i ! k is simulated by the rule 2; i f g=i ! ; ð Þ , i.e., in sum we obtain Neuron 2 keeps track of the actual non-terminal symbol and stops the derivation as soon as it simulates a production A i ! k, because finally neuron 2 is empty. In order to guarantee that this is the only way how we can obtain a halting computation in P, without loss of generality we assume G to be reduced, i.e., for every non-terminal symbol A from N there is a regular production with A on the left-hand side. These observations prove that we have N L G ð Þ ð Þ¼M. The following results were already proved in Alhazov et al. (2006): Lemma 3 For any ESNP system where during any computation only a bounded number of spikes occurs in the actor neurons, the generated language is regular.
Theorem 4 Any regular language L with L T Ã for a terminal alphabet T with card T ð Þ ¼ n can be generated by a finite ESNP system with n þ 1 neurons. On the other hand, every language generated by a finite ESNP system is regular.
Corollary 1 Any semilinear set of n-dimensional vectors can be generated by a finite ESNP system with n þ 1 neurons. On the other hand, every set of n-dimensional vectors generated by a finite ESNP system is semilinear.
Theorem 5 Any recursively enumerable language L with L T Ã for a terminal alphabet T with card T ð Þ ¼ n can be generated by an ESNP system with n þ 2 neurons.
Corollary 2 Any recursively enumerable set of n-dimensional vectors can be generated by an ESNP system with n þ 2 neurons.
Besides these results already established in Alhazov et al. (2006), we now prove a characterization of languages and sets of (vectors of) natural numbers generated by ESNPS with only one neuron. Roughly speaking, having only one actor neuron corresponds with, besides output registers, having only one register which can be decremented.
Lemma 4 For any ESNP system with only one actor neuron we can effectively construct a register machine with output tape and only one register that can be decremented, generating the same language, respectively a register machine with one register that can be decremented, generating the same set of (vectors of) natural numbers.
Proof First we notice that the delays would not matter: the overall system is sequential, and therefore it is always possible to pre-compute what happens until the actor neuron re-opens; the weight of all pending packages is also bounded. All the details of storing and managing all these features by the finite control of the register machines are tedious, but very much straightforward. In the following, we therefore assume that the ESNPS is given as: P ¼ðn þ 1; S; RÞ; S ¼fð1; m 1 Þ; . . .; ðn; m n Þ; ðn þ 1; m nþ1 Þg; R ¼fðn þ 1; E r =i r ! fð1; p r;1 Þ; . . .; ðn; p r;n Þ; ðn þ 1; p r;nþ1 ÞgÞ j 1 r qg: Thus, given n, P can be specified by the following nonnegative integers: the number q of rules, initial spikes Extended spiking neural P systems with white hole rules and their red-green variants 303 m 1 ; . . .; m n ; m nþ1 , and, for every rule r, the following ingredients: the number i r of consumed spikes, the numbers p r;1 ; . . .; p r;nþ1 of produced spikes, and the regular sets E r of numbers. Note that, as it will be obvious later, it is enough to only consider the case m 1 ¼ Á Á Á ¼ m n ¼ 0, because otherwise placing the initial spikes can be done by a 1-register machine in a preparatory phase, before switching to the instruction corresponding to starting the simulation.
The main challenge of the construction is to remember the actual ''status'' of the regular checking sets. It is known that every regular set E of numbers is semilinear, and it is possible to write E r ¼ S l r j¼1 ðk r N þ d r;j Þ [ D r , i.e., all the linear sets constituting E r can be reduced to a common period k r , and an additional finite set. Then, we can take a common multiple k of periods k r , and represent each checking set as E r ¼ kN þ þ fd 0 r;j j 1 j l 0 r g [ D 0 r , where D 0 r is finite. Finally, take a number M such that M is a multiple of k, that M is larger than any element of D r , 1 r q, that M is larger than any number d 0 r;j , 1 j l 0 r , 1 r q, that M is larger than any of i r and p r;nþ1 , 1 r q. Then, if neuron n þ 1 has N spikes, the following properties hold: • rule r is applicable if and only if N 2 E r in case when i r N\M, and if and only if M þ ðN mod MÞ 2 E r in case when N ! M, • the difference between the number of spikes in neuron n þ 1 in two successive configurations is not larger than M.
For neuron n þ 1, Mk þ j spikes (where 0 j M À 1) will be represented by value k of register 1 and state j. We simulate P by a register machine R with one register and an output tape of m symbols. Before we proceed, we need to remark that, without restricting the generality, we may have an arbitrary set of ''next instructions'' instead of fl 2 ; l 3 g in l 1 : ðADDðrÞ; l 2 ; l 3 Þ, and arbitrary sets of ''next instructions'' instead of fl 2 g and fl 3 g in l 1 : ðSUBðrÞ; l 2 ; l 3 Þ. Indeed, non-determinism between choice of multiple instructions can be implemented by an increment followed by a decrement in each case, as many times as needed for the corresponding set of ''next instructions''. Clearly, l 1 : ðADDðrÞ; fl 2 gÞ is just a shorter form of l 1 : ðADDðrÞ; l 2 ; l 2 Þ.
Finally, besides instructions ADD(r), SUB(r), write(a) and halt, we introduce the notation of NOP, meaning only a switch to a different instruction without modifying the register. This will greatly simplify the construction below, and such a notation can be reduced to either compressing the rules (by substituting the instruction label with the label of the next instruction in all other instructions), or be simulated by an ADD(1) instruction, followed by a SUB(1) instruction.
We take bðm nþ1 mod MÞ as the starting state of R, and the starting value of register 1 is m nþ1 div M.
For every class modulo M, 0 j M À 1, we define sets L j;0 ¼ fl r;0 j 1 r q; j 2 E r ; i r ! jg; L j;þ ¼ fl r;þ j 1 r q; j þ M 2 E r g of applicable rules corresponding to remainder j, subscripts 0 and þ represent cases of having less than M spikes, and at least M spikes, respectively. Let us redefine any of these sets to fl h g if the expression above is empty. We proceed with the actual simulation. A rule n þ 1; E r =i r ! ð1; p r;1 Þ; . . .; ðn; p r;n Þ; ðn þ 1; p r;nþ1 Þ È É À Á can be simulated by the following rules of R: bðjÞ : ðSð1Þ; L j;þ ; L j;0 Þ; l r 2 L j;0 ; l r;a : . . .; ða sequence of p r 1 instructions . . .; writeða 1 Þ; . . .; p r n instructionswriteða n Þ; . . .l 0 r;a ; andp r nþ1 instructions ADDð1ÞÞ; a 2 f0; þg; l 0 r;þ : ðNOP; fbððj À i r þ p r;nþ1 Þmod MÞgÞ; if j À i r þ p r;nþ1 \0; l 0 r;þ : ðADDð1Þ; fl 0 r;0 gÞ; if j À i r þ p r;nþ1 \M; l 0 r;0 : ðNOP; fbððj À i r þ p r;nþ1 Þmod MÞgÞ; if j À i r þ p r;nþ1 \M; l 0 r;0 : ðADDð1Þ; fbððj À i r þ p r;nþ1 Þmod MÞgÞ; if j À i r þ p r;nþ1 ! M; l h : halt: Indeed, instruction b(j) corresponds to checking whether neuron n þ 1 has at least M spikes, transitioning into the halting instruction, or into the set of instructions associated with the corresponding applicable rules, in the context of the result of the checking mentioned above. Sending spikes to output neurons is simulated by writing the corresponding symbols on the tape. This goal is obtained, knowing values j, i r , p r;nþ1 , and whether neuron 1 had at least M spikes or not, by transitioning to instruction bððj À i r þ p r;nþ1 Þmod MÞ after incrementing register 1 the needed number of times (0, 1 or 2), which is equal to j À i r þ p r;nþ1 div M À Á þ d, where d ¼ 0 if neuron 1 had at least M spikes, and d ¼ 1 otherwise (to compensate for the subtraction done by instruction b(j) in the initial checking). The simulation of instructions continues until we reach the situation where no rules of the underlying spiking system are applicable, transitioning to some L j;a ¼ fl h g.
Finally, let us formally describe the instruction sequences from l r;a to l 0 r;a . For the sake of simplicity of notation, we do not mention subscripts r; a in the notation of the intermediate instructions, keeping in mind that these are different instructions for different r; a. The difficulty for generating the string languages is that, by the definition, all permutations are to be considered if spikes are sent to multiple neurons 1; . . .; m. l r;a : ðNOP; fsðp r 1 ; . . .; p r n ÞgÞ; sði 1 ; . . .; i n Þ : ðNOP; fs k ði 1 ; . . .; i n Þ j i k [ 0; 1 k ngÞ; 0 i j p r j ; 1 j n; ði 1 ; . . .; i n Þ 6 ¼ ð0; . . .; 0Þ; s ðkÞ ði 1 ; . . .; i n Þ : ðwriteða k Þ; fsði 0 1 ; . . .; i 0 n ÞgÞ; i 0 k ¼ i k À 1; and i 0 j ¼ i j ; 1 j n; j 6 ¼ k; 0 i j p r j ; 1 j n; ði 1 ; . . .; i n Þ 6 ¼ ð0; . . .; 0Þ; sð0; . . .; 0Þ : ðNOP; ftðp r nþ1 ÞgÞ; tðiÞ : ðADDðn þ 1Þ; tði À 1ÞÞ; 1 i p r nþ1 ; tð0Þ : ðNOP; l 0 r;a Þ: The rules above describe precisely the following behavior: to produce any sequence with the desired numbers of occurrences of symbols a 1 ; . . .; a n , a symbol is non-deterministically chosen (out of those, the current desired number of occurrences of which is positive) and written, iterating until all desired symbols are written. Next, the register is incremented the needed number of times. This finishes the explanation of the instruction sequences from l r;a to l 0 r;a , as well as the explanation of the simulation.
Therefore, the class of languages generated by ESNP systems with only one neuron containing rules and n output neurons is included in the class of languages generated by 1-register machines with an output tape of n symbols.
Applying Parikh mapping to both classes, just replacing write-instructions by ADD-instructions on new registers associated with these symbols, it follows that the class of sets of vectors generated by ESNP systems with only one neuron containing rules and n output neurons is included in the class of sets of vectors generated by n þ 1-register machines where all registers except one are restricted to be increment-only. These observations conclude the proof. h The inclusions formulated at the end of the proof given above are actually characterizations, as we can also prove the opposite inclusion.
Lemma 5 For any register machine with output tape with only one register that can be decremented respectively for any register machine with only one register that can be decremented we can effectively construct an ESNP system generating the same language respectively the same set of (vectors of) natural numbers.
Proof By definition, output registers can only be incremented, so the main computational power lies in the register which can also be decremented. The decrementable register can be simulated together with storing the actual state by storing the number dn þ c i where: n is the actual contents of the register, c i is a number encoding the i-th instruction of the register machine, and d is a number bigger than all c i . Then incrementing this first register by an instruction c i and jumping to c j means consuming c i and adding d þ c j in the actor neuron, provided the checking set guarantees that the actual contents is an element of dN þ c i . Decrementing means consuming d þ c i and adding c j in the actor neuron, provided the checking set guarantees that the actual contents is an element of dN þ þ c i ; if n ¼ 0, then c i is consumed and c k is added in the actor neuron with c k being the instruction to continue in the zero case. At the same time, with each of these simulation steps, the output neurons can be incremented in the exact way as the output registers; in the case of register machines with output tape, a spike is sent to the output neuron representing the symbol to be written. Further details of this construction are left to the reader. h

ESNP systems with white hole rules
In this section, we recall the definition of extended spiking neural P systems with white hole rules as introduced in Alhazov et al. (2015a). We will show that with this new variant of extended spiking neural P systems, computational completeness can already be obtained with only one actor neuron, by proving that the computations of any register machines can already be simulated in only one neuron equipped with the most general variant of white hole rules. Using this single actor neuron to also extract the final result of a computation, we even obtain weak universality with only one neuron. As already mentioned in Remark 1, we are going to describe the checking sets and the number of spikes by non-negative integers. The following definition is an extension of Definition 1: Definition 3 An extended spiking neural P system with white hole rules (of degree m ! 1) (in the following we shall simply speak of an EESNP system) is a construct P ¼ m; S; R ð Þwhere • m is the number of cells (or neurons); the neurons are uniquely identified by a number between 1 and m; • S describes the initial configuration by assigning an initial value (of spikes) to each neuron; • R is a finite set of rules either being a white hole rule or a rule of the form as already described in Definition 3 i; E=k ! P; d ð Þsuch that i 2 1::m ½ (specifying that this rule is assigned to neuron i), E REG N ð Þ is the checking set (the current number of spikes in the neuron has to be from E if this rule shall be executed), k 2 N is the ''number of spikes'' (the energy) consumed by this rule, d is the delay (the ''refraction time'' when neuron i performs this rule), and P is a (possibly empty) set of productions of the form l; w; t ð Þ where l 2 1::m ½ (thus specifying the target neuron), w 2 N is the weight of the energy sent along the axon from neuron i to neuron l, and t is the time needed before the information sent from neuron i arrives at neuron l (i.e., the delay along the axon). A white hole rule is of the form i; E=all ! P; d ð Þ where all means that the whole contents of the neuron is taken out of the neuron; in the productions l; w; t ð Þ, either w 2 N as before or else w ¼ all þ p ð ÞÁq þ z with p; q; z 2 Q; provided c þ p ð ÞÁq þ z, where c denotes the contents of the neuron, is non-negative, then c þ p ð ÞÁq þ z b cis the number of spikes put on the axon to neuron l. If the checking sets in all rules are finite, then P is called a finite EESNP system.
Allowing the white hole rules having productions being of the form w ¼ all þ p ð ÞÁq þ z with p; q; z 2 Q is a very general variant, which can be restricted in many ways, for example, by taking z 2 Z or omitting any of the rational numbers p; q; z 2 Q or demanding them to be in N etc.
Obviously, every ESNP system also is an EESNP system, but without white hole rules, and a finite EESNP system also is a finite ESNP system, as in this case the effect of white hole rules is also bounded, i.e., even with allowing the use of white hole rules, the following lemma as a counterpart of Lemma 3 is still valid: Lemma 6 For any EESNP system where during any computation only a bounded number of spikes occurs in the actor neurons, the generated language is regular.
Hence, in the following our main interest is in EESNP systems which really make use of the whole power of white hole rules.
EESNP systems can also be used for computing functions, not only for generating sets of (vectors of) integer numbers. As a simple example, we show how the function n7 !2 nþ1 can be computed by a deterministic EESPNS, which only has exactly one rule in each of its two neurons; the output neuron 2 in this case is not free of rules.
Example 2 Computing n7 !2 nþ1 Þ could also be written as 2; 2 Á N þ þ 1=all ! 2; all ð ÞÁ2 À 2 ð Þ f g ð Þ . In both cases, starting with the input number n (of spikes) in neuron 1, with each decrement in neuron 1, the contents of neuron 2 (not taking into account the enabling spike from neuron 1) is doubled. The computation stops with 2 nþ1 in neuron 1, as with 0 in neuron 1 no enabling spike is sent to neuron 2 any more, hence, the firing condition is not fulfilled any more.
We remark that, if the initial value of neuron 2 is 1 (instead of 2), the function n7 !2 n will be computed (instead of n7 !2 nþ1 ). Indeed, if n ¼ 0, the system halts immediately and the value of the second neuron is 2 0 ¼ 1. If n ¼ 1, neuron 1 spikes once increasing the value of the second neuron to 2 1 ¼ 2, which is not enough for it to spike (2 6 2 2 Á N þ þ 1), so the system halts. For values n [ 1, neuron 2 will start spiking at the second step of evolution, doubling its contents at each subsequent step; it will therefore contain 2 k spikes at the k-th evolution step.
Note that, when the initial value of neuron 2 is 2, the system satisfies the property that the second neuron spikes whenever the first one does. If we set the initial value of neuron 2 to 1, however, the second neuron never spikes before the first neuron spikes once.

Pure white hole model
Example 3 Pure White Hole Model of EESNPS for DT0L Systems Let G ¼ a f g; P; a s ð Þbe a Lindenmayer system with the axiom a s and the finite set of tables P each containing a finite set of parallel productions of the form a ! a k . Such a system is called a tabled Lindenmayer system, abbreviated T0L system, and it is called deterministic, abbreviated DT0L system, if each table contains exactly one rule. Now let G ¼ a f g; P; a s ð Þ be a DT0L system with P ¼ a ! a k i È É j 1 i n È É . Then the following EESNPS using only white hole rules computes the same set of natural numbers as are represented by the language generated by G, with the results being taken with unconditional halting, i.e., taking a result at every moment, see Beyreder and Freund (2009).

Initial value = s
If we want to generate with normal halting, we have to add an additional output neuron 2 and an additional rule g in neuron 1 which at the end moves the contents of neuron 1 to neuron 2.
To consider the generalization of the example above to multiple neurons, we first would like to recall a related model considered in Klejn and Rozenberg (1980) already in 1980, for the case of L systems, calling them 0LIP systems: like in Indian parallel grammars, all identical symbols simultaneously evolve by the same rule, but like in Lindenmayer systems, all symbols evolve in parallel. We also note that in the area of P systems such a requirement may be viewed as a special case of the label agreement feature. Label selection, target selection, and target agreement have extensively been studied, for example, see Freund (2014, 2015); hence, it is proper to call it rule agreement, as studied, e.g., in Alhazov et al. (2015b).
Lemma 7 With unconditional halting, pure white hole EESNP systems generate at least 0LIP.
Proof Take an arbitrary 0LIP system L with alphabet fA i j 1 i ng. We define a pure EESNP system P with n neurons as follows. The rules of P consist of one rule ði; N þ =all ! fðj; all Á jwj A j Þ j 1 j ngÞ for every rule A i ! w in L.
The multiplicity of symbols A i in a configuration of L corresponds to the multiplicity of spikes in neuron i of an associated configuration of P. Hence, the bisimilarity between derivations in P and derivations in L is obvious. h Clearly, as a particular case with n ¼ 1, we get the previous example covering DTU0L.

Computational completeness of EESNP systems
The following main result was already established in Alhazov et al. (2015a).
Lemma 8 The computation of any register machine can be simulated in only one single actor neuron of an EESPN system.
Proof Let M ¼ n; B; l 0 ; l h ; P ð Þbe an n-register machine, where n is the number of registers, P is a finite set of Proof We only have to show how to extract the results into the additional output neurons from the single actor neuron which can do the whole computational task as exhibited in Lemma 8. Yet this is pretty easy: When the actor neuron reaches the halting state, the desired result m i for output neuron i þ 1 is stored as factor in this one number stored in the actor neuron within the prime number encoding, i.e., as p i m i , for 1 i n. Instead of using the final rule in neuron 1 we now take the rule With the rules we can decode the factor p i m i to m i into output neuron i þ 1, with the instruction code (prime number) r i for 1 i n. If the contents of the actor neuron is not dividable by p i any more, we switch to the next instruction code r iþ1 by the rule At the end, we can end up with 0 in the actor neuron after having used the rule 1; r n Á N þ n r n p n Á N þ ð Þ =all ! ; ð Þ and then stop with m i in output neuron i þ 1, 1 i n. h Theorem 7 Any recursively enumerable language L with L T Ã for a terminal alphabet T with card T ð Þ ¼ n can be generated by an EESNP system with n þ 1 neurons.
Proof In the case of generating strings, we have to simulate a register machine with output tape; hence, in addition to the simulating rules already described in Lemma 8, we have to simulate the tape rule l 1 : write a ð Þ; l 2 ð Þ , which in the EESNPS means sending one spike to the output neuron N a ð Þ representing the symbol a. This task is accomplished by the rule 1; ÞgÞ. The rest of the construction and of the proof is similar to that what we have done in the proof of Lemma 8. h

Red-green EESNP systems
For defining a suitable model of red-green EESNP systems we have to consider several constraints. First of all, the computations should be deterministic, i.e., for any configuration of the EESNP system P there should be at most one rule applicable in each neuron. This condition can be fulfilled syntactically by requiring the checking sets of all the rules in each neuron to be disjoint.
Whereas in the generating case we had one output neuron for each possible input symbol, these specific neurons now have to act as input neurons. As we only want deterministic behavior to be considered now, we assume that in every derivation step at most one input neuron spikes until the whole input is ''read'', but this input has to be made ''on demand'', i.e., we imagine that the EESNP system P sends out an input request to the environment which is answered in the next step by the spiking of exactly one input neuron as long as the string has not been ''read'' completely.
''Reading'' the spiking of an input neuron into the single actor neuron means that we have to be able to distinguish the signals coming from different input neurons. Hence, the simplest variant to do this is to multiply the spike coming from input neuron number k by k. Yet then we have to take into account that the minimum value in the actor neuron must be bigger than the maximal number k, i.e., the smallest prime number used for the prime number encoding must fulfill this condition, and our encoding of the number n i now is chosen to be p i n i þ1 . Finally, we have to define red and green ''states'' of the red-green EESNP system; yet as we only have a finite number of rules in each neuron, each of the possible vectors of rules represents a color; hence, the color of the current configuration, i.e., its ''state'', can be defined via the (unique) vector of rules to be applied.
Based on the proof Lemma 8, we now can easily establish the following results, similar to the results obtained for red-green register machines, see Lemmas 1 and 2 as well as Theorem 3: Lemma 9 The computations of a red-green register machine RM with an arbitrary number of registers and with string input can be simulated by a red-green EESNP system P in such a way that during the simulation of a computation step of RM leading from an instruction with label (''state'') p with color c to an instruction with label (''state'') p 0 with color c 0 the simulating EESNP system P uses states of color c and only in the last step of the simulation changes to a state of color c 0 .
Lemma 10 The computations of a red-green EESNP system P can be simulated by a red-green register machine RM with two registers and with string input in such a way that during the simulation of a derivation step of P leading from a state p with color c to a state p 0 with color c 0 the simulating register machine uses instructions with labels (''states'') of color c and only in the last step of the simulation changes to a label (''state'') of color c 0 .
As an immediate consequence, the preceding two lemmas yield the characterization of R 2 and R 2 \ P 2 by redgreen EESNP systems: Theorem 8 (Computational power of red-green EESNP systems) 1. A set of strings L is recognized by a red-green EESNP system with one mind change if and only if L 2 R 1 , i.e., if L is recursively enumerable. 2. Red-green EESNP systems recognize exactly the R 2sets of the Arithmetical Hierarchy. 3. Red-green EESNP systems accept exactly those sets which simultaneously are R 2and P 2 -sets of the Arithmetical Hierarchy.

Conclusion
In this paper, we have further studied the model of extended spiking neural P systems with white hole rules as introduced in Alhazov et al. (2015a). With this variant of extended spiking neural P systems, computational completeness can already be obtained with only one actor neuron, as the computations of any register machine can already be simulated in only one neuron equipped with the most general variant of white hole rules. Using this single actor neuron to also extract the final result of a computation, we even obtain weak universality with only one neuron. The model of extended spiking neural P systems with white hole rules also allows for a red-green variant and thus to ''go beyond Turing''. Computational completeness can already be obtained with only one actor neuron, and with the red-green variant of extended spiking neural P systems with white hole rules exactly the R 2 -sets of the Arithmetical Hierarchy can be recognized.
A quite natural feature found in biology and also already used in the area of spiking neural P systems is that of inhibiting neurons or axons between neurons, i.e., certain connections from one neuron to another one can be specified as inhibiting ones-the spikes coming along such inhibiting axons then close the target neuron for a time period given by the sum of all inhibiting spikes, e.g., see Binder et al. (2007). Such variants can also be considered for extended spiking neural P systems with white hole rules.