Write a simple program that checks whether for every n, $1 ≤ n ≤ 10^{50}$, the Collatz sequence starting with n will reach the number 1 in less than a billion iterations. When it has the answer, let the program stop if the answer is "Yes", and let it loop forever if the answer is "No".
We cannot tell whether this program terminates or not. (Who is we? Let's say "we" is anyone who could add a comment to my answer). However, someone with an incredibly powerful computer might tell. Some genius mathematician might be able to tell. There might be a rather small n, say n ≈ $10^{20}$ where a billion iterations are needed; that would be in reach of someone with a lot of determination, a lot of time, and a lot of money. But right now, we cannot tell.
The Halting Problem: "In computability theory, the halting problem is the problem of determining, from a description of an arbitrary computer program and an arbitrary input, whether the program will finish running or continue to run forever." I think your question is "Give examples of specific finite computer programs such that there exists no specific single Turing Machine which when given that specific finite computer program and arbitrary input for that program, can answer correctly whether that program halts on that input. " But the answers you selected only satisfies: [cont] – Craig Hicks – 2017-12-11T19:31:54.323
[cont] But the answers you selected only satisfies: "We don't know if such a specific Turing Machine exists or not". (@KyleStrand this may be related to your comments?) – Craig Hicks – 2017-12-11T19:33:54.097
And to make things worse, "we don't know" is rather imprecise. Who is we? How do we know there are not other lifeforms which do know? How do we know there are not other lifeforms which do know, and which are reading this post right now and laughing? – Craig Hicks – 2017-12-11T19:43:06.380
You are contradicting in your responses.....Thanks! But the halting program assumes knowledge of the source. ...If this is true you have answered your question. The halting program would already know. Imagine a system controlling a sign, it is always illuminated and flashing, when does it shut off? Power failure, power switch, or during the flash sequence. Or given a battery back-up and generator, never. – htm11h – 2015-07-30T14:57:44.463
3
similar question What is the smallest Turing machine where it is unknown if it halts or not? / [cstheory.se]
– vzn – 2015-07-30T15:47:45.197I would add that the halting problem is only a problem if you don't put a timing upper bound. Surely there is no difference in practice between getting an answer too late to be of any use and never getting an answer.
You can ask whether a program will return an answer within a number of steps, like a real-time definition of correctness. If you can't guarantee a timely answer, then you simply have a program that lacks a correctness guarantee. – Rob – 2015-07-30T18:31:20.073
1@Rob That's not actually true. If you don't know whether a machine will halt, you can wait indefinitely to see whether it halts; after a millennium, you still won't know whether or not it will stop, say, the next day. – Kyle Strand – 2015-08-04T03:21:49.480
@KyleStrand I'm agreeing with you. But I'm also saying that it's a totally overblown issue in practice, because all realistic computations are subject to deadlines (milliseconds to months). If you need an answer in 5 seconds for it to be useful, the only thing that matters is whether you can guarantee an answer in 5 seconds. Suppose that you could guarantee an answer given an indeterminate amount of time to compute. That would be a useless guarantee. – Rob – 2015-08-04T15:01:57.493
@Rob But knowing that an algorithm can't exist is useful, because it saves you the wasted time of trying to think of one. Similarly, an algorithm with an extremely long running time can inspire the discovery of a more efficient algorithm, or could become practical given sufficient computational resources. – Kyle Strand – 2015-08-04T15:52:25.727
It's just another instance of being in a situation where you can't quite prove that your code is correct (ie: produce the right answer, runs in time constraints, runs in space constraints, runs in power constraints, etc.). If you are parsing input, try to require regular/context-free recognition. You can still pass in constraints so that the code can halt itself when it exceeds any resource limit.
The only interesting result is when you can prove that the code gives a positive answer within explicit resource constraints, but this isn't more special than other correctness properties. – Rob – 2015-08-04T18:54:29.710