27The Halting Problem

What better way to finish a book on computing than by asking if computations will ever finish?

One of the most fundamental questions in computing is, can you tell if a particular computation will ever stop? It’s obviously important to an engineer writing a program. A correct program should always eventually finish what it’s doing and stop. If you’ve written a program that doesn’t ever finish what it’s doing, it’s almost certainly incorrect.

There’s a lot more to this question than just whether or not a particular program is correct. It gets to the very heart of questions about the fundamental limits of mathematics.

Most of the time when mathematicians talk about the limits of math, they end up talking about something ...

Get Good Math now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.