# Halting problem reduction to single digit numbers

I'm thinking of the solution for severaly days, but I'm not sure about my solution is on the correct way.

I need to prove that the next problem is undecidable:

Input: An N program which requires an y input. Output: True/Accept if N only halts on values which are one digit; false/reject if y has two or more digits.

I thinking about a reduction to the halting problem:

x=y;

bool N(y){
if(Math.Abs(y)<10){
M(x)
}
return true;
}
else{
return false;
}


M(x) is the halting problem. Math.Abs(y)<10 would be the check to the digits of the input (I'm not exactly sure about that's correct too).

So, if the absolute value of y smaller than 10, and M(x) halts it would return true. But if the absolute value of y is bigger than 9, it would return with false.

My question is about, that is it a correct reduction to the halting? Or I would rather think about it for a few more days?

• We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher.
– D.W.
Oct 13 at 18:42