PUSH DOWN AUTOMATION:
A pushdown automaton is a way to implement a context-free grammar in a similar way we design DFA for a regular grammar. A DFA can remember a finite amount of information, but a PDA can remember an infinite amount of information.
Basically a pushdown automaton is −
“Finite state machine” + “a stack”
A pushdown automaton has three components −
- an input tape,
- a control unit, and
- a stack with infinite size.
The stack head scans the top symbol of the stack.
A stack does two operations −
- Push − a new symbol is added at the top.
- Pop − the top symbol is read and removed.
We use standard formal language notation: denotes the set of strings over alphabet
and
denotes the empty string.
A PDA is formally defined as a 7-tuple:
where
-
is a finite set of states
-
is a finite set which is called the input alphabet
-
is a finite set which is called the stack alphabet
-
is a finite subset of
, the transition relation.
-
is the start state
-
is the initial stack symbol
-
is the set of accepting states
An element is a transition of
. It has the intended meaning that
, in state
, on the input
and with
as topmost stack symbol, may read
, change the state to
, pop
, replacing it by pushing
. The
component of the transition relation is used to formalize that the PDA can either read a letter from the input, or proceed leaving the input untouched.