# On Applications of Spiking Neural P Systems
## 2 Spiking Neural P Systems  
**Definition 1** ([6, 69]).: _A spiking neural P system of degree \(m\geq 1\) is a \((m+4)\)-tuple of the form \(\Pi=(O,\sigma_{1},\ldots,\sigma_{m},syn,in,out)\), where_  
* \(O=\{a\}\) _(Singleton alphabet; it is called spike);_
* \(\sigma_{1},\ldots,\sigma_{m}\) _are neurons where_ \(\sigma_{i}=(n_{i},R_{i}),i\geq 1\)__ _where_ _(a)_ \(n_{i}\geq 0\) _represents the initial number of spikes present in the neuron_ \(\sigma_{i}\)_;_ _(b)_ \(R_{i}\) _represents the finite set of rules present in the neuron_ \(\sigma_{i}\) _and it contains two-types of rules:_ _(1) Spiking rule:_ \(E/a^{c}\to a;d\) _,_ \(E\) _is a regular language over_ \(\{a\}\) _and_ \(c\geq 1,d\geq 0\)_;_ _(2) Forgetting rule:_ \(a^{s}\to\lambda,s\geq 1\) _and_ \(a^{s}\
otin L(E)\) _for all rules of type (1) in_ \(R_{i}\)_;_
* \(syn\subseteq\{1,2,\ldots,m\}\times\{1,2,\ldots,m\}\) _represents the synapses and for any_ \((i,j)\in syn,i\
eq j,1\leq i,j\leq m\)_;_
* \(in,out\in\{1,2,\ldots,m\}\)__  
The spiking rules of the SNPS are applicable depending on the number of spikes and the regular language over alphabet \(a\)--i.e., \(E\). If at any time \(t\), the neuron \(\sigma_{i}\) has \(k\) number of spikes and \(a^{k}\in L(E),k\geq c\), then the spiking rule \(E/a^{c}\to a\) rule is applicable. Moreover, after application of this rule, \(c\) spikes are consumed and remaining \(k-c\) spikes stay in the neuron and one spike is sent to the neurons which have synaptic connection with \(\sigma_{i}\). Note that, in this case, delay \(d=0\). If the delay \(d\
eq 0\), and the spiking rule are applied at any moment \(t\) in any neuron \(\sigma_{i}\), then the neuron becomes inactive--i.e., it will not send any spike out of the neuron and it will not receive any spike from other neurons from time \(t,t+1,\ldots,t+d-1\). At \(t+d\), the neuron \(\sigma_{i}\) will be open again and it can receive spikes from other neurons. At step \(t+d+1\), the spiking rule will be applicable again.  
The spiking rules of SNPS can be of the form \(E/a^{c}\to a^{p};d\) where \(c\geq p\geq 1,d\geq 0\). These rules are known as extended spiking rules and the SNPS model with this type of rules is called as extended spiking neural P systems.  
If \(E=\{a^{c}\}\), then the rule \(E/a^{c}\to a;d\) is simply written as \(a^{c}\to a;d\).  
The forgetting rules in \(\sigma_{i}\) are of the form \(a^{s}\to\lambda\) and it is applicable only when a neuron contains exactly \(s\) number of spikes and \(a^{s}\
otin L(E)\) for any spiking rule of the form \(E/a^{c}\to a;d,c\geq 1,d\geq 0\). Furthermore, after application of this rule \(s\) spikes are consumed.  
Now we discuss the non-deterministic application of the spiking rules--i.e., if at any time \(t\), two rules of the form \(E_{1}/a^{c_{1}}\to a;d\) and \(E_{2}/a^{c_{2}}\to a;d\) where \(L(E_{1})\cap L(E_{2})\
eq\emptyset\) are applicable, then one of the rules is applied (i.e., one of the rule is chosen non-deterministically to be applied). Similarly, if at any time more than two rules are applicable, one of them is selected non-deterministically.  
In the next section we discuss the application of the SNPS and their variants. Throughout the paper, in order to improve the readability, instead of writing the full names of the models, we use the acronyms in Table 1.