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? $L$ is undecidable but recognizable. $L$ is decidable. $L$ is not recognizable. $L$ is co-recognizable but not recognizable. Theory of Computation goclasses theory-of-computation goclasses-cs-dpp goclasses-cs-dpp-day-139 goclasses-toc-practice-questions + – GO Classes 361 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
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. GO Classes answered Nov 22, 2025 GO Classes comment Share Follow 0 reply Please log in or register to add a comment.