Recursive Enumerable (RE) or Type-0 Language
A language is recursively enumerable (RE) or Turing-recognisable if there exists a Turing machine that accepts every string in the language. For any string in the language the machine eventually enters an accepting (final) state; for strings not in the language the machine may either reject or run forever (loop). RE languages are exactly the languages generated by Type-0 grammars.
A language is recursive (also called Turing-decidable) if there exists a Turing machine that halts on every input and correctly decides membership: it accepts when the input is in the language and rejects when it is not. Every recursive language is recursively enumerable, but the converse need not hold.
Example: L = {anbncn | n ≥ 1} is recursive because a Turing machine can be constructed to check equal numbers of a, b and c by suitable marking and counting; the machine always halts with the correct answer.
The containment relationship is: REC ⊆ RE. (REC is a proper subset of RE in general.)
Example for concatenation: L1 = {anbncn | n ≥ 0} L2 = {dmemfm | m ≥ 0} L3 = L1·L2 = { anbncndmemfm | n ≥ 0, m ≥ 0 } is recursive.
Note: As opposed to REC languages, RE languages are not necessarily closed under complement; the complement of an RE language need not be RE.
1.For every non-deterministic TM, there exists an equivalent deterministic TM.
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.
A.1 and 4
B.1 and 3
C.2
D.3
Solution:
Statement 1 is true: every non-deterministic Turing machine can be simulated by a deterministic Turing machine (non-determinism does not add to the class of languages recognised by Turing machines).
Statement 2 is false: Turing-recognisable (RE) languages are closed under union but not closed under complementation in general.
Statement 3 is true: Turing-decidable (recursive) languages are closed under intersection and complementation.
Statement 4 is true: Turing-recognisable languages are closed under union and intersection.
A.Neither L nor L' is RE.
B.One of L and L' is RE but not recursive; the other is not RE.
C.Both L and L' are RE but not recursive.
D.Both L and L' are recursive.
Solution:
Option A: viable. It is possible that neither L nor L' is RE.
Option B: viable. One may be RE (but not recursive) while the other is not RE; RE is not closed under complementation.
Option C: not viable. If both L and L' were RE then both would be recursive (because a language whose complement is also RE is decidable), so they cannot be both RE but not recursive.
Option D: viable. If L is recursive then so is L'.
Thus option C is not a viable possibility.
A.L1′ is recursive and L2′ is recursively enumerable
B.L1′ is recursive and L2′ is not recursively enumerable
C.L1′ and L2′ are recursively enumerable
D.L1′ is recursively enumerable and L2′ is recursive
Solution:
L1 is recursive, so L1′ is recursive (recursive languages are closed under complement). L2 is RE but not recursive; since RE need not be closed under complement, L2′ need not be RE (indeed for many standard RE but not recursive languages, the complement is not RE). Therefore option B is correct.
Alan Turing introduced the Turing machine model in 1936. The Turing machine is a fundamental model of computation that captures the intuitive notion of algorithmic computation and recognises recursively enumerable languages.
A (single-tape) Turing machine can be described as the 7-tuple (Q, Σ, Γ, δ, q0, B, F), where:
The transition function δ for this machine is shown in the table below.
We trace the machine on the input 0011. Initially the head is on the leftmost symbol and the machine is in state q0.
First move: δ(q0, 0) = (q1, X, R). The machine writes X in place of the first 0, moves right and goes to state q1.
Next moves: δ(q1, 0) = (q1, 0, R) - the machine scans right over any 0s without changing them.
When it sees 1: δ(q1, 1) = (q2, Y, L). It replaces that 1 by Y, moves left and goes to state q2.
Continuing similarly, the machine will match each 0 with a corresponding 1, mark them with X and Y, and finally reach state q3 with the head on a blank. The move δ(q3, B) = halt causes acceptance.
The table is interpreted as illustrated below. The entry (q1, 1, R) in row q0 and column 1 signifies that if M is in state q0 and reads 1 on the current tape square, then it writes 1 on the same tape square, moves its tape head one position to the right and transitions to state q1. Which of the following statements is true about M?
Solution:
Consider the input string 1. Initially the machine is in q0 and the head is on the single symbol 1.
Using δ(q0, 1) = (q1, 1, R), the machine moves to state q1 and the head moves right.
Now the head reads the blank B. Using δ(q1, B) = (q0, B, L), the machine moves back to state q0 and the head moves left.
The machine repeats the same moves and never halts on input 1.
Option D claims the machine halts on all strings ending with 1, but we have found a counterexample (the string 1), so D is incorrect.
Consider the input string 0. The machine similarly cycles and does not halt.
Hence option C is also incorrect.
Option B asserts the machine does not halt on any string in (00 + 1)*, but the empty string is in (00 + 1)* and the machine halts on the empty input because δ(q0, B) = halt.
Therefore option A is the only correct statement: M does not halt on any non-empty string in (0 + 1)+.
A decision problem (language) is decidable if there exists a Turing machine that always halts and answers yes or no correctly for every input. Decidable problems have algorithms that terminate for every input.
Examples:
A problem is undecidable if no Turing machine can always halt and correctly decide the problem for every input. Undecidable problems have no algorithm that terminates on all inputs with the correct yes/no answer.
Examples:
Two classical undecidable problems are the Halting Problem for Turing machines and the Post Correspondence Problem (PCP).
A problem is semi-decidable (or semi-decidable/partially decidable) if there is a Turing machine that halts and accepts precisely the yes-instances, but for no-instances it may reject or loop forever. Semi-decidable problems correspond to RE languages.
Rice's Theorem: Every non-trivial semantic property of recursively enumerable languages is undecidable. Informally, any non-trivial question about the language recognised by a Turing machine (as opposed to its syntactic description) is undecidable. For example, given a Turing machine M, asking whether L(M) has a particular non-trivial property is undecidable.
We use reducibility to transfer decidability or undecidability from one language to another.
Language A is reducible to language B (written A ≤ B) if there exists a computable function f such that for every string w:
w ∈ A <=> f(w) ∈ B
Theorems:
A. 3 only
B. 3 and 4 only
C. 1, 2 and 3 only
D. 2 and 3 only
Explanation:
Hence options 2 and 3 are undecidable; answer D is correct.
A. 1,2,3,4
B. 1,2
C. 2,3,4
D. 3,4
Explanation:
Therefore options 3 and 4 are decidable; answer D is correct.
A. P3 is undecidable if P2 is reducible to P3
B. P3 is decidable if P3 is reducible to P2's complement
C. P3 is undecidable if P3 is reducible to P2
D. P3 is decidable if P1 is reducible to P3
Explanation:
Thus, option A is the correct choice.
| 1. What is a Turing Machine and how does it relate to computer science engineering? | ![]() |
| 2. What is undecidability in the context of computer science engineering? | ![]() |
| 3. Can you provide an example of an undecidable problem related to Turing Machines? | ![]() |
| 4. How does the concept of undecidability impact the field of computer science engineering? | ![]() |
| 5. Are there practical applications of undecidable problems in computer science engineering? | ![]() |
![]() | Explore Courses for Computer Science Engineering (CSE) exam |
![]() | Get EduRev Notes directly in your Google search |