29
Maths in The Walking Dead Federico Roncaglia Riccardo Cazzin Giacomo Stevanato . Nicolò Voltan Leonardo Bellin Pietro Casarin Gabriele Morrone Giacomo Sanguin Fabio Casarin Francesco Pesce March 28, 2018

Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Maths in The Walking Dead

Federico Roncaglia Riccardo Cazzin Giacomo Stevanato .Nicolò Voltan Leonardo Bellin Pietro Casarin Gabriele Morrone

Giacomo Sanguin Fabio Casarin Francesco Pesce

March 28, 2018

Page 2: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Overview

This work focuses on the dynamics of a particular epidemic disease,called zombism.

2 of 29

Page 3: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

HZR model

The possible states for each individual of the population are three:human: healthy individual;zombie: infected individual;removed: dead individual.

H Z R

3 of 29

Page 4: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Hypotheses

We will assume the following for the study of our model.

Discrete timeThe unit of time is 1 day.

Unique state

An individual may assume only one state per day.

4 of 29

Page 5: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Parameters

Initial conditions:• number of initial humans (H0);• number of initial zombies (Z0).

H Z

5 of 29

Page 6: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Parameters

Infection rate β, i.e. probability that a zombie:1 meets a human;2 infects that human.

Humans’ zombie removing rate κ.

H Z RHβ

Z RHβ

Z κ R

6 of 29

Page 7: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Equations

How many people are zombified every day?Each zombie infects βHn humans during the day n. . .. . . so, all the zombies Zn infect βHnZn humans.

Therefore, during the following day (n + 1):

Evolution equations

{Hn+1 = Hn − βHnZn

Zn+1 = Zn + βHnZn−κHnZn

7 of 29

Page 8: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Equations

However, every day humans manage to kill some zombies:Each human kills κZn zombies during the day n. . .. . . so, all the humans Hn kill κHnZn zombies.

Therefore, during the following day (n + 1):

Evolution equations

{Hn+1 = Hn − βHnZn

Zn+1 = Zn + βHnZn − κHnZn

8 of 29

Page 9: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Looking for analytic equations

The found equations correctly describe the progress in the system,but they are quite inefficient for a simulation or for predictions.

Simple proof of inefficiency

H2 = H1 − βH1Z1 == H0 − βH0Z0 − β (H0 − βH0Z0) [Z0 + (β − κ)H0Z0]

9 of 29

Page 10: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Invariants

Let’s introduce a new quantity, the total population, and study itsbehaviour in n.

Hn + Zn + Rn

From the assumption of closed system, the total population isconstant in time.

InvariantWe call invariant of the model a quantity which remains constantduring the evolution.

10 of 29

Page 11: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Invariants

We define the increment of a quantity (e.g. Hn) as

∆Hn = Hn+1 − Hn

Let’s study the following ratio:

∆Zn

∆Hn=β���HnZn − κ���HnZn

−β���HnZn=κ

β− 1 = c − 1

The result is easier to read if we set a new parameter c =κ

β.

Analogously,∆Rn

∆Hn= −c ∆Zn

∆Rn=

1c− 1

11 of 29

Page 12: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Invariants

From the ratio∆Zn

∆Hnwe just found:

∆Zn

∆Hn= c − 1

∆Zn = (c − 1)∆Hn

Zn+1 − Zn = (c − 1) (Hn+1 − Hn)Zn + (1− c)Hn = Zn+1 + (1− c)Hn+1

We have found a new invariant p = Zn + (1− c)Hn.

H Z

12 of 29

Page 13: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Simulations: first example

We set H0 = 106, Z0 = 10, β = 10−5 and c = 0.9999.

0 2,000 4,000 6,000 8,000 10,0000

0.2

0.4

0.6

0.8

1·106

n

Hn

0 2,000 4,000 6,000 8,000 10,000

20

40

60

80

100

120

n

Zn

13 of 29

Page 14: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Simulations: the role of β

Keeping H0 = 106, Z0 = 10 and c = 0.9999, let us set β = 10−4.

0 200 400 600 800 1,0000

0.2

0.4

0.6

0.8

1·106

n

Hn

0 200 400 600 800 1,000

20

40

60

80

100

120

n

Zn

In order to keep the simulation “realistic”, β must be very small.

14 of 29

Page 15: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Simulations: where is Z∞?

0 2,000 4,000 6,000 8,000 10,000

20

40

60

80

100

120

n

Zn

15 of 29

Page 16: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

The logistic equation

Let’s consider the increment rate

∆Zn

Zn

We find:

∆Zn

Zn= β (p − Zn)

0 2,000 4,000 6,000 8,000 10,000

20

40

60

80

100

120

n

Zn

This leads to the equation:

Zn+1 − Zn = β (p − Zn)Zn

=⇒ Zn+1 = (βp + 1)Zn − βZ 2n

This proves that Zn satisfies a logistic equation, where βp is itsgrowth rate.

16 of 29

Page 17: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

The logistic equation

Analogously we find that

∆Hn

Hn

0 2,000 4,000 6,000 8,000 10,0000

0.2

0.4

0.6

0.8

1·106

n

Hn

can be written as

Hn+1 − Hn = −β [p − (1− c)Hn]Hn

This proves that also Hn satisfies a logistic equation, where −βp isits growth rate.

17 of 29

Page 18: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Simulations: the logistic equation

Let us compare Zn with a logistic equation.

0 2,000 4,000 6,000 8,000 10,0000

20

40

60

80

100

120

n

Zn

The logistic equation is a good approximation, but it is not theactual solution.

18 of 29

Page 19: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Requirements for a logistic equation

The logistic equation fn can be analytically written by knowing:

its upper value L;its growth rate r .

−10 −5 0 5 100

0.2

0.4

0.6

0.8

1

n

f n

Generic logistic equation

fn =L

1 +L− f0f0

e−rn

19 of 29

Page 20: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Zombies’ equation

Previously we obtained that

Zn+1 = (βp + 1)Zn − βZ 2n

When n→ +∞,

Z∞ = limn→+∞

Zn = limn→+∞

Zn+1

Therefore, we can replace Zn and Zn+1 with Z∞ when n→ +∞:

Z∞ = (βp + 1)Z∞ − βZ 2∞

Excluding the banal solution Z∞ = 0, we can divide for Z∞:

βp + 1− βZ∞ = 1Z∞ = p

20 of 29

Page 21: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Zombies’ equation

Now we have:the upper value Z∞ = p;the growth rate r = βp.

We can write the zombies’ analytic equation:

Zombies’ analytic equation

Zn =p

1 +p − Z0

Z0e−rn

=p

1 +

(p

Z0− 1)e−rn

21 of 29

Page 22: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Humans’ equation

We want to find the upper value of the humans’ equation. Westart from the invariant p:

p = Zn + (1− c)Hn

When the humans win against the zombies, we have Z∞ = 0:

p = ��Z∞ + (1− c)H∞p = (1− c)H∞

H∞ =p

1− c

22 of 29

Page 23: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Humans’ equation

Now we have:the upper value H∞ = p

1−c ;the growth rate −r = −βp.

We can write the humans’ analytic equation:

Humans’ analytic equation

Hn =

p1−c

1 +

p1−c − H0

H0ern

=p

1− c +

(p

H0− 1 + c

)ern

23 of 29

Page 24: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Will humans survive?

The parameter c decides whether zombies or humans win.We can distinguish three different cases:

c < 1 +Z0

H0;

c = 1 +Z0

H0;

c > 1 +Z0

H0.

For the following simulations, we always set H0 = 106, Z0 = 10 andβ = 10−5.

24 of 29

Page 25: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

When zombies win

When c < 1 +Z0

H0, zombies always win and all humans die.

For example, if c = 0.9999:

0 2,000 4,000 6,000 8,000 10,0000

0.2

0.4

0.6

0.8

1·106

n

Hn

0 2,000 4,000 6,000 8,000 10,0000

20

40

60

80

100

120

n

Zn

25 of 29

Page 26: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

When zombies win

A particular case is when c = 1:

0 5,000 10,000 15,000 20,0000

0.2

0.4

0.6

0.8

1·106

n

Hn

0 5,000 10,000 15,000 20,0000

5

10

15

n

Zn

{Hn = H0e

−rn

Zn = Z0

26 of 29

Page 27: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

When humans win

When c > 1 +Z0

H0, humans survive and kill all the zombies.

If c = 1.00003:

0 10,000 20,000 30,000 40,0000

0.2

0.4

0.6

0.8

1·106

n

Hn

0 10,000 20,000 30,000 40,0000

2

4

6

8

10

n

Zn

27 of 29

Page 28: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

When everyone loses

In the special case c = 1 +Z0

H0both humans and zombies are

exterminated.

0 20,000 40,000 60,000 80,000 1 · 1050

0.2

0.4

0.6

0.8

1·106

n

Hn

0 20,000 40,000 60,000 80,000 1 · 1050

2

4

6

8

10

n

ZnHn =

H0

1 + Z0βn

Zn =Z0

1 + Z0βn

28 of 29

Page 29: Maths in The Walking Dead · Maths in The Walking Dead FedericoRoncaglia RiccardoCazzin GiacomoStevanato. NicolòVoltan LeonardoBellin PietroCasarin GabrieleMorrone GiacomoSanguin

Thanks for your attention!