# Spiking Neural P Systems with Rules Dynamic Generation and Removal
## 3 The Turing Universality of SNP Systems with Rules Dynamic Generation and Removal
Neuron \(\sigma_{1}\) applies the spiking rule with rules dynamic generation and removal \(r_{3}:a(a^{4})^{+}/a^{5}\to a;r_{4},r_{5},-r_{3}\), consuming five spikes, sending one spike to the output neuron \(\sigma_{out}\), adding rules \(r_{4}\) and \(r_{5}\), and removing rule \(r_{3}\). At step \(t+2\), \(\sigma_{out}\) applies \(r_{6}:a^{3}\to a;r_{5}\) sending the first spike to \(env\) and adding \(r_{5}\). So, starting from step \(t+2\), neuron \(\sigma_{1}\) will forget four spikes at each step until step \(t+n+1\), where \(n\geq 1\). At step \(t+n+1\), \(\sigma_{1}\) has only one spike with rules \(r_{4}\) and \(r_{5}\). Therefore, it applies the spiking rule with rules dynamic generation and removal \(r_{5}:a\to a;r_{3},-r_{4},-r_{5}\), sends one spike to \(\sigma_{out}\), adds \(r_{3}\), and removes rules \(r_{4}\) and \(r_{5}\). At step \(t+n+2\), \(\sigma_{out}\) applies \(r_{5}:a\to a;r_{3},-r_{4},-r_{5}\) to send the second spike to \(env\). Thus, the time interval between the first two spikes sent by \(\sigma_{out}\) to the environment is \((t+n+2)-(t+2)=n\), i.e., the number stored in register 1 when the computation stops. Table 3 lists five variants of SNP systems and the number of neurons they require to construct the FIN module. From Table 3, it can be seen that DSNP, PASNP, PSNR, \begin{table}
\begin{tabular}{c c} \hline \hline
**Variants of SNP Systems** & **Number of Neurons** \\ \hline DSNP [38] & 7 \\ PASNP [39] & 10 \\ PSNR [40] & 15 \\ MPAIRSNP [41] & 8 \\ SNP-IR [42] & 8 \\ RDGRSNP & 6 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The comparison of the number of neurons required to construct the SUB module. Figure 5: FIN module. MPAIRSNP, and SNP-IR require 4, 9, 8, 8, and 5 neurons, respectively, while RDGRSNP requires 3. Therefore, the proposed RDGRSNP system in this paper requires the least number of neurons. **Theorem 2**. : \(N_{acc}RDGRSNP(\Pi)=NRE\)__  
Proof. : Similarly, by [PERSON]'s theorem, we have \(N_{acc}RDGRSNP(\Pi)\subseteq NRE\), so we only need to prove \(NRE\subseteq N_{acc}RDGRSNP(\Pi)\). For \(NRE\subseteq N_{acc}(\Pi)\), we simulate the register machine to prove it by following the process shown in Figure 6.  
In the initial state, neuron \(\sigma_{1}\) contains \(4n\) spikes, corresponding to the number \(n\) to be accepted in the register machine, neuron \(\sigma_{l_{0}}\) contains four spikes for triggering the simulation of computation, and all the remaining neurons are empty. The simulation of computation follows the simulation of instructions in the register machine until neuron \(\sigma_{l_{h}}\) receives four spikes. When neuron \(\sigma_{l_{h}}\) receives four spikes, it means that the computation process in the register machine is simulated successfully, the computation stops, and the number is accepted. First, in the number-accepting mode, we need the INPUT module to read the number to be accepted. The number \(n\) to be accepted is represented by the time interval between the first two spikes entered, i.e., the spike train entered is: \(10^{n-1}1\). **INPUT module:** The INPUT module is used to read the number to be accepted, as shown in Figure 7. This module consists of nine neurons and seven rules. Suppose that at step 0, \(\sigma_{in}\) receives one spike, so at step 1, \(\sigma_{in}\) applies \(r_{3}:a\to a\) and sends one spike to auxiliary neurons \(\sigma_{in_{1}}\), \(\sigma_{in_{2}}\), \(\sigma_{in_{3}}\), and \(\sigma_{in_{4}}\), respectively. Starting from step 2, auxiliary neurons \(\sigma_{in_{1}}\), \(\sigma_{in_{2}}\), \(\sigma_{in_{3}}\), and \(\sigma_{in_{4}}\) will send spikes in a cycle and send one spike to \(\sigma_{in_{5}}\) and \(\sigma_{in_{6}}\), respectively. For neuron \(\sigma_{in_{5}}\), it applies \(r_{4}:a^{4}\to a^{4}\) to send  
Figure 6: Flowchart of the RDGRSNP system simulating the register machine in number-accepting mode.