Recursive Language · Theory of Computation
14 questions · asked in 13 of 27 years (2000–2026)
MCQ 11 · MSQ 31-mark 12 · 2-mark 2
Questions 11–14 of 14
Answer: (B)
: suppose were recursively enumerable. Then and would both be recursively enumerable. Run a machine for each on the same input in parallel. Exactly one of them accepts, so we would know the answer in finite time, and would be recursive. That contradicts the given fact. So is not recursively enumerable.
This rules out (A), (C) (they say is recursively enumerable) and (D) (it says is recursive).
Answer: (B)
{wi # wj : wi, wj L1, i j}.
Here # is a new symbol. Consider the following assertions.
S1 : L1 is recursive implies L2 is recursive
S2 : L2 is recursive implies L1 is recursive Which of the following statements is true ?Answer: (A)
S1 is true. Let D decide . Given input x, check that x has the form with u, v over . Run D on u and on v, and reject if either is not in . If both are in , algorithm A will list both of them. Run A until both have appeared, then accept exactly when u appears before v (that is, ). This always halts, so is recursive.
S2 is true. Let D2 decide . If is empty, it is recursive. Otherwise let be the first word A lists. Given a word x: if , accept. Otherwise give to D2. If x is in and , then x is some with , so is in and D2 accepts. If x is not in , D2 rejects. So is recursive. (The case is handled separately because is strict.)
Answer: (A)
Which of the following statements is true ?
Answer: (A)
Correct Option: A
The language is recursive. Take the case when holds. Then equals , and this is recursive (in fact it is regular). Otherwise, we get , and this is again recursive. So whichever case is true, is recursive.
Answer: (A)
A recursive language has a total Turing machine. This is a machine that always halts, and it either accepts or rejects. If we complement a recursive language, we swap accept and reject in that machine, as in the figure. It still always halts, so the complement is also recursive. This makes (A) true.
A recursively enumerable language has a Turing machine with three possible outcomes: accept, reject or loop. So its complement may be recursively enumerable, or it may not even be recursively enumerable. For example, the halting language is RE, but its complement is not. So (B) is false.
Context-free languages are not closed under complement. Take and , which are context-free. Their intersection is not context-free. If CFLs were closed under complement, they would be closed under intersection too (as ). So (D) is false.
Option (C) says the complement of a recursive language is recursive or recursively enumerable. This is also true, because a recursive complement is already one of the two. But it is weaker than (A), which says exactly what the complement is. So (A) is the best option.
Answer: (A)
Keep practising