240 likes | 413 Views
DPDA Deterministic PDA. Deterministic PDA: DPDA. Allowed transitions:. (deterministic choices). Allowed transitions:. (deterministic choices). Not allowed:. (non deterministic choices). DPDA example. Definition:. A language is deterministic context-free
E N D
DPDADeterministic PDA Costas Busch - LSU
Deterministic PDA: DPDA Allowed transitions: (deterministic choices) Costas Busch - LSU
Allowed transitions: (deterministic choices) Costas Busch - LSU
Not allowed: (non deterministic choices) Costas Busch - LSU
DPDA example Costas Busch - LSU
Definition: A language is deterministic context-free if there exists some DPDA that accepts it Example: The language is deterministic context-free Costas Busch - LSU
Example of Non-DPDA (PDA) Costas Busch - LSU
Not allowed in DPDAs Costas Busch - LSU
PDAs Have More Power thanDPDAs Costas Busch - LSU
It holds that: Deterministic Context-Free Languages (DPDA) Context-Free Languages PDAs Since every DPDA is also a PDA Costas Busch - LSU
We will show that there exists a context-free language which is not accepted by any DPDA We will actually show: Deterministic Context-Free Languages (DPDA) Context-Free Languages (PDA) Costas Busch - LSU
The language is: We will show: • is context-free • is not deterministic context-free Costas Busch - LSU
Context-free grammar for : Language is context-free Costas Busch - LSU
Theorem: The language is not deterministic context-free (there is no DPDA that accepts ) Costas Busch - LSU
Proof: Assume for contradiction that is deterministic context free Therefore: there is a DPDA that accepts Costas Busch - LSU
DPDA with accepts accepts Costas Busch - LSU
DPDA with Such a path exists due to determinism Costas Busch - LSU
Context-free languages Regular languages Fact 1: The language is not context-free (we will prove this at a later class using pumping lemma for context-free languages) Costas Busch - LSU
Fact 2: The language is not context-free (we can prove this using pumping lemma for context-free languages) Costas Busch - LSU
We will construct a PDA that accepts: which is a contradiction! Costas Busch - LSU
DPDA Replace with Modify DPDA Costas Busch - LSU
A PDA that accepts Connect the final states of with the final states of Costas Busch - LSU
Since is accepted by a PDA it is context-free Contradiction! (since is not context-free) Costas Busch - LSU
Therefore: Is not deterministic context free There is no DPDA that accepts it End of Proof Costas Busch - LSU