{'fraction_non_alphanumeric': 0.042994184601620355, 'fraction_numerical': 0.004771608926885034, 'mean_word_length': 3.5468926553672318, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Simulations between Network Topologies in Networks of Evolutionary Processors

: In this paper, we propose direct simulations between a given network of evolutionary processors with an arbitrary topology of the underlying graph and a network of evolutionary processors with underlying graphs—that is, a complete graph, a star graph and a grid graph, respectively. All of these simulations are time complexity preserving—namely, each computational step in the given network is simulated by a constant number of computational steps in the constructed network. These results might be used to efﬁciently convert a solution of a problem based on networks of evolutionary processors provided that the underlying graph of the solution is not desired.


Introduction
Networks of evolutionary processors (NEPs for short) have been extensively investigated in the last two decades since their generative variant has been introduced in [1]. An informal description of a NEP is as follows: it is a graph whose nodes are hosts for some very simple processors inspired by the basic mutations at the DNA nucleotide level, namely insertion, deletion, and substitution. Each processor is able to make just one of these operations on the data existing in the node that hosts it. Data may be organized as strings, multisets, two-dimensional pictures, graphs, etc. In this work, we consider that the data consist of strings. A very important assumption is that each string appears in an arbitrarily large number of identical copies such that if the processor can apply an operation to different sites of a string, the operation is actually applied simultaneously to each of these sites in different copies of the string. Furthermore, if more that one rule can be applied to a string, each rule is applied to a different copy of that string. This process described above is considered to be an evolutionary step. Each evolutionary step alternates with a communication step. In a communication step, all the strings that can leave a node (they can pass the output filter associated with that node) actually leave the node and copies of them enter each node connected to the left node, provided that they can pass the input filter of the arriving node. We say that an input string, which initially is in a designated node, called the input node, is accepted if another designated node, called the output node, is non-empty after a finite number of computational steps (evolution, communication). The complexity of a computation is defined in the usual way.
From the very beginning, NEPs have been proven to be computationally complete models [2,3], such that they have been used to solve hard problems [4]. Several variants have been considered depending on the positions of filters: filters associated with nodes (different filters [3], uniform filters [5], polarization [6]) or filters associated with edges [7]. Later on, several ways of simulating and implementing different variants of these networks have been reported [8][9][10][11]. A rather new and attractive direction of research has been to investigate the possibility of simulating directly and efficiently one variant by another without the intermediate step of an extra computational model (Turing machine, tag-system, register machine, etc.) in between, see, e.g., [5].
This work continues this line of research by proposing direct simulations between two NEPs such that the input one is an arbitrary NEP while the output one has a predefined topology that can be a complete graph, a star graph, or a grid. Thus, after a preliminary section with the basic definitions and concepts, we give the construction of a complete NEP equivalent to a given NEP. We continue with another section, where we give such a construction for a star graph and finally a construction for a grid NEP. A short conclusion ends the paper.

Basic Definitions
The basic concepts and notations that are to be used throughout the paper are defined in the sequel; the reader may consult [12] for basic concepts that are not defined here. We use the following concepts and notations: • V * is the set of all strings formed by symbols in V; We now recall some definitions from a few papers where the networks of evolutionary processors have been introduced, see, e.g., [1], for the generating model, and [3,13,14], for the accepting model. Let a → b be a rule, where a, b ∈ (V ∪ {ε}): • If a, b ∈ V, then the rule is called a substitution rule; • If a ∈ V and b = ε, then the rule is called a deletion rule; • If a = ε and b ∈ V, then the rule is called an insertion rule. The set of all substitution, deletion, and insertion rules over V is denoted by Sub V , Del V , and Ins V , respectively.
Given a rule σ as above and a string w ∈ V * , we define the following actions of σ on w , to any position ( * ), to the leftmost position (l), and to the rightmost position (r), as explained in the sequel: According to this definition, applying a rule to a string may result in a finite number of strings. This implies that in our setting each string may appear in an arbitrarily large number of copies.
For every rule σ, α ∈ { * , l, r}, and L ⊆ V * , we define σ α (L) = w∈L σ α (w). Given a finite and non-empty set of rules M, a string w and a language L, we define the followings: In the original papers mentioned above, the rewriting operations defined above were referred as evolutionary operations since they may be viewed as formal operations abstracted from local DNA mutations.
For two disjoint subsets P (permitting symbols) and F (forbidding symbols) of an alphabet V and a string z over V, we define the predicates: For every language L ⊆ V * and β ∈ {(s), (w)}, we define: An evolutionary processor (EP) over an alphabet V is a tuple (M, PI, FI, PO, FO), where: • M is a set of either substitution, or deletion or insertion rules over the alphabet V.
The set M represents the set of evolutionary rules of the processor; • PI, FI ⊆ V are the input permitting/forbidding symbols of the processor, while PO, FO ⊆ V are the output permitting/forbidding symbols of the processor.
We denote the set of evolutionary processors over V by EP V . A network of evolutionary processors (NEP for short) is a seven-tuple Γ = (V, U, G, N , α, β, In, Out), where: • V and U are the input and network alphabets, respectively, V ⊆ U.
is an undirected graph without loops, with the set of nodes X G and the set of edges E G . Each edge is given in the form of a binary set. G is called the underlying graph of the network; gives the action mode of the rules of node x on the strings existing in that node; • β : X G −→ {(s), (w)} defines the type of the input/output filters of a node. More precisely, for every node, x ∈ X G , the following filters are defined: That is, ρ x (z) (resp. τ x (z)) indicates whether or not the string z can pass the input (resp. output) filter of x. More generally, ρ x (L) (resp. τ x (L)) is the set of strings of L that can pass the input (resp. output) filter of x.

•
In and Out ∈ X G are the input node, and the output node, respectively, of the NEP.
A configuration of a NEP Γ as above is a function C : X G −→ 2 U * which associates a multiset of strings C(x) with every node x of Γ. As each string appears in an arbitrarily large number of copies, we work with the support of this multiset. For a string w ∈ V * , we define the initial configuration of Γ on w by C (w) A configuration is followed by another configuration either by an evolutionary step or by a communication step. A configuration C follows a configuration C by an evolutionary step if each component C (x), for some node x, is the result of applying all the evolutionary rules in the set M x that can be applied to the strings in the set C(x). Formally, configuration C follows the configuration C by a an evolutionary step, written as C =⇒ C , if In a communication step of a NEP the following actions take place simultaneously for every node x: (i) All the strings that can pass the output filter of a node are sent out of that node; (ii) All the strings that left their nodes enter all the nodes connected to their original ones, provided that they can pass the input filter of the receiving nodes.
Note that, according to this definition, those strings that are sent out of a node and cannot pass the input filter of any node are lost.
Formally, a configuration C follows a configuration C by a communication step (we 2i+2 , by a for all i ≥ 0. Note that the configurations are changed by alternative steps.
A computation as above halts, if there exists a configuration in which the set of strings existing in the output node Out is non-empty. Given a NEP Γ and an input string w, we say that Γ accepts w if the computation of Γ on w halts. Consequently, we define the language accepted by Γ by The time complexity of the halting computation C In other words, Time Γ (n) delivers the maximal number of computational steps carried out by Γ for accepting an input string of length n.

Simulating Any NEP with a Complete NEP
Theorem 1. Given an arbitrary NEP Γ, there exists a complete NEP Γ such that the following two conditions are satisfied: Note that the underlying graph G is a complete graph. First, we add the following nodes to G : • node x start : • nodes x s i , 1 ≤ i ≤ n (they actually simulate the work of x i in Γ): For each node x i , 1 ≤ i ≤ n in Γ we add a subnetwork to Γ according to the subsequent cases: Case 1. If α(x i ) = l, the subnetwork is defined as follows (these nodes are used for preparing the string in the aim of processing them in the nodes x s i ): • nodes x Ins i , 1 ≤ i ≤ n : If α(x i ) = r, the subnetwork is analogous to the Case 1 with the characters l and r interchanged.
Case 3. If α(x i ) = * , the subnetwork is defined as follows (the role of these nodes is the same as above, namely to prepare the strings for being processed in the nodes x s i ): • nodes x Sub i , 1 ≤ i ≤ n : Let w be the input string in Γ. In the input node x start , the character t l 1 is inserted at the beginning of the string if α(x 1 ) ∈ {r, * }, or the character t r 1 is inserted at the end of the string, provided that α(x 1 ) = l. Next, the string enters x Sub 1 where the character is replaced with t l 1 and t r 1 , respectively. Then, the string can only enter x s 1 and the simulation starts. Note that the same evolutionary rules applicable in x 1 ∈ Γ are also possible in x s 1 since the special character t l 1 or t r 1 is set up in a way that it does not block the computation of nodes with α = r and α = l, respectively. Inductively, we may assume that a string of the form t l i w or wt r i lies in the node x s i ∈ Γ if and only if the string w lies in the node x i ∈ Γ. Let w be transformed into w in the node x i and sent to the connected nodes to x i in Γ. Then, a string t l i w or a string wt r i is produced in the node x s i and sent to the node x Sub i . Let us analyze the case of a string t l i w . The process is analogous for the other string. In x Sub i , the character t l i is replaced with the symbol t l j , assuming that {x i , x j } ∈ Γ, which ensures the new string can only be accepted by subnetworks j corresponding to nodes x j connected to x i in the original network Γ. From here, the process differs in accordance with the value α of the connected node x j .

•
If α(x j ) = l, the string can only enter x Ins j where the symbol t r j is appended to it. The new string, t l j w t r j , continues through x Del j where t l j is removed and x Sub j where t r j is replaced with t r j , allowing it to enter the node x s j . Since the character t r j is at the end of the string, it does not interfere with the application of evolutionary rules at the left of the string; • If α(x j ) = r or α(x j ) = * , the string directly enters x Sub j and the symbol t l j is replaced with t l j . Then, the string enters x s j . As one can see, the communication step in Γ has been simulated by a constant number of (evolution and communication) steps in Γ . A new evolutionary step in Γ is now simulated. It follows that L(Γ) = L(Γ ). Furthermore, the number of steps in Γ for simulating an evolutionary step followed by a communication one in Γ is constant; hence, Time Γ (n) ∈ O(Time Γ (n)) holds.

Simulating Any NEP with a Star NEP
Theorem 2. Given an arbitrary NEP Γ, there exists a star NEP Γ such that the following two conditions are satisfied: Proof. Let Γ = (V, U, G, N , α, β, x 1 , x n ) be a NEP with the underlying graph G = (X G , E G ) and X G = {x 1 , x 2 , . . . , x n } for some n ≥ 1; x 1 ≡ In and x n ≡ Halt. We construct the NEP The star network uses the definitions illustrated above for the complete network, with the following modifications: We add a new node Star to the subnetwork which acts as the center of the star network.
• node Star : The nodes x Sub i , 1 ≤ i ≤ n are modified as follows: • nodes x Sub i , 1 ≤ i ≤ n : Let w be the input string in Γ. In the input node x start , the character t l 1 is inserted in the left-hand side of the string if α(x 1 ) ∈ {r, * }, or the character t r 1 is inserted at the end of the string provided that α(x 1 ) = l. Next, the string enters Star where no rule can be applied. From Star, it can only enter x Sub 1 where the character is replaced with t l 1 and t r 1 , respectively. The new string returns to Star where t l 1 and t r 1 are changed to t l 1 and t r 1 . Then, the string can only enter x s 1 and the simulation starts. Note that the same evolutionary rules applicable in x 1 ∈ Γ are also possible in x s 1 since the special character t l 1 or t r 1 is set up in a way that it does not block the computation of nodes with α = r and α = l, respectively. Inductively, we may assume that a string of the form t l i w or wt r i lies in the node x s i ∈ Γ if and only if the string w lies in the node x i ∈ Γ. Let w be transformed into w in the node x i and sent to the connected nodes to x i in Γ. Then, a string t l i w or a string w t r i is produced in the node x s i and sent to the node Star. Let us analyze the case of a string t l i w . The process is analogous for the other string. In Star, the character t l i is replaced with the symbol t l j , granted that {x i , x j } ∈ Γ, which ensures the new string can only be accepted by subnetworks j corresponding to nodes x j connected to x i in the original network Γ. From here, the process is similar to the one described in the previous proof.

•
If α(x j ) = l, the string can only enter x Ins j where the symbol t r j is attached at the end of it. The new string, t l j w t r j , continues through x Del j where t l j is removed and x Sub j where t r j is replaced with t r j . Then, t r j is switched with t r j in Star, allowing it to enter the node x s j . Since the character t r j is at the end of the string, it does not interfere with the application of evolutionary rules at the left of the string; • If α(x j ) = r or α(x j ) = * , the string directly enters x Sub j and the symbol t l j is replaced with t l j . Then, the string enters x s j after having t l j changed to t l j in Star. As in the previous construction, the communication step in Γ has been simulated by a constant number of (evolution and communication) steps in Γ , and a new evolutionary step in Γ is going to be simulated. We conclude that the two networks accept the same language.
The explanations above allow us to infer that any step in Γ is simulated by a constant number of steps in Γ ; hence, Time Γ (n) ∈ O(Time Γ (n)) holds.

Simulating Any NEP with a Grid NEP
Theorem 3. Given an arbitrary NEP Γ there exists a grid NEP Γ such that the following two conditions are satisfied: Time Γ (n) ∈ O(Time Γ (n)).
Proof. Let Γ = (V, U, G, N , α, β, x 1 , x n ) be a NEP with the underlying graph G = (X G , E G ) and X G = {x 1 , x 2 , . . . , x n } for some n ≥ 1; x 1 ≡ In and x n ≡ Halt. We construct the NEP we add the following nodes to Γ : • node x start : • nodes x s i , 1 ≤ i ≤ n : For each node x i , 1 ≤ i ≤ n in Γ we add a subnetwork to Γ according to the subsequent cases: Case 1. If α(x i ) = l, the subnetwork is defined as follows: • nodes x Ins i , 1 ≤ i ≤ n : • nodes x Sub i , 1 ≤ i ≤ n : If α(x i ) = r, the subnetwork is analogous to the case 1 with the symbols l and r interchanged.
Case 3. If α(x i ) = * , the subnetwork is defined as follows: • nodes x Sub i , 1 ≤ i ≤ n : . Lastly, we add a set of dummy nodes to complete the grid topology with the specifications below: • nodes D : . The grid network is set up in the following way.

•
The node x start is in the top left corner. The first column is composed by it followed by the node x s 1 corresponding to the input node x 1 ∈ Γ and the remaining nodes x s i arranged in any order; • The second column is composed by a dummy node D and the nodes x Sub i . Each node x Sub i is connected to the node x s i through the left edge; • The third column is composed by a dummy node D and the nodes x Del i . Each node x Del i is connected to the node x Sub i through the left edge. In the case of α = * , a node D i is used instead of a node x Del i ; • The fourth column is composed by a dummy node D and the nodes x Ins i . Each node x Ins i is connected to the node x Del i through the left edge. In the case of α = * , a node D i is used instead of a node x Ins i ; • The fifth column is composed by nodes D.
Let w be the input string in Γ. In the input node x start , the character t l 1 is inserted in the beginning of the string if α(x 1 ) ∈ {r, * }, or the character t r 1 is inserted at the end of the string, if α(x 1 ∈ Γ) = l. Then, the string can only enter x s 1 and the simulation starts. Note that the same evolutionary rules applicable in x 1 ∈ Γ are also possible in x s 1 since the special character t l 1 or t r 1 is set up in a way that it does not block the computation of nodes with α = r and α = l, respectively. Inductively, we may assume that a string of the form t l i w or wt r i lies in the node x s i ∈ Γ if and only if the string w lies in the node x i ∈ Γ. Let w be transformed into w in the node x i and sent to the connected nodes to x i in Γ. Then, a string t l i w or a string wt r i is produced in the node x s i and sent to the connected node x Sub i . In this node, the symbols t l i and t r i are replaced with t l j and t r j , respectively, granted that {x i , x j } ∈ Γ. Then, the string continues through the second column of x Sub i nodes until it ultimately enters the node x Sub j . Note that even if the string passes through the other nodes x Sub k | k = j, no rule can applied so the string remains unchanged until it gets to the desired node. Next, the computation can be continued in one of the following ways: • If α(x j ) = l, no rule can be applied in x Sub j and the string enters x Del j . In that node, the symbol t l j is removed. Next, since it does not contain any character t ∈ T, the string can only enter the node x Ins j where a character t r j is attached to the end. Then, the string continues through the fifth column of dummy nodes D and it ultimately returns to x Sub j where t r j is replaced with t r j , allowing it to enter the node x s j ; • If α(x j ) = r or α(x j ) = * , the string directly enters x Sub j and the symbol t l j is replaced with t l j . Then, the word enters x s j . As in the previous proofs, we conclude that L(Γ) = L(Γ ), as well as Time Γ (n) ∈ O(Time Γ (n)).

Conclusions and Further Work
We have proposed three constructions for simulating an arbitrary NEP by a NEP having an underlying structure that is a complete graph, a star graph, and a two-dimensional grid, respectively. All these simulations are time efficient in the sense that every computational step in the given network is simulated by a constant number of computational steps in the constructed network.
In our view, it would be of interest whether or not similar results are valid for other variants of NEPs, such as polarized NEPs or NEPs with filtered connections as well as for variants of networks of splicing processors.

Conflicts of Interest:
The authors declare no conflict of interest.