cycle_floyd


cycle_floyd, a MATLAB code which analyzes a cycle in an iterated function sequence using Floyd's method.

Suppose we a repeatedly apply a function f(), starting with the argument x0, then f(x0), f(f(x0)) and so on. Suppose that the range of f is finite. Then eventually the iteration must reach a cycle. Once the cycle is reached, succeeding values stay within that cycle.

Starting at x0, there is a "nearest element" of the cycle, which is reached after MU applications of f.

Once the cycle is entered, the cycle has a length LAM, which is the number of steps required to first return to a given value.

This function uses Floyd's method to determine the values of MU and LAM, given F and X0.

Licensing:

The computer code and data files described and made available on this web page are distributed under the MIT license

Languages:

cycle_floyd is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.

Related Data and Programs:

cycle_brent, a MATLAB code which carries out an iterated function evaluation, and seeks to determine the nearest element of a cycle, and the cycle's length, using Brent's method.

cycle_floyd_test

Reference:

  1. Donald Knuth,
    The Art of Computer Programming,
    Volume 2, Seminumerical Algorithms,
    Third Edition,
    Addison Wesley, 1997,
    ISBN: 0201896842,
    LC: QA76.6.K64.

Source Code:


Last revised on 07 December 2018.