# Spread of a benign virus in a population over time

This is a somewhat difficult (for me) population dynamics question and I wonder if someone with experience in this area could suggest a reasonable approach?

My simplifying assumptions: As a gross oversimplification, let p(k) be the world's population at generation k, and assume a smooth exponential curve that models p(k) from $k=0$ at 10,0000 B.C.E to generation $k=600$ in 2000 C.E. A generation is 20 years, and in acc. with this Wiki there are about 4 million individuals at $k=0$ and 6070 million at $k=600.$ (Of course the exponential model is bad, as world population growth appears to have been sluggish before recorded history.)

Now assume a benign virus infects 120 individuals in $k=0.$ It benignly infects all individuals who have at least one infected parent. Perhaps unimportantly, it also continues to infect 30 new individuals per million in each generation (because its found in the soil), but would not infect those already exposed.

Call infected individuals II and non-infected NI. They are indistinguishable without clinical tests--which are not done, since the virus is harmless. Since II individuals are almost certain to mate with NI individuals, in earlier generations, the number of II will grow very quickly. For a time the growth rate of II will exceed that of p(k). At some point it will be unlikely that an II individual will encounter an NI mate, however a few NI persons will still pair with NI mates--for a while.

My question is, after 600 generations, what is a reasonable estimate of the percentage of II in the population? Is is possible that there would be any NI individuals left? Or would we have some sort of dynamic equilibrium between II and NI in which (I think) the former would strongly dominate?

FWIW, the population growth model is $p(k)=4e^{0.012 k}$ with $p(k)$ in millions.

• Based on stats from the Wiki article, "Pregnancy from Rape" and the answers given here it seems possible that every human is lineally descended from a sexual assault. – daniel Dec 17 '18 at 10:58

For simplicity, I denote the population of non-infected individuals by $N$ and the infected ones by $I$.

### Model without soil infection

As your phenomenology is generation-based, the best approach would be to make an iterative population-based model. Let’s first forget about the new infections by soil. I will first give you the equations and then explain them: \begin{alignedat}{3} N_{k+1} &= & &g \frac{N_k}{N_k+I_k}N_k & =~& g \frac{N_k^2 }{N_k+I_k},\\ I_{k+1} &= g I_k &~+~&g \frac{I_k}{N_k+I_k}N_k &~=~& g \frac{2N_kI_k+I_k^2}{N_k+I_k}. \end{alignedat}

• $g=\left(\frac{6070}{4}\right)^\frac{1}{600} ≈ 1.012$ is the growth rate per generation.

• $\frac{N_k}{N_k+I_k}$ is the likelihood a given non-infected individual to mate with another uninfected one. Now, we have $N_k$ such individuals and they multiply by $g$ and thus the next generation of non-infecteds is $g \frac{N_k}{N_k+I_k}N_k$.

• Infected–infected matings produce infected offspring regularly, accounting for the $gI_k$ term.

• $\frac{I_k}{N_k+I_k}$ is the likelihood a given non-infected individual to mate with an infected one. Now, we have $N_k$ such individuals and they multiply by $g$ and thus the next generation of infecteds gets an additional $g \frac{I_k}{N_k+I_k}N_k$ individuals.

• Sanity check:

$$g \frac{N_k^2}{N_k+I_k} + g \frac{2N_kI_k+I_k^2}{N_k+I_k} = g (N_k+I_k)$$

### Model with soil infection

Now, let’s add the soil infection to the model. It simply means that each generation another $\frac{30}{1000000}N =: rN$ individuals get subtracted from $N$ and added to $I$:

\begin{alignedat}{3} N_{k+1} &= g \frac{N_k^2 }{N_k+I_k} &~-~& rN_k,\\ I_{k+1} &= g \frac{2N_kI_k+I_k^2}{N_k+I_k} &~+~& rN_k. \end{alignedat}

### Result

With this it is easy to insert your initial conditions and run a simulation, here in Python:

# Parameters
g = (6070/4)**(1/600)
r = 30/1000000
K = 600

# Initial Conditions
I = 120
N = 4000000-I

# Iterate
for k in range(K):
N,I = (
g*N**2/(N+I)-r*N,
g*(2*N*I+I**2)/(N+I)+r*N
)
print(k,N,I)


It shows that there are no non-infected individuals left after 600 generations. In fact, $N$ drops below 1 after generation 17.

### On equilibria

Or would we have some sort of dynamic equilibrium between II and NI in which (I think) the former would strongly dominate?

No, there is no mechanism that somehow favours the non-infected population. But this doesn’t exist: The infected population gets to grow as fast as the non-infected on its own plus infecting parts of the offspring of the non-infected. In fact, as described in the other answer, we can look at the evolution of the fraction $n$ of non-infected individuals in the model without soil infection:

$$n_{k+1} ≡ \frac{N_{k+1}}{N_{k+1}+I_{k+1}} = \frac{g \frac{N_k^2}{N_k+I_k}}{g (N_k+I_k)} = \left( \frac{N_k}{N_k+I_k} \right)^2 ≡ n_k^2$$

The only way that some non-infected individuals survive is if they multiply faster than they are infected, i.e., if: $$g \frac{N_k}{N_k+I_k} = g n_k > 1.$$ Since $\lim_{k→∞}n_k=0,$ this does not work even with an absurdly high growth rate.

To many, many decimal places, the percentage of II in the population is 100%.

To answer this you need to make some assumptions about mating structure. I assume mating is panmictic here for simplicity. Ditto sex ratio, but I'm assuming equal number M/F (and equal risk of environmental infection). Finally, I’m assuming NI and II are at equal risk of soil-borne infection (and infections to II are simply wasted), rather than the environmental reservoir somehow seeking out a fixed proportion of NIs, which I think is probably what you meant. I’m also applying the soil-acquired infection to generation 0 here (so they have a chance to become infected before they mate). Finally, II and NI are more traditionally called $I$ (for infectious) and $S$ (for susceptible) in this type of model, so I've followed that convention below.

Unless I’m missing something the population size makes no difference: the chance of a child acquiring infection does not depend on the number of children, and the background rate of environmental infection is proportional to population size, so it all cancels out. I'll therefore stick to proportions from here on, which means $I$ and $S$ are proportions below, not absolute numbers.

Each generation, the proportion of matings between two $I$s is $I^2$, between two $S$s is $I^2$, and between an S and an I is $2·S·I$. So the proportion of Is in the next generation is $I^2 + 2·I·S$. Or, more simply, $1-S^2$.

So:

• $S(0) = \frac{3,999,850}{4,000,000} = 0.9999625$

• $S(1) = S(0)^2$

• $S(2) = S(1)^2$, which is ${S(0)^2}^2$

More generally, $S(n) = {S(0)^2}^n$

So at generation 600:

$S(600) = {S(0)^2}^{600}$

$2^{600}$ is a very large number. So it shouldn’t be too surprising that everyone is infected by this point.

We can mess around (technical term) with the equation:

$S(n) = {S(0)^2}^n$

...to solve for (for example) how many generations it takes for 50% of the population to be infected:

\begin{alignat}{1} 0.5 &= {0.9999625^2}^n \\ \log(0.5) &= \log(0.9999625)\times2^n\\ \frac{\log(0.5)}{\log(0.9999625)} &= 2^n\\ \log_2\left(\frac{\log(0.5)}{\log(0.9999625)}\right) &= n \end{alignat}

So 50% of your global population is infected by generation 15, only 300 years into the simulation.

however a few NI persons will still pair with NI mates--for a while

The probability of anyone ($S$, or $I$) mating with an $I$ individual is directly proportional to the $I$ proportion of the population, so the chance of this happening just keeps going down faster and faster.

• Both answers here are fine. I am upvoting this and accepting the other (would accept both if I could). A small nitpick is that while you don't mean to say that the number of I gets bigger than the population, you don't explain how growth slows as the number of I gets significant, unless I am missing it. – daniel Feb 12 '18 at 16:20