Can we write a program that can say if any 2 given programs do the same w.r.t input - output pairs I'm new to theoretical CS research. I have the following question: Given 2 different computer programs, each generating certain outputs for a given set of inputs. Assuming we are given the range of values for input variables (i.e., min to max values), is it possible to check with another program whether these 2 programs will give the same output values for all possible input values, without actually running the 2 programs for all input values?

Thanks.
No.  That's undecidable.  Suppose the first program is

return 42


and the second program is

if (f(x) halts)
    return 0
else
    return 42


where x is the input.

Do these two programs yield the same output, for all possible inputs?  That depends whether f always halts on all inputs.  And that is exactly the halting problem, which we know is not decidable.  It's easy to see that, as a consequence, this problem can't be decidable either (if it were, you could decide the halting problem).