IAE Academy

GATE 2018 CS Q.7: solution and answer

GATE 2018 · CSQ.7 · 1 mark · MCQ

The set of all recursively enumerable languages is

  1. (A)

    closed under complementation.

  2. (B)

    closed under intersection.

  3. (C)

    a subset of the set of all recursive languages.

  4. (D)

    an uncountable set.

See the question in the paper

Answer and solution

ANSWER

The set of all recursively enumerable languages is closed under intersection, so the answer is (B).

Official answer: BSource: Official answer key, GATE 2018 CS (IIT Guwahati)

  1. Recall the hierarchy: recursive languages recursively enumerable (RE) languages all languages over .

  2. (A) RE languages are not closed under complementation. If both and were RE, then would be recursive. Some RE languages are not recursive (for example the language of the halting problem), so their complements are not RE. (A) is false.

  3. (B) RE languages are closed under intersection. Given Turing machines and accepting and , build a machine that runs on the input and, if it accepts, runs on the same input, and accepts only if both accept. It accepts exactly , so the intersection is RE. (B) is true.

  4. (C) Every recursive language is RE, and there are RE languages that are not recursive. So RE is not a subset of the recursive languages. (C) is false.

  5. (D) Every RE language is accepted by some Turing machine, and each Turing machine can be encoded as a finite string over a finite alphabet. There are only countably many such strings, so there are only countably many RE languages. (D) is false.

  6. Only (B) holds.

KEY IDEA

RE languages are closed under union, intersection, concatenation and Kleene star, but not under complementation. A single machine that runs both Turing machines and accepts only if both accept gives intersection.

WATCH OUT FOR

Assuming RE languages are closed under complementation like recursive languages, or reversing the inclusion and treating RE as a subset of recursive. The correct inclusion is recursive inside RE.

From the GATE 2018 CS paper. Every question of this paper · Download the full paper · All 8 Turing machines questions, with notes

More Turing machines questions