1. 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.
2. 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:
is the set of all strings formed by symbols in V;
is the length of string x;
is the empty string, ;
is the minimal alphabet V such that .
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
be a rule, where
:
If , then the rule is called a substitution rule;
If and , then the rule is called a deletion rule;
If and , then the rule is called an insertion rule.
The set of all substitution, deletion, and insertion rules over V is denoted by , , and , respectively.
Given a rule as above and a string , 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:
- –
If
, then
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.
- –
If
, then
- –
If , then ,
For every rule
,
, and
, we define
. 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
and
, we define:
An evolutionary processor (EP) over an alphabet V is a tuple , where:
M is a set of either substitution, or deletion or insertion rules over the alphabet V. Formally: or or . The set M represents the set of evolutionary rules of the processor;
are the input permitting/forbidding symbols of the processor, while are the output permitting/forbidding symbols of the processor.
We denote the set of evolutionary processors over V by . A network of evolutionary processors (NEP for short) is a seven-tuple , where:
V and U are the input and network alphabets, respectively, .
is an undirected graph without loops, with the set of nodes and the set of edges . Each edge is given in the form of a binary set. G is called the underlying graph of the network;
is a mapping which associates with each node the evolutionary processor , , , , ;
; gives the action mode of the rules of node x on the strings existing in that node;
defines the type of the
input/output filters of a node. More precisely, for every node,
, the following filters are defined:
That is, (resp. ) indicates whether or not the string z can pass the input (resp. output) filter of x. More generally, (resp. ) is the set of strings of L that can pass the input (resp. output) filter of x.
and are the input node, and the output node, respectively, of the NEP.
A configuration of a NEP as above is a function which associates a multiset of strings 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 , we define the initial configuration of on w by and for all .
A configuration is followed by another configuration either by an
evolutionary step or by a
communication step. A configuration
follows a configuration
C by an evolutionary step if each component
, for some node
x, is the result of applying all the evolutionary rules in the set
that can be applied to the strings in the set
. Formally, configuration
follows the configuration
C by a an evolutionary step, written as
, 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
follows a configuration
C by a communication step (we write
iff for all
Let be a NEP, the computation of on the input string is a sequence of configurations , where is the initial configuration of on w, and , by a for all . 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
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 , , , of on is denoted by and equals m. The time complexity of is the function from to , In other words, delivers the maximal number of computational steps carried out by for accepting an input string of length n.
3. 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:
- 1.
;
- 2.
.
Proof. Let
be a NEP with the underlying graph
and
for some
;
and
. We construct the NEP
;
and
, where
, | , |
| |
Note that the underlying graph is a complete graph. First, we add the following nodes to :
node :
nodes (they actually simulate the work of in ):
For each node in we add a subnetwork to according to the subsequent cases:
Case 1. If , the subnetwork is defined as follows (these nodes are used for preparing the string in the aim of processing them in the nodes ):
nodes :
nodes :
nodes :
Case 2. If , the subnetwork is analogous to the Case 1 with the characters l and r interchanged.
Case 3. If , 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 ):
nodes :
Let w be the input string in . In the input node , the character is inserted at the beginning of the string if , or the character is inserted at the end of the string, provided that . Next, the string enters where the character is replaced with and , respectively. Then, the string can only enter and the simulation starts. Note that the same evolutionary rules applicable in are also possible in since the special character or is set up in a way that it does not block the computation of nodes with and , respectively. Inductively, we may assume that a string of the form or lies in the node if and only if the string w lies in the node .
Let w be transformed into in the node and sent to the connected nodes to in . Then, a string or a string is produced in the node and sent to the node . Let us analyze the case of a string . The process is analogous for the other string. In , the character is replaced with the symbol , assuming that , which ensures the new string can only be accepted by subnetworks j corresponding to nodes connected to in the original network . From here, the process differs in accordance with the value of the connected node .
If , the string can only enter where the symbol is appended to it. The new string, , continues through where is removed and where is replaced with , allowing it to enter the node . Since the character is at the end of the string, it does not interfere with the application of evolutionary rules at the left of the string;
If or , the string directly enters and the symbol is replaced with . Then, the string enters . 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 . Furthermore, the number of steps in for simulating an evolutionary step followed by a communication one in is constant; hence, holds.
□
4. 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:
- 1.
;
- 2.
.
Proof. Let
be a NEP with the underlying graph
and
for some
;
and
. We construct the NEP
;
and
, where
, | , |
| |
The star network uses the definitions illustrated above for the complete network, with the following modifications:
We add a new node to the subnetwork which acts as the center of the star network.
node :
The nodes , are modified as follows:
Case 1. If :
nodes :
Case 2. If , the nodes are analogous to the case 1 with the characters l and r interchanged.
Case 3. If , the nodes , are defined in the following way:
nodes :
Let w be the input string in . In the input node , the character is inserted in the left-hand side of the string if , or the character is inserted at the end of the string provided that . Next, the string enters where no rule can be applied. From , it can only enter where the character is replaced with and , respectively. The new string returns to where and are changed to and . Then, the string can only enter and the simulation starts. Note that the same evolutionary rules applicable in are also possible in since the special character or is set up in a way that it does not block the computation of nodes with and , respectively. Inductively, we may assume that a string of the form or lies in the node if and only if the string w lies in the node .
Let w be transformed into in the node and sent to the connected nodes to in . Then, a string or a string is produced in the node and sent to the node . Let us analyze the case of a string . The process is analogous for the other string. In , the character is replaced with the symbol , granted that , which ensures the new string can only be accepted by subnetworks j corresponding to nodes connected to in the original network . From here, the process is similar to the one described in the previous proof.
If , the string can only enter where the symbol is attached at the end of it. The new string, , continues through where is removed and where is replaced with . Then, is switched with in , allowing it to enter the node . Since the character is at the end of the string, it does not interfere with the application of evolutionary rules at the left of the string;
If or , the string directly enters and the symbol is replaced with . Then, the string enters after having changed to in . 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, holds. □
5. 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:
- 1.
;
- 2.
.
Proof. Let
be a NEP with the underlying graph
and
for some
;
and
. We construct the NEP
;
and
, where
, | , |
| |
First, we add the following nodes to :
node :
nodes :
For each node in we add a subnetwork to according to the subsequent cases:
Case 1. If , the subnetwork is defined as follows:
nodes :
nodes :
nodes :
Case 2. If , the subnetwork is analogous to the case 1 with the symbols l and r interchanged.
Case 3. If , the subnetwork is defined as follows:
nodes :
Lastly, we add a set of dummy nodes to complete the grid topology with the specifications below:
nodes :
nodes D :
The grid network is set up in the following way.
The node is in the top left corner. The first column is composed by it followed by the node corresponding to the input node and the remaining nodes arranged in any order;
The second column is composed by a dummy node D and the nodes . Each node is connected to the node through the left edge;
The third column is composed by a dummy node D and the nodes . Each node is connected to the node through the left edge. In the case of , a node is used instead of a node ;
The fourth column is composed by a dummy node D and the nodes . Each node is connected to the node through the left edge. In the case of , a node is used instead of a node ;
The fifth column is composed by nodes D.
Let w be the input string in . In the input node , the character is inserted in the beginning of the string if , or the character is inserted at the end of the string, if . Then, the string can only enter and the simulation starts. Note that the same evolutionary rules applicable in are also possible in since the special character or is set up in a way that it does not block the computation of nodes with and , respectively. Inductively, we may assume that a string of the form or lies in the node if and only if the string w lies in the node .
Let w be transformed into in the node and sent to the connected nodes to in . Then, a string or a string is produced in the node and sent to the connected node . In this node, the symbols and are replaced with and , respectively, granted that . Then, the string continues through the second column of nodes until it ultimately enters the node . Note that even if the string passes through the other nodes , 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 , no rule can be applied in and the string enters . In that node, the symbol is removed. Next, since it does not contain any character , the string can only enter the node where a character is attached to the end. Then, the string continues through the fifth column of dummy nodes D and it ultimately returns to where is replaced with , allowing it to enter the node ;
If or , the string directly enters and the symbol is replaced with . Then, the word enters . As in the previous proofs, we conclude that , as well as .
□