# Is the language that consists of machine configurations whose language is a subset of even palindromes semi-decidable?

Let $PAL = \{ww^R\ | w\in\{0,1\}^*\}$.

Then let $A = \{\langle M\rangle \ | \textit{M is a Turing Machine and } L(M)\subseteq PAL\}$

Is A semi-decidable (Turing recognizable or recursively enumerable)?

My try!

I said it is so here is my proof, tell me if I am way off base or tell me if A ought not to semi-decidable in the first place.

$\underline{Proof}$

A is semi-decidable by The Certificate Theorem, which states that:

If $A\subseteq\Sigma^*$ then $A\in SD$(semi-decidable) iff there is some decidable relation, $R\subseteq \Sigma^* \times \Sigma^*$, such that $\forall x\in\Sigma^*$, $x\in{A}$ iff $\exists y$ such that $R(x,y)$ holds.

We know that if $x\in{A}$ that means that $x=\langle M\rangle$, so we can choose $y = \langle M,w\rangle$ where $w\in{PAL}$. What we know is that when $M$ takes $w$ as an input it will accept (since we choose $w$ as an input), if that is the case then $w\in{L(M)}\subseteq{PAL}$. That means that $A\in{SD}$. QED

Any help would be greatly appreciated, have a great day!

## 2 Answers

What you have shown is that the language of Turing machines accepting at least one even palindrome is semi-decidable. However, your question is interested in the language of Turing machines accepting only even palindromes, which is rather different. The complement of this language is the language of Turing machines accepting at least one word which isn't an even palindrome, and so the complement is semi-decidable according to your argument. This still leaves open the question of whether the original language is semi-decidable (and so decidable).

• Thank you for the response. Can you give a suggestion on how to tackle this problem? – InsigMath Oct 20 '13 at 20:05
• @InsigMath Hint: Rice's theorem. – David Richerby Oct 20 '13 at 20:39
• We have not learned Rice's Theorem so I don't think it would be appropriate (well okay we have been shown it passively but told not to ever rely on it). – InsigMath Oct 20 '13 at 20:43
• @Yuval: I don't think that "the complement of this language is the language of Turing machines rejecting at least one even palindrome". – Dai Oct 20 '13 at 20:47
• @InsigMath Go read this. Congratulations: you just learned Rice's theorem. OK, if a question specifically states you're supposed to do something from first principles, then you should do that; but there's no such thing as knowledge that it would be inappropriate to use. (Except for insider-trading. ;-) ) – David Richerby Oct 20 '13 at 20:52

My first hint is that your proof of $A \in SD$ is wrong. Assume that $M$ accepts only even palindromes, how are we supposed to certify that?

However, if you look at $\bar{A}$, which consists of $\langle M \rangle$ such that $L(M) \not \subseteq PAL$, so $M$ must accept some string which not even palindrome. Hint: Can we apply the Certificate Theorem for this case? If so then $\bar{A} \in SD$.

It remains to show if $\bar{A}$ is decidable. If you can show that $\bar{A}$ is undecidable, then we can easily conclude $A\not \in SD$. (How?)

• Thank you, I guess I got this backwards since I wanted to show that $\overline{A}$ was not semi-decidable by means of reduction. I will think of showing that $\overline{A}$ is semi-decidable then. – InsigMath Oct 20 '13 at 20:50
• I'm still getting used to how to approach these problems ... thank you for the help though! – InsigMath Oct 20 '13 at 20:51
• Yeah now that I think about it, showing that $\overline{A}$ is semi-decidable by means of the Certificate Theorem would not be too difficult. Then showing it is not decidable by a reduction with maybe the universal Turing machine would not be too hard either... cause I know that if $\overline{A}$ is not decidable, that means that $A$ must also not be semi-decidable! – InsigMath Oct 20 '13 at 20:55
• Why universal TM? We just need to reduce some undecidable problem to it! – Dai Oct 20 '13 at 20:57
• By universal TM I mean $A_{TM} = \{\langle M,w\rangle\ \ |M \textit{ is a Turing Machine and M accepts w} \}$, I could also do it with $HB = \{\langle M\rangle \ | \textit{M is a TM and M halts on a blank tape}\}$ – InsigMath Oct 20 '13 at 21:14