Cascades

Dynamical Systems Theory studies continuous and discrete dynamical systems. A continuous dynamical system is called a flow, and is essentially the same thing as a vector field. A discrete dynamical system is called a cascade.

A cascade is a function of the form:

State update(State currentState) {
   State nextState = ???;
   return nextState;
}

where:

State = the state space of the cascade.

We define the iteration of the update function as follows:

State iterUpdate(State initState, int cycles) {
   State result = initState;
   for(int cycle = 0; cycle < cycles; cycle++) {
      result = update(result);
   }
   return result;
}

Here's an equivalent tail recursive definition:

State iterUpdate(State initState, int cycles) {
   if (cycles == 0) return initState;
   return iterUpdate(update(initState), cycles – 1);
}

Trajectories

If we call:

iterUpdate(s, INFINITY);

then the infinite list of states taken on by result:

(s0, s1, s2, ...)

where:

s0 = s

is called the trajectory of the system starting from state s.

For example, if the state of a canon ball is its position, and if we are only interested in the state at discrete intervals of time, then the trajectory of a canon ball fired from a canon at time t = 0 will be the path it follows until it hits its target.

If the state of an economy is the annual GNP, then the trajectory of the economy is the sequence of GNPs starting with some initial year.

Complexity

There are many interesting questions about trajectories:

How sensitive is a system to the choice of initial state.  Can a butterfly flapping its wings in Brazil cause a hurricane in Texas? If state s1 is near state s2, then will the trajectory starting from s1 be similar to the trajectory starting from s2?

Is there some region A in the state space such that some tail of every trajectory is contained in A? Such a region is called an attractor. For example, in a cyclic trajectory some tail is just an infinite repetition of the same finite sequence of states: si1, si2, ..., sin In this case we say that n is the period of the cycle. If the period is 1, then we say that the trajectory has a fixed point or an equilibrium state.

Is there some pattern to the states in a trajectory? If so, then how complex is the pattern? Cyclic trajectories have about the simplest patterns possible. What about more complex patterns?

If the state space is a rectangular array of pixels, and if a pixel can have any color as its state, then a trajectory would be something like an infinitely long animation. Perhaps Bambi playing over and over, a perpetually bouncing red circle, a curve meandering endlessly, or something that resembles random static on a TV screen. Note that if the color space is finite, and if the update function is algorithmic, then all trajectories must be cyclic.

Algorithmic Patterns

If the state space is the set of all unsigned integers, then a trajectory is an infinite sequence of unsigned integers. What patterns are possible here? For example, can we describe the pattern as an algorithm of the form:

int state(int n) {???} // = sn in the trajectory (s1, s2, ...)

One might think the easy implementation would be:

return iterUpdate(s1, n);

But this assumes that "nextState = ???" in the update function was computed algorithmically. Also, there might be a much simpler or more interesting pattern. For example, if the trajectory was (1, 2, 4, 8, 16, ...), then we could simply write:

return 2 * n;

One definition of complexity might be how long it takes to compute sn? Recall that a problem is O(f) if the fastest algorithm that solves the problem requires a number of steps proportional to f(n), where n = the size of the input. So we could ask if the pattern is O(1), O(log n), O(n), O(n2), O(2n), etc.

It might even be the case that for some values of n, an infinite number of steps are needed to compute sn. In other words, for some values of n state(n) goes off on and endless search of the exact value of pi, the largest twin prime, or the meaning of life.

There is an upper limit to algorithmic patterns: the universal algorithm. This is a pattern so complex that all other algorithmic patterns exist as subsequences of the trajectory.