SlideShare a Scribd company logo
Pushdown
Automata (PDA)
-Sampath Kumar S,
AP/CSE, SECE
Pushdown Automata - Introduction
 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"
21 November 2017
Sampath Kumar S, AP/CSE, SECE
2
Components of PDA
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.
21 November 2017
Sampath Kumar S, AP/CSE, SECE
3
Stack Operations
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.
21 November 2017
Sampath Kumar S, AP/CSE, SECE
4
PDA Model:
21 November 2017
Sampath Kumar S, AP/CSE, SECE
5
Definition of PDA
A PDA can be formally described as a 7-tuple (Q, ∑,
Γ , δ, q0, Z0, F) −
 Q: a finite set of states
 ∑: a finite set of input alphabet
 Γ: a finite set of stack symbols
 δ: a transition function from
Q × (∑ ∪ {ε}) × Γ × Q × S*
 q0: the initial state (q0 ∈ Q)
 Z0: the initial stack top symbol (Z0 ∈ Γ)
 F: a set of the final state (F ⊆ Q)
21 November 2017
Sampath Kumar S, AP/CSE, SECE
6
Alphabets in PDA:
PDA has 2 alphabets:
 An input alphabet ∑ (input string)
 A stack alphabet Γ (stored on the stack)
21 November 2017
Sampath Kumar S, AP/CSE, SECE
7
Moves on PDA
A move on PDA may include
1. An element may be added (PUSH) to the stack.
2. An element may be deleted (POP) from the stack
(q, a, Z0) = (q, ε).
3. There may or may not be change of state.
21 November 2017
Sampath Kumar S, AP/CSE, SECE
8
Example of Moves on PDA
1. (q, a, Z0) = (q, aZ0) indicates that in the state q on
seeing a, a is pushed on to stack (placed on top
of Z0). There is no change of the state.
2. (q, a, Z0) = (q, ε) indicates that in the state q on
seeing a, the current top of symbol Z0 is deleted
form the stack.
3. (q, a, Z0) = (q1, aZ0) indicates that in the state q
on seeing a, a is pushed on to stack and the
state is changed to q1.
21 November 2017
Sampath Kumar S, AP/CSE, SECE
9
Representation of PDA
PDA can be represented using
1. Transition Diagram
2. Transition Table
3. Instantaneous Description (ID)
21 November 2017
Sampath Kumar S, AP/CSE, SECE
10
Transition Diagram:
 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.
21 November 2017
Sampath Kumar S, AP/CSE, SECE
11
Instantaneous Description of PDA
 At any given instance, the configuration of PDA is
expressed by the state of finite control, contents of
the stack and the input.
 The instantaneous description (ID) of a PDA is
represented by a triplet W where
 q is the state
 w is unconsumed input
 s is the stack contents, where leftmost symbol
corresponds to the top of the stack (TOS) and right
most is the element beneath it in stack.
21 November 2017
Sampath Kumar S, AP/CSE, SECE
12
Language Acceptance by PDA:
A language can be accepted by PDA using 2
approaches:
1. Acceptance by final state: The PDA accepts its
input by consuming it and finally it enters in the
final state.
2. Acceptance by empty stack: on reading the
input string from the initial configuration for some
PDA, the stack of PDA becomes empty.
21 November 2017
Sampath Kumar S, AP/CSE, SECE
13
21 November 2017
Sampath Kumar S, AP/CSE, SECE
14
நன்றி
21 November 2017
Sampath Kumar S, AP/CSE, SECE
15

More Related Content

What's hot

Chomsky classification of Language
Chomsky classification of LanguageChomsky classification of Language
Chomsky classification of Language
Dipankar Boruah
 
TM - Techniques
TM - TechniquesTM - Techniques
TM - Techniques
Rajendran
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
Mohammad Ilyas Malik
 
Recognition-of-tokens
Recognition-of-tokensRecognition-of-tokens
Recognition-of-tokens
Dattatray Gandhmal
 
1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets
Sampath Kumar S
 
push down automata
push down automatapush down automata
push down automata
Christopher Chizoba
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
Dr. C.V. Suresh Babu
 
Working principle of Turing machine
Working principle of Turing machineWorking principle of Turing machine
Working principle of Turing machine
Karan Thakkar
 
Multi Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing MachineMulti Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing Machine
Radhakrishnan Chinnusamy
 
Type Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLikeType Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLike
United International University
 
GE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python ProgrammingGE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python Programming
Muthu Vinayagam
 
2.8 normal forms gnf & problems
2.8 normal forms   gnf & problems2.8 normal forms   gnf & problems
2.8 normal forms gnf & problems
Sampath Kumar S
 
4.3 techniques for turing machines construction
4.3 techniques for turing machines construction4.3 techniques for turing machines construction
4.3 techniques for turing machines construction
Sampath Kumar S
 
Kleene's theorem
Kleene's theoremKleene's theorem
Kleene's theorem
Mobeen Mustafa
 
simple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilonsimple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilon
kanikkk
 
Bootstrapping in Compiler
Bootstrapping in CompilerBootstrapping in Compiler
Bootstrapping in Compiler
Akhil Kaushik
 
1.1. the central concepts of automata theory
1.1. the central concepts of automata theory1.1. the central concepts of automata theory
1.1. the central concepts of automata theory
Sampath Kumar S
 
Token, Pattern and Lexeme
Token, Pattern and LexemeToken, Pattern and Lexeme
Token, Pattern and Lexeme
A. S. M. Shafi
 
COMPILER DESIGN
COMPILER DESIGNCOMPILER DESIGN
COMPILER DESIGN
Vetukurivenkatashiva
 
Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machines
AYESHA JAVED
 

What's hot (20)

Chomsky classification of Language
Chomsky classification of LanguageChomsky classification of Language
Chomsky classification of Language
 
TM - Techniques
TM - TechniquesTM - Techniques
TM - Techniques
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
 
Recognition-of-tokens
Recognition-of-tokensRecognition-of-tokens
Recognition-of-tokens
 
1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets
 
push down automata
push down automatapush down automata
push down automata
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Working principle of Turing machine
Working principle of Turing machineWorking principle of Turing machine
Working principle of Turing machine
 
Multi Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing MachineMulti Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing Machine
 
Type Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLikeType Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLike
 
GE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python ProgrammingGE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python Programming
 
2.8 normal forms gnf & problems
2.8 normal forms   gnf & problems2.8 normal forms   gnf & problems
2.8 normal forms gnf & problems
 
4.3 techniques for turing machines construction
4.3 techniques for turing machines construction4.3 techniques for turing machines construction
4.3 techniques for turing machines construction
 
Kleene's theorem
Kleene's theoremKleene's theorem
Kleene's theorem
 
simple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilonsimple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilon
 
Bootstrapping in Compiler
Bootstrapping in CompilerBootstrapping in Compiler
Bootstrapping in Compiler
 
1.1. the central concepts of automata theory
1.1. the central concepts of automata theory1.1. the central concepts of automata theory
1.1. the central concepts of automata theory
 
Token, Pattern and Lexeme
Token, Pattern and LexemeToken, Pattern and Lexeme
Token, Pattern and Lexeme
 
COMPILER DESIGN
COMPILER DESIGNCOMPILER DESIGN
COMPILER DESIGN
 
Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machines
 

Similar to 3.1,2,3 pushdown automata definition, moves & id

1.3.1 deterministic finite automaton
1.3.1 deterministic finite automaton1.3.1 deterministic finite automaton
1.3.1 deterministic finite automaton
Sampath Kumar S
 
1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa
Sampath Kumar S
 
1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton
Sampath Kumar S
 
3.4 deterministic pda
3.4 deterministic pda3.4 deterministic pda
3.4 deterministic pda
Sampath Kumar S
 
UNIT III.docx
UNIT III.docxUNIT III.docx
UNIT III.docx
karthikeyan Muthusamy
 
Push down automata
Push down automataPush down automata
Push down automata
Ashik Khan
 
Free Ebooks Download ! Edhole
Free Ebooks Download ! EdholeFree Ebooks Download ! Edhole
Free Ebooks Download ! Edhole
Edhole.com
 
Unit iv
Unit ivUnit iv
Unit iv
TPLatchoumi
 
push down automata
 push down automata push down automata
push down automata
nadiatariq6
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
Arslan905905
 

Similar to 3.1,2,3 pushdown automata definition, moves & id (11)

1.3.1 deterministic finite automaton
1.3.1 deterministic finite automaton1.3.1 deterministic finite automaton
1.3.1 deterministic finite automaton
 
1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa
 
1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton
 
3.4 deterministic pda
3.4 deterministic pda3.4 deterministic pda
3.4 deterministic pda
 
UNIT III.docx
UNIT III.docxUNIT III.docx
UNIT III.docx
 
Push down automata
Push down automataPush down automata
Push down automata
 
Free Ebooks Download ! Edhole
Free Ebooks Download ! EdholeFree Ebooks Download ! Edhole
Free Ebooks Download ! Edhole
 
Unit iv
Unit ivUnit iv
Unit iv
 
push down automata
 push down automata push down automata
push down automata
 
Finite automata
Finite automataFinite automata
Finite automata
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
 

More from Sampath Kumar S

5.2 primitive recursive functions
5.2 primitive recursive functions5.2 primitive recursive functions
5.2 primitive recursive functions
Sampath Kumar S
 
4.7. chomskian hierarchy of languages
4.7. chomskian hierarchy of languages4.7. chomskian hierarchy of languages
4.7. chomskian hierarchy of languages
Sampath Kumar S
 
4.2 variantsof turing machines (types of tm)
4.2 variantsof turing machines (types of tm)4.2 variantsof turing machines (types of tm)
4.2 variantsof turing machines (types of tm)
Sampath Kumar S
 
4.1 turing machines
4.1 turing machines4.1 turing machines
4.1 turing machines
Sampath Kumar S
 
3.6 & 7. pumping lemma for cfl & problems based on pl
3.6 & 7. pumping lemma for cfl & problems based on pl3.6 & 7. pumping lemma for cfl & problems based on pl
3.6 & 7. pumping lemma for cfl & problems based on pl
Sampath Kumar S
 
2.7 normal forms cnf & problems
2.7 normal forms  cnf & problems2.7 normal forms  cnf & problems
2.7 normal forms cnf & problems
Sampath Kumar S
 
2.5 ambiguity in context free grammars
2.5 ambiguity in context free grammars2.5 ambiguity in context free grammars
2.5 ambiguity in context free grammars
Sampath Kumar S
 
2.4 derivations and languages
2.4 derivations and languages2.4 derivations and languages
2.4 derivations and languages
Sampath Kumar S
 
2.3 context free grammars and languages
2.3 context free grammars and languages2.3 context free grammars and languages
2.3 context free grammars and languages
Sampath Kumar S
 
2.1 & 2.2 grammar introduction – types of grammar
2.1 & 2.2 grammar introduction – types of grammar2.1 & 2.2 grammar introduction – types of grammar
2.1 & 2.2 grammar introduction – types of grammar
Sampath Kumar S
 
1.9. minimization of dfa
1.9. minimization of dfa1.9. minimization of dfa
1.9. minimization of dfa
Sampath Kumar S
 
1.5 & 1.6 regular languages & regular expression
1.5 & 1.6 regular languages & regular expression1.5 & 1.6 regular languages & regular expression
1.5 & 1.6 regular languages & regular expression
Sampath Kumar S
 
1.4. finite automaton with ε moves
1.4. finite automaton with ε   moves1.4. finite automaton with ε   moves
1.4. finite automaton with ε moves
Sampath Kumar S
 
1.2. introduction to automata theory
1.2. introduction to automata theory1.2. introduction to automata theory
1.2. introduction to automata theory
Sampath Kumar S
 
0.0 Introduction to theory of computation
0.0 Introduction to theory of computation0.0 Introduction to theory of computation
0.0 Introduction to theory of computation
Sampath Kumar S
 

More from Sampath Kumar S (15)

5.2 primitive recursive functions
5.2 primitive recursive functions5.2 primitive recursive functions
5.2 primitive recursive functions
 
4.7. chomskian hierarchy of languages
4.7. chomskian hierarchy of languages4.7. chomskian hierarchy of languages
4.7. chomskian hierarchy of languages
 
4.2 variantsof turing machines (types of tm)
4.2 variantsof turing machines (types of tm)4.2 variantsof turing machines (types of tm)
4.2 variantsof turing machines (types of tm)
 
4.1 turing machines
4.1 turing machines4.1 turing machines
4.1 turing machines
 
3.6 & 7. pumping lemma for cfl & problems based on pl
3.6 & 7. pumping lemma for cfl & problems based on pl3.6 & 7. pumping lemma for cfl & problems based on pl
3.6 & 7. pumping lemma for cfl & problems based on pl
 
2.7 normal forms cnf & problems
2.7 normal forms  cnf & problems2.7 normal forms  cnf & problems
2.7 normal forms cnf & problems
 
2.5 ambiguity in context free grammars
2.5 ambiguity in context free grammars2.5 ambiguity in context free grammars
2.5 ambiguity in context free grammars
 
2.4 derivations and languages
2.4 derivations and languages2.4 derivations and languages
2.4 derivations and languages
 
2.3 context free grammars and languages
2.3 context free grammars and languages2.3 context free grammars and languages
2.3 context free grammars and languages
 
2.1 & 2.2 grammar introduction – types of grammar
2.1 & 2.2 grammar introduction – types of grammar2.1 & 2.2 grammar introduction – types of grammar
2.1 & 2.2 grammar introduction – types of grammar
 
1.9. minimization of dfa
1.9. minimization of dfa1.9. minimization of dfa
1.9. minimization of dfa
 
1.5 & 1.6 regular languages & regular expression
1.5 & 1.6 regular languages & regular expression1.5 & 1.6 regular languages & regular expression
1.5 & 1.6 regular languages & regular expression
 
1.4. finite automaton with ε moves
1.4. finite automaton with ε   moves1.4. finite automaton with ε   moves
1.4. finite automaton with ε moves
 
1.2. introduction to automata theory
1.2. introduction to automata theory1.2. introduction to automata theory
1.2. introduction to automata theory
 
0.0 Introduction to theory of computation
0.0 Introduction to theory of computation0.0 Introduction to theory of computation
0.0 Introduction to theory of computation
 

Recently uploaded

How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Reflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdfReflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdf
amberjdewit93
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
MERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDFMERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDF
scholarhattraining
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
AG2 Design
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptxFresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
SriSurya50
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 

Recently uploaded (20)

How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Reflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdfReflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdf
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
MERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDFMERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDF
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptxFresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 

3.1,2,3 pushdown automata definition, moves & id

  • 2. Pushdown Automata - Introduction  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" 21 November 2017 Sampath Kumar S, AP/CSE, SECE 2
  • 3. Components of PDA 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. 21 November 2017 Sampath Kumar S, AP/CSE, SECE 3
  • 4. Stack Operations 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. 21 November 2017 Sampath Kumar S, AP/CSE, SECE 4
  • 5. PDA Model: 21 November 2017 Sampath Kumar S, AP/CSE, SECE 5
  • 6. Definition of PDA A PDA can be formally described as a 7-tuple (Q, ∑, Γ , δ, q0, Z0, F) −  Q: a finite set of states  ∑: a finite set of input alphabet  Γ: a finite set of stack symbols  δ: a transition function from Q × (∑ ∪ {ε}) × Γ × Q × S*  q0: the initial state (q0 ∈ Q)  Z0: the initial stack top symbol (Z0 ∈ Γ)  F: a set of the final state (F ⊆ Q) 21 November 2017 Sampath Kumar S, AP/CSE, SECE 6
  • 7. Alphabets in PDA: PDA has 2 alphabets:  An input alphabet ∑ (input string)  A stack alphabet Γ (stored on the stack) 21 November 2017 Sampath Kumar S, AP/CSE, SECE 7
  • 8. Moves on PDA A move on PDA may include 1. An element may be added (PUSH) to the stack. 2. An element may be deleted (POP) from the stack (q, a, Z0) = (q, ε). 3. There may or may not be change of state. 21 November 2017 Sampath Kumar S, AP/CSE, SECE 8
  • 9. Example of Moves on PDA 1. (q, a, Z0) = (q, aZ0) indicates that in the state q on seeing a, a is pushed on to stack (placed on top of Z0). There is no change of the state. 2. (q, a, Z0) = (q, ε) indicates that in the state q on seeing a, the current top of symbol Z0 is deleted form the stack. 3. (q, a, Z0) = (q1, aZ0) indicates that in the state q on seeing a, a is pushed on to stack and the state is changed to q1. 21 November 2017 Sampath Kumar S, AP/CSE, SECE 9
  • 10. Representation of PDA PDA can be represented using 1. Transition Diagram 2. Transition Table 3. Instantaneous Description (ID) 21 November 2017 Sampath Kumar S, AP/CSE, SECE 10
  • 11. Transition Diagram:  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. 21 November 2017 Sampath Kumar S, AP/CSE, SECE 11
  • 12. Instantaneous Description of PDA  At any given instance, the configuration of PDA is expressed by the state of finite control, contents of the stack and the input.  The instantaneous description (ID) of a PDA is represented by a triplet W where  q is the state  w is unconsumed input  s is the stack contents, where leftmost symbol corresponds to the top of the stack (TOS) and right most is the element beneath it in stack. 21 November 2017 Sampath Kumar S, AP/CSE, SECE 12
  • 13. Language Acceptance by PDA: A language can be accepted by PDA using 2 approaches: 1. Acceptance by final state: The PDA accepts its input by consuming it and finally it enters in the final state. 2. Acceptance by empty stack: on reading the input string from the initial configuration for some PDA, the stack of PDA becomes empty. 21 November 2017 Sampath Kumar S, AP/CSE, SECE 13
  • 14. 21 November 2017 Sampath Kumar S, AP/CSE, SECE 14
  • 15. நன்றி 21 November 2017 Sampath Kumar S, AP/CSE, SECE 15

Editor's Notes

  1. School of EECS, WSU