What exactly is the halting problem?

前端 未结 22 761
时光说笑
时光说笑 2020-11-29 00:01

Whenever people ask about the halting problem as it pertains to programming, people respond with \"If you just add one loop, you\'ve got the halting program and therefore yo

22条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-29 00:28

    This has been beaten to death so well that there is actually a poetic proof, written in the style of Lewis Carroll Dr. Seuss by Geoffrey Pullum (he of Language Log fame).

    Funny stuff. Here's a taste:

    Here’s the trick that I’ll use – and it’s simple to do.
    I’ll define a procedure, which I will call Q,
    that will use P’s predictions of halting success
    to stir up a terrible logical mess.

    ...

    No matter how P might perform, Q will scoop it:
    Q uses P’s output to make P look stupid.
    Whatever P says, it cannot predict Q:
    P is right when it’s wrong, and is false when it’s true!

提交回复
热议问题