(DPDA) and DCFLs | ||
Unambiguous CFG s and DPDA s It is interesting to note the language accepted by a DPDA must have an unambiguous grammar. We first prove it for a DPDA that accepts by empty stock and then extend it to a DPDA that accepts by final state. Theorem : If L is accepted by some DPDAM that accepts by empty stock, then L must have an unambiguous CFG. Proof : In the construction of an equivalent CFG G for any given DPDAM (that has been discussed in the context of equivalence of PDAs and CFGs ) if assume that M is deterministic (that accepts by empty stock), than the resulting grammar G generated can be shown to have unique leftmost derivation for every string(thus, proving that G is unambiguous). If M accepts a string w by empty stock, then because of deterministic nature of M there must be a unique sequence of moves and M cannot move once it empties its stock. If this sequence of moves are known, we can determine the exact choice of production rules in a leftmost derivation of w under G . Even though there may be many different rules in G for the move. We can now show that if L is accepted by some DPAM that accepts by final state, then L has an unambiguous grammar. |
||