On Store Languages of Language Acceptors
Oscar H. Ibarra, Ian McQuillan

TL;DR
This paper investigates the store languages of various automata models, showing their regularity, exploring their properties, and applying these findings to prove closure properties and space complexity bounds.
Contribution
It introduces a unified study of store languages across multiple automata models, identifies their regularity, and applies these results to prove closure properties and complexity bounds.
Findings
Store languages of all examined automata models are regular.
Connections between store languages of one-way and two-way machines are established.
A technique for proving closure under right quotient with regular languages is developed.
Abstract
It is well known that the "store language" of every pushdown automaton -- the set of store configurations (state and stack contents) that can appear as an intermediate step in accepting computations -- is a regular language. Here many models of language acceptors with various data structures are examined, along with a study of their store languages. For each model, an attempt is made to find the simplest model that accepts their store languages. Some connections between store languages of one-way and two-way machines generally are demonstrated, as with connections between nondeterministic and deterministic machines. A nice application of these store language results is also presented, showing a general technique for proving families accepted by many deterministic models are closed under right quotient with regular languages, resolving some open questions (and significantly simplifying…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
On Store Languages of Language Acceptors111©2018. This manuscript version is made available under the CC-BY-NC-ND 4.0 license http://creativecommons.org/licenses/by-nc-nd/4.0/
Oscar H. Ibarra222Supported, in part, by NSF Grant CCF-1117708 (Oscar H. Ibarra).
Department of Computer Science
University of California, Santa Barbara, CA 93106, USA
Ian McQuillan333Supported, in part, by Natural Sciences and Engineering Research Council of Canada Grant 2016-06172 (Ian McQuillan).
Department of Computer Science, University of Saskatchewan
Saskatoon, SK S7N 5A9, Canada
Abstract
It is well known that the “store language” of every pushdown automaton — the set of store configurations (state and stack contents) that can appear as an intermediate step in accepting computations — is a regular language. Here many models of language acceptors with various store structures are examined, along with a study of their store languages. For each model, an attempt is made to find the simplest model that accepts their store languages. Some connections between store languages of one-way and two-way machines are demonstrated, as with connections between nondeterministic and deterministic machines. A nice application of these store language results is also presented, showing a general technique for proving families accepted by many deterministic models are closed under right quotient with regular languages, resolving some open questions (and significantly simplifying proofs for others that are known) in the literature. Lower bounds on the space complexity of Turing machines for having non-regular store languages are obtained.
keywords:
Store Languages , Turing Machines , Storage Structures , Right Quotient , Automata
††journal: Theoretical Computer Science
\newclass\NQA
NQA \newclass\NSANSA \newclass\NFPANFPA \newclass\DCMDCM \newclass\eDCMeDCM \newclass\eNPDAeNPDA \newclass\DPDADPDA \newclass\PDAPDA \newclass\DCMNEDCM_NE \newclass\TwoDCM2DCM \newclass\NCMNCM \newclass\eNCMeNCM \newclass\eNQAeNQA \newclass\eNSAeNSA \newclass\eNPCMeNPCM \newclass\eNQCMeNQCM \newclass\eNSCMeNSCM \newclass\DPCMDPCM \newclass\NPCMNPCM \newclass\NQCMNQCM \newclass\DQCMDQCM \newclass\NSCMNSCM \newclass\NPDANPDA \newclass\TRETRE \newclass\NFANFA \newclass\DFADFA \newclass\NCANCA \newclass\DCADCA \newclass\DTMDTM \newclass\NTMNTM \newclass\DLOGDLOG
label1][email protected]
label2][email protected]
1 Introduction
A store configuration of a one-way or two-way language acceptor consists of the state followed by the contents of its memory (store) structure. It does not include the input and the position of the input head. For example, for a nondeterministic pushdown automaton (), a store configuration is represented by a string , where is a state and is the contents of the pushdown stack. For multi-tape acceptors, such as for an augmented with reversal-bounded counters () [1], the store configuration is represented by the string , where represents the value of counter in unary notation, and the symbols and the symbols of are disjoint. For a machine , let be the set of store configurations that can appear as an intermediate step in accepting computations of .
It is well-known that is a regular language for any [2, 3]. Greibach used this result to provide an alternative proof [3] that regular canonical systems produce regular languages [4]. Also, it was a key component to showing that it is decidable whether the set of all infixes (subwords) of the language accepted by a reversal-bounded444Reversal-bounded means that there is a bound on the number of switches between non-decreasing and non-increasing the size of the pushdown. is equal to (i.e., is dense) [5]. Connections between store languages and the area of verification and model checking have also been recently explored [6].
Due to the usefulness of the store language concept, the store languages of several models of language acceptors are studied in this paper. For machine models with an undecidable emptiness problem, membership in the store language is undecidable. Hence, the investigation of store languages is particularly focused on machine models with a decidable emptiness problem. Results are given here that generalize (in often non-obvious ways) the aforementioned result concerning s to many other machine models, such as the following:
The following nondeterministic machine models with one-way read-only input have regular store languages: -flip pushdown automata [7] (which are like pushdown automata but can flip the pushdown store up to times), reversal-bounded queue automata, nondeterministic Turing machines with a reversal-bounded worktape, and stack automata [8, 9]. The result for stack automata was shown recently [10] and so our result becomes an alternate proof that follows from existing results in the literature. Also, a new simple but general method is presented for translating results between two-way machines and one-way machines. 2. 2.
The store languages of finite-crossing555Finite-crossing means that the input head crosses the boundary of any two adjacent input symbols at most a fixed number of times. two-way nondeterministic machines with reversal-bounded counters can be accepted by one-way deterministic machines with reversal-bounded counters (). 3. 3.
There is a non-finite-crossing two-way deterministic machine with one reversal-bounded counter whose store language cannot be accepted by any . 4. 4.
Some machine models (e.g., deterministic pushdown automata with reversal-bounded counters, ) cannot accept their own store languages.
s and s have been extensively studied since their introductions in [1, 11]. They have found applications in areas such as timed automata [12], model-checking and verification [13, 14], membrane computing [15], and Diophantine equations [16].
Another interesting application is presented here showing the closure of many families of languages accepted by deterministic machines under right quotient with regular languages. Some of these resolve open problems in the literature, and others simplify existing known proofs. These include deterministic stack automata (known with a lengthy proof in [17]), deterministic -flip pushdown automata (stated as an unresolved open problem in [18]), certain types of deterministic Turing machines, deterministic checking stack automata, and deterministic reversal-bounded queue automata. An alternate proof of the result for deterministic pushdown automata that was shown in [19] is also given. This general closure is somewhat surprising given the determinism of the machines and the nondeterministic nature of deletion occurring with quotients.
Finally, lower bounds are obtained on the space complexity of different types of Turing machines in order to have non-regular store languages.
2 Notation
An alphabet is a set of symbols (usually assumed to be finite unless stated otherwise). The set of all words over is denoted by , and the set of all non-empty words is denoted by . A language over is any subset of . Given a word , the length of is denoted by . Given , then is the number of ’s in . The empty word is denoted by . The reverse of a word is denoted by , extended to the reverse of a language in the natural way. Given two languages , the left quotient of by , , and the right quotient of by is . A language is letter-bounded if there exists (not necessarily distinct) such that . A language is bounded if there exists such that . Given two words , is a prefix of if , for some , is a suffix of if for some , is an infix of if , for some , and is a subsequence of if .
In this paper, introductory knowledge of automata and formal language theory is assumed (see [20] for an introduction), including finite automata (s and s), pushdown automata (s), Turing machines (s and s), and generalized sequential machines (gsms). Let be the family of languages accepted by s.
3 Store Languages of One-Way Machines
Many different kinds of machine models are studied in this paper, such as finite automata, pushdown automata [20], reversal-bounded multicounter machines [1], stack automata (similar to a pushdown automata with the ability to read, but not change on the inside of the pushdown) [8, 9], Turing machines [20], queue automata [21], flip-pushdown automata (machines with the ability to flip the pushdown at most times) [7], and also combinations of their stores within individual machines. The store language of each depends on the precise definition of each type of machine. It is possible to define all such models generally by varying the “store type” similar to Abstract Families of Automata [22] or storage types [23], and then the store language only needs to be defined once for all types of machines. A similar approach is followed here due to the large number of machine models considered, because it allows to make general connections between types of machines, and because store languages depend considerably on the precise definition of the machines.
Definition 1
A store type is a tuple , where
- •
* is the set of store symbols (potentially infinite, available to all machines using this store),*
- •
* is the set of instructions,*
- •
* is the write function, a partial function from to ,*
- •
* is the read function, a partial function from to ,*
- •
* is the initial store configuration,*
- •
* is the instruction language.*
Thus, a store type defines a type of auxiliary store. The write function indicates how each store contents change in response to each instruction, and the read function indicates how machines read from each store contents. Every machine using this store type starts with on its store. Lastly, is a type of filter that can restrict the allowable sequences of instructions. This is useful for several purposes, such as defining reversal-bounded store types.
Example 1
The pushdown store type is where , ( is the bottom-of-stack marker), , (i.e. there is no restriction as to the possible sequences of instructions), , , where .
Intuitively, a pushdown store can read the rightmost symbol, and can replace the rightmost symbol with any word; these words are the instructions (which can be the empty word for popping).
The machines (defined next) using this store type are equivalent to standard pushdown automata [20].
Definition 2
Given store types with , where are pairwise disjoint, for , a one-way nondeterministic -machine is a tuple , where is the finite set of states, is the input alphabet, is the initial state, is the set of final states, is a finite subset of , and the finite transition relation is from to .
A configuration of is a tuple , where is the current state, is the remaining input, and is the contents of the ’th store, for . The derivation relation is defined by: , if there exists
[TABLE]
such that , for all , . This is extended to , the reflexive and transitive closure of . Sometimes, bijective labels will be associated with transitions of , and in such cases, the derivation relation using transition is sometimes written as , generalized to words . For , define a homomorphism from to where for of the form of (1). Then is valid if for each , .
The language accepted by , .
The store language of ,
[TABLE]
Thus, is the set of store configuration representatives that can appear as an intermediate step of an accepting computation. It is also enforced that, if , then are all disjoint. By a slight abuse of notation, machines with several tapes that have the same store type are assumed to have disjoint tape alphabets. Thus, since the letters used in each component are disjoint, when reading a string of , it is possible to know which of the stores is being read.
Definition 3
For a given set of machines , let be the family of languages accepted by machines in , and be the family of store languages of machines in .
Various types of one-way deterministic automata will also be studied in this paper. These machines are defined to scan input , where , and is the right end-marker (this is needed for some types of machines such as [24]). Then, a machine is deterministic if for all , the language accepted by , , and the store language of , .
Given store types , the set of all one-way nondeterministic, or deterministic, -machines that can be built using this store type will be examined.
In this notation, store types that are equivalent to standard automata models from the literature will be described. Indeed, pushdown automata are machines that start with on the pushdown, can read the top of the pushdown on its transitions, and replace the topmost letter with a word. These correspond with -machines as built with the pushdown store type of Example 1. Let be the set of all such pushdown automata.
An -reversal-bounded pushdown store is the same except is set to the concatenation of alternating sequences of and i.e. there are at most alternations between non-decreasing and non-increasing the size of the stack.
A counter store type restricts a pushdown store to having a single symbol (plus ). At each step, essentially based on whether the counter is empty or non-empty, a machine can change each counter by , or . Similarly, -reversal-bounded counters can be defined exactly like -reversal-bounded pushdowns.
One can consider machines with -reversal-bounded counters. The set of all machines that have -reversal-bounded counters, for some is denoted by . Note that is a union of sets of machines that can be built using store types.
Example 2
A queue store type is a tuple , where , , , is if , and the leftmost symbol of otherwise, , and .
Example 3
The -flip-pushdown store type is a tuple , where , , , , , where , and (the pushdown above the end-marker flips), and restricts at most flip moves to be applied.
For example, consider a machine M=(Q,\Sigma,\Gamma,\delta,q_{0},F),\Sigma=\{a,b,\},F={q_{2}}$, with transitions
[TABLE]
In every accepting computation, must push all contents onto the stack until \$$, making a stack of Z_{0}wZ_{0}w^{R}L(M)={w$w\mid w\in{a,b}^{+}}$.
Machines defined with this type are equivalent to those in [7], although they are classically defined where the flips are performed with a separate function.
Next, we define stacks similarly to the definition in [8, 22]. They are defined like pushdowns, but there are also instructions to enter the inside of the stack in a two-way read-only fashion.
Example 4
The stack store type is a tuple , where is an infinite set of store symbols available to stacks, with special symbols that gives the position of the read/write head in the stack, is the bottom-of-stack marker, and is the top-of-stack marker, with , , is the set of instructions of the stack, where the first set are changing the top symbol of the stack, and the rest (down, stay, or up) move the read/write head inside the stack, , , with , and is defined as:
- •
* for ,*
- •
, for , with ,
- •
, for ,
- •
, for .
Also, the checking stack store type is a restriction of stack store type above where is restricted to be in . That is, a checking stack has two phases, a “writing phase”, where it can push or stay (no pop), and then a “reading phase”, where it enters the stack in read-only mode. But once it starts reading, it cannot change the stack again.
Stacks require that the read/write head be included in the store language in a similar fashion to Turing tapes, as defined next:
Example 5
*A Turing store is a tuple where ( is the read/write head that reads the symbol before it, and ␣
is the blank symbol, so each tape initially only has a blank followed by the read/write head, ), (this groups together both the new symbol written in the current tape cell, and the direction for the head to move), , , does not start with ␣ , and does not end with ␣ . At each step, a machine with this store can read the symbol under the read/write head, and execute an instruction which corresponds to a standard Turing machine instruction, writing an in the current cell and moving left, right, or staying. The write function is defined by, for all :*
- •
,
- •
**
- •
**
A machine with one such store type is a Turing machine with a one-way read-only input tape, and one read/write store tape. The store starts off empty (a blank followed by the read/write head), and they can extend in both directions as symbols are added to the left and right. They can also shrink in size if everything to the right of the read/write head is a blank, as with the left. This is exactly how configurations of Turing machines change [20]. Furthermore, -reversal-bounded 1-tape Turing stores can be defined by restricting so that the number of alternations between moving right and left on the tape is at most .
For example, consider a deterministic machine with a -reversal-bounded Turing store accepting \{w\w\mid w\in{a,b}^{+}}\Sigma={a,b},\Gamma={a,b,\leavevmode\hbox{\ignorespaces\verb!␣! },\downarrow},F={q_{4}}\delta$ is as follows:*
[TABLE]
Despite being non-context-free, the store language
[TABLE]
which is a regular language.
Define machines with one pushdown for the first tape, and additional reversal-bounded counters, where each word in the store language is of the form , where is a state, is the contents of the pushdown, and are the contents of the counters. Let be the set of machines with one pushdown, and some number of counters where the pushdown is unrestricted, but the counters are reversal-bounded. The family of languages accepted by [1, 25] is of interest since it has a decidable emptiness and membership problem, and only accepts semilinear languages.
Let be the set of queue automata [21]. As with , define machines with one queue for the first tape, and additional counters. Let be the set of machines with one queue, and some number of counters where the counters are reversal-bounded (if the queue is also reversal-bounded, these only accept semilinear languages [21], otherwise they have the same power as Turing machines). Let be the set of stack automata [9, 8]. Also, define machines with one stack for the first tape, and additional counters. Let be the set of machines with one stack, and some number of counters where the counters are reversal-bounded (if the stack is reversal-bounded, this implies that there is also a bound on the number of changes in direction of the read head when it reads inside the stack structure). Let be the set of -flip pushdown machines, for some [7]. Replacing N with D gives each deterministic variant.
3.1 Store Languages of Turing Machines and Other One-Way Automata Models
Store languages have already been investigated for nondeterministic pushdown automata. It has been shown [2, 3] that the store language of each is a regular language. Moreover, the proof contains an effective construction.
Proposition 4
[2, 3]** Given a one-way , is a regular language, and .
First, a general decidability proposition is proved for machine models where the emptiness problem is undecidable.
Proposition 5
Let be a set of machines defined using (potentially multiple) store types, such that the emptiness problem is undecidable for . Then the problem, given and a word , determine whether , is undecidable.
Proof 1
Let be a machine with initial state and initial store contents (which can be the concatenation of multiple initial store contents for multi-store machines). Then is in the store language of if and only if is not empty.
Hence, membership in for is undecidable. \qed
This is true for sets of one-way machines, and also two-way machines investigated later in the paper. And in fact, it even holds for complexity classes, such as deterministic Turing machines with a one-way read-only input tape and a logspace bounded worktape (the store). These have a decidable membership problem but an undecidable emptiness problem. Despite the languages accepted by these machines being recursive (and in ), membership in the store language is undecidable (and so there cannot be an effective construction to accept the store languages with another model, such as any model with a decidable membership problem).
Next, store languages of restricted s will be studied. They will be especially useful for characterizing store languages of other machine models. In particular, s with a one-way read-only input tape and one reversal-bounded read/write worktape are considered. In terms of languages accepted, these machines are powerful enough to simulate a number of different machine models exactly, such as one-way nondeterministic reversal-bounded pushdown automata, reversal-bounded queue automata, reversal-bounded stack automata, and reversal-bounded -flip pushdown automata, where the worktape acts exactly like the other stores.
Next, the store languages of these Turing machines are examined. Although s in general have non-regular store languages (investigated in Section 6), when there is only one worktape, and it is reversal-bounded, the store languages are always regular.
Proposition 6
Let be an with a one-way read-only input tape and a reversal-bounded read/write worktape. Then .
Proof 2
Let make at most reversals on the worktape. Note that , and . Let , and , a new alphabet (each letter is a “primed” version of a letter in , including a primed version of the blank symbol ␣ ). Define a new alphabet whose symbols have “tracks”, with less than or equal to -tracks of the form where is in and , for each , .
An intermediate 2-way is constructed, whose input is in delimited with end-markers and . Thus the input to is , where . The input can be thought of as having less than or equal to tracks.
Intuitively, is trying to verify that the contents of the first track represents a configuration in an accepting computation of , where a symbol is used in place of in the store language. To do this, nondeterministically guesses an input and simulates on , track is verified to be the initial store contents, each track from tracks to is verified to be the store contents at a point of reversal, and track is verified to be a final accepting configuration. All tracks are padded by blank symbols to all be of the same length.
Then operates as follows:
*The first track is verified to contain a word , where , that does not start or end with ␣ * (below, will verify that the word obtained from by replacing with is in ). 2. 2.
* goes to the left end-marker . checks that the second track contains for some (the worktape starts off with only blanks, it is implied that all tracks are of length ).* 3. 3.
* then simulates the on a guessed input , letter-by-letter, but instead of writing, verifies the next track contents is an updated version of the current track at the next point of reversal. Between the initial configuration and the first reversal, between every two reversals, and between the last reversal and the final configuration, checks that the contents of track is the updated contents of the worktape from the worktape on track for . To do this, if track contains , and say is even (the case is similar if is odd), then it is verified that track starts with . Then, if uses a transition that replaces with and moves right on the worktape, then track has next (a sequence of transitions that stays on the same storage cell are remembered in the finite control), and this simulation continues until makes a reversal. When makes a reversal, say from moving right to left, first “marks” the point of reversal by reading a primed symbol in that position of track (storing the read/write head in track ), then it moves to the right end-marker and checks that each symbol in track from the point of reversal to the right end-marker matches the symbols in track (this also implies that track has exactly one symbol from ). then moves left back to the point of reversal (which is retrievable from the primed symbol), and resumes the simulation using the next track from the current track.* 4. 4.
At some nondeterministically guessed reversal of the simulation as described in step 3 (say while scanning track , and track reverses from left to right), while is verifying that track follows from track , in parallel, verifies that the contents of track 1 is a configuration of the Turing machine between these two reversals. To do this, remembers the state on track 1, then compares track to track symbol-by-symbol, until reaching the read/write head in track 1, where the current state of the simulated machine is verified to be and the remaining part of track is verified to be the same as track . Thus, track is a configuration between tracks and . then continues the simulation as in step 3.
Since can only read and not write (on the input), it just verifies the moves and that the changes in the symbols of the on track are reflected in the st track. accepts if accepts and step 4 above has been successful.
It is known that 2-way s accept only regular languages [20]. Then, apply a gsm [20] to extract just the word from the first track, erasing blanks appropriately, and replacing any symbol by . Since regular languages are closed under gsm mappings, the result follows. \qed
As s with a reversal-bounded worktape only give regular store languages, generalizations of these s that still have a decidable emptiness problem are also of interest. In [21], it was shown that such s augmented by reversal-bounded counters have a decidable emptiness problem. Therefore, understanding the store languages of this model is valuable, which is studied next. The proof uses s, which are two-way nondeterministic reversal-bounded multicounter machines, together with a similar technique as in the proof of Proposition 6, ultimately determining that the store languages are accepted by one-way machines.
Proposition 7
Let be an with a one-way read-only input tape, a reversal-bounded read/write worktape, and reversal-bounded counters. Then .
Proof 3
Here, the store consists of the state, read/write tape, and the values of the counters. The proof of Proposition 6 is generalized (using the same alphabets).
Construct an intermediate that is reversal-bounded on the input tape, with reversal-bounded counters.
* will have as input (with end-markers) where has multiple read-only tracks (over the alphabet , just like in Proposition 6), and the first track is that does not start or end with *␣ . 2. 2.
* simulates ’s reversal-bounded read/write worktape on the tracks of the read-only (as in Proposition 6) and using reversal-bounded counters to simulate the reversal-bounded counters of faithfully. However, keeps two copies of each counter, where the two sets of counters are updated synchronously (and are therefore identical during the first part of the simulation).* 3. 3.
At some point, nondeterministically guesses that the contents of track 1, together with counter values encoded in the input is a representation of a configuration between the current track and the next track. Then, as in Proposition 6, matches the symbols in the first track with track until the symbol from in track 1, and if so, stops updating one set of the counters. Then continues by matching track with track . Then the simulation of continues, using the other set of counters and on the remaining tracks (as in Proposition 6). At the end of the simulation, verifies that the non-updated set of counters has the same values as encoded on the input . If this is the case, then is indeed an intermediate store configuration of an accepting computation, and if so, accepts.
Now is a reversal-bounded (on the input) . Hence, can be converted to an equivalent one-way , i.e., (this can be done even for the more general finite-crossing s) [26].
Since is closed under gsm mappings (follows from closure under homomorphism, inverse homomorphism, and intersection with regular languages [1]), construct an that applies a gsm that extracts (and replaces with ) from the first track of and . It follows that is in . \qed
It is possible to accept the store languages of other machine models, such as reversal-bounded with (this does not follow directly from the fact that such Turing machines can simulate the input languages of this model, as store languages rather than input languages are of interest here).
Proposition 8
If be a reversal-bounded , then .
Proof 4
Given with counters, construct an intermediate with an input tape plus one reversal-bounded read/write worktape, and additional reversal-bounded counters, whose resulting store language will be in by Proposition 7. operates as follows: every time enqueues , with being a letter, , writes to the right end of the read/write worktape writing one letter at a time (using new intermediate states) and simulating the counters exactly. Every time dequeues, writes blank characters to the left end of the tape towards the right (thus removing characters from the store of the Turing machine as well). Each time such a reversal occurs (switching between enqueueing and dequeueing), the Turing machine moves its tape head from one end of the tape to the other on new intermediate states. Since the queue is reversal-bounded, the Turing tape is reversal-bounded as well.
The store language of has each word of the form and is in by Proposition 7. From there, will be transformed into by a gsm . Indeed, the read/write head does not appear explicitly in the store language of the queue nor the blank symbol before the read/write head, whereas it does in the Turing machine, but they can be removed by . Furthermore, if enqueues more than one symbol (), then requires moves. Then all intermediate states used by when writing each are not mapped by as they do not have corresponding configurations of . Similarly, the intermediate states that uses when it switches between simulating enqueuing and dequeuing instructions (by moving the tape head to the opposite end) are not mapped by . Since is closed under gsm mappings, the store language of is in . \qed
Note that in the proof of the result above, if there are no counters in , then only a Turing machine with one reversal-bounded read/write worktape is required, whose store language is a regular language by Proposition 6.
Corollary 9
If is a one-way reversal-bounded queue automaton, then .
Next, it will be shown that the same is true for reversal-bounded stack automata augmented by reversal-bounded counters. Recall that stack automata can operate like pushdown automata with additional instructions that can read in the pushdown store in a read-only fashion [8].
Proposition 10
Let be a reversal-bounded or a reversal-bounded . Then .
Proof 5
Let be a reversal-bounded stack automaton with counters. Construct a Turing machine with a one-way input tape, a reversal-bounded worktape, and counters. A stack automaton is very similar to a restricted type of Turing machine with a one-way input tape and a worktape to simulate the stack that only changes values at the right end of the tape, except for the following minor differences: instructions that read from the inside of the stack are simulated by transitions that move but do not change from the inside of the Turing tape, the bottom-of-stack marker can be initially placed on the tape, the top of the stack marker is simulated with a blank, and a stack automaton allows to push multiple symbols in one transition. The latter type can be simulated with new intermediate states that push one symbol at a time. The counters are simulated faithfully. Then , by Proposition 7.
As the intermediate configurations of that are involved in simulating push transitions of more than one symbol are not configurations of , a gsm can be used to not output on those intermediate configurations (similar to the proof of Proposition 8). From the differences described, it is clear that is in . The proof is similar for s. \qed
This immediately implies that every reversal-bounded stack automaton has a regular store language, but this result will be improved later in the paper.
Next, a -flip-pushdown automaton is a pushdown automaton, with the ability to flip its store. This can happen at most times in an accepting computation (see Example 3). Despite the additional ability to flip the store, regularity of the store language is preserved.
Proposition 11
If , is a one-way -flip pushdown automaton, then .
Proof 6
For an with state , let and . That is, is the set of store contents in state that are reachable from the initial configuration, and is the set of store contents in state that can reach an accepting configuration. It is known that for s and all states , both and are regular [2].
Every instruction of a -flip is either a standard instruction or a flip instruction, as defined in Example 3, and at most flip instructions can be applied in every accepting computation. First, note that the store language is the union of the store languages obtained using each final state separately. Since the regular languages are closed under union, assume without loss of generality that only has one final state .
Consider any computation of , not necessarily from an initial configuration nor to an accepting configuration,
[TABLE]
, for using at most flips. From , there is a sequence, denoted by
[TABLE]
such that has flip transitions, and the ’th flip transition applied is from to , for all . Also, if is an accepting computation (starting from an initial configuration and ending in an accepting configuration), let . This is generalized to sets of accepting derivations , as .
Let be the finite set of all sequences , where , and there is some transition of that flips while switching from to , for all . Given any , let be the set of all accepting computations of such that . It is clear that . Thus, it is enough to show that, for each is regular.
Let . Then each word in is either derived from a configuration between the ’th flip and the ’st flip, for , or after the ’th flip (and before the end). For , let be all those store contents between the ’th flip (or the beginning if ) and the transition before the ’st flip (or the end of the computation if ). Again, if each is regular, then is regular. Let . For each from [math] to , let (if , then there are no flip transitions), and let . It will be shown that each is regular. This will be done by building an without flips such that , which then must be regular. This is done inductively on .
Consider the obtained from by keeping all transitions but omitting flip transitions. Then is regular. Hence, is regular as well (since the regular languages are closed under left quotient, concatenation, and reversal. This is exactly the set of store contents that can be derived from those in via a flip transition from to . Then build another that pushes an arbitrary word of , then simulates without flips until . Then , which is again regular. This same procedure proceeds inductively by reversing the regular store language until an can be built such that for each , , which is regular.
Similarly, for each from to , let , and . In a similar fashion, for each , which is again regular. Furthermore, . Hence, is regular, is regular, and is regular. \qed
This is indeed quite a general family to have only regular store languages.
Next, the store languages of s are analyzed. Surprisingly, only deterministic machines in are needed to accept them.
Proposition 12
If is an , then . Thus, .
Proof 7
Let have counters . First, construct an intermediate with counters named to accept . Then , when given an input , checks that is of the form for a state , (this can be done by a in parallel). To check that is in , on transitions that do not read any input, guesses an input to in a letter-by-letter fashion and simulates on using counters and (i.e., are duplicate counters which operate like similar to Proposition 7 step 2). At some point (nondeterministically chosen), stops updating counters and remembers the current state but continues the simulation with counters . When accepts, checks that the value in counter is (from the input), for all , and that . Hence, . The can then be converted to a , since it is known that any accepting a bounded language can be accepted by a [27]. \qed
Although all store languages of the nondeterministic model can be accepted by the deterministic model , next, it will be shown that this is not the case for .
Proposition 13
Let be an which accepts with all counters zero and in a unique accepting state which is never re-entered. Let . Then there is a 0-reversal-bounded and a regular language such that . Then .
Proof 8
Let be an with counters and input alphabet . Represent each transition of by an abstract symbol:
[TABLE]
where and are states, is either in or , represents the status (zero or non-zero) of counter , and is the change in counter . Let be the set of symbols representing the transitions.
The input alphabet of the is . For a string , let be the concatenation of the the input components of the transitions in . On input , writes on the stack while simulating the computation of on using the counters, and accepts in state if accepts . is indeed deterministic since each symbol of implies the transition to apply.
Hence, contains all strings of the form , where is in . Let be the regular language . Then , and . \qed
From this, the following is true:
Proposition 14
There is a 0-reversal-bounded such that cannot be accepted by any .
Proof 9
Suppose otherwise. It is known that there are languages in that are not in [28]. Let be such a language accepted by some . By Proposition 13, there exists that is [math]-reversal-bounded such that . But by the assumption. Also, it is clear that is closed under left quotient with a fixed word as a can simulate first on the fixed word deterministically, then on the input deterministically. Hence, , a contradiction. \qed
Lastly, two results will be stated that are shown below in Section 4.1 and Section 4.2 respectively, which are results on one-way stack automata, but require results on two-way automata for their proofs. The first is already known [10].
Proposition 15
[10]** If is a one-way nondeterministic stack automaton, then .
Proposition 16
There exists with one -reversal-bounded counter over a unary alphabet such that .
The latter result is interesting in the following sense: an combines a stack and reversal-bounded counters. A stack alone yields only regular store languages; but the store languages of are more general, describing some languages that are neither in nor . However, it is seen next that s only yield store languages.
Proposition 17
If , then .
Proof 10
Let be a -counter . Construct a counter machine (give names to the counters, ) to accept that simulates with two identical copies of each counter, and , , on a guessed input. Then, at some nondeterministically guessed spot, verifies that the stack contents are the same as the input by moving the stack head to the left-end-marker while adding one to counter and , then verifies that the stack contents are the same as the input by comparing the stack to the input symbol-by-symbol while decreasing to verify that the read/write head on the input is in the correct location. Then returns its stack read head to the proper location using counter . Then verifies that the counter values match the input values by decreasing each . Finally, continues the simulation on the second set of counters, , accepting if accepts. \qed
3.2 Connections Between Deterministic and Nondeterministic Machines
Thus far, the primary concern has been store languages of nondeterministic machine models. In this section, a connection between deterministic and nondeterministic one-way machines is demonstrated. A store type is said to have stay instructions if there are instructions to keep the store the same (that do not violate the instruction language). All store types considered in this paper are of this form.
Proposition 18
Let be store types with stay instructions, and let be a one-way nondeterministic -machine. One can construct a one-way deterministic -machine acceptor of the same type as such that .
Proof 11
Let be new symbols in bijective correspondence with the transitions of . Then let operate as follows over the input alphabet , with the same state set, initial state, and final state set, and the transition function is as follows: for each transition of , , create a transition of . Also, create transitions that stay from any final state while reading the end-marker. Thus, consider any accepting computation of using a sequence of transitions. Then reading the corresponding sequence labels with (followed by reading the end-marker) is an accepting computation with the store changing identically (thus, it is in the instruction language). Similarly, given any accepting computation of , applying this sequence accepted by as a sequence of transitions of is accepting with the store changing identically. Hence, . Also, is deterministic since the input symbol dictates the transition to apply. \qed
Also, note in Proposition 18 that operates in realtime.
Corollary 19
The following are true: and
This is also true for all one-way nondeterministic and deterministic machine models considered in this paper.
Finally, it is interesting to consider whether store languages of machine models can always be accepted by only deterministic machines of the same type. Indeed, the following are true:
If is an or an , then is regular and hence the deterministic version of the model can accept its own store language. 2. 2.
If is an , then can be accepted by a , hence the deterministic version of the model can accept its own store language.
However, it follows from Proposition 14 that the store languages of s cannot be accepted by s.
4 Machines with Two-Way Read-Only Inputs
Using exactly the same store types as defined in the previous section, two-way input machines can also be defined. Given store types with , two-way inputs have an end-marker on both sides, , and the finite transition relation is from to (with the last component describing the direction of the input head movement), a configuration of is a tuple , where giving the current position on the input (position is , is , and is off the input tape). The derivation relation is defined by: if there exists , is the ’th character of , , for each , . Validity is defined just like with one-way machines. The language accepted by , . The store language of , is equal to .
In the previous section, store languages of different types of machines with a one-way read-only input were studied. The rest of this section will investigate store languages of machine models with two-way inputs.
4.1 Two-Way s and s
This subsection considers store languages of two-way s (s) and two-way s (2s). A machine is finite-crossing if there is a such that in any computation, the input head crosses the boundary between any two adjacent cells of the input no more than times. The first result demonstrates the surprising fact that the store languages of finite-crossing s can always be accepted by machines that are only one-way and deterministic.
Proposition 20
If is a finite-crossing , then .
Proof 12
Given a -counter finite-crossing over , first, construct an intermediate finite-crossing with counters and input of the form , where .
* simulates the computation of on with two sets of counters named and for so that and contain identical values. At some nondeterministically chosen point, stores the input head position in the remaining counter, checks that the input segment corresponds to the simulated state and the value is equal to the value stored in counter , for each . If so, continues the simulation of on the correct position of (which can be recovered) using the counters, and accepts if and only if accepts. It is known that all finite-crossing s can be converted to one-way s [26], and so convert to an and then construct an that erases the [1] ( is closed under homomorphisms and therefore can be erased). Then convert to a as all bounded languages are in [27]. \qed*
Without the finite-crossing condition, this no longer holds.
Proposition 21
There is a non-finite-crossing with one -reversal counter over the bounded language such that .
Proof 13
Construct with one -reversal counter accepting as follows: stores in counter and enters a distinguished state . (Thus, the configuration at this time is .) Then changes state and checks (by decrementing while going back-and-forth on at least twice) if is divisible by , and if so, accepts. Clearly, ’s counter makes only one reversal.
It follows from the construction that if is a multiple of and , then would be a reachable configuration in some accepting computation.
Hence, is composite.
If is in , then is in . This is a contradiction, since the Parikh map of is not semilinear, but it is known that the Parikh map of any language is semilinear [1]. \qed
For nondeterministic machines, only a unary alphabet is needed to obtain a similar result.
Proposition 22
There is a non-finite crossing with one -reversal counter over a unary alphabet such that .
Proof 14
Construct an which first stores in the counter, a nondeterministically chosen number and enters state . Then it changes state and checks that is larger and a multiple of the length of the unary input. As in Proposition 21, is not in . \qed
The next result was already mentioned in Section 3, but the proof appears here since it involves a proof using two-way machines.
Proposition 23
There exists with one -reversal-bounded counter over a unary alphabet such that .
Proof 15
Let be a with one -reversal-bounded counter over a unary language such that , which exists by Proposition 22. Create an with one counter, where copies the input to the stack (using new states), and then simulates on the stack contents and the counter. Assume . Let be a gsm that erases the stack contents (keeping only the state and the counter), and does not map any words starting with any new state before the input is copied. Then since this family is closed under homomorphism, inverse homomorphism, and intersection with regular languages [1], and is therefore closed under gsm mappings, a contradiction. \qed
This subsection is concluded with a result that shows that for a particular two-way model of computation, the store languages can be more complex than the languages accepted.
Proposition 24
**
If is a over a unary input alphabet, then is regular. 2. 2.
There is a with one 1-reversal-bounded counter over a unary input alphabet such that is not semilinear (hence, is not regular).
Proof 16
Part 1 was shown in [29]. Part 2 follows from the language used in the proof of Proposition 22. \qed
Hence, the languages accepted by the machines are all regular, but the store languages are not even semilinear.
4.2 Connections Between One-Way and Two-Way Machines
This subsection establishes some general connections between one-way and two-way machines. First, a straightforward lemma is demonstrated to show that store languages of one-way nondeterministic machines are equivalent to those only accepting the empty word.
Lemma 25
Let be store types, and let be the set of one-way nondeterministic -machines. If , then there exists such that and . Hence, the family .
Proof 17
Construct which, on input, guesses and simulates the computation of on some input symbol-by-symbol. Since the sequence of ways the store can change is the same as in , then must be an -machine (i.e. in the definition of store types, all sequences of store instructions used in in accepting computations are the same for , thereby being in the instruction language), and so . \qed
The above lemma is not true for deterministic machines , since may be infinite, but if only accepts , then for any deterministic machine is always finite.
Next, a connection will be demonstrated between sets of one-way and two-way machines of the same store type. The proposition involves two sets of machines with the same stores, where the first has a one-way input, and the second has a two-way input. For example, if is the class of s with reversal-bounded counters, then is the class of s with reversal-bounded counters. It shows that the store languages for one-way machines are “almost” the same as two-way machines of the same type. The only difference is in the state.
Proposition 26
Let be store types, let be the set of one-way nondeterministic -machines and let be the set of two-way nondeterministic -machines. Then the following are true:
. 2. 2.
For all with finite, there exists with and a homomorphism (that only can change the states) such that .
Proof 18
For item 1, from Lemma 25, . Then, for every machine in the second set, a two-way machine can be constructed (on epsilon input and thus the two-way head never moves off end-markers) with the same store language.
For item 2, let . For each , there exists consisting of all words that can appear on the store in an accepting computation on input . Then .
Construct a machine in as follows: stores in its state a simulated state of , a word , and a position of . In the first move applied, guesses , and simulates on by updating the state, the stored input position, and the stores faithfully. As the sequences of store instructions are identical, and sequences of valid instructions of one machine will have the corresponding sequence in the other machine be valid. Finally, although the stores change identically in accepting computations, the states of are different, as they contain also a word and a position. But those can be transformed via a homomorphism that projects onto the simulated state. Thus, . \qed
Corollary 27
Let be store types, let be the set of all one-way nondeterministic -machines and let be the set of all two-way nondeterministic -machines, and let be a family closed under homomorphism. Then the following are equivalent:
, 2. 2.
, 3. 3.
.
As applications of the above, the following corollaries to the results already shown in Section 3 are obtained:
If is a and is finite, then is regular. 2. 2.
If is a with reversal-bounded read/write tape and is finite, then is regular. 3. 3.
If is a with reversal-bounded read/write tape and reversal-bounded counters and is finite, then is in .
Similar corollaries hold for the other machine models studied in Section 3.
The assumption that is finite in the above Proposition 26 is necessary. Consider , the set of two-way deterministic machines with an unrestricted counter (no reversal-bound).
Proposition 28
There is a which makes two sweeps on the input (left-to-right and then right-to-left, where acceptance is on the left end-marker) and makes only reversals on the counter on input of size such that is non-regular.
Proof 19
Construct which, when given input , operates as follows:
* makes a left-to-right sweep of the input and checks that it is of the form*
[TABLE]
for some . It uses the counter to check that . At the end of this process, the counter is zero. 2. 2.
Then moves its input head left and increments the counter to value and enter a unique state . Thus the configuration of the counter and state at this time is . The state is only entered at this time. 3. 3.
Next, continues moving left checking that and accepts. (This is possible because there are two copies of in each block.)
* is non-regular; otherwise would be regular. Clearly makes reversals on the counter. *\qed
Hence, the store languages of one-way s are regular by Proposition 4, but two-way s are not.
Next, the store language of two-way and one-way nondeterministic stack automata will be addressed. In [10], it was shown that the store language of a one-way stack automaton is regular. Here, an alternative simple proof of this result is provided by using the general connections established between one-way automata and two-way automata in Corollary 27, and an existing older result on two-way stack automata. In [8], it was shown that the set of all words that can appear in the store of a two-way stack automaton on an input (not in general over all words, but over only a single word), when “falls off” the right end-marker of , is a regular language (this was used as a key step to showing all two-way stack languages are recursive). This fact will be combined with the results of this section to show that all store languages of one-way nondeterministic stack automata are regular. Two technical lemmas are required before a proof of the main result (essentially used to convert the notation used in [8] to our notation).
Lemma 29
Let be a two-way nondeterministic stack automaton. Then .
Proof 20
In [8], it is shown that, for each word , and each then is a regular language. Then it is clear that, using the empty word, is regular.
Let be a new two-way nondeterministic stack machine with state set , (primed versions). Then simulates , but at any nondeterministically chosen step, if the simulated is in state , can nondeterministically switch to and move the input head past the right end-marker using a new state . Then which is regular. Let be a homomorphism that maps each to and fixes all other letters. Indeed, . \qed
Lemma 30
Let be a two-way nondeterministic stack automaton. Then .
Proof 21
In a standard proof that shows a one-way nondeterministic stack automaton is closed under reversal, from an automaton , another is constructed that guesses the final stack contents and pushes it while also guessing the position of the read head inside (using new states), guesses a final state of , then simulates “in reverse”; if pushes, pops; if pops, pushes, if moves left in the stack, moves right, etc. The same construction works for two-way nondeterministic stack automata on input.
Hence, from , let be a new two-way nondeterministic stack automaton constructed in this way. It does not ever move its input head, and on a new initial state , nondeterministically guesses a word and puts it on the stack, then on another new state , moves the read head of the stack to an arbitrary position inside (thus guessing ), then nondeterministically switches to any final state of . From there, simulates in reverse. So, if moves right in the stack, then moves left, if moves left, then moves right. If replaces the top of the stack symbol with , then pops down to (using states not in ), then replaces with . If pops , then pushes , etc.
Then, is regular by Lemma 29. Furthermore, is regular (thus omitting configurations reached on any new states is also regular since regular languages are closed under intersection). This set is equal to . Further, this set is equal to , which must therefore be regular. \qed
By intersecting the two regular languages in the previous two lemmas, the following is obtained:
Proposition 31
Let be a two-way nondeterministic stack automaton such that . Then is regular.
Proof 22
From Lemmas 29 and 30, and since regular languages are closed under intersection, . \qed
From this, from Corollary 27, and since the regular languages are closed under homomorphism, the following is obtained:
Corollary 32
If is a two-way nondeterministic stack automaton such that is finite, then .
Corollary 33
If is a one-way nondeterministic stack automaton, then .
Corollary 27 is also useful in other circumstances. For example, if a one-way machine model has store languages in some family that is closed under homomorphism and has a decidable emptiness problem, then the corresponding two-way model has its store language on a fixed word being in . By testing whether this store language is non-empty, this is determining whether is accepted by the two-way machine. Hence, membership is decidable for two-way machines. Therefore, for all one-way models studied here where the store languages are in or , membership in the corresponding two-way models is then decidable.
5 Applications to Right Quotient
There are some nice applications of the results in this paper. For example, it was shown in [5] that it is decidable whether the language accepted by a one-way reversal-bounded pushdown automaton is dense (the set of subwords is equal to ). Furthermore, this problem is also decidable for nondeterministic Turing machines with a one-way read-only input tape and a reversal-bounded worktape [30] (using Proposition 6 proven here). Also, certain applications to problems in the area of verification and model checking are presented in [6]. Another application is addressed here.
A general proof is exhibited whereby it is shown that any deterministic automata class obtained from so-called “readable” store types, where the nondeterministic machines with the same store types only have regular store languages, then is closed under right quotient with regular languages. This is perhaps surprising since right quotient seems to be quite difficult for deterministic machines.
Definition 34
Let be a store type. Define to be readable if the following are true:
- •
* has stay instructions.*
- •
At any point, if the store contains say, it is possible to switch to a configuration where the store can be read one letter at a time, either from left-to-right (like a queue), or right-to-left (like a pushdown).
The first condition is enforcing that it is possible to keep the same store contents. For example, with a pushdown automaton, it is always possible to replace the top of the pushdown with , thereby keeping it the same. One could define a store type which is a pushdown with only push and pop instructions (the size of the stack is not allowed to stay the same), and such a store type would not be readable.
Proposition 35
Let be readable store types. Let be the set of all one-way nondeterministic -machines, and let be the set of all one-way deterministic -machines. If , then is closed under right quotient with regular languages.
Proof 23
Let be a deterministic machine with state set . Let be a . A deterministic machine will be built accepting the right quotient of with .
First, build a new intermediate nondeterministic machine with states with being disjoint, and being primed versions of states in ( described below). It accepts the following language:
[TABLE]
Intuitively, simulates , and at some nondeterministically guessed spot, starts simulating in parallel using a second component simulating in the states. Specifically, at the nondeterministically guessed spot, if it’s in state , it switches to state , then to a state in (requiring the store contents to not change between these configurations, which is possible by the first condition of the readable store type definition), then continues the simulation only using states from (with two components, the second component simulating ). Certainly, is nondeterministic as it needs to guess where to start simulating .
Next, construct the store language . It is regular by the assumption. In fact, only words of that begin with are needed. Consider , and build a accepting this set.
Now build a new deterministic machine that operates as follows. It simulates on the input until it hits the right input end-marker. At that point, say is the contents of the store, and it is in state . First, assume that there is only one store which can be read from left-to-right (the store is readable). Then read in the store language and see if is in the store language deterministically on the store. If using a store that reads from right-to-left, instead use a accepting instead of using . Similarly, if using stores that are all readable (but the store language is still regular), then is constructed to reverse the subwords from stores read from right-to-left. In any of the cases, if accepts , then accepts the input.
Let . Then reading in (upon consuming the last letter) takes it to some configuration . Then , and so is in the store language of , which means that the machine can accept from this configuration. And the fact that primed states are being used to enforce that it is at the right spot of the store language ensures that from that point on, the remaining word is in . Thus, there must be some such that is in and is in .
Conversely, if with , then reading in takes it to some configuration . Then must be in . Hence, by the construction of , .
Hence, is closed under right quotient with regular languages. \qed
In the proof above, if the store languages of machines in can be effectively constructed, then the machines accepting the right quotients can also be effectively constructed.
The following classes are readable, and hence the languages are closed under right quotient with regular languages: deterministic pushdown automata, deterministic one counter automata, deterministic -flip pushdown automata, and deterministic reversal-bounded queue automata.
For deterministic stack automata, checking stack automata, and variants of s, they are not exactly readable, and the proof above does not completely apply, but can be adjusted. With e.g. stack automata, when reaches the end of the input, it could be in read mode; i.e. the store contents could be where . In this case, in order to read the stack contents from right-to-left (similarly with left-to-right) to verify that is in , the position of the read head is lost. (In other words, it is easy to verify that is in , but not .) For deterministic Turing machines, it is possible to mark the position of the read/write head to make it verifiable. For stack automata, a slightly more complicated construction is needed. First make a complete and adjust the stack alphabet to be ordered pairs, where the first component is an element from , and the second component is a state in . Whenever simulates the pushing of a symbol of , pushes this as the first component, and for the second component, pushes the state of obtained from the state in the second component of the previous topmost symbol by reading the stack symbol pushed. Thus, if the stack contains , is a state of , then for all , reading in ends in state . If a pop instruction occurs, then the state of is recoverable from the second component. At the end of the input, if is at the top of the stack, then the state in the second component immediately indicates whether the stack contents is in . If is inside the stack with say on the stack, then simulates starting from , and verifies that from there, reading brings to a final state, thus verifying that its contents are in the store language. (Note that the state sequence was calculated without reading first, and therefore is different than reading ) Hence, it is possible to verify that . Therefore, the proof can be adjusted to work for stack automata and checking stack automata as well.
This implies closure under right quotient with regular languages for several families.
Corollary 36
The following language families are closed under right quotient with regular languages:
- •
deterministic stack languages **[17]**,
- •
deterministic checking stack languages,
- •
deterministic -flip pushdown languages,
- •
deterministic pushdown automata **[19]**,
- •
deterministic one counter automata **[31]**,
- •
deterministic reversal-bounded queue automata,
- •
deterministic one-way read-only input Turing machines with a reversal-bounded worktape.
This does provide an alternate, much shorter and more general proof for stack and pushdown automata. It also resolves an explicitly stated unsolved open problem for -flip pushdown automata [18]. All others are, to our knowledge, also unknown.
It is worth noticing the tight relationship between store languages and quotients. The intuition behind the closures under right quotient of all the families in Corollary 36 is that when the deterministic machines reach the end of their inputs, they can verify that their store contents are in the regular language constructed from the store language of a very similar nondeterministic machine. This same technique can even be true for non-regular store languages. For example, a similar technique could be used to show that is closed under right quotient with . This is because when the reaches the end of its input, it only needs to verify that its store contents are in another language, and the store language of an language is in . So it can do this in parallel with additional counters. However, in [31], a more general technique was used to show that is closed under right quotient with even more general families such as and .
Note as well that not all deterministic families are closed under right quotient with regular languages, as is not [31]. Indeed, the store of a is not necessarily in , so when such a machine reaches the end of its input, there is not any way to verify that its store contents are “good” by using a store language within another machine.
6 Space Lower Bounds for Non-Regular Store Languages of Turing Machines
In this section, the lower bounds will be studied on the space complexity of s and s for the store language not to be regular. Here, () is used to denote a nondeterministic (deterministic) Turing machine with a one-way read-only input and a Turing tape, and () is used to denote a nondeterministic (deterministic) Turing machine with a two-way read-only input and a Turing tape.
A configuration of is a tuple , where is a state, is the input with the input head on the ’th position, and the worktape contains string which includes the read/write head.
Let be any such Turing machine with either a one-way or two-way read-only input and one read/write worktape (i.e., store) tape. The following two notions of being space-bounded are used (see [32]):
is strongly space-bounded if, for any input of length , all computations on (accepting or not) use at most space on the worktape. 2. 2.
is middle space-bounded if, for any input of length that is accepted, all accepting computations on use at most space.
The following known results are needed:
Proposition 37
**
* is the lower bound for accepting non-regular languages by strongly (middle respectively) space-bounded **s and s. **[33, 34]**. * 2. 2.
* is the lower bound for accepting non-regular languages by strongly (middle respectively) space-bounded **s and s. **[33]**. *
In addition to the usual notion of the store language of space-bounded Turing machines, also the strong store language will be considered which is the set of reachable configurations; that is, if is a (, , ), the strong store language of M is there is computation of (accepting or not) on some input of length that enters a configuration with state and on the worktape.
Proposition 38
If is a middle space-bounded and grows slower than , then is regular.
Proof 24
Construct a which, given an input , where is over the input alphabet of , is a state, and is over the worktape alphabet of (assume that the state set and alphabets are distinct) operates as follows:
* simulates on .* 2. 2.
At some point nondeterministically chosen, stops the simulation. Let the state and store contents of (and, hence, also of ) at that time be and . converts to , where is a new symbol. (Thus makes two copies of separated by with marking the position of the read/write head). 3. 3.
* then resumes the simulation of using only the area to the right of in the worktape.* 4. 4.
When accepts, checks that on the input is identical to on the worktape and accepts.
Clearly is also space-bounded, hence is regular by Proposition 37, part 1. Now, the strings in are of the form . A homomorphism deleting is then applied. It follows that the strong store language is regular. \qed
Furthermore, given a Turing machine that is strongly space-bounded, one can build exactly like but with all states final, and is middle space-bounded and . Therefore:
Corollary 39
If is a strongly space-bounded and grows slower than , then is regular.
Next, it will be shown that the bound above is tight.
Proposition 40
There is a strongly space-bounded such that is not regular.
Proof 25
Let . The addition is binary number addition. So, e.g., is in . Construct a which, when given a string , verifies that for some , each starts with , and also verifies that each . To do the latter, uses the worktape to keep a binary counter referring to a bit position of each string . The counter starts at , then it compares the last bit of to , then it increases the counter by , and compares the second last bit of to , etc. It is clear that this counter can grow as the large as the length of the longest . As the counter is in binary, this requires approximately bits of space. When determines that is in , the worktape will have on its worktape in binary; call this string . then transforms to and enters state . Then , which is not regular. Hence is not regular.
Clearly, on input longer than , is approximately , and the worktape is approximately the size of . Thus, is strongly space-bounded. \qed
Hence, the following is immediate:
Corollary 41
There is a middle space-bounded such that is not regular.
Turning now to one-way machines:
Proposition 42
If is a middle space-bounded and grows slower than , then is regular.
Proof 26
The proof is the same as the proof of Proposition 38 using Proposition 37, part 2, and noting that the constructed in that proof would also be one-way if is one-way. \qed
Corollary 43
If is a strongly space-bounded and grows slower than , then is regular.
The next result shows that Proposition 42 is tight.
Proposition 44
There is a strongly space-bounded such that and are not regular.
Proof 27
Let . Construct a strongly space-bounded to accept . when given an input , first reads and stores in binary, say , on the worktape. Then converts to . Next, reads while decrementing the second on the worktape to check that . Finally, converts the worktape to and accepts in state . Clearly, is not regular. Hence, is not regular. Making all states final then gives the same result for . \qed
Corollary 45
There is a middle space-bounded such that is not regular.
7 Conclusions and Future Directions
Store languages are studied in a general fashion, by varying the types of stores used. Certain specific models are studied such as nondeterministic Turing machines with a one-way read-only input tape and a reversal-bounded read/write worktape, and it is shown that all store languages are regular. Similarly, all store languages of -flip pushdown automata are regular. Then it is shown that store languages of one-way nondeterministic, and one-way deterministic machines coincide, when using the same store types. Similarly, these coincide with two-way machines that accept finite languages over the same store types after applying a homomorphism. One application of store languages is presented here. If there is a one-way nondeterministic model with readable store types that only has regular store languages, then the languages accepted by deterministic machines with the same store types are closed under right quotient with regular languages. This resolves several open problems in the literature. This type of result is only possible by studying store languages in the general fashion done here. Lastly, space-bounded Turing machines are studied, and lower bounds are given to have non-regular store languages.
There are many other machine models in the literature that have yet to have their store language studied. The store languages of will be considered in a follow-up paper. Also, the pushdown hierarchy is of interest [35]. We also believe that there are many other applications of store languages, similar to the result on right quotient studied here.
Acknowledgements
We thank the reviewers for their comments that improved the presentation of our results.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] O. Ibarra, Reversal-bounded multicounter machines and their decision problems, Journal of the ACM 25 (1) (1978) 116–133.
- 2[2] J. Autebert, J. Berstel, L. Boasson, Handbook of Formal Languages, Vol. 1, Springer-Verlag, Berlin, 1997, Ch. Context-Free Languages and Pushdown Automata.
- 3[3] S. Greibach, A note on pushdown store automata and regular systems, Proceedings of the American Mathematical Society 18 (1967) 263–268.
- 4[4] J. R. Büchi, The Collected Works of J. Richard Büchi, Springer New York, New York, NY, 1990, Ch. Regular Canonical Systems, pp. 317–337.
- 5[5] J. Eremondi, O. H. Ibarra, I. Mc Quillan, On the density of context-free and counter languages, International Journal of Foundations of Computer Science 29 (2) (2018) 233–250.
- 6[6] O. H. Ibarra, I. Mc Quillan, On store languages and applications, submitted.
- 7[7] M. Holzer, M. Kutrib, Flip-pushdown automata: Nondeterminism is better than determinism, in: Z. Ésik, Z. Fülöp (Eds.), Developments in Language Theory, Vol. 2710 of Lecture Notes in Computer Science, 2003, pp. 361–372.
- 8[8] S. Ginsburg, S. Greibach, M. Harrison, Stack automata and compiling, Journal of the ACM 14 (1) (1967) 172–201.
