I've been asked to prove that the language $A_{TM} = \{ \langle M,w\rangle \mid M$ is a TM that accepts $w\}$ is mapping reducible to the language $LOOP-ONE = \{\langle M \rangle \mid M$ is a Turing machine that doesn't halt on exactly one input$\}$.
I came up with the following idea :
F = "On input <M,w>:
- Construct the following machine M':
M' = "On input x:
1.If $x=w \cdot 1$, enter a loop. (assuming $1 \in \Sigma$ )
2.Run M on w.
3.If M accepts, accept. otherwise, enter a loop."- Output <M'>."
As for the correctness of the reduction above we can see that :
If $<M,w> \in A_{TM} \implies M$ accepts $w$ therefore by the construction above $M'$ accepts any input $x$ (besides $w\cdot1$) therefore in particular $M'$ halts on any input other than $w\cdot1$.
On the other hand,
If $<M,w> \notin A_{TM} \implies M$ doesn't accepts $w$ therefore $M$ either loops on $w$ or rejects $w$.
If $M$ loops on $w$ then $<M'> \notin LOOP-ONE$ as $M'$ doesn't halts on $w$ and on $w\cdot1$.
If $M$ rejects $w$ then $M'$ will loop on any input $x$ and therefore $<M'> \notin LOOP-ONE$.
I was asked to make sure that the function that the TM F is computing is indeed computable, and I'm struggling to see what it practically means. What are the things that make a mapping reduction not computable (besides maybe the fact that the Turing machine F may not halt on some input, which is not the case here) ?