Takeover times for a simple model of network infection

We study a stochastic model of infection spreading on a network. At each time step a node is chosen at random, along with one of its neighbors. If the node is infected and the neighbor is susceptible, the neighbor becomes infected. How many time steps T does it take to completely infect a network of N nodes, starting from a single infected node? An analogy to the classic “coupon collector” problem of probability theory reveals that the takeover time T is dominated by extremal behavior, either when there are only a few infected nodes near the start of the process or a few susceptible nodes near the end. We show that for N≫1, the takeover time T is distributed as a Gumbel distribution for the star graph, as the convolution of two Gumbel distributions for a complete graph and an Erdős-Rényi random graph, as a normal for a one-dimensional ring and a two-dimensional lattice, and as a family of intermediate skewed distributions for d-dimensional lattices with d≥3 (these distributions approach the convolution of two Gumbel distributions as d approaches infinity). Connections to evolutionary dynamics, cancer, incubation periods of infectious diseases, first-passage percolation, and other spreading phenomena in biology and physics are discussed.


I. INTRODUCTION
Contagion is a topic of broad interdisciplinary interest.Originally studied in the context of infectious diseases [1][2][3][4], contagion has now been used as a metaphor for diverse processes that spread by contact between neighbors.Examples include the spread of fads and fashions [5,6], scientific ideas [7], bank failures [8][9][10][11][12], computer viruses [13], gossip [14], rumors [15,16], and yawning [17].Closely related phenomena arise in probability theory and statistical physics in the setting of first-passage percolation [18,19], and in evolutionary dynamics in connection with the spread of mutations through a resident population [20][21][22][23][24].We will use the language of contagion throughout, but bear in mind that everything could be reformulated in the language of the other fields mentioned above.
In the simplest mathematical model of contagion, the members of the population can be in one of two states: susceptible or permanently infected.When a susceptible individual meets an infected one, the susceptible immediately becomes infected.Even in this idealized setting, interesting theoretical questions remain, whose answers could have significant real-world implications, as we will argue below.
For example, consider the following model, motivated by cancer biology.Imagine a two-dimensional lattice of cells in a tissue, where each cell is either normal or mutated.At each time step a random cell is chosen, along with one of its neighbors, also chosen uniformly at random.If the first cell is mutated and its neighbor is normal, the mutated cell (which is assumed to reproduce much faster than its normal neighbor) makes a copy of itself that replaces the normal cell.In effect, the mutation has spread; it behaves as if it were an infection.This deliberately simplified model was introduced in 1972 to shed light on the growth and geometry of cancerous tumors [25].
Here, we study this model on a variety of networks.Our question is: given a single infected node in a network of size N , how long does it take for the entire network to become infected?We call this the takeover time T .It is conceptually related to the fixation time in population genetics, defined as the time for a fitter mutant to sweep through a resident population.It is also reminiscent of the incubation period of an infectious disease, defined as the time lag between exposure to the pathogen and the appearance of symptoms; this lag presumably reflects the time needed for infection to sweep through a large fraction of the resident healthy cells.
For the model studied here, the calculation of the network takeover time is inherently statistical because the dynamics are random.At each time step, we choose a random node in the network, along with one of its neighbors, also at random.If neither of the nodes are infected, nothing happens and the time step is wasted.Likewise, if both are infected, the state of the network again doesn't change and the time step is wasted.Only if the first node is infected and its neighbor is susceptible does the infection progress, as shown in Figure 1.
The time course of the infection is interesting to contemplate.Intuitively, when the network is large, it seems that the dynamics should be very stochastic at first and take a long time to get rolling, because it is exceedingly unlikely that we will randomly pick the one infected node, given that there are so many other nodes to choose from.Similarly we expect a dramatic slowing down and enhancement of fluctua- neighbor chosen in (c) happens to be susceptible, as is the case here; then the state of the network is updated accordingly as in (d).Otherwise, if the node is not infected or the neighbor is not susceptible, nothing happens and the state of the network remains unchanged.In that case the time step is wasted.
tions in the endgame.When a big network is almost fully infected, it becomes increasingly difficult to find the last few susceptible individuals to infect.These intuitions led us to suspect that the problem of calculating the distribution of takeover times might be amenable to the techniques used to study the classic "coupon collector" problem in probability theory [26,27].If you want to collect N distinct coupons, and at each time step you are given one coupon at random (with replacement), what is the distribution of the time required to collect all the coupons?Like the endgame of the infection process, the coupon collection process slows down and suffers large fluctuations when almost all the coupons are in hand and one is waiting in exasperation for that last coupon.Erdős and Rényi proved that for large N , the distribution of waiting times for the coupon collection problem approaches a Gumbel distribution [28].This type of distribution is right skewed, and is one of the three universal extreme value distributions [29,30].
In what follows, we will show that for N 1, the takeover time T is distributed as a Gumbel for the star graph, and as the sum of two Gumbels for a complete graph and an Erdős-Rényi random graph.For d-dimensional cubic lattices, the dependence on d is intriguing: we find that T is normally distributed for d = 1 and d = 2, then becomes skewed for d ≥ 3 and approaches the sum of two Gumbels as d approaches infinity.We conclude by discussing the many simplifications in our model, with the aim of showing how the model relates to more realis-tic models.We also discuss the possible relevance of our results to fixation times in evolutionary dynamics, population genetics, and cancer biology, and to the longstanding (yet theoretically unexplained) clinical observation that incubation periods for infectious diseases frequently have right-skewed distributions.

II. ONE-DIMENSIONAL LATTICE
We start with a one-dimensional (1D) lattice.In this paper, we will always take lattices to have periodic boundary conditions, so imagine N nodes arranged into a ring.
Suppose that m nodes are currently infected.Let p m denote the probability that a susceptible node gets infected in the next time step.Notice that for a more complicated graph, p m might not be a welldefined concept, because it could depend on more than m alone: the probability of infecting a new node could depend on the positions of the currently infected nodes, as well as on the susceptible node being considered.In such cases, we would need to know the entire current state of the network, not just the value of m, to calculate the probability that the infection will spread.
The 1D lattice, however, is especially tractable.Assuming that only one node is infected initially, at later times the infected nodes are guaranteed to form a contiguous chain.So for this simple case the graph state is indeed determined by m alone.The only places where the infection can spread are from the two ends of the infected chain.(Even on more complicated networks, the dynamics of our model imply that the infected nodes always form contiguous regions, but few are as simple as this.) The spread of infection involves two events.First, the node chosen at random must lie on on the boundary of the infected cluster.Then, one of its neighbors that happens to be susceptible must be picked.So p m = (Prob.of selecting node on boundary) × (Prob. of selecting susceptible neighbor) .
Hence, for the ring, the probability that the infection spreads on the next time step reduces to Next, define the random variable X m = X(p m ) as the number of time steps during which the network has exactly m infected nodes.The probability that this state lasts for k time steps is then given by for k = 1, 2, . . ., where q m := 1 − p m .To see this, note that P (X m = k) is the probability that no new infection occurs on the first k − 1 steps, times the probability that infection does occur on step k.Thus, for any network where p m is well defined, the time spent with m infected nodes is a geometric random variable, with mean 1/p m and variance 1/p 2 m − 1/p m .In particular, since the ring has p m = 1/N for all m, we find that X m has mean N and variance N 2 − N in this case.
The takeover time for any network is the sum of all the individual times required to go from m to m+1 infected nodes, for m = 1, . . ., N −1.
(Equality, in this case, means equality in distribution, as it will for all the other random variables considered throughout this paper.) In the case of the 1D lattice, all the X m are identical.However, their means and variances depend on N , which prevents us from invoking the usual Central Limit Theorem to deduce the limiting distribution of T .However, we can invoke a generalization of it known as the Lindeberg-Feller theorem.See Appendix A for more details.
After normalizing T by its mean, µ = N (N − 1), and its standard deviation, σ = (N − 1) √ N , we find where the symbol d − → means convergence in distribution as N gets large.Figure 2 confirms that the takeover times are normally distributed in the limit of large rings.

III. STAR GRAPH
A star graph is another common example for infection models.Here, N separate "spoke" nodes all connect to a single "hub" node and to no others, as illustrated in the upper left of Figure 3.We will assume the initial infection starts at the hub, since starting it in a spoke node would require only a trivial adjustment to the calculations below.
Let m be the number of spoke nodes that are currently infected.As in the ring case, p m (the probability to go from m to m + 1 in the next time step) is a well-defined quantity that depends on m alone, and not on any other details of the network state.Using the logic of Eq. (1), we get for m = 0, 1, . . ., N − 1.Here, 1/(N + 1) is the probability of choosing the infected hub as the first node, and (N − m)/N is the probability of selecting one of the N − m currently susceptible spoke nodes, out of the N spoke nodes in total, as its neighbor.Now that p m is in hand for the star graph, we can define the random variable X m and the takeover time T just as we did for the one-dimensional ring.The only difference is that the m-dependence of p m is now controlled entirely by the factor (N − m)/N .
That same factor turns up in a classic probability puzzle called the coupon collector's problem [26,27].At the time of this writing, millions of children are experiencing it firsthand as they desperately try to complete their collection of pocket-monsters in the Pokémon videogame series.
To see the connection, suppose you are trying to collect N distinct items, and you have m of them so far.If you are given one of the N items at random (with replacement), the probability it is new to your collection is (N − m)/N , the same factor we saw above, and precisely analogous to the probability p m of adding a new node to the infected set.Likewise, the waiting time to collect all N items is precisely analogous to the time T needed to take over the whole star graph.The only difference is the constant factor 1/(N + 1) in Eq. ( 3).
The limiting distribution of the waiting time for the coupon collector's problem is well known.Although it resembles a lognormal distribution [31], in fact it is a Gumbel distribution in the limit of large N , given the right scaling [27,28,32,33].We will now show that the same is true for our problem.
The first move is to approximate the geomet-ric random variables X(p m ) by exponential random variables E(p m ), with density From here we define the random variable F := where the symbol "∼" means the ratio of characteristic functions goes to 1 as N gets large.That is, the random variables on both sides converge to each other in distribution as N gets large.
In the traditional coupon collector's problem we would take L = N ; but because of that (N + 1) factor, what we want is L = N (N + 1).Thanks to the fact we are now using exponential variables, we now know A nice closed form for the distribution of the sum of a collection of distinct exponential variables is known [24,33], but for convenience's sake we rederive it in Appendix C. When we have any finite N we can simply write the relevant distribution function g N (x) for x ≥ 0 as which can be manipulated into From here, we can find the distribution for (F − µ)/L, and (T − µ)/L by extension.Therefore, taking the limit of large N and using the standard approximation of the harmonic sum for µ gives us as the density, where γ ≈ 0.5772 is the Euler-Mascheroni constant.The density in ( 5) is a special case of the Gumbel distribution, denoted Gumbel(α, β) and defined to have the density Specifically, we find where G is a Gumbel random variable distributed according to Gumbel(−γ, 1).This distribution can be tested against simulation, and it works nicely as seen in Figure 3. Gumbel distributions have arisen previously in infection and birth-death models [24,34,35], and are well known in extreme-value theory [26,29,30], but the fact that they show up here as a result of a network topology is unexpected.

IV. COMPLETE GRAPH
The complete graph on N nodes corresponds to a "well-mixed population" and is one of the most common topologies in infection models.This network consists of N mutually connected nodes, so the location of the initial infection does not matter.
Given m infected nodes, we once again have a welldefined p m .Using the concept behind Eq. ( 1), we find for m = 1, . . ., N − 1.For the sake of convenience, we will collect these probabilities into a vector p = (p m ) N m=1 .As in the case of the star graph, we can approximate the takeover time T by summing exponential random variables instead of geometric ones.So To compress notation, we defined S(p) to be the normalized sum of exponential random variables across the entries of the vector p.The specific p in Eq. ( 8) has some helpful symmetry.Notice that if k = N − m, then This symmetry means that the second half of the takeover looks just like the first half played backwards.If we set p (f ) to be the front half of the p-vector and p (b) to be the back half of p, then we know Because we have a symmetry and the order we add the individual exponential variables will not matter, the random variables S(p (f ) ) and S(p (b) ) should be equal in distribution.Although N being odd or even may seem to be distinct cases, we will find that the distinction does not matter.
The basic concept here is to compare p (f ) and p (b) to r, where r = (m/N ) N m=1 .The sequence of r m represents the probabilities corresponding to a coupon collector's problem.It is therefore known that where G is distributed as Gumb(−γ, 1), as described in Section III.On the complete graph, we can rewrite p m (the probability of going from m infected nodes to m + 1 on the next time step) as p m = r m (1 − m ), where m = (m − 1)/(N − 1).So for N m, the p m 's resemble the r m 's quite closely.Therefore both the front tail of p (f ) and the back tail of p (b) look suspiciously like coupon collector's processes.By this logic, we expect the total time to take over the complete graph should be just the sum of two coupon collector's times.That is, we suspect that T is the sum of two Gumbel random variables.
There are a few hangups with this intuitive argument: 1. p (f ) and p (b) are about half the length of r.
2. p m doesn't quite equal r m at small m.
Addressing the first hangup involves, once again, the front tails of these vectors.Each E(p m ) has a stan-dard deviation of 1/p m , which tells us that the smallest values of p m are the strongest drivers of the final distribution.
The fact that the events at low populations (of either infected or susceptible types) strongly determine most of the random fluctuations is something that has shown up in other evolutionary models, especially with selective sweeps [36].So if we were to just truncate both p (f ) and r at some point, we should expect the limiting distributions of S(p (f ) ) or S(r) to not substantially change.We formalize this idea in Appendix D, and find that it works out nicely.
We have a lot of options about where to truncate, but a useful truncation point is The expression z simply means we round z down to the nearest integer.If we define then we have and Addressing the second hangup mostly involves formalizing m as a rather small number.The details are outlined in Appendix E, where we find that S(r (T ) ) ∼ S(p (T ) ). ( From here we can daisy-chain the previous numbered equations in this section together and find that This means that we successfully piggy-backed on the result for star graphs to find that the resulting distribution for the complete graph is just a sum of two Gumbel random variables.The sum of two Gumbels has appeared previously in mathematically analogous places [18,37].However our use of the coupon collector's problem makes for a quick conceptual justification.Figure 4 compares the takeover time distribution seen in simulations against the predicted distribution Gumbel(−γ, 1) Gumbel(−γ, 1), and we see that this double-coupon logic works out well.

V. D-DIMENSIONAL LATTICE
As we did with the one-dimensional lattice, in our analysis of d-dimensional lattices we will assume This means that all our previous approaches will not work well here.However, this does not bar us from making guesses based on reasonable approximations.
Although we could potentially get all kinds of weirdly-shaped clusters of infected nodes, that should not happen in expectation.Think back to the definition of our infection dynamics and Eq. ( 1).New infectees are added when a node on the boundary of the infected cluster gets randomly selected, and then one of its susceptible neighbors gets randomly selected and catches the infection.
Intuitively, it sounds like we have an expanding blob of infected nodes, with the expansion happening uniformly outward on every unit of surface area.This is a recipe for making sphere-like blobs in d dimensions, at least at the start of the dynamics.As seen from the top half of Figure 5, this looks plausible in two dimensions.
The exact nature of this shape is actually a notoriously hard unsolved question.As we pointed out, there is a link between our infection model and first passage percolation on a lattice [19].In that context, there is a rich literature surrounding questions about the nature of this cluster, but formal proofs of many of its properties have turned out to be difficult.However, convexity appears to be typical in the large size limit, and surface fluctuations should be relatively small [19].Moreover, there is good reason to believe that on the two-dimensional (2D) lattice, the boundary of the expanding cluster is a one-dimensional curve, which will come in handy later [38].
In any case, since the lattice is periodic, this infected cluster will keep expanding.This means that at the end of the dynamics, we should expect for the majority of susceptible nodes to also be in a single cluster, with insignificant enclaves elsewhere.This is borne out in simulations, as shown in the bottom half of Figure 5.If we focus on this majority susceptible cluster, we see that the end of the dynamics looks like a uniformly shrinking cluster of susceptible nodes, which is approximately the reverse of the uniformly growing infected cluster at the start.So, the beginning and end of the dynamics look similar once again, as they did for the complete graph.
More importantly, since this is a d-dimensional lattice, we can guess the surface area of these blobs.For a shape with a length-scale of R, we typically expect volume to scale as R d and surface area to go as R d−1 .So given an infected cluster of m nodes, we expect it to have a surface area proportional to m (d−1)/d .Assuming some uniformity, we should get that the typical probability of infecting a new node should be proportional to m η /N at the start of the dynamics, where the exponent η is given by And just as in the case of the complete graph, this process at the start gets repeated backwards at the end.This heuristic argument suggests that the total time to takeover should look like the sum of geometric variables X(p m ), where The fact that we only got a grip on p m up to a proportionality should not worry us.After all, that did not stop us when we worked through the star graph case earlier; back then we argued that such a proportionality constant would simply show up in the scaling factor in the denominator.If we treat this as a numerical problem, we do not need to explicitly find the scaling factor.Instead, we can examine (T − µ)/σ, where µ and σ are empirically obtained values for the average and standard deviation of T respectively.Then any proportionality constants just get absorbed by the anonymous σ.This reasoning further suggests that for N suffi- ciently large, where ) is just the variance of the sum of geometric variables.But we already know how to approximate sums of geometric random variables.We can follow a similar procedure of truncation and perturbation as in the case of the complete graph.Assuming Eq. ( 18) is correct, we get where we define and for the sum of variances.
The truncation point M is some increasing function of N , which can normally just be set to M = N .In the limit of large N , the distinction does not really matter.However, it seems frequently possible to tune M to get a good fit on finite-N cases, as the simulations of the 3D lattices in Figure 6 suggest.
In principle, we could try to use Eq.(C1) to get a finite-N estimate for this distribution.However, we do not expect any of these distributions to have a large-N limit as easy as in the case of the star graph, nor for any of these distributions to have a name.For practical purposes, we can just simulate the right hand side of Eq. ( 20) directly, since generating and adding a large number of exponential variables is rather fast.

The Critical Dimension
Naively, we might expect the limiting distribution of F to always be something between a Gumbel and a normal distribution.After all, d = 1 implies η = 0, which returns us to identical variables and the 1D ring, giving us the standard normal.Meanwhile, d → ∞ implies η → 1, which returns us to the coupon collector's problem and the star graph, giving us the Gumbel.Incidentally, this argument suggests that the infinite-dimensional lattice has similar behavior as the complete graph under these dynamics.In between these extreme cases, we might expect the intermediate d's to correspond to a family of intermediate distributions.
While this is generally true, there is a surprising caveat to be made about the case of d = 2.Even though all the summands (E(m η ) − 1/m η )/ √ H are distinct, they start to resemble each other once N gets sufficiently large.
For d = 2, Eq. ( 16) gives η = 1/2, which means that H in Eq. ( 21) is the harmonic series.This H diverges with N , giving each summand (E(m η ) − 1/m η )/ √ H a large denominator, and thus a small variance about a mean of zero.So, even though the summands are not identical random variables, they will become rather similar as we take N to be large, suggesting that an improved version of the central limit theorem may apply.This intuition is confirmed by a careful analysis in Appendix F, showing that the Lindeberg-Feller theorem applies in this case.
Thus we predict a normal limiting distribution of F in the specific case of the 2D lattice: as N → ∞, for d = 2.This prediction is borne out in simulation, as shown in Figure 7.However, no dimension higher than d = 2 can yield normally distributed takeover times.For each of d = 3, 4, 5, . .., the distribution of F will converge to a distinct limiting distribution between a normal and a Gumbel, as we initially suspected.The important distinction between d = 2 and d > 2 is that in the latter, H always converges to a finite number.Because of that, F will always have a nonzero third moment, preventing it from converging to a standard normal.For more details, see Appendix G.

VI. ERD ŐS-R ÉNYI RANDOM GRAPH
Unlike all the previous graphs we have seen, an Erdős-Rényi graph is randomly constructed.We start off with N nodes, and add an edge between any two with some probability 0 < ρ ≤ 1.In this section, we will condition on the graph being connected, so that complete takeover is always possible.
There is a good history of using generating functions to analyze desired properties on a random graph, including for various infection models [39][40][41].But since we just finished analyzing the general lattice case, we can take another road.
Recall the central observation that let us recast T as a sum of geometric random variables.That train of logic only really involved the graph having a well-defined dimension d.If we could define the dimension for other kinds of graphs, then all our observations from the previous section would simply carry over.
Imagine taking a cluster of m nodes on an Erdős-Rényi graph.What is the surface area of said cluster?Well, in expectation, the m nodes are externally connected to O(pN ) nodes, for m N .So as N gets large, the number of external neighbors in any cluster gets large as well, regardless of m.This is suggestive of an infinite-dimensional topology.
So, by collecting results from Eqs. ( 19) and ( 15), we can guess the limiting distribution of the takeover times T .Defining µ and σ to be the empirical mean and standard deviation of T , we find where G is a Gumbel random variable with a mean of zero and a variance of 1/2.One can check that the corresponding distribution for G is Gumbel(−γ √ 3/π, √ 3/π).We experimentally tested Eq. ( 23) by fixing a randomly generated Erdős-Rényi random graph, along with a seed at which the infection always started.Then we ran a million simulations of the stochastic infection process and compiled the observed distribution of takeover times.(The reason we fixed the graph beforehand was to avoid sampling multiple different values of µ and σ over different realizations of the random graph.)The results of the experi- Erdős-Rényi random graph on N = 600 nodes with an edge probability of ρ = 0.5.Simulation results were compiled from 10 6 runs, all using the same realization of the random graph and all with the initial infection starting at the same node.The solid line was generated numerically by adding 5 × 10 6 pairs of Gumbel(−γ √ 3/π, √ 3/π) random variables together.Similarly, µ and σ 2 are the numerically calculated mean and variance of T .ment were consistent with our prediction, as shown in Figure 8.

VII. DISCUSSION
A. Relation to other models

Infection models
The model studied in this paper is intentionally simplified in several ways, compared to the most commonly studied models of infection.The purpose of the simplifications is to highlight how one aspect of the infection process -its network topology -affects the distribution of takeover times.However, the update rule also plays an important role.The assumptions we have made about it therefore deserve further comment.
Assumption 1: The infection is infinitely transmissible.When an infected node interacts with a susceptible node, the infection spreads with probability one.In a more realistic model, infection would be transmitted with a probability less than one.
Assumption 2: The infection lasts forever.Once infected, a node never goes back to being susceptible, or converts to an immune state, or gets removed from the network by dying.The dynamics of these more complicated models, known as SIS or SIR, have been studied on lattices and networks by many authors; for reviews, see [3,4].
Assumption 3: The update rule is asynchronous.In other words, only one link is considered at a time.By contrast, in a model with synchronous updating, every link is considered simultaneously.
If the infection is further assumed to be infinitely transmissible, then at each time step every infected node passes the infection to every one of its susceptible neighbors.Such a infection, akin to the spreading of a flood or a wildfire, would behave even more simply than the process studied here.In fact, it would be too simple.The calculation of the network takeover time would reduce to a breadth-first search and its value would be bounded above by the network's diameter.Note, however, that if the infection has a probability less than one of being transmitted to susceptible neighbors (such as in the original 1type Richardson model [42]), the system becomes nontrivial to analyze [19,42].

Models of evolutionary dynamics
More recently, the field of evolutionary dynamics [43] has been extended to networks, and the field of evolutionary graph theory was born [20].In general, the results in this field depend on modeling the spread of a mutant population using the Moran process [43,44].(Our model can be viewed as a limiting case of the Moran birth-death process, in the limit as the mutant fitness tends to infinity.)A number of important and interesting results have come from these studies of Moran dynamics, including the existence of network topologies that act as amplifiers of selection [45], increasing the probability of takeover, and also topologies that shift the takeover times we are considering [46].
For example, working in the framework of evolutionary graph theory, Ashcroft, Traulsen, and Galla recently explored how network structure affects the distribution of "fixation times" for a population of N individuals evolving by birth-death dynamics [24].The fixation time is defined as the time required for a fitter mutant (think of a precancerous cell in a tissue) to sweep through a population of less fit wild-type individuals (normal cells).Initially, a single mutant is introduced at a random node of the network.At each time step, one individual is randomly chosen to reproduce.With probability proportional to its fitness, it gives birth to one offspring, and one of its network neighbors is randomly chosen to die and be replaced by that offspring.The natural questions are: What is the probability that the lineage of the mutant will eventually take over the whole network?And if it does, how long does it take for this fixation to occur?
The calculations are difficult because there is no guarantee of mutant fixation (in contrast to our model, where the network is certain to become completely infected eventually).In the birth-death model, sometimes by chance a normal individual will be chosen to give birth, and its offspring will replace a neighboring mutant.If this happens often enough, the mutant population can go extinct and wild-type fixation will occur.Using Markov chains, Hindersin and colleagues provided exact calculations of the fixation probability and average fixation times for a wide family of graphs, as well as an investigation of the dependence on microscopic dynamics [22,23,47,48].A challenge for this approach is that the size of the state space becomes intractable quickly: even with sparse matrix methods, it grows like N 2 N [47].For networks of size N < 23, their computations showed that the distributions of mutant fixation times were skewed to the right, much like the Gumbels, sums of Gumbels, and intermediate distributions found analytically and discussed here in Sections III to VI.

First-passage percolation
Our infection model is also closely related to firstpassage percolation [18,19].The premise behind this family of models can be described as follows: given a network, assign a random weight to each edge.By interpreting that weight as the time for an infection to be transmitted across that edge, and by choosing properly tuned geometric (or, more commonly, exponential) random variables as the edge weights, we can recreate our infection model.
Notice that percolation defines a random metric on the network, meaning that inter-node distances change from one realization to another.This leads to a number of natural questions.The most extensively studied is the "typical distance," quantified by the total weight and number of edges on the shortest path between a pair of random nodes [49][50][51].It is also possible to analyze the "flooding time" [37,52], defined as the time to reach the last node from a given source node chosen at random.This quantity is the closest analogue, within first-passage percolation, of our takeover time.Indeed, a counterpart of our result for two Gumbels in the Erdős-Rényi random graph was obtained previously using these techniques [37].However, we are unaware of floodingtime counterparts of our results about the takeover times for d-dimensional lattices.
Another natural question in first-passage percolation involves finding the long-time and large-N lim- x Density FIG.9: Normalized distribution of takeover times for an Erdős-Rényi random graph on N = 600 nodes with an edge probability of ρ = 0.5, obtained from 10 6 simulation runs.For the sake of convenience, each T is rescaled to have a mean of 0 and a variance of 1.The left panel shows the normalized times required to infect 90% of the population, while the right shows the times for complete takeover.Here, the convolution of two Gumbel distributions plotted on the right was generated using 5 × 10 6 samples.
iting shape of the infected cluster.More precisely, given a fixed origin node, we can identify all nodes that can be reached from the the origin within a total path-weight of t or less.This amounts to finding all the nodes that have been infected by the origin within time t, a problem that percolation theorists have typically studied in d-dimensional lattices.We saw an instance of such an expanding cluster in Section V.In a general number of dimensions, the provable nature of this shape may be complicated; the fluctuations of its boundary are thought to depend on the KPZ equations [19,53,54].The limiting shape is not typically a Euclidean ball, but it has been proven to be convex; see [18,19] for an introductory discussion of these issues.In Figure 5, the nature of this cluster's complement in a large torus was of concern to us, but that issue has not yet attracted mathematical attention, as far as we know.

B. Applications to medicine: epidemic and disease incubation times and cancer mortality
For more than 100 years, there have been intriguing empirical observations of "right-skewed" distributions in a remarkably wide range of phenomena related to disease [55][56][57][58][59]. Examples include withinpatient incubation periods for infectious diseases like typhoid fever [55,56], polio [58], measles [60] and acute respiratory viruses [61]; exposure-based outbreaks like anthrax [62] (see [61,63] for more recent reviews); rates of cancer incidence after exposure to carcinogens [64]; and times from diagnosis to death for patients with various cancers [65] or leukemias [66].
The relationship between these phenomena and our model is intuitive: most of these processes depend on some sort of agent (a mutant cell, a virus, or a bacterium) invading and taking over a population, something which typically proceeds one "interaction" at a time.And as we have seen, our simple infection model automatically generates right-skewed distributions like Gumbels, sums of Gumbels, and intermediate distributions via a coupon-collection mechanism, for many kinds of population structures.So could it be that the right-skewed distributions so often seen clinically are, at bottom, a reflection of this same mathematical mechanism, a manifestation of an invasive, pathogenic agent spreading through a network of cells or people?
To test the plausibility of this idea, we need to amend our model slightly.Until now we have focused exclusively on the time T to total takeover of a network.But in most scenarios related to disease, total takeover is not the relevant consideration.Sufficient takeover is what matters.For example, a patient need not have every single one of their bone marrow stem cells replaced by leukemic cells before they die from leukemia.Death presumably occurs as soon as some critical threshold is crossed -which is probably the case for diseases with infectious etiologies as well.So let us now check whether changing the criterion from total takeover to partial takeover changes our results, or not.

Times to partial takeover: truncation
Define T θ to be the time for θN out of N members to be infected, with the interesting range of θ's being 0.5 ≤ θ < 1.0.For the sake of example, consider the complete graph as our network topology, so we have p m = (m/N )(1 − (m − 1)/(N − 1)).
As in the analysis for the complete takeover times, we can split T θ into a front and back part T (f ) and T (b) , with the front covering up to about N/2 and the back covering the remaining.Then where µ (f ) is the mean of T (f ) , and µ (b) and σ (b) are the mean and standard deviation of T (b) .However, it is easy to show that σ 2 (b) /N 2 converges to 0 as N gets large, regardless of θ.So we expect the distribution of T θ in this case to asymptotically approach a Gumbel.As seen in Figure 9, similar results hold for Erdős-Rényi random graphs, even for θ = 0.90.
Thus, for complete graphs and Erdős-Rényi random graphs, the right-skewed distributions for complete takeover persist when we relax the criterion to partial takeover.In that respect our results seem to be robust.
The resilience of the Gumbel distribution is important to appreciate.As pointed out by Read [31], a Gumbel distribution can be impersonated by a properly tuned 3-parameter lognormal distribution; see Appendix H for further details.A 3-parameter lognormal distribution has a density function It is this 3-parameter lognormal distribution that has been frequently noted in empirical studies of disease incubation times.Originally proposed and elaborated by Sartwell [57][58][59] as a curve-fitting model, its seeming generality has led to it being called "Sartwell's Law."But it has always lacked a theoretical underpinning.Even recent reviews consider the origin of lognormal incubation times to be unresolved [63].In contrast, Gumbel and related distributions arise very naturally from the model studied here and from other infection models [34,35], and may provide a more suitable theoretical foundation than lognormals in that sense.
he spreading dynamics of processes on realistic, spatial topologies, Lieberman et al. introduced the field of 'evolutionary graph theory'.Notice m = (m − 1)/(N − 1) = O N −1/2 in the range of m's in the product, and is therefore small.We go through some Taylor expansions and cancellations, and using R j to represent functions of small magnitude, we find The first term can be once again turned into an exponential (thanks to the smallness of ), and so we get Therefore, we get convergence to 1 if the sum converges to 0 as N gets large.But this sum is easy to bound from above.That is, This means we get that φ/ φ → 1, implying that the truncated sum for the complete graph converges to the truncated distribution for the coupon collector's problem.

( a )FIG. 1 :
FIG. 1: Simple model of infection spreading on a network.(a) A typical current state of the network is shown.Filled dots represent infected nodes, and open dots represent susceptible nodes.Links represent potential interactions.(b) At each time step, a random node is selected.(c) One of the node's neighbors is also selected at random.The infection spreads only if the node chosen in (b) happens to be infected and itsneighbor chosen in (c) happens to be susceptible, as is the case here; then the state of the network is updated accordingly as in (d).Otherwise, if the node is not infected or the neighbor is not susceptible, nothing happens and the state of the network remains unchanged.In that case the time step is wasted.

FIG. 2 :
FIG. 2: Distribution of takeover times for 1D lattices with N = 750 nodes, obtained from 10 6 simulations.The mean takeover time is µ = N (N − 1) and its variance is σ 2 = N (N − 1) 2 , both found analytically.The simulation results are well approximated by a normal distribution, as expected.The diagram in upper left schematically shows a 1D lattice.

FIG. 3 :
FIG. 3: Distribution of takeover times for a star graph with N = 120 spoke nodes, obtained from 10 6 simulation runs.The mean µ and characteristic width L are given by µ = (N + 1)(N ) N m=1 1/m and L = N (N + 1).The numerically generated histogram of takeover times closely follows the predicted Gumbel distribution, even for the small N used here.The schematic diagram in upper left shows a star network.

which has mean µ = N − 1 m=0 1 /
p m .It can be shown (see Appendix B) that for a large class of p m and normalizing factors L := L(N ) that

FIG. 4 :
FIG. 4: Distribution of takeover times for a complete graph with N = 450 nodes.The histogram is based on 10 6 simulation runs.The mean takeover time is µ = N −1 m=1 1/p m exactly.Here, the numerically generated distribution fits closely to the convolution of two Gumbel distributions, produced using 5 × 10 6 samples.The schematic diagram in the upper left shows a complete graph.

FIG. 5 :
FIG. 5: Snapshots of our infection dynamics on a two-dimensional (2D) periodic cubic lattice.Black pixels show infected nodes, and grey pixels show susceptible nodes.The top panel shows a snapshot near the beginning of the dynamics, and the bottom panel shows a snapshot near the end.Notice how the blob of infected nodes in the top panel has a fairly simple shape, and most of the susceptible nodes lie in a single cluster in the bottom panel.

FIG. 6 :
FIG. 6: Distribution of takeover times T for a 3D lattice with a side length of n = 15.The numerically generated distribution is based on 10 6 simulation runs.The solid line shows the distribution of (F + F )/ √ 2, with F being summed up to M = 40 and using 5 × 10 6 repetitions.The empirical quantities µ and σ 2 are the numerically calculated mean and variance of T .The schematic diagram in the upper left shows a 3D lattice.

FIG. 7 :
FIG. 7: Distribution of takeover times T for a 2D lattice with a side length of n = 100.The numerical results are obtained from 1.5 × 10 5 simulations.The solid line is the standard normal distribution.The empirical quantities µ and σ 2 are the numerically calculated mean and variance of T .The schematic diagram in the upper left shows a 2D lattice.

FIG. 8 :
FIG.8: Distribution of takeover times T for an Erdős-Rényi random graph on N = 600 nodes with an edge probability of ρ = 0.5.Simulation results were compiled from 10 6 runs, all using the same realization of the random graph and all with the initial infection starting at the same node.The solid line was generated numerically by adding 5 × 10 6 pairs of Gumbel(−γ √ 3/π, √ 3/π) random variables together.Similarly, µ and σ 2 are the numerically calculated mean and variance of T .