Decidable Languages : ECFG, EPDA

A language is decidable if there is a Turing Machine that halts and accepts strings that belong to the language, and halts and rejects strings that do not belong to the language.


    \begin{equation*} E_{CFG} = \{ <G>: G \text{ is a CFG with } L(G) = \emptyset \} \end{equation*}

There exists a TM that decides the above language. Given the string encoding of a CFG G, a TM can decide whether the language of G is empty.

Useless and Unreachable variables

A variable is useless if it generates no string consisting entirely of terminals. All non-useful variables are useless

A variable is unreachable if it can never be generated (starting with S).

High-Level Description

On input <G>

  1. Check whether <G> indeed encodes a CFG. If not, reject.
  2. Delete all useless and unreachable variables.
  3. Is S still remains accept. Else, reject.

Since all these steps take a finite amount of time, it is guaranteed that the machine halts and decides.

Any PDA can be converted to an equivalent CFG. Thus, the following language is also decidable since it reduces to E_{PDA}.


    \begin{equation*} E_{PDA} = \{ : P \text{ is a PDA with } L(P) = \emptyset \} \end{equation*}

Leave a Reply

Your email address will not be published. Required fields are marked *