0% found this document useful (0 votes)
28 views9 pages

Bwu Bta 22-326 Chirantan Mondal

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views9 pages

Bwu Bta 22-326 Chirantan Mondal

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Push Down Automata

And NPDA

NAME : CHIRANTAN MONDAL


STUDENT CODE : BWU/BTA/22/326
SECTION : F
COURSE CODE : PCC-CSM 404
COURSE NAME : FORMAL LANGUAGE
AND AUTOMATA THEORY
INTRODUCTION

 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 can’t be accepted by FA.
Thus PDA is more superior than FA.
 Basically a pushdown automata is – “Finite
state of machine” + “A stack”.
 A push down automata has three components
An input tape
An control unit
A stack with infinite size
The stack head scans top head 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
7 COMPONENTS OF PDA

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 Q X ( ∑ U { € } ) X Γ
QUESTION 1:
Q) Construct a PDA for language L = {0n1m | 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 go
to next state
Step-2: On receiving 1, ignore it and go to 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 go to next state
Step-5: On receiving 1 ignore it. If input is finished then go to last state
EXAMPLE :
Input : 0 0 0 1 1 1
1 1 Result :
ACCEPTED
Input : 0 0 0 0 1 1
1 1 Result : NOT
ACCEPTED
Deterministic and Nondeterministic
Push Down Automata

Deterministic PDA
A deterministic PDA has a single well-defined transition for each
input symbol and stack symbol combination, making it more
efficient but less expressive than nondeterministic PDAs.

Nondeterministic PDA
A nondeterministic PDA can have multiple possible
transitions for a given input symbol and stack symbol,
allowing it to explore different paths simultaneously and
recognize a broader class of context-free languages.
Equivalence
Deterministic and nondeterministic PDAs have the same
expressive power and can recognize the same set of
context-free languages.
Applications of Push Down Automata

Compilers Natural Algorithm Formal


Language Analysis Verification
PDAs are used in
Processing
the parsing phase PDAs are used to PDAs are employed
of compilers to PDAs can be used study the in formal
recognize and to model and complexity and verification
process analyze the expressiveness of techniques to
programming structure of natural algorithms, ensure the
language syntax. languages, which particularly those correctness of
often exhibit involving recursive software and
context-free or nested hardware systems.
properties. structures.
THANK YOU

You might also like