# Spiking Neural P Systems with Rules Dynamic Generation and Removal
## 1 Introduction  
Membrane computing (MC) [1], proposed in 1998, is a distributed parallel computational method inspired by the working process of biological cells. The computational models of MC are also known as membrane systems or P systems. P systems can be roughly classified into three groups according to the biological cells they imitate: cell-like P systems, tissue-like P systems, and neural-like P systems. In neural-like P systems, spikes are used to represent information. Two classes of neural-like P systems have been proposed: axon P systems (AP systems) [2] and spiking neural P systems (SNP systems) [3]. An AP system has a linear structure, so that each node of this system can only send spikes to its neighboring left and right nodes. An SNP system has a directed graph structure, where neurons are represented as the nodes in the directed graph and the synapses between neurons are represented by directed arcs. SNP systems, which also belong to the spiking neural network [4], have become a major research issue as soon as they were proposed. The research related to SNP systems mainly includes four aspects: variant model design, computational power proof, algorithm design (application), and implementation. Theoretical research mainly includes variant model design and computational power proof, while algorithmic research mainly includes algorithm design (application) and implementation. Under the continuous research of a wide range of scholars, several different variants of SNP systems have been proposed. Numerical SNP (NSNP) systems [5; 6; 7] are a variant of SNP systems inspired by numerical P systems, in which information is encoded by the values of variables and processed by continuous functions. Compared to the original SNP systems, NSNP systems are no longer discrete, but have a continuous numerical nature, which is useful for solving real-world problems. Homogeneous SNP (HSNP) systems [8; 9; 10; 11] are a restricted variant of SNP systems in which each neuron has the same set of rules, making HSNP systems simpler than the original SNP systems. SNP systems with communication on request (SNQPsystems) [12; 13; 14; 15; 16] are proposed by adding a communication strategy to the original SNP systems in which neuron request spikes from neighboring neurons according to the number of spikes it contains, and no spikes are consumed or produced during the computation. SNP systems with anti-spikes [17; 18; 19; 20] are proposed by considering the anti-spikes and annihilation rules in the original SNP systems. In SNP systems with anti-spikes, the usual spikes and anti-spikes will annihilate each other when they meet in the same neuron. SNP systems with weights [21; 22; 23; 24; 25] are proposed by introducing synaptic weights to the original SNP systems in which the number of spikes received by a neuron depends on not only the number of spikes sent by its presynaptic neurons, but also the synaptic weights between neurons. In addition, as a kind of bio-inspired computational model, SNP systems have many excellent characteristics. First, neurons are not fully connected to each other; therefore, the topological structure of SNP systems is sparse and simple. In SNP systems, information is transmitted only when meeting a specific value, so their information transmission is characterized by low power consumption. Additionally, because SNP systems are a kind of parallel computational model, the tasks can be processed in parallel, reducing the processing time required to be consumed significantly. In addition, the working mechanism of SNP systems is special. In SNP systems, spikes are used to represent information, and the information is processed and transmitted by using spiking rules. In SNP systems, a neuron can contain multiple rules and use regular expression as a control condition for the rules, allowing the neuron to freely select rules to use depending on the number of spikes.