361 views
5 5 votes

Define the language:

$L=\{\langle M\rangle \mid M \text{ is a TM and there exists an input } w \text{ of length at most 100 such that} ~M \text{ halts on } w\}$.

Which of the following is true?
 

  1. $L$ is undecidable but recognizable.
     
  2. $L$ is decidable.
     
  3. $L$ is not recognizable.
     
  4. $L$ is co-recognizable but not recognizable.

1 Answer

4 4 votes

Understanding $\textbf{L}$:

We have to decide if a given Turing machine $\mathrm{M}$ halts on at least one input $w$ of length $\leq 100$.

Finite number of inputs:

The number of strings $w$ with $|w| \leq 100$ is finite. However, the halting problem for a fixed $w$ is undecidable.

Recognizability of $\textbf{L}$:

We can recognize $\mathrm{L}$ as follows:

  • Run $\mathrm{M}$ on all $w$ with $|w| \leq 100$ in parallel (dovetailing).
     
  • If any of these computations halts, we accept $\mathrm{\langle M\rangle}$.

    This procedure will halt if $\mathrm{M} \in \mathrm{L}$. If $\mathrm{M} \notin \mathrm{L}$, it runs forever.

    So $\mathrm{L}$ is recognizable (recursively enumerable).
     

Undecidability of $\textbf{L}$:

If $\text{L}$ were decidable, we could decide the halting problem for a fixed pair $(\mathrm{M}, w_0)$:

  • Construct $\mathrm{M}^{\prime}$ that ignores its input and runs $\mathrm{M}$ on $w_0$.
     
  • Then $\mathrm{M}^{\prime} \in \mathrm{L}$ iff $\mathrm{M}$ halts on $w_0$.

    This would solve the halting problem, which is impossible.

    So $\text{L}$ is undecidable.
     

Conclusion:

$\text{L}$ is recognizable but not decidable → Option A is correct.

Answer:
Position:
Show:

Related questions

3 3 votes
1 1 answer
349
349 views
GO Classes asked Nov 22, 2025
349 views
Consider a sequential circuit that detects the input sequence $\mathbf{101}$ on a serial input line $x$ (one bit per clock cycle) and produces an output $z$ as follows:In...
3 3 votes
1 1 answer
396
396 views
GO Classes asked Nov 22, 2025
396 views
Let $L$ be the language over $\Sigma=\{0,1\}$ defined by:$$L=\{w \mid \text { the binary number represented by } w \text { is divisible by } 11\} .$$(Interpret $w$ as a b...
5 5 votes
1 1 answer
273
273 views
GO Classes asked Nov 22, 2025
273 views
Let $G=(\{S, A, B\},\{a, b\}, R, S)$ be a context-free grammar, where the rules $R$ are:$$S \rightarrow a B|b A, \quad A \rightarrow a| a S|b A A, \quad B \rightarrow b| ...
3 3 votes
1 1 answer
327
327 views
GO Classes asked Nov 22, 2025
327 views
Let $G=(\{S\},\{(,)\}, R, S)$ be a context-free grammar, where the set of rules $R$ is$$S \rightarrow(S) S \mid \epsilon$$Which of the following statements is true? $G$ i...