Enzyme regulation and mutation in a model serial dilution ecosystem

Microbial communities are ubiquitous in nature and come in a multitude of forms, ranging from communities dominated by a handful of species to communities containing a wide variety of metabolically distinct organisms. This huge range in diversity is not a curiosity - microbial diversity has been linked to outcomes of substantial ecological and medical importance. However, the mechanisms underlying microbial diversity are still under debate, as simple mathematical models only permit as many species to coexist as there are resources. A plethora of mechanisms have been proposed to explain the origins of microbial diversity, but many of these analyses omit a key property of real microbial ecosystems: the propensity of the microbes themselves to change their growth properties within and across generations. In order to explore the impact of this key property on microbial diversity, we expand upon a recently developed model of microbial diversity in fluctuating environments. We implement changes in growth strategy in two distinct ways. First, we consider the regulation of a cell's enzyme levels within short, ecological times, and second we consider evolutionary changes driven by mutations across generations. Interestingly, we find that these two types of microbial responses to the environment can have drastically different outcomes. Enzyme regulation may collapse diversity over long enough times while, conversely, strategy-randomizing mutations can produce a"rich-get-poorer"effect that promotes diversity. This work makes explicit, using a simple serial-dilutions framework, the conflicting ways that microbial adaptation and evolution can affect community diversity.


INTRODUCTION
Microbial communities are a key component of nearly every ecosystem, ranging from arctic sediments [1] to the human digestive tract [2]. The composition of these communities can vary dramatically, ranging from communities dominated by a small number of metabolically similar organisms [3], to communities composed of hundreds of metabolically diverse organisms [4][5][6]. Even within a given type of ecosystem there can exist substantial variation in community form [3]. This huge variation in microbial diversity is not merely a theoretical curiosity, having been linked to outcomes ranging from ecosystem stability to the results of medical treatments [7][8][9][10]. Thus, to better understand and engineer ecosystems, a strong theoretical understanding of the drivers of microbial diversity is required.
Early theoretical work on ecological diversity led to the competitive exclusion principle, a prediction that the number of coexisting species in an ecosystem at steady state will not exceed the number of nutrients [11,12]. However, it became apparent that many communities sustain diversity far in excess of what is predicted by competitive exclusion, famously exemplified by Hutchinson's "paradox of the plankton" [13]. This apparent clash between theory and observations has led to decades of The majority of the theoretical work on microbial diversity has relied on a chemostat framework in which nutrients are continuously supplied [26]. Often, however, in both natural and experimental microbial ecosystems nutrients are supplied at time intervals, instead of being constantly supplied. In natural ecosystems, this reflects the passage of seasons [2] or other environmental fluctuations. In experimental ecosystems, this reflects the commonly used serial dilution protocol in which microbes are periodically diluted and supplied with a fresh bolus of nutrients [27,28]. Thus, further theoretical work is needed to understand diversity in systems where nutrients are supplied in a non-constant manner.
Recently, we considered diversity in a serial dilution ecology consisting of microbes competing for multiple nutrients [23]. Each species was defined by a strategy vector which quantifies its ability to uptake different nutrients. In the framework we had proposed, each species had a fixed and unchangeable 'enzyme budget' it allocated. Strikingly, we found that unlike steady-state ecosystems, diversity was strongly dependent on the amount of nutrient supplied to the community, and that the changes in diversity could be understood as arising from an 'early-bird effect'. In this early-bird effect, a species whose strategy allows it consume the most easily available nutrients gains an early population advantage and is then able to outcompete competitors for less-available nutrients, even if the early-bird species is a less efficient consumer of the latter. This effect is generally strengthened with increasing nutrient supply, though in certain cases the effect can be eliminated by saturating concentrations of nutrients. As a result, the long-term community composition depends on the amount of nutrients supplied to the ecosystem. If the early-bird species is abundant at low nutrient supply, this effect leads to a decreasing community diversity with increasing nutrient supply, with the opposite occurring if the early-bird species is lowabundance at low nutrient levels. In more complex scenarios this effect can lead to non-monotonic relationships between diversity and nutrient supply.
In our previous investigations of serial-dilution models, the metabolic strategy of each species was unchanging throughout time. However, in reality, microbes can and do change their nutrient uptake strategies over both ecological and evolutionary timescales. On ecological timescales, bacteria have the ability to regulate their enzyme production, thus responding to environmental changes by shifting their strategy [29,30]. On evolutionary timescales, random mutations can lead to hardwired changes in the strategies of bacterial species [31][32][33]. How might such changes in metabolic strategies impact microbial diversity?
In this work, we probe how both adaptation through enzyme regulation and mutation influence diversity in a serial dilution ecosystem. We find that these two forms of response to environmental pressures produce substantially different results. Mutations increase diversity relative to a model with unchanging metabolic strategies, particularly so when there is a large amount of growth between dilutions. In contrast, we find that diversity in a stable community can be curtailed by the addition of a species capable of sensing ambient nutrient concentration and thereby regulating its enzyme strategy. Interestingly, the destruction of diversity by such an adapter species occurs on an emergent timescale, which can be much longer than any intrinsic timescale directly appearing in the dynamics.

RESULTS
The models that we explore in this paper are built on a generalized serial dilution framework in which m species compete for p nutrients within a series of recurring batches. Beginning each batch, a bolus of nutrients is provided such that c 0 = p i c i (0), where c i (0) is the concentration of nutrient i at time 0, measured from the beginning of the batch. At the same time 0, microbes are seeded into the batch in an inoculum of species such that ρ 0 = m σ ρ σ (0), where ρ σ (t) is the biomass concentration of species σ at time t from the beginning of the batch. After all nutrients are exhausted within a batch, a new batch is initialized with the same nutrient bolus and an inoculum of total concentration ρ 0 whose composition is proportional to the species composition at the end of the previous batch. In short, we inoculate each batch with microbes and nutrient, wait for the microbes to consume the nutrient, and then dilute the resulting species composition to use as the inoculum for the next batch, and so forth. A species, indexed by σ, is defined by its strategy vector α σ = (α σ,1 , ..., α σ,p ), where α σ,i is the maximum uptake rate of nutrient i for species σ. The uptake rates are defined by Monod functions, j σ,i = ci Ki+ci α σ,i , where j σ,i is the uptake rate of nutrient i by species σ and K i is the half-saturation constant of nutrient i. For simplicity, we assume that K i ≡ K (we explored unequal K i in [23]). From the uptake rates, we can define the nutrient and population dynamics within a batch: These dynamics are represented graphically in Fig. 1A. The "steady state" of this deterministic ODE system is not a single fixed point, but instead an entire batch timecourse such that the relative species abundance at the beginning and end of the batch are identical. Explicitly, at steady state, whereas within a batch d dt = 0, the inoculum, ρ σ (t = 0), does not change from one batch to the next.
Microorganisms typically operate near their biophysical limits [34], capping their total protein-production capacity. Since capacity must be allocated for a multitude of essential cellular processes, microbes have a limited capacity to manufacture the enzymes used to consume nutrients. Roughly speaking, one would expect that microbes which are found to coexist would evolve similar metabolic enzyme production capacities. We take this viewpoint, thereby constraining our model to a fixed total amount of enzymes in the strategy vector: E = i α σ,i = const for all species (relaxing this constraint leads to extinction of species with lower enzyme budgets and, depending on the other timescales in the system, determines the long-term diversity [23]). The fixed sum means that the strategies of different species can be represented on a simplex, shown as circles in Fig.  1B and C, with the relative composition of the nutrient bolus represented as a black diamond.
In our earlier work [23], we extensively characterized the behavior of this model when the metabolic strategies of the species are fixed over time. When the nutrient bolus is small (c 0 /K 1), we found that the serial dilution ecosystem behaves in a chemostat-like manner. In this limit, the system can support an unlimited number of coexisting species as long as the convex hull of the strategies (visualized in two dimensions as stretching a rubber band around the strategies) contains the nutrient composition. Examples of communities where this condition is met are shown in Fig. 1B and C. We found that as more nutrient is provided to the system, i.e., the bolus size c 0 grows larger, this convex hull rule still applies but with 'remapped' convex hull nodes. These remapped nodes generally differ from the original strategies and move as a function of bolus and inoculum size. This remapping can lead to large shifts in community diversity, with the direction of the shift determined by ecosystem details.
Enzyme regulation. Bacteria are able to dynamically control the levels of their enzymes in response to changes in the environment [29]. How would such regulation impact population dynamics in our model? To address this question, we introduce into our model an organism with the ability to reallocate its enzyme budget, and we call it the adapter. The adapter's enzyme pool is continuously diluted by growth -typically in nature when a bacterial cell divides, approximately half the enzyme content goes to each daughter. We consider the enzymes as continuously replenished with newly produced enzymes, and the adapter is able to select which type(s) of enzyme to produce. In general, for a given nutrient environment increasing one type of enzyme will yield the greatest increase in growth rate, so we consider the adapter to produce one type of enzyme at a time. As a result, the model equations are now generalized to allow the adapter's enzyme composition to have dynamics, accord- where σ * indexes the adapter species and P σ * ,i is an indicator function that is unity when the adapter is producing enzyme i.
We consider a two-nutrient case (p = 2) in which the adapter switches its enzyme production to match the most abundant nutrient, as shown in Fig. 2A. The adapter senses a relative difference, ∆, between the two nutrients, defined as ∆ = c1−c2 max (c1,c2) . To model sensory uncertainty, the adapter can only respond to relative differences above a certain magnitude, ∆ c . We Each cycle of batch growth begins with a cellular biomass density ρ0 and total nutrient concentration c0. The system evolves according to Eqs. 1-2 until nutrients are completely consumed. A fraction of the total cellular biomass is then used to inoculate the next batch again at density ρ0. (B ) Representation of particular enzyme-allocation strategies {ασ} (colored circles) and nutrient supply composition ci/c0 (black diamond) on a 2-nutrient simplex, where the right endpoint corresponds to c1/c0 = 1. (C ) Representation of particular strategies (circles) and nutrient supply (black diamond) on a 3-nutrient simplex. Dashed blue -the convex hull of the enzyme-allocation strategies. Here, the nutrient supply (black diamond) is inside the convex hull, implying coexistence of all species in the chemostat limit (see text). assume that the time between batches is short enough that the adapter maintains both its enzymes levels and enzyme-production state between batches. This ability to sense the environment and modify its enzyme production allows the adapter to better exploit any early-bird advantages it gains. The adapter can modify its enzyme strategy to efficiently consume initially abundant nutrients and then further modify its strategy to consume the remaining nutrients. As a result, the adapter will have a fitness advantage over non-adapters if the changes in nutrient availability exceed its sensing tolerance. Thus, adaptation in our model can lead to diauxie -a widely observed phenomenon in which different nutrient types are consumed in sequence rather than simultaneously (see Appendix Fig. 4).
How does a community of non-adapters respond to sudden invasion by an adapter? To explore this, we allowed communities of 21 non-adapter species to reach steady state before replacing a fraction of the community biomass with an adapter. We tested a wide range of initial community and adapter parameters and show four different invasion outcomes in Fig. 2B-E. Despite enzyme regulation occurring on very short timescales (on the scale of the adapter's doubling time), we find that the adapter introduces an emergent long timescale over which the community population changes. In the exam- Schematic of adapter control scheme. The adapter changes which enzyme it produces in response to changing nutrient concentration. If the relative difference between the two nutrients is greater than the sensing threshold ∆c, it switches production to the enzyme corresponding to the more abundant nutrient. (B -E ) Representative long-term dynamics of serial dilution communities after the addition of an adapter. The adapter population is shown by the dashed red curve. Communities containing 21 species with equally spaced strategies (cf. Fig 1B) were allowed to reach steady state before the community was perturbed by an invasion that replaced 35% of the community biomass with an adapter. (B ) Community growing with ρ0 = c0 = 1, and Nutrient 1 fraction = 0.7 invaded by an adapter with ∆c = 0.02. (C ) Community: ρ0 = 1, c0 = 10 2 , and Nutrient 1 fraction = 0.55; adapter: ∆c = 0.25. (D) Community: ρ0 = 1, c0 = 10 2 , and Nutrient 1 fraction = 0.55; adapter: ∆c = 0.02. (E ) Community: ρ0 = 1, c0 = 10 3 , and Nutrient 1 fraction = 0.55; adapter: ∆c = 0.25. All communities simulated with K = 1 ples, this new timescale is on the order of 10 3 batches, substantially longer than the ∼10 batches required for the initial communities to come to steady state. Moreover, this new timescale can be made even longer by starting with a smaller initial adapter biomass.
The post-invasion steady states of the communities can vary based on initial community and adapter parameters. In many cases, after being invaded the ecosystem gradually moves towards extinction of most of the nonadapter species, as is shown in Fig. 2B,D,E. However, in certain cases, such as that in Fig. 2C, the adapter can coexist with the non-adapter community. This out-come occurs when the community becomes organized such that ∆ < ∆ c ∀t within a batch. In other words, diversity is robust to adapter invasion if the community self-organizes to a state where the relative difference between the two nutrients never exceeds the adapter threshold tolerance. Under these conditions, the adapter loses the ability to switch its enzyme production and effectively becomes locked as a non-adapter specialist, i.e. consuming only one type of nutrient.. Therefore, the community of non-adapting species may lock the adapter into a fixed state thereby eliminating its inherent advantage over non-adapting species. In addition to reaching various final steady states, the dynamics of this system en route to steady state can also vary widely. For example, in Fig. 2B there is a monotonic decrease in non-adapter abundances. In contrast, the non-adapter dynamics in Fig. 2C-E are non-monotonic, with the abundance profile of the non-adapters being inverted multiple times in Fig. 2D The adapter's slow takeover of communities indicates that enzyme regulation confers a small fitness advantage. This advantage may be offset by the cost of sensing and responding to environmental conditions -a cost which we do not model here. Moreover, as in the case with unequal enzyme budgets, the ecological relevance of the timescale introduced by the adapter will depend on other timescales in the system, such as that introduced by immigration. Furthermore, the effect of an adapter may be mitigated by noisy population dynamics: an invading adapter with a small population is sensitive to random extinctions, as the adapter's fitness is only slightly greater than that of the residents. In summary, though an adapter has a fitness advantage, it is not guaranteed that this advantage will translate to the adapter taking over the system.
Mutation-Selection Balance. To bring in one of the main drivers of diversity in the wild, we extend our model to include mutations and the resulting mutation-selection balance. Specifically, we introduce mutations as random changes in metabolic strategy [31]. Essentially, instead of allowing a single adapter species to modify its strategy, we let the repertoire of fixed strategies evolve and compete. Since a mutant is initially present as a single cell, it becomes essential to stochastically model the population dynamics, including both reproduction and sampling for each inoculum. Within a batch, instead of the deterministic ODEs of Eqs. 1-2 we simulate stochastic dynamics using Gillespie's method, summarized in Table II in the Appendix. For large populations, the resulting steady state matches the deterministic one. To account for mutations, we modify the growth term to allow for mutation events, whereby when species σ increases by one cell, instead of making another σ, it sometimes makes a σ cell, i.e. σ → σ + σ . Mutation occurs at a rate νρ σ i j σ,i , while normal growth, σ → 2σ, occurs at a rate (1 − ν)ρ σ i j σ,i . Fig. 3A shows a schematic of this process. Together, stochastic reproduction, intrabatch mutations, and inter-batch sampling lead to com- plex dynamics whereby a species can appear, flourish for a number of batches, then die out, with different species replacing it. This results in fluctuations in the number of species present from batch to batch (Appendix Fig. 8).
How does species diversity depend on nutrient bolus size c 0 under conditions of mutation-selection balance? As one would expect, the larger the nutrient bolus c 0 , the more mutations within a batch, leading to more species at the end of the batch (cf. Fig. 3B). As c 0 /K increases, the number of extant species (species with non-zero abundance) increases since more growth events, and therefore more mutation events, occur within a batch. We also find that more evenly balanced nutrient supplies lead to a larger number of species. However, many of these species are very low abundance, and are recent mutations that will typically not survive more than a few batches. We therefore need to consider a metric which better reflects true diversity.
A useful summary statistic for quantifying diversity [35,36] is the effective number of species m e = e S with the Shannon diversity S = − σ P σ ln P σ and P σ = ρ * σ (0)/ρ 0 , with ρ * σ (0) being the steady-state species abundances at the beginning of a batch. We show the effective number of species, m e , as a function of c 0 in Fig. 3C. As c 0 increases, the decrease in m e due to the early-bird effect and single-nutrient competition [23] is offset by mutations generating new species. As a result, for these parameters, m e is flat as c 0 ≈ K. As c 0 increases further, m e does increase, due to both mutations and reduced remapping. This is evident in Fig. 3D which shows more species and flatter rank-abundance curves for higher c 0 for a balanced nutrient supply (magenta). Even for an unbalanced nutrient supply (cyan), diversity increases for large enough c 0 /K (lower values of c 0 /K are shown in Appendix Figs. 6, 7).
This increase in diversity with increasing c 0 arises from a competition between the diversity-increasing effect of mutation and the diversity-reducing effect of demographic noise. Consider the growth dynamics within an individual batch. Mutations shift population to nondominant species, thus making the end-of-batch abundances on average more "even" as growth proceeds. However, this effect can be washed out by high levels of demographic noise, which can make abundances less equal. Demographic noise is high when the total population is small, so that each birth has a relatively large effect on the relative abundances. Thus, when c 0 and ρ 0 are small, demographic noise counteracts the diversity-increasing effects of mutation. As c 0 or ρ 0 increase, this demographic noise is reduced and therefore diversity rises.
To better understand this competition between mutation and demographic noise, we derived a Fokker-Planck equation for the dynamics of the probability distribution of the relative abundance of two species. For neutral growth with mutations, the population dynamics during a batch is given by where P = P (x 1 , ρ) is the probability distribution of the relative abundance x 1 of species 1 at total species abundance ρ, D is the effective diffusion coefficient, and V is the effective drift velocity. From the microscopic dynamics, we find that (see Appendix for details). The form of D and V reveal the contributions of demographic noise and mutation to the population dynamics. D captures the effect of random births, it scales with 1 − ν and drives the probability distribution towards the edges, being maximal at x 1 = 0.5. V represents the effect of mutations: it scales with ν and drives the probability distribution towards the center, vanishing at x 1 = 0.5. The outcome of the competition between these two opposing effects is determined by the denominators of D and V . Both D and V contain polynomials of the total population ρ in their denominator, and therefore both effects weaken as growth proceeds during a batch (the larger the population, the smaller the effect of each birth on the relative abundance). However, the denominator of D is quadratic in ρ, while the denominator of V is only linear in ρ. As a result, the relative strength of mutation increases as growth proceeds, driving the system towards a δ function at x 1 = 0.5 as the population becomes very large. To demonstrate this, we show a numerical simulation of Eq. 3 in Fig. 3E. Beginning with a narrow distribution of abundances in a small population, P rapidly widens once growth begins due to demographic noise. As growth proceeds, the distribution becomes narrow once again as demographic noise decreases in strength relative to the equalizing effect of mutation.
Broadly speaking, mutations in our model lead to a "rich-get-poorer" effect in which high-abundance species feed low-abundance species with a steady stream of mutants, countering the "rich-get-richer" impact of the early-bird effect and competition for a single dominant nutrient. However, because growth in this system is stochastic, for small enough initial populations this "rich-get-poorer" effect must first overcome the diversityreducing effects of demographic noise.

DISCUSSION
In nature, microbial metabolic strategies vary within a single generation and across generations. In this work, we have built on existing models of resource competition under serial dilution by exploring what happens when species are able to modify their metabolisms. We considered two types of strategy change: transient regulatory changes and random mutations. Interestingly, these two mechanisms have substantial but drastically different effects on community diversity, highlighting the potential impact of changes in metabolic strategy on real microbial communities.
We first considered the outcome of introducing an "adapter", a species capable of regulating its enzyme allocation, into a stable diverse ecosystem. We found that, over long time periods, the adapter curtailed diversity in a manner similar to introducing a species with an enhanced enzyme budget [21]. This can be viewed as an augmented early-bird effect. In our previous model, an early-bird can take advantage of fast initial growth to rapidly consume all nutrients, even those it consumes inefficiently. An adapter can tune its enzyme levels to first efficiently consume the more valuable nutrient, and then switch enzyme production to focus on the remaining nutrients. Thus, it benefits from both an early population advantage and opportune enzyme allocation. As a re-sult, the invading adapter gains a small but significant fitness advantage and gradually takes over the community. In some cases, the rest of the community is able to self-organize such that the differences in nutrient concentrations became too small for the adapter to detect, precluding its advantage. Intriguingly, in some cases, the adapter only reaches dominance over a very long, emergent timescale. In that case, fluctuations in a real ecosystem might wash away the adapter's advantage. In summary, the impact of enzyme regulation by some species in an ecosystem depends on both the metabolic cost of maintaining enzyme regulation and the presence of other timescales in the system. Studying the relevance of the long timescale introduced by enzyme regulation in shaping ecosystem diversity is a promising direction of future study.
In this work, we have focused on competition between adapters and non-adapters, but we did not consider the scenario of competition between adapters. On evolutionary timescales, this scenario is likely to arise as the adapters themselves will mutate and speciate. This is a worthwhile direction of future study, as it is not clear that adaptation will collapse diversity in the context of adapter-adapter competition. Interestingly, a recently published work analyzing a conceptually similar model of enzyme regulation showed that competition between adapters can stabilize diversity [25]. While this model differs from the one we analyze here in the regulation scheme employed, these results suggest the intriguing possibility that adaptation can collapse diversity when it first arises, but promote diversity once the adapters themselves speciate.
In contrast to our results on adaptation, we found that the addition of mutations that randomize metabolic strategy modified the relationship between bolus size and diversity to be monotonically increasing. This is a dramatic change from the model without mutation, where the relationship is generally non-monotonic [23]. However, as with the original model, this behavior can be understood in terms of the early-bird effect. Without mutation, the early-bird effect leads to a "rich-get-richer" effect that initially decreases diversity as bolus size increases. This occurs because increasing the supply of nutrients leads to the additional nutrients being disproportionately taken up by the most abundant species. Indeed, until nutrients become saturating in the c 0 K limit, the more nutrient, the less diversity. However, the addition of mutation opposes this one-sided concentration of biomass, acting somewhat similarly to "income tax": the species that consume the most nutrients and therefore proliferate fastest, are the species that lose the largest fraction of their population each batch to mutations. As the bolus size grows, the number of birth events (and therefore mutation events) increases, thereby increasing overall diversity by redistributing a larger fraction of the total population from more abundant to less abundant species. Our simulations have focused on a particular class of strategy-randomizing mutations, and so, it would be interesting to see if our observations generalize beyond this particular choice of mutational effect.
Our exploration of the early-bird effect and the adapter provides some insight into the enzyme regulation strategies utilized by real microbes. When supplied with high concentrations of nutrients (corresponding in our model to a large nutrient bolus) real microbes are known to utilize a diauxic strategy in which they will exclusively consume the most valuable nutrient until is entirely depleted before switching to metabolism of less valuable nutrients [37]. This strategy is entirely consistent with the optimal enzyme regulation needed to exploit the early-bird effect. It is better to devote all resources to the nutrient that allows for the highest growth, and then use the earlybird advantage to more efficiently exploit the remaining nutrients. Interestingly, it has been found that in environments containing low nutrient levels (corresponding to the small bolus size limit of our model), microbes instead employ a mixed-utilization strategy where they attempt to consume multiple different types of nutrients [38,39]. This is also consistent with our model, in the low nutrient limit the early-bird effect is weak or nonexistent, lowering the benefit of sophisticated regulatory strategies (though growth on multiple nutrients simultaneously could also arise if individual nutrient concentrations are too low to support growth on that nutrient alone). These results highlight the fact that certain effects cannot be found in chemostat models, and therefore models with fluctuating nutrient supply have an important role in efforts to understand microbial ecosystems.
In our previous work, we argued that in order to understand microbial diversity, it is necessary to take into account fluctuations in the environment. Here, we have shown that variations within the microbes themselves can also play a key role in microbial diversity. Indeed, these two types of fluctuations can interact in a complex manner, as is the case with adapter's exploitation of the early-bird effect. On a practical level, our results suggest that measuring microbial abundances and environmental conditions may not be sufficient to understand diversity in microbial ecology experiments. Even in a simple model, if some microbes can adapt to ambient conditions, they may shape the ecosystem in complicated ways over very long timescales. And so, it appears that predictive models of microbial ecosystem dynamics would benefit from information about the microbes' inner states and decision-making processes.

APPENDIX
This section describes the simulation methods used in this manuscript.
All code and data used in this manuscript can be found at https://github.com/AmirErez/SeasonalEcosystem.

Deterministic dynamics
We numerically solve the ODEs within each batch using a custom MATLAB-coded fourth-order Runge-Kutta solver with adaptive step size.
Step size at a given time step is chosen such that the relative change of all state variables is below a predetermined threshold.
To numerically solve the Fokker-Planck model of mutation, we utilize a custom MATLAB-coded first-order Euler solver. The interval [0, 1] was discretized into 801 points and all derivatives were computed using first-order centered differences. Zero-flux conditions were imposed at the boundaries of the domain.

Population bottleneck sampling
We implement discrete sampling when diluting from one batch to the next by picking without replacement ρ 0 individuals from a total end-of-batch population of ρ 0 + c 0 . If there are non-integer populations at the end of a batch (as can occur with deterministic dynamics), they are rounded up if ρ σ − floor(ρ σ ) > U (0, 1) where floor rounds down to the nearest integer and U (0, 1) is a uniform random variable between 0 and 1. For all simulations with stochastic bottlenecks, we allow the simulation to equilibrate for 10,000 dilutions and average over 90,000 further dilutions.

Mutation-selection dynamics
We use Gillespie's algorithm to simulate the reactions shown in Table II  with U (0, 1) a uniform random variable between 0 and 1. For each "birth" reaction, (ρ σ increases by 1), c i decreases by j σ,i / i j σ,i .
For all simulations featuring mutation ( Fig. 3 and Appendix Figs. 8-7), we let the system equilibrate over 10,000 dilutions, many more than required to reach steady state in the deterministic model, and then average over at least 90,000 more dilutions. To ensure that the results do not depend on the number of possible strategies, (due to mutations saturating all possible species), we increase the total number to 201 species equally spaced between 0 and 1.

Derivation of Fokker-Planck equation for mutation model
We consider a batch culture containing two species with equal fitness. The dynamics of the growth process can be described as a random walk of the relative abundance x 1 of species 1 on the interval [0, 1]. The dynamics of the probability distribution of x 1 as a function of total abundance in the batch ρ can be approximated as a Fokker-Planck equation with effective diffusion coefficient D and effective drift velocity V : The form of V and D can be computed from the microscopic dynamics. Consider a batch containing ρ cells, n of which belong to species 1. The drift velocity, V , will be the expected value of the change in relative abundance from mutation events: This expression reduces to Similarly, the diffusion coefficient, D, will be the variance of the change in relative abundance due to stochastic neutral growth which simplifies to Appendix Figures   FIG. 4. Example of diauxie in the adaptation model. When sensing tolerances are large, the adaptation model can exhibit diauxie, in which nutrients are consumed sequentially rather than simultaneously. In the simulation shown, ρ0 = K = 1, c0 = 10 3 , ∆c = 0.95, and Nutrient 1 fraction = 0.55.
FIG. 5. Median number of extant species as a function of c0/K at different mutation rates ν from 0.002 (dark) to 0.01 (orange) with Nutrient 1 fraction 0.005. With increasing ν, more species are created by mutation during each batch. When ν = 0, the median number of extant species fluctuates between one and two species due to extinctions though sampling noise. The steady state reflects a balance between the addition of new species through mutation and the loss of species due to inter-batch sampling.
FIG. 6. Mutation-selection balance for high ρ0 and K (ρ0 = 10 5 , K = 10 5 , and ν = 10 −3 ). The results presented in Fig. 3 in the main text are for ρ0 = 1000, K = 1000, and ν = 0.01; with those parameters, sampling noise dominates in the c0/K 1 limit. Here, we explore the c0/K 1 limit using larger ρ0 and K. (A) Effective number of species me for different nutrient compositions (colors) as a function of nutrient bolus size c0/K. (B ) Rank-abundance curves for Nutrient 1 fraction 0.05 (cyan) and 0.5 (magenta); line thickness corresponds to c0/K values. We note the similar trends to the results in the main text. In the main text, we only present data on the steady states of the stochastic models while here we examine the full timecourses. In all cases, inter-batch sampling is stochastic without replacement. In the model without mutations (ν = 0), sampling causes extinctions of species with no possibility of recovery. The model with mutations results in a fluctuating number of species, as species constantly go extinct and are reborn through mutation. x-axis is batch number. Right two columns: Timecourses of two stochastic models, as the left two columns, but rescaling the x-axis to count the number of generations. The fractional population increase in a single batch with c0 nutrients is ρ 0 +c 0 ρ 0 and so, the number of elapsed generations is # batches × log 2 ρ 0 +c 0 ρ 0 .