Uppsal a univ ersitets l ogotyp

UPTEC F 21048 Examensarbete 30 hp Juni 2021

Compartmental Models in Social Dynamics

Alice Graf Brolund

Civilingenj örspr ogrammet i tek nisk fysik

Civilingenjörsprogrammet i teknisk fysik

Uppsal a univ ersitets l ogotyp

Compartmental Models in Social Dynamics

Alice Graf Brolund

Abstract The dynamics of many aspects of social behaviour, such as spread of fads and fashion, action, group decision-making, and disagreement, have been captured by mathematical models. The power of these models is that they can provide novel insight into the emergent dynamics of groups, e.g. 'epidemics' of , tipping points for collective action, wisdom of crowds and leadership by small numbers of individuals, segregation and polarisation. A current weakness in the scientific models is their sheer number. 'New' models are continually 'discovered' by physicists, engineers and mathematicians. The models are analysed mathematically, but very seldom provide predictions that can be tested empirically. In this work, we provide a framework of simple models, based on Lotka's original idea of using chemical reactions to describe social interactions. We show how to formulate models for social epidemics, social recovery, cycles, collective action, group decision-making, segregation and polarisation, which we argue encompass the majority of social dynamics models. We present an open-access tool, written in Python, for specifying social interactions, studying them in terms of mass action, and creating spatial simulations of model dynamics. We argue that the models in this article provide a baseline of empirically testable predictions arising from social dynamics, and that before creating new and more complicated versions of the same idea, researchers should explain how their model differs substantially from our baseline models.

Tek nisk-naturvetenskapliga fakulteten, Upps ala universitet. Utgivningsort U pps al a/Visby . H andledare: Li nnéa Gyllingberg, Äm nesgranskar e: D avi d Sum pter, Exami nator : T omas Nyberg

Teknisk-naturvetenskapliga fakulteten Uppsala universitet, Utgivningsort Uppsala/Visby

Handledare: Linnéa Gyllingberg Ämnesgranskare: David Sumpter Examinator: Tomas Nyberg Populärvetenskaplig sammanfattning Matematiska modeller kan hjälpa oss att förstå många typer av sociala fenomen, som ryktesspridning, spridning av memes, gruppbeslut, segregation och radikalisering. Det finns idag otaliga modeller för sociala beteenden hos människor och djur, och fler presenteras kontinuerligt. Det stora antalet modeller försvårar navigering inom forskningsfältet, och många av modellerna är dessutom komplicerade och svåra att verifiera genom experiment. I detta arbete föreslås ett ramverk av grundläggande modeller, som var och en modellerar en aspekt av socialt beteende; det gäller sociala epidemier, cykler, gemensamt handlande, gruppbeslut, segregation och polarisering. Vi menar att dessa modeller utgör majoriteten av de verifierbara aspekter av socialt beteende som studeras, och att de bör behandlas som en utgångspunkt när en ny modell ska introduceras. Vilka av mekanismerna från utgångspunkten finns representerade i modellen? Skiljer den sig ens nämnvärt från utgångspunkten? Genom att ha en god förståelse för grundmodellerna, och genom att förklara på vilket sätt en ny modell skiljer sig från dem, kan forskare undvika att presentera modeller som i praktiken är mer komplicerade varianter av sådana som redan finns. I detta arbete visar vi hur dessa grundläggande modeller kan formuleras och studeras. Modellerna bygger på enkla regler om vad som händer när individer i en befolkning möter varandra. Till exempel, om en person som har vetskap om ett rykte träffar någon som inte har det, kan ryktet spridas vidare. Därför har antaganden om vilka personer som kan träffa varandra stor påverkan på de resultat som modellerna ger. I detta arbete studeras varje modell med två olika metoder: i den ena har alla personer i befolkningen samma sannolikhet att träffa varandra, i den andra representeras befolkningen av ett rutnät, där varje plats motsvarar en individ. I den senare har alltså varje person ett begränsat antal grannar att interagera med. Vilken av dessa två metoder man väljer har stor betydelse för vilka beteenden modellerna förutspår. Som ett komplement till detta arbete presenteras ett verktyg i form av ett Python-program som utför analysen av modellerna. Detta kan användas för att undersöka grundmodellerna som presenteras i detta arbete, men också för att formulera och analysera nya modeller på samma sätt. På det viset kan nya modeller enkelt jämföras mot grundmodellerna. Verktyget är användbart både som introduktion för de som är nya inom social dynamik, men också för de forskare som som vill ta fram nya modeller och föra forskningsfältet vidare.

Contents

1 Introduction 4 1.1 Social Behaviour as States ...... 4 1.2 Well-Mixed Interpretation ...... 5 1.3 Spatial Interpretation ...... 7 1.4 Python Tool For Running The Models ...... 9 1.5 Previous Works ...... 9 1.6 Investigating Models of Social Dynamics ...... 10

2 Social Epidemic 11 2.1 Model Description ...... 11 2.2 Dynamical System ...... 11 2.3 Finding Fixed Points and Nullclines ...... 11 2.4 Initial Conditions in the Dynamical System ...... 14 2.5 Spatial Model ...... 14 2.6 Initial Conditions in the Spatial Model ...... 16 2.7 Conclusions ...... 17

3 Temporary Immunity 18 3.1 Model Description ...... 18 3.2 Dynamical System ...... 18 3.3 Finding Fixed Points and Nullclines ...... 18 3.4 Initial Conditions in the Dynamical System ...... 22 3.5 Spatial Model ...... 22 3.6 Initial Condition in the Spatial Model ...... 25 3.7 Conclusions ...... 26

4 Collective Action 26 4.1 Model Description ...... 26 4.2 Dynamical System ...... 27 4.3 Finding Fixed Points and Nullclines ...... 27 4.4 Initial Conditions in the Dynamical System ...... 30 4.5 Spatial Model ...... 31 4.6 Initial Condition in the Spatial Model ...... 33 4.7 Conclusions ...... 33

5 Social Recovery 33 5.1 Model Description ...... 33 5.2 Dynamical System ...... 34 5.3 Finding Fixed Points and Nullclines ...... 34 5.4 Initial Conditions in the Dynamical System ...... 37 5.5 Spatial Model ...... 37 5.6 Initial Conditions in the Spatial Model ...... 38 5.7 Conclusions ...... 39

1 6 Cycles 40 6.1 Model Description ...... 40 6.2 Dynamical System ...... 40 6.3 Finding Fixed Points and Nullclines ...... 41 6.4 Initial Conditions in the Dynamical System ...... 45 6.5 Spatial Model ...... 46 6.6 Initial Conditions in the Spatial Model ...... 49 6.7 Conclusions ...... 52

7 Cults 52 7.1 Model Description ...... 52 7.2 Dynamical System ...... 53 7.3 Finding Fixed Points and Nullclines ...... 53 7.4 Initial Condition in the Dynamical System ...... 57 7.5 Spatial Model ...... 57 7.6 Initial Condition in the Spatial Model ...... 59 7.7 Conclusions ...... 59

8 Decision Making - Version One 60 8.1 Model Description ...... 60 8.2 Dynamical System ...... 60 8.3 Finding fixed points and nullclines ...... 60 8.4 Initial Condition in the Dynamical System ...... 63 8.5 Spatial Model ...... 63 8.6 Initial Condition in the Spatial Model ...... 64 8.7 Conclusions ...... 66

9 Decision Making - Version Two 66 9.1 Model description ...... 66 9.2 Dynamical System ...... 67 9.3 Finding Fixed Points and Nullclines ...... 67 9.4 Initial Condition in the Dynamical System ...... 70 9.5 Spatial Model ...... 71 9.6 Initial Condition in the Spatial Model ...... 74 9.7 Conclusions ...... 74

10 Segregation - Version One 74 10.1 Model Description ...... 74 10.2 Dynamical System ...... 75 10.3 Finding Fixed Points and Nullclines ...... 75 10.4 Initial Condition in the Dynamical System ...... 78 10.5 Spatial Model ...... 78 10.6 Conclusions ...... 79

2 11 Segregation - Version Two 80 11.1 Model Description ...... 80 11.2 Dynamical System ...... 80 11.3 Finding Fixed Points and Nullclines ...... 80 11.4 Initial Condition in the Dynamical System ...... 83 11.5 Spatial Model ...... 83 11.6 Initial Condition in the Spatial Model ...... 84 11.7 Conclusions ...... 85

12 Polarisation 86 12.1 Model Description ...... 86 12.2 Dynamical System ...... 86 12.3 Finding Fixed Points and Nullclines ...... 87 12.4 Initial Condition in the Dynamical System ...... 90 12.5 Spatial Model ...... 91 12.6 Initial Condition in the Spatial Model ...... 93 12.7 Conclusions ...... 94

13 Python Tool for Model Investigation 94

14 Conclusions 95

References 96

3 1 Introduction 1.1 Social Behaviour as States We present a series of models describing how certain social, collective, mech- anisms emerge and play out in a population. The base of the models are the interactions that take place between individual members of the population. To describe the of interactions that may take place, we make use of compart- mental models. The idea behind compartmental models is that a populations can be divided into mutually exclusive compartments or groups, and we define interactions between members of the different groups. Individuals can transition into other groups, triggered by interactions with members of other groups or simply by chance. Imagine, as a concrete example, that a population is split into three groups, defined by who has and who has not adopted a certain fashion. Those who have not taken to it yet, the Susceptible people (group one), may adopt it from someone who has, who we will call an Infected person (group two). This will result in the susceptible person leaving the susceptible compartment, and instead joining the infected one. We denote this exchange

β S + I −→ 2I, where S denotes a susceptible person, I denotes an infected, and β is the rate (person per unit time) at which infected people meet susceptible people. Those who have adopted the fashion, may then either spontaneously lose interest in it, which naturally does not involve another person, or realise that the fashion is on decline and therefore stop adhering to it. The latter is the result of a meeting with someone who has already abandoned the fashion, i.e. a Recovered person (group three). Then, we have two options for transitioning into the recovered compartment, the spontaneous transition being

γ I −→ R, where R denotes a Recovered person, and the transition dependent on interac- tion being I + R −→α 2R. We have described the transitions of our model using chemical reaction equa- tions. These type of chemical reactions have been used to describe interactions since the 1920s, when Lotka (Lotka 1920) describes how they can be used in the modelling of biological systems. Note that unlike actual chemical reaction equations, these are regarded as non-reversible. That is, a susceptible person can be turned infected by an infected person, but no the other way around. The model described above, which we in this work will call the Social Re- covery model, is a variation of the rumour spreading model first presented by Daley and Kendall (Daley and Kendall 1964), with which they introduced the compartmental model to social dynamics. They based their work on the previ- ous use of the SIR model for epidemiology (Kermack and McKendrick 1927) as

4 they saw similarities (but also highlighted the differences) between the spread of disease and rumours. In the context of social dynamics, we can imagine the ’infection’ being something like a rumour, a fashion or an opinion. In this work, we will for the sake of clarity keep the names of the states from epidemiology, S, I and R, for models where this type of contagion applies. In this work we are only concerned with models where the population size N is a fixed constant. That is, in each reaction equation, the number of people are the same on the left and right side of the reaction arrow. We are also only working with models where there are two degrees of freedom, meaning we can describe all models in terms of only two of the involved compartments. In the Social Recovery model for example, it is enough to describe the susceptible and infected populations, since we can obtain about the recovered through R = N − S − I. This restriction means that a population N cannot be divided into more than three compartments. We can however, add a second population M, which like N is constant. For example, a model might look like

SN + 2IN → 3IN

SM + 2IM → 3IM

IN + SM → SN + SM

IM + SN → SM + SN , where SN + IN = N and SM + IM = M. This model will be investigated as a polarisation model in a later section, but is presented here to illustrate that we can express it entirely in terms of, for example, SN and SM . As we shall now see, this restriction means that we deal only with models whose outcome can be analysed in a two-dimensional phase plane.

1.2 Well-Mixed Interpretation One way of investigation a compartmental model, is to calculate the rates of changes for the sizes of each compartment. To do so, we borrow another element from chemistry. The law of mass action says that the rate of a reaction, such as a susceptible person becoming an infected one, is proportional to the product of the involved groups, e.g., susceptible and infected people. This is valid when the different types of individuals are mixed homogeneously, that is, if 1/4 of all individuals are susceptible, we can assume that out of all individuals any infected individual meets, 1/4 of them will be susceptible. A model derived in this way may therefore be called a ’well-mixed’ model. Applying this principle to the Social Recovery model, yields  s˙ = −β∗si  i˙ = β∗si − γ∗i − α∗ir r˙ = γ∗i + α∗ir.

This is a dynamical system, wheres ˙, i˙ andr ˙ are the rates of change of the three compartments. Here, the equations are written using the absolute number of

5 people in each state, s, i and r. si is then the number of meetings between susceptible and infected people, and β∗ the fraction of meetings with infected people that will lead to infection, per unit time. If we instead want to describe the proportions of people in each state, we substitute s and i with s = SN, i = IN and r = RN, where S, I and R are proportions and N the size of the whole population. Also, since the population size is fixed, we can substitute R = 1 − S − I, and see that to describe the whole system, it is enough to write ( S˙ = −βSI I˙ = βSI − γI − αI(1 − S − I).

Note that β = Nβ∗, meaning β represents the number of meetings with infected people that will lead to infection, per unit time. The same reasoning of course applies to the parameters γ and α. We assume in our analysis that the population size N is large. This is important when handling reaction equations on the form S +2I → 3I, which we will see examples of later. An interaction of this kind suggests that it takes two meetings with two different infected individuals for a susceptible person to be infected, but as we work with large populations, N → ∞, we are not concerned with the fact that the amount of infectious people that the susceptible might be i i i2 2 infected by is one less after the first meeting. That is, N N−1 ≈ N 2 = I when N is large. Then, I2S is the fraction of meetings being between a susceptible person and a second infected person. Solving the dynamical system, tells us how the sizes of the different groups (susceptible, infected, recovered), changes over time. One important tool for investigation of dynamical systems, and one that will be used extensively in this work, is the phase plane. The phase plane illustrates the behaviour of a dynamical system by plotting the two states against each other, and showing the possible trajectories a system might take. An example of a phase plane for the Social Recovery model is shown in Figure 1. There we can see a green trajectory showing how the number of susceptible and infected people will vary over time, for a specific initial condition. The phase plane is useful to see the qualitative behaviour of the system, in particular the placement of fixed point, i.e., points where both rates S˙ and I˙ are zero. In these points, no change happen, and they can be stable or unstable. Stable, or attracting, fixed points are points to which the trajectories of the system are attracted, and from which they cannot escape. In other words, they show us for which values of S and I the system has reached its equilibrium state. A type of fixed point that is present in many of the models in this work is the saddle point, which is only stable for trajectories approaching from a specific direction. They may therefore constitute an equilibrium to the system, but only for specific sets of initial conditions. All fixed points lie at the intersections of the system’s nullclines, which is what we call the lines at which S˙ = 0 or I˙ = 0. Analysing the nullclines is therefore very helpful for understanding the system.

6 Figure 1: Example of a phase plane for the dynamical system derived for the Social Recovery model. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

1.3 Spatial Interpretation A second approach to implementing the model is through a spatial interpreta- tion, where physical closeness of individuals plays a role in the transitions, or rather, the possibility of transitions. In the derivation of the dynamical system, we assumed that everyone in the population have equal chance of meeting each other, but as we introduce space as a factor in the simulations, that is not true. Social dynamics models are commonly modelled using agent-based models (Castellano, Fortunato, and Loreto 2009). One such model is the cellular au- tomaton, in which agents on a lattice change their states based on a set of rules. These rules can easily be interpreted as the chemical reaction equations of our models, making the cellular automata a suitable model for our purposes. The cellular automaton used in this work operates as follows: A lattice of N cells is created, with each cell representing an individual in the population. All cells are in one of the possible states, which for the Social Recovery model are S, I and R. In each step in the simulation, a cell is chosen at random, and evaluated according to the rules of the model. For example, an infected cell may become recovered. If the chosen cell is eligible for a transition that requires interaction, a second cell is randomly chosen from the neighbourhood of the cell being eval- uated, and if it is of the right type, a transition might occur. In this way, a susceptible cell may become infected if there is another infected cell in its neigh- bourhood. The neighbourhood consists of the eight nearest neighbours to the cell, and it is only these cells that can impact its transitions. The parameters β, γ and α are in the spatial model interpreted as probabilities, so that an infected cell become recovered with probability γ. The choice of having the neighbourhood consist of eight neighbours is not obvious. The fact that the lattice is a grid of squares, means that the neighbours at the corners of the chosen cell are further away from it than the neighbours at the sides, below or above. Treating the corner neighbours as if they where

7 equally close to the chosen cell as the other neighbours, as the spatial model does, means that infection can spread towards the corners of the lattice as fast as it does vertically and horizontally, even though this is unrealistic if looking at the lattice as a physical space. An hexagonal neighbourhood could fix this issue, but it is not necessary for the simulations to be understandable and reliable. A third option could be a neighbourhood of four, with the neighbours being to either side, above and below the chosen cell, but this creates some problems. Let us assume that a model has a rule requiring that two neighbours must be infected for a susceptible cell to be infected. If the susceptible cell has only four neighbours, then it can be right next to a wall of infected cells, and still not transition, because only one of its neighbours is in the infected cluster. This has a large impact on the result of the simulation. Another important aspect is the choice of updating scheme. As described, each step in the simulation updates only one cell, as opposed to them all being evaluated at once. This model thus uses asynchronous updates. The difference in outcomes from synchronous and asynchronous models is generally very large, and which one is best suitable depends on the application. Models with syn- chronous updates has only one possible trajectory, and exhibits cyclic behaviour and chaos, which is not the case for asynchronous models (Sch¨onfisch and de Roos 1999). In some biological systems, chaos is well documented and thereby a desired result, but it is not what we want to produce here. The aim of the simu- lator in this work is to approximate real continuous time, and that is done best with asynchronous updating. As Sch¨onfisch and de Roos writes, even though events in the real world happen simultaneously and thereby synchronously, most of the time nothing actually happens. Therefore, asynchronous updating can be regarded as being a discretization of continuous time. Even with an asynchronous model, the updates can happen in a number of different ways. In this work, the cells to be updated are chosen at random, and there is no guarantee that a cell will not be chosen twice before all cells have been updated. On average though, all cells will have been updated after N steps of the simulation, and therefore we will say that one unit of time in the dynamical system corresponds to 900 individual steps in the spatial simulation, for a lattice of size 30 × 30. Also, this method effectively avoids structure being added to the system by the updates themselves, as it would if the cells where, say, updated in order of where they sit in the lattice. The lattice is static, and cells that are not in each other’s neighbourhoods will never interact. Therefore, the initial setup is very important, and may produce drastically different results. One could for example imagine a setup where we place resistant individuals as a border between susceptible people and infected ones, which would mean that no one ever gets infected. The spatial model has then introduced a third factor to investigate, apart from the ones present in the dynamical systems. In addition to the parameters, β, γ and α, and the initial number of people in each state, we can vary the placement of those people.

8 1.4 Python Tool For Running The Models In connection with this work, an open-access Python tool has been developed, in the form of two Python notebooks. The tool is aimed at those with some familiarity with mathematics and dynamical systems, but not necessarily with social dynamics, and its purpose is to provide an introduction to both com- partmental models and social dynamics, and allow easy analysis of the baseline models presented here. To introduce the user to compartmental models and to the controls of the tool, one of the notebooks consists of an interactive study of the Cult model. A cult, in the notebook called ’The Cult of the Red’, is studied using the Cult model presented in this work. The intuition behind the model is explained in a compartmental context, before the user is guided through the derivation and analysis of the dynamical system and the spatial model. Thus, this notebook exemplifies how a model of social dynamics might come to be, and how it can be analysed. In the second notebook then, the user can do the same to any and all of the models presented in this work, or to models of their creation. By defining reaction equations for desired transitions, the user can create any model following the same restrictions as the models in this work. They can then be studied both from a well-mixed perspective and as a cellular automaton. This way, a model’s behaviour for different initial conditions and parameter values is easily studied.

1.5 Previous Works We have already discussed Daley and Kendall’s rumour spreading model, which was introduced in 1964. Since then, a plethora of compartmental models for so- cial dynamics have been developed and presented, attempting to explain topics ranging from economics to animal group behaviour. Daley and Kendall’s ru- mour model have been reworked and extended with things like forget-remember mechanisms (Gu, Li, and Cai 2008) or government issued rumour inhibitors (Li et al. 2021). With the rise of social media, rumour type models have have emerged that aim to investigate phenomena such as memes spreading (Wang and Wood 2011) or fake news, for example by adding a ’fact checker’ com- partment (Piqueira, Zilbovicius, and Batistela 2020). Others have attempted modelling the spread of two competing rumours, each trying to win over a group of ’hesitants’ (Liu et al. 2016). Related to the study of rumour spreading is the study of a population’s opinions and attitudes, and how they change through interactions between in- dividuals. The Polarisation model presented in this work belongs to this field, and especially to the branch devoted to the study of extremism. A similar model to the Polarisation model have been presented by (Short, McCalla, and R.D’Orsogna 2017), whose model features two distinct groups whose members can be either radical or moderate. One of the most well-known models of social dynamics is the original Schelling model, which models the physical segregation of different groups based on their respective tolerance level for each other (Schelling 1969). In this work, we will

9 see a segregation model based on the same thinking, where the distancing of people from each other does not consist of movement, but rather of a change of some external attribute. What social dynamics models generally have in common is that they show that the composition of a collective is not simply a sum of the individual be- haviour, but that a pattern emerges in the interplay between the individuals that can be very distinct. This effect is especially palpable when investigating group decision making. This work will present two versions of Decision Making models, the first one relating to models made of the behaviour of bees. Bees looking for sources of nectar does not individually seek out and asses several dif- ferent sources, but will collectively sort out which sources are most favourable. A bee that finds a suitable nectar source will perform a dance, that may attract another bee to land in the same spot, and assess the source for themselves. A good nectar source will that way be collectively chosen, and a bad one aban- doned (Seeley, Camazine, and Sneyd 1991). Models developed in the study of ants have a similar approach. Ants that are in search of a place for a new home, has an intricate process for finding the best possible one. It involves scouting ants actively recruiting ants from the population to asses the potential home, and the more ants are introduced to the site, the more recruiting will happen (Pratt 2005). That way, one site will eventually out-compete the other. This model bears some resemblance to the second Decision Making model of this work.

1.6 Investigating Models of Social Dynamics Many compartmental models of social dynamics already exist, and new ones are continually presented. Among them, the differences regarding assumptions being made about the system as well as the choices in implementation are large. This is of course necessary and natural in many cases, but excessive lack of uniformity can make the field difficult to navigate. What is to say that a model I have developed has not been made before, in a slightly different form? Also, many complicated models are difficult to verify empirically than way more sim- plistic models are. The models discussed in this work, we argue, constitute a baseline of models for social dynamics, and encompass the majority of the processes found in models of social dynamics. Thereby, they can be used by researchers as a framework to compare their proposed models to. If researchers could link their model to an existing branch of models it would provide more context to their work, help others understand and find it, and by extension, make the field more uniform and easier to navigate. With researchers turning their attention to today’s increased connectivity through internet and media, it is clear that this type of model is highly relevant and engaging. These models can effectively give insight to phenomena such as ’epidemics’ of memes, tipping points for collective action, wisdom of crowds etc. But, for someone who wishes to be introduced to a mathematical approach to social dynamics, where do they begin? The open access tool presented in this work, is a way of introducing the interested to the baseline models of social

10 dynamics, to investigate and compare them. It also provides the possibility of creating and investigating new, user-defined, models. The aim of this work is thus threefold: to provide an easy way for accessing and understanding the core models of social dynamics, to provide a framework for researchers who wish to develop new models and to provide an easy to use python tool to investigate these dynamics.

2 Social Epidemic 2.1 Model Description This model, known in epidemiology as the SIR model, is typically used for describing the spread of an infection. Its name comes from the three states possible in the model: Susceptible, Infected and Recovered. In the context of social dynamics, we can imagine the infection being a rumour or a trend, spreading in the same way as a disease. The rules are that susceptible people get infected as they meet already infected people, and infected people recover spontaneously. The chemical reaction equations are

β S + I −→ 2I γ I −→ R, where γ and β are the rates of infection and recovery, respectively.

2.2 Dynamical System Employing the law of mass action, as described in Section 1.2, the chemical reaction equations of this model give us the dynamical system

( S˙ = −βSI I˙ = βSI − γI.

2.3 Finding Fixed Points and Nullclines Looking at the system, we can immediately see that I = 0 gives a fixed point, no matter what S is. Therefore, there is a line of fixed points at

(S∗,I∗) = (S, 0). (1)

To find the nullclines, we first look at the first equation. In order for it to be zero, either I(S) = 0, or S(I) = 0. The second equation is zero if I(S) = 0 or γ S(I) = β . Thus, the phase plane for this system will show a line of fixed points γ along the S-axis, a nullcline fixed along the I-axis, and one nullcline at S = β , parallel to the I-axis. By plugging in values in the system we see that along the I-axis, the rate of change of I is negative. This means that the phase plane will

11 have downward facing arrows along this line. Along the other nullcline, the rate of change of S is negative, meaning the arrows along this line are facing left. Figure 2 shows three phase planes for the system, as well as corresponding solution plots, obtained with initial condition S = 0.5, I = 0.5. In each phase γ plane, the ratio S(I) = β is varied, showing the variable nullcline move closer to the I-axis and the resulting changes to the system’s behaviour. Depending on the initial condition, the epidemic might reach a peak before it decreases, and the phase planes show that this peak is reached when the susceptible population γ reaches the value S(I) = β . This is clear since the rates of change for I is positive for S larger than this value, zero at the nullcline, and negative for smaller S. The last phase plane in the figure shows the special case where γ = 0, that is, the infected people never recover. In this case, the variable nullcline and the nullcline along the I-axis are one and the same, meaning that the I-axis are a line of fixed points. All trajectories lead to the I-axis, meaning all susceptible people in the population are eventually infected, and stay infected.

12 (a) Phase plane for parameters β = 0.5 (b) Solution plot for parameters β = 0.5 and γ = 0.4 and γ = 0.4.

(c) Phase plane for parameters β = 0.5 (d) Solution plot for parameters β = 0.5 and γ = 0.1 and γ = 0.1.

(e) Phase plane for parameters β = 0.5 (f) Solution plot for parameters β = 0.5 and γ = 0 and γ = 0.

Figure 2: Phase planes and corresponding solution plots for the dynamical γ system, with three different ratios β . The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

13 2.4 Initial Conditions in the Dynamical System As seen in the phase planes in Figure 2, if the number of initially susceptible γ people exceeds the ratio β , the infection will spread and have a peak before it starts to diminish. The smaller the ratio is, the more initial conditions exist that fulfil this. If the ratio is larger than one, no such initial condition exist, and the infected population will immediately start to decrease. This makes sense intuitively, as it would mean that infected people are more likely to recover than susceptible people are to be infected.

2.5 Spatial Model The spatial model is capable of reproducing the behaviour of the well-mixed model, for all parameter values that was shown in Figure 2. The result plots for the cellular automaton with these parameters are seen in Figure 3, and look almost identical to the solution plots in Figure 2. It is not the case though, that all spatial models give the same result as the dynamical system as long as the parameters are the same. Figure 4 shows the result of a spatial model and dynamical system with the parameters β = 0.5 and γ = 0.4. This is the same dynamical system as in Figure 2a. The initial condition for these results is S = 0.9, I = 0.1. Here, the spatial model does not replicate the behaviour seen in the dynamical system. Far less people are recovered at the end of the simulation, meaning far less people were ever infected. When the infection spreads in the lattice, clusters form around the individuals who are sources of the infection, i.e., the initially infected. Therefore, the fraction of an infected individual’s neighbours who are susceptible, is lower than the fraction of susceptible people in the entire domain, and the infections capability to spread is decreased. When the susceptible and infected populations are equally large in the beginning of the simulation, the fraction of susceptible neighbours is on average the same as the total fraction of susceptible people, given that the individuals are evenly spread in the domain. This is only true in the beginning of the simulation, but is the reason that we do not see the effects of clustering as clearly Figure 3.

14 (a) Result plot for parameters β = 0.5 and γ = 0.4

(b) Result plot for parameters β = 0.5 and γ = 0.1

(c) Result plot for parameters β = 0.5 and γ = 0

Figure 3: Result plots for the cellular automaton, with three different ratios γ β , and initial condition S = 0.5, I = 0.5.

15 (a) Result plot for the cellular automaton.(b) Solution plot for the dynamical system.

Figure 4: Result from the spatial model and dynamical system with parameters β = 0.5 and γ = 0.4 and initial condition S = 0.9, I = 0.1.

2.6 Initial Conditions in the Spatial Model All previous simulations are run with a random initial setup, that is, the in- fected people are randomly placed in a population of susceptible people. This is the setup that best emulates the well-mixed case, but another option is to concentrate the infected population and separate it from the susceptible one. Two results of such a setup is shown in Figure 5. In order for the simulations to be comparable to results in Figures 2 and 3, the same initial condition is employed. That is, half of the initial population is infected. Thus, there are two borders between the infected and susceptible populations, and only indi- viduals next to the border can be infected, meaning infection is impossible for the vast majority of susceptible people. Meanwhile, the recovery is independent of neighbours. Therefore, the spread of the infection is slow, and the number of infected people will decrease fast as infected people recover. In Figure 5b we can see that the infection lasts longer before it dies out, compared to the simulation with a randomised setup in Figure 3b. This is due to the fact that there is a solid susceptible population that the infection can spread out into, so if the recovery rate is low enough, the infection might ”escape” out into the susceptible population and meander until it dies out.

16 (a) Result plot for the cellular automaton with parameters β = 0.5, γ = 0.4.

(b) Result plot for the cellular automaton with parameters β = 0.5 and γ = 0.1.

Figure 5: Result from the spatial model with a higher and lower recovery rate. In the initial state, half of the population is infected and half susceptible, and the two groups are separated in the domain.

2.7 Conclusions In this model, the infection will always die out if the population has the possibil- ity of recovery. Whether or not the infection is able to grow before that happens depends on the parameters as well as the initial conditions. The spatial model typically has a lower spread, due to clustering of the infected individuals. If the infected and susceptible people are separated completely, the spread is hindered further, but for simulations with a high infection rate, the presence of a suscep- tible population without any recovered individuals may prolong the infection’s life span.

17 3 Temporary Immunity 3.1 Model Description This model is similar to the Social Epidemic model, with the important differ- ence that people who have recovered can revert back to being susceptible. This dynamic makes sense as we are talking about trends, since it is well known that fashion can come back after being out of style, and of course, people’s individual preferences can change. A similar dynamic to this model has for example been used to model the spread of memes (Wang and Wood 2011), where it is assumed that a person who has grown tired of a after some time can decide that is is funny or relevant again. This model is then the same as the Social Epidemic one, with one additional rule: recovered people can spontaneously turn susceptible. This gives the model description

β S + I −→ 2I γ I −→ R, R −→α S, where γ and β are the rates of infection and recovery, and α is the rate of susceptibility.

3.2 Dynamical System Employing the law of mass action as described in Section 1.2, and using R = 1 − S − I, the chemical reaction equations of this model give us the dynamical system

( S˙ = −βSI + α(1 − S − I) I˙ = βSI − γI.

3.3 Finding Fixed Points and Nullclines To find the fixed points, we first look at when I˙ = 0, and find that either I = 0 γ γ or S = β must be true. This also means that I(S) = 0 and S(I) = β are nullclines to the system. Setting I = 0 in S˙ = 0 gives that S = 1, giving us the first fixed point at (S∗,I∗) = (1, 0). (2) γ Doing the same with S = β gives us the second, at

γ α(β − γ) (S∗,I∗) = ( , ). (3) β β(α + γ

18 ˙ α(1−S) Finally, we find the nullcline to S = 0, which is I(S) = βS+α . Looking at this nullcline, we see that it will always intersect the I-axis at I = 1, and the S-axis at S = 1. One of fixed points of the system is the intersection of the two variable nullclines γ S(I) = (4) β and α(1 − S) I(S) = , (5) βS + α as illustrated in the phase plane in Figure 6. Analysis of the eigenvalues of the linearised system shows that this point is a stable spiral, meaning all trajectories might oscillate, but will eventually stabilise at this point. This behaviour is seen in the solution plot. The phase plane in the figure is made using the parameters β = 0.5 and γ = α = 0.2, and varying the parameters causes one or both of of the nullclines to shift, thereby changing the placement of the fixed point and the equilibrium of the system. We will use the result in Figure 6 as a reference point for our analysis, by varying one parameter at a time.

(a) Phase plane. (b) Solution plot.

Figure 6: Phase plane and solution plot for the dynamical system with parameters β = 0.5 and γ = α = 0.2. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

First, we will look at the effect of varying the recovery rate γ. Just as in the Social Epidemic model, varying this parameter will change the location of the vertical nullcline (4). It does not impact the curve of the nullcline (5), with which the vertical one meet, therefore, changing γ will effectively move the fixed point along that curve. Specifically, increasing γ will result in an equilibrium with a lower population of infected individuals, as evident from the comparison of Figures 6 and 7. Increasing the recovery rate γ, increases the recovered population, and thereby also the amount of people who become susceptible.

19 Many of them also stay susceptible, since the infected population, who would otherwise infect the susceptible one, is reduced. If γ ≥ β, that is, the vertical nullcline’s (4) placement on the S-axis is outside of the bounds of the phase plane, the only fixed point is (1, 0). That means that all initial conditions will lead to the infection dying out, and the whole population will be susceptible. Intuitively, this makes sense, since if the recovery rate is higher than the infection rate, the spread will not be sustained. An example of this is shown in Figure 8, showing a system with parameters α = β = γ = 0.5.

(a) Phase plane. (b) Solution plot.

Figure 7: Phase plane and solution plot showing the effect on the system from increasing the recovery rate γ. Parameters are β = 0.5, γ = 0.4, and α = 0.2. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

20 (a) Phase plane. (b) Solution plot.

γ Figure 8: Phase plane and solution plot showing a system with a ratio β ≥ 1. Parameters are β = γ = α = 0.5. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

Now, let us look at the infection rate β. This parameter has an impact on both nullclines, as seen in Figure 9. In this system, β is increased, compared to the system in Figure 6. The result is a system where the vertical nullcline (4) is closer to the I-axis, and the nullcline (5) has a more pronounced curve. The fixed point has a higher I-value than the reference system, meaning the infected population is larger.

(a) Phase plane. (b) Solution plot.

Figure 9: Phase plane and solution plot showing the effect on the system from increasing the infection rate β. Parameters are β = 0.9 and γ = α = 0.2. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

The third and last parameter to analyse is the rate with which recovered people turn susceptible, α. This parameter only affects the nullcline (5), where

21 increasing α will result in a more uniform incline along the curve. In other words, as α grows, the nullcline will more and more resemble a line. As the vertical nullcline (4) is not affected, increasing α will move the fixed point higher along that line. That means that, in the equilibrium, the infected population is larger, but the susceptible is unchanged. This is illustrated in the example of a system with increased α, compared to the reference system, that is shown in Figure 10. Increasing the rate of infected people becoming susceptible, will lead to more susceptible people who can become infected. Therefore the equilibrium size of the infected population will be larger. The rate of recovery is low though, and many recovered people are quickly turned susceptible, why the recovered population is decreased.

(a) Phase plane. (b) Solution plot.

Figure 10: Phase plane and solution plot showing the effect on the system from increasing the rate with which infected people become susceptible, α. Parameters are α = β = 0.5 and γ = 0.2. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

3.4 Initial Conditions in the Dynamical System The initial condition has no impact on the equilibrium state of the system. However, it does impact how dramatic the oscillations in the system are, before it reaches its equilibrium state. Generally, a trajectory in the phase plane that starts far away from the fixed point, will draw a large spiral, creating large oscillations.

3.5 Spatial Model Figure 12 shows the results of cellular automata corresponding to the dynamical systems in Figures 7, 9-10, while 11 shows the result of the reference model, com- parable to the dynamical system in Figure 6. Just as in the dynamical systems, the spatial models exhibits oscillations before the equilibrium is reached. One

22 interesting trend is visible in all figures: the susceptible population is higher in all of them compared to the corresponding dynamical system. That is because the spread of the infection is hindered, as it requires susceptible people being neighbours with infected people. The clustering effect discussed in Section 2 is the reason for this. In the simulation in Figure 12a, this effect leads to the infection dying out, and the whole population turning susceptible. In this case, increasing γ even further, or decreasing β, would not have any effect, since the infection would die out either way.

Figure 11: Result plot for parameters β = 0.5 and γ = α = 0.2. This is the reference for comparison with models with other parameter values.

23 (a) Result plot for a model with increased recovery rate γ. Parameters are β = 0.5, γ = 0.4 and α = 0.2.

(b) Result plot for a model with increased infection rate β. Parameters are β = 0.9 and γ = α = 0.2.

(c) Result plot for a model with increased rate α. Parameters are β = α = 0.5 and γ = 0.2.

Figure 12: Result plots for four cellular automata, each corresponding to the dynamical systems in Figures 6-7, 9-10. The first model acts as a reference to the other three. All simulations have initial24 condition S = 0.5, I = 0.5. 3.6 Initial Condition in the Spatial Model All previous simulations were run with a lattice with randomly placed infected and susceptible people, emulating the well-mixed case. For this setup, the same equilibrium state is reached regardless of changes in the amount of people in the initial states. Just as in the Social Epidemic model, concentrating a group of infected people at the initialisation of the simulation will hinder the spread, and an example of this is shown in Figure 13. In this simulation, the infected people constitutes one half of the domain, and the parameters are β = 0.9 and γ = α = 0.2. Thus, it is comparable to the simulation in Figure 12b. The size of the infected population never increases to a peak such as in the randomised case, but it does reach the same equilibrium in roughly the same amount of time. In that aspect, both simulations resemble the dynamical system. In Figure 14, the same model is used, but with a much smaller infected population at the initialisation. The source of the spread is a concentrated group of infected individuals, constituting only 0.44% of the total population. We can see that even with such a small infected group, the infection manages to spread to the same equilibrium state as when half of the population started out as infected. However, in this case, it takes a long time for the infection to spread to those levels, much longer than it takes in the dynamical system. It seems then than that the initial condition in the spatial model does not change the equilibrium state, in comparison with the dynamical system, but it does dictate the time it takes to get there.

Figure 13: Result plot for the same model shown in Figure 12b, with parameters β = 0.9 and γ = α = 0.2. In this case, the initially infected half of the population is concentrated in the domain.

25 (a) Result plot of the cellular automaton. (b) Solution plot for the dynamical system.

Figure 14: Result from the spatial model and dynamical system with parameters β = 0.9 and α = γ = 0.2. The infected population stands for 0.44% of the initial population, and in the spatial simulation, it is concentrated in a square.

3.7 Conclusions As long as the recovery rate is lower than the infection rate, the system will reach an equilibrium were the infection is sustained in the population. The people in the three states affect each other in an almost cyclic fashion, creating oscillations in the solution plots. The size of the susceptible group affects the size of the infected one, which in turn affects the size of the recovered one, which affects the susceptible one. The cyclic dynamic is disturbed by the fact that the types of interactions that is needed for transitions between stated are different; the total rate of infection is lower than that of recovery or susceptibility, since it depends on the fraction of infected people in the population. That the infection is ”slowed down” in this way dampens the oscillations, and the system gradually finds an equilibrium. In the phase plane, this is displayed as a stable spiral. The spatial model’s equilibrium states resembles those of the dynamical systems’, but does feature a larger susceptible population due to the hindered spread of the infection in the lattice. The spatial models reaches the same equilibrium states regardless of the initial condition, but the smaller the initial infectious population is, the longer it will take for the equilibrium to be reached, and the more it will differ time-wise from the dynamical system.

4 Collective Action 4.1 Model Description In the Temporary Immunity model, one person could ”infect” another, that is, influence her to adopt a trend, believe a rumour or have a certain opinion. In

26 this model though, we assume that a person needs collective influence, from more than one person, to transition into the infected state. We then change the first rule of the Temporary Immunity model to ”one susceptible person might become infected if they meet two infected people”. The rest of the dynamics are the same, and the set of reaction equations become

β S + 2I −→ 3I γ I −→ R R −→α S.

4.2 Dynamical System Employing the law of mass action, yields the dynamical system,

( S˙ = −βI2S + R I˙ = βI2S − γI.

4.3 Finding Fixed Points and Nullclines To find the fixed points, we begin by setting I˙ = 0, which has two solutions, in γ ˙ I = 0 and S = βI . When set in S, the first solution gives us S = 1, meaning we have found our first fixed point in

(S∗,I∗) = (1, 0). (6)

The second solution gives us the equation −βγI2 αγ S˙ = + α − − αI = 0, (7) βI βI which, after some manipulation, tells us that the real and positive roots to the second order equation

− β(α + γ)I2 + βαI − αγ = 0, (8) gives us the I-values to our remaining fixed points. The maximum number of fixed points is thus three, which happens when (8) has two real and positive roots. We find an expression for the nullcline for S˙ by setting S˙ = 0. Rearranging the terms gives us the expression α α I2 + I + (S − 1) = 0, (9) βS βS and solving for I gives the solutions s α α2 α I(S) = − ± − (S − 1). (10) 2βS 4β2S2 βS

27 Since these are two expressions, it means that there are in fact two nullclines, but as the second one will give a negative value of I, it is not relevant to this model. Finding the nullclines to I˙ is less involved, and we see quickly that I˙ = 0 has a solution in I(S) = 0, (11) and we have one nullcline along the S-axis. The second nullcline is given by γ I(S) = , (12) βS and it is this curve, intersected with the nullcline 10, that will create the fixed points. Figure 15 shows a series of phase planes and solution plots for different infection rates β. It shows that when β grows, the nullclines get closer to each other. In fact, both nullclines move towards the origin, but the nullcline for I˙, (12), moves more, ”catching up” to the other nullcline. When they meet, the fixed points are created. The first system shown in the figure is one where the only fixed point is the one at (1, 0), meaning the infection dies out and the entire population becomes susceptible. The second is a system where only two fixed point exists, one being a neutrally stable fixed point. This means that there exists a line of initial conditions leading to the point, but a trajectory just slightly outside of this line will not be attracted to the point at all (Sayama 2020). Therefore, this system will generally lead to the infection dying out. The third system is shown to have three fixed points, of which two are attracting: the point at (1, 0), as always, but also one at the intersection of the nullclines. The third point is a saddle, meaning many trajectories will be attracted to the point, but only a line of them will actually end up in it. Trajectories leading to this point is a stable spiral, like the one in the Temporary Immunity model. We can also see in the figure, that the higher infection rate is, the closer the fixed point is to the I-axis. This suggests that a high infection rate relative to recovery rate and rate for becoming susceptible, the larger the part of the population is that have an ongoing infection, or that have just recovered.

28 (a) Phase plane for infection rate β = 0.7.(b) Solution plot for infection rate β = 0.7.

(c) Phase plane for infection rate β = 0.8.(d) Solution plot for infection rate β = 0.8.

(e) Phase plane for infection rate β = 0.9.(f) Solution plot for infection rate β = 0.9.

Figure 15: Phase planes and corresponding solution plots for the dynamical system, with three different infection rates β. The other parameters are γ = α = 0.1. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

29 Looking at the nullclines (10) and (12), we can see that γ and α are each a part of just one of them. This means that the nullclines can be manipulated one at a time, by varying γ or α while keeping β constant. Figure 16 shows the result of doing just that, using Figure 15d as a reference. It shows that varying the recovery rate, γ, will result in the nullcline (12) moving higher in the plane, in this case destroying the fixed point. Varying the recovery rate while the nullclines still intersecting, would result in the stable fixed point sitting lower on the I-axis and higher on the S-axis. That is, more people would be unaffected by the infection in the equilibrium state. Varying the rate of turning susceptible, α, is seen to cause the nullcline (12) to move higher in the plane, in this case creating a stable fixed point. Increasing this rate causes the fixed point to sit higher on the I-axis and lower in the S-axis, meaning a larger part of the population will be infected in the equilibrium state.

(a) Phase plane for an increased recovery (b) Phase plane for an increased rate of rate, γ = 0.3. turning susceptible, α = 0.3.

Figure 16: Phase planes for two dynamical systems, showing the results of varying γ and α separately, from the reference system in 15d. In the reference, the rates are β = 0.8, γ = α0.1. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

4.4 Initial Conditions in the Dynamical System As we have seen in the previous section, the maximum number of fixed points in the system is three. If a system has three fixed points, two of them are attracting, meaning the initial condition will determine whether the infection will die out, leaving the entire population susceptible, or if the equilibrium state will be that of the stable spiral, which will create oscillations in the population before it settles in a state where a part of the population will be infected. Figure 17 shows examples of both options, a small change in initial condition drastically changing the outcome of the simulation.

30 (a) Phase plane.

(b) Solution plot for the initial condition (c) Solution plot for the initial condition S = 0.3, I = 0.2, leading into the stable S = 0.3, I = 0.15, leading into the stable spiral. node at (1, 0).

Figure 17: Phase plane and solution plots the system β = 0.8, γ = 0.1 and α = 0.3, with two different initial condition, leading to the two different equilibrium states. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

4.5 Spatial Model We saw in the analysis of the Temporary Immunity model that the dependence on neighbours in a spatial model with a fixed lattice, hinders the spread of the infection. In this model, not only one, but two of the neighbours of a susceptible individual must be infected, in order for the individual to turn infected as well. Presumably, this will cause an even greater hindrance to the spread. Figure 18 shows that this indeed the case; a system with rates and initial condition com- parable to the dynamical system in Figure 15f, where an equilibrium infection level was reached, will in the spatial model result in a infection that completely dies out. This result differs very little from the ones obtained from simulations with the other infection rates in Figure 15, suggesting that varying the infection

31 rate has very little effect compared to the lattice’s effect on the simulation. This is not saying that there are no combinations of parameter values that will lead to the infection surviving in the spatial model. Figure 19 shows the result of a simulation where the recovery rate γ is lowered. In this case, the infection finds an equilibrium value, and we can clearly see that varying the recovery rate made a difference to the result, which we did not when the infection rate was varied. Since recovery is a spontaneous transition, and thus does not depend on neighbours, this shows that the spatial aspect of infection is what diminishes the effect of varying β. The ratio between the infection rate and the recovery rate must be significantly larger in the spatial model, in order for the infection to survive.

Figure 18: Result plot for the model β = 0.9, γ = α = 0.1, and initial condition S = 0.7, I = 0.3, which is comparable to the dynamical system in Figure 15f. The lattice is randomly initiated.

Figure 19: Results from the spatial model and the dynamical system with parameters β = 0.9, γ = 0.01, α = 0.1, and initial condition S = 0.7, I = 0.3.

32 4.6 Initial Condition in the Spatial Model In the simulations presented in the previous section, we saw that the spatial simulation did not manage to emulate the result of the dynamical system, for the model β = 0.9, γ = α = 0.1, while it did for the system β = 0.9, γ = 0.01, α = 0.1. In both these simulations, the initial condition was S = 0.7, I = 0.3. Is there an initial condition that will cause the spatial model for the first model to recreate the result of the dynamical system? The fixed point found in the well- mixed model, for the system β = 0.9, γ = α = 0.1, sits at (1/3, 1/3). Initialising the lattice with a much larger infected population than this might allow for the infection to survive. In turns out that it does not. Not even setting the entire initial population infected changes the outcome of the simulation. This shows that the spatial model has a fundamentally different behaviour than the dynamical system, and the equilibrium does not exist.

4.7 Conclusions This model is similar to the Temporary Immunity model, but infection requires influence from two, instead of one, other individual. The dynamical system has a similar appearance as the one for Temporary Immunity, but in addition to the stable spiral, there is an attracting node for which the infection dies out completely.The rates of infection, recovery and susceptibility can be used to create or destroy the stable spiral, and the initial condition determines whether the infection will die out, or if the model will exhibit a similar behaviour as the Temporary Immunity one. The difference in behaviour between the spatial and well-mixed models is more dramatic for this model compared to the Temporary Immunity one, be- cause of the added difficulty for the infection to spread in the lattice. The ratio between the infection rate and the recovery rate must be significantly larger in the spatial model compared to the well-mixed one, in order for the infection to survive.

5 Social Recovery 5.1 Model Description The Social Recovery model is similar to the Social Epidemic model, but as the name suggests, recovery is socially determined. This is a version of the rumour spreading model introduced by Daley and Kendall (Daley and Kendall 1964), but here we will interpret the rumour as a fashion trend, where the ”recovery”, i.e., getting over the trend, is a result of interactions with other people. Therefore, we add a rule to the Social Epidemic model, saying that an infected person might recover if they meet an already recovered person. Thus,

33 the reaction equations for this model are

β S + I −→ 2I γ I −→ R I + R −→α 2R.

5.2 Dynamical System As before, we find the dynamical system for this model. It is similar to the dynamical system for the Social Epidemic model, save for the extra term in I˙.

( S˙ = −βSI I˙ = βSI − γI − αI(1 − S − I).

5.3 Finding Fixed Points and Nullclines The rate of change of S, S˙, is zero when either S = 0 or I = 0. To find when the nullcline for I˙, we look at

I˙ = (βS − γ − α(1 − S − I))I = 0 and see that I = 0 satisfies the equation, meaning we have immediately found a line of fixed points along the S-axis,

(S∗,I∗) = (S, 0). (13)

The second nullcline for I˙ is given by

βS − γ − α(1 − S − I) = 0, that is, it is the line  β   γ  I(S) = − + 1 S + + 1 . (14) α α

γ This line will intersect S = 0 at I = 1+ α , meaning we have another fixed point at γ (S∗,I∗) = (0, 1 + ). (15) α As seen in the phase plane in Figure 20, trajectories are attracted to the line of fixed points along the S-axis. Thus, all initial conditions will lead to the infection dying out. Along the nullcline on the I-axis, the trajectories are downward-facing, and along the variable nullcline (14), the trajectories faces the right. Trajectories that start above the variable nullcline will then increase in the I-direction, reach a maximum I-value on the nullcline, and then decrease in the I-direction until it reaches its equilibrium on the S-axis. Note, however, that the only legal initial conditions are in the lower, left triangle of the phase plane,

34 since the population must add to one. Therefore, if the variable nullcline lies above the diagonal at I(S) = −S + 1, there are no initial conditions for which the infection may increase in size before it dies. To see when this is the case, we look at the points where the nullcline (14) intersects the axes. The nullcline intersects the I-axis at  γ  I(0) = + 1 , (16) α and this expression would have to be less than one to allow for initial conditions to lie above the nullcline. This however, is not possible, since γ and α are non-negative. Let us instead look at the point where the nullcline intersects the S-axis. It occurs at γ + α S(0) = , (17) β + α which is only larger than one when the recovery rate, γ, is larger than the infection rate, β. Thus, we can conclude that for the infection to have a chance at increasing, the rate of recovery must be lower than the rate of infection. The rate of infection also affects the slope of the nullcline (14). Figure 20 shows a comparison of two systems with β = and β =. A higher rate β result in a steeper slope, and allows the infection to grow larger, than a lower one.

35 (a) Phase plane for β = 0.4. (b) Solution plot for β = 0.4.

(c) Phase plane for β = 0.6. (d) Solution plot for β = 0.6.

Figure 20: Phase planes and solution plots for two systems with parameters α = γ = 0.1 and varying β. The fact that γ < β gives the possibility for growth of the infected population, when the initial condition is above the dotted nullcline. A higher infection rate β gives a larger maximum infection size. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

Note that we thus far have discussed the rate of spontaneous recovery. The rate of social recovery, α, cannot be varied in order to forbid the infection from growing. However, if γ and β are such that growth is possible, increasing α will move the point (17) further from the origin. At the same time, it will move the point (16) closer to the origin. In fact, looking at the nullcline (14), we can see γ γ that changing α will result in the nullcline rotating around the point ( β , 1 − β ), which is on the diagonal. This is shown in Figure 21, and tells us that increasing the social recovery rate α will reduce the amount of initial conditions that will lead to the infection growing. Further, it will flatten the slope of the nullcline, and thereby decrease the maximum size of the infected population for any initial condition.

36 Figure 21: Phase plane for two different systems, illustrating the effect of varying the social recovery rate α. The other parameters are kept the same at β = 0.6 and γ = 0.1, while α in the system plotted in grey is α = 0.1 and α in the system plotted in black is α = 0.5. Increasing α allows fewer initial conditions that will lead to an increase of the infected population.

5.4 Initial Conditions in the Dynamical System As discussed in the previous section, the initial condition determines whether or not a simulation will lead to the infection increasing its hold on the pop- ulation. The initial fraction of infected individuals must be below the value  β  γ  I = − α + 1 S + α + 1 for an increase to be possible (given that an in- crease is allowed by the parameters, i.e., γ < β).

5.5 Spatial Model As explained in discussions of previous models, the spatiality of the cellular automata model causes the spread to be hindered. The same phenomenon can be found for this model. In this model, recovery is also affected by interactions with other individuals, why we also get clusters of recovered individuals. Figure 22 shows a comparison of the Social Epidemic model and the Social Recovery model. It shows that the infection is more spatially hindered in the Social Recovery model, since the infected curve differ more in that figure than in the one for Social Epidemic. This is due to clustering of recovered individuals, because when they appear in an infected cluster,they spread and block the still infected people from infecting susceptible individuals. That way, the recovered people effectively encapsulate the susceptible ones. The effect of adding social recovery is thus larger in the spatial model than in the dynamical system.

37 (a) Result plot for the spatial model of a (b) Solution plot for the dynamical system Social Epidemic. model of a Social Epidemic.

(c) Result plot for the spatial model of a (d) Solution plot for the dynamical system Social Recovery. model of Social Recovery.

Figure 22: Results of simulations of the Social Epidemic model and the Social Recovery model. β = 0.6 and γ = 0.1 for both models, and for the Social Recovery model α = 0.6. The simulations have a randomised setup and initial condition S = 0.9, I = 0.1. The result of the spatial model of Social Recovery differs more from its well-mixed counterpart than the result of the spatial model of a Social Epidemic, suggesting that introducing social recovery adds further spatial hindrance.

5.6 Initial Conditions in the Spatial Model The spatial setup plays a large part in how much the infection manages to spread, and how long it takes. Figure 23 shows two simulations with the ini- tial condition S = 0.96, I = 0.04, where one is performed with the infected population initially spread out in the lattice, and the other one with it being concentrated. The latter does not only spread to a lot lower level, the spread also takes significantly longer. This is due to the fact that more susceptible in- dividuals will be neighbours with an infected one if the infected individuals are

38 spread out in the domain. Also, the infection that started out concentrated will not run the risk of meeting any recovered individuals at is spreads outward in the lattice, and may therefore survive longer. The susceptible population is some- what smaller after the infection has died out in this simulation, which means that more people have been exposed to the infection than in the randomised simulation.

(a) Solution plot for the dynamical system.

(b) Result plot for a randomised setup. (c) Result plot for a concentrated setup.

Figure 23: Results of simulations with initial condition S = 0.96, I = 0.04. Parameters are β = 0.6 and α = γ = 0.1. The spatial simulations are performed with the infected population spread out in the lattice, and concentrated in a square.

5.7 Conclusions With this model, the infection will always die out eventually. To achieve an increase in the size of the infected population, the infection rate must be higher than the spontaneous recovery rate, and the larger the difference between them, the more initial conditions will lead to such an increase. The social recovery

39 rate can be tuned to increase or decrease the amount of initial conditions that causes the infection to grow, but it cannot be used to ensure that they exist or not. As expected, a higher infection rate, or a lower recovery rate, will have the infected population reach a larger maximum value before it starts to decline. The fact that recovered people cluster in the lattice of the spatial model hinders the spread of the infection, as the infection will be blocked from the susceptible population. It is therefore a larger discrepancy between the spatial and well-mixed models of Social Recovery than that of a Social Epidemic. The spatial model suggests that an infection that stems from a concentrated group of individuals will spread slowly and reach a relatively low maximum size of the infection, compared to an infection that starts from different individuals spread out in the domain. However, if there are no immune individuals in the rest of the domain at the start, the infection that spreads from a concentrated group will have room to spread without encounters with people who are already recovered, allowing it to circulate for a longer time before it dies out. Therefore, more people will in total have been exposed to the infection than if it started in several individuals at once.

6 Cycles 6.1 Model Description As in previous models, the states in this model are susceptible, infected and recovered. All transitions are dependent on interactions with neighbours in another state. Susceptible people are turned infected by infected ones, infected people are turned recovered by recovered ones, and recovered people are turned susceptible by susceptible ones, according to the reaction equations,

β S + I −→ 2I γ I + R −→ 2R R + S −→α 2S.

Because of this cycle of dependence, the model produces a cyclical pattern of the sizes of each group. Since there are no spontaneous transitions, states that are not present in the population initially, will never exist.

6.2 Dynamical System The dynamical system is ( S˙ = −βSI + αS(1 − S − I) I˙ = βSI − γI(1 − S − I).

40 6.3 Finding Fixed Points and Nullclines To find the fixed points of the system, we first set S˙ = 0. This is true if either

S = 0, (18) or,  β  S = 1 − + 1 I. (19) α Applying (18) on I˙ = 0 yields

−γ(1 − I) = 0, which has two solutions, I = 0 and I = 1. Thus we have fixed points at

(S∗,I∗) = (0, 0) (20) and (S∗,I∗) = (0, 1). (21) Doing the same for (19), applying it on I˙ = 0, yields

  β  S = I2 γ − (γ + β) + 1 + βI = 0, α which also has two solutions. The first is I = 0, giving us a third fixed point at

(S∗,I∗) = (1, 0). (22)

The second solution is −β α I = = ,  β  β + γ + α γ − (γ + β) α + 1

γ which in (19) gives S = β+γ+α . Thus, our final, and only variable dependent, fixed point is found at α γ (S∗,I∗) = ( , ). (23) β + γ + α β + γ + α

The nullclines for S˙ are given by S(I) = 0, and α I(S) = (1 − S). (24) β + α The first lies along the I-axis, while the second is a line intersecting the S-axis at the fixed point (1, 0), and intersecting the I-axis in a point depending on the parameters. The nullclines for I˙ are given by I(S) = 0, and

 β  I(S) = 1 − 1 + S. (25) γ

41 Similarly to the nullclines for S˙, the first lies along the S-axis, and the second is a line intersecting the I-axis at the fixed point (0, 1), and intersecting the S-axis in a point depending on the parameters. Figure 24 shows a phase plane for a system with parameters β = α = γ = 1, as well as the solution of the system for initial condition S = I = 0.2. The phase plane shows that the variable fixed point in this system, (S, I) = (1/3, 1/3), is a centre, with closed orbits around it. This means that the solution will be periodic, a behaviour that is clearly visible in the solution plot. There is no dampening in the system, meaning the oscillations will be sustained indefinitely.

(a) Phase plane. (b) Solution plot.

Figure 24: Phase plane and solution plot for a system with parameters β = γ = α = 1 and initial condition S = I = 0.2. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

We saw earlier that the nullclines (24) and (25), whose intersection con- stitutes the stable fixed point of this system, are variable, and will cross the phase plane in different direction depending on the parameters. Looking at the nullclines, we see that varying the infection rate β will change both nullclines. More specifically, increasing β will move the fixed point closer to the origin, thereby shifting both the S- and I-curve vertically in the solution plot. That is, increasing the rate of infection will increase the overall percentage of recovered people in the population. The parameters γ and α, on the other hand, does not appear in both (24) and (25). Changing one or both of them will therefore create asymmetry in the phase plane. Figure 25 shows the result of a simulation where the parameter recovery rate, γ, is 0.3 while β = α = 0.9. In the phase plane we can see that the distance from the maximum to minimum I-value is larger than the maximum to minimum S-value, which will result in different amplitudes for the S- and I-curves in the solution plot. Otherwise, the curves have the same shape, but the curve for the susceptible population is shifted vertically. As the simulation begins, recovered people turn into susceptible ones and susceptible people turn into infected ones with the same, high, rate. The

42 rate of recovery is low however, leaving a large part of the population infected. More infected people means that more of the susceptible people are turned. A small recovered populations also means that the susceptible population is not replenished as fast as it is infected. After a while, the recovered population starts to grow, because of the very large infected population. At this point the susceptible population is very small, and even though it will start to grow as the recovered population is large enough, it will not be able to reach the same size as the recovered and infected populations. This can also be understood by looking at the dynamical system. S˙ = 0 at t = 0, while I˙ > 0. I < S then means that S˙ < 0. This reasoning also applies to the case when both α and γ are lowered, to α = 0.6 and α = 0.3. As shown in Figure 26, both the size of the susceptible population and the infected population are shifted vertically, to lower levels. We can also see that the period is slightly longer in this system compared to the one in Figure 25. Since the rates are lower, less transitions happen for each unit of time, and each cycle takes longer to be completed.

(a) Phase plane. (b) Solution plot.

Figure 25: Phase plane and solution plot for a system with parameters β = α = 0.9 and γ = 0.3. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

43 (a) Phase plane. (b) Solution plot.

Figure 26: Fractions of the people of the different types, for β = 0.9, α = 0.6 γ = 0.3. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

The periodic behaviour is destroyed if one of the three transitions is not allowed. Figure 27 shows a phase plane and solution plot for a system where recovery is not possible, that is, γ = 0. This will result in the susceptible state disappearing, since all the initially susceptible will turn infected, and the refill of susceptible people from the recovered population will cease after all initially recovered has turned. The I-axis turn into a line of fixed points, all all initial condition will result in an equilibrium on this line.

(a) Phase plane. (b) Solution plot.

Figure 27: Phase plane and solution plot for a system with parameters β = α = 1, γ = 0. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

44 6.4 Initial Conditions in the Dynamical System As discussed in the previous section, the stable fixed point in this system is a centre, with closed orbits around it. This means that each initial condition will result in a periodic solutions with a specific period. Figure 28 again shows the phase plane for the system with parameters β = α = γ = 1, as well as two solutions with different initial conditions. The solution plots in the figure show that a smaller orbit corresponds to a shorter period. If the initial point is the same as the fixed point, the rates of change, leaving the system static.

(a) Phase plane.

(b) Solution plot for the innermost (c) Solution plot for the outermost trajectory in the phase plane. trajectory in the phase plane.

Figure 28: Phase plane and solution plots for a system with parameters β = γ = α = 1, and initial condition S = I = 0.3 and S = I = 0.2 respectively. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

Figure 29 shows the phase plane and solution for β = α = γ = 1, and initial condition S = I = 0.1. The orbit comes very close to the nullclines, and therefore there is always one state that has zero members. The recovered

45 population is non-existent on the diagonal of the phase plane, since the total population must add to one.

(a) Phase plane. (b) Solution plot.

Figure 29: Phase plane and solution plot for a system with parameters β = γ = α = 1, and initial condition S = I = 0.1. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

6.5 Spatial Model The spatial model’s dependence on neighbours for transitions disturbs the cyclic system, an effect that is clearly shown in Figure 30. The figure shows the re- sults for a cellular automata and a dynamical system with parameters β = γ = α = 0.4. The initial condition is S = I = 1/3, meaning the three states are equally represented in the population. In the well-mixed model, this means that the system is in perfect balance, and the amount of people in each state will never change. In the spatial model though, where the fraction of neighbours of each type for an individual is not the same as the fraction of each state in the population as a whole, this is not the case. Therefore, the spatial model exhibits a cyclical behaviour where the well-mixed model does not. With cycli- cal behaviour we do not mean actual, mathematically perfect cycles, which is impossible to achieve in an asynchronous model (Sch¨onfisch and de Roos 1999).

46 (a) Result plot for the spatial model. (b) Solution plot for the dynamical system.

Figure 30: Result for the spatial model and dynamical system with for β = α = γ = 0.4 and initial condition S = I = R = 1/3.

In order to compare the spatial model with the dynamical system, when the states are equally represented, we then have to chose another combination of parameters. Figures 31 and 32 show results for parameters β = γ = 0.4 and α = 0.3, and β = γ = 0.9 and α = 0.8, respectively. They show that in comparison with the dynamical system, the shape of the cycles relative to each other in the spatial model is unchanged, i.e., in each individual plot the lengths of all three cycles are the same. Both figures show that the lengths of the cycles, or the periods, roughly doubles in the spatial model compared to the dynamical system. The difference in number of individuals between the largest population and the smallest, or the amplitude, is also many times higher in the spatial model compared to the well-mixed one. The spatial simulation of this model, as in the ones discussed in previous sections, show clusters forming, allowing a large group of individuals to transition into a certain state, before individuals outside of the cluster starts to transform individuals in the cluster into another state. This new state then spreads throughout the cluster, making this type the most common one. In the well-mixed model, this is not the case, and the maximum amount of people in one population is therefore lower, and the time it takes for a population to outgrow another is shorter. Comparing Figures 31 and 32, it is clear that higher parameters leads to more changes happening, and thereby faster cycles.

47 (a) Result plot for the spatial model. (b) Solution plot for the dynamical system.

Figure 31: Results from the spatial model and the dynamical system for parameters β = γ = 0.4, α = 0.3.

(a) Result plot for the spatial model. (b) Solution plot for the dynamical system.

Figure 32: Results from the spatial model and the dynamical system for parameters β = γ = 0.9, α = 0.8.

The fact that the spatial model deals with discrete individuals, and the well- mixed model with continuous fractions, can cause difference in their results. Figure 33 shows results obtained using the parameters γ = 0.1 and β = α = 0.9. The recovery rate is so low that the smallest susceptible population in the dynamical system is lower than one individual in the cellular automaton (which is built up with 900 individuals). This means that for the same parameters, the spatial model will lose all susceptible individuals, and all remaining infected people will eventually turn into recovered ones. For an even lower recovery rate γ, the susceptible population will be perceived as zero in the dynamical system

48 as well, leading to the infection dying out forever.

(a) Result plot for the spatial model. (b) Solution plot for the dynamical system.

Figure 33: Results from the spatial model and the dynamical system for parameters β = α = 0.9, γ = 0.1. The susceptible population in the spatial model dies out.

6.6 Initial Conditions in the Spatial Model All previous simulations have started with the states being evenly distributed in the population. Figure 34 shows the result of a simulation when this is not the case. The parameters are all the same, β = α = γ = 1, but the initial setup has 50% susceptible, 45% infected, and 5% recovered individuals randomly spread out in the lattice. The result plot show that the amplitudes for all states first decrease with time, to then vary around an equilibrium. Starting with large infected and susceptible populations will lead to a peak in infection, but there are too few recovered people to turn all infected recovered. The peak in recovery is thereby smaller, and the amplitudes decrease in this way until an equilibrium is reached. In the dynamical system, recovery happens faster, and the recovered population can reach the same size as the initial infected population, creating the same cycles as when the initial population is equally divided. As the initial difference in population size is larger here than in previous simulations, for example in Figure 32, the amplitude is larger.

49 (a) Result plot for the spatial simulation. (b) Solution plot for the dynamical system.

Figure 34: Results from the spatial model and the dynamical system for parameters β = α = γ = 1 and initial condition S = 0.5, I = 0.45.

In previous simulations, the states have been randomly assigned to the in- dividuals in the lattice. Another possible setup is to divide the population into three blocks of purely susceptible, infected and recovered individuals, according to the image in Figure 35.

(a) Setup for the spatial simulation. (b) State of the spatial simulation at time t=20.

Figure 35: Progression of the spatial simulation from time step 1 to 20. Parameters are β = α = γ = 1.

With this setup, the different states will ”travel” into the population neigh- bouring it, and one could imagine this to go on forever, but in the stochasticity will have the system break down and instead form cycles. Fig- ure 36 shows the result of a simulation with this setup, with the parameters β = α = γ = 1. We can see that the states relatively equally sized for some time, before the cycles form. Note that a dynamical system with the same parameters and initial condition will be at equilibrium at zero, as in Figure 30.

50 Figure 36: Result plot of the spatial model for β = α = γ = 1, with a setup as in Figure 35

Another option is to set the states up in concentric squares, as in Figure 37. In this example, the order from innermost to outermost state is I-R-S.

(a) Setup for the spatial simulation. (b) State of the spatial simulation at time t=10.

Figure 37: Progression of the spatial simulation from time step 1 to 10. Parameters are β = α = γ = 1.

No wrapping boundaries connects the innermost and outermost population, so the prediction might be that one population will take over the whole lattice. If the order from innermost to outermost is I-R-S, the prediction would be that the populations collapse inward, eventually all being susceptible, but again, the stochasticity of the model leads to breakdown and cyclic behaviour. Figure 37 shows the beginning of the breakdown, the infected state has ”leaked” out from the recovered barrier, out into the susceptible population. Figure 38 shows this as well. Initially, the susceptible population grows while the infected one decreases and the recovered one stays the same for a while and then decreases, as expected, but then a cyclic behaviour forms. The dynamical system is in this case cyclic from the start, as it only recognises the percentage of each population.

51 Figure 38: Result plot of the spatial model for β = α = γ = 1, with a setup as in Figure 37.

6.7 Conclusions The cyclical dependence of states on each other, will cause all three states to be sustained indefinitely, their spread in the population varying in a cyclical way. The period, amplitude and elevation of these oscillations depends on the rates β, γ and α. The fixed point of a dynamical system based on this model will be a centre, meaning that for a model with a certain set of rates, different initial conditions will produce different periods, depending on how large the resulting orbit around the fixed point is. In the spatial model, the cycles are disturbed by the stochasticity and de- pendence on physical closeness of individuals in other states. Therefore, the periods are generally longer, and for systems with somewhat balanced initial conditions, the amplitudes are higher. In systems with large differences in each state’s initial occurrence, that in the dynamical system would cause high am- plitudes, the spatial model fails to sustain the high peaks. This is because not enough transitions from the current majority state to the next occur in order to raise it to the same levels. Then, the oscillations are damped, and the cycles settle at lower amplitudes.

7 Cults 7.1 Model Description In this section, we will investigate a model for the spread of a cult, and see what results it yields in terms of the composition of the population. First, consider a population where the cult is already established, that is, a part of the population are members of the cult. Then, imagine a scenario where a person with no previous contact with the cult, we call them Susceptible, meets one of the members. Depending on how intriguing the ideas of the cult are, and perhaps on the charisma of the specific cult member, the susceptible person

52 might be convinced to join the cult as well. In order for a member to leave the cult, it is of course thinkable that it works the same way, i.e., it is enough to meet a susceptible person to be convinced to leave. However, if we imagine the cult to be something with allure out of the ordinary, a person might need more than that to realise that they, for whatever reason, want to leave. We can see this as a need to be ”exposed to the outside world”, which would call for contact with multiple susceptible people. Therefore, we say that in order for a member to leave the cult, two meetings with susceptible people are necessary. It is also reasonable to think that a person who has left the cult themselves have a stronger will and ability to convince someone to leave; for that reason, a meeting with one single former member may be enough to inspire a member to leave. A former member will not be willing to re-enter the cult, they are Resistant. Presumably there are also some people with inherent resistance to the cult, who therefore does not have to have been a member to become resistant. The reaction equations are S + M −→α 2M β M + 2S −→ R + 2S γ M + R −→ 2R.

7.2 Dynamical System The dynamical system, expressed in Susceptible and Members, reads ( S˙ = −αSM M˙ = αSM − βMS2 − γM(1 − S − M).

7.3 Finding Fixed Points and Nullclines Looking at S˙, it is immediately clear that setting it to zero gives three possible solutions, S = 0, M = 0 or S = M = 0. Setting S = 0 in M˙ = 0 gives M = 0 or M = γ. Setting M = 0 gives that M˙ = 0 regardless of S. Therefore, there is a line of fixed points along the S-axis, at (S∗,M ∗) = (S, 0), (26) and one fixed point at (S∗,M ∗) = (0, 1). (27) If this fixed point is attractive it would suggests that everyone in the population will end up in the cult. The line of fixed points predict that the cult will disappear, as all members eventually leave, without any new ones joining. Finding the nullclines to S˙ is trivial, they are simply the S and M-axes, S(M) = 0, (28) and M(S) = 0. (29)

53 The S-axis is also a nullcline to M˙ , and thus it is a line of fixed points. A second nullcline to M˙ is given by (α + γ) γ M(S) = S2 − S + . (30) β β As expected, this curve crosses the M-axis at M = 1. The flow is horizontal along the curve, and analysing M˙ along the curve shows that the flow is moving towards the M-axis. Doing the same for the rate along the nullcline that is the M-axis, shows that the flow there is directed towards the origin. Thus, the phase plane will look something like in Figure 39, and the solutions will always be attracted to the S-axis. This analysis shows that there generally is no equilibrium state where the cult is allowed to survive, since the point (0, 1) is a saddle.

Figure 39: Phase plot for a system with parameters α = 0.5, β = 0.9, γ = 0.1. All trajectories will lead to the S-axis. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

Looking at the phase plane in Figure 39, it is clear that the growth rate for the cult is positive inside the area bounded by the nullcline (30). This is the only nullcline dependent on the parameters. By finding an expression for the vertex of this curve, a value of α can be found, for which the vertex will fall on the S-axis: α = −γ + 2pβγ. (31) Using this value of alpha will result in a phase plane as in Figure 40c. A lower α will give a smaller area bounded by the nullcline, and a higher α will give a larger area. The larger the area, the more initial conditions exist that will result in a growing cult, as opposed to one that only declines. (Note that the only allowed initial conditions are in the lower triangle of the phase plane.) This is consistent with the intuition, as α is the amount of meetings between a cult member and a non cult member, resulting in the non cult member joining the cult. The higher the value of α, the easier it should be for the cult to grow.

54 The equilibrium point will always lie beneath the nullcline, which means that a larger α also means that a larger part of the population will have been members of the cult at some point, at the time of its disappearance.

55 (a) Phase plane for α = 0.25 (b) Solution plot for α = 0.25.

(c) Phase plane for α = 0.55. (d) Solution plot for α = 0.55.

(e) Phase plane for α = 0.85. (f) Solution plot for α = 0.85.

Figure 40: Phase planes and solution plots for systems with β = 0.6, γ = 0.3. α is varied to demonstrate the different behaviours of the system depending on the placement of the nullcline. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

For some combinations of rates, the cult may decrease in size before it grows.

56 Figure 41 shows an example of this, where there is a slight decline in membership before it peaks.

(a) Phase plane. (b) Solution plot.

Figure 41: Phase plane and solution plot for a system with β = 0.17, γ = 0.6 and α = 0.02. The membership declines before it reaches its peak. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

7.4 Initial Condition in the Dynamical System The cult will always die out in these simulations, and the initial condition de- termines where on the S-axis the equilibrium point will be, that is, how many people who have been members of the cult before it disappears. The initial con- dition also determines whether or not the cult will increase in the population before it dies out.

7.5 Spatial Model The results of the spatial simulation varies greatly, when it is run with an initial setup of randomly placed cult members. On one hand, the spatial model favours the spread of the cult over the spread of resistance due to exposure to susceptible people, since the latter needs two neighbours of the right type too succeed. On the other hand, clusters of resistant individuals form in the lattice, which may stop the cult from spreading. Both these effects are seen in Figure 42, in which the plots are comparable to the ones in Figure 40. In Figure 42a, the spread of the cult is more successful than in the dynamical system, while the result in Figure 42b is the opposite. In the latter, the lattice clearly show that the spread is hindered because of blockades of resistant individuals. Overall though, the spatial model and the well-mixed one have similar results.

57 (a) α = 0.25

(b) α = 0.55

(c) α = 0.85

Figure 42: Result plots for spatial simulations with β = 0.6, γ = 0.3 and varied α. Comparable to the dynamical systems in Figure 40. The initial setup is randomised, with initial condition S = 0.95, M = 0.05.

58 7.6 Initial Condition in the Spatial Model A cult might not start from a number of spread out, single, members, but from a concentrated group. To test this, we run a simulation with a setup as the one in Figure 43a. With this setup, the cult members in the middle of the group cannot contribute to the spread, and furthermore, the resistant individuals will be created at the edge of the group, trapping some of them inside, as seen in Figure 43b. Because of this, the spread is hindered. Figure 44 shows that the spread is not as efficient in this simulation, as in a simulation with a randomised setup with the same initial condition.

(a) At time t=0. (b) At time t=20.

Figure 43: The lattice of the spatial simulation with α = 0.85, β = 0.6 and γ = 0.3, at two different time steps.

(a) With s setup as in Figure 43a. (b) With a randomised setup.

Figure 44: Result plots for spatial simulations with α = 0.85, β = 0.6 and γ = 0.3, and two different initial setups.

7.7 Conclusions The cult will always die out in the end, but might experience an increase in membership before it does. It is even possible for the cult to see a drop in

59 membership initially, to then bounce back and reach a peak. The spatial model shows similar results to the dynamical system, but the cult members experience some hindrance due to large groups of resistant individuals forming around them.

8 Decision Making - Version One 8.1 Model Description This is a model which has been used to model the behaviour of bees, as they, via dance, convinces other bees to come to a certain place for nectar (Seeley, Camazine, and Sneyd 1991). A bee passing a place where one or more bees are gathered, may land in the same place. This way, the bee hive collectively ’decides’ to choose one nectar source over another. The model can be applied to social dynamics by imagining there being a susceptible population and two fashions, behaviours, or opinions that they may choose from. Here, we will imagine there being two fashions, the dark and the light, and call the states of this model Susceptible, Dark and Light. The idea is that a susceptible person might choose the light fashion, if they meet someone who is already in that state. The same applies to the dark fashion. Individuals in the light or dark state may then revert back to being susceptible spontaneously. The reaction equations are

β S + L −−→L 2L β S + D −−→D 2D γ L −−→L S γ D −−→D S.

8.2 Dynamical System The dynamical system, expressed in L and D and with S = 1 − L − D, becomes

( L˙ = −βL(1 − L − D)L − γLL

D˙ = betaD(1 − L − D)L − γDD.

We will for the sake of consistency call the rates β and γ for infection and recovery rate.

8.3 Finding fixed points and nullclines There are two nullclines for L˙ ,

L(D) = 0 (32)

60 and γ D(L) = 1 − L − L (33) βL and two nullclines for D˙ , D(L) = 0, (34) and γ D(L) = 1 − D − L. (35) βD The fixed points are found at the intersections of these two sets of nullclines. The lines (32) and (34), which are the two axis, intersects at the origin, meaning

(L∗,D∗) = (0, 0) (36) is a fixed point. The D-axis intersects with the nullcline 33 at the point

 γ  (L∗,D∗) = 0, 1 − D , (37) βD and the L-axis intersects with the nullcline 35 at the point

 γ  (L∗,D∗) = 1 − L , 0 . (38) βL This set of fixed points tell us that whichever fixed point is attractive, at least one of the fashions will die out. To see which fashion that is, we examine the phase plane. The phase plane will have two nullclines along the two axes, and two linear nullclines of the same slope intersecting the axes, as showed in Figure 45. In this system, the rates are βL = βD = 0.8, γL = 0.3 and γL γD γD = 0.2, meaning > , and the nullcline (35) lies above the nullcline βL βD (33). Since the arrows indicating the rate of change is vertical along (33) and horizontal along (35), the fixed point that is attracting is the one on the D-axis. In Figure 46, the rates are βL = βD = 0.8, γL = 0.2 and γD = 0.3, i.e., (33) instead lies above (35). In this case, the attracting fixed point is the one on the L-axis. We can then conclude that the fashion with the, for spread, most beneficial ratio between infection rate and recovery rate, i.e., the lowest ratio γ β , will out-compete the other fashion.

61 (a) Phase plane. (b) Solution plot.

Figure 45: Phase plane and solution plot for a system with parameters βL = βD = 0.8, γL = 0.3 and γD = 0.2. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

(a) Phase plane. (b) Solution plot.

Figure 46: Phase plane and solution plot for a system with parameters βL = βD = 0.8, γL = 0.2 and γD = 0.3. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

γ If for one of the fashions, β > 1 is true, the fixed point on that fashion’s axis will be destroyed, and the only fixed points will be at the origin and on the other fashion’s axis. Of course, if both fashions have higher (or equal) recovery rate than infection rate, the only fixed point is at the origin, and both fashions will disappear. We stated earlier that at least one fashion always dies out, but there is a special case where this is not true. If the infection and recovery rates for the two fashions are the same, βL = βD = β and γL = γD = γ, the two nullclines (33) and (35) will lie on top of each other, and create a line of fixed points. In

62 this case, the equilibrium can be one where both fashions coexist. Figure 47 shows an example of this, where β = 0.8 and γ = 0.3.

(a) Phase plane. (b) Solution plot.

Figure 47: Phase plane and solution plot for a system with parameters βL = βD = 0.8 and γL = γL = 0.3. The nullclines collide and create a line of fixed points. The initial condition is L = 0.1, D = 0.2. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

8.4 Initial Condition in the Dynamical System In the cases where two or three fixed points exist, there is always one attracting one on either one of the L- and D-axes. In those systems, all initial conditions will result in one of the fashions out-competing the other, which dies out com- pletely. Before that happens though, it is possible that the fashion which will die out is more popular for a while. In the cases where a line of fixed points exists, the initial condition deter- mines which fashion will be most popular. Depending on the initial condition, one or both fashions may increase or decrease a bit in popularity before the equilibrium is found, but the fashion that will be most popular in the end is always the one that was most popular at the start, as seen in Figure 47.

8.5 Spatial Model In cases where both fashions survive, and they start out with the same popular- ity, the dynamical system will show them both coexisting with the same number of followers. In the spatial model though, which fashion wins is determined by who has the best access to the susceptible population. In a simulation where the states are randomly distributed at the initialisation, this might differ between the fashions. In addition, the stochasticity of the simulation might favour one of the fashions. When one fashion has gotten the upper hand, the static lattice helps to keep it that way, since it shields the susceptible individuals from the

63 other fashion. That is why a spatial simulation might show a growth of one fashion on expense of the other, as in Figure 48. This same thing can happen when initial condition is not equal for the fashion, i.e., the most popular fashion gets even more popular, and exceeds the popularity it has in the well-mixed model. Note though, that this effect is not seen for cases where one fashion dies out, as the surviving fashion cannot grow on expense of the susceptible state in this way.

(a) Result plot from the spatial model. (b) Solution plot from the dynamical system.

Figure 48: Results for the spatial model and the dynamical system with parameters βL = βD = 0.8 and γL = γL = 0.3. The initial condition is L = 0.1, D = 0.1, and the states are randomly assigned in the spatial model.

8.6 Initial Condition in the Spatial Model The spatial model allows us to separate the two fashions, so that they exist in one part each of the population. This setup, which is shown in Figure 49a, simulates a situation where two populations that has different fashions spread in them meet. Figure 49 also shows the lattice after 100 time steps, during a simulation with parameters βL = βD = 0.8 and γL = γD = 0.3. Clearly, the initial separation still has an impact on the population; there is not much mixing between the halves of the lattice.

64 (a) The lattice at t=0, showing the setup (b) The lattice at t=100. of the simulation.

Figure 49: The lattice of the cellular automaton for a simulation where the initial condition is L = 1/3, D = 1/3, but each fashion is randomly placed only on one side of the lattice. The parameters are βL = βD = 0.8 and γL = γL = 0.3.

Figure 50 shows the results simulations with the initial condition L = 0.4, D = 0.1, one with a setup such as the one in 49a, and one with a completely randomised setup. The results show that the dark fashion, which is under- represented in both cases, has room to grow in its half of the lattice in the simulations where the fashions are separated. It therefore grows as popular as the light fashion, and when the two are roughly equal, there is nothing to say that the light fashion will out-compete the dark one, since they have the same rates. Thus, the separated setup takes from the light fashion the advantage of the initial condition, that it has with the randomised setup.

65 (a) A separated setup. (b) A completely randomised setup.

Figure 50: Result plots of simulations with the same initial condition L = 0., D = 0.1, but with two different initial setups. The parameters are βL = βD = 0.8 and γL = γL = 0.3.

8.7 Conclusions The rates of the system determines if one of the fashions will die out and which one. When the infection and recovery rates of the two fashions are not equal, the fashion with the most beneficial ratio between the rates will out-complete the other, which will die out. This happens regardless of initial condition. If the fashions have equal infection rates and equal recovery rates however, there is a line of fixed points, allowing both fashions to survive. This could for specific initial conditions mean that they both are equally popular. This is not necessarily the case in the spatial model however, since a fashion that has gotten more popular than the other, by chance och initialisation, amplifies its popularity by shielding the susceptible individuals from the competing fashion. The setup of the spatial simulation might diminish the effect of amplification by initial condition, by giving the, at the start, less popular fashion more access to the susceptible population, by separating the fashions in different areas. This emulates a case where two fashions originates in two different locations.

9 Decision Making - Version Two 9.1 Model description This second version of a decision making model, is what has been used as a model for the behaviour of ants. Scout ants that have been tasked with finding a suitable place to move the nest to, will find a place they deem good enough, and then start recruiting. Every ant that is brought to the site and approves it, will go back to the nest to fetch another ant to do the same (Pratt 2005). If there are two competing potential nest sites, the one having a larger group of ants recruited to it will then have an advantage over the other one. Compare this to

66 the decision making of bees described in Section 8, where the amount of bees at each nectar source did not amplify the movement to that source. Thus, in our model that describes choice between two fashions, one fashion having a larger following than the other will give it a larger advantage than the same difference would give in the Decision Making model in Section 8. This corresponds to it taking two (instead of one) individuals that follow a certain fashion to convince a third to do the same. Thus, we introduce Collective Action into the Decision Making model.

β S + 2L −−→L 3L β S + 2D −−→D 3D γ L −−→L S γ D −−→D S

9.2 Dynamical System The dynamical system becomes

( 2 L˙ = βL(1 − L − D)L − γLL 2 D˙ = βD(1 − L − D)D − γDD.

9.3 Finding Fixed Points and Nullclines There are four nullclines to this system. For L˙ we immediately find

L(D) = 0, (39) and after some rewriting we also have s 1 − D (1 − D)2 γ L(D) = ± − L . (40) 2 4 βL

In the same way, for D˙ , we find

D(L) = 0, (41) and s 1 − L (1 − L)2 γ D(L) = ± − D . (42) 2 4 βD The intersections between the nullclines from the different equations gives us the fixed points. (39) and (41) meet at the origin, giving the fixed point

(L∗,D∗) = (0, 0). (43)

67 (39) and (42) meet at two points,

1 r1 γ (L∗,D∗) = (0, ± − D ), (44) 2 4 βD and the same goes for (40) and (41), which give

1 r1 γ (L∗,D∗) = ( ± − L , 0). (45) 2 4 βL Setting (40) equal to (42) gives an equation of the second degree, which means there are two possible intersections there as well. Thus, this system has a maximum of seven fixed points. Figure 51b shows the phase plane for a system with parameters βL = βD = 0.5 and γL = γL = 0.05. The system has seven fixed points, and three of them are attracting. The three trajectories show the possible equilibrium states of the system, except for the spatial case that the initial condition is exactly equal for L and D, in which case the equilibrium is in the saddle point in (0.36, 0.36). This is also the only case where both fashions survive, for the three strictly attracting points, at least one fashion dies out. γ It is the ratio β for each fashion that determines how far into the phase planes the nullclines will reach, and thereby if they can intersect and create fixed points. The smaller the ratio, the closer the nullclines are, until they meet. This is shown in the comparison of phase planes in Figure 51, where γ is varied. For a large enough ratio, the only fixed point of the system is the origin. The ratio does not need to be larger than one for this to happen.

68 (a) Recovery rate γL = γL = 0.5.

(b) Recovery rate γL = γL = 0.05. The three trajectories show the possible equilibrium states of the system.

(c) Recovery rate γL = γL = 0.1.

Figure 51: Phase planes for three systems with infection rates βL = βD = 0.5, and varying recovery rate. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

69 γ If the ratios β are not equal for both fashions, the fixed points do not lie in the same point on the two axes. One example is shown in Figure 52, where the rates are βL = βD = 0.5, γL = 0.01 and γD = 0.1, and the light fashion, if it is the one to survive, is much more common than the dark would have been.

(a) Phase plane. (b) Solution plot.

Figure 52: Phase plane and solution plot for a system with parameters βL = βD = 0.5, γL = 0.01 and γD = 0.1. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

9.4 Initial Condition in the Dynamical System The initial condition determines which fashion will die out, one or both. The exception to this is when the fashions are initiated as having exactly the same size, in which case the equilibrium lies in the saddle point where both fashions survive. In systems where the nullclines intersect, the only initial condition that causes both fashions to die out in the area close to the origin in the phase plane, that is enclosed by the nullclines. Trajectories outside of this area will be attracted to the saddle point at the intersection of the nullclines, before they end up on one of the axis. This makes it possible for the fashion that will not survive to increase in popularity before it dies out, as in the example in Figure 53. If the nullclines do not intersect, this is not the case; many more initial conditions lead to both fashions dying out, and the out-competed fashion will decline unit it is gone. γ Depending on the difference between the ratios β between the two fashions, there might be very few initial conditions leading to the success of one of them. One example is the system in Figure 52, where few initial conditions lead to the dark fashion surviving.

70 (a) Phase plane. (b) Solution plot.

Figure 53: Phase plane and solution plot for a system with parameters βL = βD = 0.5 and γL = γD = 0.05. The initial condition is L = 0.201, D = 0.2. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

9.5 Spatial Model Recreating the results from the dynamical system is difficult for this model. Attempts to recreate the solutions corresponding to the trajectories in Figure 51b are shown in Figure 54. The initialisation is done by randomly spreading the fashions in the lattice. Since the system is symmetric, i.e., the infection rates and recovery rates for both fashions are the same, one might think that initialising a simulation with initial condition L = 0.25, D = 0.3 or L = 0.3, D = 0.25 should give similar results, with the only difference being which fashion out-compete the other. As seen in the figure though, this is not the case. In these two simulations, the same fashion that dies out in the well-mixed model is less popular than the other, but their results differ both from the well-mixed models and from each other. Coincidence plays a role in how well a fashion manages to spread in the lattice, and explains the difference between the two spatial simulations. The fact that the fashion that in the dynamical system dies out survives, is explained by the system’s high tendency to clustering. In comparison to the decision making with interaction with a single neighbour, this model will have more pronounced clusters. This is because single individuals that has adopted a fashion cannot spread it, so only clusters of several individuals will remain. Figure 55 shows the lattice at the last time step of the simulation in Figure 54a. In this simulation, the clusters cover the lattice, and the individuals who turn susceptible are most often inside on of them, and will quickly transition back into the fashion. The only places where an individual may change the fashion they follow, is at the border of the clusters. This model predicts that there will be very strongly defined areas for the different fashions. Figure 54e, showing the result of initial condition L = D = 0.75, has a drastically different appearance than its well-mixed counterpart. Again, this

71 is due to clustering. As the initial states are spread out in the lattice, some individuals of the same state end up next to each other. The majority of these small clusters disappears, but some may manage to survive, and grow. In this specific simulation, it happened to be clusters of the light fashion that did this. Since very few individuals of the other fashion are in the way, these clusters can spread.

72 (a) Result of the spatial model for initial (b) Solution of the dynamical system for condition L = 0.25, D = 0.3. initial condition L = 0.25, D = 0.3.

(c) Result of the spatial model for initial (d) Solution of the dynamical system for condition L = 0.3, D = 0.25. initial condition L = 0.25, D = 0.3.

(e) Result of the spatial model for initial (f) Solution of the dynamical system for condition L = D = 0.075. initial condition L = D = 0.075.

Figure 54: Result plots from the spatial models and dynamical systems for three different initial conditions, corresponding to the trajectories shown in the phase plane in Figure 51b. The initialisation is randomised. The parameters are βL = βD = 0.5 and γL = γD = 0.05.

73 Figure 55: The lattice at time t=400, during the simulation whose result is shown in Figure 54a.

9.6 Initial Condition in the Spatial Model The simulation is dependent on some individuals with the same fashion starting next to each other, if this is not true the fashions will die immediately. As seen in the previous section, the stochasticity of the setup plays a large part in the outcome of the simulations.

9.7 Conclusions This model is different from the other decision making model in this work. Both fashions have the opportunity to survive or die out, as long as their ratio between infection rate and recovery rate allows it. There is also always the possibility that both fashions die out. This can happen if even though the recovery rate is lower than the infection rate. Generally in the dynamical system, one of the fashions, or both, will die out, and the initial condition determines which ones do. The fashion with the most beneficial recovery rate to infection rate will have the most initial conditions that lead to its survival, and if it survives, it will have more spread than the other fashion would have had. The spatial model predicts that there will be very strongly defined areas for the different fashions. Thanks to the spatial effect of clustering, a fashion can spread even though the total number of individuals who are following it is low.

10 Segregation - Version One 10.1 Model Description This is a model which aims to model the behaviour of people of different types, who have the possibility to express themselves in different ways. Instead of there being one population, as in previous models, there are two populations of different types. The types can be interpreted as two different kinds of people

74 (old/young, mods/rockers, boys/girls, etc.) and the states of expression, that both types can be in, could be different fashions or brands that the people might use. For various reasons, people have reservations about sharing the same state with people of the opposite type, and when a person of a certain type meets with two people of the opposite type, and they are all in the same state (e.g., wearing the same fashion), the person might want to change to the other state, to avoid association with the opposite population. Here, we will call the two different types of people the Green and the Purple people, and imagine their possible states of expression to be two different fashions, the light and the dark fashion. If a green person wearing the light fashion meets two purple people wearing the light fashion, the green person will want to change to the dark one, thus avoiding expressing themselves in the same way as purple person. The same happens to a purple person in light fashion who meets two green people in light fashion. People of both types that have adopted the dark fashion, can spontaneously change to the light fashion. Thus, the reaction equations are

βG LG + 2LP −−→ DG + 2LP

βP LP + 2LG −−→ DP + 2LG γG DG −−→ LG γP DP −−→ LP .

Note that the different types are populations of fixed sizes, so that

DG + LG = N

DP + LP = M.

For example, the number of green people, no matter what states the individuals are in, is always the same. In the analysis, N and M are equal, i.e., the green and purple populations are equally large.

10.2 Dynamical System

The dynamical system, expressed in DG and DP and with LG = 1 − DG and LP = 1 − DP , is

( ˙ 2 DG = βGLP LG − γGDG ˙ 2 DP = βP LGLP − γP DP .

10.3 Finding Fixed Points and Nullclines

Setting D˙ G = 0 gives the nullcline

2 βG(1 − DP ) DG(DP ) = 2 , (46) βG(1 − DP ) + γG

75 and setting D˙ P = 0 gives the nullcline

2 βP (1 − DG) DP (DG) = 2 . (47) βP (1 − DG) + γP

Setting (46) in (46) gives a fifth degree equation for DP . Each real and non- negative root to this equation gives a fix point to the system. Figure 56 show phase planes and solution plots for three systems where both types have equal rates for choosing light fashion, γG = γP , but the rates for turning to dark fashion varies. The first phase plane, in Figure 56a, shows a system where both types are equally prone to choosing dark fashion, i.e., βG = βP , and the differences between β and γ are quite large. The phase plane shows that if the initial percentage of dark fashion is the same in both populations, the dark fashion would be preferred by both populations equally. That point in the phase plane is a saddle point, which means that no other initial conditions will have that outcome. The solution plot shows the solution then the green and purple people have a slightly imbalanced preference initially, in which case the population with the most dark fashion will prefer it even more in the end. In this simulation it is the purple people who adopt the dark fashion, and most of the green people instead chooses the light fashion. Lowering the rate for turning to dark fashion for one of the types, destroys two of the fixed points, leaving one. As seen in the figure, the population that is most prone to choosing dark fashion, i.e., the one with the largest β, will almost entirely turn to the dark fashion.

76 (a) Phase plane for βG = βP = 0.9. (b) Solution plot for βG = βP = 0.9 and initial condition DG = 0.45, DP = 0.5.

(c) Phase plane for βG = 0.5, βP = 0.9. (d) Solution plot for βG = 0.5, βP = 0.9.

(e) Phase plane for βG = 0.9, βP = 0.5. (f) Solution plot for βG = 0.9, βP = 0.5

Figure 56: Phase planes and solution plots for systems with rates γG = γP = 0.1, and varying rates β. The solution plots correspond to the green trajectories in the phase planes. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

77 Thus, in a system where one population has a high tendency to choose dark fashion and a low tendency to choose light fashion, while the other population does not have much of a preference, the more opinionated population will largely turn to the dark fashion. If the tendency to choose dark over light is lowered for this type as well though, the divide between the populations is less dramatic. Figure 57 shows a system where βG = βP = 0.2 and γG = γP = 0.1. There is only one fixed point, and it results in the types equally choosing the dark fashion.

Figure 57: Phase plane for a system with rates βG = βP = 0.2 and γG = γP = 0.1. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

10.4 Initial Condition in the Dynamical System Note that in the phase planes presented for this model, all points are allowed as initial points for a solution. Since DG and DP belong to different populations, their values can range from zero to one. In the case that there are three fixed points, the dark fashion is preferred by both populations equally only if the initial percentage of dark fashion is exactly the same in both populations. If not, the populations will favour a fashion each. If only one fixed point exist, all initial conditions will lead to that point.

10.5 Spatial Model The most striking result of spatial simulations of this model, is that the light fashion is always preferred by both populations. The dark, that is dependent on neighbours of the other type to spread, is hindered by the spatial limitations of the model, i.e., the fact that the types never move. Figure 58 shows the result of a simulation with rates βG = 0.9, βP = 0.5 and γG = γP = 0.1, and initial conditions DG = DP = 0.9. This is the same system as is Figure 56e, and in the dynamical system, the green population will favour the dark fashion. In the spatial simulation though, even though the majority of green individuals has

78 the dark fashion at the start, and the rate for turning dark is high, the light fashion is favoured.

(a) Result of the spatial model.

(b) Solution of the dynamical system.

Figure 58: Results of the spatial model and dynamical system with rates βG = 0.9, βP = 0.5 and γG = γP = 0.1, and initial conditions DG = DP = 0.9.

10.6 Conclusions The dynamical system based on this model suggests that if one population has a higher rate of choosing dark fashion than the light, and the other population does not, there will be one equilibrium, whose placement depends on how strong the population’s opinions are on the different fashions. The same is true if both of the types’ rates are relatively equal between fashions, or if they both have a higher rate for choosing light fashion. All initial conditions will then lead to that equilibrium point. If both populations has a much higher rate for choosing the dark fashion than the light, there are three possible equilibrium states. Either, the populations will favour one fashion each, and the initial condition determines who chooses which, or, if the percentage of light and dark fashions are exactly equal in the initialisation, they will have equal percentage of dark fashion in the

79 equilibrium. The light fashion will always be favoured in the spatial model. The spread of the dark fashion is at a disadvantage because of its dependency on neighbours of another type to spread.

11 Segregation - Version Two 11.1 Model Description This model is similar to the Segregation model in Section 10, and models the same kind of behaviour. The difference is that the mechanisms for individuals to turn to the light fashion are symmetrical with that of turning to dark fashion. Thus, people following the light fashion may instead adopt the dark fashion if they meet two people of the opposite type that follows the light fashion. In the same way, people following the dark fashion may adopt the light fashion if they meet two people of the opposite type that follows the dark fashion. Again, people never change types, meaning the green and purple populations have fixed sizes. In the analysis, they are equally large.

βG LG + 2LP −−→ DG + 2LP

βP LP + 2LG −−→ DP + 2LG γG DG + 2DP −−→ LG + 2DP γP DP + 2DG −−→ LP + 2DG

This model resembles Schelling’s model of segregation, more so than the one in Section 10. The original Schelling model described physical segregation be- tween two groups, exemplified by black and white Americans (Schelling 1969). In this work, the lattice is fixed, and the model is interpreted as segregation through some external attribute, as opposed to segregation through spatial dis- tance.

11.2 Dynamical System The dynamical system is

( ˙ 2 P DG = βGLP LG − γGDGDP ˙ 2 2 DP = βP LGLP − γP DP DG.

11.3 Finding Fixed Points and Nullclines

Setting D˙ G = 0 gives one nullcline,

2 βG(1 − DP ) DG = 2 2 , (48) βG(1 − DP ) + γGDP

80 and setting D˙ P = 0 gives the other,

2 βP (1 − DG) DP = 2 2 . (49) βP (1 − DG) + γP DG

Setting (48) in (49) gives a fifth degree equation for DG. Each real and non- negative root to this equation gives a fix point to the system. Looking at the system, we can see that two fixed points will always exist,

(D∗,L∗) = (0, 1) (50) and (D∗,L∗) = (1, 0). (51) Figure 59 shows phase planes and solution plots for systems with varying rates. The two fixed points (50) and (51) are always attracting, and in addition there is a saddle point. When all rates are equal, the phase plane is symmetrical and the saddle point is in the middle of the phase plane. As long as βG = βP and γG = γP , the phase plane is symmetrical, but the saddle point may move on the diagonal, closer or further away from the origin. The saddle point impacts the direction of the trajectory; in Figure 59c we can see that the dark fashion has a peak in the purple population, before it dies out. Figure 59e shows a system where the green population is more likely to choose the dark fashion than the purple population is, and the phase plane is no longer symmetric. Instead, the saddle point lies closer to, and higher up on the DP -axis. As opposed to the first segregation model, changes in parameters does not destroy any fixed points. It is thus possible for the purple population to favour the dark fashion, even though βP < βG.

81 (a) Phase plane for (b) Solution plot for βG = βP = γG = γP = 0.5. βG = βP = γG = γP = 0.5 and initial condition DG = 0.45, DP = 0.4.

(c) Phase plane for βG = βP = 0.9 and (d) Solution plot for βG = βP = 0.9 and γG = γP = 0.1. γG = γP = 0.1, and initial condition DG = 0.45, DP = 0.4.

(e) Phase plane for βG = 0.9, (f) Solution plot βG = 0.9, βP = γG = γP = 0.5. βP = γG = γP = 0.5, and initial condition DG = 0.45, DP = 0.4.

Figure 59: Phase planes and solution plots for systems with varying rates. The phase planes show trajectories starting at DG = 0.45, DP = 0.4 and DG = 0.4, DP = 0.45. (a) and (b) also82 shows a trajectory starting at DG = 0.4, DP = 0.4. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate. 11.4 Initial Condition in the Dynamical System Note that in the phase planes presented for this model, as in the first version of a segregation model, all points are allowed as initial points for a solution. Since DG and DP belong to different populations, their values can range from zero to one. The initial condition will determine which equilibrium that the system will find. For the saddle point, there is a line of initial conditions that let the system stabilise there, and thus let both fashions exist in both populations. Any initial condition not on this line, will have each fashion die out in one of the populations. Even though it is possible for the purple population in Figure 59e to favour the dark fashion, there are less initial conditions that let this happen than there are ones that lead to the green population doing the same. The greater the difference in parameter, the fewer initial condition there will be. The two trajectories shown in the figure both end up at (1, 0), while the same initial conditions for the symmetric systems did not.

11.5 Spatial Model Spatial simulations does not result in one fashion dying out in each of the popu- lations. It does however show the same general behaviour. An example of this is the result in Figure 60, from a simulation with rates βG = βP = γG = γP = 0.5. It is comparable to the result of the dynamical system in Figure 59a, and does indeed show the green population favouring the dark fashion, and the purple favouring the light fashion. That not all individuals follow the majority in their population is due to the fact that there are individuals who are surrounded by others of the same type. Since the only neighbours who can instigate change, are neighbours of an opposite type, these individuals can never change fashion. In this simulation, types and fashions are randomly distributed at the initiali- sation, and it is thus not possible for all purple people to be dark and all green people to be light, as the well-mixed model suggests. The randomisation makes the results differ between simulations. It can take much longer than 200 time steps to see the segregation.

83 Figure 60: Result plot for a spatial model comparable to the well-mixed model in Figure 59a, with rates βG = βP = γG = γP = 0.5. The initial condition is DG = 0.45, DP = 0.4, and the initialisation is randomised.

The solution of the dynamical system, shown in Figure 59c, exhibits a rise in popularity of the dark fashion, before it dies out. This is reproducible in the spatial model, as seen in Figure 61, although the effect is slight and very slow.

Figure 61: Result plot for a spatial model comparable to the well-mixed model in Figure 59c, with rates βG = βP = 0.9 and γG = γP = 0.1. The initial condition is DG = 0.45, DP = 0.4, and the initialisation is randomised.

11.6 Initial Condition in the Spatial Model The fact that individuals only can be convinced to change fashion by interac- tions with neighbours of the opposite type is important in the spatial model, since individuals never changes which population they belong to. If, for exam- ple, the different populations are separated into one half of the lattice each, and the fashions randomly distributed among them, the border between the popula- tions are the only places where transitions mat occur. Consequently, very little happens.

84 If we instead randomly spread out the types and separate the fashions in the lattice, the transitions, at least initially, happens more rapidly. In some simulations, the initial setup causes so many transitions that a small peak is formed in the result. An example of this is shown in Figure 63, which is a result obtained for the same model as in Figure 61, but for the setup in Figure 62. The dark fashion increases fast in the green population, but then finds it equilibrium, determined by the random placement of the green and purple individuals.

Figure 62: The lattice at time t=0 for an initialisation where the placement of the types is randomised while the fashions are separated.

Figure 63: Result plot for a spatial model comparable to the one in Figure 61, with rates βG = βP = 0.9 and γG = γP = 0.1. The initial condition is DG = 0.45, DP = 0.4, and at the initialisation the one in Figure 62.

11.7 Conclusions In this dynamical system the populations will, except for with specific initial conditions always completely adopt one fashion each.The segregation is thus much stronger in this model than in the previous segregation model.

85 In the spatial model though, the segregation effect is smaller. For individ- uals with less than two neighbours of the opposite type, changing fashions is impossible. Thus, this model suggests that if a person is surrounded by people of their ”own kind”, they have no need to change.

12 Polarisation 12.1 Model Description This model describes a world where two types of people exist, and how their attitudes change as they interact with each other. The two populations consist of people with different preferences or convictions in some way, for example po- litical views or fashion, and we will call them the Green and the Purple people. People of both types can be either Extreme or Moderate in their respective con- viction, and their attitudes change by interactions with their own type and the opposite one. This same structure is similar to the one presented by (Short, Mc- Calla, and R.D’Orsogna 2017), but in their model de-radicalisation of extreme individuals only happens spontaneously. The rules of the model in this work are as follows. If a moderate person meets several people of their own type that hold extreme views, the moderate person will follow suit and become extreme as well. For a person with extreme views though, it only takes one meeting with a moderate person of the opposite type to soften and become moderate. The reaction equations to describe this are

βG MG + 2EG −−→ 3EG

βP MP + 2EP −−→ 3EP γG EG + MP −−→ MG + MP γP EP + MG −−→ MP + MG, where β is a rate for turning extreme, and γ a rate for turning moderate. The green and the purple populations do not change sizes; the only thing interactions can change is the attitude of an individual. Therefore, the populations are

MG + EG = N

MP + EP = M.

In the analysis, N and M are equal, i.e., the green and purple populations are equally large.

12.2 Dynamical System The dynamical system, expressed in rates of change for turning moderate, reads

( 2 M˙ G = −βG(1 − MG) MG + γG(1 − MG)MP 2 M˙ P = −βP (1 − MP ) MP + γP (1 − MP )MG.

86 12.3 Finding Fixed Points and Nullclines

We find the nullclines for M˙ G by setting M˙ G = 0 and rearranging the expression to M˙ G = −βG((1 − MG)MG + γGMP )(1 − MG). (52) We see that we have two nullclines at

MG(MP ) = 1 (53) and βG MP (MG) = (1 − MG)MG. (54) γG

Doing the same for M˙ P = 0 gives the two nullclines

MP (MG) = 1 (55) and βP MG(MP ) = (1 − MP )MP . (56) γP We look for the fixed points at the intersections between the nullclines. The curves (53) and (55) intersect at

∗ ∗ (MG,MP ) = (1, 1). (57)

The nullclines (53) and (56) intersect at the two points  r  ∗ ∗ 1 1 γP (MG,MP ) = 1, ± − . (58) 2 4 βP

In the same way, the nullclines (54) and (55) intersect at the points  r  ∗ ∗ 1 1 γG (MG,MP ) = ± − , 1 . (59) 2 4 βG

Lastly, using (54) in (56) gives the equation

4 3 γG 2 γG γGγP MG − 2MG + (1 + )MG + ( − 1)MG = 0. (60) βG βG βGβP

We can spot one root right away - MG = 0, which gives us the fixed point

∗ ∗ (MG,MP ) = (0, 0). (61)

We have identified six fixed points in the system, and the remaining three are the roots to the equation

3 2 γG γG γGγP MG − 2MG + (1 + )MG + ( − 1) = 0. (62) βG βG βGβP

87 Thus, the system has a maximum of nine fixed points. Figure 64 shows an example of a system where all nine points exist.

Figure 64: Phase plane for a system with rates βG = βP = 0.6 and γG = γP = 0.1. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

The variable nullclines in this system are parabolas which are fixed on the γ axes, and whose height is determined by the ratio of the rates, β . Looking at the fixed points (58) and (59), we see that a parabola will intersect the line MG γ 1 or MP if the rates satisfy β ≤ 4 . When it does, two fixed points are created. To study how the nullclines can be changed, we look at Figure 65, that shows a series of systems where none of the parabolas reach the linear nullcline. In the solution plots, the lightly coloured curves represent the moderate attitude, and the dark curves the extreme one. In the case when all rates are equal, the system is symmetric and the only fixed point is found at (1, 1). Thus, all individuals are moderate at the end of the simulation. Since it easier to turn moderate γ than to turn extreme, this does seem reasonable. In the case when the ratio β is lowered for both populations, the parabolas reach further into the plane. As they intersect, they create a fixed point (a saddle), and the already existing fixed point in the origin is now attracting. Thus, in this system, either the moderate or extreme attitude takes over the entire population. As the ratio between the rates is still equal for both populations, the system is still symmetric. In the last phase plane in the figure, the symmetry is broken, as one of the populations has a ratio of one and the other one a ratio smaller than one.

88 (a) Phase plane for a system with rates (b) Solution plot for a system with rates βG = βP = γG = γP = 0.5. βG = βP = γG = γP = 0.5.

(c) Phase plane for a system with rates (d) Solution plot for a system with rates βG = βP = 0.5 and γG = γP = 0.3. βG = βP = 0.5 and γG = γP = 0.3

(e) Phase plane for a system with rates (f) Solution plot for a system with rates βG = 0.7, βP = 0.5, γG = 0.3 and βG = 0.7, βP = 0.5, γG = 0.5 and γP = 0.3. γP = 0.3.

Figure 65: Phase planes and solution plots for systems with varying rates. The trajectories start at MG = MP = 0.3. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate. 89 In all systems, no matter how many fixed points exist, the attracting points are located on the lines MG = 0 and MP = 1, and in the origin. That means that for all possible results for this model, at least one population will have all their members have one certain attitude. In the other population, either all members will have the same attitude as the first, or, only some of them do while most of them have the opposite one. The ratio of the rates decides where the nullclines go, but the values of the rates also determine the path and speed of the trajectories. Figure 66 shows a system where one population is more easily persuaded than the other. The rates are βG = γG = 0.1 and βP = γP = 0.9, meaning purple people are more likely than green ones to change their behaviour. The equilibrium is the same as for the system in Figure 65a, but the green curves are less steep, and the purple ones steeper, showing that the green population changes behaviour at a lower rate.

(a) Phase plane. (b) Solution plot.

Figure 66: Phase plane and solution plot for a system with rates βG = γG = 0.1 and βP = γP = 0.9. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

12.4 Initial Condition in the Dynamical System Note that in the phase planes presented for this model, all points are allowed as initial points for a solution. Since MG and MP belong to different populations, their values can range from zero to one. For all possible results for this model, at least one population will have all their members have one certain attitude. We can see this by, again, looking at the phase plane for the system with rates βG = βP = 0.6 and γG = γP = 0.1, in Figure 67 shown with trajectories to all fixed points. The rates of the system determines which fixed point has the largest set of initial conditions that will lead to it. In Figure 67 for example, there are very few initial conditions leading to all individuals being moderate, (1, 1), while there are many leading to all individuals being extreme, (0, 0).

90 Figure 67: Phase plane for a system with rates βG = βP = 0.6 and γG = γP = 0.1, and trajectories to the stable fixed points. The colours of the arrows in the vector field corresponds to the norm of the rate; the warmest colour is the highest rate.

12.5 Spatial Model Figure 68 shows results from the spatial model and the dynamical system with rates βG = βP = 0.6 and γG = γP = 0.1. The simulations correspond to the trajectories in the phase plane in Figure 67. The setup for the spatial simulations is randomised. Looking at the result plots, it is clear that the moderate takes over both types of people, for all initial conditions. In fact, even for simulations with initial conditions closer to the fixed points, the moderate attitude will take over. The transitions from extreme to moderate has a higher chance of happening than transitions in the other direction, even though β ≥ γ. This is due to a combination of factors: first, the change from moderate to extreme requires two extreme neighbours. Second, it requires two extreme neighbours of the same type. That is, for this change to be possible, there must be three or more people of the same type right next to each other in the lattice. Since this is unlikely to happen when the types are distributed uniformly, few people are able to turn extreme. This would suggest that, according to this model, people who have a mixed social circle has a lower risk of becoming extreme. We have not been able to find a set of parameters for the spatial model which reproduces the solution of the dynamical system, except for when that solution is that everyone turns moderate.

91 (a) Result plot for the spatial model with (b) Solution plot for a dynamical system initial condition MG = MP = 0.3. with initial condition MG = MP = 0.3.

(c) Result plot for the spatial model with (d) Solution plot for a dynamical system initial condition MG = MP = 0.9. with initial condition MG = MP = 0.9

(e) Result plot for the spatial model with (f) Solution plot for a dynamical system initial condition MG = 0.4, MP = 0.98. with initial condition MG = 0.4, MP = 0.98.

Figure 68: Results from the spatial model and dynamical system with rates βG = βP = 0.6 and γG = γP = 0.1, and varying initial conditions. The phase plane with corresponding trajectories for the dynamical system is shown in Figure 67. The setup for the spatial simulations is randomised. 92 12.6 Initial Condition in the Spatial Model Since the rules of this model all involve interactions with people of different attitude, separating the attitudes in the setup will make change very slow. Doing the opposite, has a drastic effect on the result. Figure 69 shows the setup where the types of people are separated, and the majority of people are moderate. At the border between the green and purple populations though, there is a small clique of extremists. The extremism will spread rapidly in both populations, yielding two extreme, polarised, groups. The result, and comparison to the dynamical system, can be seen in Figure 70. If the types in the extreme clique are swapped, the extremists have no impact on the population where they live, since an extremist cannot invoke extremism in an individual of the opposite population.

Figure 69: The lattice at time t=0, showing a setup where two moderate populations of different types exist next to each other, and a small group of extremist exist at the border.

93 (a) Result plot for the spatial model. (b) Solution plot for a dynamical system.

Figure 70: Results from the spatial model and dynamical system with rates βG = βP = 0.6 and γG = γP = 0.1, and initial setup as in Figure 69.

12.7 Conclusions In the well-mixed interpretation of this model, at least one of the populations will entirely adopt one of the attitudes, for any combination of parameters. For there to exist states where one of populations has diverging attitudes among its members, the ratio between the rates for turning moderate and turning extreme must be small enough. There are generally several possible equilibrium states, and which one will be realised depends on the initial condition. The results of the spatial model show that individuals who have people of different convictions than their own around them, are not likely to become extreme. Concentrating people of the same type though, promotes extremism.

13 Python Tool for Model Investigation

The Python tool developed in connection with this work consists of two note- books, where one introduces the controls of the tool and thinking behind the models, and the other extends the tool by allowing the user to build their own models. The introductory notebook takes the user through a guided analysis of the Cult model, much like the one presented in this work. The model generator notebook creates compartmental models by taking user-defined reaction equa- tions, and from them creating a dynamical system and a cellular automaton. The generator allows four compartments, and four reaction equations determin- ing how they interact. There are also four pre-defined models to choose from, Social Epidemic, Temporary Immunity, Social Recovery and Segregation. The models must obey the same restrictions put on the models in this work, i.e., every rule defines the transition of one person from one group to another, and the size of the population is constant. If two or three compartments are used in the model, the generator interprets them as being part of the same population.

94 If four compartments are used, it is assumed that they constitute two differ- ent populations that may interact but not swap members, as is the case in the Segregation and Polarisation models. When the model is defined, there are two sections where the well-mixed and spatial models are analysed. In the section analysing the dynamical system, the outputs are the system’s phase plane and result plot. There are a number of interactive controls, allowing the user to define which compartments will span the phase plane, and change which initial condition and parameters are used. In the section analysing the spatial model, the outputs are the result plot of the simulation and an animation of the lattice. As for the dynamical system, there are controls for initial condition and parameters, but there are also a number of choices for spatial setups. If the model involves one population, the user can choose to start the simulation with all groups spread randomly in the domain, by placing all three groups in equally sized blocks, or by placing one group as a concentrated block surrounded by another. If the model involves two populations, the choices are to mix all groups randomly, to mix the two populations but separate the different states, or to mix the states but separate the populations. Both notebooks are written using Google Colaboratory, and are available here: The Cult of the Red:

https://colab.research.google.com/drive/1YVzptRog8gfhShxCyW1LDvWZFk6elxrc?usp=sharing Model Generator:

https://colab.research.google.com/drive/1-gZu1o54P7XsDzl2noWSdpurmpifoW-n?usp=sharing

14 Conclusions

In this work we have investigated eleven models for social dynamics, by the use of both dynamical systems and spatial simulations. We have gained understanding for the basic nature of each model, and have seen what role space plays in the dynamics. An important takeaway is the realisation that spatial effects are hugely important, and a spatial model cannot be expected to perform in the same way as a well-mixed one. Also, care must be taken to the initial setup of a spatial simulation, as it can drastically impact the outcome. The best simulation to use, a well-mixed or a spatial one, depends on the object of the model. A disease, generally, spreads among those physically close to each other, and a well-mixed approach might not be appropriate for simulations of a large population. Social dynamics though, is not always dependent on physical proximity. Technology, the internet and especially social media might very well increase the ’well-mixedness’ of our world. In the end, any model’s suitability must be for the researcher to judge. This work’s contribution to the field of social dynamics is a framework of sim- ple models whose dynamics can be combined and extended in more complicated endeavours. They create a baseline to which new models may be compared, and demonstrate many of the most interesting phenomena that emerges from

95 social interactions in groups of humans or animals. Understanding this set of models thus provides a solid foundation both for future studies of those new to social dynamics, as well as for experienced researchers. The Python tool pre- sented here facilitates this understanding, and complements the studies in this work. It allows users to investigate the baseline models themselves, but also to compare them with new models. That way, it acts as an introduction to social dynamics, but also as a tool for those looking to further the field.

References

Castellano, Claudio, Santo Fortunato, and Vittorio Loreto. 2009. “Statistical physics of social dynamics.” Review of Modern Physics 81 (2): 591–646. https://link.aps.org/doi/10.1103/RevModPhys.81.591. Daley, Daryl J., and David G. Kendall. 1964. “Epidemics and Rumours.” Nature 204 (1118). https://doi.org/10.1038/2041118a0. Gu, J., W. Li, and X. Cai. 2008. “The effect of the forget-remember mechanism on spreading.” The European physical journal. B, Condensed matter physics 62 (2): 247–255. https://doi.org/10.1140/epjb/e2008-00139-4. Kermack, William O., and Anderson G. McKendrick. 1927. “A Contribution to the Mathematical Theory of Epidemics.” Proceedings of the Royal Society of London. Series A, Containing Papers of a Mathematical and Physical Character 115 (2772): 700–721. http://www.jstor.org/stable/94815. Li, Ming, Hong Zhang, Paul Georgescu, and Tan Li. 2021. “The stochastic evo- lution of a rumor spreading model with two distinct spread inhibiting and attitude adjusting mechanisms in a homogeneous social network.” Physica A 562:125321–125321. Liu, Yun, Su-Meng Diao, Yi-Xiang Zhu, and Qing Liu. 2016. “SHIR competitive information diffusion model for online social media.” Physica A: Statistical Mechanics and its Applications 461:543–553. https://doi.org/10.1016/j. physa.2016.06.080. Lotka, Alfred J. 1920. “Undamped oscillations derived from the law of mass action.” Journal of the American Chemical Society 42 (8): 1595–1599. htt ps://doi.org/10.1021/ja01453a010. Piqueira, Jos´eR.C., Mauro Zilbovicius, and Cristiane M. Batistela. 2020. “Da- ley–Kendall models in fake-news scenario.” Physica A: Statistical Mechan- ics and its Applications 548:123406. https://doi.org/10.1016/j.physa.2019. 123406. Pratt, Stephen C. 2005. “Behavioral mechanisms of collective nest-site choice by the ant Temnothorax curvispinosus.” Insectes sociaux 52 (4): 383–392. https://doi.org/https://doi-org.ezproxy.its.uu.se/10.1007/s00040-005- 0823-z.

96 Sayama, Hiroki. 2020. Linear Stability Analysis of Nonlinear Dynamical Sys- tems. Binghamton University, State University of New York. https://math. libretexts.org/@go/page/7807. Schelling, Thomas C. 1969. “Models of Segregation.” The American Economic Review 59 (2): 488–93. http://www.jstor.org/stable/1823701. Sch¨onfisch, Birgitt, and Andr´ede Roos. 1999. “Synchronous and asynchronous updating in cellular automata.” Biosystems 51 (3): 123–143. https://doi. org/10.1016/S0303-2647(99)00025-8. Seeley, Thomas D., Scott Camazine, and James Sneyd. 1991. “Collective decision- making in honey bees: how colonies choose among nectar sources.” Be- havioral Ecology and Sociobiology 28:277–90. https://doi.org/10.1007/ BF00175101. Short, Martin B., Scott G. McCalla, and Maria R.D’Orsogna. 2017. “Modelling radicalization: how small violent fringe sects develop into large indoctri- nated societies.” Royal Society Open Science 4 (8). https://doi.org/10. 1098/rsos.170678. Wang, Lin, and Brendan C. Wood. 2011. “An epidemiological approach to model the viral propagation of memes.” Applied Mathematical Modelling 35 (11): 5442–5447. https://doi.org/10.1016/j.apm.2011.04.035.

97