10

On this site there are many variants on the question whether TMs can decide the halting problem, whether for all other TMs or certain subsets. This question is somewhat different.

It asks whether the fact the halting problem applies to all TMs can be decided by a TM. I believe the answer is no, and wish to check my reasoning.

  1. Define the meta-halting language $L_{MH}$ as the language composed of TMs that decide whether a TM halts.

$$L_{MH} = \{ M : \forall_{M',w} M(M', w) \text{ accepts if $M'(w)$ halts, rejects otherwise}\}$$

  1. $L_{MH}= \emptyset$ due to the halting problem.

Thus, the title question more precisely stated: is it decidable whether $L_{MH} = \emptyset$?

  1. Per Rice's theorem, it is undecidable whether an r.e. language is empty.
    In both cases, if $L_{MH}$ is or is not r.e., it is undecidable whether $L_{MH} = \emptyset$.

  2. Therefore, it is undecidable whether $L_{MH} = \emptyset$.

This proves a TM cannot decide whether the halting problem applies to all TMs.

Is my understanding correct?

UPDATE: I am trying to show that a TM cannot "prove the halting problem" for some definition of "prove" that seems intuitively correct. Below is an illustration of why I think this is correct.

We can create a TM $M_{MH}$ that generates $L_{MH}$ in the following way. The TM takes a tuple $(M_i,M_j,w_k,steps)$. It simulates $M_i(M_j, w_k)$ for $steps$ iterations. If $M_i$ accepts all $(M_j, w_k)$ pairs that halt, and rejects all others then $M_{MH}$ accepts $M_i$. Otherwise, it rejects $M_i$ if $M_i$ decides incorrectly or fails to halt.

$M_{MH}$ does not halt, because it must evaluate an infinite number of pairs for each $M_i$. Additionally, all the $M_i$s will fail to halt. $M_{MH}$ will be unable to accept or reject any $M_i$ as it will not know from the simulation that all $M_i$s will fail to halt. Thus, the language it defines is not r.e. and not decidable.

$M_{MH}$ captures my intuition of what I think it means for a TM to prove the halting problem. Other suggestions, such as $M_{MH}$ rejecting all $M_i$ or outputting a known proof give $M_{MH}$ prior knowledge that the halting problem applies to all $M_i$. This cannot count as $M_{MH}$ proving something since the $M_{MH}$'s premise is the conclusion it is proving, and thus is circular.

yters
  • 1,417
  • 2
  • 12
  • 21
  • 3
    Your fix doesn't help. A problem with no parameters is always decidable, either by a Turing machine that always outputs YES, or by one that always outputs NO. Your line of argument just doesn't work, unfortunately. The real analog of Gödel's theorem is Rice's theorem. – Yuval Filmus Jul 27 '16 at 07:03
  • @YuvalFilmus Does this fix help? – yters Jul 27 '16 at 08:29
  • 5
    "It asks whether the fact the halting problem applies to all TMs can be decided by a TM." -- that query does not make sense as the halting problem does not "apply" to a set of TMs. At least, I don't know what that's supposed to mean. – Raphael Jul 27 '16 at 09:54
  • @Raphael it means there is no TM that can decide for all TMs and ws that TM(w) halts. I define this formally in the question. – yters Jul 27 '16 at 09:59
  • 4
    You have misunderstood Rice's theorem. Rice's theorem states (in a special case) that the language ${ M : L(M) = \emptyset }$ is undecidable. It doesn't state that $\emptyset$ is undecidable; in fact, $\emptyset$ is decidable. – Yuval Filmus Jul 27 '16 at 11:34
  • @YuvalFilmus You misunderstand the question. We have a language $L_{MH}$ and are trying to figure out if it is empty or not. That is what "decide whether $L_{MH} = \emptyset$" means. If we already know $L_{MH} = \emptyset$ and need a TM to represent this set, then you'd be right. But that is not what I have written. Please state how I can clarify the question to eliminate this misunderstanding. – yters Jul 27 '16 at 12:37
  • 7
    I think the misunderstanding is in what the expression "deciding X" means. Formally, X should be a predicate on strings, and then a machine deciding X is one that on input s outputs the truth value of X(s). What is the predicate in your case? What is its input, and when is it true? – Yuval Filmus Jul 27 '16 at 12:40
  • 5
    The question is a category error. Decidability is a property of languages (sets of strings), not mathematical propositions. Any question of the form "Is $X$ decidable?" where $X$ is not a set of strings just doesn't make sense. – David Richerby Jul 27 '16 at 21:24
  • $X$ can be a predicate - a parametrized proposition. – reinierpost Mar 04 '17 at 22:40

4 Answers4

19

The language of Turing machines deciding the halting problem is decidable. A Turing machine that decides it simply always outputs NO.

In other words, $\emptyset$ is decidable.

You might be confused with the fact that the language of Turing machines whose language is empty is undecidable. That is, there is no Turing machine that, on input $T$, decides whether $L(T) = \emptyset$.

Yuval Filmus
  • 276,994
  • 27
  • 311
  • 503
  • The last point you added is what I am saying. Trivial properties themselves are decidable. But, it is not decidable whether a property is trivial. So, while it is true the language defines a trivial property, this truth itself is undecidable. – yters Jul 27 '16 at 06:50
  • 8
    The empty language is decidable. Deal with it. – Yuval Filmus Jul 27 '16 at 06:51
  • I think we are misunderstanding each other. I do not disagree the empty language is decidable. – yters Jul 27 '16 at 06:53
  • 15
    The language of Turing machines deciding the halting problem is empty. The empty language is decidable. Hence the language of Turing machines deciding the halting problem is decidable. – Yuval Filmus Jul 27 '16 at 06:54
  • 1
    The question is whether a TM can decide the language of Turing machines deciding the halting problem is empty. A TM cannot do this as I have shown above. – yters Jul 27 '16 at 12:40
  • 1
    @yters Are you asking whether a TM can prove that that language is empty? It can easily do so, by simply outputting an existing known proof. – user253751 Jul 27 '16 at 20:33
  • 3
    What does it even mean for a TM to prove something? – Yuval Filmus Jul 27 '16 at 20:36
  • @immibis yes, a TM can output a known proof, or be a trivial TM such as in answer http://cs.stackexchange.com/a/61002/17264. That is not what I am getting at, but it is clear I do not know how to correctly formulate my question, or I may just be confused about the issue. – yters Jul 27 '16 at 20:58
  • 1
    @YuvalFilmus: if $\varphi$ is a formalization of "something" in a given theory T, then a TM can enumerate the proofs of theory T until it finds a proof of $\varphi$ or a proof of $\neg \varphi$. If it halts then it has "(dis)proved" $\varphi$ otherwise $\varphi$ is unprovable in T. – Vor Jul 28 '16 at 10:19
  • @Vor This is your interpretation. I'm not sure it is the OP's. – Yuval Filmus Jul 28 '16 at 10:26
  • 1
    @YuvalFilmus: I, too, am not sure ... the OP ignored my quick answer :-) ... – Vor Jul 28 '16 at 10:33
  • @Vor, your interpretation is correct. I chose your answer. – yters Jun 11 '17 at 02:09
5

Another viewpoint: let $\varphi$ be a formalization of the statement "$L_{MH} = \emptyset$" in ZFC; (trivially) we have:

  • the set $P = \{ x \mid x \mbox{ is a valid proof of } \varphi \mbox{ in ZFC}\}$ is decidable;

  • you can also build a TM $M$ that enumerates the proofs in ZFC and halts if it founds a proof of $\varphi$ or a proof of $\neg \varphi$; clearly $M$ halts;

  • the set $\{ M \mid M \mbox{ decides } P \}$ is undecidable

Vor
  • 12,513
  • 1
  • 30
  • 60
2

You misunderstand Rice's theorem.

Rice's theorem, in this context, says that you can't decide the problem "Does T decide the empty language?".

Your problem is not about deciding whether an arbitrary Turing machine decides the empty language. Your problem is whether or not there exists an M that decides the empty language.

And such M do exist. You can do even better than that: you can actually construct such an M and provide a proof that it decides the empty language.

The general problem not being decidable does not mean you cannot solve specific instances. In fact, by the usual device of enumerating all proofs, there exists a turing machine that:

  • Accepts every turing machine for which a proof exists that it decides the empty language
  • Rejects every turing machine for which a proof exists that it does not decide the empty language
  • Does not halt if it cannot be proven either way.
1

The definition about decidability from Wikipedia:

A recursive language is a formal language for which there exists a Turing machine that, when presented with any finite input string, halts and accept if the string is in the language, and halts and rejects otherwise. The Turing machine always halts: it is known as a decider and is said to decide the recursive language.

In other words, it is decidable iff there is a Turing machine that decides all input strings. It is undecidable iff for each Turing machine, it doesn't decide all input strings, which means it could decide none or some strings, but there is at least one (but practically at least infinite of them) it cannot decide.

In your case, the trivial Turing machine doesn't decide for every input $L$, whether $L = \emptyset$, but it happens to know specifically whether $L_{MH} = \emptyset$.

user23013
  • 478
  • 2
  • 13