Dragonfall
- 1,023
- 5
Where might I learn more about the behaviour of algorithms given an infinite amount of time, if such a question makes sense?
Well, one thing you can say about those two is that in the first one, the program's state repeats, and in the second one the program's state does not ever repeat. As far as "stopping at infinity" goes, I think what probably captures your intent is that in the second one it is possible to put the configurations of the program in 1-1 correspondence with the integers--"exhausting" them--and in the first one it is not.Dragonfall said:I thought about the 'behaviour' of the following programs 'at infinity', and I thought they must be different. I'll just write as if 'at infinity' is defined:
1. Any simple loop (while(1) blah)
2. Print the natural numbers in succession until all natural numbers have been exhaulsted.
Seems to me the first one will not stop at infinity and the second one will.