DPDA Deterministic PDA

Slides:



Advertisements
Similar presentations
PDAs Accept Context-Free Languages
Advertisements

Fall 2006Costas Busch - RPI1 Non-regular languages (Pumping Lemma)
Costas Busch - RPI1 Single Final State for NFAs. Costas Busch - RPI2 Any NFA can be converted to an equivalent NFA with a single final state.
Courtesy Costas Busch - RPI1 More Applications of the Pumping Lemma.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Fall 2006Costas Busch - RPI1 Regular Expressions.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
Costas Busch - RPI1 NPDAs Accept Context-Free Languages.
Recursively Enumerable and Recursive Languages
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Courtesy Costas Busch - RPI1 NPDAs Accept Context-Free Languages.
Costas Busch - RPI1 Grammars. Costas Busch - RPI2 Grammars Grammars express languages Example: the English language.
Courtesy Costas Busch - RPI1 The Pumping Lemma for Context-Free Languages.
1 Converting NPDAs to Context-Free Grammars. 2 For any NPDA we will construct a context-free grammar with.
Courtesy Costas Busch - RPI
Fall 2004COMP 3351 NPDA’s Accept Context-Free Languages.
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Costas Busch - RPI1 The Pumping Lemma for Context-Free Languages.
1 More Applications of the Pumping Lemma. 2 The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we.
Courtesy Costas Busch - RPI1 Non-regular languages.
Fall 2003Costas Busch1 More Applications of The Pumping Lemma.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
Fall 2004COMP 3351 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Fall 2006Costas Busch - RPI1 More Applications of the Pumping Lemma.
Finite Automata Costas Busch - RPI.
Fall 2006Costas Busch - RPI1 PDAs Accept Context-Free Languages.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Non-regular languages (Pumping Lemma)
Prof. Busch - LSU1 More Applications of the Pumping Lemma.
1 Non-regular languages. 2 Regular languages Non-regular languages.
Fall 2005Costas Busch - RPI1 Pushdown Automata PDAs.
Costas Busch1 More Applications of The Pumping Lemma.
1 A Non Context-Free Language (We will prove it at the next class)
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
Fall 2003Costas Busch - RPI1 Linear Grammars Grammars with at most one variable at the right side of a production Examples:
1 L= { w c w R : w  {a, b}* } is accepted by the PDA below. Use a construction like the one for intersection for regular languages to design a PDA that.
Pumping Lemma for CFLs. Theorem 7.17: Let G be a CFG in CNF and w a string in L(G). Suppose we have a parse tree for w. If the length of the longest path.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 9 Mälardalen University 2006.
1 Language Recognition (11.4) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch
Costas Busch - LSU1 Linear Grammars Grammars with at most one variable at the right side of a production Examples:
Equivalence with FA * Any Regex can be converted to FA and vice versa, because: * Regex and FA are equivalent in their descriptive power ** Regular language.
Costas Busch - LSU1 PDAs Accept Context-Free Languages.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Another famous undecidable problem: The halting problem.
Recursively Enumerable and Recursive Languages
Non-regular languages
Standard Representations of Regular Languages
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
PDAs Accept Context-Free Languages
Reductions Costas Busch - LSU.
NPDAs Accept Context-Free Languages
Pushdown Automata PDAs
PDAs Accept Context-Free Languages
NPDAs Accept Context-Free Languages
Single Final State for NFA
Language Recognition (12.4)
Non-Deterministic Finite Automata
Deterministic PDAs - DPDAs
The Post Correspondence Problem
Pumping Lemma for Context-free Languages
Elementary Questions about Regular Languages
Non-regular languages
Properties of Context-Free languages
More Applications of the Pumping Lemma
Language Recognition (12.4)
DPDA Deterministic PDA
Applications of Regular Closure
The Chomsky Hierarchy Costas Busch - LSU.
Presentation transcript:

DPDA Deterministic PDA Fall 2003 Costas Busch - RPI

Deterministic PDA: DPDA Allowed transitions: (deterministic choices) Fall 2003 Costas Busch - RPI

(deterministic choices) Allowed transitions: (deterministic choices) Fall 2003 Costas Busch - RPI

(non deterministic choices) Not allowed: (non deterministic choices) Fall 2003 Costas Busch - RPI

DPDA example Fall 2003 Costas Busch - RPI

A language is deterministic context-free Definition: A language is deterministic context-free if there exists some DPDA that accepts it Example: The language is deterministic context-free Fall 2003 Costas Busch - RPI

Example of Non-DPDA (PDA) Fall 2003 Costas Busch - RPI

Not allowed in DPDAs Fall 2003 Costas Busch - RPI

PDAs Have More Power than DPDAs Fall 2003 Costas Busch - RPI

Since every DPDA is also a PDA It holds that: Deterministic Context-Free Languages (DPDA) Context-Free Languages PDAs Since every DPDA is also a PDA Fall 2003 Costas Busch - RPI

We will show that there exists a context-free language which is not We will actually show: Deterministic Context-Free Languages (DPDA) Context-Free Languages (PDA) We will show that there exists a context-free language which is not accepted by any DPDA Fall 2003 Costas Busch - RPI

is not deterministic context-free The language is: We will show: is context-free is not deterministic context-free Fall 2003 Costas Busch - RPI

Language is context-free Context-free grammar for : Fall 2003 Costas Busch - RPI

Theorem: The language is not deterministic context-free (there is no DPDA that accepts ) Fall 2003 Costas Busch - RPI

Proof: Assume for contradiction that is deterministic context free Therefore: there is a DPDA that accepts Fall 2003 Costas Busch - RPI

DPDA with accepts accepts Fall 2003 Costas Busch - RPI

Such a path exists due to determinism DPDA with Such a path exists due to determinism Fall 2003 Costas Busch - RPI

Context-free languages Fact 1: The language is not context-free Regular languages Context-free languages (we will prove this at a later class using pumping lemma for context-free languages) Fall 2003 Costas Busch - RPI

Fact 2: The language is not context-free (we can prove this using pumping lemma for context-free languages) Fall 2003 Costas Busch - RPI

We will construct a PDA that accepts: which is a contradiction! Fall 2003 Costas Busch - RPI

DPDA Replace with Modify DPDA Fall 2003 Costas Busch - RPI

Connect the final states of with the final states of A PDA that accepts Connect the final states of with the final states of Fall 2003 Costas Busch - RPI

Since is accepted by a PDA it is context-free Contradiction! (since is not context-free) Fall 2003 Costas Busch - RPI

Is not deterministic context free Therefore: Is not deterministic context free There is no DPDA that accepts it End of Proof Fall 2003 Costas Busch - RPI