## Equation of the Day #14: Chaos

**Akano**, in Math/Physics Nov 08 2015 · 756 views

**I'm taking a second pass at this one. Instead, I'm going to talk about chaos.**

**Chaos is complexity that arises from simplicity. Put in a clearer way, it's when a deterministic process leads to complex results that seem unpredictable. The difference between chaos and randomness is that chaos is determined by a set of rules/equations, while randomness is not deterministic. Everyday applications of chaos include weather, the stock market, and cryptography. Chaos is why everyone (including identical twins**

**who having the same DNA)**have different fingerprints. And it's beautiful.**How does simplicity lead to complexity? Let's take, for instance, the physical situation of a pendulum. The equation that describes the motion of a pendulum is**

**where**

*θ*

**is the angle the pendulum makes with the imaginary line perpendicular to the ground,**

*l*

**is the length of the pendulum, and**

*g*

**is the acceleration due to gravity. This leads to an oscillatory motion; for small angles, the solution of this equation can be approximated as**

**where**

*A*

**is the amplitude of the swing (in radians). Very predictable. But what happens when we make a double pendulum, where we attach a pendulum to the bottom of the first pendulum?**

**Can you predict whether the bottom pendulum will flip over the top? (Credit: Wikimedia Commons)**

**It's very hard to predict when the outer pendulum flips over the inner pendulum mass, however the process is entirely determined by a set of equations governed by the laws of physics. And, depending on the initial angles of the two pendula, the motion will look completely different. This is how complexity derives from simplicity.**

**Another example of beautiful chaos is fractals. Fractals are structures that exhibit self-similarity, are determined by a simple set of rules, and have infinite complexity. An example of a fractal is the Sierpinski triangle.**

**Triforce-ception! (Image: Wikipedia)**

**The rule is simple: start with a triangle, then divide that triangle into four equal triangles. Remove the middle one. Repeat with the new solid triangles you produced. The true fractal is the limit when the number of iterations reaches infinity. Self-similarity happens as you zoom into any corner of the triangle; each corner is a smaller version of the whole (since the iterations continue infinitely). Fractals crop up everywhere, from the shapes of coastlines to plants to frost crystal formation. Basically, they're everywhere, and they're often very cool and beautiful.**

**Chaos is also used in practical applications, such as encryption. Since chaos is hard to predict unless you know the exact initial conditions of the chaotic process, a chaotic encryption scheme can be told to everyone. One example of a chaotic map to disguise data is the cat map. Each iteration is a simple matrix transformation of the pixels of an image. It's completely deterministic, but it jumbles the image to make it look like garbage. In practice, this map is periodic, so as long as you apply the map repeatedly, you will eventually get the original image back. Another application of chaos is psuedorandom number generators (PRNGs), where a hard-to-predict initial value is manipulated chaotically to generate a "random" number. If you can manipulate the initial input values, you can predict the outcome of the PRNG. In the case of the Pokémon games, the PRNGs have been examined so thoroughly that, using a couple programs, you can capture or breed shininess/perfect stats.**

**Dat shiny Rayquaza in a Luxury ball, tho.**

**So that's the beauty of chaos. Next time you look at a bare tree toward the end of autumn or lightning in a thunderstorm, just remember that the seemingly unpredictable branches and forks are created by simple rules of nature, and bask in its complex beauty.**