Manuscript Offprint
arXiv:2610.11958From k+1 to k heads the descriptive trade-off is non-recursive
Abstract
We prove that no recursive function can upper bound the increase in the size of description when a two-way deterministic finite automaton with heads is replaced by an equivalent two-way deterministic finite automaton with k heads. This is true for all k, and remains true if the automata are unary and/or nondeterministic.
1 Introduction
Let stand for ‘two-way deterministic finite automaton with heads’ and for the set of languages recognizable by such automata. It is well known that the sequence
starts with the regular languages [13, 16], is strictly increasing [10, 11], and eventually covers the entire class of languages decidable by Turing machines (TMs) in logarithmic space [2]. Hence, for any and for the smallest for which , each one of the following types of machines
suggests a different string to ‘describe’ L: a smallest (description of a) machine of this type that recognizes L. It is then conceivable that stronger types of machines may provide more succinct descriptions than weaker types, making it natural to ask how much more verbose the weaker types can be, in general.
Recently, Kutrib [5] proved that, s can be both non-recursively more verbose than logarithmic-space TMs and non-recursively more succinct than s. That is, he showed that no recursive function can upper bound the increase in the size of description when we replace a minimal (description of a) logarithmic-space Turing machine with (a description of) an equivalent , for any . Similarly, on the other end of the hierarchy, the increase in the size of description when a minimal (description of a) is replaced by (a description of) an equivalent admits no recursive upper bound, either, for any .
Kutrib went on to conjecture that the trade-off is non-recursive even when we change from a minimal into an equivalent , for all . In addition, he posed the question whether the same is true when we restrict our attention to unary automata of this type —for this case he found huge recursive lower bounds but refrained from guessing that no recursive upper bound exists, because of the real-time one-way cellular automata precedent (for these automata, non-recursive trade-offs for arbitrary languages reduce to recursive trade-offs for unary languages [6]).
We resolve these questions by showing that non-recursive blow-ups are possible both in the general and in the unary case. Moreover, if we switch our attention to nondeterministic automata, the blow-ups can still be non-recursive, again both in the general and in the unary case. Section 2 describes the framework of this study in more detail and gives an outline of the proof, whose two pieces are presented in Sections 3 and 4. The discussion focuses on the general deterministic case, which is the most natural one; when appropriate, a final note in each section addresses the unary and/or nondeterministic cases.
Related work. The study of the relative succinctness of descriptional systems of different power seems to have started with Stearns [18], who gave a recursive upper bound for the size of the smallest deterministic finite automaton (1DFA) that recognizes the language of a given deterministic pushdown automaton (1DPA) whenever this language is indeed regular. Following this, Meyer and Fischer [7] showed no such bound exists if we compare 1DFAs to context-free grammars —the first proof of a non-recursive trade-off. Later, Valiant [19] proved the same for the comparison between 1DPAs and unambiguous context-free grammars, while Schmidt and Szymanski [15] repeated this for the comparison between the latter and (general) context-free grammars. Finally, Hartmanis [3] simplified many of the proofs by noting the relation of the recursiveness of a trade-off to the recognizability of the corresponding inadequacy.
problem (cf. Lemma 2.3); he also proved non-recursive trade-offs even for comparisons where the nondeterministic descriptors from above are accompanied by proofs that their languages are deterministic or unambiguous. It is this discussion that Kutrib [5] has transferred to the domain of multihead finite automata.
For a detailed overview of the subject, along with a comprehensive survey of the broader field of descriptive complexity, the reader is referred to [1].
A (promise) problem over is any pair where are disjoint subsets of . A TM recognizes if it accepts all and rejects all —possibly by looping. If some TM recognizes , we say is recursively enumerable or (following [17]) (Turing-) recognizable. For also a problem over , we write and say reduces to iff there is a TM that, on input , eventually halts with an output such that and . If some unrecognizable reduces to , then is also unrecognizable [4, 17].
If , then is also called a language and is adequately described by alone. If in addition contains exactly all sufficiently long strings for some interpretation of ‘sufficiently long’, , then we say is a threshold language.
2.1 Multihead automata
A two-way deterministic finite automaton with heads (a ) over alphabet consists of a finite state control, read-only heads, and a tape that can represent the symbols of and the extra endmarking symbols and . An input is presented on the tape surrounded by the endmarkers. The automaton starts at a designated start state, all heads reading the left endmarker . At every step, the symbols under the heads are read; based on this information and the current state, the automaton decides what its next state should be, which one head it should move, and whether to move it left or right; it then simultaneously changes its state and moves the chosen head accordingly. No head can move past an endmarker and the automaton cannot sense when two of its heads are on the same tape cell. The input is accepted if the machine ever reaches a designated final state and halts. The language of the automaton is exactly the set of strings over that it accepts. We say the automaton is terminating if it halts on all inputs.
By a multihead two-way deterministic finite automaton (a ), we mean a with any number of heads . A description of such an automaton is any string that encodes it, under some arbitrary (but fixed) reasonable encoding of s into finite strings over some alphabet . The size of such a description is the value size( ), where size: is some arbitrary (but fixed) computable function with the property that some TM can, on input , produce the list of all descriptions of s that have size at most .
We write (z) for the encoded by a description z, and (M) for the language of a M; the set of all descriptions of M (which may not be a singleton) is denoted by . The collection of the languages of all s [all s] is denoted by [by ]. The collection of the descriptions of all s [all s] is denoted by [by ]. Two s are equivalent if their languages are identical; two descriptions are equivalent if are.
The unary and nondeterministic cases. If in the definition of a contains only one symbol, we say the automaton is unary (a ). If at every step more than one next moves are possible, we say the automaton is nondeterministic (a ; or a , if the alphabet is unary). The sets of languages ( ), ( ), etc. and descriptions , , etc. are defined analogously.
2.2 Decreasing the number of heads
It is known [10, 11] that are more powerful than , in the sense that
for all k. This suggests two natural discussions.
I. Since , an can be ‘described’ not only by descriptions of s that recognize it, but also by descriptions of . Conceivably, the minimal descriptions of the former type are larger than the minimal descriptions of the latter type, in which case to change from a minimal description of to a description of is to trade an increase in the size of the description for a decrease in the number of heads. It is then natural to ask for an upper bound for this increase.
Definition 2.1. If is such that
for all and all of size at most : if has an equivalent , then it has one of size at most ,
then we say that is an upper bound for the increase in the size of description when a is replaced by an equivalent .
So, if is such an upper bound and is a that has equivalent s, it is possible to find one with a description no larger than , where is the size of any description of . To define such an is, of course, very easy; what is questionable is whether we can define one that is also recursive. If this is not possible, we say that the (descriptive) trade-off from to heads is non-recursive (for ), or that can be non-recursively more succinct than s.
II. Since , a may or may not have an equivalent , so that it is natural to consider the associated computational problem: “Given a description of a M, is it true that M has no equivalent ?”
Definition 2.2. .
In a more intuitive dialect, is the problem: “Given a , is it true that can’t perform the same task with only of its heads?” We are interested in the question whether this problem is recognizable, in which case we say that the inadequacy of heads is recognizable (for ).
As first noted in [3], discussions (I) and (II) are not unrelated (see also [5]).
Lemma 2.3. If the trade-off from to k heads is recursive, then the inadequacy of k heads is recognizable.
The unary and nondeterministic cases. That heads are better than has also been established for the case where the automata are unary and/or nondeterministic [11, 12]. That is, similarly to (1), we also have
for all k. As a result, for each one of the three types of machines we can repeat the preceding discussions, asking again (I) whether the trade-off from to k heads is recursive, and (II) whether the inadequacy of k heads is recognizable. Lemma 2.3 can then be shown anew (with the same proof).
2.3 Proof outline
Fix any . Our goal is to prove that can be non-recursively more succinct than . By Lemma 2.3, it is enough to show that is unrecognizable. We do this by a reduction from the complement of the halting problem
where is known to be unrecognizable [4, 17]. What we actually show is two separate reductions:
where E is the promise problem: “Given a description of a terminating whose language is either empty or threshold, check that it is empty.” In formal dialect, , where
We present the two reductions of (2) separately, in Sections 3 and 4. The first reduction needs a special type of automaton, which we introduce in the next section.
The unary and nondeterministic cases. Lemma 2.3 again suggests that we need only prove the inadequacy of k heads is unrecognizable, for each one of the three types of automata. We do this with the same two reductions of (2). Only the second one needs to be modified.
2.4 Multicounter automata
A deterministic automaton with (bounded) counters (DCA ) consists of a finite state control and counters, each of which can store a nonnegative integer. The input to the automaton is a nonegative upper bound for its counters. The automaton starts at a designated start state with all its counters set to 0. At every step, based on its current state, the automaton decides which counter it should act upon and whether it should increase it or decrease it. Then the action is attempted. An attempt to decrease fails iff the counter already contains 0; an attempt to increase fails iff the counter already contains . A failed attempt leaves the counter contents intact; a successful attempt updates the counter contents accordingly. Based on its current state
In this definition the reader will probably almost recognize the bounded counting automata of [14], the two-way counter automata and the register machines of [12], or other automata from elsewhere. The present model is nicely simpler, in the sense that the input is directly taken to be the upper bound for the counters, saving us the redundant (in this case) notion of an input tape or an input register.
and on whether the attempt succeeded or not, the automaton selects a new state and moves to it. The input is accepted if the machine ever enters a designated final state. The language of the automaton is exactly the set of nonnegative integers that it accepts. By a deterministic multicounter automaton (a DCA*) we mean a DCA_k with any number of counters k.
The new automata are just another, more convenient way to look at 2DFA s.
Lemma 2.4. Every 2DFA M has a DCA M' such that . Conversely, every DCA M has a 2DFA M' with .
The computing capabilities of DCA s with 2 or more counters are quite significant, as explained in the Appendix. We will be using these capabilities in the next section.
3 The first reduction
In this section, our goal is to find an algorithm that, on input a decription z of a TM M produces a description of a terminating such that
We will be calling a machine (TM, DCA*, or 2DFA*) good if it is terminating and its language satisfies (3) when it replaces (M'). For example, (z') should be good.
On its way to , our algorithm will construct descriptions of three other machines, in this order: a description of a TM , a description of a DCA , and a description of a DCA . In the sequence , , , , , each machine after will be defined in terms of the previous one and will be good. The reader will probably recognize in our constructions the ideas of [20] and [8] (also found in [9, 4]).
The first machine. A is a TM with one tape, infinite in both directions; the tape alphabet is , while the input alphabet is . On input , A starts with tape contents
and its head reading the leftmost 0 (or a ⊥, if n = 0). It then computes:
- For all , from up to :
— if x encodes a halting computation history of M on z, accept.
- Reject.
The check inside the loop presupposes some fixed reasonable encoding of sequences of configurations of M into binary strings, with the additional property: if w encodes a computation history, then every string of the form encodes the same history. Note that A can easily perform this check using the extra dotted symbols, never writing a non-blank symbol on a ⊥, or a ⊥ on a non-blank symbol.
The second machine. B is a DCA₃ that, on input , simulates the behaviour of A on input ; on input , B just rejects.
The strange length of the input of A's simulated computation is chosen as a function of n that is (i) computable by a DCA and (ii) increasing, but also (iii) small enough. Goodness of B bases on (ii), while (iii) facilitates the simulation performed by C in the next section.
To explain 's behavior, let , , be its three counters. is auxiliary, used for performing operations on and , while and together encode tape configurations of . To see the encoding, consider the following example of a configuration:
(here × stands for any non-blank symbol, ↑ shows the head position). Mapping symbols ⊥, i, 0, 1 and 0 to numbers 0, 1, 2, 3 and 4, respectively, we get each tape cell map to a digit of the 5-ary numbering system. Then, the head position splits the tape into two portions, which define the integers
(note that the cell under the head contributes to ; also, the sums are finite exactly because maps to 0). These two values are kept in and , respectively.
More specifically, on input , starts with a two-part initialization phase. First, it computes into , leaving 0's in and (if , rejects). Second, it computes into the value , where , leaving 0 in (this is only if , that is if ; otherwise, and rejects). This completes the initialization, with and , or in 5-ary:
Hence and correctly represent the starting tape configuration of on input :
| 0 | 0 | 0 | 0 | |||||||
(since symbol 0 maps to 4) and is ready to start a faithful simulation of 's steps. The details of this simulation are straightforward and are given in the Appendix.
It is important to note the range of the values assumed by the counters. The second part of the initialization phase can be implemented so that it never assigns to a counter a value greater than the starting value of , which is . Then, in the simulation phase, the behaviour of (the tape starts with 0's and always contains exactly non-blank symbols) and the selection of the symbol codes (0 gets the largest code) are such that the initial value of upper bounds all possible values that may appear in 's counters. Hence, since , the entire computation of after the first part of its initialization phase keeps all values of all counters at or below . In particular, after the first part of the initialization phase, all attempts to increment a counter are successful. This will prove crucial in the next section.
The third machine. is a that simulates the behaviour of . If are its two counters, then is auxiliary for performing operations on , while encodes the contents of the counters of : whenever contain respectively, contains .
The automaton starts by computing into the product , where (if , rejects, exactly as would do). It then removes all 2's and 3's from this product, so that becomes , which correctly encodes the values of the counters of right after the first part of its initialization phase. At this point starts a faithful simulation of the steps of .
The simulation is straightforward: every attempt of to increase [decrease] a counter is simulated by an attempt of to multiply [divide] by the corresponding prime —see the Appendix for the details. The only subtlety involves failure during increment attempts: How does the simulation make sure that an attempt of B to increase a counter fails iff the corresponding attempt of C to multiply U fails? The crucial observation (from the previous section) is that, since we are after the first part of B's initialization phase, every attempt of B to increment a counter is successful (which makes the left-to-right direction of the equivalence above vacuously true) and produces a value at or below t (which implies the value of U never exceeds its original value , making the right-to-left direction of the equivalence above vacuously true, as well). Hence, during the simulation, all multiplication attempts of C are successful and simulate only successful increment attempts of B.
The final machine. is a that, on input , simulates on input mimicking the counter operations by head moves (cf. Lemma 2.4).
This concludes the (informal) definitions of all four machines of our reduction. It should be clear that A, B, and C, are all good, so that is good, as well. Moreover, a description of can clearly be computed out of the description z of M.
4 The second reduction
Our goal in this section is to find an algorithm that, on input a description z of a terminating M whose language is guaranteed to be either empty or threshold, produces a description of a such that
(M) is a threshold language has equivalent s.
(4)
Following the idea of [5, Theorem 7], we will need an arbitrary that has no equivalent . So, fix to be such a and to be a description of it; also let be 's input alphabet.
Our algorithm is simple. It uses and to construct a description for the that, on input , follows the instructions:
-
Simulate M on x; if M accepts, accept; otherwise, go to Step 2.
-
Simulate D on x (and accept, reject, or loop accordingly).
Note that in the first simulation treats all symbols of the same. Also, this simulation is possible, since . Moreover, when rejects, can move to Step 2, since never rejects by looping. Overall, is well-defined.
In addition, the language of is clearly . Hence, when , then is just ; when is a threshold language with threshold , then
which is cofinite, and hence regular. In total,
which implies (4), by the selection of and the inclusion of regular languages in . Hence, our algorithm can safely output .
Note that this condition is necessary for a successful simulation but is not met in some obvious way. In B all three counters have the same upper bound (B's input), whereas in C their representations have different upper bounds: the base 2, base 3, and base 5 logarithms of the upper bound for U (C's input).
The unary and nondeterministic cases. By appropriately changing the selection of , the same algorithm establishes that , even when stands for the inadequacy of heads for . More specifically, we now select to be a description of a that has no equivalent . Then, is a well-defined automaton of the same type as (note that has enough resources to simulate each of , ) that satisfies (5), and hence the version of (4) for .
5 Conclusion
We have proved that one extra head allows non-recursively greater succinctness in describing languages of L by multihead automata, be they deterministic or nondeterministic, unary or not. It is fairly easy to draw similar conclusions for other types of (pebble or counter) automata of comparable power.
Appendix
Computing with a multicounter automaton. In order to facilitate the description of the behaviour of DCA* s, we introduce some ‘program’ notation. First, the two atomic operations, the attempt to decrease a counter X and the attempt to increase it, are denoted respectively by
where, in each case, flag is set to true iff the attempt succeeds. Then, the compound operation of setting to 0, denoted by , can be described by the line
If a second counter Y is present, we can transfer the contents of Y into X: we set X to 0, then repeatedly decrease Y and increase X until Y is 0. We denote this by
and describe it by a line similar to (6). Changing how fast X increases as Y decreases, we can multiply/divide Y into X by any constant a. We denote these operations by
For the first one, note that implies one of the attempts to increase X will fail; in that case, we restore the original value of Y returning X to 0, and set flag f to false. In the second operation, we also find the remainder and return it in r.
At a higher level, we can attempt to multiply Y by a constant a (into Y) using X as an auxiliary counter and making sure Y changes only if the operation succeeds:
Division (with remainder) can be done similarly. We denote the two operations by
Now, we can set Y to the largest power of a that can fit in n:
(note that this fails iff ). We denote (8) by (remember that ):
If a third counter Z is present, we can modify (8) to also count (in Z) the number of iterations performed. This gives us a way to try to calculate (failing iff ):
In another variation, we can modify the multiplication in (7) so that the success of the operation depends on the contents of Z (as opposed to n). We write this as
meaning that, using X as auxiliary and without affecting Z: if , then Y is set to aY; otherwise, Y is unaffected. Then, the following variant of (8)
implements the attempt to set Y to the largest power of a that is at most Z, using X as auxiliary and leaving Z unaffected (failing iff Z is 0). We denote this one by
It is important to note that during this operation no counter ever assumes a value greater than the original value of Z (cf. Footnote 4).
The computation of B. In the program notation from the previous section, the two parts of the initialization phase of B are given respectively by the two lines
For the simulation of A, the automaton remembers the current state of A in its finite memory. To find the code of the symbol read by the head of A, it computes:
Then, if s is the code of the symbol to be written on the tape, it computes
to simulate writing this symbol and moving to the right; it computes
to simulate writing this symbol and moving to the left. Note the t on the increment attempts, a reminder that the attempts are guaranteed to be successful.
The computation of C. The automaton starts with the computation
It then removes from all 's by repeated divisions , until a non-zero remainder is returned, which implies there were no 's in before the last division; then a correction
To implement this, we repeatedly decrease Y, increase X, and decrease Z by a. If Z becomes 0 before Y, then and the operation should fail: we restore the original values of Y and Z by repeatedly decreasing X, increasing Y, and increasing Z by a, until X becomes 0. Otherwise, and the operation will succeed: we copy the correct value to Y and restore the value of Z by repeatedly decreasing X and increasing each of Y, Z by a, until X becomes 0. Note that none of the counters ever assumes a value greater than the original value of Z.
Note the use of t in the place of a flag, indicating that the action is guaranteed to succeed.
Some extra care is necessary when L = 0 or R = 0, in which case the read head is at the leftmost or rightmost input symbol. We omit the details.
undoes the damage caused by this last division. Subsequently, a similar computation removes all 3's.
For the simulation part, when attempts to decrease (), divides by 5; if there is no remainder, the division simulated a successful decrement; otherwise, the simulated attempt failed and restores 's initial value:
; if then true else
.
When attempts to increase (), just multiplies by (). The attempts to increase or decrease or are handled similarly, with or instead of .
As explained in Section 3, both the increment and the multiplication are guaranteed to be successful, hence the t reminder.
Bibliography
[1] Jonathan Goldstine, Martin Kappes, Chandra M. R. Kintala, Hing Leung, Andreas Malcher, and Detlef Wotschke. Descriptional complexity of machines with limited resources. Journal of Universal Computer Science, 8(2):193–234, 2002.
[2] Juris Hartmanis. On non-determinancy in simple computing devices. Acta Informatica, 1:336–344, 1972.
[3] Juris Hartmanis. On the succinctness of different representations of languages. In International Colloquium on Automata, Languages, and Programming, volume 71 of Lecture Notes in Computer Science, pages 282–288, 1979.
[4] John E. Hopcroft and Jeffrey D. Ullman. Introduction to automata theory, languages, and computation. Addison-Wesley, Reading, MA, 1979.
[5] Martin Kutrib. On the descriptional power of heads, counters, and pebbles. In Proceedings of the 5th Workshop on the Descriptional Complexity of Formal Systems, pages 138–149, Budapest, 2003. MTA SZTAKI.
[6] Andreas Malcher. Descriptional complexity of cellular automata and decidability questions. Journal of Automata, Languages and Combinatorics, 7(4):549–560, 2002.
[7] Albert R. Meyer and Michael J. Fischer. Economy of description by automata, grammars, and formal systems. In Proceedings of the 12th Annual Symposium on Switching and Automata Theory, pages 188–191, 1971.
[8] Marvin L. Minsky. Recursive unsolvability of Post’s problem of “tag” and other topics in theory of Turing machines. Annals of Mathematics, 74(3):437–455, November 1961.
[9] Marvin L. Minsky. Computation: finite and infinite machines. Prentice-Hall, Englewood Cliffs, NJ, 1967.
[10] Burkhard Monien. Transformational methods and their application to complexity problems. Acta Informatica, 6:95–108, 1976.
[11] Burkhard Monien. Corrigenda: Transformational methods and their application to complexity problems. Acta Informatica, 8:383–384, 1977.
[12] Burkhard Monien. Two-way multihead automata over a one-letter alphabet. RAIRO Informatique Théorique/Theoretical Informatics, 14(1):67–82, 1980.
[13] Michael O. Rabin and Dana Scott. Finite automata and their decision problems. IBM Journal of Research and Development, 3:114–125, April 1959.
[14] Robert W. Ritchie and Frederick N. Springsteel. Language recognition by marking automata. Information and Control, 20:313–330, 1972.
[15] Erik M. Schmidt and Thomas G. Szymanski. Succinctness of descriptions of unambiguous context-free languages. SIAM Journal of Computing, 6(3):547–553, 1977.
[16] John C. Shepherdson. The reduction of two-way automata to one-way automata. IBM Journal of Research and Development, 3:198–200, April 1959.
[17] Michael Sipser. Introduction to the theory of computation. PWS Publishing Company, Boston, MA, 1996.
[18] Richard E. Stearns. A regularity test for pushdown machines. Information and Control, 11:323–340, 1967.
[19] Leslie G. Valiant. A note on the succinctness of descriptions of deterministic languages. Information and Control, 32:139–145, 1976.
[20] Hao Wang. A variant of Turing's theory of computing machines. Journal of the ACM, 4(1):63–92, January 1957.