Skip to content
Official PYQ · 2018

GATE CS 2018 Q36 — Undecidability

Explain with AI

Consider the following problems. L(G)L(G) denotes the language generated by a grammar GG. L(M) denotes the language accepted by a machine MM.

  1. For an unrestricted grammar GG and a string ww, whether w∈L(G)w \in L(G)
  2. Given a Turing machine MM, whether L(M)L(M) is regular
  3. Given two grammarG1G_1 and G2G_2, whether L(G1)=L(G2)L(G_1) = L(G_2)
  4. Given an NFA NN, whether there is a deterministic PDA PP such that NN and PP accept the same language

Which one of the following statement is correct?

Choose one option
View worked solution

Answer: D

Let us analyze the decidability of each problem:

  1. Membership for Unrestricted Grammars: Unrestricted grammars generate Recursively Enumerable (RE) languages. The membership problem (w∈L(G)w \in L(G)) for RE languages is equivalent to the halting problem and is undecidable.
  2. Regularity of Turing Machine Language: "Being regular" is a non-trivial semantic property of recursively enumerable languages. By Rice's Theorem, determining whether L(M)L(M) is regular is undecidable.
  3. Equivalence of Grammars: The equivalence problem (L(G1)=L(G2)L(G_1) = L(G_2)) is undecidable for both context-free grammars and unrestricted grammars.
  4. NFA to DPDA Equivalence: Every regular language (accepted by an NFA NN) is also a deterministic context-free language (DCFL), which can be accepted by a deterministic PDA PP. Therefore, for any given NFA NN, such a DPDA PP always exists. Since the answer is always "yes", this problem is trivially decidable.

Thus, only I, II, and III are undecidable.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Undecidability questions