# Decidability of language of TMs which accept only their Gödel number [duplicate]

I am trying to prove that $$L = \{\langle M \rangle \mid L(M) = \{\langle M \rangle \}\}$$ is undecidable, where $$\langle M \rangle$$ is the code of the TM $$M$$, and $$L(M)$$ the language recognized by $$M$$.

I think I can't use Rice's theorem, so I tried to find a reduction. The halting problem for example does not help me in this case. Do you have any idea how to prove it?

## marked as duplicate by Apass.Jack, Evil, David Richerby, Yuval Filmus turing-machines StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Feb 2 at 9:49

• Are you familiar with the recursion theorem? – Yuval Filmus Feb 1 at 17:24
• unfortunately not – Marc Feb 1 at 17:40

The recursion theorem states that if $$A(x,y)$$ is a two-input Turing machine then there is a Turing machine $$M$$ such that $$M(x) = A(x,\langle M \rangle)$$. Moreover, $$M$$ can be constructed from $$A$$ effectively (i.e., using an algorithm). Using this, we can reduce the halting problem to your problem. Given a Turing machine $$B$$ and an input $$z$$, construct a new Turing machine $$A(x,y)$$ which acts as follows:
• If $$x = y$$ then simulate $$B$$ on $$z$$.
Use the recursion theorem to construct a new machine $$M$$ that on input $$x$$ acts as follows:
• If $$x = \langle M \rangle$$ then simulate $$B$$ on $$z$$.
Then $$M \in L$$ iff $$B$$ accepts $$z$$.