HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Can I construct a Turing machine that accepts only its own encoding?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
canacceptsencodingitsownthatmachineturingconstructonly

Problem

Is the set $S$ = $\lbrace M \mid M \text{ is a Turing machine and }L(M)=\lbrace \langle M\rangle\rbrace\rbrace$ empty?

In other words is there a Turing machine $M$ that only accepts its own encoding? What about a Turing machine that rejects only its own encoding?

Solution

The answer is yes.

See Kleene's second recursion theorem: for any partial recursive function $Q(x,y)$ there is an index $p$ such that $\varphi_p \simeq \lambda y.Q(p,y)$.

Suppose that $M$ is a Turing machine that on input $\langle x,y \rangle$ accepts if and only if $x=y$; then, by the above theorem, exists $M'$ such that $M'(\langle y \rangle) = M(\langle M' , y \rangle)$ and we have $L(M') = \{ \langle M' \rangle \}$.

P.S. you can find a very clear proof of the recursion theorem in Chapter 6 of the M. Sipser's book "Introduction to the theory of computation".

Context

StackExchange Computer Science Q#18989, answer score: 7

Revisions (0)

No revisions yet.