patternMinor
Deciding Recursive/Recursively Enumerable when given Turning machine encoding as a language
Viewed 0 times
recursivelylanguageenumerablerecursiveturningdecidingwhenmachineencodinggiven
Problem
Let $L_{1}$ and $L_{2}$ be two languages defined as follows :
$L_1 = \{ \langle M\rangle \mid L(M) \neq \emptyset \}$
$L_2 = \{ \langle M\rangle \mid L(M) = \emptyset \}$
where $\langle M\rangle$ denotes the encoding of a Turing Machine $M$.
$L_{1}$ is the set of encodings of TMs that accept at least one string (i.e. the with non-empty languages), and $L_{2}$ is the set of encodings of TMs that do not accept any string (i.e. with empty lanugages). By making a language out of such encodings, I am essentially asking a Turing Machine to decide on another Turing machine as to whether the second TM has an empty language or not. This is essentially the halting problem, and so both languages are undecidable.
Now, I am not able to characterize $L_{1}$ and $L_{2}$ from among
$L_1 = \{ \langle M\rangle \mid L(M) \neq \emptyset \}$
$L_2 = \{ \langle M\rangle \mid L(M) = \emptyset \}$
where $\langle M\rangle$ denotes the encoding of a Turing Machine $M$.
$L_{1}$ is the set of encodings of TMs that accept at least one string (i.e. the with non-empty languages), and $L_{2}$ is the set of encodings of TMs that do not accept any string (i.e. with empty lanugages). By making a language out of such encodings, I am essentially asking a Turing Machine to decide on another Turing machine as to whether the second TM has an empty language or not. This is essentially the halting problem, and so both languages are undecidable.
Now, I am not able to characterize $L_{1}$ and $L_{2}$ from among
- not recursively enumerable
- recursively enumerable but not recursive
- recursive
Solution
As you note, both languages are undecidable, so neither are recursive. Then the remaining possiblities are recursively enumerable or not.
Note that $L_{1} = \overline{L_{2}}$, so if they were both recursively enumerable, then they would both be recursive, so we know at least one is not even recursively enumerable.
It turns out that $L_{1}$ is recursively enumerable, given an input $\langle M\rangle$ we can simulate $M$ on all strings over the alphabet by interleaving the execution of $M$ on each string. It may take a long time, but if $M$ accepts something, we eventually (in finite time) find it, so we can recognise that $\langle M\rangle \in L_{1}$.
Then simply by logical deduction, $L_{2}$ can't be recursively enumerable, as it is already co-r.e., but not recursive.
Note that $L_{1} = \overline{L_{2}}$, so if they were both recursively enumerable, then they would both be recursive, so we know at least one is not even recursively enumerable.
It turns out that $L_{1}$ is recursively enumerable, given an input $\langle M\rangle$ we can simulate $M$ on all strings over the alphabet by interleaving the execution of $M$ on each string. It may take a long time, but if $M$ accepts something, we eventually (in finite time) find it, so we can recognise that $\langle M\rangle \in L_{1}$.
Then simply by logical deduction, $L_{2}$ can't be recursively enumerable, as it is already co-r.e., but not recursive.
Context
StackExchange Computer Science Q#7860, answer score: 3
Revisions (0)
No revisions yet.