## Abstract

Organisms in fluctuating environments must constantly adapt their behavior to survive. In clonal populations, this may be achieved through sensing followed by response or through the generation of diversity by stochastic phenotype switching. Here we show that stochastic switching can be favored over sensing when the environment changes infrequently. The optimal switching rates then mimic the statistics of environmental changes. We derive a relation between the long-term growth rate of the organism and the information available about its fluctuating environment.

Organisms adapt readily to regularly varying environments, for instance, by adjusting to the daily light cycles by using internal circadian clocks. Real problems arise when environmental fluctuations are irregular. Organisms can adapt to sudden changes in chemical composition, local temperature, or illumination by sensing the changes and responding appropriately, for example, by switching phenotype or behavior. But there is a cost: each individual must maintain active sensory machinery.

Population diversity offers an alternate way to adapt to randomly fluctuating environments. Different subsets of the total population may be well-adapted to different types of environments. In genetically clonal populations, phenotypic diversity is generated by stochastic phenotype-switching mechanisms (*1*–*9*). Examples include flagellin phase variation in *Salmonella enterica* (*6*); microsatellite length variation (slipped-strand mispairing), controlling the expression of contingency genes in *Haemophilus influenzae* (*2*, *4*); and swarming motility in *Bacillus subtilis* (*8*). The persistence mechanism in *Escherichia coli*, by which cells switch spontaneously and reversibly to a phenotype exhibiting slower growth and reduced killing by antibiotics (*9*), allows cells to survive prolonged exposure to antibiotics (*10*). Many other switching mechanisms are known in diverse bacteria (*2*, *7*), fungi (*1*–*3*), and slime molds (*1*).

The idea that randomization of phenotype can be advantageous in fluctuating environments is well established in the ecology and population genetics literature (where it is known as bet-hedging). This idea has found applications in diverse contexts (*11*), and it was previously analyzed in several theoretical and computational studies (*12*–*18*).

We consider two extreme types of phenotype switching: responsive switching (*R*), occurring as a direct response to an outside cue detected by a sensing mechanism, and spontaneous stochastic switching (*S*), occurring without any direct sensing of the environment. Within a theoretical model, we address several questions. First, under which circumstances should each mechanism be used? For instance, if the detection of a sudden unfavorable environmental change, or the subsequent response, would be too slow, then it could be advantageous to have a subpopulation ready in an appropriate phenotype, before the environmental change.

Second, what determines parameters such as the switching rates? Random environmental fluctuations experienced by a population over long periods can select among different genetic mechanisms for generating diversity. Organisms whose stochastic switching rates are better adjusted to environmental fluctuations can outgrow organisms that use a different set of switching parameters.

Finally, how does information gathered by organisms about the fluctuating environment affect their survival? The two types of switching differ markedly in this regard. For responsive switching, information about environmental changes is conveyed to the organism directly through the sensing mechanism; whereas for stochastic switching, it is conveyed indirectly by natural selection.

We consider a simple model that encompasses both responsive and stochastic switching and describes a clonal population growing in an environment that fluctuates in time among a finite number (*n*) of different environment types (Fig. 1). The fluctuating environment is a continuous-time stochastic process, , designating which environment occurs at time *t*; the average duration of environment *i* is τ_{i} (with the average over all environments equal to τ); the occurrence probability of environment *i* is *p*_{i}; and the probability that environment *i* follows *j* is *b*_{ij} (*b*_{ii} = 0).

Each individual organism is capable of exhibiting one of *n* different phenotypes. Phenotype *i* grows with rate in environment *k* (growth rates may be positive or negative). The phenotype with largest growth rate in environment *k* is phenotype *k* (its growth rate is ), and we refer to it as the fastest-growing phenotype and to all other phenotypes as slower phenotypes. Individuals may switch phenotype at any time, with parameters giving the switching rate from phenotype *j* to phenotype *i* in environment *k*.

Taking the simplest model of growth, the *n*-dimensional population vector, **x**(*t*), whose *i*th coordinate is the number of individuals with phenotype *i* at time *t*, obeys the following equation The matrix may be one of *n* different matrices, depending on the environment, . *A*_{k} can be written as a sum of a diagonal matrix, whose diagonal entries are the growth rates of each phenotype in environment , and the matrix of switching rates, (Fig. 1). The sum of all the entries of **x**(*t*) gives the total population size *N*(*t*)(*19*).

The two types of phenotype switching correspond to different choices of switching rates. For stochastic switching, these rates are independent of the environment *k*; therefore, for all values *k* For responsive switching, the sensing mechanism allows switching rates to depend strongly on *k*. In the extreme case, all phenotypes switch with the same rate *H*_{m} to phenotype *k* in environment *k*, so The switching rate *H*_{m} is physiologically determined but ideally as large as possible, so that individuals spend as little time as possible in slower phenotypes.

To compare the two types of switching, we calculate the so-called Lyapunov exponent Λ (*20*), which is the asymptotic growth rate of total population size (*21*, *22*) given by the large time limit of (1/*t*) log *N*(*t*). Λ is known to exist under relatively general conditions (*20*) and depends on both the organism (growth rates of its phenotypes and switching rates) and on the temporal sequence of the changing environment . In general, it is difficult to compute analytically, but we now describe an approximation that allows such computation for our model.

We assume that environmental durations are long enough that the population has time to reach its equilibrium composition before the environment changes. In environment *j*, this means that **x**(*t*) will eventually point essentially in the direction of the top eigenvector of the matrix *A*_{j}. Upon a change of environment from *j* to *i*, there will be a delay time, , during which the population's composition changes from its old structure (top eigenvector of *A*_{j}) to its new one (top eigenvector of *A*_{i}) (Fig. 1) (*23*). Thereafter, the population will grow at a rate given by the top eigenvalue of the matrix *A*_{i}, λ_{1}(*A*_{i}). This simple picture allows for computation of the Lyapunov exponent in the limit of long durations (*24*, *25*).

We find, in this limit, that Λ depends only on mean environmental durations τ_{i} and transition probabilities *b*_{ij} and is independent of other characteristics of environmental fluctuations (for example, the variance of environmental durations) (*24*). The biological implication is that a stochastic-switching organism is buffered against changes in the distribution of environmental variations, provided its environment does not fluctuate too quickly. We have verified this observation by simulation (fig. S1).

We now turn to the specific cases of responsive and stochastic switching. Because responsive switching requires a sensing apparatus in addition to the machinery of switching, we introduce the “cost of sensing” *c* to be the reduction of growth rates due to the presence of sensing machinery. We obtain the long-term growth rate for responsive switching and for stochastic switching (for small switching rates) where , and .

The general form of the expression for Λ is the same in both cases; only the origin of the second term is different. In stochastic switching, switching to slower phenotypes decreases Λ, incurring a “diversity cost”; in responsive switching, the “sensing cost” appears instead (*26*). The third term in both equations, the “delay-time cost,” has a similar form, and is due to the time it takes the population structure to change after a change of environment.

We can now find the switching rates *H*_{ij} that maximize Λ for a stochastic switching organism, using the above expression for Λ_{S} The optimal switching rate from phenotype *j* to *i* is proportional to the probability that the environment changes from environment *j* to *i* and inversely proportional to the average duration of environment *j*. Optimal rates are thus precisely tuned to environmental statistics (*14*, *27*).

The long-term growth rate for optimal switching is found to be where .The term *I*_{env} is the entropy, or information content, of the fluctuating environment (*28*). It measures how unpredictable or surprising are the different environmental transitions appearing in the time sequence . Even for optimal switching rates, the negative term –*I*_{env} is present in Λ_{S}, because stochastic-switching organisms cannot perfectly anticipate the next environment (except when *I*_{env} = 0). In contrast to responsive switching, which senses a new environment, the stochastic-switching organism cannot overcome the entropy of its environment.

The appearance of *I*_{env} explicitly in the optimal long-term growth rate of a population points to possibly deeper connections between the fields of population biology and information theory (*29*). For example, consider a stochastic-switching organism with suboptimal rates . These rates would be optimal in a varying environment with average durations and transition probabilities . This organism has inaccurate information about its environment, as reflected in its long-term growth rate being lower than Λ_{S}(optimal) by . The relative entropy (Kullback-Leibler divergence), , is the penalty paid for poor information about environmental transitions (*30*).

We may also consider stochastic switching with memory, i.e., when individuals remember the last few phenotypic switches that occurred in their ancestral history. Such memory is advantageous when the fluctuating environment exhibits longer correlations, i.e., when environmental transition probabilities depend on the last *m* environments. As in the case of sensing, there is a maximal cost for which memory is beneficial, which is related to the amount of information about the environment that such memory can reveal (*25*).

We now compare responsive and stochastic switching using long-term growth rates. If the cost of sensing, *c*, is small, responsive rather than stochastic switching will be favored. The maximal *c* for which sensing is advantageous is determined by the inequality Λ_{R} > Λ_{S}(optimal). We assume that fastest phenotypes have identical growth rates *f*, slower phenotypes have growth rates *f̃* (Δ ≡ *f* – *f̃*), and all environments have the same duration τ, and we find .

The greater the uncertainty of the environment (*I*_{env}), and the faster the responsive organism responds (*H*_{m}), the higher the maximal cost *c* for which sensing is beneficial. In other words, an organism can afford to pay more for a sensor the more uncertain its environment. The longer environments remain constant, however, the less it pays to have a sensor. Stochastic switching is therefore favored when environments change infrequently (*31*–*34*).

The Lyapunov exponent can be defined even when total population size is bounded, and our main results apply in that case as well, provided that all slower phenotypes are represented in the population (*25*). We have not considered the evolutionary process that adjusts the switching rates. Given enough time, natural selection should change *H*_{ij} values toward the optimum, effectively extracting information about environmental statistics and translating it into switching rates (*35*).

We presented an analytical calculation of growth rates for structured populations in fluctuating environments and showed explicitly that information about environmental statistics is of central importance in population dynamics.

**Supporting Online Material**

www.sciencemag.org/cgi/content/full/1114383/DC1

Materials and Methods

Fig. S1

References