## Abstract

In ecology, species can mitigate their extinction risks in uncertain environments by diversifying individual phenotypes. This observation is quantified by the theory of bet-hedging, which provides a reason for the degree of phenotypic diversity observed even in clonal populations. The theory of bet-hedging in well-mixed populations is rather well developed. However, many species underwent range expansions during their evolutionary history, and the importance of phenotypic diversity in such scenarios still needs to be understood. In this paper, we develop a theory of bet-hedging for populations colonizing new, unknown environments that fluctuate either in space or time. In this case, we find that bet-hedging is a more favorable strategy than in well-mixed populations. For slow rates of variation, temporal and spatial fluctuations lead to different outcomes. In spatially fluctuating environments, bet-hedging is favored compared to temporally fluctuating environments. In the limit of frequent environmental variation, no opportunity for bet-hedging exists, regardless of the nature of the environmental fluctuations. For the same model, bet-hedging is never an advantageous strategy in the well-mixed case, supporting the view that range expansions strongly promote diversification. These conclusions are robust against stochasticity induced by finite population sizes. Our findings shed light on the importance of phenotypic heterogeneity in range expansions, paving the way to novel approaches to understand how biodiversity emerges and is maintained.

**Author summary** Ecological populations are often exposed to unpredictable and variable environmental conditions. A number of strategies have evolved to cope with such uncertainty. One of them is stochastic phenotypic switching, by which some individuals in the community are enabled to tackle adverse conditions, even at the price of reducing overall growth in the short term. In this paper, we study the effectiveness of these “bet-hedging” strategies for a population in the process of colonizing new territory. We show that bet-hedging is more advantageous when the environment varies spatially rather than temporally, and infrequently rather than frequently.

## Introduction

The dynamics and evolutionary history of many biological species, from bacteria to humans, are characterized by invasions and expansions into new territory. The effectiveness of such expansions is crucial in determining the ecological range and therefore the success of a species. A large body of observational [1, 2] and experimental [3–6] literature indicates that evolution and selection of species undergoing range expansions can be dramatically different from that of other species resident in a fixed habitat. Theoretical studies of range expansions based on the Fisher-Kolmogorov equation [7, 8] or variants [9, 10] also support this idea. Adaptive dispersal strategies [2] and small population sizes at the edges of expanding fronts [11, 12] are among the main reasons for such differences.

Range expansions often occur in non-homogeneous and fluctuating environments. Under such conditions, it is possible to mathematically predict the expansion velocity of a community of phenotypically identical individuals [13–18]. However, diversity among individuals is expected to play an important positive role when populations expand in fluctuating environments. For instance, diverse behavioral strategies help animal populations to overcome different invasion stages and conditions [19–22]. Analyses of phenotypic diversity in motile cells suggest that it also may lead to a selective advantage at a population level [23–25]. Although several studies have tackled the problem of how individual variability affects population expansion [6, 9, 10, 26, 27, 27, 28, 28–30], systematic and predictive theory is still lacking [22].

Phenotypic diversification is often interpreted as a bet-hedging strategy, spreading the risk of uncertain environmental conditions across different phenotypes adapted to different environments [31–40]. Since its formalization in the context of information theory and portfolio diversification [41, 42], a large number of works have explored the applicability of bet-hedging in evolutionary game theory [43–46] and ecology [47–51]. Few studies have explored the benefits of bet-hedging in spatially structured ecosystems [52, 53].

In this paper, we study how bet-hedging strategies can aid populations in invading new territories characterized by fluctuating environments. In particular, we analyze the effect of spatial expansion, different types of environmental heterogeneity, and demographic stochasticity on development of bet-hedging strategies for a population front evolving according to a Fisher wave.

By employing mathematical as well as extensive computational analyses, we find that the advantage of bet-hedging in range expansions depends on the rate of environmental variation. In particular, bet-hedging is more convenient for infrequently varying environments, whereas its advantages vanish for frequent environmental variation. For the same model, bet-hedging is never an advantageous strategy in the well-mixed case, supporting the view that range expansions strongly promote diversification. We further find that spatial environmental variations provide more opportunities for bet-hedging than temporal fluctuations. Finally, we show that our conclusions still hold when considering stochastic effects on the front propagation induced by a finite population size.

The paper is organized as follows. In Section we introduce a general population model and an example with two available phenotypes and two environmental states. Section presents an extensive study of this example. In, we demonstrate that the main conclusions obtained for the example also hold for the general model. Section is devoted to conclusions and perspectives.

## Results

### Model

We consider a population consisting of individuals that can assume *N* alternative phenotypes. The population as a whole adopts a phenotypic strategy, that is identified by the fractions *α _{i}*,

*i*= 1…

*N*of the population assuming each phenotype

*i*with ∑

_{i}

*α*= 1 and 0 ≤

_{i}*α*≤ 1 ∀

_{i}*i*(Fig. 1A). As customary in game theory, we say that a strategy is a “pure strategy” if

*α*=

_{i}*ε*for some phenotype

_{ik}*k*, and a “mixed strategy” otherwise. We assume that the

*α*’s remain constant in time within the population.

_{i}The environment can be found in one of *M* different states, which can randomly alternate either in time or in space. We call *p _{i}* the probability of encountering environment

*i*. We further define the growth rate

*s*≤ 0 of phenotype

_{ij}*j*in environment

*i*(Fig. 1A). When the population size is sufficiently large, so that demographic stochasticity can be neglected, the population-averaged growth rate given the state

*i*=

*i(x,t)*of the environment at position

*x*and time

*t*is

Since Eq. (1) is linear in the *α _{j}*’s, the population-averaged growth rate in a given environment is always maximized by the pure strategy with the highest growth rate. However, in the presence of uncertainty about the environment, the population might choose other strategies. One possibility is to select a different pure strategy, less risky than the optimal one. This case is often termed “conservative bet-hedging” in the ecological literature [40]. Another option is to adopt a mixed strategy, with different phenotypes more adapted to different environments. This case is termed “diversifying bet-hedging” in the literature [40, 54]. Since our interest is in diversification, the term “bet-hedging” will refer herein to diversifying bet-hedging.

Before presenting our results in full generality, we will illustrate it in a simple, yet ecologically relevant instance of the model with only two phenotypes: “safe” and “risky” and two environmental states: “adverse” (a) and “favorable” (b). The safe phenotype is characterized by a growth rate *s _{s}* both in the adverse and favorable environments. The growth rate of the risky phenotype is

*s*in environment (a) and

_{a}*s*in environment (b) (Fig. 1B) [55]. The two environments occur with the same probability,

_{b}*p*=

_{a}*p*= 1/2. A fraction of individuals

_{b}*α*adopts the risky phenotype and the complementary fraction (1 −

*α*) adopts the safe phenotype (Fig. 1B). For this model, the population-averaged growth rate reads

Note that, with a slight abuse of notation, we use equivalently σ* _{i}* or σ(

*x,t*) to denote the population-averaged growth rate in the environment

*i*(

*x,t*). For pure strategies,

*α*= 0 or

*α*= 1, the population-averaged growth rate

*a*reduces to the growth rate of the safe or risky phenotype, respectively.

### Two-phenotype model

We seek to understand those conditions under which bet-hedging is advantageous for the population. To this end, we shall compare three situations: i) well-mixed populations, ii) range expansions in environments that fluctuate temporally, but that are homogeneous in space (Fig. 1C), and iii) range expansions in spatially fluctuating environments that are homogeneous in time (Fig. 1D).

### Well-mixed case

We start by analyzing the well-mixed case, where the spatial coordinates of individuals can be ignored. The total population density *f* (*t*) evolves according to the equation

In writing Eq. (3), we used the assumption that the fraction *α* of the population adopting the risky phenotype remains constant in time (see [56, 57] for cases in which this assumption is relaxed). Equation (3) can be readily integrated, obtaining where 〈σ* _{i}*〉 = ∑

_{i}

*p*σ

_{i}_{i}denotes an average over the environmental states. For Eq. (4) to hold, we do not need to make strong assumptions about the statistics of the environmental states, other than it should be stationary, ergodic, and with a finite correlation time.

The optimal strategy *α*^{*} is obtained by maximizing the right-hand side of Eq. (4) respect to the strategy *α*. Since 〈 σ* _{i}*〉 is a linear function of

*α*, its maximum is always reached at the extremes of the interval (

*α*∊ [0,1]). In particular, defining the normalized growth rates and , we find that the optimal strategy is

*α**= 1 when and

*α*

^{*}= 0 otherwise. This means that no bet-hedging strategy is possible in this model in the well-mixed case [55].

This simple result illustrates an aspect of bet-hedging that is sometimes under-appreciated. In well-mixed systems, bet-hedging requires at least one of the following ingredients: a) discrete generations, as in the seminal work of Kelly [41], b) finite switching rates among strategies [32, 57], or c) a delta-correlated environment [52]. Any of these ingredients can lead to nonlinearities in the average exponential growth rate, therefore opening the way for a non-trivial optimal strategy. A detailed analysis of these facts is beyond the scope of the present work and will be presented elsewhere.

Note that, in this model, the frequency of environmental change does not play a role, as far as it is finite [52]. The physical reason can be understood from the right-hand side of Eq. (4): the optimal strategy depends on the frequency of different environmental states but not on the switching rates. This feature is also shared by other well-mixed models that do allow for optimal bet-hedging strategies, such as the classic model by Kelly [41]. We shall see in the following that, on the contrary, the rate of environmental change plays an important role for expanding populations.

### Range expansion in fluctuating environments

We now consider a population expanding into an unoccupied, one-dimensional space under the influence of a stochastically changing environment. Its population dynamics are described by the Fisher equation [7, 58]: where *f* (*x, t*)is the population density at spatial coordinate *x* and time t, and *D* is the diffusion constant, which characterizes the motility of individuals. For a constant growth rate σ, the stationary solution of Eq. (5) is characterized by a front advancing in space with velocity . Instead, we consider a fluctuating case in which the growth rate σ(*x,t*) depends on the population strategy *α* and on environmental conditions according to Eq. (2). In such case, one can define an asymptotic mean velocity of the front as

In what follows, we take *v _{M}* as a proxy of the long-term population fitness and maximize it with respect to

*α*to determine the optimal strategy.

### Range expansion in temporally varying environments

We first consider the case in which environmental conditions change randomly with time, but are homogeneous across space, σ(*x,t*) =σ(*t*)(see Fig.1C). Switching rates between adverse and favorable environments are *k _{a}*

_{→}

*=*

_{b}*k*

_{b}_{→}

_{a}=

*k*. We first estimate the asymptotic mean velocity defined in Eq. (6) in the limiting cases of

*k*→ 0 and

*k*→∞.

When the environment changes very infrequently, *k*→0, the population front has the time to relax to the asymptotic shape characterized by its corresponding Fisher velocity, or depending on the environment [7, 59]. Thus, the asymptotic mean velocity can be estimated as *v _{M}* = (

*v*+

_{a}*v*)/2. Maximizing

_{b}*v*with respect to

_{M}*α*, we find that in this case, a bet-hedging optimal strategy exists under the conditions (Fig. 2A): observe that the first condition coincide with the one in the well-mixed scenario. In the opposite limiting case of a rapidly fluctuating environment,

*k*→ ∞, the population effectively experiences the average of the two growth rates, so that the velocity can be estimated as , where 〈(…)〉 denotes an average over the environmental states. In this case, the optimal strategy

*α*

^{*}is achieved by maximizing the average growth rate 〈σ〉 with respect to

*α*. Since 〈σ〉 is linear in

*α*, the maximum always lies at the extremes of the interval [0,1]. In particular, we find

*α*

^{*}= 1 when and

*α*

^{*}= 0 otherwise, as in the well-mixed case. This implies that no bet-hedging regime exists in this limit (Fig. 2B).

To explore the intermediate regimes of finite *k*, it is necessary to resort to numerical simulations of Eq. (5). For a set of parameters such that the optimal strategy is *α*_{*} = 1 for *k* → 0, the optimal strategy remains *α*_{*} = 1 for all values of *k*, see Fig. 3A. Instead, in a case where the optimal solution is in the bet-hedging region for *k* → 0, the optimal strategy *α*_{*} increases with the switching rate, so that for large *k* the optimal strategy is outside the bet-hedging region, *α*_{*} = 1. These results support our analytical estimates of limiting values and suggest that the asymptotic mean velocity is a monotonically increasing function of the switching rate *k* in this case.

### Range expansion in spatially varying environments

We now consider the case in which environmental conditions are constant in time, but depend on the spatial coordinate *x*. The dynamics are described by the Fisher equation (5) with two types of environment randomly alternating in space, σ(*x,t*) = σ(*x*). We call *k _{S}* the spatial rate of environmental switch, so that the probability of encountering an environmental shift within an infinitesimal spatial interval

*dx*is equal to

*k*. The switching rates from environment

_{S}dx*a*to

*b*and vice-versa are both equal to

*k*. As above, we first analyze the two limits

_{S}*k*→ 0 and

_{S}*k*→ ∞.

_{S}In the limit *k _{S}* → 0, the population front traverses large regions of space characterized by a constant environment, either

*a*or

*b*, thus being able to reach the corresponding Fisher velocity,

*v*or

_{a}*v*, respectively. The mean traversed lengths Δ

_{b}*x*and Δ

_{a}*x*are equal for the two environments. On the other hand, the mean times spent in each of them,

_{b}*t*and

_{a}*t*, are different, and satisfy the relation

_{b}Therefore, in this case, the asymptotic mean velocity is given by the harmonic mean of the velocities in the two environments

At the opposite limit of large *k _{S}*, the environment is characterized by frequent spatial variations. In this case, the population front occupies multiple

*a*and

*b*sectors with an effective growth rate 〈σ〉. As in the time-varying case, the asymptotic mean velocity in this limit is, , see also [14, 15].

Here, for *k _{S}* → 0 the bet-hedging region is broader with respect to the temporally fluctuating environment for

*k*→ 0, see Fig. 4A. For

*k*→ ∞, the optimal strategy is the same as in Fig. 2C and there is no bet-hedging regime.

_{S}We numerically solved Eq. (5) for intermediate values of *k _{S}* and obtained the mean asymptotic velocities as a function of

*α*, see Fig. 4 B. Results support theoretical predictions in the limiting cases

*k*→ 0 and

_{S}*k*→ ∞. In this case, we observe a non-monotonic behavior of

_{S}*v*as a function of

_{M}*k*, so that the maximum mean velocity is attained at an intermediate switching rate. An analytical explanation of this non-trivial effect goes beyond the scope of this work.

_{S}### Effect of finite population size

The deterministic Fisher equation (5) is rigorously valid only in the limit of infinite local population sizes. We now explore the robustness of our results when considering stochasticity induced by the finite size of populations, i.e. “demographic noise”. We focus on the case of a front propagating in a temporally varying environment. To study finite population size, we solve numerically a stochastic counterpart of the Fisher equation see e.g. [60]. In Eq. (10), ξ(*x,t*) is Gaussian white noise with 〈ξ(*x,t*)〉 = 0,〈ξ(*x,t*)ξ(*x′*, *t′*)〉 = δ(*x*−*x′*)δ(*t*−*t′*). The parameter *N* represents the number of individuals per unit length corresponding to *f*(*x, t*) = 1. For large population sizes, *N* ≫ 1, Eq. (10) reduces to Eq. (5). Numerical integration of Eq. (10) requires some care due to the fact that both noise and the deterministic terms go to zero as the absorbing states *f*(*x,t*) = 0 and *f*(*x,t*) = 1 are approached [61, 62]. A detailed description of our integration scheme is presented in the Supporting information.

For a Fisher wave propagating in a homogeneous environment, demographic noise leads to a reduced front velocity *v* with respect to the deterministic case [58, 62–64] where *C* is a constant, *N* is the maximum population size per unit length, and *s _{s}* = 1, is the Fisher velocity in the absence of demographic noise. Asymptotic mean velocities for stochastic waves in temporally varying environments are shown in Fig. 5. Also in this case, small populations, subject to relatively strong demographic noise, propagate more slowly than large populations. In particular, curves at different values of

*N*can be approximately rescaled using Eq. (11), assuming that

*C*does not depend on

*α*(insets of Fig. 5). These results imply that the optimal strategy

*α*

^{*}is robust with respect to demographic noise, at least for moderately to relatively large values of

*N*. The same scaling holds for spatially varying environments, but with mild deviations that seem to expand the bet-hedging region even further, compared with the infinite population size limit (see Supporting information).

### General bet-hedging model

In this section, we demonstrate that our main conclusions hold also for the general case with *N* phenotypes and *M* environmental states (see Section). In particular, for a temporally fluctuating environment in the limit of very slow switching rates, the bet-hedging regime occupies a reduced region of parameter space compared to temporally constant environments fluctuating slowly in space. Also in this case, we find that for frequent environmental change, the propagation velocity tends to *s _{s}* = 1, , regardless of whether the environmental fluctuations depend on time or space. Therefore, the optimal strategy maximizes the linear function of the

*α*S 〈σ〉 and is therefore a pure strategy as discussed after Eq. (1).

_{i}We consider a range expansion where the environment fluctuates in time and the stochastic switching rates among the *M* environmental states are small. Following the same line of thought of Section, the optimal strategy maximizes where, as usual, σ_{i} = ∑* _{jsij}α_{j}*. For spatially varying environments, the optimal strategy maximizes the harmonic mean

Both for Eq. (12) and Eq. (13), maximization has to be performed with the constraint ∑* _{j}α_{j}* = 1 and 0 ≤

*α*≤ 1 ∀

_{j}*j*. We recall that the bet-hedging regime is the region of parameter space where the optimal solution is a mixture of all phenotypes,

*α*> 0 ∀

_{i}*i*. Here we show that if, for a given choice of the

*s*’s and

_{ij}*p*’s, a population advancing in a temporally varying environment is in a bet-hedging regime, then the same holds for spatially varying environments. For the demonstration, we borrow a mathematical tool from evolutionary game theory [65]. We introduce the gradients where 〈

_{i}*x*〉 =∑

_{i}

*p*is the average over environments. We now associate replicator equations to Eq. (12) and Eq. (13):

_{i}x_{i}The system is in a bet-hedging regime when the replicator equations admit a stable fixed point in the interior of the unit simplex, 0 < *α _{i}* < 1. Instead of computing the fixed point explicitly, we check whether each phenotype

*l*has a positive growth rate for

*α*≪ 1. Brouwer’s fixed point theorem ensures that, under this condition, there must be a fixed point in the interior, see [65], chapter 13. For our aims, it is therefore sufficient to prove that, for small

_{l}*α*, if is positive, then must be positive as well. Note that for

_{l}*α*≪ 1, the average σ = ∑

_{l}_{j}

*s*does not depend on

_{ij}α_{j}*α*, and therefore, σ and

_{l}*s*are uncorrelated random variables respect to the average over the environment. Since , this means that the sign of is the same than the quantity

_{l}Following the same logic, the sign of is the same than

Since also 〈*s _{l}*〉 > 0, we need to demonstrate that the following inequality always holds

This can be proven from the chain of inequalities

In Eq. (20), the second and third inequalities are consequences of Jensen’s inequality, since both *x*^{2} and 1/*x* are convex functions. For the first inequality in Eq. (20), since *s* > 0, we can use the result 〈*x ^{i}*〉 ≥ 〈

*x*〉

^{j}^{i/j}proved for

*i*>

*j*in [66]. Combining this result for (

*i*= 3,

*j*= 2) and (

*i*= 2,

*j*= 1), we obtain 〈

*x*

^{3}〉 ≥ 〈

*x*

^{2}〉) 〉

*x*〈. Taking we finally prove Eq. (20). Therefore, in the limit of small switching rates of the environment, the bet-hedging region is wider in the spatially varying case than in the temporally varying case.

In the opposite limit of high rates of environmental switch, the function to be optimized is linear, and the optimal strategy is a pure strategy. In this case, the particular phenotype *l* adopted by the whole population is that maximizing ∑_{i}*p _{i}s_{il}*. This conclusion holds both for temporally and spatially varying environments.

## Conclusions

Understanding the precise mechanisms of population expansions is of utmost importance, not only for understanding species diversity, but also to cope with invasive species in new habitats [19–22], bacterial infections [23–25, 67], and cell migration, such as those occurring during tissue renewal or cancer metastasis [5]. Phenotypic diversity is a convenient strategy for the success of population expansions in a broad range of contexts [19–25]. Although precise experimental measures are not easy to obtain, a recent study shows that populations with increased variability in individual risk-taking can colonize wider ranges of territories [68].

In this work, we proposed a general mathematical and computational framework to analyze such scenarios. In particular, we introduced a population model with diverse phenotypes that perform differently depending on the type of environment. We focused on the “optimal” degree of diversity leading to the fastest average population expansion in an environment fluctuating either in space or in time. We found that, contrarily to the well-mixed case, bet-hedging can be convenient in expanding populations. This result complements the study in [52] for a fixed habitat and supports the view that diversification is of broad importance for spatially-structured populations. For environments varying slowly in time, the expansion is relatively slow, and diverse communities can be optimal depending on the parameters. On the contrary, for fast environmental changes, the optimal population always adopts a unique strategy.

A remarkable outcome of our analysis is that spatial fluctuations create more opportunities for bet-hedging than temporal fluctuations, in that the region of parameter space where the optimal population is diverse, is always larger in the former case. One intuitive explanation is that in the case of spatial fluctuations, the population spends less time traversing favorable patches than adverse ones. This means that the beneficial effect of favorable patches is reduced with respect to the case of temporal fluctuations. Therefore, a pure risky strategy is less efficient in the case of spatial variability and can be more easily outcompeted by a diversified bet-hedging strategy.

The framework presented here can be extended to accommodate other scenarios. We have assumed that the fraction of individuals adopting each phenotype is fixed by the phenotypic switching rates. To understand the evolution of bet-hedging, it could be interesting to study scenarios in which the phenotypic switching rates are slower, so that phenotypes can be selected, and/or are themselves subject to evolution and selection [55, 69]. Another potentially relevant extension would be to consider two-dimensional habitats. Although the classic theory for Fisher waves [7, 8] is unaffected in higher dimensions, in the presence of spatial heterogeneity the front shape can become anisotropic, potentially affecting the results. Similarly, it would be interesting to analyze the combined effect of spatial and temporal variability. We also limited ourselves to the case where the different environments affect individual growth rates, whereas in general, one could also expect them to have an effect on motility [13, 14, 70–72], opening the way for different forms of bet-hedging. Finally, the present study was limited to pulled waves. It would be interesting to study the effect of bet-hedging on pushed waves, for example to describe population expansion in the presence of an Allee effect [73, 74].

It would be also interesting to experimentally test our results. Experiments of expanding bacterial colonies in non-homogeneous environments have already been performed and shed light, for example, on the evolution of antibiotic resistance in spatially-structured populations [75]. To perform experiments within the limits of our theory, a challenge can be to maintain the environmental variability sufficiently low to avoid exposing the population to an excessive evolutionary pressure. Similar problems appear, for example, in studies of range expansion of mutualistic bacteria [76]. An extension of the theory including both phenotypic and genetic diversity could account for these scenarios.

In summary, we have introduced a mathematical/computational model to understand conditions favoring diversification of an expanding population. Our work provides a bridge between the theory of bet-hedging and that of ecological range expansion described by reaction-diffusion equations. The results of the model highlight the relation between population diversity and fluctuations of the environment encountered during range expansion. The flexibility and generality of our framework make it a useful starting point for applications to a wide range of ecological scenarios.

## Supporting information

**S1 Appendix**. Here we provide several supplemental appendices: **Numerical integration of the Stochastic Fisher equation** where we describe in detail the methods applied for the integration of the wave equations of the two-phenotype model studied. **Effect of finite population size for spatially varying environments** where we study the effect of demographic stochasticity induced by the finite size of the population for spatially varying environments. (PDF)

## Acknowledgments

We acknowledge Steven D. Aird, R. Rubio de Casas, and Massimo Cencini for comments on a preliminary version of this manuscript. MAM is grateful to the Spanish-MINECO/AEIa for financial support (under grant ref. FIS2017–84256-P; FEDER funds).