Library

QA · Recursively enumerable

aⁿbⁿcⁿ with a queue

Each a joins the queue as A. Each b takes an A from the front and sends a B to the back; each c takes a B. The queue processes the counts in the order they arrive, which is exactly what aⁿbⁿcⁿ needs and what a stack gets backwards.

asbscs
The machine as drawn — 3 states, 5 transitions.

The author’s examples, run

ε → acceptabc → acceptaabbcc → acceptaaaabbbbcccc → accepta → rejectbbc → rejectbabbcc → rejectbaaabbbbcccc → reject