3 ms·
Not very interesting post. I could think of teens of problems out of the top of my head that are theoretically finite but there's no enough mass/energy in the u
by jpablo 16y ago
Not very interesting post. I could think of teens of problems out of the top of my head that are theoretically finite but there's no enough mass/energy in the universe for them to complete (like generating a program that solves chess).
His first example of "for (int i = 1; i > 0; i++);" Would be matched by some ugly trick like:
int i = 0; while (!i);
That's warranted to halt as the chances for a bit in i to be flipped by cosmic rays tends to be 1 over time.
- gjm11 16y agoThe "first example" is merely a preliminary; it isn't an example of what he's actually trying to do. He's trying to write a very short program that (1) is valid C, (2) would terminate eventually on a system that perfectly implements C semantics and can run as long as it wants, but (3) would take so long to do so that no physically realisable system within the observable universe could enable it to run to completion. You are of course welcome to find this uninteresting, but "I can think of lots of big complicated programs that would terminate but not do so for a very long time" and "In the real world, an infinite loop may terminate because of a hardware malfunction" don't seem to me like good reasons for finding it uninteresting.