4 Cellular Automata
4 Cellular Automata
I von Newmann
I Moore
I Margolus
I ...
(a) (b)
Boundary conditions
I periodic
I fixed
I reflexive
I ....
b a b 1 a
periodic fixed
a a b a b
adiabatic reflection
Generalization
I Stochastic CA
I Asynchronous update: loss of parallelism, but avoid oscillations
I Non-uniform CA
Implementation of the evolution rule
I On-the-fly calculation
and then
sij (t + 1) = Rule[index]
The possible universes...
k
I Finite number of possible universes: mm possible rules where m is the number of
states per cell and k the number of neighbors.
I Most of them are uninteresting
Wolfram classification of 1D rules with m = 1, k = 3:
Coming next
Historical background
2. Historical background
Historical notes
2
2 1 2
1 2 1 2
3 3 6 2 2 1 2
6 2 7 2 2 1 2 2 1 2
2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 4 2 2 2 2 2 2 2 2 1 2
2 0 1 7 0 1 7 0 1 2 2 0 1 7 0 1 7 0 1 2 2 7 0 1 4 0 1 4 0 2 2 1 4 0 1 1 1 1 1 2
2 7 2 2 2 2 2 2 7 2 2 7 2 2 2 2 2 2 4 2 2 1 2 2 2 2 2 2 1 2 2 0 2 2 2 2 2 2 7 2
2 1 2 2 0 2 2 1 2 2 0 2 2 0 2 2 1 2 2 4 2 2 0 2
2 0 2 2 1 2 2 0 2 2 1 2 2 7 2 2 1 2 2 1 2 2 1 2
2 7 2 2 4 2 2 7 2 2 4 2 2 1 2 2 1 2 2 0 2 2 7 2
2 1 2 2 0 2 2 1 2 2 0 2 2 0 2 2 1 2 2 7 2 2 0 2
2 0 2 2 2 2 2 2 1 2 2 0 2 2 2 2 2 2 1 2 2 7 2 2 2 2 2 2 7 2 2 1 2 2 2 2 2 2 1 2
2 7 1 1 1 1 1 0 4 2 2 7 1 0 7 1 1 1 1 2 2 1 0 7 1 0 7 1 0 2 2 0 7 1 0 7 1 0 7 2
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
5 2 2 2 2 2 2 2 2 5 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 4 0 1 4 0 1 1 1 2 2 1 1 4 0 1 1 1 1 1 7 2 1 1 1 1 1 1 1 7 0 1 7 0 1 2 2 1 1 7 0 1 7 0 1 7 0 1 7 0 2
2 1 2 2 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 0 2 2 2 2 2 1 2 2 2 2 2 2 7 2 2 2 2 2 2 1 2 2 2 2 2 2 1 2
2 0 2 2 1 2 2 0 2 2 1 2 2 1 2 2 0 2 2 0 2 2 7 2
2 7 2 2 7 2 2 4 2 2 7 2 2 1 2 2 1 2 2 7 2 2 0 2
2 1 2 2 0 2 2 1 2 2 0 2 2 0 2 2 7 2 2 1 2 2 1 2
2 0 2 2 1 2 2 0 2 2 1 2 2 4 2 2 0 2 2 1 2 2 7 2
2 7 2 2 2 2 2 2 7 2 2 7 2 2 2 2 2 2 7 2 2 1 2 2 2 2 2 2 1 2 2 1 2 2 2 2 2 2 0 2
2 1 0 7 1 0 7 1 0 2 2 1 0 7 1 0 7 1 0 2 2 0 4 1 0 7 1 0 7 2 2 1 1 0 4 1 0 4 1 2
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
iteration=350
iteration 600
Langton’s CA: some conclusions
Coming next
A mathematical abstraction of reality
3. A mathematical abstraction of
reality
CA as a mathematical abstraction of reality
What is this ?
The real thing
Wilson Bentley, From Annual Summary of the "Monthly Weather Review", 1902.
Snowflakes model
http://cui.unige.ch/~chopard/CA/Animations/img-root.html
Cells differentiation in drosophila
In the embryo all the cells are identical. Then during evolution they
differentiate
I slightly less than 25% become neural cells (neuroblasts)
Biological hypotheses:
I Cells produce a substance S (protein) which leads to differentiation when
a threshold S0 is reached.
I Neighboring cells inhibit the local S production.
CA model for a competition/inhibition process
I Hexagonal lattice
I The values of S can be 0 (inhibited) or 1 (active) in each lattice cell.
I A S = 0 cell will grow (i.e. turn to S = 1) with probability pgrow
provided that all its neighbors are 0. Otherwise, it stays inhibited.
I A cell in state S = 1 will decay (i.e. turn to S = 0) with probability
pdecay if it is surrounded by at least one active cell. If the active cell is
isolated (all the neighbors are in state 0) it remains in state 1.
Differentiation: results
The two limit solutions with density 1/3 and 1/7, respectively.
I CA produces situations with about 23% of active cells, for almost any
value of panihil and pgrowth .
I Model robust to the lack of details, but need for hexagonal cells
Excitable Media, contagion models
t=5 t=110
t=115 t=120
Belousov-Zhabotinski (tube worm)
The state of each site is either 0 or 1; a local timer with values 0, 1, 2 or 3 controls the 0
period.
Coming next
Traffic models
4. Cellular Automata Models for Traffic
Traffic Models
A vehicle can move only when the downstream cell is free (Wolfram rule 184).
time t
time t+1
Flow diagram
The car density at time t on a road segment of length L is defined as
N (t)
ρ(t) =
L
where N is the no of cars along L
The average velocity < v > at time t on this segment is defined as
M (t)
< v >=
N (t)
where M (t) is the number of car moving at time t
The traffic flow j is defined as
j=ρ<v>
Flow diagram of rule 184
1
flow
0
0 1
car density
Traffic in a Manhattan-like city
f g
(a) (b)
d c
a b h (a) (b)
1 0.35
e free rotary
Traffic flow
<v>
Origin
Destination
2
I 1066 junctions
4
3 3
I 3145 road segments
1
4
I 560886 road cells 2
1
I 85055 cars
Travel time during the rush hour
insertion probability Trip 2 Trip 3
35 35
30 30
20 20
p1
10 10
0 5 10 15 20 25 30 35 40 45 0 5 10 15 20 25 30 35 40 45
time Departure time [minutes] Departure time [minutes]
0 I 2 I I
3 3
End of module
Traffic models
Coming next
Complex systems
5. Complex systems
Complex systems
Rule of the Conway’s Game of Life:
I Birth if exactly 3 living
I Square lattice, 8 neighbors neighbors
I Cells are dead or alive (0/1) I Death if less than 2 or more
than 3 neighbors
t t+10 t+20
Complex Behavior in the game of life
A glider gun
iteration=150
The Langton’s Ant
Coming next
Lattice-gas models
6. Lattice-gas models
Lattice Gas model
j y
i x
Lattice gas Automata (LGA)
Exact mass and momentum conservation: that is what really matters for a
FHP model
p=1/2
p=1/2
Coming next
Microdynamics of LGA
7. Microdynamics of LGA
Microdynamics of LGA
It consists of two steps. We define nin out
i = ni and ni to better specify them
I Collision step: The quantities nin
i “collide” locally. Particles are deviated and new
values nout
i are computed at each lattice site, according to a pre-defined collision
operator Ωi (n)
I Propagation step: The quantitiy nout
i (r) is sent to the neighboring site along lattice
direction vi .
Collision Propagation
Microdynamics of LGA
In formula, we get
I collision: n
out in in
i (r, t) = ni (r, t) + Ωi (n (r, t)
in
I propagation: n (r + vi ∆t, t + ∆t) = n
out
i i (r, t)
where ∆t carry the time units and vi has the unit of a velocity.
Particle with velocity ni travels in direction vi and will thus reach
lattice site r + vi , still with velocity vi .
Microdynamics of LGA
(b)
(c)
HPP model: Computer Implementation
Admitted velocities
nout
i = ni − ni ni+2 (1 − ni+1 )(1 − ni+3 ) + ni+1 ni+3 (1 − ni )(1 − ni+2 )
and
ni (r) = nout
i (r − vi )
Mass conservation
The incoming mass is
X
ρin (r, t) = nin
i (r, t)
i
End of Week 4
Thank you for your attention!