## Abstract

Random walkers on a two-dimensional square lattice are used to explore the spatio-temporal growth of an epidemic. We have found that a simple random-walk system generates non-trivial dynamics compared with traditional well-mixed models. Phase diagrams characterizing the long-term behaviors of the epidemics are calculated numerically. The functional dependence of the basic reproductive number \(R_{0}\) on the model’s defining parameters reveals the role of spatial fluctuations and leads to a novel expression for \(R_{0}\). Special attention is given to simulations of inter-regional transmission of the contagion. The scaling of the epidemic with respect to space and time scales is studied in detail in the critical region, which is shown to be compatible with the directed-percolation universality class.

## Introduction

Classic epidemiological models^{1,2} often assume panmictic populations: every infected person has an equal chance to affect any other person in the population. While these models have been successful in describing an ideal dynamics of epidemic spread, they do not account for inhomogeneity: an infected person has higher probability to transmit the disease to a member of their household^{3,4} or to a person in their locale. The overall reduction of long-distance travel due to the COVID-19 pandemic makes the latter cause of inhomogeneity especially relevant: many infected persons (but not all) spread the infection only in their immediate vicinity. Likewise, the local neighborhoods of both susceptible and infected persons are dynamic—they vary in space and time depending on the local state of the epidemic. These spatio-temporal inhomogeneities are studied in this paper.

Research into models of spatial epidemiology have produced a number of approaches to the limitations of well-mixed models^{5,6,7,8,9}. These works range from exploring known social networks^{7} to looking at possible policy responses to the current pandemic^{5}. The current paper focuses on a simple random-walk model that lends itself to analytical analysis, in order to explore epidemic properties that arise in the presence of simple spacial dynamics.

There are two approaches to geographical inhomogeneity: detailed analyses based on contact-tracing and mobility data^{10,11}, or analyses based on stylized models^{4,12,13}. The first approach, while potentially highly accurate, requires a large number of parameters and is not robust with respect to unforeseen changes in mobility patterns. The second approach, in contrast, requires a small number of well-defined parameters and provides a sound intuition about their effects on the outcome. It is especially useful when planning interventions and policy changes, or investigating various “what if” scenarios. It is the latter approach that we have taken here.

In the present paper, we treat a very simple model: a random walker (modeled on an infected person) takes \(\tau\) steps (a positive integer) on a 2D square lattice. After each step, the visited site can become infected with probability *p*. In this case, at the site of the new infection, it branches off another random walker, also with lifetime \(\tau\), that can also further spread the contagion to further sites, and so on. We study the resulting epidemic in space and time.

This model depends on two parameters: \(\tau\), representing the length of time of the infectious period, and *p*, representing the infectiousness. It also depends on the “walking pattern”, which may include steps to the neighboring sites or jumps to more distant locations.

Panmictic models predict that the spread of epidemics depends only on the basic reproduction number \(R_0\), the number of infected persons produced by one walker in a fully susceptible population, which, in turn, can be estimated in the panmictic approximation as

We will refer to this estimate as the *naïve approximation*.

However, the random-walk model exhibits a surprisingly rich behavior, well beyond the “naïve approximation” above. We will show that the spread of the epidemics depends on the interplay between *p* and \(\tau\). Moreover, the detailed geometry of the epidemics depends on the stochasticity of individual walks and the nature of random walks on the plane. In subsequent sections, we describe our model in full, study its behavior using numerical simulations and theory, and draw conclusions for real-world epidemics.

## Model

We model the geographic distribution of the population by an infinite 2D square lattice. At any given time, each site can be in one of three states. Although the model proposed here is fundamentally different than an SIR model, the same nomenclature is adopted; namely, each site in the lattice is either *susceptible*, *infected*, or *removed*. (Fig. 1). All sites are initialized as susceptible, with the exception of the origin which contains a single infectious agent. An infected site generates a brand new random walker, which starts to move on the lattice. If the walker lands on a susceptible site (sites are represented as square cells in the figure), it infects it with probability *p*. The infected site starts a new walker and itself becomes removed (no longer susceptible to infection). After \(\tau\) steps, the walker recovers and no longer infects other sites. The label “removed” is used in the same manner as in well-mixed SIR models; these sites are not physically removed from the lattice but instead removed from the population of susceptible sites and can no longer be infected.

Thus, there are two fundamental parameters that control the outbreak: *p*, the probability of infection; and \(\tau\), the number of steps for which an infective agent (walker) is active before recovering.

Another feature of the model is the way the infectious agent chooses its next move. The model is quasilocal: most of the time the walker moves to one of the eight adjacent sites, but sometimes it makes a longer jump. Namely, if the walker is at \(\mathbf {r}_0=(x_0, y_0)\), its next location, \(\mathbf {r}\), is given by

with *u* and \(\theta\) drawn from uniform distributions:

Here \(\lfloor X\rfloor\) is the integer part of *X* (the largest integer number not exceeding *X*), and *U*(*a*, *b*) is the uniform distribution in the interval [*a*, *b*]—the nodes of the lattice have integer coordinates, but our walkers move on the dual lattice, consisting of the centers of the elementary cells. This function produces a one-step walk to one of the eight adjacent sites approximately 66.8% of the time; 95.7% of jumps are within a distance of 2 sites. The random-variate generator for the jump distances *r* in Eq. (2) is derived from a probability density function of the form \(\phi (r)=A/r^4\), where the constant *A* is of order the lattice constant cubed \(a^3\) (in this paper, \(a=1\) is chosen throughout). Our choice of this kernel seeks a balance, allowing for discrete jumps and generating more interesting dynamics than simple diffusion, while avoiding a regime dominated by long-range jumps (because we focus on the short-range evolution of a local outbreak, not on the dynamics caused by, e.g., long-range travel). In fact, the exponent of \(-4\) corresponds to interactions of the form \(\sim 1/r^{d+\sigma }\) when \(d=2, \sigma =2\), a case of special interest in a number of early studies^{14,15}, because it sits at the margin between long-range and short-range interactions. However, in the context of epidemic models, as noted by Bunde et al. ^{16}, Grassberger^{12}, and Hallatschek and Fisher^{13}, it presents no special difficulties.

One interpretation of this model is that an infectious agent is a representative of a tight-knit population, household or community^{3,4}. The susceptible communities are dense and fill the entire lattice. Each time an infection occurs, a distribution of possible further propagation in neighboring communities is generated, which we realize by considering a random walk by a representative infectious agent from the community. The originating community is then removed from the susceptible pool, although visitations are still allowed, which can be viewed as coming from several causes. The community could undergo lockdown/quarantine measures after the initial infections and no further spread occurs. Or, the epidemic burns through the community leaving only recovered members, so the community is no longer susceptible.

## Results

### Initial stages of the epidemics

In the initial stage of the outbreak, the infected person (the index case) is completely surrounded by the susceptible population. The key parameter describing this state is \(R_0\): the number of people infected by the index case. The value of \(R_{0}\) depends on *p* and \(\tau\) in some form, but the naïve approximation, \(R_0 \approx p \tau\), must fail, as can be seen whenever the path of even a single walker self intersects; i.e., the approximation does not account for the recurrence of a two-dimensional random walker.

We ran 100, 000 realizations of the simulation, collecting how many agents were infected by the index case. Table 1 shows the \(R_{0}\) calculated for *p* and \(\tau\) tabulated on log–log axes, an idea that will be explored further in the discussion of the phase diagram. Notice that \(R_0\) is slightly less than 1 for \(p=\tau =1\) because there is a very small probability that the walker will not leave its starting cell. The breakdown of the naïve approximation is evident in the lack of constancy of \(R_{0}\) along the diagonals of the table, which is particularly apparent when \(p\tau\) is large.

The theoretical result (see “Methods”) is

where *K* and \(\tau _0\) are constants that depend on how the walker’s next jump is selected. For the kernel in equation (2) we have

As shown in Fig. 2, this formula is in excellent agreement with the numerical experiments without any adjustable parameters.

An interesting question is the interplay between the length of the walk and the jump length: what is more important for the epidemic’s dynamics, the length of the infectious period or the span of contacts of the infected individuals? As shown in the “Methods” section, the coefficients in equation (4) scale as \(K\propto c^{-1}\), \(\tau _0\propto c^{-1}\), where *c* is the coefficient of the Fourier expansion of the structure factor. The dimension of *c* is squared length, so we can write down \(c\propto \ell ^2\), where \(\ell\) is the average jump length, or, in other words, the spread of contacts for an average individual. Equation (4) shows that for small infectivity *p* the result does not depend on \(\ell\). However, for large *p*, when \(Kp\ln (\tau /\tau _0)\gg 1\), the number \(R_0\) depends on \(\tau \ell ^2\), *i.e.*, the number of persons infected by a single individual scales as the square of the jump length (and linearly with the number of jumps). This conclusion might inform the policies for outbreak suppression and the details of stay-at-home orders.

### Outbreak progression and phase diagrams

The progression of the outbreak beyond the initial stage is illustrated by Fig. 3. Depending on the parameters, the outbreak may die out or spread indefinitely, and it is a natural starting point to describe this dependence by a phase diagram.

Phase diagrams are used in physics and related fields as a visualization of how pressure and temperature (or other thermodynamic variables) affect the bulk thermodynamic state of a substance. Here, each point in the phase diagram will describe the expected behavior of an epidemic with the given *p* and \(\tau\) inputs (i.e., how likely it is to die out after a certain amount of time has passed).

For each \((p,\tau )\) pair we launched many simulations and used to define the *phase* of an infection by the following metric [see Supplemental Material (SM) for details]:

The plot of this phase variable is shown in Fig. 4. The determination of the phase boundary allows us to predict the behavior of the system in the regions above or below the boundary, even in the absence of extensive simulations. For each horizontal cross-section of the phase diagram (corresponding to a 1D phase diagram for a fixed value of \(\tau\)), we have fitted the phase variable as a function of *p* to a smooth interpolating function in order to find the location of the phase boundary, defined as the point where the phase variable is 0.5. The resulting phase boundary is well approximated by a hyperbola in the \(p,\tau\) plane. In particular, a least-squares fit gives the curve \(p_\text {boundary} \approx 2.0\tau _\text {boundary}^{ -1.1}\).

It is customary in epidemiology^{2} to predict the progression of epidemics based on the value of \(R_0\). Accordingly, on Fig. 4 “iso-\(R_0\)” lines were overlaid on the phase diagram: each point on an iso-\(R_0\) line has *p* and \(\tau\) values which produce outbreaks with a common \(R_0\). As expected, the phase boundary indeed coincides with an iso-\(R_0\) line, having \(R_0\approx 1.39\) (not \(R_0=1\), because of the role of statistical fluctuations). As shown in the “Methods” section, this finding corresponds to a robust theoretical prediction. Hence, while two outbreaks with the same \(R_0\) can have very different spatial spread (see Fig. 3), \(R_0\) is still a useful variable to predict whether an epidemic will die out or keep growing.

### Outbreaks across regional boundaries

In order to complement the mapping out of the phase diagram, the random-walk outbreak model was also used to simulate real-world infectious dynamics. In this section, the effects of having multiple regions with separate *p* values (representing adjacent states or provinces with different distancing or shelter-in-place policies) is explored. The spatial aspect of this scenario is simplified to two infinite half-planes with distinct *p* values.

Most notably, the random-walk model corroborates the hypothesis that it is possible for an infection to grow very slowly (constantly on the brink of completely dying out) until it eventually reaches a region with a higher value of *p*, upon which it exhibits rapid growth. This is demonstrated in Fig. 5. Moreover, there is also a significant backflow of infectors returning from the high-*p* region to the original low-*p* region.

The initial states of epidemics near a regional boundary can be described by the following model. Consider two regions separated by a linear boundary with the infection probabilities \(p_1\) and \(p_2\) correspondingly. Suppose a random walker starts near the border, and its walk is not affected by the border itself (e.g., no checkpoints on boundary). Then the ratio of the numbers of infected persons in regions 2 and 1 is (see “Methods”):

where *K* and \(\tau _0\) are the same as in equation (4). For short walks (\(K\max (p_1,p_2)\ln (\tau /\tau _0)\ll 1\)) this expression becomes \(p_2/p_1\), which corresponds to the “naïve” idea that the outbreak sizes in each region are proportional to *p*. However for long walks when \(K\min (p_1,p_2)\ln (\tau /\tau _0)\) dominates, the ratio becomes 1, which means when the infection period is long enough, the infected agent revisits their contacts many times, hence the number of secondary infections no longer depends on the probability to infect during one meeting.

### Spatial characteristics and scaling of the outbreak

In our spatial model, we can also study the growth and geometry of the affected area and, in particular, its scaling in the critical region. To this end, we can consider in more detail one cross-section of the phase boundary of Fig. 4. Fixing \(\tau =50\), according to Eq. (4) the critical value of *p* is \(p_\text {c}\approx 0.0283\). We are interested in the behavior in the region of indefinite growth as we approach this limit, so we have carried out simulations for \(p=0.03,0.035,0.04,0.045,0.05,0.055,0.06\) (if we go below \(p=0.03\) too many runs die out, the statistics grows noisier and it takes too long to reach the asymptotic regime). For each *p* we followed 500 independent runs up to \(t=1500\) steps. The SM includes a collection of snapshots from these simulations for several values of *p*.

The first quantity that we can study is the growth of the number *R* of removed/recovered sites as a function of time. As expected, all of our simulations are in the indefinite-growth regime (see for lower values of *p*, where *R* plateaus as the epidemic dies out). The behavior with time seems to approach a power law, but is difficult to analyze. We can, however, make use of the spatial nature of our model to find a more appropriate scaling variable. Indeed, a simple and intuitive spatial observable is the radius of gyration \(\mathcal {R}_\text {g}\) of the cluster of removed sites. If \(\mathbf {r}_i\) is the position of the *i*-th removed site, then

As we can see in Fig. 6, in terms of this variable the growth of *R* rapidly approaches a power law. Moreover, the curves for all our values of *p* collapse. Performing a joint fit of all the points to \(R\propto \mathcal {R}_\text {g}^c\) for \(\mathcal {R}_{\text {g}} \ge 20\), we obtain \(c=2.04(2)\) with a goodness-of-fit metric of \(\chi ^2/\text {d.o.f.} = 12.27/30\), where \(\text {d.o.f.} =\) number of degrees of freedom. In other words, despite the low value of *p*, the number of infected sites scales as a volume (i.e., a large proportion of sites get infected, see SM for a direct measure of this attack rate), so the clusters are not space-filling fractals. The infection clusters could be further characterized by analyzing the scaling of the number *S* of surface sites. A site is on the surface if it (a) belongs to the connected cluster of removed sites growing from the origin and (b) at least one of its nearest neighbors is susceptible. Surface estimations are, however, noisy and possibly affected by stronger scaling corrections. Indeed, in this case only the curves for \(0.03\le p \le 0.04\) (those closest to the critical point) collapse, yielding an exponent \(c_S = 1.92(5)\), with \(\chi ^2/\text {d.o.f.} = 8.25/8\) (see SM for figures). This exponent is not significantly different from \(c_S=2\), which would correspond to a linearly widening surface layer, but in any case its value is not precise enough to determine the universality class of the problem. Indeed, as we show in the next section, *S* is not the most appropriate observable for such a determination.

Finally, we can characterize the shape of the outbreak by studying its spatial autocorrelation function. For all the sites in the lattice, we define a function \(g(\mathbf {x})\) that is 1 if the site is removed and 0 otherwise. Then

We have plotted \(\rho\) for \(p=0.05\) in panels (c) and (d) of Fig. 6 (see other *p* in the SM). Measuring the distance in units of \(\mathcal {R}_\text {g}\) again leads to an enveloping curve as time grows, confirming that this is an appropriate length scale for the system.

Notice that our approximately quadratic growth of *R* with \(\mathcal {R}_\text {g}\) translates into a power-law, rather than exponential, incidence of the epidemic in time, as observed in recent works^{17,18,19} (\(\mathcal {R}_\text {g}\) itself approaches a power law in time with an exponent close to 1, see SM).

### Universality class of the problem and directed percolation

A natural conjecture regarding a random, *d*-dimensional branching process with an absorbing state (recovered/removed) is that it falls into the \((d+1)\)-dimensional directed-percolation universality class. If this is the case, scaling at the critical point between finite and indefinite growth is described by three independent exponents: \(\beta\), \(\nu _\perp\) and \(\nu _\parallel\). For \(d=2\), we have \(\beta =0.583(3)\), \(\nu _\perp =0.733 (8)\) and \(\nu _\parallel =1.295 (6)\)^{20,21}.

In the scaling regime, the size (mass or number of sites) of the growing space-time cluster on transverse (two-dimensional) length scale \(\ell _\perp\) and longitudinal (time) scale \(\ell _\parallel\) is given by

where \(\epsilon\) is the distance from criticality in the control parameter. Eq. (10) assumes that lengths scale like the corresponding correlation lengths along the different axes, e.g., \(\ell _\perp \sim \epsilon ^{-\nu _\perp }\)^{22,23}.

Expressing the total space-time size of the epidemic in terms of the transverse-space scale only yields

This is not, however, the scaling within a space-like slice (i.e., the clusters we analyzed in the previous section). One way to find that spatial scaling is to treat the exponent in Eq. (11) as a fractal dimension and intersect the epidemic’s space-time history with a transverse slice. The intersection set will scale with the transverse scale \(\ell _\perp\) with exponent

For \((2+1)\)-dimensional directed percolation we obtain \(d_\cap =1.20(1)\). In other words, the number of active sites at fixed time should scale like \(N_\text {active} \sim \ell ^{1.20}\) as a function of a typical spatial scale \(\ell\). Translating this analysis back into the language of epidemiology, the analogy with directed percolation predicts that the number of infected individuals *I* in a cluster of radius of gyration \(\mathcal {R}_{\text {g},I}\) scales as \(I\sim \mathcal {R}_{\text {g},I}^{1.20}\)—a law that is measurably different from the Euclidean picture of a compact cluster with an active boundary of radius \(\mathcal {R}_{\text {g},I}\).

We have tested this theory in Fig. 7, by plotting the total number of currently infected sites as a function of the radius of gyration of this set. In this case, unlike for the number *R* of removed sites, the curves for different *p* do not collapse. In the critical region of \(0.03\le p \le 0.04\), however, we can compute fits to \(I\propto \mathcal {R}_{\text {g},I}^{d_\cap }\). Averaging the resulting values of the exponent, we obtain \(d_{\cap } = 1.18(5)\), compatible with the above prediction and clearly different from the mean-field prediction of \(d_\cap =1\).

## Discussion

We see that a simple lattice model provides a number of interesting insights about epidemic spread. One of the most useful features of idealized models like this one is that they provide an understanding of which factors are salient for the outcome, and which are not. This understanding can be used in the construction of more detailed and realistic models, in the same way that a pencil sketch is useful when starting a full-size oil painting.

One of the most important questions when studying epidemics is whether the value of \(R_0\) is sufficient to describe the epidemics behavior, or whether a detailed analysis of the contact network is necessary. Our model shows that the answer depends on what aspect of the epidemic is interrogated. The spatial features of the outbreak are not determined by \(R_0\) alone, but depend on the individual infectivity and the number of individual contacts separately. In contrast, the phase boundary between infinite spread and localization of the epidemic is still determined by \(R_0\).

We provide the dependence of \(R_0\) on the easily interpretable and intuitively clear parameters: the average number of steps per infected person, the probability to infect another person, the average length of a step. This information can be used to form policy decisions. For example, we find that the step length is important if the probability to infect is high enough (above we give the estimate \(Kp\ln (\tau /\tau _0)\gg 1\) for the threshold value of *p*). This is relevant to the travel restriction, especially as more contagious strains are discovered.

Finally, we have studied the scaling of our outbreaks in terms of space and length scales in the critical region between the extinction and the indefinite spreading regime. By analyzing the fractal nature of the growing cluster, we make a quantitative connection to the problem of directed percolation, whose universality class seems to rule our critical regime.

A significant idealization in our model is the motion of the infective agents: the random walkers can go anywhere on the lattice and do not have a memory of their origins. In real life, people tend to have permanent residences and return there daily. These periodic movements would work to make the outbreaks even more localized than those in our model. Introducing more realistic walking patterns is, therefore, a compelling direction for future work. Another interesting possibility would be to use the end state of one simulation, with a lattice including both removed and still susceptible sites, as the initial condition to simulate the effect of subsequent epidemic waves. Such a numerical experiment has a direct bearing on the question of thresholds to herd immunity in a fully spatial model, a topic that has received scant attention.

## Methods

### Effect of fluctuations on phase diagram

The phase boundary introduced above separates the cases where an outbreak dies out from those where it spreads indefinitely. Let \(P_0\) be the probability that the outbreak dies out given one index case. We assume that the number of people infected by the index case has a Poisson distribution with mean \(R_0\). The meaning of \(R_0\) is thus the same as in classical epidemiology: the number of people infected by the index case in a naïve population^{2}. The probability that the number of secondary infections is zero, and that the outbreak dies out immediately, is \(\exp (-R_0)\). The probability that the index case infects exactly *n* persons is \(\exp (-R_0 ) R_0^n/n!\) If the index case infected *n* persons, the epidemic dies out only if each secondary outbreak caused by each of these *n* persons dies out. The probability of such an event \(P_1\) is, strictly speaking, different from \(P_0\) since the secondary infections operate in a different environment than the index case. However, we neglect this and stipulate that \(P_1\approx P_0\). The probability that *n* secondary outbreaks die out is therefore \(P_0^n\). Then we can write down

At \(0\le R_0\le 1\) the only solution for this equation is \(P_0=1\). This means that at \(R_0\le 1\) the epidemics is always localized. At \(R_0>1\) Eq. (13) gets a solution between 0 and 1. If we draw the phase boundary at the point where exactly 50% of outbreaks survive, then the critical value of \(R_0\) is \(R_0=1.39\). This agrees extremely well with Fig. 4.

If we have *N* index cases, the probability that the epidemic is localized is, to first approximation, \(P_0^N\). At large *N* this probability quickly approaches zero, for \(R_0>1\). It is important to note that the phase boundary, unlike the other features of the epidemic, depends only on \(R_0\). Note that this derivation does not use the lattice approximation and thus should be valid for a wide class of models. The only crucial assumption for the derivation is that the environment for the secondary infections is the same as for the index case. This assumption is true for well-mixed models and becomes less good in the case of high spatial inhomogeneity around the index case.

### Asymptotics for \(R_0\)

In this section, we derive a theoretical estimate for \(R_0\): the number of infections produced by one random walker in a susceptible population. We use ideas similar to those in^{24,25,26}.

Let us consider a walker that starts at the point \(\mathbf {x}\). Let \(C(\tau , m, \mathbf {x}, \mathbf {w}, \mathbf {y})\) be the probability for this walker to end up at the point \(\mathbf {y}\) after making \(\tau\) steps, while visiting the point \(\mathbf {w}\) exactly *m* times. The probability that the walker does *not* infect the site \(\mathbf {w}\) during this trip is \((1-p)^m\), since the probability to infect at each visit is *p*. Summing over \(\mathbf {w}\), \(\mathbf {y}\) and *m*, we get the total number of infected sites as

where

This function is (up to a normalization) the generating function introduced in Rudnick and Gaspari^{26} [Section 3.2]. To calculate it, we introduce a transformation similar to the transition from the canonical ensemble to the grand canonical ensemble in statistical physics. Namely, let us take a complex variable *z* and write down the series:

The inverse transformation is

where the complex integral is taken around the point \(z=0\). As we shall see below, the value of this integral is defined by the singularity of *H* at \(z\rightarrow 1\).

Let \(P(\tau , \mathbf {x}, \mathbf {y})\) be the probability for a random walker starting at the point \(\mathbf {x}\) to end at the point \(\mathbf {y}\). We introduce two functions

A remarkable theorem^{26} [Sect. 3.3] states that function *H* can be expressed through the functions *G* and \(G_1\):

Integration of *G* over *y* and *w* is easy due to the normalization. The only nontrivial contribution is from the function \(G_1\) in the denominator of this expression. In two dimensions, this function can be expressed as^{26} [Sect. 3.5]

where \(\chi (\mathbf {q})\) is the structure factor, i.e. the Fourier transform of the jump probability function. More precisely, let \(p(\mathbf {x})\) be the probability for the walker to go from the point \(\mathbf {0}\) to the point \(\mathbf {y}\) in one step. We then define the structure factor \(\chi (\mathbf {q})\) as

At small *q*, we can expand the structure factor as

which gives near the singularity \(z\rightarrow 1\)

Here \(q_0\approx 1\) is the upper limit in the integral (20) (assuming the lattice constant to be 1). Using these asymptotics, and integrating Eqs. (14), (17), and (19), we get Eq. (4) with

Note that we use a different normalization from the one used in the Rudnick and Gaspari^{26}: they count the number of random walks, whereas we count the probability. This means that the singularities of the functions *H*, *G* and \(G_1\) are at \(z=1\) instead of \(z=z_c\), and that \(\chi (0)=1\).

The coefficients *K* and \(\tau _0\) depend only on the structure factor \(\chi\). To calculate these two, let us generate a large number *N* of jumps according to Eqs. (2) and (3). Let us take \(\mathbf {q}\) along the *x* axis. If jump number *i* lands at the point \(\mathbf {r}_i=(x_i, y_i)\), then it contributes the term

to \(\chi\). Due to symmetry, the contribution of the second term is zero, and we arrive at

In our experiments, we generate \(N=10^6\) points, which gives \(c\approx 0.458\), and the resulting values of *K* and \(\tau _0\) in Eq. (5).

### \(R_0\) in inhomogeneous case

The method described in the previous section can be easily generalized for the case when the probability of infection *p* is different for different sites. Indeed, in Eq. (15) \(C'\) depends only on the value \(p_\mathbf {w}\) in the point \(\mathbf {w}\). Therefore we can take the expressions for *C* from that section, calculate \(C'\), and obtain \(R_0\) by integration in Eq. (14). Let us consider two semi-infinite regions separated by a linear border with the probabilities of infection \(p_1\) and \(p_2\). Suppose a walker starts in the first region at the distance *d* from the border. Then integration in Eq. (14) gives

At \(d\ll c^2\tau ^2\) we get Eq. (7).

## Data availability

Code and data for figures and tables can be found at https://github.com/czbiohub/random-walk-epidemic-model.

## References

Allen, L. J. S. A primer on stochastic epidemic models: Formulation, numerical simulation, and analysis.

*Infect. Dis. Model.***2**, 128–142. https://doi.org/10.1016/j.idm.2017.03.001 (2017).Hethcote, H. W. The mathematics of infectious diseases.

*SIAM Rev.***42**, 599–653. https://doi.org/10.1137/S0036144500371907 (2000).Grijalva, C. G.

*et al.*Transmission of SARS-COV-2 infections in households—Tennessee and Wisconsin, April–September 2020.*Morb. Mortal. Wkly. Rep.*https://doi.org/10.15585/mmwr.mm6944e1 (2020).Huber, G.

*et al.*A minimal model for household effects in epidemics.*Phys. Biol.***17**, 065010. https://doi.org/10.1088/1478-3975/abb209 (2020).Bittihn, P., Hupe, L., Isensee, J. & Golestanian, R. Local measures enable COVID-19 containment with fewer restrictions due to cooperative effects.

*EClin. Med.***32**, 100718. https://doi.org/10.1016/j.eclinm.2020.100718 (2021).Li, D., Qin, P., Wang, H., Liu, C. & Jiang, Y. Epidemics on interconnected lattices.

*EPL Europhys. Lett.***105**, 68004. https://doi.org/10.1209/0295-5075/105/68004 (2014).Newman, M. E. J., Jensen, I. & Ziff, R. M. Percolation and epidemics in a two-dimensional small world.

*Phys. Rev. E***65**, 021904. https://doi.org/10.1103/PhysRevE.65.021904 (2002).Sun, G.-Q. Pattern formation of an epidemic model with diffusion.

*Nonlinear Dyn.***69**, 1097–1104. https://doi.org/10.1007/s11071-012-0330-5 (2012).Tomé, T. & Ziff, R. M. Critical behavior of the susceptible-infected-recovered model on a square lattice.

*Phys. Rev. E*https://doi.org/10.1103/PhysRevE.82.051921 (2010).Chang, S. Y.

*et al.*Mobility network modeling explains higher SARS-CoV-2 infection rates among disadvantaged groups and informs reopening strategies.*Nature***589**, 82–87. https://doi.org/10.1038/s41586-020-2923-3 (2021).Aleta, A.

*et al.*Modelling the impact of testing, contact tracing and household quarantine on second waves of COVID-19.*Nat. Hum. Behav.***4**, 964–971. https://doi.org/10.1038/s41562-020-0931-9 (2020).Grassberger, P. Two-dimensional SIR epidemics with long range infection.

*J. Stat. Phys.***153**, 289–311. https://doi.org/10.1007/s10955-013-0824-7 (2013).Hallatschek, O. & Fisher, D. S. Acceleration of evolutionary spread by long-range dispersal.

*Proc. Natl. Acad. Sci.***111**, E4911–E4919. https://doi.org/10.1073/pnas.1404663111 (2014).Fisher, M. E., Ma, S.-K. & Nickel, B. G. Critical exponents for long-range interactions.

*Phys. Rev. Lett.***29**, 917–920 (1972).Stephen, M. J. & Aharony, A. Percolation with long-range interactions.

*J. Phys. C***14**, 1665–1670 (1981).Bunde, A., Herrmann, H. J., Margolina, A. & Stanley, H. E. Universality classes for spreading phenomena: A new model with fixed static but continuously tunable kinetic exponents.

*Phys. Rev. Lett.***55**, 653–656 (1985).Ziff, A. L. & Ziff, R. M. Fractal kinetics of COVID-19 pandemic.

*Int. J. Educ. Excellence***6**, 43–69 (2020).Singer, H. M. The COVID-19 pandemic: Growth patterns, power law scaling, and saturation.

*Phys. Biol.***17**, 055001. https://doi.org/10.1088/1478-3975/ab9bf5 (2020).Merrin, J. Differences in power law growth over time and indicators of COVID-19 pandemic progression worldwide.

*Phys. Biol.***17**, 065005. https://doi.org/10.1088/1478-3975/abb2db (2020).Voigt, C. A. & Ziff, R. M. Epidemic analysis of the second-order transition in the Ziff–Gulari–Barshad surface-reaction model.

*Phys. Rev. E***56**, R6241–R6244. https://doi.org/10.1103/PhysRevE.56.R6241 (1997).Grassberger, P. & Zhang, Y. C. Self-organized formulation of standard percolation phenomena.

*Physica A***224**, 169–179. https://doi.org/10.1016/0378-4371(95)00321-5 (1996).Huber, G., Jensen, M. H. & Sneppen, K. Distributions of self-interactions and voids in (1+1)-dimensional directed percolation.

*Phys. Rev. E***52**, R2133–R2136. https://doi.org/10.1103/PhysRevE.52.R2133 (1995).Huber, G., Jensen, M. H. & Sneppen, K. A dimension formula for self-similar and self-affine fractals.

*Fractals***3**, 525–531. https://doi.org/10.1142/S0218348X9500045X (1995).Larralde, H., Trunfio, P., Havlin, S., Stanley, H. E. & Weiss, G. H. Number of distinct sites visited by N random walkers.

*Phys. Rev. A***45**, 7128–7138. https://doi.org/10.1103/PhysRevA.45.7128 (1992).Larralde, H., Trunfio, P., Havlin, S., Stanley, H. E. & Weiss, G. H. Territory covered by n diffusing particles.

*Nature***355**, 423–426 (1992).Rudnick, J. & Gaspari, G.

*Elements of the Random Walk: An Introduction for Advanced Students and Researchers*(Cambridge University Press, Cambridge, 2004).

## Acknowledgements

We are grateful to the anonymous reviewers for their probing questions and deep insights. A.C., G.H., A.M., and D.Y. are supported by the Chan Zuckerberg Biohub; B.V. is supported by the Chan Zuckerberg Initiative. D.Y. acknowledges support by MINECO (Spain) through Grant No. PGC2018-094684-B-C21, partially funded by the European Regional Development Fund (FEDER).

## Author information

### Authors and Affiliations

### Contributions

G.H. and A.M. designed research; A.C. performed simulations with guidance from G.H., A.M. and D.Y.; A.M. wrote the simulation code; B.V. carried out random-walk analysis; all authors analyzed data and contributed to the writing of the paper.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Additional information

### Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Supplementary Information

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Chu, A., Huber, G., McGeever, A. *et al.* A random-walk-based epidemiological model.
*Sci Rep* **11**, 19308 (2021). https://doi.org/10.1038/s41598-021-98211-5

Received:

Accepted:

Published:

DOI: https://doi.org/10.1038/s41598-021-98211-5

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.