r/AskComputerScience • u/Ok-Respond8928 • Jun 26 '26
Quick question
Why can't quantum computers solve the Halting problem?
And, what would hypercomputation look like.
0
Upvotes
r/AskComputerScience • u/Ok-Respond8928 • Jun 26 '26
Why can't quantum computers solve the Halting problem?
And, what would hypercomputation look like.
View all comments
Show parent comment
1
u/Successful-Money4995 Jun 26 '26
Such a tool to generally detect this cannot be made and the proof is that such a tool would also solve the halting problem.
It's not intuitive so I'll explain.
The way that we prove something it easy is by proving that we can reduce the problem to something else easy. For example, say I ask you to prove that you can boil water if you're in the basement. To prove it, you would start in the basement, go upstairs, put a kettle on the stove, and tada, boiling water.
Now I ask you to prove that you can boil water if you're in the kitchen. You walk down the stairs to the basement and then tell me, "From here, it is already proven." Tada!
That silly story shows how it works. If I can prove that B is easy and I can prove that A reduces to B then I have proven that A is easy.
In the language of logic, if B_easy and A=>B then A_easy.
The inverse of this is: if B is hard and B can be reduced to A, then A is hard. If B_hard and B=>A then A_hard. Notice that the reduction order is reversed. The rules of logic demand this.
So, I've already proven that halting is hard. So you're asking, what if we have a program that can prove that there is no infinite loop. We know halting is hard. If halting can be reduced to a check for infinite loop then this is proof that a check for infinite loop is hard.
A program that generally checks if some code will have an infinite loop is thus also impossible. Likewise, a program that to generally prove that the memory requirement is bounded is also impossible. In fact, if we could prove that a program has bounded memory then we could solve halting on those programs: simply input every possible state of the memory and see if the program ever goes back to a previous state. On a computer with a gigabyte of memory it would be 2 to the power of a billion tests. The number of electrons in the entire universe is just 2 to the power of 100 so this is a massive number of tests. But it would still be easier than the halting problem, which is impossible.