Hacker News new | ask | show | jobs
by moring 2269 days ago
The halting problem only says that you cannot tell if a program ever stops, i.e. takes a finite number of steps but without any a priori bounds. If you limit the number of steps to N, you can just run N steps of the program on your given input and look if it has stopped already.
1 comments

The problem only says you can’t tell if the programs stops without actually running it. But here you’re running it anyway.
If you run it and it stops, then it stops. If you run it and it runs forever, then it runs forever. But the point is that you want to know if it's going to run forever before you hit "forever".