We already know about Finite Automata which can be used to accept regular languages and Pushdown Automata that can be used to recognize Context Free Languages.

Queue Automata(QDA) is a non-deterministic automata that is similar to Pushdown Automata but has a queue instead of a stack which helps Queue automata to recognize languages beyond Context Free Languages.

A QDA is a 6 – tuple

Where

**Q**is the set of finite states.- is the set of finite input alphabets.
- is the set of finite queue alphabets.
- .
- is the start state.
**F**Q is the set of accept states.

**Acceptance of a string**

A QDA accepts input if can be written as , where each and there are states and strings exist, such that they satisfy the following conditions:

- and .
- For and and and

**Example:**

Define the queue automata for language

**Solution:**

Q = {q0, q1, q2, q3} and ={a, b} and = {a, b, $}

And the transition functions are given by:

Let us see how this automata works for aabb.

Row | State | Input | Transition function | Queue(Input from left) | State after move |
---|---|---|---|---|---|

1 | q0 | aabb |
δ(q0, a, ε)={(q0, a)} | a | q0 |

2 | q0 | aabb |
δ(q0, a, ε)={(q0, a)} | aa | q0 |

3 | q0 | ε | δ(q0, ε, ε)={(q1, $)} | $aa | q1 |

4 | q1 | ε | δ(q1, ε, a)={(q2, ε)} | $a | q2 |

5 | q2 | ε | δ(q2, ε, a)={(q2, a)} | a$ | q2 |

6 | q2 | aabb |
δ(q2, b, $)={(q1, $)} | $a | q1 |

7 | q1 | ε | δ(q1, ε, a)={(q2, ε)} | $ | q2 |

8 | q2 | aabb |
δ(q2, b, $)={(q1, $)} | $ | q1 |

9 | q1 | ε | δ(q1, ε, $)={(q3, $)} | $ | q3 |

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready.

## Recommended Posts:

- Introduction of Finite Automata
- Designing Finite Automata from Regular Expression (Set 1)
- Introduction of Pushdown Automata
- Construct Pushdown Automata for given languages
- Introduction of Theory of Computation
- Generating regular expression from Finite Automata
- Pushdown Automata Acceptance by Final State
- Designing Non-Deterministic Finite Automata (Set 3)
- Construct Pushdown Automata for all length palindrome
- Practice problems on finite automata
- Practice problems on finite automata | Set 2
- Designing Deterministic Finite Automata (Set 1)
- Designing Deterministic Finite Automata (Set 2)
- Construct Pushdown automata for L = {0
^{n}1^{m}2^{m}3^{n}| m,n ≥ 0} - Construct Pushdown automata for L = {a
^{(2*m)}c^{(4*n)}d^{n}b^{m}| m,n ≥ 0} - Construct Pushdown automata for L = {0
^{n}1^{m}2^{(n+m)}| m,n ≥ 0} - Designing Finite Automata from Regular Expression (Set 6)
- Finite Automata with Output (Set 6)
- Finite Automata with Output (Set 5)
- Applications of various Automata

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.