r/AskComputerScience • u/Ok_Natural_7382 • Sep 07 '25
Why is the halting probability uncomputable?
The way this is usually presented is this:
The halting probability (aka Chaitin's constant) is the probability that a random program will halt. There is no way to make a program that determines if a program will halt (wp: Halting problem), so no computer program could determine what portion of programs will halt.
But what if I created a program that would iterate through all possible programs (up to a given length), and run them for a certain amount of time? If I had a large enough time and a large enough number of programs, surely I could get a pretty good approximation, one which approaches the halting probability given enough time? Like how you can never exactly calculate pi, but you can get as close as you like if you just add enough terms of an infinite series.
Where has my logic gone wrong?
Edit: some of you think I'm trying to solve the halting problem. I'm not; I'm just trying to approximate it to calculate the halting probability
View all comments
Show parent comment
1
u/Ok_Natural_7382 Sep 08 '25
Thanks! This makes so much more sense than all the other answers!
So, to make sure I'm understanding --- the program will compute Chaitin's constant given enough time, however it is impossible to know how close you are if at all, and that's what makes it uncomputable?