# Insertion-Deletion Systems with Substitutions I

- 55 Downloads

## Abstract

With good biological motivation, we add substitutions as a further type of operations to (in particular, context-free) insertion-deletion systems. This way, we obtain new characterizations of and normal forms for context-sensitive and recursively enumerable languages.

## Keywords

Computational completeness Context-sensitive Insertions Deletions Substitutions## 1 Introduction

Insertion-deletion systems, or ins-del systems for short, are well established as computational devices and as a research topic within Formal Languages throughout the past nearly 30 years, starting off with the PhD thesis of Kari [3].

However, from its very beginning, papers highlighting the potential use of such systems in modelling DNA computing also discussed the replacement of single letters (possibly within some context) by other letters, an operation called *substitution* in [2, 4]. Interestingly, all theoretical studies on grammatical mechanisms involving insertions and deletions omitted including the substitution operation in their studies. With this paper, we are stepping into this gap by studying ins-del systems with substitutions, or ins-del-sub systems for short.

We put special emphasis on extending context-free ins-del systems with substitutions. We observe quite diverse effects, depending on whether the substitutions are context-free, one-sided or two-sided. We can characterize the context-sensitive languages by extending context-free insertion systems with substitutions, which can be seen as a new normal form for monotone Chomsky grammars. For omitted proofs and further results, see [13].

## 2 Basic Definitions and Observations

We assume the reader to be familiar with the basics of formal language theory.

An *ins-del system* is a 5-tuple \(\textit{ID}=(V, T, A, I, D)\), consisting of two alphabets *V* and *T* with \(T\subseteq V\), a finite language *A* over *V*, a set of *insertion* rules *I* and a set of *deletion* rules *D*. Both sets of rules are formally defined as sets of triples of the form (*u*, *a*, *v*) with \(a,u,v \in V^*\) and \(a\ne \lambda \). We call elements occurring in *T* *terminal* symbols, while referring to elements of \(V{\setminus } T\) as *nonterminals*. Elements of *A* are called *axioms*.

Let \(w_1 u v w_2\), with \(w_1, u, v, w_2\in V^*\), be a string. Applying the insertion rule \((u,a,v)\in I\) inserts the string \(a\in V^*\) between *u* and *v*, which results in the string \(w_1 u a v w_2\).

The application of a deletion rule \((u,a,v)\in D\) results in the removal of an substring *a* from the context (*u*, *v*). More formally let \(w_1 u a v w_2\in V^*\) be a string. Then, applying \((u,a,v)\in D\) results in the string \(w_1 u v w_2\).

We define the relation \(\Longrightarrow \) as follows: Let \(x,y\in V^*\). Then we write \(x \Longrightarrow _\text {ins} y\) if *y* can be obtained by applying an insertion or deletion rule to *x*. We also write \((u,a,v)_\text {ins}\) or \((u,a,v)_\text {del}\) to specify whether the applied rule has been an insertion or a deletion rule. Consider \((u,a,v)_\text {ins}\) or \((u,a,v)_\text {del}\). Then we refer to *u* as the *left context* and to *v* as the *right context* of \((u,a,v)_\text {ins}/(u,a,v)_\text {del}\).

Let \(\textit{ID}=(V,T,A,I,D)\) be an ins-del system. The language generated by \(\textit{ID}\) is defined by \(L(\textit{ID})=\{w\in T^*\mid \alpha \Longrightarrow ^* w, \alpha \in A\}\).

*size*of \(\textit{ID}\) describes its descriptional complexity and is defined by a tuple \((n,m,m'; p,q,q')\), where

*context-free*ins-del systems, while we call a family \(\text {INS}^{m,m'}_n \text {DEL}^{q,q'}_p\) with \(m+m'>0 \wedge mm'=0\) or \((q+q'>0 \wedge qq'=0)\) a family of

*one-sided*ins-del systems. According to [1], an ins-del system

*in normal form*if

for any \((u,a,v)\in I'\), it holds that \(|a|=n,\ |u|=m\) and \(|v|=m'\), and

for any \((u,a,v)\in D'\), it holds that \(|a|=p,\ |u|=q\) and \(|v|=q'\).

Alhazov *et al.* [1, 12] have shown the following auxiliary result:

### Theorem 1

For every ins-del system \(\textit{ID} \), one can construct an insertion-deletion system \(\textit{ID}'\) in normal form of the same size with \(L(\textit{ID}')=L(\textit{ID})\).

In the following sections, we use a modified normal form for ins-del systems of size (1, 1, 1; 1, 1, 1). Given an arbitrary ins-del system of size (1, 1, 1; 1, 1, 1), the construction of this modified normal form is as follows:

### Construction 1

The basic idea of Construction 1 is the same as in the usual normal form constructions (see Theorem 1): the symbol \(\$\) is used as a padding symbol to ensure that the left and right contexts of all rules are of the required size. We can show that Construction 1 is equivalent to the usual normal form construction.

### Theorem 2

Let \(\textit{ID}'=(V\cup \{ \$ \},T,A',I',D'\cup \{(\lambda ,\$,\lambda )\} )\) be an ins-del system of size (1, 1, 1; 1, 1, 1) in normal form and \(\textit{ID}''=(V\cup \{ \$,X \},T, A'',I'',D'' )\) be defined according to Construction 1. Then, \(L(\textit{ID}')=L(\textit{ID}'')\).

Unlike the usual normal form construction, context-free deletions can only occur at the beginning and the end of a sentential form in the case of Construction 1. This fact will prove useful below.

Ins-del systems have been extensively studied regarding the question if they can describe all of the recursively enumerable languages. Let us summarize these results first by listing the classes of languages known to be equal to RE: \(\text {INS}^{1,1}_1 \text {DEL}^{1,1}_1\) [10], \(\text {INS}^{0,0}_3 \text {DEL}^{0,0}_2\) and \(\text {INS}^{0,0}_2 \text {DEL}^{0,0}_3\) [7], \(\text {INS}^{1,1}_1 \text {DEL}^{0,0}_2\) [9, Theorem 6.3], \(\text {INS}^{0,0}_2 \text {DEL}^{1,1}_1\) [5], \(\text {INS}^{0,1}_2 \text {DEL}^{0,0}_2\) and \(\text {INS}^{1,2}_1 \text {DEL}^{1,0}_1\) [8], \(\text {INS}^{1,0}_1 \text {DEL}^{1,2}_1\) [5]. By way of contrast, the following language families are known not to be equal to RE, the first one is even a subset of CF: \(\text {INS}^{0,0}_2 \text {DEL}^{0,0}_2\) [12], \(\text {INS}^{1,1}_1 \text {DEL}^{1,0}_1\) [8], \(\text {INS}^{1,0}_1 \text {DEL}^{1,1}_1\) [5], \(\text {INS}^{1,0}_1 \text {DEL}^{0,0}_2\) and \(\text {INS}^{0,0}_2 \text {DEL}^{1,0}_1\) [6].

We define *substitution rules* to be of the form \((u,a\rightarrow b,v)\); \(u,v\in V^*\); \(a,b\in V\). Let \(w_1uavw_2\); \(w_1, w_2 \in V^*\) be a string over *V*. Then applying the substitution rule \((u,a\rightarrow b,v)\) allows us to substitute a single letter *a* with another letter *b* in the context of *u* and *v*, resulting in the string \(w_1ubvw_2\). Formally, we define an ins-del-sub system to be a 6-tuple \(\textit{ID}_r=(V, T, A, I, D, S)\), where *V*, *T*, *A*, *I* and *D* are defined as in the case of usual ins-del systems and *S* is a set of substitution rules. Substitution rules define a relation \(\Longrightarrow _\text {sub}\): Let \(x=w_1uavw_2\) and \(y=w_1ubvw_2\) be strings over *V*. We write \(x \Longrightarrow _\text {sub} y\) iff there is a substitution rule \((u,a\rightarrow b,v)\). In the context of ins-del-sub systems, we write \({{\,\mathrm{\hat{\Longrightarrow }}\,}}\) to denote any of the relations \(\Longrightarrow _\text {ins}\), \(\Longrightarrow _\text {del}\) or \(\Longrightarrow _\text {sub}\). We define the closures \({{\,\mathrm{\hat{\Longrightarrow }}\,}}^*\) and \({{\,\mathrm{\hat{\Longrightarrow }}\,}}^+\) as usual. The language generated by an ins-del-sub system \(\textit{ID}_r\) is defined as \(L(\textit{ID}_r)=\{w\in T^*\mid \alpha {{\,\mathrm{\hat{\Longrightarrow }}\,}}^* w,\ \alpha \in A\}\).

As with usual ins-del system, we measure the complexity of an ins-del-sub system \(\textit{ID}_r=(V, T, A, I, D, S)\) via its *size*, which is defined as a tuple \((n,m,m';p,q,q';r,r')\), where \(n,m,m',p,q\) and \(q'\) are defined as in the case of usual ins-del systems, while *r* and \(r'\) limit the maximal length of the left and right context of a substitution rule, respectively, i.e., \(r=\max \{|u|\mid (u,a\rightarrow b,v)\in S\}\), \(r'=\max \{|v|\mid (u,a\rightarrow b,v)\in S\}\). \(\text {INS}^{m,m'}_n \text {DEL}^{q,q'}_p \text {SUB}^{r,r'}\) denotes the family of all ins-del-sub systems of size \((n,m,m';p,q,q';r,r')\). Note that, as only one letter is replaced by any substitution rule, there is no subscript below \(\text {SUB}\). Depending on the context, we also refer to the family of languages generated by ins-del-sub systems of size \((n,m,m';p,q,q';r,r')\) by \(\text {INS}^{m,m'}_n \text {DEL}^{q,q'}_p \text {SUB}^{r,r'}.\) Expanding our previous terminology, we call substitution rules of the form \((\lambda ,a\rightarrow b,\lambda )\) *context-free*, while substitution rules of the form \((u,a\rightarrow b,\lambda )\) or \((\lambda ,a\rightarrow b,v)\) with \(u\ne \lambda \ne v\) are called *one-sided*. Substitution rules of the form \((u,a\rightarrow b,v)\) with \(u\ne \lambda \ne v\) are referred to as *two-sided*.

Let \(^R\) be the the reversal (mirror) operator. For a language *L* and its mirror \(L^R\) the following lemma holds.

### Lemma 1

\(L\in \text {INS}^{m,m'}_n \text {DEL}^{q,q'}_p \text {SUB}^{r,r'}\) iff \(L^R\in \text {INS}^{m',m}_n \text {DEL}^{q',q}_p \text {SUB}^{r',r}\).

We will now define the term *resolve*. Let \(\textit{ID}_r= (V, T, A, I, D, S)\) be an ins-del-sub system. We say that a nonterminal *X* of \(\textit{ID}_r\) is resolved if *X* is either deleted or substituted. It is easy to see that in any terminal derivation of \(\textit{ID}_r\) all nonterminals must be resolved at some point of the derivation. We remark that a nonterminal *X* may be resolved by being substituted with a nonterminal *Y*, which in turn must be resolved.

*normal form*for ins-del-sub systems. An ins-del-sub system

for any \((u,a,v)\in I\), it holds that \(|a|=n,\ |u|=m\) and \(|v|=m'\);

for any \((u,a,v)\in D\), it holds that \(|a|=p,\ |u|=q\) and \(|v|=q'\);

for any \((u,a\rightarrow b,v)\in S\), it holds that \(|u|=r\) and \(|v|=r'\).

### Theorem 3

For every ins-del-sub system \(\textit{ID}_r\) of size \((n,m,m';p,q,q';r,r')\), one can construct an ins-del-sub system \(\textit{ID}_r'\) of the same size in normal form, with \(L(\textit{ID}_r')=L(\textit{ID}_r)\).

### Proof

Let \(h: V\cup \{\$\}\rightarrow V\) be a homomorphism with \(h(x)=x \text { if }x\in V\) and \(h(\$)=\lambda \). Open image in new window if and only if Open image in new window with \(h(w')=w\) can be shown by induction. While the only-if part follows easily, consider the following for the if part. We can assume that in any derivation of \(\textit{ID}_r'\) the first *i* and the last *j* letters of the axiom are not deleted until the very end of derivation. Hence, insertion rules of the form \((z_1,\$^n,z_2)\) with \(z_1 \in (\$\cup V)^m\), \(z_2 \in (\$\cup V)^{m'}\) are applicable until the very end. It is clear that due to insertion rules of the form \((z_1,\$^n,z_2)\) and the deletion rule \((\lambda ,\$,\lambda )\) it is possible to generate an arbitrary number of \(\$\) at an arbitrary position of a sentential form of \(\textit{ID}_r'\). \(\square \)

The following result will be useful in subsequent proofs; compare to Lemma 1.

### Lemma 2

- 1.
\(\mathcal {L}\subseteq \text {INS}^{m,m'}_n \text {DEL}^{q,q'}_p \text {SUB}^{r,r'}\) iff \(\mathcal {L}\subseteq \text {INS}^{m',m}_n \text {DEL}^{q',q}_p \text {SUB}^{r',r}\).

- 2.
\(\text {INS}^{m,m'}_n \text {DEL}^{q,q'}_p \text {SUB}^{r,r'}\subseteq \mathcal {L}\) iff \( \text {INS}^{m',m}_n \text {DEL}^{q',q}_p \text {SUB}^{r',r} \subseteq \mathcal {L}\).

Due to the definition of ins-del-sub systems, the following result is clear.

### Lemma 3

\(\text {INS}^{m,m'}_n \text {DEL}^{q,q'}_p \subseteq \text {INS}^{m,m'}_n \text {DEL}^{q,q'}_p \text {SUB}^{r,r'}\).

Whether this inclusion is proper, is the question, that will be addressed in the following sections. We will see that while in some cases an arbitrary system of size \((n,m,m';p,q,q',r,r')\) can be simulated by a system of size \((n,m,m';p,q,q')\), this is not the general case. Furthermore, we will see that families \(\text {INS}^{m,m'}_n \text {DEL}^{q,q'}_p\), which are not computationally complete, may reach computational completeness via an extension with substitution rules. Additionally, we will see below that families of ins-del systems which are equally powerful may no longer be after being extended with the same class of substitution rules, i.e., we have \(\text {INS}^{m_1,m_1'}_{n_1} \text {DEL}^{q_1,q_1'}_{p_1} =\text {INS}^{m_2,m_2'}_{n_2} \text {DEL}^{q_2,q_2'}_{p_2}\), but possibly \(\text {INS}^{m_1,m_1'}_{n_1} \text {DEL}^{q_1,q_1'}_{p_1} \text {SUB}^{r,r'} \subset \text {INS}^{m_2,m_2'}_{n_2} \text {DEL}^{q_2,q_2'}_{p_2} \text {SUB}^{r,r'}\). The reverse case might occur, as well.

Because the application of an insertion rule (*u*, *x*, *v*) corresponds to the application of the monotone rewriting rule \(uv\rightarrow uav\) and the application of a substitution rule \((u,a\rightarrow b,v)\) corresponds to the application of the monotone rewriting rule \(uav\rightarrow ubv\), a monotone grammar can simulate derivations of an insertion-substitution system. (More technically speaking, we have to do the replacements on the level of pseudo-terminals \(N_a\) for each terminal *a* and also add rules \(N_a\rightarrow a\), but these are minor details.) Hence, we can conclude:

### Theorem 4

For any integers \(m,m',n,r,r'\ge 0\), \(\text {INS}^{m,m'}_n \text {DEL}^{0,0}_0\text {SUB}^{r,r'} \subseteq \text {CS}\).

## 3 Main Results

We will focus on context-free ins-del systems, which are extended with substitution rules. More precisely, we will analyze the computational power of the family of systems \(\text {INS}^{0,0}_n \text {DEL}^{0,0}_p \text {SUB}^{r,r'}\).

We are going to analyze substitution rules of the form \((\lambda ,a\rightarrow b,\lambda )\), which means that letters may be substituted regardless of any context. We will show that extending context-free ins-del systems with context-free substitution rules does not result in a more powerful system. In fact, a context-free ins-del-sub system of size (*n*, 0, 0; *p*, 0, 0; 0, 0) can be simulated by an ins-del system of size (*n*, 0, 0; *p*, 0, 0).

### Theorem 5

Let \(\textit{ID}_r\in \text {INS}^{0,0}_n \text {DEL}^{0,0}_p \text {SUB}^{0,0}\), then there exists an ins-del system \(\textit{ID}\in \text {INS}^{0,0}_n \text {DEL}^{0,0}_p\) such that \(L(\textit{ID}_r)=L(\textit{ID})\).

### Proof

(Sketch). Let \(\textit{ID}_r= (V, T, A, I, D, S)\in \text {INS}^{0,0}_n \text {DEL}^{0,0}_p \text {SUB}^{0,0}\). It is clear that any letter *a*, that is to be replaced by a substitution rule \((\lambda , a\rightarrow b, \lambda )\), has been introduced by either an insertion rule \((\lambda , w_1 a w_2, \lambda )\) or as part of an axiom \(w_1' a w_2'\) at some point before executing the substitution. As *a* serves no purpose other than to be replaced (i.e., it is not used as a context), the basic idea is to skip introducing *a* altogether and introduce *b* instead. More formally: instead of applying an insertion rule \((\lambda , w_1 a w_2, \lambda )\)/an axiom \(w_1' a w_2'\) and replacing *a* via \((\lambda , a\rightarrow b, \lambda )\) at a later point, we introduce a new insertion rule \((\lambda , w_1 b w_2, \lambda )\)/a new axiom \(w_1' b w_2'\), which we apply instead of \((\lambda , w_1 a w_2, \lambda )\)/\(w_1' a w_2'\). This idea can be cast into an algorithm to produce an ins-del system \(\textit{ID}= (V, T, A', I', D)\) with \(L(\textit{ID}_r)=L(\textit{ID})\). As only context-free insertion rules of size maximum (*n*, 0, 0) are added to \(I'\), it is clear that \(\textit{ID}\in \text {INS}^{0,0}_n \text {DEL}^{0,0}_p\) holds. \(\square \)

Considering the question about the generative power of context-free ins-del systems with context-free substitution rules compared to usual context-free ins-del systems, Theorem 5 and Lemma 3 together yield:

### Corollary 1

\(\text {INS}^{0,0}_n \text {DEL}^{0,0}_p \text {SUB}^{0,0} =\text {INS}^{0,0}_n \text {DEL}^{0,0}_p\).

### 3.1 Extension with One-Sided Substitution

Now, we will analyze the effect of one-sided substitution rules if used to extend a context-free ins-del system. We will show that using one-sided substitution rules can greatly increase the computational power of context-free insertion and deletion rules. In some cases, we even get computationally completeness results.

We will now construct an ins-del-sub system \(\textit{ID}'_r\) of size (1, 0, 0; 1, 0, 0; 1, 0) which simulates \(\textit{ID}_r\) of size (1, 1, 0; 1, 1, 0; 1, 0). The system \(\textit{ID}'_r\) is constructed in the following manner:

### Construction 2

*i*is the label of an insertion rule of \(\textit{ID}_r\), while the set \(D'\) of deletion rules as contains \((\lambda ,\$,\lambda )\) and all \((\lambda ,X_i,\lambda )\), where

*i*is the label of a deletion rule of \(\textit{ID}_r\). Furthermore, we define the set of substitution rules \(S'=S_1\cup S_2\), with

*i*is the label of \((u,a,\lambda )\), corresponds to a deletion rule \((\lambda ,X_i,\lambda ) \in D'\) and a substitution rule \((u,a \rightarrow X_i,\lambda )\in S_2\) of \(\textit{ID}_r'\). The basic idea of the construction is to simulate a deletion rule \((u,a,\lambda )\in D\) by substituting the letter

*a*with left context

*u*via \((u,a \rightarrow X_i,v)\in S_2\). The introduced nonterminal \(X_i\) is then deleted at some point by the deletion rule \((\lambda ,X_i,\lambda ) \in D'\). It is clear that a derivation of the form

### Proposition 1

Let \(\alpha \in A\). Consider a derivation \(\alpha {{\,\mathrm{\hat{\Longrightarrow }}\,}}^* w\in T^*\) of \(\textit{ID}'_r\) . Then, there is an alternative derivation of \(\textit{ID}'_r\), leading from \(\alpha \) to *w*, in which all nonterminals \(X_i\in V'{\setminus } V\) are resolved immediately after being introduced.

This allows us to state:

### Theorem 6

\(\text {INS}^{0,0}_1 \text {DEL}^{0,0}_1\text {SUB}^{1,0} =\text {INS}^{1,0}_1 \text {DEL}^{1,0}_1\text {SUB}^{1,0}\).

It is easy to see that a result identical to Theorem 6 can be shown analogously for the mirrors of \(\text {INS}^{0,0}_1 \text {DEL}^{0,0}_1\text {SUB}^{1,0}\) and \(\text {INS}^{1,0}_1 \text {DEL}^{1,0}_1\text {SUB}^{1,0}\). Therefore:

### Corollary 2

\(\text {INS}^{0,0}_1 \text {DEL}^{0,0}_1\text {SUB}^{0,1} =\text {INS}^{0,1}_1 \text {DEL}^{0,1}_1\text {SUB}^{0,1}\).

We now analyze the computational power of ins-del-sub systems of size (2, 0, 0; 2, 0, 0; 0, 1). While the family of ins-del systems of size (2, 0, 0; 2, 0, 0) is known to be a proper subset of \(\text {CF}\), see [11, 12], we will show that an extension with substitution rules of the form \((\lambda , A\rightarrow B, C)\) results in a significant increase in computational power. More precisely, by simulating an ins-del systems of size (2, 0, 1; 2, 0, 0), we will show that \(\text {INS}^{0,0}_2 \text {DEL}^{0,0}_2 \text {SUB}^{0,1}=\text {RE}\) holds.

### Construction 3

The basic idea of Construction 3 is essentially the same as in Construction 2: as context-free insertion rules cannot scan for contexts (by definition), this task is handled by the corresponding substitution rules. Consider an insertion rule \((\lambda , N_{i,2} N_{i,1},\lambda )\) of \(\textit{ID}_r\) where *i* is the label of an insertion rule \((\lambda ,ab,c) \in I\). Then the substitution rules, corresponding to this rule, are \((\lambda , N_{i,1}\rightarrow b,c )\) and \((\lambda , N_{i,2}\rightarrow a ,b )\). This idea leads us to:

### Theorem 7

\(\text {INS}^{0,1}_2 \text {DEL}^{0,0}_2\subseteq \text {INS}^{0,0}_2 \text {DEL}^{0,0}_2\text {SUB}^{0,1} \).

As \(\text {INS}^{0,1}_2 \text {DEL}^{0,0}_2 =\text {RE}\) holds according to [8, Theorem 5], we conclude:

### Corollary 3

\(\text {INS}^{0,0}_2 \text {DEL}^{0,0}_2\text {SUB}^{0,1} =\text {RE}\).

This is an interesting result as the families of ins-del systems of size (2, 0, 0; 2, 0, 0) and of size (2, 0, 0; 0, 0, 0) are known to be equal [12, Theorem 4.7], yet both classes extended with the same class of substitution rules differ in computational power. As \(\text {RE}\) and \(\text {CS}\) are closed under reversal, the next corollary follows with Lemma 2 and Theorem 4.

### Corollary 4

\(\text {INS}^{0,0}_2 \text {DEL}^{0,0}_0\text {SUB}^{1,0} \subseteq \text {CS}\) and \(\text {INS}^{0,0}_2 \text {DEL}^{0,0}_2\text {SUB}^{1,0} =\text {RE}\).

### 3.2 Extension with Two-Sided Substitution

After analyzing the effect of context-free and one-sided substitution rules on context-free ins-del systems, we will now proceed to two-sided substitution rules, i.e., substitution rules with left and right context. Somehow surprisingly, this lifts the computational power of even the ‘weakest’ ins-del systems, that is, systems of size (1, 0, 0; 1, 0, 0), up to the level of RE. Let \(\textit{ID}\in \text {INS}^{1,1}_1 \text {DEL}^{1,1}_1\). We will show that there is a system \(\textit{ID}_r\in \text {INS}^{0,0}_1 \text {DEL}^{0,0}_1 \text {SUB}^{1,1}\) capable of simulating \(\textit{ID}\). The basic idea is that the context checks, necessary for simulating rules with left and right context, are performed by the substitution rules. The system \(\textit{ID}_r\) is constructed in the following manner:

### Construction 4

*i*, and we introduce a new nonterminal \(X_i\). Define \(\textit{ID}_r=(V',T,A,I',D',S)\) with

*X*is defined as in Construction 1. Finally, \(S=S_1\cup S_2\) with

The basic idea is similar to Construction 2. Each deletion rule \((u,a,v)\in D\) of \(\textit{ID}\), where *i* is the label of (*u*, *a*, *v*), corresponds to a deletion rule \((\lambda ,X_i,\lambda ) \in D'\) and a substitution rule \((u,a \rightarrow X_i,v)\in S_2\). We leave the context checks to the substitution rules. The same idea is applied to the insertion rules. With some technical effort, we can prove the following result.

### Proposition 2

Let \(\alpha \in A\). Consider a derivation \(\alpha {{\,\mathrm{\hat{\Longrightarrow }}\,}}^* w\in T^*\). Then, there is an alternative derivation, leading from \(\alpha \) to *w*, in which all nonterminals \(X_i\in V'{\setminus } V\) are resolved immediately after being introduced.

This property is the key to show that for a system \(\textit{ID}_r\) of size (1, 0, 0; 1, 0, 0; 1, 1) constructed from a given ins-del system \(\textit{ID}\) of size (1, 1, 1; 1, 1, 1) in normal form according to Construction 4, we find \(L(\textit{ID})=L(\textit{ID}_r)\). As such ins-del systems are known to be computational complete, we conclude:

### Corollary 5

\(\text {INS}^{1,1}_1 \text {DEL}^{1,1}_1 =\text {INS}^{0,0}_1 \text {DEL}^{0,0}_1\text {SUB}^{1,1} =\text {RE}\).

We now analyze the power of ins-del-sub systems of size (1, 0, 0; 0, 0, 0; 1, 1). By definition, it is clear that \(\text {INS}^{0,0}_1 \text {DEL}^{0,0}_0 \text {SUB}^{1,1}\subseteq \text {INS}^{0,0}_1 \text {DEL}^{0,0}_1 \text {SUB}^{1,1}\) holds. In the following, we will show that this inclusion is proper. To be more precise, we will show that ins-del-sub systems of size (1, 0, 0; 0, 0, 0; 1, 1) characterize the context-sensitive languages. By Theorem 4, we are left to prove \(\text {CS}\subseteq \text {INS}^{0,0}_1 \text {DEL}^{0,0}_0 \text {SUB}^{1,1}\).

*L*, there is a linear bounded automaton (LBA) \(LB=(Q,T,\varGamma ,q_0,\delta ,\square ,F)\) accepting

*L*. We are going to construct an ins-del-sub system of size (1, 0, 0; 0, 0, 0; 1, 1) to simulate

*LB*. We first give a brief sketch of the basic idea behind this simulation in the following paragraph. The simulation evolves around strings of the form

*LB*, while the concatenation of the second component of each tuple, that is, \(\$ v_1 v_2\dots v_{i-1}q_jv_i v_{i+1}\dots v_{n-1} v_n\#\), represents a configuration of

*LB*running on the input word \(u_1\dots u_n\). The simulation of

*LB*runs entirely on the second components of the tuples. If \(\$ v_1 v_2\dots v_{i-1}q_jv_i v_{i+1}\dots v_{n-1} v_n\#\) is an accepting configuration, i.e., \(q_i\in F\), we substitute all tuples with their respective first component. For instance \((u_k,v_k)\) is substituted with \(u_k\). In short, this means that if (the simulation of)

*LB*running on \(u_1\dots u_n\) halts in an accepting configuration, we generate the word \(u_1\dots u_n\). More details follow:

### Construction 5

*LB*. We define \(\underline{L}:=\{\lambda , \$\}\) and \(\underline{R}:=\{\lambda ,\# \}\). Then, the ins-del-sub system \(\textit{ID}_r=(V\cup T,T,A,I,\emptyset ,S)\) with \(V= V_1 \cup V_2 \cup V_3\), where

*L*by simulating

*LB*. Strings of the form

*LB*’s transitions. We define \(A=\{X_0 (a,a\#)\mid a\in T\}\cup \{a\mid a\in L\cap T\}\) and \(I=\{(\lambda ,X_a,\lambda )\mid a\in T\}\). If \(\lambda \in L\), we add \(\lambda \) to the axiom. The set of substitution rules is defined as \(S=S_{\text {init}}\cup S_{N}\cup S_{R}\cup S_{L} \cup S_{\text {endmarker},L} \cup S_{\text {endmarker},R} \cup S_{\text {final}}\). In

*LB*, we add substitution rules

*w*has been accepted by the simulated linear bounded automaton

*LB*. \(S_{f_1}\) consists of the substitutions

Working out the correctness of this construction, we can show:

### Theorem 8

\(\text {INS}^{0,0}_1 \text {DEL}^{0,0}_0 \text {SUB}^{1,1}= \text {CS}\).

As a consequence of Theorem 8, we can formulate the following Penttonen-style normal form theorem for context-sensitive languages. We believe that this could be useful in particular when dealing with variations of insertion systems.

### Theorem 9

*L*, \(\lambda \notin L\), there is a context-sensitive grammar \(G=(N,T,P,S)\), such that \(L=L(G)\), with rules of the forms

Allowing erasing productions on top, we also arrive at a new characterization of the family of recursively enumerable languages. By different methods, we could even prove that either of the two non-context-free forms suffices to achieve RE.

## 4 Summary and Main Open Questions

We have shown that the addition of substitution rules to ins-del systems yields new characterizations of \(\text {RE}\) and \(\text {CS}\). In particular we have shown the following equalities: \(\text {INS}^{0,0}_2 \text {DEL}^{0,0}_2\text {SUB}^{1,0} =\text {RE}\), \(\text {INS}^{0,0}_1 \text {DEL}^{0,0}_1 \text {SUB}^{1,1}= \text {RE}\) and \(\text {INS}^{0,0}_1 \text {DEL}^{0,0}_0 \text {SUB}^{1,1}= \text {CS}\). Additionally we have shown \(\text {INS}^{1,0}_1 \text {DEL}^{1,0}_1 \text {SUB}^{1,0}=\text {INS}^{0,0}_1 \text {DEL}^{0,0}_1 \text {SUB}^{1,0}\). While in the above cases an extension with (non-context-free) substitution rules leads to an increase in computational power, we have also shown that the addition of context-free substitution rules to context-free ins-del systems does not affect the computational power.

The main open question is if \(\text {INS}^{0,0}_1 \text {DEL}^{0,0}_1 \text {SUB}^{1,0}\) is computationally complete. We conjecture this not to be the case, as with only left context rules, information can only be propagated in one direction. Yet, should \(\text {INS}^{0,0}_1 \text {DEL}^{0,0}_1 \text {SUB}^{1,0}\) equal \(\text {RE}\), this would provide an interesting new normal form. A minor open question is the strictness of the inclusion \(\text {INS}^{0,0}_2 \text {DEL}^{0,0}_0 \text {SUB}^{0,1}\subseteq \text {CS}\).

## References

- 1.Alhazov, A., Krassovitskiy, A., Rogozhin, Y., Verlan, S.: Small size insertion and deletion systems. In: Martin-Vide, C. (ed.) Applications of Language Methods, pp. 459–515. Imperial College Press (2010)Google Scholar
- 2.Beaver, D.: Computing with DNA. J. Comput. Biol.
**2**(1), 1–7 (1995)CrossRefGoogle Scholar - 3.Kari, L.: On insertions and deletions in formal languages. Ph.D. thesis, University of Turku, Finland (1991)Google Scholar
- 4.Karl, L.: DNA computing: arrival of biological mathematics. Math. Intell.
**19**(2), 9–22 (1997). https://doi.org/10.1007/BF03024425MathSciNetCrossRefzbMATHGoogle Scholar - 5.Krassovitskiy, A., Rogozhin, Y., Verlan, S.: Further results on insertion-deletion systems with one-sided contexts. In: Martín-Vide, C., Otto, F., Fernau, H. (eds.) LATA 2008. LNCS, vol. 5196, pp. 333–344. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-88282-4_31CrossRefGoogle Scholar
- 6.Krassovitskiy, A., Rogozhin, Y., Verlan, S.: Computational power of insertion-deletion (P) systems with rules of size two. Nat. Comput.
**10**, 835–852 (2011). https://doi.org/10.1007/s11047-010-9208-yMathSciNetCrossRefzbMATHGoogle Scholar - 7.Margenstern, M., Păun, G., Rogozhin, Y., Verlan, S.: Context-free insertion-deletion systems. Theor. Comput. Sci.
**330**(2), 339–348 (2005)MathSciNetCrossRefGoogle Scholar - 8.Matveevici, A., Rogozhin, Y., Verlan, S.: Insertion-deletion systems with one-sided contexts. In: Durand-Lose, J., Margenstern, M. (eds.) MCU 2007. LNCS, vol. 4664, pp. 205–217. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-74593-8_18CrossRefGoogle Scholar
- 9.Păun, G., Rozenberg, G., Salomaa, A.: DNA Computing: New Computing Paradigms. Springer, Heidelberg (1998). https://doi.org/10.1007/978-3-662-03563-4CrossRefzbMATHGoogle Scholar
- 10.Takahara, A., Yokomori, T.: On the computational power of insertion-deletion systems. Nat. Comput.
**2**(4), 321–336 (2003). https://doi.org/10.1023/B:NACO.0000006769.27984.23MathSciNetCrossRefzbMATHGoogle Scholar - 11.Verlan, S.: On minimal context-free insertion-deletion systems. J. Autom. Lang. Comb.
**12**(1–2), 317–328 (2007)MathSciNetzbMATHGoogle Scholar - 12.Verlan, S.: Recent developments on insertion-deletion systems. Comput. Sci. J. Moldova
**18**(2), 210–245 (2010)MathSciNetzbMATHGoogle Scholar - 13.Vu, M.: On insertion-deletion systems with substitution rules. Master’s thesis, Informatikwissenschaften, Universität Trier, Germany (2019)Google Scholar