3 ms·
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 pro
by stcredzero 16y ago
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.
- abcd_f 16y agoSee also, hailstorm numbers - http://en.wikipedia.org/wiki/Collatz_conjecture#Statement_of_the_problem http://en.wikipedia.org/wiki/Collatz_conjecture#Statement_of...