## Figures

## 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. Bet-hedging in well-mixed populations is rather well understood. 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.

**Citation: **Villa Martín P, Muñoz MA, Pigolotti S (2019) Bet-hedging strategies in expanding populations. PLoS Comput Biol 15(4):
e1006529.
https://doi.org/10.1371/journal.pcbi.1006529

**Editor: **David Alonso,
Spanish Institution for Scientific Research (CSIC), SPAIN

**Received: **September 21, 2018; **Accepted: **March 26, 2019; **Published: ** April 18, 2019

**Copyright: ** © 2019 Villa Martín et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

**Data Availability: **All relevant data are within the manuscript and its Supporting Information files.

**Funding: **This study has been partially financed by the Consejería de Conocimiento, Investigación y Universidad, Junta de Andalucía and European Regional Development Fund (ERDF), ref. SOMM17/6105/UGR (to MAM). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

**Competing interests: ** The authors have declared that no competing interests exist.

## 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–11] also support this idea. Adaptive dispersal strategies [2] and small population sizes at the edges of expanding fronts [12, 13] are among the main reasons for such difference.

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 [14–19]. 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 [20–23]. Analyses of phenotypic diversity in motile cells suggest that it also may lead to a selective advantage at a population level [24–26]. Although several studies have tackled the problem of how individual variability affects population expansion [6, 9, 10, 27–31], systematic and predictive theory is still lacking [23].

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

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. We introduce a general population model and an example with two available phenotypes and two environmental states. We present an extensive study of this example. We then generalize the main conclusions obtained for the example for a case with an arbitrary number of environmental states, and then with also an arbitrary number of strategies. We conclude with a discussion and future perspectives.

## Models

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} *α*_{i} = 1 and 0 ≤ *α*_{i} ≤ 1 ∀*i* (Fig 1A). As customary in game theory, we say that a strategy is a “pure strategy” if *α*_{i} = *δ*_{ik} for some phenotype *k*, and a “mixed strategy” otherwise. We assume that the *α*_{i}’s remain constant in time within the population.

A) General model: individuals can adopt *N* different phenotypes with probabilities *α*_{j} (*j* = 1, ⋯, *N*) and experience *M* different environmental conditions with probabilities *p*_{i} (*i* = 1, ⋯, *M*). The fitness of an individual with phenotype *j* in an environment *i* is given by *s*_{ij}. B) Two-phenotypes model: Individuals can adopt either a “risky” or a “safe” phenotype with probabilities *α*, and 1 − *α* respectively. The safe phenotype is characterized by an environment-independent growth rate *s*_{s}. The growth rate of the risky phenotype is *s*_{a} or *s*_{b}, depending on whether the current environment is “adverse” (a) or “favorable” (b). C) and D) Sketch of range expansion in a population having 0 ≤ *α* ≤ 1 for temporally varying C) and spatially varying D) environments, respectively.

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*_{ij} ≥ 0 of phenotype *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
(1)

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 [41]. 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 [41, 56]. Since our interest is in diversification, the term “bet-hedging” will refer herein to diversifying bet-hedging.

Before presenting our results in full generality, weconsider 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*_{a} in environment (a) and *s*_{b} in environment (b) (Fig 1B) [57]. The two environments occur with the same probability, *p*_{a} = *p*_{b} = 1/2. A fraction of individuals *α* adopts the risky phenotype and the complementary fraction (1 − *α*) adopts the safe phenotype (Fig 1B). For this model, the population-averaged growth rate reads
(2)

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 *σ* reduces to the growth rate of the safe or risky phenotype, respectively.

## Results

### Two-phenotype, two-environment 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
(3)

In writing Eq (3), we used the assumption that the fraction *α* of the population adopting the risky phenotype remains constant in time (see [58, 59] for cases in which this assumption is relaxed). Eq (3) can be readily integrated, obtaining
(4)
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 [57].

This simple result illustrates an aspect of bet-hedging that is sometimes under-appreciated. In well-mixed systems, bet-hedging optimal strategies appear when the model includes at least one of the following ingredients: a) discrete generations, as in the seminal work of Kelly [42], b) finite switching rates among strategies [33, 59], or c) a delta-correlated environment [53]. Any of these ingredients can lead to nonlinearities in the average exponential growth rate, therefore opening the way for a non-trivial optimal strategy.

Note that, in this model, the frequency of environmental change does not play a role, as far as it is finite [53]. 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 [42]. 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, 60]:
(5)
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, we define an asymptotic mean velocity of the front as
(6)

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, 61]. Thus, the asymptotic mean velocity can be estimated as *v*_{M} = (*v*_{a} + *v*_{b})/2. Maximizing *v*_{M} with respect to *α*, we find that in this case, a bet-hedging optimal strategy exists under the conditions (Fig 2A):
(7)

Optimal strategy *α** as a function of growth rates and for range expansions in temporally varying environments under the limits of environmental change rate (A) *k* → 0, see Eq (7), and (B) *k* → ∞. In all panels, lines delimit the bet-hedging region 0 ≤ *α** ≤ 1. Two dots in the panels mark parameter values chosen for the analysis of Figs 3, 4 and 5.

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, similarly to the well-mixed case (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, see Fig 3B. 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. Note that, in the example of Fig 3B, the velocity corresponding to the optimal bet-hedging strategy is only a few percent larger than the velocity for *α* = 0. For other parameters values, we found velocities up to 15% larger than for pure strategies.

(A) Velocities obtained by numerical integration of Eq 5 for *s*_{a} = 0.75, *s*_{s} = 1, *s*_{b} = 3 (yellow dot of Fig 2) for different switching rates *k* shown in the figure legend. (B) The same for *s*_{a} = 0.25, *s*_{s} = 1, *s*_{b} = 2 (blue dot of Fig 2). In (A), the optimal strategy is *α* = 1 for all *k* values. In (B), bet-hedging optimal strategies appear depending on the value of *k*. The continuous red and yellow lines (both in A and B) illustrate analytical predictions under the two limits *v*_{M}(*k* → 0) = (*v*_{a}(*α*) + *v*_{b}(*α*))/2 and , respectively.

#### 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 Eq (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*_{S} *dx*. The switching rates from environment *a* to *b* and vice-versa are both equal to *k*_{S}. As above, we first analyze the two limits *k*_{S} → 0 and *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*_{a} or *v*_{b}, respectively. The mean traversed lengths Δ*x*_{a} and Δ*x*_{b} are equal for the two environments. On the other hand, the mean times spent in each of them, *t*_{a} and *t*_{b}, are different, and satisfy the relation
(8)

Therefore, in this case, the asymptotic mean velocity is given by the harmonic mean of the velocities in the two environments (9)

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

A) Optimal strategy *α** as a function of the parameters for spatially varying environments in the limit *k*_{s} → 0, Eq (9). White lines mark the limits of the bet-hedging region. The limit for which the strategy *α* = 1 is optimal in temporally fluctuating environments for *k* → 0 is also shown (gray line) for comparison. B) The velocity obtained by numerical integration of Eq (5) for *s*_{a} = 0.25, *s*_{s} = 1, *s*_{b} = 2 (corresponding to the blue dot of panel A) and different values of *k*_{S} shown in the figure legend. Light and dark gray lines correspond to the analytical limits for temporally varying environments, *v*_{M}(*k* → 0) = (*v*_{a}(*α*) + *v*_{b}(*α*))/2, and , respectively. The red curve is the analytical solution for a spatially fluctuating environment with *k*_{S} → 0, see Eq (9). Note that in this case, the asymptotic mean velocity does not increase monotonically with *k*_{S} but is maximal at *k*_{S} ≈ 0.1.

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 [15, 16]. The corresponding optimal strategy is the same as in Fig 2C, so that there is no bet-hedging regime.

We numerically solved Eq (5) for intermediate values of *k*_{S} and obtained the mean asymptotic velocities as a function of *α*, see Fig 4B. Results support theoretical predictions in the limiting cases *k*_{S} → 0 and *k*_{S} → ∞. In this case, we observe a non-monotonic behavior of *v*_{M} as a function of *k*_{S}, 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.

#### Effect of finite population size.

The deterministic Fisher Eq (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
(10)
see e.g. [62]. 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 [63–65]. A detailed description of our integration scheme is presented in the Supporting S1 Appendix.

For a Fisher wave propagating in a homogeneous environment, demographic noise leads to a reduced front velocity *v* with respect to the deterministic case [60, 64, 66, 67]
(11)
where *C* is a constant, *N* is the maximum population size per unit length, and is the Fisher velocity in the absence of demographic noise. Eq (11) is valid in the weak noise limit; for the corresponding strong noise expression, see [68]. 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 S2 Appendix). Finally, we remark that the effect of finite population size on well-mixed bet-hedging populations has been studied in the literature [33, 57–59, 69, 70].

(A) Asymptotic mean velocities obtained by numerical integration of the stochastic Fisher Eq (10) for , *s*_{s} = 0.01, (yellow dot of Fig 2) and different population sizes. (B) The same for , *s*_{s} = 1, (blue dot of Fig 2). In both panels, the temporal switching rate of the environment is *k* = 0.001. Green dots corresponds to the results of Fig 3A and 3B for *k* = 0.001. Insets show a collapse of the curves according to Eq (11), with a fitted value of *C* = 3.

### Two-phenotype, multiple-environment model

In this section, we generalize our results to a model with two strategies, but an arbitrary number *i* = 1…*N* of environmental states. Let us start with the temporally varying case. Following the usual logic, the mean velocity for *k* → 0 reads
(12)
where *s*_{i1} and *s*_{i2} are the growth rates of the two strategies in environment *i*. The first derivative of the mean velocity respect to *α* reads
(13)

Since *v*(*α*) is a concave function, the condition for having a bet-hedging strategy, i.e. a maximum in the interior of the interval (0, 1) is
(14)

These conditions reduce to the Eq (7) in the limiting case of the two-environment model. With a similar strategy we can compute the limits of the bet-hedging region also for the spatially varying case. In this case we have (15) and therefore (16)

To determine the bet-hedging region we follow the same logic as in the temporally varying case, yielding (17) so that the condition in this case reads (18)

Even in this case, the bet-hedging region is broader in the spatially-fluctuating than in the temporally-fluctuating case. This fact is proven in full generality in the next subsection.

### General bet-hedging model

In this Section, we demonstrate that our main conclusions hold in full generality for arbitrary numbers of phenotypes *N* and environmental states *M* (see Section Model). 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 , regardless of whether the environmental fluctuations depend on time or space. Therefore, the optimal strategy maximizes the linear function of the *α*_{i}s 〈*σ*〉 and is therefore a pure strategy as discussed after Eq (1).

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 the two-strategy, two-environment model, the optimal strategy maximizes
(19)
where *σ*_{i} = ∑_{j} *s*_{ij} *α*_{j}. For spatially varying environments, the optimal strategy maximizes the harmonic mean
(20)

Both for Eqs (19) and (20), maximization has to be performed with the constraint ∑_{j} *α*_{j} = 1 and 0 ≤ *α*_{j} ≤ 1 ∀*j*. We recall that the bet-hedging regime is the region of parameter space where the optimal solution is a mixture of all phenotypes, *α*_{i} > 0 ∀*i*. Here we show that if, for a given choice of the *s*_{ij}’s and *p*_{i}’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 [71]. We introduce the gradients
(21)
where 〈*x*〉 = ∑_{i} *p*_{i} *x*_{i} is the average over environments. We now associate replicator equations to Eqs (19) and (20):
(22) (23)

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 *α*_{l} ≪ 1. Brouwer’s fixed point theorem ensures that, under this condition, there must be a fixed point in the interior (see [71], 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 *σ* = ∑_{j} *s*_{ij} *α*_{j} does not depend on *α*_{l}, and therefore, *σ* and *s*_{l} are uncorrelated random variables respect to the average over the environment. Since , this means that the sign of is the same than the quantity
(24)

Following the same logic, the sign of is the same than (25)

This means that, in the general case, the bet-hedging region is defined by the conditions (26)

We now turn to the demonstration that the bet-hedging region in the spatially varying case is always broader than in the temporally varying case. Since 〈*s*_{l}〉 > 0, we need to demonstrate that the following inequality always holds
(27)

This can be proven from the chain of inequalities (28)

In Eq (28), 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 (28), since *s* > 0, we can use the result 〈*x*^{i}〉 ≥ 〈*x*^{j}〉^{i/j} proved for *i* > *j* in [72]. 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 (28). 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, i.e. the bet-hedging region shrinks to a set of measure zero. 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.

## Discussion

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 [20–23], bacterial infections [24–26, 73], 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 [20–26]. 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 [74].

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 [53] 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 [57, 70]. 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 [14, 15, 75–77], 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 [78, 79].

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 [80]. 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 [81]. An extension of the theory including both phenotypic and genetic diversity could account for these scenarios.

In summary, we have introduced a 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. 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.

https://doi.org/10.1371/journal.pcbi.1006529.s001

(PDF)

### S2 Appendix. 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.

https://doi.org/10.1371/journal.pcbi.1006529.s002

(PDF)

## Acknowledgments

We acknowledge Steven D. Aird, R. Rubio de Casas, and Massimo Cencini for comments on a preliminary version of this manuscript.

## References

- 1. Ramachandran S, Deshpande O, Roseman CC, Rosenberg NA, Feldman MW, Cavalli-Sforza LL. Support from the relationship of genetic and geographic distance in human populations for a serial founder effect originating in Africa. Proceedings of the National Academy of Sciences of the United States of America. 2005;102(44):15942–15947. pmid:16243969
- 2. Duckworth RA. Adaptive dispersal strategies and the dynamics of a range expansion. The American Naturalist. 2008;172(S1):S4–S17. pmid:18554143
- 3. Wolfe AJ, Berg HC. Migration of bacteria in semisolid agar. Proceedings of the National Academy of Sciences. 1989;86(18):6973–6977.
- 4. Hallatschek O, Hersen P, Ramanathan S, Nelson DR. Genetic drift at expanding frontiers promotes gene segregation. Proceedings of the National Academy of Sciences. 2007;104(50):19926–19930.
- 5. Mayor R, Etienne-Manneville S. The front and rear of collective cell migration. Nature reviews Molecular cell biology. 2016;17(2):97. pmid:26726037
- 6. Fu X, Kato S, Long J, Mattingly HH, He C, Vural DC, et al. Spatial self-organization resolves conflicts between individuality and collective migration. Nature communications. 2018;9(1):2177. pmid:29872053
- 7. Fisher RA. The wave of advance of advantageous genes. Annals of Human Genetics. 1937;7(4):355–369.
- 8. Kolmogorov A, Petrovskii I, Piskunov N. A study of the diffusion equation with increase in the amount of substance, and its application to a biological problem. Selected Works of AN Kolmogorov I. 1937; p. 248–270.
- 9. Neubert MG, Caswell H. Demography and dispersal: calculation and sensitivity analysis of invasion speed for structured populations. Ecology. 2000;81(6):1613–1628.
- 10. Bartoń K, Hovestadt T, Phillips B, Travis J. Risky movement increases the rate of range expansion. Proceedings of the Royal Society of London B: Biological Sciences. 2012;279(1731):1194–1202.
- 11.
Mendez V, Fedotov S, Horsthemke W. Reaction-transport systems: mesoscopic foundations, fronts, and spatial instabilities. Springer Science & Business Media; 2010.
- 12. Waters JM, Fraser CI, Hewitt GM. Founder takes all: density-dependent processes structure biodiversity. Trends in ecology & evolution. 2013;28(2):78–85.
- 13. Hallatschek O, Nelson DR. Gene surfing in expanding populations. Theoretical population biology. 2008;73(1):158–170. pmid:17963807
- 14. Shigesada N, Kawasaki K, Teramoto E. Spatial segregation of interacting species. Journal of Theoretical Biology. 1979;79(1):83–99. pmid:513804
- 15. Shigesada N, Kawasaki K, Teramoto E. Traveling periodic waves in heterogeneous environments. Theoretical Population Biology. 1986;30(1):143–160.
- 16.
Shigesada N, Kawasaki K. Biological invasions: theory and practice. Oxford University Press, UK; 1997.
- 17. Hastings A, Cuddington K, Davies KF, Dugaw CJ, Elmendorf S, Freestone A, et al. The spatial spread of invasions: new developments in theory and evidence. Ecology Letters. 2005;8(1):91–101.
- 18. Schreiber SJ, Lloyd-Smith JO. Invasion dynamics in spatially heterogeneous environments. The American Naturalist. 2009;174(4):490–505. pmid:19737109
- 19. Dewhirst S, Lutscher F. Dispersal in heterogeneous habitats: thresholds, spatial scales, and approximate rates of spread. Ecology. 2009;90(5):1338–1345. pmid:19537553
- 20. Wolf M, Weissing FJ. Animal personalities: consequences for ecology and evolution. Trends in ecology & evolution. 2012;27(8):452–461.
- 21. Sih A, Cote J, Evans M, Fogarty S, Pruitt J. Ecological implications of behavioural syndromes. Ecology letters. 2012;15(3):278–289. pmid:22239107
- 22. Chapple DG, Simmonds SM, Wong BB. Can behavioral and personality traits influence the success of unintentional species introductions? Trends in Ecology & Evolution. 2012;27(1):57–64.
- 23. Carere C, Gherardi F. Animal personalities matter for biological invasions. Trends in ecology & evolution. 2013;28(1):5–6.
- 24. Frankel NW, Pontius W, Dufour YS, Long J, Hernandez-Nunez L, Emonet T. Adaptability of non-genetic diversity in bacterial chemotaxis. Elife. 2014;3:e03526.
- 25. Dufour YS, Fu X, Hernandez-Nunez L, Emonet T. Limits of feedback control in bacterial chemotaxis. PLoS computational biology. 2014;10(6):e1003694. pmid:24967937
- 26. Dufour YS, Gillet S, Frankel NW, Weibel DB, Emonet T. Direct correlation between motile behavior and protein abundance in single cells. PLoS computational biology. 2016;12(9):e1005041. pmid:27599206
- 27. Fogarty S, Cote J, Sih A. Social personality polymorphism and the spread of invasive species: a model. The American Naturalist. 2011;177(3):273–287. pmid:21460537
- 28. Ben-Jacob E, Cohen I, Levine H. Cooperative self-organization of microorganisms. Advances in Physics. 2000;49(4):395–554.
- 29. Keller EF, Segel LA. Traveling bands of chemotactic bacteria: a theoretical analysis. Journal of theoretical biology. 1971;30(2):235–248. pmid:4926702
- 30. Lin TC, Wang ZA. Development of traveling waves in an interacting two-species chemotaxis model. Discrete Continuous Dynamical Systems Series A. 2014;34(7):2907–2927.
- 31. Emako C, Gayrard C, Buguin A, de Almeida LN, Vauchelet N. Traveling pulses for a two-species chemotaxis model. PLoS computational biology. 2016;12(4):e1004843. pmid:27071058
- 32. Veening JW, Smits WK, Kuipers OP. Bistability, epigenetics, and bet-hedging in bacteria. Annu Rev Microbiol. 2008;62:193–210. pmid:18537474
- 33. Kussell E, Leibler S. Phenotypic diversity, population growth, and information in fluctuating environments. Science. 2005;309(5743):2075–2078. pmid:16123265
- 34. Wolf DM, Vazirani VV, Arkin AP. Diversity in times of adversity: probabilistic strategies in microbial survival games. Journal of theoretical biology. 2005;234(2):227–253. pmid:15757681
- 35. Wolf DM, Vazirani VV, Arkin AP. A microbial modified prisoner’s dilemma game: how frequency-dependent selection can lead to random phase variation. Journal of theoretical biology. 2005;234(2):255–262. pmid:15757682
- 36. Solopova A, van Gestel J, Weissing FJ, Bachmann H, Teusink B, Kok J, et al. Bet-hedging during bacterial diauxic shift. Proceedings of the National Academy of Sciences. 2014;111(20):7427–7432.
- 37. Stumpf MP, Laidlaw Z, Jansen VA. Herpes viruses hedge their bets. Proceedings of the National Academy of Sciences. 2002;99(23):15234–15237.
- 38. Rouzine IM, Weinberger AD, Weinberger LS. An evolutionary role for HIV latency in enhancing viral transmission. Cell. 2015;160(5):1002–1012. pmid:25723173
- 39.
Childs DZ, Metcalf C, Rees M. Evolutionary bet-hedging in the real world: empirical evidence and challenges revealed by plants. Proceedings of the Royal Society of London B: Biological Sciences. 2010; p. rspb20100707.
- 40. Hidalgo J, de Casas RR, Muñoz MÁ. Environmental unpredictability and inbreeding depression select for mixed dispersal syndromes. BMC evolutionary biology. 2016;16(1):71. pmid:27044655
- 41. Hopper KR. Risk-spreading and bet-hedging in insect population biology. Annual review of entomology. 1999;44(1):535–560. pmid:15012381
- 42.
Kelly JL Jr. A new interpretation of information rate. In: The Kelly Capital Growth Investment Criterion: Theory and Practice. World Scientific; 2011. p. 25–34.
- 43. Fernholz R, Shay B. Stochastic portfolio theory and stock market equilibrium. The Journal of Finance. 1982;37(2):615–624.
- 44.
Smith JM. Evolution and the Theory of Games. In: Did Darwin Get It Right? Springer; 1988. p. 202–215.
- 45.
Nowak MA. Evolutionary dynamics. Harvard University Press; 2006.
- 46. Harmer GP, Abbott D. Game theory: Losing strategies can win by Parrondo’s paradox. Nature. 1999;402(6764):864.
- 47. Parrondo JM, Harmer GP, Abbott D. New paradoxical games based on Brownian ratchets. Physical Review Letters. 2000;85(24):5226. pmid:11102227
- 48. de Jong IG, Haccou P, Kuipers OP. Bet hedging or not? A guide to proper classification of microbial survival strategies. Bioessays. 2011;33(3):215–223. pmid:21254151
- 49.
Williams PD, Hastings A. Paradoxical persistence through mixed-system dynamics: towards a unified perspective of reversal behaviours in evolutionary ecology. Proceedings of the Royal Society of London B: Biological Sciences. 2011; p. rspb20102074.
- 50. Comins HN, Hamilton WD, May RM. Evolutionarily stable dispersal strategies. Journal of theoretical Biology. 1980;82(2):205–230. pmid:7374178
- 51. Hamilton WD, May RM. Dispersal in stable habitats. Nature. 1977;269(5629):578.
- 52. Jansen VA, Yoshimura J. Populations can persist in an environment consisting of sink habitats only. Proceedings of the National Academy of Sciences. 1998;95(7):3696–3698.
- 53. Hidalgo J, Pigolotti S, Munoz MA. Stochasticity enhances the gaining of bet-hedging strategies in contact-process-like dynamics. Physical Review E. 2015;91(3):032114.
- 54. Rajon E, Venner S, Menu F. Spatially heterogeneous stochasticity and the adaptive diversification of dormancy. Journal of evolutionary biology. 2009;22(10):2094–2103. pmid:19732261
- 55. Schnedler-Meyer NA, Pigolotti S, Mariani P. Evolution of Complex Asexual Reproductive Strategies in Jellyfish. The American Naturalist. 2018;192(1):000–000.
- 56. Den Boer PJ. Spreading of risk and stabilization of animal numbers. Acta biotheoretica. 1968;18(1-4):165–194. pmid:4984481
- 57. Hufton PG, Lin YT, Galla T. Phenotypic switching of populations of cells in a stochastic environment. Journal of Statistical Mechanics: Theory and Experiment. 2018;2018(2):023501.
- 58. Ashcroft P, Altrock PM, Galla T. Fixation in finite populations evolving in fluctuating environments. Journal of The Royal Society Interface. 2014;11(100):20140663.
- 59. Hufton PG, Lin YT, Galla T, McKane AJ. Intrinsic noise in systems with switching environments. Physical Review E. 2016;93(5):052119. pmid:27300842
- 60. Van Saarloos W. Front propagation into unstable states. Physics reports. 2003;386(2-6):29–222.
- 61.
Cencini M, Lopez C, Vergni D. Reaction-diffusion systems: front propagation and spatial structures. In: TheKolmogorov Legacy in Physics. Springer; 2003. p. 187–210.
- 62. Korolev KS, Avlund M, Hallatschek O, Nelson DR. Genetic demixing and evolution in linear stepping stone models. Reviews of modern physics. 2010;82(2):1691. pmid:21072144
- 63. Dornic I, Chaté H, Munoz MA. Integration of Langevin equations with multiplicative noise and the viability of field theories for absorbing phase transitions. Physical review letters. 2005;94(10):100601. pmid:15783467
- 64. Moro E. Numerical schemes for continuum models of reaction-diffusion systems subject to internal noise. Physical Review E. 2004;70(4):045102.
- 65. Weissmann H, Shnerb NM, Kessler DA. Simulation of spatial systems with demographic noise. Physical Review E. 2018;98(2):022131. pmid:30253529
- 66. Brunet É, Derrida B. Effect of microscopic noise on front propagation. Journal of Statistical Physics. 2001;103(1-2):269–282.
- 67. Moro E. Internal fluctuations effects on Fisher waves. Physical Review Letters. 2001;87(23):238303. pmid:11736481
- 68. Hallatschek O, Korolev K. Fisher waves in the strong noise limit. Physical Review Letters. 2009;103(10):108103. pmid:19792344
- 69. Rivoire O, Leibler S. The value of information for populations in varying environments. Journal of Statistical Physics. 2011;142(6):1124–1166.
- 70. Xue B, Leibler S. Evolutionary learning of adaptation to varying environments through a transgenerational feedback. Proceedings of the National Academy of Sciences. 2016;113(40):11266–11271.
- 71.
Hofbauer J, Sigmund K. Evolutionary games and population dynamics. Cambridge university press; 1998.
- 72. Kapur J, Rani A. Testing the consistency of given values of a set of moments of a probability distribution. J Bihar Math Soc. 1995;16:51–63.
- 73. Jones SE, Lennon JT. Dormancy contributes to the maintenance of microbial diversity. Proceedings of the National Academy of Sciences. 2010;107(13):5881–5886.
- 74. Møller AP, Garamszegi LZ. Between individual variation in risk-taking behavior and its life history consequences. Behavioral Ecology. 2012;23(4):843–853.
- 75. Pigolotti S, Benzi R. Selective advantage of diffusing faster. Physical review letters. 2014;112(18):188102. pmid:24856726
- 76. Pigolotti S, Benzi R. Competition between fast-and slow-diffusing species in non-homogeneous environments. Journal of theoretical biology. 2016;395:204–210. pmid:26872715
- 77. Gueudré T, Dobrinevski A, Bouchaud JP. Explore or exploit? A generic model and an exactly solvable case. Physical review letters. 2014;112(5):050602. pmid:24580581
- 78. Gandhi SR, Yurtsev EA, Korolev KS, Gore J. Range expansions transition from pulled to pushed waves as growth becomes more cooperative in an experimental microbial population. Proceedings of the National Academy of Sciences. 2016;113(25):6922–6927.
- 79. Birzu G, Hallatschek O, Korolev KS. Fluctuations uncover a distinct class of traveling waves. Proceedings of the National Academy of Sciences. 2018;115(16):E3645–E3654.
- 80. Baym M, Lieberman TD, Kelsic ED, Chait R, Gross R, Yelin I, et al. Spatiotemporal microbial evolution on antibiotic landscapes. Science. 2016;353(6304):1147–1151. pmid:27609891
- 81. Müller MJ, Neugeboren BI, Nelson DR, Murray AW. Genetic drift opposes mutualism during spatial population expansion. Proceedings of the National Academy of Sciences. 2014;111(3):1037–1042.