1
00:00:00,000 --> 00:00:04,028
The first concept to understand in
dynamics and chaos is
2
00:00:04,038 --> 00:00:07,123
iteration, that is doing something again
and again.
3
00:00:08,023 --> 00:00:11,024
For example, let's think
about population growth.
4
00:00:11,024 --> 00:00:14,045
Population growth is an iterative process
5
00:00:14,045 --> 00:00:18,073
since reproduction happens over and over
again. We are going to be looking at a
6
00:00:18,073 --> 00:00:21,099
extremely simple model
of population growth
7
00:00:21,099 --> 00:00:24,298
called SimplePopulationGrowth.nlogo
8
00:00:25,189 --> 00:00:30,070
As usual this is available on the course
materials page for website.
9
00:00:30,007 --> 00:00:34,071
Let's open it up. In this model,
10
00:00:34,071 --> 00:00:37,139
when we click setup, it starts off
11
00:00:38,039 --> 00:00:42,228
with a single individual,
making up our population.
12
00:00:42,579 --> 00:00:45,640
The birth rate is 2 which means that
13
00:00:45,064 --> 00:00:48,963
at every time step, this little bunny will
14
00:00:49,539 --> 00:00:52,566
produce two offspring and die.
15
00:00:52,809 --> 00:00:56,823
So if we click reproduce you can see that
happening. There are the two offspring.
16
00:00:56,949 --> 00:01:00,990
Now the next time step, each one of these
bunnies produces two offspring
17
00:01:01,359 --> 00:01:05,220
and dies and so on and so on
18
00:01:05,022 --> 00:01:08,031
and very quickly the world
starts to fill up
19
00:01:08,031 --> 00:01:12,892
with more and more of these bunnies.
The model shows us two plots
20
00:01:13,002 --> 00:01:17,035
the top one here gives us
the population overtime
21
00:01:17,035 --> 00:01:20,745
so at every time step
the population is doubling
22
00:01:20,745 --> 00:01:25,456
you can see that goes up quickly.
It also gives us another plot, another way
23
00:01:25,456 --> 00:01:28,987
of looking at this in which
we plot last year's population
24
00:01:29,057 --> 00:01:32,846
with this year's population,
if we think of a year as
25
00:01:32,846 --> 00:01:40,136
each time step represents a year.
If last year's population is 100
26
00:01:40,136 --> 00:01:42,585
this year's population will be 200
27
00:01:42,585 --> 00:01:46,420
you could see that here and if it's 300
28
00:01:46,042 --> 00:01:50,711
last year, it will be 600 this year and so
you can see we get a straight line
29
00:01:50,711 --> 00:01:56,003
this couldn't be simpler.
Because it is so simple
30
00:01:56,003 --> 00:01:59,116
I'm gonna show you how to
turn this into a mathematical model
31
00:01:59,116 --> 00:02:02,777
so let's close netlogo here,
let's put this aside
32
00:02:02,939 --> 00:02:06,583
and let's write down some equations.
33
00:02:06,583 --> 00:02:09,789
First some terminology.
34
00:02:09,789 --> 00:02:13,409
Let's call a population n
35
00:02:13,409 --> 00:02:16,091
little n - this is the population.
36
00:02:16,091 --> 00:02:22,090
Now let's label the initial population n_0
37
00:02:24,120 --> 00:02:25,170
In our model
38
00:02:25,017 --> 00:02:28,513
n_0 was equal to 1 there
was only one individual
39
00:02:28,513 --> 00:02:31,095
so we can similarly label
40
00:02:31,095 --> 00:02:36,036
n_1 equals the population at year 1
41
00:02:36,036 --> 00:02:40,180
and so on. For us that was 2
42
00:02:40,180 --> 00:02:43,631
because our initial one bunny
had two bunnies
43
00:02:43,631 --> 00:02:46,119
and then died.
44
00:02:46,119 --> 00:02:51,010
More generally, we can label
45
00:02:51,001 --> 00:02:58,509
the population at year t as n_t
46
00:02:58,988 --> 00:03:02,637
We also had a value
47
00:03:02,637 --> 00:03:05,760
for the birth rate which was
48
00:03:05,076 --> 00:03:10,905
the number of offspring produced each year
49
00:03:10,915 --> 00:03:12,895
We noticed that
50
00:03:12,945 --> 00:03:18,226
n_1 was equal to the birthrate
51
00:03:20,002 --> 00:03:23,431
times n_0, right? So we had
52
00:03:23,439 --> 00:03:25,839
1 at the beginning and
53
00:03:25,839 --> 00:03:27,659
we multiply that by 2
54
00:03:27,659 --> 00:03:28,960
to get two offspring.
55
00:03:29,450 --> 00:03:39,387
Similarly n_2 equals
the birthrate times n_1
56
00:03:39,387 --> 00:03:41,659
We can generalize that
57
00:03:41,659 --> 00:03:45,715
to say that n_t+1
58
00:03:45,715 --> 00:03:48,714
that is the population at year t+1
59
00:03:48,714 --> 00:03:53,755
is the birth rate times
60
00:03:53,755 --> 00:03:56,694
the population at the previous year n_t.
61
00:03:56,694 --> 00:04:01,828
so this is our model.
62
00:04:03,928 --> 00:04:06,303
The iterative part comes from
63
00:04:06,303 --> 00:04:12,129
the fact that we always take
the last year's population
64
00:04:12,129 --> 00:04:14,720
and use it to calculate
the next year's population
65
00:04:14,720 --> 00:04:18,334
and then in the year after that
we would take
66
00:04:18,334 --> 00:04:22,290
this new population and use it to
calculate the following year's population
67
00:04:22,029 --> 00:04:26,228
and so on and that's called an iteration.
68
00:04:26,228 --> 00:04:30,052
This is called exponential population
growth
69
00:04:30,052 --> 00:04:32,106
and we can see that as follows:
70
00:04:33,006 --> 00:04:36,889
Let's write down a table (up here)
of the population growth
71
00:04:36,889 --> 00:04:41,277
We will write down here the year
72
00:04:41,279 --> 00:04:45,608
and here we write down n_t
73
00:04:45,608 --> 00:04:49,081
So it is the year t
74
00:04:49,081 --> 00:04:50,551
and n_t
75
00:04:50,551 --> 00:04:54,199
so when we have year 0
we remember this was 1
76
00:04:54,199 --> 00:05:01,092
and this is for birth rate equals 2
77
00:05:01,092 --> 00:05:05,001
At year 1 we had 2, at year 2 we had 4
78
00:05:05,001 --> 00:05:08,270
because we doubling these each year
79
00:05:08,027 --> 00:05:13,094
at year 3 we had 8 and so on
80
00:05:13,094 --> 00:05:15,386
I hope you are seing a pattern here
81
00:05:15,386 --> 00:05:19,489
because at year t we see that our
82
00:05:19,489 --> 00:05:23,110
population is to 2 raise to the t power
83
00:05:23,110 --> 00:05:26,496
so 2 to the 1, 2 to the 2, 2 to the 3
84
00:05:26,496 --> 00:05:28,426
2 to the t
85
00:05:28,426 --> 00:05:31,389
This is called an exponential function
86
00:05:31,389 --> 00:05:33,739
because we have this exponent t
87
00:05:33,739 --> 00:05:38,499
and that causes the population
to grow very very fast.
88
00:05:38,499 --> 00:05:42,490
Of course, this is completely unrealistic
89
00:05:42,490 --> 00:05:46,250
it is uncontrolled population growth
and of course, in the real world,
90
00:05:46,025 --> 00:05:48,129
there are limits to growth.
91
00:05:48,129 --> 00:05:51,129
A population will run out of resources,
92
00:05:51,129 --> 00:05:54,115
it will run out of food or
space in which to grow.
93
00:05:54,575 --> 00:05:58,233
But we just for now will assume
there is no limit to growth.
94
00:05:58,233 --> 00:06:02,797
And now let's look again at the
netlogo version of this model.
95
00:06:02,797 --> 00:06:06,867
So remember here we have our world
filling up with bunnies,
96
00:06:06,867 --> 00:06:09,859
we have our plot of population versus time
97
00:06:09,859 --> 00:06:12,359
but now we can plot
98
00:06:12,359 --> 00:06:15,958
this year's population versus
last year's population.
99
00:06:15,979 --> 00:06:20,135
Now this one here population versus time
is an exponential function
100
00:06:20,135 --> 00:06:25,379
that was that function that had
the 2 raised to the t power in it.
101
00:06:25,379 --> 00:06:28,508
That is what an exponential function looks like
102
00:06:28,508 --> 00:06:32,251
but if we plot this year's population
versus last year's population,
103
00:06:32,251 --> 00:06:34,005
we get a linear function.
104
00:06:34,495 --> 00:06:37,300
We could put a little note on it
105
00:06:38,010 --> 00:06:40,699
to remind ourselves what the function was
106
00:06:40,699 --> 00:06:49,780
and note the function n_t+1
107
00:06:50,759 --> 00:06:58,420
equals birthrate times n_t.
108
00:07:04,369 --> 00:07:09,526
For those of you who vaguely remember
algebra, algebra 1 even,
109
00:07:09,526 --> 00:07:11,705
this is the equation of a line.
110
00:07:11,705 --> 00:07:16,083
We have Y equals slope times X.
111
00:07:16,083 --> 00:07:17,833
So here is our y-axis,
112
00:07:17,833 --> 00:07:21,446
our slope is the birthrate that's 2.
113
00:07:21,449 --> 00:07:26,551
This just shows that every time we
look at X we double it to get Y.
114
00:07:26,551 --> 00:07:31,340
Well this is a linear equation and the
reason it is linear is because
115
00:07:31,340 --> 00:07:33,488
this is in essence a linear system.
116
00:07:33,488 --> 00:07:36,938
If we look at this year's population
versus last year's population.
117
00:07:36,939 --> 00:07:43,230
We have talked in Unit 1 about the
notion of nonlinear versus linear.
118
00:07:43,230 --> 00:07:45,569
Linear comes about because
119
00:07:45,569 --> 00:07:50,759
there is no interactions
among these bunnies:
120
00:07:50,759 --> 00:07:52,580
you just have reproduction
121
00:07:52,580 --> 00:07:57,258
and the bunnies are going along all
independent of each other,
122
00:07:57,258 --> 00:08:00,994
and independence in that sense,
in a system,
123
00:08:00,994 --> 00:08:05,037
yields linearity, linear growth.
124
00:08:05,037 --> 00:08:07,847
OK now it is time for a quiz.
125
00:08:10,277 --> 00:08:17,013
Now suppose the birthrate goes up to 3.
126
00:08:17,013 --> 00:08:23,362
We will let the initial population
n_0 be 1 bunny again.
127
00:08:23,362 --> 00:08:24,649
The question is:
128
00:08:24,649 --> 00:08:41,736
what is the population at time 4?