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