Hacker News new | ask | show | jobs
by lokedhs 1881 days ago
We can often determine if a program halts or not. The halting problem is discussing solving it in the general case.

For example, you can easily prove that your hello world program will halt. In fact, any program which does not have any flow control can be proven to halt. Even if the program has flow control, you can still prove that it halts by proving that iteration is bounded by some number that is strictly decreasing.

So yes, for each program given some specific input, the program either halts or it doesn't halt. And there is always a way in which you can determine if that is the case: You simply run it until either the program halts or it goes back to an earlier state. The halting program says that there is no general solution that allows you to look at a program to determine this property.