Chaos Theory: Dependence on parameter r (continued)

Previously we looked at how the logistic map is affected by changing the parameter r for small values. Now we’re going to look at what happens when we change it the parameter r for large values, say r = 3.4. Instead of converging to a fixed point, the orbit oscillates. For the logistic map, these orbits exist between r = 3 and r \approx 3.45 and the oscillations repeat every two iterations as shown below:

Period-2 orbit

Period-2 orbits

This is also known as a period-2 orbit. Again, for larger values of r, say r = 3.5, the orbit now repeats its oscillations every four iterations.

Period-4 orbits

Period-4 orbits

In other words, the previous orbit has doubled its period to a period-4 orbit. The splitting of the orbit is known as a bifurcation, i.e. at r = 3 the orbit bifurcates into two solutions, and for r = 3.5 the orbit bifurcates into four solutions. As we increase r even further, more bifurcations occur resulting in orbits of period 8,16,32,...,\infty. The table below shows values of r for which these bifurcations occur [1].


We can graph this data to get the bifurcation diagram for the logistic map, showing the possible long-term behaviour for all values of r between 0 and 4. Note, you can click on the image to see a larger version of the image.

Bifurcation for r between 0 and 4

Bifurcation for r between 0 and 4

To clarify and understand the points of bifurcations; we can also graph the bifurcation at a smaller interval for r.

Zoomed in of the above bifurcation, for values r = 2.8 to r = 4

Zoomed in of the above bifurcation. Values of r between r=2.8 and r=4.0

Clearly from both the table and graphs we can observe that the bifurcations occur faster and faster until r = 3.569946... \approx 3.57 = r_{\infty}. Here the map becomes chaotic and has infinite number of periodic orbits. Therefore, an infinite set of points or solutions. In other words, the map doesn’t converge to a fixed point or periodic orbit, instead it becomes aperiodic. This is an example into the periodic-doubling route to chaos. We can plot histograms with reference to the bifurcation diagrams. The histograms display the amount of time a typical orbit spends in some part of the attractor, for different values of r we have different attractors. Here we’ll use r = 3.2, 3.5, 3.8 and 4, with initial condition 0.4 and 10000 x values. From the bifurcation diagrams we expect that the distribution of data eventually spreads across the whole range of x values (0 to 1) as we increase the parameter r.

Logistic map histograms: Distribution of data

Logistic map histograms: Distribution of data

For r = 3.2, the data lies on two values which supports the fact that for r = 3.2 the orbit is period-2, and so the orbit oscillates between two values. Similarly for r = 3.5, the orbit is period-4 and the data lies on four values. As we approach r = 4 we begin to see the data converging to a U-shaped distribution, with the number of values intensifying at zero and one.


[1] STROGATZ, S.H. (1994). Nonlinear dynamics and chaos. New York, USA. Westview Press, Perseus.

(I suggest you check this book out, it’s amazing and helped me a lot through my university years)!

P.S. All images generated on MATLAB, if you want my M-files then feel free to contact me!


El Caminito del Rey: The World’s Most Dangerous Path?

El Caminito del Rey (translated to The King’s little pathway) is a walkway pinned along the walls of a narrow gorge in El Chorro, Spain. Starting construction in 1901, the walkway wasn’t finished until 1905. It was built for transport purposes, to help workers at the power plants (Chorro Falls and Gaitanejo Falls) exchange materials alongside facilitate inspection and maintenance of the channel. The walkway was given its present name in 1921, when King Alfonso XIII crossed the walkway for the inauguration of the dam Conde del Guadalhorce.


Ground view of the walkway.

The walkway is currently undertaking restoration, a project costing 9 million euros! Before late 2011, the path was deadly, with concrete parts of the walkway collapsing and large gaps in the walkway itself. Several people have died and the entrances were closed after 1999-2000. There’s some great videos on Youtube which show people climbing up the walkway. Click here to see someone challenging themselves and tackling the walkway.800px-Caminito_del_Rey_4 (1)

People attempting to walk the walkway

You can imagine how it must have been for the people building the walkway in 1901-1905. The path is only 1 meter wide and 100 meters above the ground, all that alongside the heavy winds that can occur; its just amazing how it was built. It saved a lot of time for workers once completed; saving them from climbing up and down the mountains continuously.

Mayan Civilisation: Inventions and Achievements

In the previous posts regarding the Maya, I’ve talked about their amazing calendars and infrastructure. In this post I’m going to be briefly looking at some of the remarkable inventions and achievements the Maya have developed.

A system of writing:


Among the ancient Americas the Maya invented the most advanced form of writing, known as glyphs. Glyphs are used to describe or represent a word, sound or even a syllable through pictures or symbols. The Maya used about 700 different glyphs, by which 80% of the language is now understood.

The Maya wrote about their history and achievements all the time, on walls, pillars and big stone slabs. In particular, they also wrote books (or codex’s) about almost everything; gods, daily life, new leaders and more. These books were made of bark and folded like a fan. Unfortunately, because of the Spanish, many of the books were destroyed, thought by Spanish priests to have been depicting the devil and demons; a good job a few survived! In relation to their system of writing, on my previous posts I linked a video regarding the decoding of their language, a great documentary!

Law and order:


The Maya had their own laws and punishments to coincide. However, they were usually very reasonable and fair. If you stole something, you were held captive by the victim as punishment, for less serious crimes, you would have some hair cut off. Short hair was a sign of disgrace and dishonesty among the Maya. Another punishment included possessions being sold at auction. Moreover, the Maya held their own trials, displaying similarities to our current practices: evidence was presented before a judge and if found guilty you would be punished.


The Maya loved their sports, having a ball-court in every city, similar to stadiums that we have today. The games were of great importance to the Maya, often playing during religious festivals every 20 days. The courts were located at the foot of temples, in honour of the Gods and Goddesses. The courts had large playing areas; each with a stone hoop mounted on the wall at one end. The Maya loved playing a rough sport called pok-a-tok, by which the aim of the game was to get a solid rubber ball through the hoop, using only your hips, shoulders or arms. The winners often won possessions of the losing team. However, the losing team, often played by captives (often extremely exhausted and hungry) were sacrificed in the name of the Mayan Gods.

Check out this call video showing the sport in action! Click here.


Chaos Theory: Dependence on parameter r.

In the previous post on chaos theory we looked at the logistic map, a simple 1-D discrete map which illustrates chaotic behaviour.  This map was defined by the following equation:

x_{n+1}=rx_{n}(1-x_{n}), \qquad 0 \leq x \leq 1\qquad (1).

We’re going to be looking at the maps dependence upon the parameter value r. The logistic map shows a wide range of different behaviours depending upon our choice of r. Here we’ll be using initial condition x_0 = 0.4. As we can see in the figure below, for 0 \leq \emph{r} \leq 1 the orbit tends to 0, independent of the initial condition. However, when 1 < \emph{r} < 3 the orbit will quickly converge towards a fixed point. For clarity we will connect the discrete points by line segments, note, only the blue points are significant, using initial condition x = 0.4 throughout. The population is decreasing and will eventually approach 0 as the number of iterations tends to infinity for 0 \leq r \leq 1 the map tends to 0. For 1 < r < 3 we can show mathematically that the population approaches a fixed point \frac{r-1}{r}.

logsubLogistic map orbit for various r values.

Using (1) then the fixed points are when rx(1-x) = x. Expanding gives rx - rx^2 = x, we then divide through by x to get r - rx = 1 and finally rearrange to get fixed point at \frac{r-1}{r} = x. For example, at r=2.8 the fixed point is at 0.64285.... These results can be supported by plotting the corresponding cobweb plots (also seen below).

logcobLogistic map: corresponding cobweb plots for various r values.

In the next post about chaos theory, we’re going to be investigating what happens when we look at higher values of r, alongside introducing ways of representing all the data onto one plot. We get some remarkable images when we do this!

As previously stated, all plots are made via MATLAB, if you wish to acquire the MATLAB codes, feel free to contact me!

The World’s First Computer: Antikythera Mechanism

I was told about this (again) by a family-friend (after a few years of forgetting about this amazing bit of technology); a machine that can ‘look into the future’, built over 2000 years ago in ancient Greece, now formally known as the first computer in the world.

It was discovered in 1901 by sponge divers, near the island of Antikythera, Greece; Among the worlds largest find of Greek treasure, ever. The divers rescued some of the most beautiful Greek treasures, including many marble and bronze statues, silver coins and many more! However, the significance of the relic wasn’t understood until a century later.

The Antikythera Mechanism was split into several pieces, tiny gear wheels and marks were discovered on the pieces; specifically engineered to tell the time. Other technologies approaching its complexity didn’t appear until the 14th century by which astronomical clocks were being built in Europe. There have been many reproductions of this clock, one can be seen below. You have to admit, it’s pretty unbelievable something this complex was made 2,000 years ago!


Learn more about this amazing piece of technology and history, alongside its importance below:

Documentary link (1 hour of awesomeness)


Documentary above! GO WATCH IT!

Royal Tombs of Peru

Protected by 30 tonnes of stone, archaeologists secretly dug a archaeological site, afraid of grave robbers in Peru, now the site has unearthed an untouched grave site, thought to be over 1,200 years old!


Belonging to the Wari Empire, it’s full of mummified women, gold and other relics; the site was recently under-covered this year, boasting clues of the rule of women. The women were buried with their finely engraved ear pieces and other jewellery, previously believed to only be used by men. Most of the women were sat in an upright position, indicated royalty and other indicators of power. However, there was evidence to suggest that sacrifices were made as remains were found to be ‘buried’ on top of the tombs with their bodies spread out.

_-untouched-royal-gold-tomb-peru-gold_68843_600x450Jewellery found at the site.

The Wari ruled the Andes (centuries before the famous Inca) and had a long span of influence for about 600 years. In association to the Wari, a city was discovered in Peru in 2008. You can found out more information here.


Chaos Theory: Sensitivity to Initial Conditions

As stated in the previous posts, sensitivity to initial conditions is popularly known as the butterfly effect. It is one of the properties of chaos theory mostly affiliated by scientists when determining if a given system is chaotic. It means that each point in a system is arbitrarily closely approximated by other points with distinguishably different orbits in the future. In other words, a small change to the initial conditions may lead to significantly different behaviour. However, just because systems are sensitive to initial conditions it doesn’t imply that they are chaotic. To illustrate we will look at the mapping given below:

g_{t+1}=g_{t}^2, \quad t \, \epsilon \, \mathbb{R}

Starting at two initial conditions \it{t_{0}} and \it{t_{0}^*} with minute differences the orbits diverge quickly from one another. Starting with a small difference of approximately 0.01 after 10 iterations. However, after 20 iterations, the difference is in its billions. ncdistepsThe graph above shows the map between 14 and 19 iterations with the orbits represented by different colours, red and blue. Clearly, the system is dependent on initial conditions, however, the system isn’t chaotic. The distinction of chaotic systems is that, given two states that are minute in difference, the orbits distance from one another continuously varies; i.e. sometimes becoming arbitrarily close or far from one another with respect to the attractor. For the quadratic system, this doesn’t occur, and so, it isn’t chaotic. To illustrate this we will look at the logistic map for different initial conditions.logdist

Like before we represent the two orbits of the logistic map with different colours (graph above) . As shown, the orbits remain the same for the first few iterations. However, eventually the orbits diverge from each other and become non-identical, and so exhibit behaviour of sensitivity to initial conditions. To support this we plot the corresponding (absolute) distance between the orbits. In contrast to the quadratic mapping before, the difference between the two orbits vary. Clearly, the difference is arbitrarily small sometimes and then arbitrarily large with respect to the attractor, and so demonstrates behaviour of a chaotic system. Note the rate at which nearby orbits diverge from each other with time is characterised by a statistic called the Lyapunov exponent. This helps determine chaotic behaviour, and is a statistic we will be looking at later in the blog.