# Show $USELESS_{TM}=\{ M | M$ is a Turing machine with at least one useless state$\}$ is recursively enumerable?

I know $USELESS_{TM}$ is undecidable, but am having trouble showing that it is recursively enumerable. I wanted to reduce $USELESS_{TM}$ to the halting problem, which would show that $USELESS_{TM}$ is recursively enumerable but don't see a way to go about doing this. (I think I would need to check every possible input to see if a state is not entered which I don't know how to simulate using a halting problem subroutine.)

• what's a useless state? – jkabrg Nov 21 '17 at 16:57
• A state is useless if it is never entered on any input. – user79943 Nov 21 '17 at 17:07

The reason you are struggling to reduce USELESS to the Halting problem might be that it is not recursively enumerable after all. Since you already have a proof of undecidability, it is enough to see that USELESS is co-ce:

Given some TM M, we enumerate all its states as $s_1$ ... $s_n$. We can search through potential inputs $w_0,w_1,\ldots$ and mark each state that one of the computation visits. If we ever mark all states, we halt. This gives a procedure that recognizes exactly the complement of USELESS.

• Thank you for clarifying! No wonder I was having so much trouble... co-ce means not recursively enumerable right? – user79943 Nov 21 '17 at 17:29
• co-ce means that the complement of the language is recursively enumerable (=ce). If a language is both ce and co-ce, then it is decidable. So an undecidable language can be at most one out of c.e. and co-c.e. – Arno Nov 21 '17 at 18:08

Have you used Rice theorem to show that's it's undecidable ? If so, it also shows that the problem can be transformed to the halting problem, because the proof of Rice theorem contains that transformation. You can easily find that proof and see how the transformation is accomplished.

But, are you sure that reducing your set to the halting problem shows that it's recursively enumerable ?

• Rice' theorem does not apply here. – Arno Nov 21 '17 at 17:16
• Why doesn't it ? – user80502 Nov 21 '17 at 17:21
• Because the property we are dealing with does not just depend on the function computed by the TM, but on the specific implementation. – Arno Nov 21 '17 at 17:22
• Yes, you are right. Haven't noticed that. – user80502 Nov 21 '17 at 17:26