Finite Automata with Stack Memory for context-free Languages
A Pushdown Automaton (PDA) is a finite automaton equipped with a stack (LIFO memory). PDAs are more powerful than finite automata and can recognize context-free languages, which include nested structures like balanced parentheses, palindromes, and programming language constructs.
Interactive simulation of a PDA that accepts L = @{a^n b^n | n ≥ 1@}
PDA transitions for L = @{a^n b^n | n ≥ 1@}
| State | Input | Stack Top | Next State | Stack operation |
|---|---|---|---|---|
| q₀ | a | Z₀ | q₁ | Push A |
| q₁ | a | A | q₁ | Push A |
| q₁ | b | A | q₂ | Pop A |
| q₂ | b | A | q₂ | Pop A |
| q₂ | ε | Z₀ | q₃ | - |
Test strings with the PDA for L = @{a^n b^n | n ≥ 1@}