Skip to content
Official PYQ · 2014

GATE CS 2014 Set 2 Q35 — Undecidability

Explain with AI

Let ⟨M⟩\langle M \rangle be the encoding of a Turing machine as a string over Σ={0,1}\Sigma=\left\{0,1\right\}. Let L={⟨M⟩∣M is a Turing machine that accepts a string of length 2014}.L=\left\{\langle M \rangle \mid M \text{ is a Turing machine}\\\text{ that accepts a string of length 2014} \right\}. Then LL is:

Choose one option
View worked solution

Answer: B

To determine the classification of the language L={⟨M⟩∣M is a Turing machine that accepts a string of length 2014}L = \{\langle M \rangle \mid M \text{ is a Turing machine that accepts a string of length 2014}\}, we analyze its decidability and recursive enumerability.

1. Undecidability (using Rice's Theorem)

Let PP be the property of the language recognized by a Turing machine MM defined as: Property P:L(M) contains at least one string of length 2014.\text{Property } P: L(M) \text{ contains at least one string of length 2014.}

  • Semantic Property: This property depends only on the language L(M)L(M) recognized by MM, not on the structure or description of MM. If L(M1)=L(M2)L(M_1) = L(M_2), then M1M_1 satisfies PP if and only if M2M_2 satisfies PP.
  • Non-triviality:
    • There exists a TM MyesM_{\text{yes}} that accepts all strings (i.e., L(Myes)=Σ∗L(M_{\text{yes}}) = \Sigma^*), which contains strings of length 2014. Thus, ⟨Myes⟩∈L\langle M_{\text{yes}} \rangle \in L.
    • There exists a TM MnoM_{\text{no}} that rejects all strings (i.e., L(Mno)=∅L(M_{\text{no}}) = \emptyset), which contains no strings of length 2014. Thus, ⟨Mno⟩∉L\langle M_{\text{no}} \rangle \notin L.

Since PP is a non-trivial semantic property of recursively enumerable languages, by Rice's Theorem, the language LL is undecidable.

2. Recursive Enumerability (RE)

A language is recursively enumerable if there exists a Turing machine that halts and accepts for every string in the language. We can construct a recognizer UU for LL as follows:

  1. Given input ⟨M⟩\langle M \rangle, generate all strings of length 2014 over Σ={0,1}\Sigma = \{0, 1\}. There are exactly 220142^{2014} such strings (a finite set). Let this set be S={w1,w2,…,wk}S = \{w_1, w_2, \dots, w_k\}, where k=22014k = 2^{2014}.
  2. Run MM on all strings in SS in parallel using dovetailing (interleaving steps):
    • For step s=1,2,3,…s = 1, 2, 3, \dots:
      • Run MM on each wi∈Sw_i \in S for ss steps.
      • If MM accepts any wiw_i within ss steps, halt and accept.

If MM accepts at least one string of length 2014, the recognizer UU will eventually find it in a finite number of steps and halt. If MM does not accept any such string, UU will run forever. Thus, LL is recursively enumerable.

Therefore, LL is undecidable but recursively enumerable.

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

Published
Report a correction
Keep exploringMore Undecidability questions