Turing Machine · Theory of Computation
13 questions · asked in 12 of 27 years (2000–2026)
MCQ 12 · MSQ 11-mark 6 · 2-mark 7
2000Questions per year2026
Questions 1–5 of 13
Which one of the following statements is equivalent to the following assertion?
Turing machine decides the language
Turing machine decides the language
Answer: (D)
Saying that a Turing machine "decides" a language means that is a total decider for . It must halt on every input. Its halting result must also sort strings correctly: it accepts every string that is in , and it rejects every string that is not in (that is, every string in ).
Halting on all inputs is not enough alone, because it does not say whether the accept or reject result is correct. "Accepts all of " alone is not enough, and "rejects all of the complement" alone is not enough either. Each one covers only one direction. Only both conditions together are equivalent to "decides ."
Answer: M accepts all strings in L and rejects all strings in {0,1}*-L
Halting on all inputs is not enough alone, because it does not say whether the accept or reject result is correct. "Accepts all of " alone is not enough, and "rejects all of the complement" alone is not enough either. Each one covers only one direction. Only both conditions together are equivalent to "decides ."
Answer: M accepts all strings in L and rejects all strings in {0,1}*-L
Which of the following is/are undecidable?
One or more options are correct.
Answer: (A), (B), (C)
(B) "L(M) is regular" and (C) "M accepts all strings" are non-trivial properties of the language of a single TM: some machines have the property and some do not. By Rice's theorem both are undecidable.
(A) Equality of two TM languages is undecidable too. Reduce from (C): for a given M, take as a machine that accepts every string. Then exactly when M accepts all strings. If equality were decidable, so would (C) be.
(D) is decidable. In steps a TM can read only the first input symbols, so its behaviour in those steps depends only on that prefix. It is enough to run M for steps on each of the finitely many strings of length up to (the alphabet is finite) and check that none halts within steps.
Answer: (A), (B), (C)
(A) Equality of two TM languages is undecidable too. Reduce from (C): for a given M, take as a machine that accepts every string. Then exactly when M accepts all strings. If equality were decidable, so would (C) be.
(D) is decidable. In steps a TM can read only the first input symbols, so its behaviour in those steps depends only on that prefix. It is enough to run M for steps on each of the finitely many strings of length up to (the alphabet is finite) and check that none halts within steps.
Answer: (A), (B), (C)
For a Turing machine M, < M > denotes an encoding of M. Consider the following two languages.
Which one of the following options is correct?
Which one of the following options is correct?
Answer: (A)
M can read only the first 2021 input symbols within 2021 steps. So whether M takes more than 2021 steps depends only on inputs of length at most 2021. These inputs are a finite set.
Run M for 2022 steps on each of these inputs. This check decides L1 (all inputs) and also L2 (some input).
Answer: Both L1 and L2 are decidable
Run M for 2022 steps on each of these inputs. This check decides L1 (all inputs) and also L2 (some input).
Answer: Both L1 and L2 are decidable
Which of the following languages are undecidable? Note that indicates encoding of the Turing machine .
{ on input w reaches state q in exactly 100 steps}
{ on input w reaches state q in exactly 100 steps}
Answer: (A)
Check each language:
- (empty language): a non-trivial property of L(M) undecidable by Rice.
- : simply run M on w for 100 steps decidable.
- (L(M) not recursive): a non-trivial property undecidable.
- (at least 21 strings): a non-trivial property undecidable.
Answer: and only
- (empty language): a non-trivial property of L(M) undecidable by Rice.
- : simply run M on w for 100 steps decidable.
- (L(M) not recursive): a non-trivial property undecidable.
- (at least 21 strings): a non-trivial property undecidable.
Answer: and only
Consider the following problems. L(G) denotes the language generated by a grammar G. L(M) denotes the language accepted by a machine M.
(I) For an unrestricted grammar G and a string w, whether wL(G)
(II) Given a Turing machine M, whether L(M) is regular
(III) Given two grammars G1 and G2, whether L(G1) = L(G2)
(IV) Given an NFA N, whether there is a deterministic PDA P such that N and P accept the same language.
Which one of the following statements is correct?
(I) For an unrestricted grammar G and a string w, whether wL(G)
(II) Given a Turing machine M, whether L(M) is regular
(III) Given two grammars G1 and G2, whether L(G1) = L(G2)
(IV) Given an NFA N, whether there is a deterministic PDA P such that N and P accept the same language.
Which one of the following statements is correct?
Answer: (D)
Let us look at each statement one by one:
- I: Membership for an unrestricted grammar is the same as TM acceptance so it is undecidable.
- II: Whether L(M) is regular is a Rice theorem case so it is undecidable.
- III: Equivalence of two grammars (even CFGs) is undecidable.
- IV: The language of an NFA is regular, and every regular language has a DPDA so the answer is always yes and it is decidable.
Answer: Only I, II and III are undecidable
- I: Membership for an unrestricted grammar is the same as TM acceptance so it is undecidable.
- II: Whether L(M) is regular is a Rice theorem case so it is undecidable.
- III: Equivalence of two grammars (even CFGs) is undecidable.
- IV: The language of an NFA is regular, and every regular language has a DPDA so the answer is always yes and it is decidable.
Answer: Only I, II and III are undecidable
Keep practising