1

Let an infinite language, $L$, which contains only TM which halt for every input (meaning, decides some language). Is $L$ in $R$ ? in $RE \setminus R$ ?

I've understood that the answer is: it depends on what exactly $L$ is.

So basically I'm trying to think of two scenarios for $L$ - one which $L\in R$ and one which $L\in RE \setminus R$, but haven't come up with something useful so far.

I'd be glad for help.

François
  • 671
  • 5
  • 16
Elimination
  • 399
  • 4
  • 13

2 Answers2

4

The empty set $\emptyset$ satisfies trivially the constraint as all the TM it contains (actually none) halt for all input. But the emptys set is also in $R$ since it is very easy to decide whether a TM is in it: the answer is always NO. But unfortunately, this example cannot be used, because we hav a requirement that the set $L$ of TM be infinite (Thanks to @FrançoisG for reminding me).

So we choose another simple counter example, the set $L_{\emptyset,0}$ of TM recognizing the empty language that halt and reject after 0 steps, but may have a lot of useless states and transitions. There is also an infinite number of such machines, and it is easy to see by inspection of its transitions whether a TM is in $L_{\emptyset,0}$. Thus $L_{\emptyset,0}$ is infinite and recursive.

Since the set $L_{\emptyset,0}$ is recursive, there is a computable bijection $\phi: \mathbb N\to L_{\emptyset,0}$

Then given any subset $S$ of $\mathbb N$, we can get get with the bijection $\phi$ a subset $\phi(S)\subset L_{\emptyset,0}$ which has the same level of computability.

Thus if we take any non-recursive RE subset $S_{RE\setminus R}\in\mathbb N$, we have $\phi(S_{RE\setminus R})\subset L_{\emptyset,0}$ which is RE but not recursive. And it contains only (Gödel indexes of) TM machines that always halt.

Of course, other levels of computability can be obtained in the same way.

babou
  • 19,645
  • 43
  • 77
3

$L$ can indeed be "everything".

  • Let $L$ the set of Turing machines that

    • always move right,
    • never write to the tape, and
    • halt when they read the blank symbol.

    Clearly, we can decide these critera from inspecting the transition matrix.

    Note that this is not the set of all TMs that decide regular languages, since that set is not recursive (by Rice's theorem).

  • Let $L$ the set of all TMs of primitive recursive functions. This set is known to be recursively enumerable, but it is by Rice's theorem of course not recursive. Hence, $L \in RE \setminus R$.

  • Let $L$ the set of all TMs that always halt, i.e. the set of all TMs that accept languages from $R$. We know that this set is not recursively enumerable, so $L \not\in RE$.

Note how all three languages are infinite and contain only (descriptions of) TMs that always halt.

Raphael
  • 73,212
  • 30
  • 182
  • 400