You are on page 1of 24

UNIT-4

PUSHDOWN AUTOMATA
o Pushdown automata is a way to implement a CFG in the same 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.
o Pushdown automata is simply an NFA augmented with an "external stack
memory". The addition of stack is used to provide a last-in-first-out memory
management capability to Pushdown automata. Pushdown automata can
store an unbounded amount of information on the stack. It can access a
limited amount of information on the stack. A PDA can push an element onto
the top of the stack and pop off an element from the top of the stack. To read
an element into the stack, the top elements must be popped off and are lost.
o A PDA is more powerful than FA. Any language which can be acceptable by FA
can also be acceptable by PDA. PDA also accepts a class of language which
even cannot be accepted by FA. Thus PDA is much more superior to FA.

PDA Components:
Input tape: The input tape is divided in many cells or symbols. The input head is
read-only and may only move from left to right, one symbol at a time.
Finite control: The finite control has some pointer which points the current symbol
which is to be read.

Stack: The stack is a structure in which we can push and remove the items from one
end only. It has an infinite size. In PDA, the stack is used to store the items
temporarily.

Formal definition of PDA:


The PDA can be defined as a collection of 7 components:

Q: the finite set of states

∑: the input set

Γ: a stack symbol which can be pushed and popped from the stack

q0: the initial state

Z: a start symbol which is in Γ.

F: a set of final states

δ: mapping function which is used for moving from current state to next state.

Instantaneous Description (ID)


ID is an informal notation of how a PDA computes an input string and make a decision that
string is accepted or rejected.

An instantaneous description is a triple (q, w, α) where:

q describes the current state.

w describes the remaining input.

α describes the stack contents, top at the left.

Turnstile Notation:
⊢ sign describes the turnstile notation and represents one move.

⊢* sign describes a sequence of moves.


For example,

(p, b, T) ⊢ (q, w, α)

In the above example, while taking a transition from state p to q, the input symbol 'b'
is consumed, and the top of the stack 'T' is represented by a new string α.

Example 1:
Design a PDA for accepting a language {a nb2n | n>=1}.

Solution: In this language, n number of a's should be followed by 2n number of b's.


Hence, we will apply a very simple logic, and that is if we read single 'a', we will push
two a's onto the stack. As soon as we read 'b' then for every single 'b' only one 'a'
should get popped from the stack.

The ID can be constructed as follows:

1. δ(q0, a, Z) = (q0, aaZ)


2. δ(q0, a, a) = (q0, aaa)

Now when we read b, we will change the state from q0 to q1 and start popping
corresponding 'a'. Hence,

1. δ(q0, b, a) = (q1, ε)

Thus this process of popping 'b' will be repeated unless all the symbols are read.
Note that popping action occurs in state q1 only.

1. δ(q1, b, a) = (q1, ε)

After reading all b's, all the corresponding a's should get popped. Hence when we
read ε as input symbol then there should be nothing in the stack. Hence the move
will be:

1. δ(q1, ε, Z) = (q2, ε)

Where

PDA = ({q0, q1, q2}, {a, b}, {a, Z}, δ, q0, Z, {q2})

We can summarize the ID as:

1. δ(q0, a, Z) = (q0, aaZ)


2. δ(q0, a, a) = (q0, aaa)
3. δ(q0, b, a) = (q1, ε)
4. δ(q1, b, a) = (q1, ε)
5. δ(q1, ε, Z) = (q2, ε)

Now we will simulate this PDA for the input string "aaabbbbbb".

1. δ(q0, aaabbbbbb, Z) ⊢ δ(q0, aabbbbbb, aaZ)


2. ⊢ δ(q0, abbbbbb, aaaaZ)
3. ⊢ δ(q0, bbbbbb, aaaaaaZ)
4. ⊢ δ(q1, bbbbb, aaaaaZ)
5. ⊢ δ(q1, bbbb, aaaaZ)
6. ⊢ δ(q1, bbb, aaaZ)
7. ⊢ δ(q1, bb, aaZ)
8. ⊢ δ(q1, b, aZ)
9. ⊢ δ(q1, ε, Z)
10. ⊢ δ(q2, ε)
11. ACCEPT

Example 2:
Design a PDA for accepting a language {0n1m0n | m, n>=1}.

Solution: In this PDA, n number of 0's are followed by any number of 1's followed n
number of 0's. Hence the logic for design of such PDA will be as follows:

Push all 0's onto the stack on encountering first 0's. Then if we read 1, just do
nothing. Then read 0, and on each read of 0, pop one 0 from the stack.

For instance:
This scenario can be written in the ID form as:

1. δ(q0, 0, Z) = δ(q0, 0Z)


2. δ(q0, 0, 0) = δ(q0, 00)
3. δ(q0, 1, 0) = δ(q1, 0)
4. δ(q0, 1, 0) = δ(q1, 0)
5. δ(q1, 0, 0) = δ(q1, ε)
6. δ(q0, ε, Z) = δ(q2, Z) (ACCEPT state)

Now we will simulate this PDA for the input string "0011100".

1. δ(q0, 0011100, Z) ⊢ δ(q0, 011100, 0Z)


2. ⊢ δ(q0, 11100, 00Z)
3. ⊢ δ(q0, 1100, 00Z)
4. ⊢ δ(q1, 100, 00Z)
5. ⊢ δ(q1, 00, 00Z)
6. ⊢ δ(q1, 0, 0Z)
7. ⊢ δ(q1, ε, Z)
8. ⊢ δ(q2, Z)
9. ACCEPT
PUSHDOWN AUTOMATA DEFINITION
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.

A PDA may or may not read an input symbol, but it has to read
the top of the stack in every transition.

A PDA can be formally described as a 7-tuple (Q, ∑, S, δ, q 0, I, F)



 Q is the finite number of states
 ∑ is input alphabet
 S is stack symbols
 δ is the transition function: Q × (∑ ∪ {ε}) × S × Q × S*
 q0 is the initial state (q0 ∈ Q)
 I is the initial stack top symbol (I ∈ S)
 F is a set of accepting states (F ∈ Q)

The following diagram shows a transition in a PDA from a state


q1 to state q2, labeled as a,b → c −

This means at state q1, if we encounter an input string ‘a’ and top
symbol of the stack is ‘b’, then we pop ‘b’, push ‘c’ on top of the
stack and move to state q2.

Terminologies Related to PDA


Instantaneous Description

The instantaneous description (ID) of a PDA is represented by a


triplet (q, w, s) where

 q is the state
 w is unconsumed input
 s is the stack contents

Turnstile Notation

The "turnstile" notation is used for connecting pairs of ID's that


represent one or many moves of a PDA. The process of transition
is denoted by the turnstile symbol "⊢".
Consider a PDA (Q, ∑, S, δ, q0, I, F). A transition can be
mathematically represented by the following turnstile notation −

(p, aw, Tβ) ⊢ (q, w, αb)

This implies that while taking a transition from state p to state q,


the input symbol ‘a’ is consumed, and the top of the stack ‘T’ is
replaced by a new string ‘α’.

Note − If we want zero or more moves of a PDA, we have to use


the symbol (⊢*) for it.

PUSHDOWN AUTOMATA MODEL

A push down automata (PDA) is a way to implement a context free grammar


(CFG) in a similar way to design the deterministic finite automata (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 PDA is as follows −

"Finite state machine+ a stack"

PDA has three components, which are as follows −

 An input tape.
 A control unit.
 A stack with infinite size.

A PDA may or may not read input symbols, but it has to read the top of the
stack in every transaction.
A PDA can be formally described as 7-tuples

(Q, ∑,S, δ,q0,I,F)

 Q is a finite number of states.


 ∑ is the input alphabet.
 S is a stack symbol.
 δ is the transition function: QX(∑U{e})XSXQ
 q0 is the initial state (q0 belongs to Q).
 I is the initial state top symbol.
 F is a set of accepting states (F belongs to Q).

The diagram shows a transition in PDA from a state q1 to state q2 labeled as


a,b->c

At state q1, if an input string 'a' is encountered and the top symbol of stack
is 'b' then we pop 'b', push 'c' on top of the stack and move to state q2.
Instantaneous Description (ID)
ID is an informal notation of how a PDA computes an input string and make a
decision that string is accepted or rejected.

An instantaneous description is a triple (q, w, α) where:

q describes the current state.

w describes the remaining input.

α describes the stack contents, top at the left.

Turnstile Notation:
⊢ sign describes the turnstile notation and represents one move.

⊢* sign describes a sequence of moves.

For example,

(p, b, T) ⊢ (q, w, α)

In the above example, while taking a transition from state p to q, the input symbol 'b'
is consumed, and the top of the stack 'T' is represented by a new string α.

Example 1:
Design a PDA for accepting a language {a nb2n | n>=1}.

Solution: In this language, n number of a's should be followed by 2n number of b's.


Hence, we will apply a very simple logic, and that is if we read single 'a', we will push
two a's onto the stack. As soon as we read 'b' then for every single 'b' only one 'a'
should get popped from the stack.

The ID can be constructed as follows:

1. δ(q0, a, Z) = (q0, aaZ)


2. δ(q0, a, a) = (q0, aaa)

Now when we read b, we will change the state from q0 to q1 and start popping
corresponding 'a'. Hence,
1. δ(q0, b, a) = (q1, ε)

Thus this process of popping 'b' will be repeated unless all the symbols are read.
Note that popping action occurs in state q1 only.

1. δ(q1, b, a) = (q1, ε)

After reading all b's, all the corresponding a's should get popped. Hence when we
read ε as input symbol then there should be nothing in the stack. Hence the move
will be:

1. δ(q1, ε, Z) = (q2, ε)

Where

PDA = ({q0, q1, q2}, {a, b}, {a, Z}, δ, q0, Z, {q2})

We can summarize the ID as:

1. δ(q0, a, Z) = (q0, aaZ)


2. δ(q0, a, a) = (q0, aaa)
3. δ(q0, b, a) = (q1, ε)
4. δ(q1, b, a) = (q1, ε)
5. δ(q1, ε, Z) = (q2, ε)

Now we will simulate this PDA for the input string "aaabbbbbb".

1. δ(q0, aaabbbbbb, Z) ⊢ δ(q0, aabbbbbb, aaZ)


2. ⊢ δ(q0, abbbbbb, aaaaZ)
3. ⊢ δ(q0, bbbbbb, aaaaaaZ)
4. ⊢ δ(q1, bbbbb, aaaaaZ)
5. ⊢ δ(q1, bbbb, aaaaZ)
6. ⊢ δ(q1, bbb, aaaZ)
7. ⊢ δ(q1, bb, aaZ)
8. ⊢ δ(q1, b, aZ)
9. ⊢ δ(q1, ε, Z)
10. ⊢ δ(q2, ε)
11. ACCEPT
Example 2:
Design a PDA for accepting a language {0n1m0n | m, n>=1}.

Solution: In this PDA, n number of 0's are followed by any number of 1's followed n
number of 0's. Hence the logic for design of such PDA will be as follows:

Push all 0's onto the stack on encountering first 0's. Then if we read 1, just do
nothing. Then read 0, and on each read of 0, pop one 0 from the stack.

For instance:

This scenario can be written in the ID form as:

1. δ(q0, 0, Z) = δ(q0, 0Z)


2. δ(q0, 0, 0) = δ(q0, 00)
3. δ(q0, 1, 0) = δ(q1, 0)
4. δ(q0, 1, 0) = δ(q1, 0)
5. δ(q1, 0, 0) = δ(q1, ε)
6. δ(q0, ε, Z) = δ(q2, Z) (ACCEPT state)

Now we will simulate this PDA for the input string "0011100".
1. δ(q0, 0011100, Z) ⊢ δ(q0, 011100, 0Z)
2. ⊢ δ(q0, 11100, 00Z)
3. ⊢ δ(q0, 1100, 00Z)
4. ⊢ δ(q1, 100, 00Z)
5. ⊢ δ(q1, 00, 00Z)
6. ⊢ δ(q1, 0, 0Z)
7. ⊢ δ(q1, ε, Z)
8. ⊢ δ(q2, Z)
9. ACCEPT

ACCEPTANCE OF PUSHDOWN AUTOMATA

There are two different ways to define PDA acceptability.

Final State Acceptability

In final state acceptability, a PDA accepts a string when, after


reading the entire string, the PDA is in a final state. From the
starting state, we can make moves that end up in a final state
with any stack values. The stack values are irrelevant as long as
we end up in a final state.

For a PDA (Q, ∑, S, δ, q0, I, F), the language accepted by the set
of final states F is −
L(PDA) = {w | (q0, w, I) ⊢* (q, ε, x), q ∈ F}
for any input stack string x.
Empty Stack Acceptability

Here a PDA accepts a string when, after reading the entire string,
the PDA has emptied its stack.

For a PDA (Q, ∑, S, δ, q0, I, F), the language accepted by the


empty stack is −
L(PDA) = {w | (q0, w, I) ⊢* (q, ε, ε), q ∈ Q}
Example
Construct a PDA that accepts L = {0n 1n | n ≥ 0}
Solution

This language accepts L = {ε, 01, 0011,


000111, ............................. }

Here, in this example, the number of ‘a’ and ‘b’ have to be same.
 Initially we put a special symbol ‘$’ into the empty stack.
 Then at state q2, if we encounter input 0 and top is Null, we
push 0 into stack. This may iterate. And if we encounter
input 1 and top is 0, we pop this 0.
 Then at state q3, if we encounter input 1 and top is 0, we
pop this 0. This may also iterate. And if we encounter input
1 and top is 0, we pop the top element.
 If the special symbol ‘$’ is encountered at top of the stack, it
is popped out and it finally goes to the accepting state q4.
Example
Construct a PDA that accepts L = { wwR | w = (a+b)* }
Solution

Initially we put a special symbol ‘$’ into the empty stack. At


state q2, the w is being read. In state q3, each 0 or 1 is popped
when it matches the input. If any other input is given, the PDA
will go to a dead state. When we reach that special symbol ‘$’, we
go to the accepting state q4.
DESIGN OF PUSHDOWN AUTOMATA

A push down automata is similar to deterministic finite automata except that it has a
few more properties than a DFA.The data structure used for implementing a PDA is
stack. A PDA has an output associated with every input. All the inputs are either
pushed into a stack or just ignored. User can perform the basic push and pop
operations on the stack which is use for PDA. One of the problems associated with
DFAs was that could not make a count of number of characters which were given
input to the machine. This problem is avoided by PDA as it uses a stack which
provides us this facility also.
A Pushdown Automata (PDA) can be defined as –
M = (Q, Σ, Γ, δ, q0, Ζ, F) where
 Q 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 Q X ( Σ ∪ {ε} X Γ X Q X Γ*) the transition relation.
 q0 ∈ Q is the start state
 Ζ ∈ Γ is the initial stack symbol
 F ⊆ Q is the set of accepting states
Representation of State Transition –

Representation of Push in a PDA –


Representation of Pop in a PDA –

Representation of Ignore in a PDA –


Q) Construct a PDA for language L = {0 n1m2m3n | n>=1, m>=1}
Approach used in this PDA –
First 0’s are pushed into stack. Then 1’s are pushed into stack.
Then for every 2 as input a 1 is popped out of stack. If some 2’s are still left and top
of stack is a 0 then string is not accepted by the PDA. Thereafter if 2’s are finished
and top of stack is a 0 then for every 3 as input equal number of 0’s are popped out
of stack. If string is finished and stack is empty then string is accepted by the PDA
otherwise not accepted.
 Step-1: On receiving 0 push it onto stack. On receiving 1, push it onto
stack and goto next state
 Step-2: On receiving 1 push it onto stack. On receiving 2, pop 1 from
stack and goto next state
 Step-3: On receiving 2 pop 1 from stack. If all the 1’s have been popped
out of stack and now receive 3 then pop a 0 from stack and goto next state
 Step-4: On receiving 3 pop 0 from stack. If input is finished and stack is
empty then goto last state and string is accepted

Examples:
Input : 0 0 1 1 1 2 2 2 3 3
Result : ACCEPTED

Input : 0 0 0 1 1 2 2 2 3 3
Result : NOT ACCEPTED
Q) Construct a PDA for language L = {0 n1m | n >= 1, m >= 1, m > n+2}
Approach used in this PDA –
First 0’s are pushed into stack.When 0’s are finished, two 1’s are ignored. Thereafter
for every 1 as input a 0 is popped out of stack. When stack is empty and still some
1’s are left then all of them are ignored.
 Step-1: On receiving 0 push it onto stack. On receiving 1, ignore it and
goto next state
 Step-2: On receiving 1, ignore it and goto next state
 Step-3: On receiving 1, pop a 0 from top of stack and go to next state
 Step-4: On receiving 1, pop a 0 from top of stack. If stack is empty, on
receiving 1 ignore it and goto next state
 Step-5: On receiving 1 ignore it. If input is finished then goto last state

Examples:
Input : 0 0 0 1 1 1 1 1 1
Result : ACCEPTED

Input : 0 0 0 0 1 1 1 1
Result : NOT ACCEPTED

DETERMINISTIC AND NON DETERMINISTIC PDA

A Pushdown Automata (PDA) is a way to implement context-free Grammar in a


similar way. We design Finite Automata for Regular Grammar.
1. It is more powerful than FSM.
2. FSM has very limited memory but PDA has more memory.
3. PDA= Finite State Machine + Stack
This stack has infinite memory and that facilitates the higher power of Pushdown
automata. This helps PDA to behave more powerful than Finite-state Machine .
A Pushdown Automata has three Components:
1. An input tape
2. A finite Control Unit.
3. A stack with infinite size.
Definition of DPDA and NPDA with example
Let M = (Q,?,?,q0, Z,F ,?) be a PDA. The PDA is deterministic if and only if
1. ?(q, a, Z) has one element.
2. If ?(q, ?, Z) is non-empty, then ?(q, c, Z) should be empty for every
c??.
Both conditions should be satisfied for the PDA to be deterministic. If one of the
conditions fails, the PDA is non-deterministic.
Let us consider an example to understand more clearly.
Example: Is the PDA corresponding to the language L = {a nbn | n>=1} by the finite
state is deterministic ?
Solution: The shown transitions defined for this machine are shown below:
?(q0, a, Z0) =?(q0, aZ0)
?(q0, a, a) =?(q0, aa)
?(q0, b, a) =?(q1, ?)
?(q1, b, a) =?(q1, ?)
?(q1, ?, Z0) =?(qf, ?)
The PDA should satisfy the two conditions. shown in the definition to be
deterministic.
1. ?(q0, a, Z0) has only one element. In this case, for each q?Q, a?? , and
Z??, there exists only one definition so the first condition is satisfied.
2. To satisfy the second condition consider the transition. ?(q 1,? , Z0) =
(qf,?,). Since the transition is defined, the transition ?(q, a, Z0) where a??
should not be defined which is true.
since both conditions. are satisfied, then the given PDA is deterministic.
Difference between NPDA and DPDA:
S. NPDA(Non-deterministic
No DPDA(Deterministic Pushdown Automata) Pushdown Automata)

It is more powerful than


It is less powerful than NPDA.
1. DPDA.

It is not possible to convert


It is possible to convert every DPDA to a
every NPDA to a
corresponding NPDA.
2. corresponding DPDA.

The language accepted by


The language accepted by DPDA is a subset of NPDA is not a subset of the
the language accepted by NDPA. language accepted by
3. DPDA.
S. NPDA(Non-deterministic
No DPDA(Deterministic Pushdown Automata) Pushdown Automata)

The language accepted by DPDA is called The language accepted by


DCFL(Deterministic Context-free Language) NPDA is called NCFL(Non-
which is a subset of NCFL(Non-deterministic deterministic Context-free
4. Context-free Language) accepted by NPDA. Language).

There is one more difference as follows:

DPDA: For every input with the current state, there is only one move.
M = (Q,?,?,q0, Z,F ,?)
?: Q*?*??Q*?*

Deterministic path

NPDA: For every input with the current state, We can have multiple moves.
M = (Q,?,?,q0, Z,F ,?)
?: Q*{???}*??2Q*?*

Non- Deterministic path

Why NPDA is more powerful than DPDA?


NDPA is more powerful than DPDA because we can add more transitions to it. It is
possible for every language to add a transition. For some languages, we can
construct DPDA there exist an NPDA but there are some languages that are accepted
by NPDA but are not by DPDA. This is said to be powerful when it accepts more
sets of languages than other automata.
In fact, it is more powerful than DFA(Deterministic finite automata) and NFA(Non-
deterministic finite automata) also because, In the case of DFA and NFA, they are
equivalent in power. So for every language accepted by DFA there exist an NFA and
Vice-Versa. There is not any language for which we construct NFA but not DFA.
Hence, we can’t convert NPDA to DPDA always and we can convert NFA to
equivalent DFA always.

EQUIVALENCE OF PUSHDOWN AUTOMATA AND CFG

If a grammar G is context-free, we can build an equivalent nondeterministic PDA which


accepts the language that is produced by the context-free grammar G. A parser can be built
for the grammar G. Also, if P is a pushdown automaton, an equivalent context-free grammar
G can be constructed where L(G) = L(P) In the next two topics, we will discuss how to
convert from PDA to CFG and vice versa. Algorithm to find PDA corresponding to a given
CFG Input − A CFG, G = (V, T, P, S) Output − Equivalent PDA, P = (Q, ∑, S, δ, q0, I, F)
Step 1 − Convert the productions of the CFG into GNF. Step 2 − The PDA will have only
one state {q}. Step 3 − The start symbol of CFG will be the start symbol in the PDA. Step 4 −
All non-terminals of the CFG will be the stack symbols of the PDA and all the terminals of
the CFG will be the input symbols of the PDA. Step 5 − For each production in the form A
→ aX where a is terminal and A, X are combination of terminal and non-terminals, make a
transition δ (q, a, A). Problem Construct a PDA from the following CFG. G = ({S, X}, {a, b},
P, S) where the productions are − S → XS | ε , A → aXb | Ab | ab Solution Let the equivalent
PDA, P = ({q}, {a, b}, {a, b, X, S}, δ, q, S) where δ −

δ(q, ε , S) = {(q, XS), (q, ε )} δ(q, ε , X) = {(q, aXb), (q, Xb), (q, ab)} δ(q, a, a) = {(q, ε )}
δ(q, 1, 1) = {(q, ε )} Algorithm to find CFG corresponding to a given PDA Input − A CFG, G
= (V, T, P, S) Output − Equivalent PDA, P = (Q, ∑, S, δ, q0, I, F) such that the non- terminals
of the grammar G will be {Xwx | w,x ∈ Q} and the start state will be Aq0,F. Step 1 − For
every w, x, y, z ∈ Q, m ∈ S and a, b ∈ ∑, if δ (w, a, ε) contains (y, m) and (z, b, m) contains
(x, ε), add the production rule Xwx → a Xyzb in grammar G. Step 2 − For every w, x, y, z ∈
Q, add the production rule Xwx → XwyXyx in grammar G. Step 3 − For w ∈ Q, add the
production rule Xww → ε in grammar G.
TWO STACK PDA

Two stacks push down automata (PDA) includes the following factors −

 A Turing machine can accept languages that are not accepted by any PDA with one stack.
 The strength of pushdown automata is increased by adding extra stacks.
 A PDA with two stacks has the same computation power as for a Turing Machine.

Two-Stack PDA is a computational model which is based on the


generalization of Pushdown Automata (PDA) and Non-deterministic Two-
Stack PDA which is equivalent to a deterministic Two-Stack PDA.

The moves of the Two-Stack PDA are based on the following −


 The state of finite control.
 The input symbol that reads.
 The top of the stack symbol on each of its stacks.

Some of the characteristics of the Turing Machine (TM) and the Two-stack
Push down automaton (Two-stack PDA) Machine are as follows −

Turing Machine Two-stack PDA Machine

Change state. Change state.

Write a tape symbol The input symbol read.


in cell scanned.

Move the head left or Replace the symbol of each stack with a
right. string of zero or more stack symbols.

The diagram given below is of the TM variant Two-stack PDA machine.

The right half of the tape is kept on one stack, and the left half on the other.

As we move along, we pop characters off one and push them onto the other.

APPLICATION OF PUSHDOWN AUTOMATA


Automata is a machine that can accept the Strings of a Language L over an input
alphabet Σ . So far we are familiar with the Types of Automata. Now, let us discuss
the expressive power of Automata and further understand its Applications.
Expressive Power of various Automata : The Expressive Power of any machine
can be determined from the class or set of Languages accepted by that particular
type of Machine. Here is the increasing sequence of expressive power of machines :

As we can observe that FA is less powerful than any other machine. It is important
to note that DFA and NFA are of same power because every NFA can be converted
into DFA and every DFA can be converted into NFA . The Turing Machine i.e. TM
is more powerful than any other machine
(i) Finite Automata (FA) equivalence:
Finite Automata
≡ PDA with finite Stack
≡ TM with finite tape
≡ TM with unidirectional tape
≡ TM with read only tape
(ii) Pushdown Automata (PDA) equivalence:
PDA ≡ Finite Automata with Stack
(iii) Turing Machine (TM) equivalence:
Turing Machine
≡ PDA with additional Stack
≡ FA with 2 Stacks
The Applications of these Automata are given as follows:
1. Finite Automata (FA) –
 For the designing of lexical analysis of a compiler.
 For recognizing the pattern using regular expressions.
 For the designing of the combination and sequential circuits using Mealy
and Moore Machines.
 Used in text editors.
 For the implementation of spell checkers.
 Can be used as a model for learning and decision making.
 Can parse text to extract information and structure data.
2. Push Down Automata (PDA) –
 For designing the parsing phase of a compiler (Syntax Analysis).
 For implementation of stack applications.
 For evaluating the arithmetic expressions.
 For solving the Tower of Hanoi Problem.
 Can be used in software engineering, to verify and validate the correctness
of software models.
 Can be used in network protocols, to parse and validate incoming
messages and to enforce specific message formats.
 Can be used in cryptography, to implement secure algorithms for
encryption and decryption.
 Used in string matching and pattern recognition, to search for specific
patterns in input strings.
 Used in XML parsing.
 Used in natural language processing applications like parsing sentences,
recognizing parts of speech, and generating syntax trees.
 Used in automatic theorem proving and formal verification.
 Used in formal verification of hardware and software systems.
3. Linear Bounded Automata (LBA) –
 For implementation of genetic programming.
 For constructing syntactic parse trees for semantic analysis of the
compiler.
 For recognition of context-sensitive languages.
 Used in game theory to model and analyze interactions between agents.
4. Turing Machine (TM) –
 For solving any recursively enumerable problem.
 For understanding complexity theory.
 For implementation of neural networks.
 For implementation of Robotics Applications.
 For implementation of artificial intelligence.
 Used as a theoretical model to analyze the time and space complexity of
algorithms.
 Used in computational biology to model and analyze biological systems.
 Used in artificial intelligence as a model for learning and decision making.
 Used to study the relationship between classical computing and quantum
computing.
 Used in digital circuit design to model and verify the behavior of digital
circuits.
 Used in human-computer interaction to model and analyze the interaction
between humans and computers.

You might also like