notesonly.in

One notebook for every subject — open it anywhere.

Log in

Pushdown automata

Theory of Computation · Engineering

Study notes

PDA for a^n b^n: start state; on each 'a' push A onto stack; on first 'b' switch mode and pop one A per 'b'. Input 'aabb': push,push,pop,pop, stack empty at end: accept. Input 'aab': stack has one A left: reject. The stack counts arbitrarily high: infinite memory in one dimension.

← Back to topics for Engineering