Determine whether repeated deterministic updates revisit a state, and optionally find the preperiod and cycle length. Recording all visited states uses memory proportional to the visited orbit. Floyd's cycle-finding algorithm detects repetition with constant extra memory.
A constant-memory algorithm for detecting the eventual cycle in a sequence generated by repeated function evaluation. It holds a checkpoint fixed while a second pointer advances, doubling the checkpoint interval when exhausted; a second pass locates the start of the cycle.

Articles by others on the same topic (1)

Cycle detection refers to the process of identifying cycles (or loops) within a data structure, such as a graph or a linked list. A cycle is formed when a sequence of edges leads back to the starting vertex, creating a closed loop. Cycle detection is an important concept in computer science, particularly in graph theory, algorithm design, and data structure manipulation. Here are a few key concepts related to cycle detection: ### 1.