SlideServe
Menu
Préférences
© SlideServe · v2026

Pushdown Automata and Equivalence with CFGs

andreapaul avatar
8 diapositives · 158 Views · Oct 31, 2019

Explore how Pushdown Automata accept context-free languages, their equivalence with CFGs, and examples of PDAs for various languages. Learn about Lemma 2.27 and Theorem 2.20 regarding PDA-CFG equivalence.

Pushdown Automata and Equivalence with CFGs - slide 1
01 / 8Pushdown Automata and Equivalence with CFGs
1 / 17

Télécharger la présentation

Pushdown Automata and Equivalence with CFGs
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. [Section 2.2] Pushdown Automata • like NFA’s but also have a stack • accept context-free languages (we’ll prove their equivalence to CFG’s) • Example: { 0n#1n | n > 0 }

  2. [Section 2.2] Pushdown Automata • Def 2.13: • A pushdown automaton (PDA) is a 6-tuple (Q,§,¡,±,q0,F), where • Q is a finite set of states • § is a finite input alphabet • ¡ is a finite stack alphabet • ± : is the transition function • q02 Q is the start state • F µ Q is the set of accept states

  3. [Section 2.2] Pushdown Automata Def: Let M=(Q,§,¡,±,q0,F) be a PDA. It accepts w = w1w2…wm, where each wi2§[{ε}, if there exist states r0,r1,…,rm2 Q and strings s0,s1,…,sm2¡* such that

  4. [Section 2.2] Pushdown Automata • Examples: give PDAs for the following languages: • { aibjck | i,j,k ¸ 0 and i=j or i=k } • { wwR | w 2 {0,1}* } • { w | w contains the same number of 0’s and 1’s }

  5. [Section 2.2] Equivalence with CFGs Thm 2.20: A language is context-free iff there is a PDA that recognizes it.

  6. [Section 2.2] Equivalence with CFGs Lemma 2.21: For every context-free language there is a PDA that recognizes it.

  7. [Section 2.2] Equivalence with CFGs • Lemma 2.27: For every PDA there is an equivalent CFG. • Proof: assume PDA satisfies: • has a single accept state • empties stack before accepting • each transition is a “push” or “pop” but not both

  8. [Section 2.2] Equivalence with CFGs • Lemma 2.27: For every PDA there is an equivalent CFG. • Proof: Let P=(Q,§,¡,±,q0,{qaccept}) be a pda satisfying 1-3. Then CFG G=(V,§,P,S) is • V = { Ap,q | p,q 2 Q } - meaning “Ap,q generates all strings that move from p to q on an empty stack” • S =