Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Nested stack automaton

In automata theory, a nested stack automaton is a type of finite automaton that uses a stack which can contain other stacks, allowing recursive nesting to arbitrary depth. Unlike a simple stack automaton, it can create, manipulate, and destroy stacks within stacks but always works on the innermost stack. This capability enables it to recognize indexed languages, with one-way nondeterministic nested stack automata exactly characterizing this language class. It is important not to confuse nested stack automata with embedded pushdown automata, which are less powerful computationally.

Related Image Collections Add Image
We don't have any YouTube videos related to Nested stack automaton yet.
We don't have any PDF documents related to Nested stack automaton yet.
We don't have any Books related to Nested stack automaton yet.
We don't have any archived web articles related to Nested stack automaton yet.

Formal definition

Automaton

A (nondeterministic two-way) nested stack automaton is a tuple ⟨Q,Σ,Γ,δ,q0,Z0,F,[,],]⟩ where

  • Q, Σ, and Γ is a nonempty finite set of states, input symbols, and stack symbols, respectively,
  • [, ], and ] are distinct special symbols not contained in Σ ∪ Γ,
    • [ is used as left endmarker for both the input string and a (sub)stack string,
    • ] is used as right endmarker for these strings,
    • ] is used as the final endmarker of the string denoting the whole stack.5
  • An extended input alphabet is defined by Σ' = Σ ∪ {[,]}, an extended stack alphabet by Γ' = Γ ∪ {]}, and the set of input move directions by D = {-1,0,+1}.
  • δ, the finite control, is a mapping from Q × Σ' × (Γ' ∪ [Γ' ∪ {], []}) into finite subsets of Q × D × ([Γ*D), such that δ maps6
     Q × Σ' × [Γinto subsets of Q × D × [Γ*(pushdown mode),
Q × Σ' × Γ'into subsets of Q × D × D(reading mode),
Q × Σ' × [Γ'into subsets of Q × D × {+1}(reading mode),
Q × Σ' × {]}into subsets of Q × D × {-1}(reading mode),
Q × Σ' × (Γ' ∪ [Γ')into subsets of Q × D × [Γ*](stack creation mode), and
Q × Σ' × {[]}into subsets of Q × D × {ε},(stack destruction mode),
Informally, the top symbol of a (sub)stack together with its preceding left endmarker "[" is viewed as a single symbol;7 then δ reads
  • the current state,
  • the current input symbol, and
  • the current stack symbol,
and outputs
  • the next state,
  • the direction in which to move on the input, and
  • the direction in which to move on the stack, or the string of symbols to replace the topmost stack symbol.
  • q0 ∈ Q is the initial state,
  • Z0 ∈ Γ is the initial stack symbol,
  • FQ is the set of final states.

Configuration

A configuration, or instantaneous description of such an automaton consists in a triple ⟨ q, [a1a2...ai...an-1], [Z1X2...Xj...Xm-1] ⟩, where

  • qQ is the current state,
  • [a1a2...ai...an-1] is the input string; for convenience, a0 = [ and an = ] is defined8 The current position in the input, viz. i with 0 ≤ in, is marked by underlining the respective symbol.
  • [Z1X2...Xj...Xm-1] is the stack, including substacks; for convenience, X1 = [Z1 9 and Xm = ] is defined. The current position in the stack, viz. j with 1 ≤ jm, is marked by underlining the respective symbol.

Example

An example run (input string not shown):

ActionStepStack
1:      [ab[k][p]c] 
create substack      2:[ab[k][p[rs]]c]
pop3:[ab[k][p[s]]c] 
pop4:[ab[k][p[]]c] 
destroy substack5:[ab[k][p]c] 
move down6:[ab[k][p]c] 
move up7:[ab[k][p]c] 
move up8:[ab[k][p]c] 
push9:[ab[k][nop]c] 

Properties

When automata are allowed to re-read their input ("two-way automata"), nested stacks do not result in additional language recognition capabilities, compared to plain stacks.10

Gilman and Shapiro used nested stack automata to solve the word problem in virtually free groups, similarly to the Muller–Schupp theorem.11

Notes

References

  1. Aho, Alfred V. (July 1969). "Nested Stack Automata". Journal of the ACM. 16 (3): 383–406. doi:10.1145/321526.321529. S2CID 685569. /wiki/Alfred_Aho

  2. Partee, Barbara; Alice ter Meulen; Robert E. Wall (1990). Mathematical Methods in Linguistics. Kluwer Academic Publishers. pp. 536–542. ISBN 978-90-277-2245-4. 978-90-277-2245-4

  3. Aho, Alfred V. (July 1969). "Nested Stack Automata". Journal of the ACM. 16 (3): 383–406. doi:10.1145/321526.321529. S2CID 685569. /wiki/Alfred_Aho

  4. John E. Hopcroft, Jeffrey D. Ullman (1979). Introduction to Automata Theory, Languages, and Computation. Addison-Wesley. ISBN 0-201-02988-X. Here:p.390 0-201-02988-X

  5. Aho originally used "$", "¢", and "#" instead of "[", "]", and "]", respectively. See Aho (1969), p.385 top.

  6. Juxataposition denotes string (set) concatenation, and has a higher binding priority than set union ∪. For example, [Γ' denotes the set of all length-2 strings starting with "[" and ending with a symbol from Γ'. /wiki/String_concatenation#Concatenation_of_sets_of_strings

  7. Aho (1969), p.385 top

  8. Aho originally used the left and right stack marker, viz. $ and ¢, as right and left input marker, respectively.

  9. The top symbol of a (sub)stack together with its preceding left endmarker "[" is viewed as a single symbol.

  10. Beeri, C. (June 1975). "Two-way nested stack automata are equivalent to two-way stack automata". Journal of Computer and System Sciences. 10 (3): 317–339. doi:10.1016/s0022-0000(75)80004-3. https://doi.org/10.1016%2Fs0022-0000%2875%2980004-3

  11. Shapiro, Robert Gilman Michael (4 December 1998). On groups whose word problem is solved by a nested stack automaton (Technical report). arXiv:math/9812028. CiteSeerX 10.1.1.236.2029. S2CID 12716492. /wiki/ArXiv_(identifier)