# Towards a Little Chaos

I’ve been reading through Leonard Smith’s *Chaos: a Very Short Introduction* in my spare time (twice a month.) It is truly fascinating reading (depending on your definition of fascinating) and absolutely enlightening to a recovering philistine groping at the previously eschewed topics of mathematics, physics, and philosophy*. I’m going to post some of the algorithms/systems he describes, realized in the SuperCollider programming language. This may be of some interest to others in my position**.

**Full Logistic Map**

*“Subtract X2 from X, multiply the difference by 4 and take the result as the new value for X.”*

If X is given a value of 0.5, the results are relatively uninteresting. (0.5,1,0,0,0,0,0,0,0…)

However, if the value 0.876 (that of the example in the book) or something similar is used, the results are more interesting.

`(`

r = Routine.new ( {

y = List[];

x = rrand(0.869, 0.883);

250.do ( { y.add( {x = 4*(x-(x.squared)) }.value) } );

y.asArray.plot;

} );

AppClock.play(r);

)

As the author points out, notice that while a statistician may pronounce the results random, the physicist may find predictability. It should be noted that in the author’s example, x was always 0.876 and therefore the system was deterministic. By changing x to a random number (linearly picked from a given range) I’ve made the system stochastic.

**AC Map (Stochastic Dynamical System)**

Any dynamical system whose rule does not require a random number may be said to be *deterministic*. Any dynamical system whose rule requires a random number may be said to be stochastic.

*“Divide X by 4, then subtract 1/2 and add a random number R to get the new X.”*

`(`

r = Routine.new ( {

```
``` y = List[];

x = 1;

250.do ( { y.add( { x = (x/4) + rrand(0,1) }.value) } );

` y.asArray.plot;`

} );

AppClock.play(r);

)

Note: this system is incomplete without defining R. The random number picking algorithm is a system of its own. In the above, a linear distribution with even 0-1 float return was employed. The author notes that it is sufficient to specify (for R) what distribution is used (linear, Gaussian, etc.)

I’ll try to add more of these as I read. They may also appear in new posts.

*I was a lofty romantic — the only “reality” to me at one point was the realization of idealized sound-art (composition.)

** The likelihood of any other person actually finding themselves in anything that could be considered remotely close to “my position” is statistically very small. Realizing this, this post is then for my personal edification.