Skip to content
Official PYQ · 2017

GATE CS 2017 Set 2 Q41 — Undecidability

Explain with AI

Let L(R)L(R) be the language represented by regular expression RR. Let L(G)L(G) be the language generated by a context free grammar GG. Let L(M)L(M) be the language accepted by a Turing machine MM. Which of the following decision problems are undecidable?

  1. Given a regular expression RR and a string ww, is w∈L(R)w \in L(R)?
  2. Given a context-free grammar GG, is L(G)=∅L(G) = \emptyset
  3. Given a context-free grammar GG, is L(G)=Σ∗L(G) = \Sigma^* for some alphabet Σ\Sigma?
  4. Given a Turing machine MM and a string ww, is w∈L(M)w \in L(M)?
Choose one option
View worked solution

Answer: D

To determine which of the decision problems are undecidable, let us analyze each statement individually:

  1. Given a regular expression RR and a string ww, is w∈L(R)w \in L(R)?
    This is the membership problem for regular languages. Since regular languages are closed under all basic operations and have equivalent finite automata (DFA/NFA), we can construct a DFA for RR and simulate it on ww. This process always halts and decides membership.
    Status: Decidable.

  2. Given a context-free grammar GG, is L(G)=∅L(G) = \emptyset?
    This is the emptiness problem for context-free languages (CFLs). We can decide this by checking if the start symbol of GG can generate any terminal string (by systematically identifying and eliminating non-generating variables).
    Status: Decidable.

  3. Given a context-free grammar GG, is L(G)=Σ∗L(G) = \Sigma^* for some alphabet Σ\Sigma?
    This is the universality problem for CFLs. It is a well-known undecidable problem, which can be proved by showing that the language of invalid computation histories of a Turing machine is context-free. If we could decide whether L(G)=Σ∗L(G) = \Sigma^*, we could decide the halting problem.
    Status: Undecidable.

  4. Given a Turing machine MM and a string ww, is w∈L(M)w \in L(M)?
    This is the membership problem for Turing machines (often denoted as ATMA_{TM}). By Turing's halting problem analysis, there is no algorithm that can decide whether an arbitrary Turing machine MM accepts a given input string ww.
    Status: Undecidable.

Thus, problems III and IV are undecidable.

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

Published
Report a correction
Keep exploringMore Undecidability questions