Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Mathematical models of evolution
1. Mathematical models of
evolution
Jose Cuesta
Grupo Interdisciplinar de Sistemas Complejos
Departamento de Matemáticas
Universidad Carlos III de Madrid
2. "Every body of discovery is mathematical in
form, because there is no other guidance we
can have."
- Charles Darwin
"Mathematics seems to endow one with
something like a new sense."
- Charles Darwin
3. "A mathematician is a blind man in a dark
room looking for a black cat which isn't
there."
- Charles Darwin
11. Saturation
dN
dt
=r N 1−
N
K
carrying capacity
rt
K N 0e
N t= rt
lim N t =K
K N 0 e −1 t ∞
saturation maintains a constant population
13. Fitness
fitness: mean number of adult offspring in the next
generation (separated generations)
fitness: mean growth rate (mixed generations)
dN
=r N
dt
fitness
14. Competition
d NA dNB
=r A N A =r B N B
dt dt
NA NB
x= y= =1−x
N A N B N A N B
dx dy
=x r A − = y r B−
dt dt
average fitness: =x r A y r B
15. Survival of the fittest
dx
=x 1−x r A−r B
dt
r Ar B
0 x 1
all-A
r Ar B
0 x 1
all-B
16. Survival of the fittest
n
d xk
= x k f k − = ∑ x k f k
dt k =1
n
∑ x k =1 x k ≥0 ∀t
k =1
n=2 n=3 n=4
17. Survival of the fittest
n
d xk
= xk ∑ x j f k − f j
dt j =1
assume f k f j ∀ j≠k
lim x k t =1 lim x j t =0 j≠ k
t ∞ t ∞
18. Fundamental theorem of natural
selection
n
d d xk n n
=∑ fk =∑ f k x k f k −=∑ x k f k −2≡ 2f
d t k=1 d t k=1 k=1
d 2
= f
dt
2
Mean fitness never decreases f 0
The speed of increase is determined by the variation within
the population
19. Composition-dependent fitness
f k =f k x 1 ,, x n ≡f k x
Example: two species
r A x , y =r A y
r B x , y =r B x
symbiosis competition
A 0 A 0
B 0 B 0
20. Symbiotic coexistence
dx
=x 1−x [ A− A B x ]
dt
A 0 A
x *=
B 0 A B
0 x* 1
x
21. Competitive exclusion
dx
=x 1−x [ A− A B x ]
dt
A 0 A
x *=
B 0 A B
0 x* 1
x
24. Replication with error
dx
= x r A 1−u A y r B u B − x
dt
dy
= x r A u A y r B 1−u B − y
dt
=x r A y r B
dx
=x 1−x r A−r B 1−x r B u B− x r A u A
dt
x =0 x=1 are not equilibria
25. Replication with error
rAuA
x *≈1− r Ar B
r A−r B
r B uB
x *≈ r A r B
r B −r A
uA
x *= r A =r B
u A u B
mutation is the source of variability
26. Evolution with mutation
mutation matrix Q=q ij u=1, , 1
n
∑ qij=1 ⇔ Q u =u T T
j=1
W ≡RQ
r1 0
R= ⋱
0 rn mutation-selection matrix
n
dx
=x W − x =x W u =∑ x j r j
T
dt j=1
quasispecies equation
27. Evolution with mutation
may be negative!
fundamental theorem
d d x T 2 T 2 2 T
= W u =x W u − =x W − I u
dt dt
equilibria: x * W = * x *
if is irreducible, * is the largest eigenvalue of
Q W
as x * normally corresponds to a mixed population,
* need not be the absolute maximum
31. Fisher-Wright model
A A A A A a a a generation t
k N −k
j N− j
sample with replacement
P kj = N
j
k
N
N −k
N
A A a a a a a a generation t+1
j N−j
33. Fisher-Wright model
two absorbing states:
k =N k =0
{
i=P lim X t =N X 0=i
t ∞ ∣ }
N
i= ∑ P ij j 0 =0 N =1
j=0
i
E { X t 1∣ X t=k }=k ⇒ i=
N
34. Moran model
A A A A A a a a
k N −k
A
A A A A A A a a
k 1 N −k −1
35. Moran model
k N −k
P k , k ±1= 2
N
2 2
N −k k
Pk ,k = 2
N
P k , j =0 if ∣k − j∣1
birth-death process with
two absorbing states
36. Birth-death processes
j i −1
P k , k−1
q 0=1 q j =∏ Q i =∑ q j
k =1 P k , k1 j =0
if absorption
{
i=P lim X t =N X 0=i
∞
t ∞ ∣ }
t ij =∑ P ij
n
T = P T I t 0j=t Nj =0
n=0
if ergodic
w =w P
37. Birth-death processes
two absorbing states (0 & N)
Q N 1−i j
t ij = if ji
Qi q j P j , j1
i=
QN Q N i 1− j
t ij = if ji
q j P j , j1
one absorbing state (N)
Q N −Q i Q N −Q j
t ij = if ji t ij = if j i
q j P j , j1 q j P j , j 1
no absorbing state
q i P i , i1 −1
wi= N
∑ q j P j , j 1−1
j=0
38. Moran model
i
q i =1 Qi =i i=
N
t ij = N N −i
N−j if j i t ij =N
i
j
if ji
mean absorption time
N −1
t i= ∑ t ij =O N
j =1
40. Genetic drift under selection
A A A A A a a a
k N −k
probability proportional
to fitness
A
41. Genetic drift under selection
N −k kfA
P k , k 1=
N k f A N −k f a
k N −k f a
P k , k−1=
N k f A N −k f a
P k , k−1 f a −1
= ≡r
P k , k1 f A
1−r −i
i= −N
1−r
42. Fixation of a mutant allele
under selection
−1
1−r 1−r
A= −N
a = N
1−r 1−r
• If r 1 selection favors A over neutral case
• If r 1 selection favors a over neutral case
43. Diffusion approximation
w t 1=w t P
master equation
w i t 1−w i t =∑ w j t P ji −w i t ∑ P ij
j j
birth-death process
wi t=∑ [ wi ±1 t P i ±1,i −wi t P i ,i ±1 ]
±
44. Diffusion approximation
i 1 2
x≡ w i t ≡N f x , t t≡ x = 2
N N
a x ≡ P i ,i 1−P i , i−1 b x ≡ P i , i1 P i ,i −1
forward Kolmogorov (Fokker-Planck) equation
∂ f x ,t ∂ 1 ∂2
=−N [a x f x , t ] 2
[ b x f x , t]
∂t ∂x 2 ∂x
56. Fitness landscapes
• Metaphor introduced by Wright (1932)
• Representation of fitness of individuals or
population
• Key points:
– Fitness is affected by environment (external
factors)
– Fitness depends on phenotype, which is
determined by genotype (permanent factor)
59. Working example:
1 locus, 2 alleles, random mating
x =[ A ] y =[a ]
Hardy-Weinberg law:
2 2
[AA ]= x [ Aa]=2 x y [aa]= y
f A x = f AA x f Aa y f a x = f Aa x f aa y
x = f AA x 2 f Aa 2 x y f aa y 2
60. Working example:
1 locus, 2 alleles, random mating
dx 1 d x
=x y [ f A x − f a x ]= x y
dt 2 dx
61. Remarks
• First representation is a fundamental one:
– Individuals sit at their genotypic positions
– Population at every position changes in time
• Second representation is not because:
– Depends on evolution law
– Assumes maximization of mean fitness (not
always true; e.g. mutations)
– Can't be generalized to multilocus models
63. Genotype space
# different genotypes for L
loci and A alleles:
G= AL
dimensionality (number of
nearest neighbors):
D=L A−1
e.g. L=100, A=2:
D=100 G≈10 30
L=2 (loci), A=3 (alleles)
64. Hamming distance
a a a L
s =s s 2 ⋯s
d s , s =∑ s , s
1 L a b a b
b b b b i i
s =s s ⋯s
1 2 L i=1
d abc , aBC=2
d Abc ,aBC =3
68. Russian roulette model
Ai
A 1, , A N B j1
B1, , B N
Ai −1 Ai Ai 1
Bj Bj Bj
p viable
Ai
1− p Ai
Bj
inviable B j−1
69. Russian roulette model
2D site percolation
p=0.2 p=0.51 p=0.594
size=65x65 p =0.592746
c
neutral network
70. Russian roulette for sequences
D=L A−1 L ≫1
viable p inviable
1− p
branching process p k =
k
D−1 p k 1− p D −1−k
1 1
E {k }= D−1 p ⇔ pc= ≈
D−1 D
71. More general rugged lanscapes
w2 1
∫w f w d w ⇒ quasi-neutral network
1 D
fitness distribution
72. New metaphor of fitness
landscapes
most evolutionary steps are neutral (Kimura)
81. Some bibliography
• Nowak, Evolutionary Dynamics: Exploring the Equations
of Life (Belknap Press, 2006)
• Ewens, Mathematical Population Genetics (Springer,
2004)
• Durret, Probability Models of DNA Sequence Evolution
(Springer, 2008)
• Gavrilets, Fitness Landscapes and the Origin of Species
(Princeton, 2004)