Our previous computational completeness results either required two-sided contexts for insertion or two-sided contexts for deletions. As argued in the introduction, there are good motivations to try to reduce the context dependence. Hence, we are now looking at one-sided contexts for deletions and insertions. We are going to prove two main results in this subsection: first, we show that uni-directional (for instance, left) single-symbol context in insertions and deletions of single symbols suffice in achievinf computational completeness, which this is in contrast with the second result that tells that we cannot completely forego using context information: we do need one-sided context dependency for both deletions and for insertions.
3.2.2. Computational Incompleteness
Though ins-del systems with matrix control and substitution rules are powerful devices, they are not always sufficient for achieving computational completeness.
Lemma 3. Let be a a matrix ins-del-sub systems of size . Subsequently, .
Proof. Let be in normal form and constructed according to the construction in Theorem 2. Subsequently, we construct the following matrix grammar with . For every , we add a matrix to .
For every matrix of the form
X of
, we add a matrix of the form
Y to
.
form X | form Y |
| |
| |
| |
| |
| |
| |
For every matrix of the form
of
and every
, we add matrices of the form
to
.
form | form |
| , |
| , |
Furthermore, we add matrices of the form to if .
By induction, it can be shown that
if and only if
Whenever a matrix is applicable to , some matrix of the form is applicable to and vice versa.
We remark that, if a sentential form occurs during either a derivation of or G, the derivation cannot proceed, as no matrix is applicable any more. (see Theorem 2). Hence, the case that the axiom of a derivation of is is covered by an application of .
Therefore, it is easy to see that holds.
Moreover, . □
Although systems of size do not reach computational completeness, they do characterize matrix grammars.
Lemma 4. Let G be a matrix grammar, such that . Subsequently, there exists a matrix ins-del system with substitution rules of size , such that .
Proof. Let be a matrix grammar with context-free production rules. Afterwards, we construct as follows: We define and .
Consider a context-free production rule of the form . Clearly, this rule is equivalent to a deletion rule . Analogously, a production rule is essentially the same as a substitution rule .
Consider a production rule of the form
,
,
, and the following sequence of substitution and deletion rules
Clearly, applying this sequence to a word is the same as applying the production rule .
Hence, we add the matrices that were obtained by the Algorithm 1 to . □
Lemmas 3 and 4 yield the following result.
Algorithm 1 Generate(M) |
Require: set of matrices with context-free production rules |
for alldo |
1. replace every occurrence of a rule of the form in m with |
2. replace every occurrence of a rule of the form in m with |
3. replace every occurrence of a rule of the form in m with the sequence
|
4. add the resulting matrix to |
end for |
Theorem 4. if and only if there is a matrix ins-del-sub systems of size , such that .
Because matrix grammars with context-free production are not computationally complete [
20], matrix ins-del-sub systems of size
are not computationally complete either. It is known [
12] that
is closed under reversal. With Lemma 1, we can conclude:
Corollary 2. .
We will now show that is not computationally complete, either. Consequently, we arrive at the conclusion that is not computationally complete either.
Consider the following construction for the proof. For each derivation of a matrix ins-del-sub system of size , we construct a group of trees that represents the structure of the derivation.
Each tree node is labelled by a string over
V, such that reading the rightmost symbols of all root labels of the corresponding group of trees from left to right yields
w (we refer to
Figure 2).
If an insertion rule
adds the letter
a at some position of the sentential form, we add a new tree with a single node labelled
a at the corresponding position in the group of trees (see
Figure 3).
Applying a deletion rule
has the following effect on the group of trees: the node corresponding to
X becomes the rightmost child of the node corresponding to
a (see
Figure 4).
Let
be the string of the node corresponding to a letter
Y. If a substitution rule
is applied, then we concatenate
b right of
(see
Figure 5).
Let the axiom of the derivation be . Subsequently, the group of trees consists initially of n trees with single nodes, each being labelled by a symbol of the axiom, such that reading the labels of the respective roots from left to right yields . Each root node corresponds to a letter of the current sentential form.
By construction, it is clear that only (the rightmost letter of) root labels contribute letters to the final word, i.e., each tree contributes, at most, one letter to the final word. Furthermore, it is clear that there is no interaction between letters of two different trees, i.e., a letter belonging to certain tree is not a context for some operation on a letter of another tree.
Before explaining the weaknesses of matrix ins-del-sub systems with their size limited to , we illustrate their power by presenting a concrete example.
Example 3. Consider a matrix ins-del-sub system of size , which has the axiom . Letbe matrices of . Clearly holds and the corresponding group of trees is Note that all of the letters corresponding to the eventual a-tree originate from context-free insertions. Furthermore, because there is no interaction between letters of two different trees, inserting all letters of the eventual a-tree (in the order specified by the a-tree) left or right of all letters belonging to eventual b-trees does not affect the b-trees. Thus, and also hold.
Theorem 5.
Proof. We show that there is no matrix ins-del-sub system of size generating the regular language . Assume to the contrary that generates . Subsequently, generates the word , , as well, where is the length of the longest axiom of . Consider the group of trees corresponding to a derivation of starting from the axiom . Because , there exists a tree t with the following properties: (1) the tree contributes a letter a to and (2) all nodes of the tree originate from the application of some insertion rule. Consider the derivation from to . Subsequently, also generates . The string is generated by applying the same matrices used in the derivation from to in the same order. All of the insertion rules corresponding to nodes of the tree t that are specified above are applied right of all letters belonging to (eventual) b-trees. Because there is no interaction between letters of two different trees, none of the letters that correspond to nodes of t are used as context to delete symbols not affiliated with nodes of t. Thus, inserting these letters right of all letters belonging to (eventual) b-trees changes nothing for the other trees. Note that the tree t specifies the position of the inserted letters in relation to each other as well as how the rest of the rules concerning symbols of t are applied. □
Interestingly, while neither nor are computationally complete, by Theorem 4 at least the context-free languages are included in . does not even include all regular languages. Consequently, we can also state:
Corollary 3. We remark that Corollary 2 and Theorem 5 show that the result of Corollary 1 is optimal, i.e., the context dependency cannot be reduced any further without losing computational power.