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 6–10 of 13
Let A and B be finite alphabets and let # be a symbol outside both A and B. Let f be a total function from A* to B*. We say f is computable if there exists a Turing machine M which given an input x in A*, always halts with f(x) on its tape. Let denote the language {x#f(x)|xA*}. Which of the following statements is true:
Answer: (A)
The alphabets are finite, so the strings of can be listed one by one in order.
Suppose f is computable. Given the input , run the machine for f on x and compare the output with y. It always halts, so is recursive.
Suppose is recursive, with a decider D. Given x, go through the strings y of in order and run D on . Since f is total, the string is found after finitely many tries, and the search stops. So f is computable.
So f is computable if and only if is recursive.
(C) and (D) say that the converse fails, but the converse holds, so both are false. (B) can also be proved by running a recogniser on all in parallel (dovetailing), but (A) is the stronger and direct statement.
Answer: (A)
Suppose f is computable. Given the input , run the machine for f on x and compare the output with y. It always halts, so is recursive.
Suppose is recursive, with a decider D. Given x, go through the strings y of in order and run D on . Since f is total, the string is found after finitely many tries, and the search stops. So f is computable.
So f is computable if and only if is recursive.
(C) and (D) say that the converse fails, but the converse holds, so both are false. (B) can also be proved by running a recogniser on all in parallel (dovetailing), but (A) is the stronger and direct statement.
Answer: (A)
Consider the following languages.
L1 = {M |M takes at least 2016 steps on some input},
L2 = {M| M takes at least 2016 steps on all inputs} and
L3 = {M|M accepts },
where for each Turing machine M, M denotes a specific encoding of M. Which one of the following is TRUE?
L1 = {M |M takes at least 2016 steps on some input},
L2 = {M| M takes at least 2016 steps on all inputs} and
L3 = {M|M accepts },
where for each Turing machine M, M denotes a specific encoding of M. Which one of the following is TRUE?
Answer: (C)
In t steps a TM can read at most the first t cells of the input. So for the first 2016 steps, M behaves on a long input exactly as it does on the prefix of that input of length 2016. If M takes at least 2016 steps on some (or every) input, the same holds for the prefixes. So only the finitely many inputs of length up to 2016 need to be checked.
L1: simulate M for 2016 steps on each such input; accept if any of them has not halted. L2: do the same, and accept only if all of them have not halted. Both procedures always stop, so L1 and L2 are recursive.
L3 (M accepts ) is a non-trivial property of L(M): some machines accept and some do not. By Rice's theorem it is undecidable, so L3 is not recursive.
Answer: (C)
L1: simulate M for 2016 steps on each such input; accept if any of them has not halted. L2: do the same, and accept only if all of them have not halted. Both procedures always stop, so L1 and L2 are recursive.
L3 (M accepts ) is a non-trivial property of L(M): some machines accept and some do not. By Rice's theorem it is undecidable, so L3 is not recursive.
Answer: (C)
Consider the following statements.
I. The complement of every Turing decidable language is Turing decidable
II. There exists some language which is in NP but is not Turing decidable
III. If L is a language in NP, L is Turing decidable
Which of the above statements is/are true?
I. The complement of every Turing decidable language is Turing decidable
II. There exists some language which is in NP but is not Turing decidable
III. If L is a language in NP, L is Turing decidable
Which of the above statements is/are true?
Answer: (D)
Let us check the statements one by one:
- I: Decidable languages are closed under complement True
- II: A (time-bounded) Turing machine decides every language in NP False
- III: The same reason holds True
Answer: Only I and III
- I: Decidable languages are closed under complement True
- II: A (time-bounded) Turing machine decides every language in NP False
- III: The same reason holds True
Answer: Only I and III
Let be the encoding of a Turing machine as a string over ={0,1}.
Let L = { |M is a Turing machine that accepts a string of length 2014}.
Then, L is
Let L = { |M is a Turing machine that accepts a string of length 2014}.
Then, L is
Answer: (B)
Recursively enumerable: Run M on every string of length 2014 at the same time (dovetailing). If M accepts any one of them, accept.
Undecidable: This is a non-trivial property of the language of M. So Rice's theorem says it is undecidable.
Answer: undecidable but recursively enumerable
Undecidable: This is a non-trivial property of the language of M. So Rice's theorem says it is undecidable.
Answer: undecidable but recursively enumerable
Which of the following statements is/are FALSE?
1. For every non-deterministic Turing machine, there exists an equivalent deterministic Turing machine.
2. Turing recognizable languages are closed under union and complementation.
3. Turing decidable languages are closed under intersection and complementation.
4. Turing recognizable languages are closed under union and intersection.
1. For every non-deterministic Turing machine, there exists an equivalent deterministic Turing machine.
2. Turing recognizable languages are closed under union and complementation.
3. Turing decidable languages are closed under intersection and complementation.
4. Turing recognizable languages are closed under union and intersection.
Answer: (C)
Go through each statement:
- 1: NTM and DTM have equal power True
- 2: RE languages are not closed under complement False
- 3: Decidable languages are closed under intersection and complement True
- 4: RE languages are closed under union and intersection True
Answer: 2 only
- 1: NTM and DTM have equal power True
- 2: RE languages are not closed under complement False
- 3: Decidable languages are closed under intersection and complement True
- 4: RE languages are closed under union and intersection True
Answer: 2 only
Keep practising