Where can one find chaotic toy algorithms that don't involve Turing machines or cellular automata? (I need one for a project, and I keep running into image processing and biology applications. I actually need a toy one.)
EDIT: Found it: (pseudocode, not Python)
while x > 1
case ((x mod 2) == 0):
x = x / 2
case ((x mod 3) == 0):
x = x + 1
default:
x = x * 3
The number of iterations it takes to leave the loop is chaotic.
Comments
Where can one find chaotic toy algorithms that don't involve Turing machines or cellular automata? (I need one for a project, and I keep running into image processing and biology applications. I actually need a toy one.)
EDIT: Found it: (pseudocode, not Python)
The number of iterations it takes to leave the loop is chaotic.See also, hailstorm numbers - http://en.wikipedia.org/wiki/Collatz_conjecture#Statement_of...