Yes, it is undecideable.
The reduction is simple, given an instance of halting problem (f,x)
build a new function f' that does not stop for x
. Produce (f,f',x)
as input to the new algorithm.
Intuitively, if such a machine exists, you just solved halting problem because you'll be able to detect that f
and f'
have the same behavior, but you know that f'
is in an infinite loop, so - so does f
.
As a side note, if you are looking for an algorithm that checks ALL inputs, and not a single input - this is even harder, and this problem is not even in RE