On the Expressive Power of Stateless Ordered Restart-Delete Automata

Stateless ordered restart-delete automata (stl-ORD-automata) are studied. These are obtained from the stateless ordered restarting automata (stl-ORWW-automata) by introducing an additional restart-delete operation, which, based on the surrounding context, deletes a single letter. While the stl-ORWW-automata accept the regular languages, we show that the swift stl-ORD-automata yield a characterization for the class of context-free languages. Here a stl-ORD-automaton is called swift if it can move its window to any position after performing a restart. We also study the descriptional complexity of swift stl-ORD-automata and relate them to limited context restarting automata.


Introduction
The restarting automaton was introduced in [9] to model the linguistic technique of analysis by reduction (see, e.g., [12]). Despite its linguistic motivation, also many classical families of formal languages have been characterized by various types of restarting automata (for a survey see, e.g., [16]). A particularly simple type of restarting automaton is the ordered restarting automaton (ORWW-automaton, for short) that has been introduced in [15] in relation with the processing of languages of rectangular pictures.
An ORWW-automaton consists of a finite-state control, a tape with endmarkers, a read-write window of size three, and a (partial) ordering on its tape alphabet. Based on the actual state and window contents, the automaton can move its window one position to the right and change its state, or it can replace the letter in the middle of the window by a smaller letter and restart, or it can accept. During a restart, the window is moved back to the left end of the tape, and the finite-state control is reset to the initial state. In [17], it is shown that deterministic ORWW-automata (det-ORWWautomata) don't need states and that they characterize the class of regular languages. On the other hand, the nondeterministic ORWW-automata yield an abstract family of languages that is incomparable to the (deterministic) context-free languages, the Church-Rosser languages, and the growing context-sensitive languages with respect to inclusion [10,11]. However, stateless nondeterministic ORWW-automata (stl-ORWW-automata) are only as expressive as det-ORWW-automata, that is, they yield just another characterization for the regular languages.
In [18] (see, also [19]), the det-ORWW-automaton was extended to the deterministic ordered restart-delete automaton (or det-ORD-automaton, for short). This was achieved by introducing an additional restart-delete operation that allows to delete the symbol from the middle of the window and to restart. The det-ORD-automata do not need states, either, and the class of languages they accept properly includes the class of deterministic context-free languages, while it is contained in the intersection of the (unambiguous) context-free languages and the Church-Rosser languages.
Here we turn to the nondeterministic variant of the ordered restart-delete automaton. As this model extends both, the det-ORD-automaton as well as the ORWWautomaton, it is immediate that the resulting language class is quite large. In particular, this class contains languages that are not even growing context-sensitive [10,11]. Therefore, we restrict our attention to the stateless variant of these automata, the stateless ordered restart-delete automaton (or stl-ORD-automaton, for short). In fact, for technical reasons that will be discussed in Section 3, we concentrate on a restricted variant called swift stl-ORD-automaton. A swift stl-ORD-automaton can always perform move-right steps unless its window is already at the right end of the tape. While the stl-ORWW-automaton just accepts the regular languages, the swift stl-ORD-automaton yields a characterization for the context-free languages.
We also study the descriptional complexity of stl-ORD-automata, where we use the size of the underlying tape alphabet as a complexity measure for a stateless ORWW-or ORD-automaton. Based on our constructions we show that the increase in alphabet size that is required when turning a stl-ORD-automaton into a stl-ORWWautomaton for the same (regular) language cannot be bounded from above by any recursive function. That is, we obtain a non-recursive trade-off for this conversion.
Finally, we relate the swift stl-ORD-automata to a new class of limited context restarting automata. A limited context restarting automaton can be seen as a certain type of string rewriting system [2], where the accepted language is defined as the set of all input words that are reducible to the empty word (see, e.g., [1]). Various types of limited context restarting automata have been defined and used to characterize some of the classes of the Chomsky hierarchy [21]. Here we show that the new class of limited context restarting automata that is obtained from the swift stl-ORD-automata is a proper subclass of the limited context restarting automata of type R 1 . In addition, this new class is incomparable under inclusion to the limited context restarting automata of type R 2 , although it has exactly the same expressive capacity. This paper is structured as follows. In Section 2, we define the stl-ORDautomaton, we illustrate it by a detailed example, and we establish a kind of normal form result for stl-ORD-automata. In the next section, we prove that each swift stl-ORD-automaton can be simulated by a pushdown automaton (PDA), which implies that all languages accepted by swift stl-ORD-automata are necessarily context-free. Then, in Section 4, we show conversely that each context-free language is accepted by a swift stl-ORD-automaton. This is done by providing a simulation of a PDA by a swift stl-ORD-automaton. In Section 5, we present the aformentioned non-recursive trade-off and in Section 6, we relate the swift stl-ORD-automata to limited context restarting automata. In the concluding section, we summarize our results and describe the hierarchy of language classes obtained through a detailed diagram.

The Stateless Ordered Restart-Delete Automaton
An alphabet Σ is a finite set of letters. For all n ≥ 1, Σ n is the set of words over Σ of length n, Σ + is the set of non-empty words, and Σ * = Σ + ∪ {λ}, where λ denotes the empty word. For w ∈ Σ * , |w| denotes the length of w. A language over Σ is any subset of Σ * . Of particular interest are the classes REG, DCFL, CFL, CRL, and GCSL of regular, deterministic context-free, context-free, Church-Rosser [13], and growing context-sensitive languages [3,6]. Furthermore, for any type of automaton X, L(X) is used to denote the class of (input) languages that are accepted by automata of that type.

Definition 1
A stateless ordered restart-delete automaton (stl-ORD-automaton) has a flexible tape with endmarkers and a read/write window of size 3. It is defined by a 6-tuple M = (Σ, Γ, , , δ, >), where Σ is a finite input alphabet, Γ is a finite tape alphabet such that Σ ⊆ Γ , the symbols , Γ , called sentinels, serve as markers for the left and right border of the work space, respectively, > is a partial ordering on Γ , and is the transition relation that describes four types of transition steps: (1) A move-right step has the form MVR ∈ δ(a 1 a 2 a 3 ), where a 1 ∈ Γ ∪ { } and a 2 , a 3 ∈ Γ . It causes M to shift the window one position to the right. (2) A restart-rewrite step has the form b ∈ δ(a 1 a 2 a 3 ), where a 1 ∈ Γ ∪ { }, a 2 , b ∈ Γ , and a 3 ∈ Γ ∪ { } such that a 2 > b holds. It causes M to replace the symbol a 2 in the middle of its window by b and to restart, which means that the window is shifted to the left end of the tape so that the first symbol it contains is the left sentinel . Observe that this operation requires that the newly written letter b is smaller than the letter a 2 being replaced with respect to the partial ordering >.
and a 3 ∈ Γ ∪ { }. It causes M to delete the symbol a 2 in the middle of its window and to restart. Through this step, the tape field that contains a 2 is also removed, that is, the length of the tape is reduced. (4) An accept step has the form δ(a 1 a 2 a 3 ) = Accept, where a 1 ∈ Γ ∪ { }, a 2 ∈ Γ , and a 3 ∈ Γ ∪ { }. It causes M to halt and accept. In addition, we allow an accept step of the form δ( ) = Accept.
Observe that, for each word u ∈ (Γ ∪{ }) · Γ · (Γ ∪{ }), either δ(u) = Accept or δ(u) does not contain an accept step. The motivation for this restriction is the observation that the aim of a computation consists in accepting an input word, and hence, once an accept step becomes applicable, it makes no sense to choose a different transition step.
If δ(u) is undefined for some word u, then M necessarily halts, when its window contains the word u, and we say that M rejects in this situation. Furthermore, the letters in Γ Σ are called auxiliary symbols.
A configuration of a stl-ORD-automaton M is a word α ∈ { } · Γ * · { } in which a factor of length three (or all of α if |α| ≤ 3) is underlined. Here it is understood that α is the current contents of the tape and that the window contains the underlined factor. A restarting configuration has the form w , where the prefix of length three is underlined; if w ∈ Σ * , then this restarting configuration is also called an initial configuration. A configuration that is reached by an accept step is an accepting configuration, denoted by Accept, and a configuration of the form α 1 a 1 a 2 a 3 α 2 such that δ(a 1 a 2 a 3 ) is undefined is a rejecting configuration. A halting configuration is either an accepting or a rejecting configuration. By M we denote the single-step computation relation that M induces on its set of configurations. Then * M , the reflexive and transitive closure of M , is the computation relation of M.
Any computation of a stl-ORD-automaton M consists of certain phases. A phase, called a cycle, starts in a restarting configuration, the window is moved along the tape by MVR steps until a restart-rewrite or a restart-delete step is performed and thus, a new restarting configuration is reached. By c M we denote the execution of a cycle, and c * M is the reflexive transitive closure of c M . It is the reduction relation that M induces on its set of restarting configurations.
The part of a computation that follows after the last execution of a restart-rewrite or restart-delete operation is called a tail. Hence, a tail starts in a restarting configuration, the window is moved along the tape by MVR steps until either an accept step is performed or the automaton gets stuck in a rejecting configuration. Accordingly, we speak of an accepting tail or a rejecting tail.
A word w ∈ Γ * is accepted by M, if there exists a computation of M which starts with the restarting configuration w and ends with an accept step. The language consisting of all words that are accepted by M is denoted by L C (M). It is called the characteristic language of M. The (input) language L(M) of M is the set of all words w ∈ Σ * that are accepted by M. Obviously, L(M) = L C (M) ∩ Σ * .
As each cycle ends with a rewrite operation, which replaces a symbol a by a symbol b that is strictly smaller than a with respect to the given ordering >, or with a delete operation, we see that each computation of M on an input of length n consists of at most |Γ | · n many cycles. Each cycle (and each tail) of M can be simulated in linear time by a nondeterministic two-tape Turing machine that stores the prefix α 1 of a configuration α 1 a 1 a 2 a 3 α 2 of M on one of the tapes and the suffix a 1 a 2 a 3 α 2 on the other tape. Hence, M can be simulated by a nondeterministic two-tape Turing machine in time O(n 2 ).
As each det-ORD-automaton can be simulated by a stateless det-ORDautomaton [18], we obtain the following inclusion.
The following example illustrates how stl-ORD-automata work.
Example 1 Let L = { a n b n | n ≥ 0 } ∪ { a n b 2n | n ≥ 0 }. It is well-known that L is a context-free language that is not deterministic context-free. Furthermore, this language is not accepted by any ORWW-automaton [10,11]. However, L is accepted by the stl-ORD-automaton M = (Σ, Γ, , , δ, >) that is defined by taking Σ = {a, b} and Γ = Σ ∪ { a 1 , e, e 1 , f, f 1 , f 2 }, by choosing the partial ordering > such that a > a 1 , b > e > e 1 , and b > f > f 1 > f 2 , and by defining the transition relation δ as follows: δ(aa 1 e 1 ) λ, (20) δ( a 1 e 1 ) λ, (21) δ(a 1 f 1 f 2 ) λ, (6) For an input of the form a m b n , first the factor b n is rewritten, from right to left, into e n or into f n using lines (2) to (7). In the former case, it is then checked whether m = n by alternatingly rewriting the last letter a into a 1 , the first letter e into e 1 and then deleting a 1 and e 1 using lines (8) to (15). In the latter case, it is checked whether n = 2m by alternatingly rewriting the last letter a into a 1 and the first factor ff into f 1 f 2 and then deleting f 1 , a 1 , and f 2 using lines (16) to (25). For example, given w = aabbbb as input, M can execute the following computation, where we attach the number of the line used as an index to the computation relation : (3) aabbbf 4 (0) aabbbf (6) aabbff * aaffff (0) aaf fff (16) aa 1 ffff 2 (0) aa 1 ff ff (18) (19) (21) (22) It follows that L(M) = L.
Let M = (Σ, Γ, , , δ, >) be a stl-ORD-automaton. A word w ∈ L(M) is first rewritten into a word z ∈ Γ * through a sequence of cycles, and then M executes an accepting tail computation on the tape contents z . Actually, we can require that all accepting configurations of a stl-ORD-automaton are of a very restricted form.
δ ( # ) = Accept. From the definition of δ , we see immediately that λ L(M ). Let w = a 1 a 2 · · · a n ∈ L(M), where a 1 , a 2 , . . . , a n ∈ Σ and n ≥ 1. Then M has an accepting computation on input w, that is, w is rewritten into a word z ∈ Γ * , which is then accepted in a tail computation. If z λ, then by using lines (1), (3), (5), (7) and (9), M can execute the same cycles as M, in this way rewriting w into z. The accept step of M yields a rewrite step of M that produces an occurrence of the new auxiliary symbol # (by (2), (4), (6), or (8)), and then M can rewrite its complete tape contents into the configuration # by lines (10) to (14). If z = λ, then M produces the tape contents b , from which z = is obtained through a delete step of M. In this situation M accepts by lines (9) and (15). Thus, we see that L(M) {λ} ⊆ L(M ) holds.
On the other hand, let w ∈ L(M ). Then w is non-empty, and we see from the definition of M that w We would like to show that each language accepted by a stl-ORD-automaton is necessarily context-free. To prove this result, we would simulate the accepting computations of a stl-ORD-automaton by a (nondeterministic) PDA. For this simulation, we would use an extension of the simulation that is given in [18] (see also [19]) for simulating a stl-det-ORD-automaton by a PDA. Unfortunately, that approach leads to a serious technical problem (see the paragraph following Example 2 below). As currently we do not see a way to overcome this problem, we restrict our attention to just a subclass of stl-ORD-automata, the swift-ORD-automata.
We first describe the data structure that will be used for the simulation.
The idea is that W i encodes the sequence of letters that are produced by M in an accepting computation for a particular field, and L i and R i encode the information on the neighboring letters to the left and to the right that are used to perform the corresponding rewrite steps. For example, the triple (y i,1 , The restrictions on the elements of L 1 and R n just express the fact that w 1 is the first letter, and so its left neighboring field contains the left sentinel , while w n is the last letter, and so its right neigboring field contains the right sentinel .
We illustrate this definition by a simple example. As the purpose of this example is simply to explain the dynamics of the simulation, the language accepted by the given automaton is not of importance.
where the transition relation is given by the following table: Given the word w = a 1 a 2 a 3 a 4 a 5 as input, M can execute the following accepting computation: For this computation, we obtain the following sequence of triples: These triples do not only record the history of rewrite and delete steps that have been applied to the various input letters, but the sequence of these triples also provides information on the ordering in which these rewrite and delete steps have been executed at neighboring positions. In fact, if [L i , W i , R i ] i=1,2,...,n is a sequence of triples that describe an accepting computation of M on input w = w 1 w 2 · · · w n , then we can extract the complete sequence of rewrite and delete operations of M from this sequence. To see this, we inspect the above sequence.
First, we see that w = a 1 a 2 a 3 a 4 a 5 . Furthermore, from the first triple and the delete step λ ∈ δ( b 1 #) at position 1. As this is the first position, we know that the left neighboring field contains the left sentinel , that is, the left contexts of these steps coincide with (the contents of) the left neighboring field. We express this fact by saying that these steps match left.
Next, we consider the second triple Thus, at position 2, M executes the sequence of rewrite and delete steps b 2 ∈ δ(a 1 a 2 b 3 ) and λ ∈ δ(a 1 b 2 b 3 ). As initially field 1 contains the letter a 1 , we see that the left contexts of these steps coincide with their left neigboring field, that is, they match left. At position 3, M executes the sequence of rewrite steps b 3 ∈ δ(a 2 a 3 a 4 ) and # ∈ δ(b 1 b 3 ). As the initial letter at position 2 is a 2 , we see that the first of these rewrite steps matches left. After a 3 has been rewritten into b 3 , the right contexts of the rewrite and delete steps at position 2 coincide with (the contents) of their right neighboring field, that is, they match right. Thus, all rewrite and delete steps at position 2 match left and right, which means that all their left and right contexts have been verified. In particular, this implies that these steps can be executed after a 3 has been rewritten into b 3 . As W 2 ends with λ, we can now remove the triple [L 2 , W 2 , R 2 ] from the sequence. But then the triple [L 3 , W 3 , R 3 ] becomes the right neighbor of [L 1 , W 1 , R 1 ], which shows that now the first rewrite at position 1 also matches right. Hence, a 1 can now be rewritten into b 1 , and after that, the second rewrite step at position 3 matches left, too. So the second rewrite step at position 3 is executed after the first rewrite step at position 1. After b 3 has been rewritten into #, also the final delete step at position 1 matches right, that is, all rewrite and delete steps at position 1 match left and right. As W 1 ends with λ, we can now remove the triple [L 1 , W 1 , R 1 ] from the sequence.
At position 4, M executes the rewrite step b 4 ∈ δ(b 3 a 4 ) and the delete step λ ∈ δ(b 3 b 4 ). As this position initially contains the letter a 4 , we conclude that the first rewrite step at position 3 matches right. Hence, this rewrite step is executed before the rewrite step at position 4. After a 3 has been rewritten into b 3 , the steps at position 4 match left.
Finally, at position 5, M only executes the delete step λ ∈ δ(a 4 a 5 ), which matches left and right. In particular, we see that this step is executed before the first rewrite step at position 4. As W 5 ends with λ, the triple [L 5 , W 5 , R 5 ] can be removed, which means that the right sentinel is now the new right neighbor of position 4. This in turn implies that the rewrite and delete steps at position 4 match right. Thus, these steps can now be executed and the triple [L 4 , W 4 , R 4 ] can be removed as well. But then is the new right neighbor of position 3, and hence, the second rewrite step at position 3 matches right.
Thus, only the triple [L 3 , W 3 , R 3 ] remains, and all its rewrite steps have been matched left and right. In fact, from the above considerations we can conclude that the rewrite and delete transitions encoded in the given sequence of triples are executed in the following order: This is actually the same order as the one in the above computation of M. Finally, as Accept ∈ δ( # ), we see that the above sequence of triples does indeed describe the accepting computation of M on input a 1 a 2 a 3 a 4 a 5 under the assumption that M can always move to the required position by a sequence of move-right steps.
In the case of stl-ORWW-automata, that is, when no letter can be deleted, the required MVR-steps can easily be inferred from the corresponding sequence of triples considered, and so, by checking the transition relation of M, it can be verified whether they are actually possible. However, for stl-ORD-automata, that is, when delete operations can be used, this is not at all clear, as particular move-right steps may or may not use letters at positions that are at some point deleted. Therefore, in order to turn our idea into a correct simulation of a stl-ORD-automaton by a PDA, we only consider a restricted class of stl-ORD-automata.
for all a 1 ∈ Γ ∪ { } and all a 2 , a 3 ∈ Γ . By swift-ORD we denote the class of all swift-ORD-automata.
From a restarting configuration w , a swift-ORD-automaton M can move its window to any position on the tape. Thus, a computation of M cannot be blocked by a factor across which M cannot move its window. The stl-ORD-automaton M of Example 1 is actually a swift-ORD-automaton. Furthermore, Proposition 2 carries over to swift-ORD-automata. The aim of this section is the following result.
For establishing this result, we proceed as follows. First, motivated by the discussion in Example 2, we define the notion of compatibility for sequences of triples [L, W, R]. After illustrating this definition by an example, we prove that, for a given input w = w 1 w 2 · · · w n , there exists a compatible sequence of triples if and only if w is accepted by the swift-ORD-automaton M considered. Then we describe a PDA P that, on input w = w 1 w 2 · · · w n , guesses a corresponding sequence of triples, checks whether this sequence is compatible, and accepts in the affirmative. Together these results imply that L(M) is accepted by the PDA P , which completes the proof of Theorem 1.
, and, for all i = 1, 2, . . . , n, (a) A pair (Π i , Π i+1 ) of neighboring triples from the sequence Π is said to be compatible if one of the following five conditions is satisfied: We illustrate this definition by taking another look at our example.
Example 2 (cont.) For the automaton M considered above, we have the following The pairs (Π 0 , Π 1 ) and (Π 5 , Π 6 ) are obviously compatible by (i) and (ii). Accordingly, the left contexts in Π 1 and the right contexts in Π 5 are marked.
Here the rewrite and the delete steps at position 2 have left context a 1 , which is the current letter at position 1.
Here the first rewrite transition at position 3 comes before the rewrite and delete transitions at position 2.
The pair (Π 3 , Here the first rewrite transition at position 3 comes before the rewrite and delete transitions at position 4.
Finally, the pair (Π 4 , Here only the delete transition at position 5 is possible. By marking all the left and right contexts that correspond to the enabled rewrite and delete transitions, we obtain the following variant of the original sequence, where the marked letters are written in boldface: From this sequence we obtain the sequence of remainder triples Continuing recursively, we see that the pairs (Π 0 , Π 1 ) and (Π 3 , Π 4 ) are compatible.
Furthermore, the pair (Π 1 , Here the first rewrite step of Π 1 comes first, the rewrite step of Π 2 comes second, and then comes the delete step of Π 1 .
Finally, the pair (Π 2 , with r = 0. By marking the left and right contexts of the corresponding rewrite and delete transitions, we obtain the following sequence: From this sequence we finally get the remainder sequence In this sequence the right context of Π 1 is marked and the first line of Π 1 is deleted. This yields the final sequence ∅ ( ) ∅ ∅ (#) ∅ ∅ ( ) ∅ , which shows that the original sequence is indeed compatible.
On the other hand, the following sequence is not compatible: In fact, the pair (Π 1 , Π 2 ) is not compatible. Indeed, Π 1 tells us that the first rewrite transition at position 1 is b 1 ∈ δ( a 1 a 2 ), which requires the right context a 2 , while Π 2 tells us that the first rewrite transition at position 2 is b 2 ∈ δ(a 1 a 2 b 3 ), which requires the left context a 1 . No matter which of these rewrite transitions is applied first, it destroys the required context for the other rewrite transition.  By Definition 2, we can associate a triple Π i = [L i , W i , R i ] to each letter w i , i = 1, 2, . . . , n, such that Π i describes the rewrite and delete steps that are executed at position i during the above computation. For i = 1, 2, . . . , n, let Here we extend the partial ordering > by taking b > λ for all letters b ∈ Γ . Furthermore, as δ( # ) = Accept is the only accept step of M, there is a unique index s ∈ {1, 2, . . . , n} such that x s = # and x i = λ for all i ∈ {1, 2, . . . , n} {s}.
We consider the sequence of triples Π = (Π 0 , Π 1 , Π 2 , . . . , Π n , Π n+1 ). It remains to prove that this sequence is compatible. From the definition of Π , we see immediately that conditions (i) and (ii) of part (a) and condition (1) of part (b) of Definition 4 are satisfied.
For proving compatibility of Π, we proceed by induction on m, the number of cycles in the above computation. For m = 1, there are three cases: (1) n = 1, w = w 1 , and # ∈ δ( w 1 ) is the rewrite transition that is used in this cycle. Then Π 1 = w 1 # .
In each of these cases it is easily seen that the corresponding sequence Π is compatible.
For the inductive step we scrutinize the first cycle w = w 1 w 2 w 3 · · · w n c M z 1 of the above computation. In this cycle a rewrite or delete transition b ∈ δ(w i−1 w i w i+1 ) is executed, where b ∈ Γ ∪ {#, λ} and i ∈ {1, 2, . . . , n}. Thus, the triples Π i−1 , Π i , and Π i+1 look as follows, where w 0 = and w n+1 = : Here  Proof Let Π = (Π 0 , Π 1 , Π 2 , . . . , Π n , Π n+1 ) be a sequence of triples that satisfies all the properties in (b). We proceed by induction on the overall number R = n i=1 j i of rewrite and delete steps encoded in this sequence of triples. If R = 1, then either a single rewrite step or a single delete step is described by the given sequence. In the former case, we have n = 1 and compatibility of Π implies that Π 1 = w 1 # .
Hence Let us assume that R ≥ 2. We claim that there exists an index s ∈ {1, 2, . . . , n} such that a s,1 = w s−1 and c s,1 = w s+1 . This means that the transition b s,2 ∈ δ(a s,1 w s c s,1 ), which is the first rewrite (or delete) transition described by Π s , matches left and right. From the fact that Π is compatible, we see that a 1,1 = = w 0 . Thus, if c 1,1 = w 2 , we can take s = 1. If c 1,1 w 2 , then compatibility of the pair (Π 1 , Π 2 ) implies that a 2,1 = w 1 . Thus, if c 2,1 = w 3 , we can take s = 2; otherwise, we can repeat this argument for i = 3, 4, . . . , n. As by compatibility, the rewrite and delete transitions of Π n match right, we see that c n,1 = = w n+1 . Hence, there exists an index s ∈ {1, 2, . . . , n} that meets the stated properties. Now we consider the initial configuration w 1 w 2 w 3 · · · w s−2 w s−1 w s w s+1 w s+2 · · · w n = w 1 w 2 w 3 · · · w s−2 a s,1 w s c s,1 w s+2 · · · w n of the swift-ORD-automaton M. As M is swift, it can make MVR-steps until its window contains the factor a s,1 w s c s,1 , and it can then execute the rewrite (or delete) step b s,2 ∈ δ(a s,1 w s c s,1 ). Thus, M can execute the cycle w 1 w 2 w 3 · · · w s−2 a s,1 w s c s,1 w s+2 · · · w n c M w 1 w 2 w 3 · · · w s−2 a s,1 b s,2 c s,1 w s+2 · · · w n = w 1 w 2 w 3 · · · w s−2 w s−1 b s,2 w s+1 w s+2 · · · w n .
As this sequence only contains R − 1 rewrite and delete steps, we can conclude by induction that M has an accepting computation that begins with the restarting configuration w 1 w 2 w 3 · · · w s−1 b s,2 w s+1 · · · w n , that is, Thus, by combining the above cycle with this accepting computation, we obtain an accepting computation of M that begins with the restarting configuration w 1 w 2 w 3 · · · w s−1 w s w s+1 · · · w n . Hence, w ∈ L C (M).
This completes the proof of Lemma 1.
Let M = (Σ, Γ ∪ {#}, , , δ, >) be a swift-ORD-automaton as constructed in Proposition 2. To prove that the language L(M) is context-free, we now describe a PDA P that, given a word w = w 1 w 2 · · · w n ∈ Γ n (n ≥ 1) as input, guesses a corresponding sequence of triples (Π 0 , Π 1 , Π 2 , . . . , Π n , Π n+1 ), checks whether this sequence is compatible, and accepts in the affirmative. Actually, the language L(P ) accepted by P will be L(P ) = L C (M)·{ }, but as the class of context-free languages is closed under right quotients by a single letter, this suffices to prove that L C (M) is a context-free language. Since L(M) = L C (M) ∩ Σ * , it then follows that L(M) is context-free, too.
Accordingly, the input alphabet of P will be Σ 1 = Σ ∪ { }. The pushdown alphabet Δ will contain the bottom marker and all triples [L, W, R] describing sequences of rewrite and delete steps of M. In addition, Δ will contain variants of [L, W, R] in which some of the symbols in L and R have been marked to indicate that the corresponding rewrite and delete steps have already been verified to match left, respectively, to match right. The behavior of P is described by the following algorithm, in which the left sentinel will be represented by the triple [∅ ( ) ∅], and the right sentinel will be represented by the triple [∅ ( ) ∅].
To illustrate the way in which the PDA in Algorithm 1 works, we return to Example 2.
Example 2 (cont.) The computation of the PDA P for simulating the swift-ORDautomaton M is described in the table in Fig. 1. Here the input processed is w =  a 1 a 2 a 3 a 4 a 5 , and the table contains the various steps of the computation of the PDA Fig. 1 Simulating the stl-ORD-automaton of Example 2 by a PDA simulating M for this input. In the table those tape symbols in the left or right column of a triple that have been marked are written in boldface. Each time an input symbol is read, a corresponding triple Π = [L, W, R] is guessed, the rewrite steps of which are neither left nor right marked. Then the triple Π = [L , W , R ] on the top of the pushdown is compared to Π, some entries in R and in L are marked, and depending on the situation (see (14) to (22)), Π is possibly popped from the pushdown, some more triples may be popped, and then Π is pushed onto the pushdown. As the simulation ends with the pushdown containing the sequence the PDA accepts in line (24).
It remains to prove that L(P ) = L(M) · { }. For doing so, we establish the following technical lemma.

Lemma 2
The PDA P of Algorithm 1 accepts on input w = w 1 w 2 · · · w n (n ≥ 1, w 1 , w 2 , . . . , w n ∈ Γ ) if and only if there exists a sequence of triples for w 1 w 2 · · · w n that satisfies all the properties of Lemma 1 (b).
Finally, the recursion in the definition of compatibility (see condition (b) (3)) is resolved inductively by the PDA P . In fact, for each triple Π i , all rewrite (and delete) steps are verified to match left before this triple is pushed onto the pushdown (see lines (15), (17), and (22)), and all rewrite and delete steps are verified to match right before this triple is popped from the pushdown (see lines (19) and (21)). It follows that the PDA P accepts on input w = w 1 w 2 · · · w n if and only if the sequence of triples guessed for w 1 w 2 · · · w n satisfies all the properties of Lemma 1 (b). This completes the proof of Lemma 2.
Let P be the PDA that is defined by Algorithm 1 for the swift stl-ORDautomaton M . Then by Lemma 2, P accepts on input w = w 1 w 2 · · · w n if and only if there exists a sequence of triples for w 1 w 2 · · · w n that satisfies all the properties above. It follows that L(P

All Context-Free Languages are Accepted by Swift Stl-ORD-Automata
Here we establish the converse of Theorem 1, showing that each context-free language is accepted by a swift stl-ORD-automaton.

Theorem 2 CFL ⊆ L(swift-ORD).
Let L ⊆ Σ * be a context-free language. Then there exists a context-free grammar G = (V , Σ, S, P ) in quadratic Greibach normal form for the language L {λ} [23], that is, each production (B → r) ∈ P satisfies the restriction that B ∈ V and r ∈ Σ · (V 2 ∪ V ∪ {λ}). From this grammar, a PDA A = (Q, Σ, Δ A , q, S, δ A ) can be obtained such that L is the language N(A) that is accepted by A with empty pushdown. The PDA A is defined by taking Q = {q}, Δ A = V , and (q, α R ) ∈ δ A (q, a, B) iff (B → aα) ∈ P , where a ∈ Σ, B ∈ V , and α ∈ (V 2 ∪ V ∪ {λ}) (see, e.g., [8]). Here α R denotes the reversal (or mirror image) of the word α. Thus, A has a single state only, it does not execute any λ-transitions, and in each step, it replaces the topmost symbol on its pushdown by a word of length at most two. In our encoding below, the bottom (top) of the pushdown will always be on the left (right).
For proving that the language L is accepted by a swift stl-ORD-automaton we now proceed as follows. First, we present a construction of a swift stl-ORD-automaton M that simulates the PDA A. Essentially, M works as the automaton in Example 1, that is, it chooses the transition of A that is to be applied next, it marks the letters that are to be rewritten, and then it replaces (or deletes) the corresponding letters.
Here the simulation of A is performed in a non-length-increasing fashion using an appropriate encoding of the pushdown. After giving the construction we illustrate it through a simple example, and then we prove that L(M) = L through a sequence of four lemmas. (q, x, α) be a configuration of the PDA A, where x ∈ Σ * is the still unread suffix of the given input and α ∈ V + is the contents of the pushdown. This configuration will be encoded as

Definition 5 Let
-The partial ordering > on Γ is defined through for all a, b, c ∈ Σ and x, y ∈ V .

Example 3 Let
We must prove that L(M) = N(A). Let be a configuration of the PDA A, where w ∈ Σ + and x 1 , x 2 , . . . , x m ∈ V for some m ≥ 2. Then the restarting configurations is a restarting configuration of M for some x 1 , x 2 , . . . , x m ∈ V , α ∈ V ∪ V 2 , and w ∈ Σ + , then C = (q, w, x 1 x 2 · · · x m α) is the corresponding configuration of A. Thus, for each configuration of the PDA A, in which the height of the pushdown is at least two, we have two restarting configurations of M that represent it.
Together Lemmas 4 and 6 show that L(M) = N(A) = L, which proves Theorem 2. From Theorems 1 and 2 we obtain the following characterization.

Descriptional Complexity
Here we take a look at the descriptional complexity of stl-ORD-automata, relating it to the descriptional complexity of stl-ORWW-automata. As both these types of automata are stateless, we cannot possibly take the number of states as a measure for their descriptional complexity, as is done for finite-state acceptors (see, e.g., [7]). Instead, for both these types of automata, we take the size of the tape alphabet as complexity measure. This is reasonable, as the number of transitions and the size of the description of an automaton of one of these types are polynomially related to this measure. Here we have the following result, showing that for some regular languages, swift-ORD-automata yield a much more concise description than corresponding stl-ORWW-automata.

Theorem 3 The trade-off between swift-ORD-automata and stl-ORWW-automata is non-recursive.
Thus, the size increase that occurs when turning a swift-ORD-automaton that accepts a regular language into a stl-ORWW-automaton for the same language cannot be bounded from above by any recursive function.
Proof According to an old result by Meyer and Fischer [14], the trade-off for turning a context-free grammar into an equivalent NFA is non-recursive. Now let G be a given context-free grammar that generates a regular language. From G we can construct an equivalent grammar G 1 that is in quadratic Greibach normal form. The grammar G 1 is in general much larger than the grammar G, but the size increase is bounded from above by an exponential function (see [23]). Thus, size(G 1 ) ≤ c size(G) , where we use size(G) (or size(A)) to denote the size of a grammar G or an automaton A. From the latter grammar, we immediately obtain a PDA A that accepts the language L(G) = L(G 1 ) by empty pushdown. Then size(A) = size(G 1 ) ≤ c size(G) . Following the construction given in the proof of Theorem 2, we obtain a swift-ORDautomaton M for the language L(G). As is easily seen from this construction, the number of letters n in the tape alphabet of M is bounded from above by an exponential function in the size of the PDA A. Thus, size(M) ≤ c size(A) ≤ c c size(G) . Now assume that f is a recursive function such that, for each swift-ORD-automaton P , there exists an equivalent stl-ORWW-automaton P such that the number of letters in the tape alphabet of P is bounded from above by the value f (size(P )). Then there exists a stl-ORWW-automaton M for the language L(M) = L(G) such that size(M ) ≤ f (size(M)) ≤ f (c c size(G) ). Finally, it is known from [10] that from M we can construct an NFA B for the language L(G) that is of size 2 O(size(M )) . Thus, we see that size(B) ≤ 2 O(f (c c size(G) )) , which is a recursive bound for the conversion of the context-free grammar G into the equivalent NFA B. As this contradicts the aforementioned result of Meyer and Fischer, there is no recursive bound for the conversion of a swift-ORD-automaton into an equivalent stl-ORWW-automaton, which completes the proof.
As the swift-ORD-automaton is just a restricted variant of the stl-ORD-automaton, Theorem 3 also holds for stl-ORD-automata in general.

Limited Context Restarting Automata
After a restart a swift-ORD-automaton can move its window to any position before executing a restart-rewrite, a restart-delete, or an accept step. Accordingly, this automaton can be seen as a type of rewriting system on its tape alphabet. And indeed, restarting automata of this form have been studied before.
In [4], the so-called clearing restarting automaton was introduced, which deletes symbols depending only on the context of a fixed size around the factor to be deleted. Not surprisingly, clearing restarting automata are quite limited in their expressive power. They accept all regular languages and some languages that are not contextfree, but they do not even accept all context-free languages. Accordingly, they were extended to the so-called Δ-clearing restarting automata that can use a marker symbol Δ in their rewrite transitions. These automata only accept languages that are growing context-sensitive [21], but they accept all context-free languages [5]. However, it is still open whether or not there is a growing context-sensitive language that is not accepted by any Δ-clearing restarting automaton.
In [1], limited context restarting automata were defined as an extension of the clearing restarting automaton. Also these automata apply rewrite steps only based on context information, but their rewrite instructions are more general. Following [21], these automata can be defined as follows.

Definition 6
A limited context restarting automaton (an lc-R-automaton, for short) M is defined through a triple M = (Σ, Γ, I ), where Σ is an input alphabet, Γ is a working alphabet containing Σ, and I is a finite set of instructions of the form (u | x → y | v). Here x, y ∈ Γ * such that g(x) > g(y) for some weight function g : Γ * → N, u ∈ {λ, } · Γ * , and v ∈ Γ * · {λ, }. Again the symbols and are used as left and right sentinels, which are not elements of Γ .
The lc-R-automaton M = (Σ, Γ, I ) induces a reduction relation c M on Γ * as follows: for each w, z ∈ Γ * , w c M z, if there exist words w 1 , w 2 ∈ Γ * and an instruction (u | x → y | v) ∈ I such that w = w 1 xw 2 , z = w 1 yw 2 , u is a suffix of w 1 , and v is a prefix of w 2 . Thus, the factor x is rewritten into y, if it appears within the context uxv. By c * M we denote the reflexive and transitive closure of c M . The language accepted by the lc-R-automaton M is An lc-R-automaton M accepts exactly the set of input words which can be reduced to λ. Thus, λ is in L(M) for each lc-R-automaton M. Accordingly, if L is a language that does not contain λ as an element, then L is not accepted by any lc-R-automaton.
In order to overcome this problem, we consider equality of languages only up to the empty word, that is, we say that two languages L and L on Σ are equal, denoted as L= L , if L ∩ Σ + = L ∩ Σ + .
In [21], many different types of limited context restarting automata have been introduced and their expressive power has been studied. Here we are only interested in the following two types. We say that an lc-R-automaton M = (Σ, Γ, I ) is of type For any R ∈ {R 1 , R 2 }, we will refer to lc-R-automata of type R as lc-R[R]automata. In [21], the following characterizations were obtained.
Here we introduce still another type of limited context restarting automata in order to describe swift-ORD-automata. A limited context restarting automaton M = (Σ, Γ, I ) is of type R ORD if each instruction (u | x → y | v) ∈ I satisfies the restrictions |u| = |x| = |v| = 1 and |y| ≤ 1. Observe that the weight function associated with M induces a partial ordering > on Γ such that x > y holds for each instruction (u | x → y | v) ∈ I for which |y| = 1. Thus, R ORD is obtained from the type R 1 by restricting the left context, the right context, and the lefthand side of the rewrite instruction to be of length one. Limited context restarting automata of type R ORD will be denoted as lc-R[R ORD ]-automata. Then L(M ) = { w ∈ Σ * | w c * M λ } = L(M), which proves the above inclusion.
Actually, we even have the following result.
Hence, we conclude the following from Corollary 1. Thus, the limited context restarting automata of type R ORD are just as expressive as those of type R 2 . However, type R ORD is a restricted variant of type R 1 that is incomparable to type R 2 . Indeed, an automaton of type R ORD admits arbitrary left and right contexts of length one, while the only non-empty contexts that an automaton of type R 2 admits are the sentinels and . On the other hand, an automaton of type R 2 may rewrite factors of arbitrary positive length, while an automaton of type R ORD can rewrite factors of length one only. Hence, Corollary 2 nicely complements the known results on limited context restarting automata presented in [21].

Conclusion
By introducing an additional restart-delete operation, which can just delete a single letter at a time, we have extended the stl-ORWW-automaton to the stl-ORDautomaton. As we have shown, this extension has surprizingly strong consequences. While the stl-ORWW-automaton just accepts the regular languages, we have seen that the stl-ORD-automaton accepts all context-free languages. In fact, by restricting the stl-ORD-automaton to its swift variant, we obtained a new characterization for the class of context-free languages. From the given constructions, we additionally derived the fact that stl-ORD-automata describe some regular languages in a much more succinct way than even stl-ORWW-automata. In fact, the size increase (measured in the cardinality of the underlying tape alphabets) that is required for turning a stl-ORD-automaton into an equivalent stl-ORWW-automaton can in general not be bounded from above by any recursive function.
Furthermore, we noticed that swift-ORD-automata can be interpreted as a new class of limited context restarting automata that is a proper subclass of the limited context restarting automata of type R 1 . This new class is incomparable under inclusion to the limited context restarting automata of type R 2 , although it has exactly the same expressive capacity.
Unfortunately, it still remains open whether stl-ORD-automata that are not swift can accept any languages that are not context-free. The diagram in Fig. 2 presents the inclusion and non-inclusion results between the classes of languages that are Fig. 2 Hierarchy of language classes that are accepted by the various types of ordered restarting automata. An arrow indicates a proper inclusion, while an arrow with a question mark indicates an inclusion that is not known to be proper. If two classes that are not connected by a sequence of arrows, then they are incomparable under inclusion accepted by the various types of ordered restarting automata, the classes of the Chomsky hierarchy, and some related classes of limited context restarting automata. Here DCFL R = { L R | L ∈ DCFL } is the class of languages that are reversals of deterministic context-free languages, UCFL is the class of unambiguous context-free languages, and Co-UCFL is the class of languages the complements of which are unambiguous context-free. Finally, L(con-lc-R[R 1 ]) is the class of languages which are accepted by limited context restarting automata that are of the confluent version of type R 1 (see [21]). The results on det-ORWW-automata can be found in [22], those on stl-ORWW-and ORWW-automata are taken from [10,11], the results on det-ORD-automata are from [18,19], and those on limited context-restarting automata are from [21].