GateAI
Turing Machines and Undecidability

GATE CSE 2017 Set 2 · Q41

MCQ2 marksMedium

Time

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? I. Given a regular expression RR and a string ww, is w∈L(R)w \in L(R)? II. Given a context-free grammar GG, is L(G)=∅L(G) = \emptyset? III. Given a context-free grammar GG, is L(G)=Σ∗L(G) = \Sigma^* for some alphabet Σ\Sigma? IV. Given a Turing machine MM and a string ww, is w∈L(M)w \in L(M)?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: D) III and IV only

Turing Machines and Undecidability

Let us analyze each decision problem:

  1. Problem I: *Membership problem for Regular Languages* (Given RR and ww, is w∈L(R)w \in L(R)?). Regular languages are decidable for membership. We can convert the regular expression to a DFA and check if it accepts ww. Hence, this problem is decidable.

  2. Problem II: *Emptiness problem for Context-Free Grammars* (Given GG, is L(G)=∅L(G) = \emptyset?). We can determine whether the start symbol can derive any terminal string by identifying all generating non-terminals. Hence, this problem is decidable.

  3. Problem III: *Totality/Universality problem for Context-Free Grammars* (Given GG, is L(G)=Σ∗L(G) = \Sigma^*?). The universality problem for CFGs is well-known to be undecidable (reduced from the Post Correspondence Problem or valid computation histories of Turing machines).

  4. Problem IV: *Membership problem for Turing Machines / Halting problem* (Given MM and ww, is w∈L(M)w \in L(M)?). This is the acceptance problem ATMA_{TM}, which is famously undecidable.

Therefore, problems III and IV are undecidable, which corresponds to option (D).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Turing Machines and Undecidability previous year question is Q41 of the GATE CSE 2017 Set 2 paper. Find more GATE CSE PYQs on Turing Machines and Undecidability in Theory of Computation, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Turing Machines and Undecidability PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Turing Machines and Undecidability in GATE CSE

Turing Machines and Undecidability has 30 GATE CSE PYQs across 20 papers from 2012 to 2026. 13 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2017 Set 2.

How GATE tests Turing Machines and Undecidability

More from GATE CSE 2017 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2017 Set 2 · Q41 · MCQ

Let L(R) be the language represented by regular expression R. Let L(G) be the language generated by a context free grammar G. Let L(M) be the language accepted by a Turing machine M. Which of the following decision problems are undecidable? I. Given a regular expression R and a string w, is w ∈ L(R)? II. Given a context-free grammar G, is L(G) = ∅? III. Given a context-free grammar G, is L(G) = * for some alphabet ? IV. Given a Turing machine M and a string w, is w ∈ L(M)?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.