A queue machine, queue automaton, or pullup automaton (PUA) is a finite state machine with the ability to store and retrieve data from an infinite-memory queue. It is a model of computation equivalent to a Turing machine, and therefore it can process the same class of formal languages.
A queue machine can be defined as a six-tuple
M=(Q,\Sigma,\Gamma,\$,s,\delta)
Q
\Sigma\subset\Gamma
\Gamma
\$\in\Gamma\setminus\Sigma
s\inQ
\delta:Q x \Gamma → Q x \Gamma*
A machine configuration is an ordered pair of its state and queue contents
(q,\gamma)\inQ x \Gamma*
\Gamma*
\Gamma
x
(s,x\$)
1 | |
→ | |
M |
(p,A\alpha)
1 | |
→ | |
M |
(q,\alpha\gamma)
where
A
\alpha
\alpha\in\Gamma*
(q,\gamma)=\delta(p,A)
The machine accepts a string
x\in\Sigma*
\epsilon
*(q,\epsilon). | |
(s,x\$) → | |
M |
We can prove that a queue machine is equivalent to a Turing machine by showing that a queue machine can simulate a Turing machine and vice versa.
A Turing machine can be simulated by a queue machine that keeps a copy of the Turing machine's contents in its queue at all times, with two special markers: one for the Turing machine's head position, and one for the end of the tape; its transitions simulate those of the Turing machine by running through the whole queue, popping off each of its symbols and re-enqueing either the popped symbol, or, near the head position, the equivalent of the Turing machine transition's effect.
A queue machine can be simulated by a Turing machine, but more easily by a multi-tape Turing machine, which is known to be equivalent to a normal single-tape machine.The simulating queue machine reads input on one tape and stores the queue on the second, with pushes and pops defined by simple transitions to the beginning and end symbols of the tape.[2] A formal proof of this is often an exercise in theoretical computer science courses.
Queue machines offer a simple model on which to base computer architectures,[3] [4] programming languages, or algorithms.[5] [6]
. Dexter Kozen. David Gries, Fred B. Schneider . Automata and Computability . limited . 1951 . hardcover . 1 . Undergraduate Texts in Computer Science . 1997 . Springer-Verlag . New York . 978-0-387-94907-9 . 368–370.