# Performing Arithmetic Operations with Locally Homogeneous Spiking Neural P Systems
## 2 Related Research  
### Spiking Neuronal P System  
An SN P system of degree m (m \(\geq\) 1) composed of five elements: the singleton alphabet, the neurons, the set of synapses, the input neurons, and the output neurons is a construct of the form [3]:  
\[\Pi=(O,\sigma_{1},\sigma_{2},\ldots,\sigma_{m},\mathit{syn},\mathit{in}, \mathit{out}) \tag{1}\]  
where:  
* \(O=\{a\}\) is the singleton alphabet, and \(a\) is spiking;
* \(\sigma_{1}\), \(\sigma_{2}\), \(\ldots\), \(\sigma_{m}\) are neurons of the form \(\sigma_{i}=(n_{i},\mathit{R}_{i})\), \(1\leq i\leq m\), \(n_{i}\) is the initial number of spiking in the neuron \(\sigma_{i}\) at the beginning of the calculation, \(n_{i}\geq 0\). \(R_{i}\) is the finite set of rules in each neuron. \(R_{i}\) has two forms of rules (we collectively refer to them as spiking rules):  
1. \(E/a^{c}\to a^{p};d\), where \(E\) is a regular expression over \(O\), \(c\geq 1\), \(p\geq 1\), and \(c\geq p\), \(d\) indicates delayed time, \(d\geq 0\);
2. \(E^{\prime}/a^{c}\to\lambda\), \(s\geq 1\), for any rule \(E/a^{c}\to a^{p}\); \(d\) from any \(R_{i}\), all meet the condition \(L(E)\cap L(E)=\Phi\);
* \(syn\) is the set of synapses. The element in \(syn\) is an ordered pair of elements shaped like \((i,j)\). \((i,j)\) indicates neurons \(\sigma_{i}\) to \(\sigma_{j}\) are connected by synapses, with \(i,j\in\{1,2,\ldots\), m\(\}\), \(i\
eq j\);
* \(in\), \(out\in\{1,2,\ldots,m\}\) indicate the input and output neurons. In the SN P system, \(E/a^{c}\to a^{p}\); \(d\) is called a generalized firing rule. If \(L(E)=\{a^{c}\}\), then the rule can be written in the simplified form \(a^{c}\to a^{p}\); \(d\). If \(p=1\), then the rule \(E/a^{c}\to a\); \(d\) is called the standard firing rule. If \(p=1\) and \(d=0\), then the rule can be written in the simplified form \(E/a^{c}\to a\). \(E^{\prime}/a^{c}\to\lambda\) is called the forgetting rule. If \(L(E)=\{a^{c}\}\), then the rule can be written in the simplified form \(a^{s}\to\lambda\). In this work, we use the no delayed rule (i.e., \(d=0\)). Spiking rules are applied as follows: if at a time slice, neuron \(\sigma_{i}\) contains \(k\) spikings and \(a^{k}\in L(E)\), \(k\geq c\), then the rule \(E/a^{c}\to a^{p}\in R_{i}\) is enabled, \(\sigma_{i}\) is fired. \(\sigma_{i}\) will consume \(c\) spikings (only \(k\)-\(c\) spikes remain in \(\sigma_{i}\)) and send \(p\) spikings to all neurons connected to it. When \(\sigma_{i}\) contains \(s\) spikings (\(s\geq 1\)), activating the forgetting rule \(a^{s}\rightarrow\lambda\in R_{i}\) in \(\sigma_{i}\). \(\sigma_{i}\) consum \(s\) spikings and do not send spikings to any neurons connected to it. When all neurons in an SN P system have the same firing and forgetting rules, the system is called a homogeneous SN P system (HSNP system) [5]. The limitation of the HSNP system is that it is difficult to express efficient computation in the absence of redundant rules in neurons. For example, a binary adder with two input neurons can not be represented by an HSNP system without redundant rules. Therefore, this paper will study the local HSNP system (LHSNP system). If the neurons in the system can be divided into several groups, and the neurons in each group use the same rules without redundancy, then we call it the LHSNP system. The goal of designing an LHSNP system that can perform effective calculations is to use the fewest number of neurons and the fewest number of neuronal groups in the system. For example, Formula (2) is an LHSNP system \(\Pi_{\text{Add1}}\) with two input neurons that can perform binary addition.