Pushdown Automata (PDA) are the finite automata (FAs), but with the ability to push and pop symbols to/from a stack.
PDA accepts strings if there is a legal path from start state to acceptance state for input. Otherwise, the string is rejected.
A PDA can be represented by a 7-tuple
(Q, ∑, ℾ, q0, ha, ∆,δ)
Where
The PDA is to finite subsets of Q ☓ (ℾ ∪ {∆})*.
The context free grammar (CFG) is as follows −
S -> (S) | SS | ε
Each (is pushed, each) causes an (to be popped). This is shown below