Is finding the equivalence of two functions undecidable?

前端 未结 9 2124
迷失自我
迷失自我 2020-11-28 07:48

Is it impossible to know if two functions are equivalent? For example, a compiler writer wants to determine if two functions that the developer has written perform the same

9条回答
  •  南笙
    南笙 (楼主)
    2020-11-28 08:36

    In the general case it's undecidable whether two turing machines have always the same output for the identical input. Since you can't even decide whether a tm will halt on the input, I don't see how it should be possible to decide whether both halt AND output the same result...

提交回复
热议问题