One-Time Nondeterministic Computations

. We introduce the concept of one-time nondeterminism as a new kind of limited nondeterminism for ﬁnite state machines and push-down automata. Roughly speaking, one-time nondeterminism means that at the outset the automaton is nondeterministic, but whenever it performs a guess, this guess is ﬁxed for the rest of the computation. We characterize the computational power of one-time nondeterministic ﬁnite automata (OTNFAs) and one-time nondeterministic pushdown devices. Moreover, we study the descriptional complexity of these machines. For instance, we show that for an n -state OTNFA with a sole nondeterministic state, that is nondeterministic for only one input symbol, ( n + 1) n states are suﬃcient and necessary in the worst case for an equivalent deterministic ﬁnite automaton. In case of pushdown automata, the conversion of a nondeterministic to a one-time nondeterministic as well as the conversion of a one-time nondeterministic to a deterministic one turn out to be non-recursive, that is, the trade-oﬀs in size cannot be bounded by any recursive function.


Introduction
The concept of nondeterministic machines was introduced in the seminal paper of Rabin and Scott [14] on finite automata and their decision problems from 1959. Hopcroft [10] writes in his survey "Automata Theory: Its Past and Future" about the nondeterministic finite automaton (NFA) model in the above mentioned paper: "It was shown that this model was equivalent to the deterministic one. The fact that two models which were so different gave rise to the same sets, along with the fact that both were equivalent to the regular expression notation, indicated that these models were fundamental. This paper was very influential in shaping automata theory . . . " Nondeterminism turned out to be a very fruitful concept in different areas of computer science like, for example, computability theory, complexity theory, automata theory, formal language theory, etc., to mention only a few. Two of the most prominent problems related to nondeterminism are the P versus NP problem (see, for example, [5]) and the LBA problem (see, for example [6]). The former problem is listed as one of the ten Millennium Problems from the Clay Mathematics Institute, Cambridge, Massachusetts, USA, which is the sole computer science problem in that list.
Although NFAs are as powerful as deterministic one, as already mentioned above, the former model can offer exponential saving in space compared with deterministic finite automata (DFAs), that is, given some n-state NFA one can always construct a language equivalent DFA with at most 2 n states [14]. This so-called powerset construction turned out to be optimal, in general. That is, the bound on the number of states is tight in the sense that for an arbitrary n there is always some n-state NFA which cannot be simulated by any DFA with less than 2 n states [12,13]. It is worth mentioning that Moore's NFA contains a sole nondeterministic state, while Meyer and Fischer's nondeterministic automaton has n − 1 nondeterministic states. In both NFAs the nondeterministic branching, that is, the maximal number of transitions with the same label leaving a state, is bounded by two, thus by a constant. This can be seen as a first indication that not all NFAs make equal use of nondeterminism. In fact, nondeterminism is a resource and its usage can be accurately quantified. There are several possibilities to do so. For instance, one is to count the number of nondeterministic moves during the computation, while another one depends on the number of the successor states and is called branching and guessing. Results on these quantifications are subsumed under the name limited nondeterminism in the literature, see, for example, [1] for a survey.
Here we give a new interpretation of nondeterminism. On the one hand, we are still interested in the power of nondeterminism with respect to computations and conciseness, but on the other hand, its usage should be heavily restricted. The restriction we are introducing is that of one-time nondeterminism, which means that at the outset the automaton is nondeterministic, but whenever it performs a guess, this guess is fixed for the rest of the computation. This is a clear change on the semantics of nondeterminism. We will study this new concept for finite automata and pushdown machines. Although one-time nondeterminism does not increase the accepting power of ordinary finite state devices, their conciseness is even greater than that of ordinary nondeterministic finite automata compared to deterministic ones. In general, an n-state one time nondeterministic finite automaton (OTNFA) can be simulated by an (n+1) n k·n -state deterministic finite automaton, where k is the size of the input alphabet. In general this bound is over-counted. A slightly better estimate is obtained by using the notion of the degree of nondeterminism d for finite state devices, which is defined as the product of all non-zero size successor sets of a state. Formally |δ(q, a)|, where Q is the set of states, Σ the input alphabet, and δ the nondeterministic transition function of M . A better upper bound on the above mentioned simulation of an OTNFA M is then (n + 1) d(M ) . This bound is tight in a special case, because we can give an example of an n-state OTNFA M of nondeterministic degree d(M ) = n such that (n + 1) n states are sufficient and necessary in the worst case for an equivalent deterministic finite automaton. For pushdown automata the results on the descriptional complexity are even more dramatic. First of all it is shown that one-time nondeterministic pushdown automata (OTNPDA) accept exactly the union closure of the deterministic context-free languages. This is a well-known language family which properly lies between the deterministic context-free languages and the context free ones. We utilize this characterization and show that the trade-offs between OTNPDAs and deterministic ones, as well as between ordinary nondeterministic pushdown automata and OTNPDAs are non-recursive. That is, the bound between two equivalent machines of different types cannot be bounded by any recursive function. This is quite exceptional because the use of nondeterminism is highly restricted to the bare necessities.

Preliminaries
Let Σ * denote the set of all words over the finite alphabet Σ. The empty word is denoted by λ, and Σ + = Σ * \ {λ}. The reversal of a word w is denoted by w R . For the length of w we write |w|. For the number of occurrences of a symbol a in w we use the notation |w| a . Set inclusion is denoted by ⊆ and strict set inclusion by ⊂. We write 2 S for the power set and |S| for the cardinality of a set S.
We recall some notation for descriptional complexity. Following [9] we say that a descriptional system S is a set of finite descriptors such that each D ∈ S describes a formal language L(D), and the alphabet alph(D) over which D represents a language can be deduced from D. The family of languages represented Finite automata or (deterministic) pushdown automata can be encoded over some fixed alphabet such that their input alphabets can be extracted from the encodings. The sets of these encodings are descriptional systems S 1 and S 2 , and L (S 1 ) is the family of regular languages and L (S 2 ) is the family of (deterministic) context-free languages. Examples for complexity measures for finite automata or pushdown automata are the total number of symbols, that is, the length of the encoding (length), or, in the former case, the number of states and, in the latter case, the product of the number of transition rules and the maximal number of symbols pushed in one step.
Here we only use complexity measures that are recursively related to length. If there is a total recursive function g : N × N → N such that, for all D ∈ S, length(D) ≤ g(c(D), |alph(D)|), then c is said to be an s-measure. If, in addition, for any alphabet Σ, the set of descriptors in S describing languages over Σ is recursively enumerable in order of increasing size, then c is said to be an snmeasure. Clearly, the number of states is an sn-measure for finite automata.
Whenever we consider the relative succinctness of two descriptional systems S 1 and S 2 , we assume that the intersection L (S 1 ) ∩ L (S 2 ) is non-empty. Let S 1 and S 2 be descriptional systems with complexity measures c 1 and c 2 , respectively. A total function f : N → N is an upper bound for the increase in complexity when changing from a descriptor in S 1 to an equivalent descriptor in S 2 , if for all D 1 ∈ S 1 with L(D 1 ) ∈ L (S 2 ), there exists a D 2 ∈ S 2 (L(D 1 )) such that c 2 (D 2 ) ≤ f (c 1 (D 1 )). If there is no recursive upper bound, then the trade-off for changing from a description in S 1 to an equivalent description in S 2 is said to be non-recursive. Non-recursive trade-offs are independent of particular sn-measures.

One-Time Nondeterministic Finite Automata
We investigate one-time nondeterministic finite automata. The basic idea is that at the outset the automaton is nondeterministic. But whenever it performs a guess, this guess is fixed for the rest of the computation.
A nondeterministic finite automaton (NFA) is a system M = Q, Σ, δ, q 0 , F , where Q is the finite set of internal states, Σ is the finite set of input symbols, q 0 ∈ Q is the initial state, F ⊆ Q is the set of accepting states, and δ : Q × Σ → 2 Q is the transition function. A configuration of a finite automaton M is a tuple (q, w), where q ∈ Q and w ∈ Σ * . If a is in Σ and w in Σ * , then we write (q, aw) M (p, w) if p is in δ(q, a). As usual, the reflexive transitive closure of M is denoted by * M . The subscript M will be dropped from M and * M if the meaning is clear. Then the language accepted by M is defined as . Without loss of generality we assume that any state of a (non)deterministic finite automaton is reachable.
A finite automaton M is partial deterministic (partial DFA) if and only if |δ(q, a)| ≤ 1, for all q ∈ Q and a ∈ Σ, and the device M is deterministic (DFA) if and only if |δ(q, a)| = 1, for every q ∈ Q and a ∈ Σ. In these cases we simply write δ(q, a) = q for δ(q, a) = {q } assuming that the transition function is a (partial) mapping δ : Q × Σ → Q. Observe, that every partial DFA can be made complete by introducing a non-accepting sink state. So, any DFA is complete, that is, the transition function is total, whereas for partial DFAs and NFAs it is possible that δ maps to the empty set.
Next, the idea of one-time nondeterministic finite automata is formalized as follows: let M = Q, Σ, δ, q 0 , F be an NFA and be a computation of M on input w = a 0 w 0 ∈ Σ + . A computation is permissible if and only if (q i , a i ) = (q j , a j ) implies q i+1 = q j+1 , for all 0 ≤ i < j ≤ n, or the computation is trivial, that is, it consists of (q 0 , λ) only. Now, M is said to be one-time nondeterministic if and only if it may only perform permissible computations. In this case we call M a one-time nondeterministic finite automaton (OTNFA). A word w is permissible acceptable by M if there is a permissible computation that ends in an accepting state of M . The language accepted by an OTNFA M is In order to illustrate the definitions we continue with an example. to last letter is an a, that is, the language (a + b) * a(a + b). When interpreting M as an OTNFA, then only permissible computations are allowed. This means, that for the sole nondeterministic state either the a-self-loop from state 1 to itself or the a-transition leading form state 1 to 2 can be used during the computation, but not both. Thus, we can think of doing a computation either in the finite automaton M or M shown in the middle of or on the right of Figure 1. Therefore, the language accepted by the OTNFA M is equal to b * a(a + b), because the automaton in the middle does not accept anything.
The following statement is trivial since the permissible computations of an NFA are a subset of all possible computations. The strictness of the inclusion follows by the above given example. Before we consider the computational power of OTNFAs in more detail, we need some further notation. Let M = Q, Σ, δ, q 0 , F be an NFA. An automaton  Proof. The inclusion from left to right is seen as follows: let M = Q, Σ, δ, q 0 , F . Consider any word w ∈ L p (M ). Since w belongs to the language in question, there is a permissible computation of the form (q 0 , λ), if w = λ or (q 0 , w) = (q 0 , a 0 w 0 ) M (q 1 , w 0 ) = (q 1 , a 1 w 1 ) M · · · M (q n , w n−1 ) = (q n , a n w n ) M (q n+1 , w n ) = (q n+1 , λ) with q n+1 ∈ F , suitable a 0 , a 1 , . . . , a n in Σ, and words w 0 , w 1 , . . . , w n in Σ * . It is not hard to see that there is a partial DFA M = Q, Σ, δ , q 0 , F ) with M ≺ ne M satisfying δ (q i , a i ) = q i+1 , for 0 ≤ i ≤ n-the non-used transitions during the considered computation are appropriately induced by the OTNFA M . Therefore, the word w is accepted by the partial DFA M , that is, w ∈ L(M ). For the converse inclusion we argue as follows: let M be any partial DFA from D ne (M ). Consider a word w ∈ L(M ). As above, there is a computation of the form (q 0 , λ), if w = λ or (q 0 , w) = (q 0 , a 0 w 0 ) M (q 1 , w 0 ) = (q 1 , a 1 w 1 ) M · · · M (q n , w n−1 ) = (q n , a n w n ) M (q n+1 , w n ) = (q n+1 , λ) with q n+1 ∈ F , suitable letters a 0 , a 1 , . . . , a n in Σ, and words w 0 , w 1 , . . . , w n in Σ * . Since this is a deterministic computation one can interpret it as a permissible computation of M , since M can simulate every step of the partial DFA M . Therefore we conclude that w ∈ L p (M ), hence L p (M ) ⊇ L(M ). Note that the given argumentation holds for every M ∈ D ne (M ) and therefore  In order to accept the union on the right-hand side by a DFA, we apply the standard cross-product construction [16]. To this end, we complete the involved partial automata from D ne (M ), which results in ordinary DFAs with at most n Hence we can reformulate the upper bound given in Theorem 4 as follows: Corollary 6. Let M be an OTNFA with nondeterministic degree d(M ). Then any DFA that accepts the language L p (M ) needs at most (n + 1) d(n) states.
In the remainder of this section we obtain that the bound stated in the previous corollary can be reached already for a OTNFA with a sole nondeterministic state, that is nondeterministic for only one input symbol.

Theorem 7.
There is a n-state OTNFA M with a sole nondeterministic state, that is nondeterministic only for one input symbol, and has nondeterministic degree n, such that (n + 1) n states are sufficient and necessary in the worst case for a DFA to accept the language L p (M ).
Proof. The upper bound of (n + 1) d(n) states for a DFA accepting the language L p (M ) follows from Corollary 6. For the lower bound we argue as follows: consider the OTNFA whose transition function δ on the letters a, b, c, and d is depicted in Figure 2.
By the ≺ ne -relation the OTNFA M gives rise to several partial DFAs M j , for 1 ≤ j ≤ n, where M j = {1, 2, . . . , n}, {a, b, c, d}, δ j , 1, {n} and  function δ j is equal to δ on the letters a, b, and c, and for the letter d we have Here we assume that whenever some δ i (f [i], a) is undefined, then the component is set to −. In order to prove our statement we need to show that the DFA M is minimal. The proof that every state in M is reachable and defines a distinct equivalence class utilizes some results from semigroup theory since one can identify the states of M with partial mappings from [n] to [n].

One-Time Nondeterministic Pushdown Automata
Now we turn to generalize the definitions of OTNFAs to pushdown automata. Nondeterministic pushdown automata are well known for capturing the contextfree languages. Let Σ be an alphabet. For convenience, we use Σ λ for Σ ∪ {λ}. A nondeterministic pushdown automaton (NPDA) is a system M = Q, Σ, Γ, δ, q 0 , ⊥, F , where Q is a finite set of internal states, Σ is the finite set of input symbols, Γ is a finite set of pushdown symbols, δ is a mapping from Q×Σ λ ×Γ to finite subsets of Q × Γ * called the transition function, q 0 ∈ Q is the initial state, ⊥ ∈ Γ is the so-called bottom-of-pushdown symbol, which initially appears on the pushdown store, and F ⊆ Q is the set of accepting states.
A configuration of a pushdown automaton is a triple (q, w, γ), where q is the current state, w the unread part of the input, and γ the current content of the pushdown store, the leftmost symbol of γ being the top symbol. On input w the initial configuration is defined to be (q 0 , w, ⊥). If p, q are in Q, a is in Σ λ , w is in Σ * , γ and β are in Γ * , and Z is in Γ , then we write (q, aw, Zγ) M (p, w, βγ), if the pair (p, β) is in δ(q, a, Z). In order to simplify matters, we require that during any computation the bottom-of-pushdown symbol appears only at the bottom of the pushdown store. Formally, we require that if (p, β) is in δ(q, a, Z), then either β does not contain ⊥ or β = β ⊥, where β does not contain ⊥, and Z = ⊥. As usual, the reflexive transitive closure of M is denoted by * M . The subscript M will be dropped whenever the meaning remains clear. The language accepted by M with accepting states is q, λ, γ), for some q ∈ F and γ ∈ Γ * }.
An NPDA is a deterministic pushdown automaton (DPDA), if there is at most one choice of action for any possible configuration. In particular, there must never be a choice of using an input symbol or of using λ input. Formally, a pushdown automaton M = Q, Σ, Γ, δ, q 0 , ⊥, F is deterministic if (i) δ(q, a, Z) contains at most one element, for all a in Σ λ , q in Q, and Z in Γ , and (ii) for all q in Q and Z in Γ : if δ(q, λ, Z) is not empty, then δ(q, a, Z) is empty for all a in Σ.
Now we turn to one-time nondeterministic pushdown automata (OTNPDA). As before, whenever such an automaton performs a guess, this guess is fixed for the rest of the computation. Let M = Q, Σ, Γ, δ, q 0 , ⊥, F be an NPDA and, for M (q n , w n−1 , β n γ n−1 ) = (q n , a n w n , Z n γ n ) be a computation of M on input a 0 w 0 ∈ Σ + . The computation is defined to be permissible if and only if, (i) the equality (q i , Z i ) = (q j , Z j ) implies either a i = a j = λ or a i = λ and a j = λ, and (ii) the equality (q i , a i , Z i ) = (q j , a j , Z j ) implies q i+1 = q j+1 and β i+1 = β j+1 , for all 0 ≤ i < j ≤ n − 1. A word w is permissible acceptable by M if on input w there is an accepting permissible computation. The language accepted by an OTNPDA M is In order to derive the relationships of OTNPDAs, NPDAs, and DPDAs, we generalize the characterization of OTNFAs to pushdown automata. The notation as well as Theorem 3 is straightforwardly adapted. So, we obtain: So, the family of languages accepted by OTNPDAs is included in the (finite) union closure of the deterministic context-free languages. Conversely, the union of a finite number of languages accepted by DPDAs is accepted by an NPDA whose first transition is a nondeterministic choice of which of the DPDAs is to be simulated. Subsequently, the NPDA simulates the chosen DPDA. In this way, the nondeterministic situation at the beginning is never reached again and, thus, the NPDA is in fact a OTNPDA. We conclude that the union closure of the deterministic context-free languages is included in the family of languages accepted by OTNPDAs. This characterization together with known results shows that the computational capacity of OTNPDAs is strictly in between the NPDAs and DPDAs. For establishing non-recursive trade-offs the following general result is useful that is a slightly generalized and unified form of a result of Hartmanis [4].
Theorem 11 ([9]). Let S 1 and S 2 be two descriptional systems for recursive languages such that any descriptor D in S 1 and S 2 can effectively be converted into a Turing machine that decides L(D), and let c 1 be a measure for S 1 and c 2 be an sn-measure for S 2 . If there exists a descriptional system S 3 and a property P that is not semi-decidable for descriptors from S 3 , such that, given an arbitrary D 3 ∈ S 3 , (i) there exists an effective procedure to construct a descriptor D 1 in S 1 , and (ii) D 1 has an equivalent descriptor in S 2 if and only if D 3 does not have property P , then the trade-off between S 1 and S 2 is non-recursive.
By measuring the amount of ambiguity and nondeterminism in pushdown automata in [7,8] infinite hierarchies in between the deterministic and nondeterministic context-free languages are obtained. Intuitively, the corresponding language families are close together. Nevertheless, there are non-recursive tradeoffs between the levels of the hierarchies.
In the following we show non-recursive trade-offs between nondeterministic and OTNPDAs automata as well as between OTNPDAs deterministic pushdown automata by reduction from the non-halting problem for Turing machines on empty tape. To this end, histories of Turing machine computations are encoded into strings, a technique introduced in [3]. It suffices to consider deterministic Turing machines with one single tape and one single read-write head. Without loss of generality and for technical reasons, we assume that the Turing machines cannot print blanks, can halt only after an odd number of moves, accept by halting, and visit an infinite number of squares if they do not halt.
Let Q be the state set of some Turing machine M , where q 0 is the initial state, T ∩ Q = ∅ is the tape alphabet containing the blank symbol, and Σ ⊂ T is the input alphabet. Then a configuration of M can be written as a word of the form T * QT * such that t 1 t 2 · · · t i qt i+1 · · · t n is used to express that M is in state q, scanning tape symbol t i+1 , and t 1 , t 2 to t n is the support of the tape inscription. Dependent on the Turing machine M we define the following two languages. Let a, b, $, # / ∈ T ∪ Q, n ≥ 0, and w i ∈ T * QT * , 0 ≤ i ≤ 2n + 1 are configurations of M . Then language L M,0 contains all words of the form $w 0 $w R 1 $w 2 $w R 3 $ · · · $w 2n #w R 2n+1 #a, where w 0 is an initial configuration with empty tape of the form w 0 = q 0 and w 2i is the successor configuration of w 2i−1 , 1 ≤ i ≤ n, and language L M,1 contains all words of the form $w 0 $w R 1 $w 2 $w R 3 $ · · · $w 2n #w R 2n+1 #b, where w 2i+1 is the successor configuration of w 2i , 0 ≤ i ≤ n. As an immediate observation we obtain the next corollary. In order to apply Theorem 11, we use the family of deterministic one-tape Turing machines as descriptional system S 3 , and for the property P we take the property of not halting on empty tape. Recall that this property is indeed not semi-decidable for deterministic one-tape Turing machines. Next, given an arbitrary deterministic one-tape Turing machine M , that is, a descriptor D 3 ∈ S 3 , we must construct a nondeterministic pushdown automaton, that is, a descriptor D 1 in S 1 , that has an equivalent one-time nondeterministic pushdown automaton, that is, a descriptor in S 2 , if and only if M halts on empty tape.
So, given a deterministic one-tape Turing machine M , we use a new symbol c and define L M = ((L M,0 ∪ L M,1 )c) * . By Corollary 12 and the effective closures of the context-free languages under union and marked Kleene star, we derive that L M is a context-free language, such that its nondeterministic pushdown automaton D 1 can effectively be constructed from M . It remains to be shown that L M is accepted by a one-time nondeterministic pushdown automaton if and only if M halts on empty tape. The next lemma shows that L M is accepted even by a deterministic pushdown automaton if M halts on empty tape. Lemma 13. Let M be a deterministic Turing machine that halts on empty tape. Then language L M is accepted by some DPDA.
In order to disprove that L M is accepted by a OTNPDA if M does not halt on empty tape Ogden's lemma for deterministic context-free languages is used (see, for example, [2]). Then one can show the following result.
Lemma 14. Let M be a deterministic Turing machine that does not halt on empty tape. Then language L M is not accepted by any OTNPDA.
So, we have shown the following theorem.
Theorem 15. The trade-off between nondeterministic pushdown automata and one-time nondeterministic pushdown automata is non-recursive.
The proof of the second non-recursive trade-off between one-time nondeterministic pushdown automata and deterministic pushdown automata follows along the lines of the first non-recursive trade-off. Again, we apply Theorem 11 but now with a simplification of the language L M . More precisely, given a deterministic one-tape Turing machine M , we define L M = L M,0 ∪ L M,1 . By Corollary 12, both languages L M,0 and L M,1 are deterministic context-free languages, such that their deterministic pushdown automata can effectively be constructed from M . So, L M is accepted by a one-time nondeterministic pushdown automaton that can effectively be constructed from M . As before, it remains to be shown that L M is accepted by a deterministic pushdown automaton if and only if M halts on empty tape. If M halts on empty tape, Lemma 13 says that L M is accepted by some DPDA. Since the deterministic context-free languages are closed under intersection with regular sets, this implies that L M is accepted by some DPDA either.
Lemma 16. Let M be a deterministic Turing machine that does not halt on empty tape. Then language L M is not accepted by any DPDA.
Thus, we have also shown the following non-recursive trade-off.
Theorem 17. The trade-off between one-time nondeterministic pushdown automata and deterministic pushdown automata is non-recursive.