Symbolic dynamics and Sharkovskii's order
Forget where the orbit is and record only which side of the turning point each term lies on. What is left is a string of letters, and a surprising amount of the dynamics can be read from it.
itinerary(logistic(4), "1/10", 30); // "LLRLRRRLLRLRRLLLLLLRRRRLLRLLRR"
kneading(logistic("3.83"), 12); // "RLRRLRRLRRLR": the critical orbit is attracted to a 3-cycle
sharkovskii.order(12); // [3, 5, 7, 9, 11, 6, 10, 12, 8, 4, 2, 1]
sharkovskii.forces(3, 1000); // true: period three implies every period
Itineraries
For a map with one turning point c, write L if , R if and C if . The string for the orbit of is its itinerary. Because f is increasing on one side of c and decreasing on the other, the itinerary determines the order of points on the line: two points with different itineraries can be told apart, and which is to the left can be read off from where the strings first differ and how many R's came before.
An itinerary is exactly the kind of thing floating point gets wrong: one misplaced term near c changes every later comparison. itinerary follows the true orbit, in exact rationals while they stay small and then with enclosures, adding digits whenever a term is too close to c to place. For the full logistic map (r = 4) and the tent map, the itinerary is the binary expansion of the starting point in disguise, which is why every string of L's and R's occurs.
Kneading sequences
The itinerary of the critical value f(c) is the kneading sequence of the map. It is the largest itinerary any point can have (in the order above), so it describes which strings are allowed at all. As the parameter of the logistic family increases, the kneading sequence increases with it, and a periodic kneading sequence marks a superstable or attracting cycle: at r = 3.83, inside the period-3 window, it is RLR repeated.
Sharkovskii's order
Order the positive whole numbers like this:
First the odd numbers from 3 up, then twice them, then four times them, and so on, and at the very end the powers of two going down. Sharkovskii's theorem says that a continuous map of an interval with a point of least period n has points of every least period that comes after n in this order. Period 3 is first, so it forces every period: "period three implies chaos". And a map with only finitely many periods has only powers of two, which is the period-doubling cascade seen from the other end.
sharkovskii.compare(a, b) is a comparison function for this order, forces(a, b) answers whether period a forces period b, and forced(n, limit) lists what a period forces.
| call | returns |
|---|---|
| itinerary(f, x0, n, { critical }) | a string of L, R and C |
| kneading(f, n, { critical }) | the itinerary of f(c) |
| sharkovskii.order(limit), .compare(a, b), .forces(a, b), .forced(n, limit) |
@ratmath/chaos and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.