I have 1 problem :-->

L = { < M > | TM halts on no inputs }

I have solved the above problems by reductions given in the book and even there are many links in stackexchange site. I have no problems in the reduction method.

But, just trying to be more curious, I tried to solved these problems by using rice theorem. I know that rice theorem is applied on the property of languages and here it is property of TM's but i tried some conversion here .

Though, I am getting the right answer but i want to confirm is what i have tried is legal or Can It be solved like this ?

As the TM halts on no inputs, which means it is not halting on the inputs in the language as well as inputs not in the language.

So, I wrote it as 

L = { < M > | L(M) = PHI } 

which is surely a non trivial property and as well as non monotonic property, hence the language is Undecidable and as well as Non RE.

Well, I am new to this topic. So, i don't know whether I am right in the conversions or Can I assume something like this. Please correct me if i am being stupid .

  • 1
    $\begingroup$ What is PHI? Emptyset? Can you correct please? $\endgroup$ Commented Mar 11, 2017 at 7:59

3 Answers 3


Rice's theorem cannot be used to show the undecidability of these two languages.

Most of the incorrect attempts that I have come across, are based on the misunderstanding that the notion of property is a vague notion from everyday life. However, a property means something very precise in the context of computability theory: A property is a class of Turing-recognizable languages.

Rice's theorem can be applied whenever we are faced with a non-trivial class of Turing-recognizable languages $\mathcal{S}$, that is, a class of Turing-recognizable languages that is neither the empty class or the class of all Turing-recognizable languages. Rice's theorem tells us that if $\mathcal{S}$ is a non-trivial class of Turing-recognizable languages, then

$$L_{\mathcal{S}} = \{ \langle M \rangle \mid M \text{ is a Turing machine such that } L(M) \in \mathcal{S} \}$$

is undecidable.

But there is no class of recognizable languages that corresponds to

$$A = \{ \langle M \rangle \mid M \text{ halts on no input} \}$$

For consider the Turing machines $M_1$:

"On input $x$, loop forever"

and $M_2$:

"On input $x$, reject"

We have that $\langle M_1 \rangle \in A$ but $\langle M_2 \rangle \notin A$, while we also have $L(M_1) = L(M_2)$.

Similarly, there is no class of languages that corresponds to

$$B = \{ \langle M \rangle \mid M \text{ halts on at least one input} \}$$

Here, we can choose $M_1$ as

$M_1:$ "On input $x$, if $x = aa$ then reject, else loop forever"

and $M_2$ as

$M_2:$ "On input $x$, loop forever"

Again we have that $\langle M_1 \rangle \in B$ but $\langle M_2 \rangle \notin B$, while we also have $L(M_1) = L(M_2)$.

A correct application of Rice's theorem to a decision problem about Turing machines must identify a non-trivial class of Turing-recognizable languages that the decision problem corresponds to.

See my note http://people.cs.aau.dk/~hans/ANoteOnRicesTheorem.pdf for more about correct applications of Rice's theorem as well as a discussion of incorrect applications of the theorem.


Yes, your application of Rice's theorem is correct.

Let me present Rice's Theorem in a different way (in fact, closer to the original presentation). Suppose to have an acceptable enumeration of partial computable function $\varphi: N \to PC$. We say that a set $A \subseteq N$ is extensional with respect to $\varphi$ if it is the counter image of some subset $F \subseteq PC$ of computable functions, i.e.

$$A = \varphi^{-1}(F)$$

This is equivalent to require that $A$ is closed w.r.t. $\varphi$:

$$i \in A \wedge \varphi_i = \varphi_j \Rightarrow j \in A$$

Stated in another way, this means that a program is or not in $A$ independently from the way it written, but only according to the function it computes (its behaviour).

Rice's theorem states that an extensional set is recursive if and only if it is trivial. This of course applies to your case.

The theorem can also be stated for r.e. sets. Consider an effective enumeration of r.e. set, $W: N \to RE$ (for instance, you can take $W_i = dom(\varphi_i)$.

In this case the notion of "extensionality" is relative to $W$. Again, an extensional set $A \subseteq N$ is recursive if and only if $A$ is trivial.

In the context of languages, it would be better to consider acceptance on termination only.


Just a rule of thumb:-

Rice's theorem concerns properties of languages, not the Turing machines.

Consider property P as the set of some R.E. languages, P is nontrivial if it does not contains all R.E. languages and is not empty, then Rice's theorem is based on proving that the language ${L = \{ \lt M \gt |\ M \ is \ a\ Turing\ machine\ and\ L(M) \in P\}}$

is undecidable.

Now coming to your question, the first language you are trying to prove undecidable is:-

L1 = { < M > | TM halts on no inputs }

Here there is no property that is enclosed in L1, but the way you have transformed it to ${\{ < M > | L(M) = \phi \}}$ does bothers a property P = ${\{ L : L \subset \sum*\ and\ L=\phi \}}$. So applying Rice's theorem to the transformed language is perfectly valid, but you have implicitly carried a reduction from L1 to the transformed language.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.