4

Does it make sense to speak of algorithms that take an infinite amount of time to terminate?

In particular, suppose we have a loop with a bound function that is initially positive and is decreased by the loop body each time. Furthermore, suppose that termination of the loop implies that bound function is non-positive. (Ie almost all assumptions of The Invariance Theorem are satisfied.)

Here's the rub, initially the value of the bound function is the cardinality of the natural numbers.

What can be said in such situations?

Any help or direction is most welcome; thank you!

babou
  • 19,645
  • 43
  • 77
Musa Al-hassy
  • 894
  • 1
  • 5
  • 9

3 Answers3

4

A big thing that is studied in higher type computability is infinite streams. Others have talked about hyper computation but this isn't quite the same. For starters the objects and functions studied in higher type computability are all things you can do in Haskell or some other such real programing language. These functions DO terminate in finite time thanks to laziness.

Exact real arithmetic is arithmetic that is performed on infinite binary streams or other kinds of infinite streams (dyadic digits and more commonly having both negative and positive digits). Addition of such streams terminates in finite time but produces another object which is infinite. The trick here is that the infinite streams are definable by computable functions that have finite construction. It turns out that classically there exist certain infinite streams that we can't define. For instance a computable real on the range $[0, 1]$ can be defined by a function $f : Nat \to Bool$. If we have an undecidable set $S$ then if we consider $f(x) = 1$ if and only if $x \in S$ then $f$ defines a real number but NOT a computable real number. It seems to turn out that there are no natural examples of such numbers coming up in practice however.

For more information take a look at one of my favorite blog posts: seemingly impossible functional programs

Jake
  • 3,810
  • 21
  • 35
3

What you are describing is a notion of hypercomputation. Several ways of making sense of infinite computation are described in the Wikipedia article on hypercomputation. The approach of Hamkins and Lewis seems particularly popular. There is no need to invoke a cardinal-valued variable though; you can just have a plain old infinite loop.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514
3

Yes, there are plenty of models of computation on infinite data where computations go on forever. For example, ordinary finite automata can be adapted to deal with infinite strings, giving $\omega$-automata.

However, it doesn't make sense to talk about such computations terminating since terminate means "end" and an infinite computation doesn't do that. So the acceptance criterion for an $\omega$-automaton isn't as simple as "It accepts if it terminates in an accepting state". There are various ways of doing this. Conceptually, the easiest is the Büchi automaton, which accepts its infinite input if it visits accepting states infinitely often.

David Richerby
  • 82,470
  • 26
  • 145
  • 239