SlideShare une entreprise Scribd logo
1  sur  15
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

Contenu connexe

Tendances

17. Recovery System in DBMS
17. Recovery System in DBMS17. Recovery System in DBMS
17. Recovery System in DBMSkoolkampus
 
Relationship Among Token, Lexeme & Pattern
Relationship Among Token, Lexeme & PatternRelationship Among Token, Lexeme & Pattern
Relationship Among Token, Lexeme & PatternBharat Rathore
 
Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Srimatre K
 
Chomsky classification of Language
Chomsky classification of LanguageChomsky classification of Language
Chomsky classification of LanguageDipankar Boruah
 
Control Strategies in AI
Control Strategies in AIControl Strategies in AI
Control Strategies in AIAmey Kerkar
 
Finite Automata in compiler design
Finite Automata in compiler designFinite Automata in compiler design
Finite Automata in compiler designRiazul Islam
 
Methods for handling deadlocks
Methods for handling deadlocksMethods for handling deadlocks
Methods for handling deadlocksA. S. M. Shafi
 
2. forward chaining and backward chaining
2. forward chaining and backward chaining2. forward chaining and backward chaining
2. forward chaining and backward chainingmonircse2
 
Intermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignIntermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignKuppusamy P
 
Syntax directed translation
Syntax directed translationSyntax directed translation
Syntax directed translationAkshaya Arunan
 

Tendances (20)

Lexical analysis - Compiler Design
Lexical analysis - Compiler DesignLexical analysis - Compiler Design
Lexical analysis - Compiler Design
 
Kleene's theorem
Kleene's theoremKleene's theorem
Kleene's theorem
 
17. Recovery System in DBMS
17. Recovery System in DBMS17. Recovery System in DBMS
17. Recovery System in DBMS
 
Turing machine-TOC
Turing machine-TOCTuring machine-TOC
Turing machine-TOC
 
Relationship Among Token, Lexeme & Pattern
Relationship Among Token, Lexeme & PatternRelationship Among Token, Lexeme & Pattern
Relationship Among Token, Lexeme & Pattern
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
 
Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1
 
Chomsky Hierarchy.ppt
Chomsky Hierarchy.pptChomsky Hierarchy.ppt
Chomsky Hierarchy.ppt
 
Parsing
ParsingParsing
Parsing
 
Pda
PdaPda
Pda
 
Multi Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing MachineMulti Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing Machine
 
Chomsky classification of Language
Chomsky classification of LanguageChomsky classification of Language
Chomsky classification of Language
 
Control Strategies in AI
Control Strategies in AIControl Strategies in AI
Control Strategies in AI
 
Turing machines
Turing machinesTuring machines
Turing machines
 
Finite Automata in compiler design
Finite Automata in compiler designFinite Automata in compiler design
Finite Automata in compiler design
 
Chapter 5 Syntax Directed Translation
Chapter 5   Syntax Directed TranslationChapter 5   Syntax Directed Translation
Chapter 5 Syntax Directed Translation
 
Methods for handling deadlocks
Methods for handling deadlocksMethods for handling deadlocks
Methods for handling deadlocks
 
2. forward chaining and backward chaining
2. forward chaining and backward chaining2. forward chaining and backward chaining
2. forward chaining and backward chaining
 
Intermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignIntermediate code generation in Compiler Design
Intermediate code generation in Compiler Design
 
Syntax directed translation
Syntax directed translationSyntax directed translation
Syntax directed translation
 

Similaire à 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 automatonSampath 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 dfaSampath 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 automatonSampath Kumar S
 
Push down automata
Push down automataPush down automata
Push down automataAshik Khan
 
Free Ebooks Download ! Edhole
Free Ebooks Download ! EdholeFree Ebooks Download ! Edhole
Free Ebooks Download ! EdholeEdhole.com
 
push down automata
 push down automata push down automata
push down automatanadiatariq6
 
Theory of automata
Theory of automataTheory of automata
Theory of automataArslan905905
 

Similaire à 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
 

Plus de Sampath Kumar S

5.2 primitive recursive functions
5.2 primitive recursive functions5.2 primitive recursive functions
5.2 primitive recursive functionsSampath Kumar S
 
4.7. chomskian hierarchy of languages
4.7. chomskian hierarchy of languages4.7. chomskian hierarchy of languages
4.7. chomskian hierarchy of languagesSampath 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
 
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 plSampath Kumar S
 
2.7 normal forms cnf & problems
2.7 normal forms  cnf & problems2.7 normal forms  cnf & problems
2.7 normal forms cnf & problemsSampath 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 grammarsSampath Kumar S
 
2.4 derivations and languages
2.4 derivations and languages2.4 derivations and languages
2.4 derivations and languagesSampath 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 languagesSampath 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 grammarSampath Kumar S
 
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 setsSampath Kumar S
 
1.9. minimization of dfa
1.9. minimization of dfa1.9. minimization of dfa
1.9. minimization of dfaSampath Kumar S
 
1.8. equivalence of finite automaton and regular expressions
1.8. equivalence of finite automaton and regular expressions1.8. equivalence of finite automaton and regular expressions
1.8. equivalence of finite automaton and regular expressionsSampath 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 expressionSampath Kumar S
 
1.4. finite automaton with ε moves
1.4. finite automaton with ε   moves1.4. finite automaton with ε   moves
1.4. finite automaton with ε movesSampath Kumar S
 
1.2. introduction to automata theory
1.2. introduction to automata theory1.2. introduction to automata theory
1.2. introduction to automata theorySampath Kumar S
 
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 theorySampath 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 computationSampath Kumar S
 

Plus de Sampath Kumar S (19)

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.6 halting problem
4.6 halting problem4.6 halting problem
4.6 halting problem
 
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.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
 
1.9. minimization of dfa
1.9. minimization of dfa1.9. minimization of dfa
1.9. minimization of dfa
 
1.8. equivalence of finite automaton and regular expressions
1.8. equivalence of finite automaton and regular expressions1.8. equivalence of finite automaton and regular expressions
1.8. equivalence of finite automaton and regular expressions
 
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
 
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
 
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
 

Dernier

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 

Dernier (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 

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

Notes de l'éditeur

  1. School of EECS, WSU