Programming for Geographical Information Analysis: Advanced Skills Online mini-lecture: Introduction to Complexity Dr Andy Evans Understanding the world Geographical systems involve lots of components controlled by lots of variables and related in complicated ways. Complex Systems Complex Systems are made of interacting individual components whose behaviour can be understood as organised at some scale but not at others.

Example City development is plainly very complicated. Yet, if we rank city size by population and plot ranks against population we get this graph. This was first shown by linguist George Zipf. OConnor, 2009 Example ~ a log-linear distribution (inverse power law). Rank 1 / sizea (where a is ~1) Is this a feature of the maths?

We might not be surprised at this, afterall the rank is based on size. But why cant we have a distribution with 1 large city and then lots of a similar size? Example Even more confusing when we look at the dynamic size changes of component cities. Rank rule consistent. But massive changes in rank for individual cities. (Batty, 2006) Complex Systems Systems of complicated individual dynamics, but a clear* overall pattern.

The production of these patterns is Emergence. Where these patterns are largely inevitable result of internal drivers we might talk of a self-organising system. *Note that clear doesnt always mean simple. Complexity Complex systems might be classified by degree of organised complexity (Weaver, 1948). Usually this is quantified by some degree of order. Systems not showing organisation might be classified by degree of disorganised complexity. Usually this is quantified by simplicity of statistical or other description. Complexity

Various attempts to capture this with one number but they usually end up only capturing one of these aspects. Kolmogorov algorithmic complexity: shortest program needed to generate the data. Complexity Generally combining these isnt simple. Low structural complexity Low statistical complexity Complexity Also sometimes the same system can have very different complexity dependent on our quality of understanding. Pseudo-random numbers can be described with a

simple program But real random number might be indescribably complex. Most measures treat randomness as either the greatest or lowest complexity. Do we even belief it exists? Does it just represent our ignorance? Complex Systems Is complexity more generally a description of our ignorance? Complex Systems are made of interacting individual components whose behaviour can be understood* as organised at some scale but not at others #. * i.e. This is about our ability to perceive something.

Patterns which arent a real thing anyhow, just a perceptual convenience. Our inability to see the connections between interactions at one level and patterns at others. # Complex Systems Increased computer connectivity, power, and storage has allowed greater capturing of individual behaviour. We now have tools to see the large and small scales. What we lack are tools for seeing the connections between them. Complex Systems What makes it hard to see the links?

Non-linearity: anything where the inputs are not linearly proportional to the outputs. Thresholds; Rule-based; Exponential; Random etc. Non-linearity leads to chaos /chaotic dynamics: Irregular dynamics where the system keeps changing without exact repetition. Loss of information The usual assumption is that non-linear systems are just too complicated to follow. We shouldnt assume this is true just because a mathematician has said it. So where is the loss of information? Non-linearity One of the problems with non-linear systems is that small variations in starting conditions become large variations in final

results [quantified by Lyapunov exponents]. Measurement errors therefore become large. Rounding errors on computers become important in modelling. Non-linear calculations involving large numbers of objects take a lot of processing power. A lot of solutions to non-linear problems use mathematical conveniences that lose information (for example, the approximation of functions with Taylor series). Loss of information The use of aggregate mathematics in models/classification stops us tracking individual objects through models or data. Sometimes this doesnt matter: Amount of money in a bank. Sometimes it does:

People entering and leaving a crowd. Understanding Complex Systems But given non-linearities, how can we hope to understand such systems? Because real systems are understandable! Why? They sometimes have homeostatic control and dampening. They sometimes have self-organised criticality. They sometimes reach equilibrium. They sometimes have attractors. At the moment, because of the loss of information, techniques to look at these are the ways most complex systems are analysed. Homeostasis and dampening Homeostasis: the stability arising in a system through internal control. Classically achieved through negative feedback and judicious

positive feedback. Dampening: the reduction of fluctuations, through, for example: Averaging of inputs. Buffering. The combination of negatively-correlated variables. Other dissipative (energy-reducing) processes. Strangely tools to identify homeostatic and dampening processes are few and far between, despite the fact that they seem to be the one reason we can model anything. Catastrophe Theory Systems can often find themselves leaping from one state suddenly to another with little extra input. 1980s saw the rise of Catastrophe Theory in geography under Alan Wilson. Scheffer et al. (2009) suggest it may be possible to

recognise this coming in real systems. Self-organising Criticality With SOC, internal drivers of system keep it in a state where movement from the state engages processes to put it back into the state, so it hangs on the edge of catastrophe. Generally where the propagation of the noise kicking the system is dampened by the state the system is kicked into. Classic example is a sandpile. When extra sand is added and the slope exceeds the angle of friction, avalanches reduce the slope. Equilibrium These processes tend to lead systems to a stable state, even when kicked slightly. While homeostasis implies the same state, with other controls

this isnt always so. Petrol price modelling after a price change two stations. Note higher equilibrium price. Equilibrium Equilibrium can be: Static: the system is at rest; no energy running through the system. Dynamic: inputs = outputs; the system runs in a steady state. Attractors Equilibria are examples of simple attractors: states that systems converge on.

Given that: non-linearities often lead to chaotic behaviour; non-linearities mean that small variations in starting conditions lead to large variations. Youd imagine these were rare. Attractors Youd be wrong. Chaotic systems rarely reach a single point without strong selforganised criticality, but... They often move close to (but not exactly to): a regular state; a trajectory through several repeated states. These states are called strange attractors to distinguish them from simple attractors. Phase space

Rather than look at changes of a system over time we can look at the state of the system: its variable values in variable or phase space* * state space tends to be reserved to describe the variable configuration of a single example of a system. Phase space For example, rather than plotting traffic volumes and speeds over time on two graphs for a location, we plot the movement over time in volume / speed space. We can plot the whole trajectory over time. Or sample at fixed intervals and plot as points. Nair et al., 2001 show one state for the traffic on the San Antonio freeway on weekends, but an extra congested state on weekdays. The

question is can the system flip into / out of congestion through internal dynamics? Stroboscopic map Where systems are periodic, we can sample at the periodicity and plot the points. For a non-chaotic system wed expect the points to all fall in one location. For chaotic systems with strange attractors the points fall in a varying pattern. Poincar map Here weve removed one dimension (time). Theres nothing to stop you doing this for other period dimensions by putting a plain (a Poincar section) perpendicularly through the space and seeing what on

the trajectory hits it. In general, these plots are called Poincar maps. Basins of Attraction Poincar maps reveal the shape of attractors. Where there are multiple attractors an alternative is to map the starting conditions in phase space coloured by the attractor they lead to. This gives a mix of basins of attraction and isolated points from which behaviour never settles: chaotic saddles Recurrence plots If you dont know the periodicity you need to assess the times between the system

visiting the same kinds of states. To do this, plot: time on both axes, state reassurance as black dots, or Euclidian distance between states as colours. Attractor changes Chaotic systems can also fluctuate dynamically between a number of attractors. Not only this, but the number can change as the values of variables in the system change. Classic example is the population equation known as the Logistic Map.

populationt+1 = population x r (1 population) r<1 1 3.57 Bifurcation diagram Population extremes Best way to represent this change is to plot extremes

and/or stable states against change variable. r Problems Still lack tools to understand multi-scale emergence. Still lack tools to understand loss of information / track information through the systems. Still lack tools to assess the relationship between objects in the system. Lets look at one example analysis. Complex Geographical System Example system: Petrol retailing. Petrol price set by simple rules: Cover costs.

Make maximum profit. Undercut competition within x km. We can look at real or modelled data. Characteristics: Interactions Petrol price surface Small changes can have large impacts A sudden increase or drop in price at one station may result in a change in behaviour across the system. Characteristics: Behaviour Price decrease Chaotic

Petrol price surface ButPrice profit decrease decrease and Chaotic increase Price decrease Stable Stable

Chaotic Cycling (irregular) Stable Cycling (irregular) Stable Characteristics: Behaviour Chaotic Petrol price surface Stable Irregular cycling?

Can we identify the emergent behaviour, feedback loops, non-linearity? Individual behaviour We see simple rules playing out. Motorways Taking all stations is complicated, so lets look at a simple subset. 1 Heppenstall et al. (2005) showed that prices at motorway stations are more stable than non-motorway stations. Simple, explicit network.

2 3 4 7 6 5 Quantifying behaviour But how do we know which stations are inter-related? Look at combinations in phase-space. Station

2 Station 3 Station 2 Station 3 75.2 75.3 75.1

75.2 75.2 75.3 75.2 75.1 75.2 75.3 75.1 75.2

75.2 75.3 75.2 75.1 75.5 1 4 5 75.22

75.45 75.2 Price at Station 2 Price at Station 2 75.4 75.35 75.3 75.25 75.2 75.15 75.18 75.16

75.14 75.12 75.1 75.1 75.05 75 75 75.05 75.1 75.15 75.2

Price at Station 1 (a) Fixed point/Stable 75.25 75.3 75.08 75.08 75.1 75.12 75.14

75.16 2 3 75.18 75.2 Price at Station 1 (b) Limit Cycle/Looping 75.22 7

6 Quantifying behaviour Station 1 Station 2 74 82 76 83.4 75

79.2 77 81.9 90 Station 2 74 74 74.3

75 70.1 76 76.1 77 1 5 84 Price (p) at Station 2

86 84 82 80 78 76 74 83 82 81 80 79 72

78 70 69 70 71 72 73 74 75

Price (p) Station 1 (c) Random? 76 77 78 2 3 4 85 88

Price (p) Station 2 Station 1 73 74 75 76 77 Price (p) Station 1

(d) Chaotic? 78 79 7 6 Larger scale Better to look at sets of stations? Look at rural to urban transition simple time/price plot.

Day But, there may be other stations in the mix. Price Diffusion of price over geographical distance. Groups Station_3 Station_4 Station_5

Station_6 Station_7 75.55 75.5 75.45 75.4 Price (p) Multiple individuals in phase-space allows us to group by coincidences in behaviour Station_2 75.35

75.3 75.25 75.2 75.15 75.1 75.05 75.08 75.1 75.12 75.14 75.16 75.18

75.2 Price (p) Reaction of all the stations in the next day to changes in price at station 1. 75.22 Issues While there are plainly issues with large-scale analyses, we do have the foundation of techniques that cope with relationships at multiple scales. Plenty to be done. Issues

There are several major questions wed want to ask of geographical systems if we could. Stability: does the system have a dynamic equilibrium or does it fluctuate? Robustness: can the system withstand shocks and still produce sensible outputs? Sensitivity: will a small perturbation produce chaos? If we can identify complexity within systems, we can: Understand them better Manipulate them to our own requirements Make better predictions