What is a Queue Automaton?

Data Structure AlgorithmsComputer ScienceComputers

<p>A queue automaton is like a push-down automaton (PDA) except that the stack is replaced by a queue.</p><ul class="list"><li><p>A queue is a tape allowing symbols to be written only on the left-hand end and read only at the right-hand end.</p></li><li><p>Each write operation (we&rsquo;ll call it a push) adds a symbol to the left-hand end of the queue and each read operation (we&rsquo;ll call it a pull) reads and removes a symbol at the right-hand end.</p></li><li><p>As with a PDA, the input is placed on a separate read-only input tape, and the head on the input tape can move only from left to right.</p></li><li><p>The input tape contains a cell with a blank symbol following the input, so that the end of the input can be detected.</p></li><li><p>A queue automaton accepts its input by entering a special accept state at any time.</p></li></ul><h2>Formal Definition</h2><p>A deterministic queue automaton (DQA) is defined as a seven tuple</p><pre class="result notranslate">(Q, &Sigma;, &Gamma;, &delta;, q0 , &perp;, F)</pre><p>Where,</p><ul class="list"><li><p>Q is a set of states,</p></li><li><p>&Sigma; is an input alphabet,</p></li><li><p>&Gamma; is a finite set of queue symbols,</p></li><li><p>q0 is a starting state,</p></li><li><p>&perp; is an empty queue symbol &perp;6= &Gamma;,</p></li><li><p>The transition function &delta; is defined by Q &times; &Sigma; &cup; {&lambda;} &times; (&Gamma; &times; &Gamma;) &cup; ({&perp;} &times; {&perp;}) &rarr; Q &times; &Gamma; &cup; {&lambda;} &times; {keep, remove}, where &lambda; signifies empty symbol. It must never be used as an input symbol.</p></li><li><p>F is a set of accepting states (F &sube; Q).</p></li></ul><h2>Example</h2><p>Construct queue automata for language {a<sup>n</sup>b<sup>n</sup> | n &gt;= 0}.</p><p>For the given language the number of states present in the automata are 4,</p><p>Q={q0,q1,q2,q3},</p><p>Input alphabet ={a,b}</p><p>The queue automata is as follows &minus;</p><p><img src="https://www.tutorialspoint.com/assets/questions/media/53248/Queue.jpg" class="fr-fic fr-dib" width="322" height="225"></p>
Updated on 15-Jun-2021 12:17:12