An often-cited example of a very basic program, for which termination is open, is one that generates the Collatz sequence. In pseudo-code:
collatz(int n)
while (n > 1)
if (n mod 2 == 0)
n = n / 2;
else
n = 3n + 1;
An often-cited example of a very basic program, for which termination is open, is one that generates the Collatz sequence. In pseudo-code:
collatz(int n)
while (n > 1)
if (n mod 2 == 0)
n = n / 2;
else
n = 3n + 1;