Biodiversity is enhanced by sequential resource utilization and environmental fluctuations via emergent temporal niches

How natural communities maintain their remarkable biodiversity and which species survive in complex communities are central questions in ecology. Resource competition models successfully explain many phenomena but typically predict only as many species as resources can coexist. Here, we demonstrate that sequential resource utilization, or diauxie, with periodic growth cycles can support many more species than resources. We explore how communities modify their own environments by sequentially depleting resources to form sequences of temporal niches, or intermediately depleted environments. Biodiversity is enhanced when community-driven or environmental fluctuations modulate the resource depletion order and produce different temporal niches on each growth cycle. Community-driven fluctuations under constant environmental conditions are rare, but exploring them illuminates the temporal niche structure that emerges from sequential resource utilization. With environmental fluctuations, we find most communities have more stably coexisting species than resources with survivors accurately predicted by the same temporal niche structure and each following a distinct optimal strategy. Our results thus present a new niche-based approach to understanding highly diverse fluctuating communities.


A1. Simulation parameters for Main Text figures
In Figs 1 and 2   In the Figs 1C and 2 example, species B and E never grow on R1 in the steady-state oscillation.
In Fig 4A in the Main Text, all species were assigned random resource preference orders and growth rates uniform-randomly sampled from the surface defined by ∑  7# 3 # = 1 hr 63 .The growth rates and resource preferences for the highlighted species (A, B, C, D, E, and F) are:   = 1 means all resource supplies line on a twodimensional surface.This surface is the simplex plot.(C) Qualitative relationships between position on the simplex plot and resource supply.The corners each correspond to the supply being entirely one resource.The center corresponds to the supply being equal amounts of each resource, the corners a single resource.(D) The simplex plot presented three times, each time highlighting a different component of the supply by bolding and coloring the grid lines corresponding to that resource's quantitative supply fractions.The supply of each resource increases linearly as the corner corresponding to the supply being entirely that resource is approached.(E) The quantitative supply fractions at five example points on the simplex.

Fig B. Explanation of the growth rate simplex plots. (A)
The species sampling distribution in red and the simplex plot onto which growth rates were projected in blue.For the simulations with a fluctuating resource supply, species were sampled from ∑  7# 3 @ AB #C/ = 1 hr 63 .The nonlinearity of this constraint means species are not sampled from a flat surface (like the resource supply was) but instead from a curved surface, shown in red in { 7/ ,  73 ,  7> } space.This space is nevertheless twodimensional (in the three-resource case), allowing species' growth rates to be projected onto a simplex plot with a bijective mapping.Various options for this projection exist.We choose to project growth rates allow vectors that pointed towards the origin {0, 0, 0}, as is illustrated by the arrow connecting a point on the growth rate sampling distribution (red) to the corresponding point on the simplex diagram (blue) and by the dashed line that continues this projection vector to the origin.(B) The nonlinearity of the ∑  7# 3 @ AB #C/ = 1 hr 63 constraint and the projection used mean the simplex diagram is not linear in  7 = { 7/ ,  73 ,  7> } but instead linear in  7 / ∑  7# @ AB #C/ . The scale along the right edge of the simplex and the dashed lines across the simplex illustrate this linearity in . The scale along the bottom and curved lines across the simplex illustrate the corresponding nonlinearity in  7/ .

A3. Linear vs monomial vs exponential fits for Fig 4D
To test the scaling of the number of species with the number of resources, we fit linear, monomial, and exponential curves to the data presented in Fig 4D  The ratio of mean square residual (MSR) of the monomial fit to the MSR of the linear fit is /.W> P 3.X> P = 0.567.This gives a F test p-value of p = 0.362.The ratio of MSR of the monomial fit to the MSR of the exponential fit is /.W> P 3.3X P = 0.667.This gives a F test p-value of p = 0.400.Thus, while the monomial fit is slightly better than the linear or exponential fits, it is not statistically significantly better.Fig C shows the linear, monomial, and exponential fits.Consistent with the statistical results, the monomial appears to be a visually slightly better fit, but the fits are all very similar across this range, so it is unsurprising that no fit is statistically significantly better. .With only a single resource supply on each growth cycle, the optimal strategy is to be a generalist equally invested in all resources with preferences no longer mattering -i.e. the six optimal strategies suddenly "collapse" to a single strategy.

B1. Detailed definition of the model and importance of resource depletion times
The diauxie model we use in our paper is the same as used in the relevant Appendix sections of Bloxham et al. (2022) [1] and, up to a few changes to variable names, the model used in Wang et al. (2021) [2].
Species have order resource preferences (such as R / → R > → R X → R 3 ) and exponential growth rates  7 = b 7# c on each resource.Throughout, we use Greek letters (μ, ν, etc.) to index over species and Latin letters (i, j, etc.) to index over resources with specific species being A, B, C, etc. and specific resources being R1, R2, R3, etc. Species consume resources one at a time, moving to their next remaining preference when their previous is depleted.Their populations sizes are () = b 7 ()c and have dimensionless units.Variable yields and diauxic lags are not included (i.e.yields are implicitly equal to 1 and all lag times equal to 0).
The environment consists of growth and death phases (i.e."boom-and-bust" cycles) with the combination of one growth phase and one death phase being referred to as a "growth cycle".Resources have concentrations () = { # ()}.At the start of each growth cycle, resource concentrations are set to the supply concentrations  = { # }.When the supply varies, we can denoted the growth cycle as a superscript to distinguish it from the resource indexing.(For example,  3 > is the supply fraction of R2 on growth cycle 3.)Time is reset to  = 0 at the start of each growth cycle.Times, population sizes, and resource concentrations can also use superscript indexing to indicate a specific growth cycle whenever dynamics over multiple cycles are being discussed.For simplicity, we assume the supply on each growth cycle is always equal to 1 (i.e.∀ j ∑  # j @ AB #C/ = 1) where resource concentrations are dimensionless.
Together, the dynamic equations during the growth phase are , where  7 r()t is equal to the index of the resource species μ is eating given resource concentrations () and the notation  ∶  7 r()t =  indicates a sum over all species μ that are currently consuming R # .
The death phase consists of dividing all population sizes by the dilution factor DF (which was always set to 10 in the Main Text).The death phase occurs as soon as () = 0. and in general can be written in the form Δ log  = (DO)  +NH − log(DF) , where (DO) depends on the "depletion order" DO (i.e. the order in which resources are depleted) and has terms of the forms  7# , ( 7# −  7j ), and 0. Species' growth and resource consumption continuously affect (), which determine  +NH which in turn determines (DO), but the times  +NH fully determine each species' log-growth on each growth cycle.Thus, the resource depletion times  +NH mediate all interspecies interactions, making them central to all dynamics.

B2. At a fixed point, competitive exclusion is obeyed
We define a fixed point as having population sizes that do not vary between growth cycles, and assume a constant resource supply whenever we're discussing fixed points.The system has the same initial condition {, } at the start of each growth cycle therefore the same  +NH on each growth cycle.Constant population sizes require 0 = (DO)  +NH − log() .As previously established in Bloxham et al. (2022) [1] and excluding the case of fine-tuned growth rates, this equation can only be solved if there are fewer or an equal number of surviving species as resources (i.e. if  GH ≤  MN where  GH is the number of surviving species and  MN is the number of resources).This is the "competitive exclusion principle".Species population sizes affect  +NH which then determines the change in population sizes on each growth cycle.Depending on species' growth rates and resource preferences, this feedback can bring the system to a stable fixed point with  GH ≤  MN .
Population sizes affect the depletion order and therefore which (DO) through its DO dependence but each (DO) can only have a discrete set of values (one for each resource depletion order) and there are still only  MN degrees of freedom, so this does not create the necessary flexibility to break the competitive exclusion principle.

B3. With fluctuations, exponentially many species as resources can coexist
By "fluctuations" we mean any dynamics in which population sizes do not reach a fixed point but instead vary from one growth cycle to the next.This includes periodic oscillations and chaos under a fixed resource supply and the case of environmental fluctuations (e.g. a resource supply  that varies between growth cycles).
When average over all growth cycles, all surviving species must obey 〈Δ log  7 〉 = 0 , or else the species' population size would be going to infinity (which is impossible under a finite resource supply and dilution factor) or to zero (in which case we would consider the species extinct).

B3a. An initial approach via a summation over depletion orders
If the depletion order were constant, we would have 0 = (DO) 〈 +NH 〉 − log() , in which case there would still only be  MN free variables b〈 +NH # 〉c and competitive exclusion would still be obeyed.
However, fluctuating population sizes can lead to a variable depletion order, which would expand the zero-average-growth equation to where 〈 +NH 〉 4Ž # indicates the average  +NH when the depletion order is DO # (with  MN !possible depletion orders) multiplied by the frequency of that depletion order occurring.To turn this into a matrix equation, the (DO # ) could be concatenated horizontally and the 〈 +NH 〉 4Ž • vertically.This yields a massive combined 〈 +NH 〉 4Ž • vector of length  MN *  MN !, implying that  MN *  MN !species might coexist.However, the combined matrix of stacked (DO # ) will have enough repeating values and patterns to never reach rank-( MN *  MN !) (or even close to it for moderate to large  MN ).Indeed, a much tighter bound exists if we take a distinctly different and novel approach to understanding this system, and this alternative approach will grant us much better insights into the dynamics of this system when population sizes fluctuate.

B3b. A tighter exponential bound and better understanding via temporal niches
For a better approach to this system, we define the concept of a "temporal niche", which is simply a specific combination of which resources have not yet been depleted.For example, all resources being present is a temporal niche, as is only R1 being present or both R2 and R3 being present.
For further illustration, when the depletion order is  +NH/ <  +NH3 <  +NH> species experience the R1 + R2 + R3 niche then the R2 + R3 niche then the R3 niche.When the depletion order is  +NH3 <  +NH/ <  +NH> species experience the R1 + R2 + R3 niche then the R1 + R3 niche then the R3 niche.Under each of these depletion orders, the first niche experienced is R1 + R2 + R3 and the last niche experienced is R3.So, whenever the depletion order is  +NH/ <  +NH3 <  +NH> or  +NH3 <  +NH/ <  +NH> , species end the growth phase growing on R3 and at their  7> growth rates.Importantly, growth rates are the same every time a temporal niche occurs regardless of what order resources were depleted in to get to that temporal niche.
Understanding this system from the temporal niche perspective is a distinct approach from the (DO) approach explored above and will involve constructing an alternative matrix  " that contains species' growth rates arranged by temporal niche.
The zero-average-growth equation can now be expressed as 0 =  " 〈 "• 〉 − log() , where  " contains species' growth rates by temporal niche and 〈 "• 〉 is the average time spent in each temporal niche.For example, consider three species competing for two resources with species A and B preferring R1 over R2 and species C preferring R2 over R1.In the R1 + R2 niche, species A and B are eating R1 and growing at their R1 growth rates while species C is eating R2 and growing at its R2 growth rate.In the R1 only and R2 only niches all species are eating R1 and R2, respectively.Therefore, for this example and the zero-average-growth equation is For six species competing for three resources with resource preferences as defined in the below table the zero-average-growth equation containing the matrix  " would be: The 42 entries in this 6x7 example  " matrix only have 18 unique values, but because they are arranged differently in each column, this remains a rank-6 matrix (and would be a rank-7 matrix if a seventh species were added).
There are 2 • AB − 1 temporal niches (all the binary combinations of whether or not a resource is present minus 1 for the case of no resources remaining), so, to our current understanding,  GH ≤ 2 • AB − 1 becomes the new upper bound on the number surviving species.
Each resource preference order distributes the species' growth rates differently across the temporal niches, and if each species has a different resource preference order the matrix  " will have no rank-degeneracies.It is also possible for coexisting species to share a resource preference order, including when diversity is saturated at  GH = 2 • AB − 1 (as is the case in the Sections C5a and C5b examples).However, it is not possible for more surviving species than resources to share the same depletion order or else  " becomes degenerate and it is no longer possible to find a 〈 "• 〉 that lets all those species survive.

B4. Optimal strategies
If 〈 "• 〉 is known then 〈Δ log  7 〉 =  " 7 〈 "• 〉 − log() can be calculated for all competing species.With a constraint such as ∑  7# 3 = 1 hr 63 , a species growth rates can be optimized to maximize 〈Δ log  7 〉.To determine optimal strategies for comparison to the growth rates of the survivors, we took 〈 "• 〉 from the simulation data (averaging across all simulations for fluctuation magnitude) and calculated the optimal  7 for each resource preference order (the quadratic form of the constraint making this optimization nothing more than the renormalization of a vector).Symmetry of the resource supply meant that each optimal strategy had the same first, second, and third preference growth rates, which were then distributed into  according to the species' resource preference orders.

C1. With three species competing for two resources a fixed point was always reached
We randomly sampled 4*10 9 communities of three species competing for two resources.We ensured that in each random community both resource preference orders were represented.Growth rates were log-uniform randomly sampled from 10 -4 to 1 hr -1 .The dilution factor (equal to 10 in the Main Text) was log-uniform randomly sampled from 2 to 25, and the (constant) resource supply fractions were uniform randomly sampled from { / ,  3 } = {0,1} to { / ,  3 } = {1,0}.In none of the communities did an oscillation occur.Given the massive number of random communities sampled, we believe a three-species oscillation with only two resources supplied in constant fractions is not possible.Two species cannot oscillate, and we have already shown that four or more species cannot survive on only two resources.Therefore, oscillations on only two resources supplied in constant amounts are not possible.= 1 hr 63 distribution as in the simulations with a fluctuating resource supply.We sorted by whether the community reached a steady-state oscillation or chaos and by number of survivors.Each community was started at 36 different initial species fractions and was categorized as oscillating or being chaotic if any of the initial conditions resulted in that.For number of survivors, the greatest number from each of the initial conditions was used.After testing approximately 3 * 10 X random communities, we observed 3 communities that oscillated.

C3. Example of five species coexisting on four resources without anomalous resource preferences
"Anomalous resource preferences" refers to a species preferring a resource it grows slower on over a resource it grows faster on (i.e.resource preferences not matching the ordering of the species' growth rates).The example presented in  In this example, the dilution factor is 10, the resource supply fractions are  = {0.25,0.25, 0.25, 0.25} , and species growth rates and resource preferences are given by Table L.

C4. Example of chaos
Only periodic oscillations were presented in the Main Text.Diauxic growth does, however, exhibit chaos, as is demonstrated in Fig G. = 1.We simulated the community starting from each of the 40 sets of 10 initial conditions for 100 growth cycles.Each column of D shows one of the 40 sets of initial conditions.In each column, the top plot shows the trajectories for the 10 closely clustered initial conditions and the bottom plot shows the mean L2-distance between trajectories.Trajectories can be seen to rapidly diverge in the top plot as is confirmed and quantified in the bottom plots.(E) Light grey lines show the mean L2-distances between trajectories for each of the 40 clusters of initial conditions.The black curve is the mean of these means (in log-space).The straight black line depicts the slope extracted from this mean over the first 40 growth cycles.It has a slope of λ = 0.174 ± 0.002 (on a natural log scale).This slope represents an approximate Lyapunov exponent for the chaotic attractor.
In the example of a chaotic attractor presented in Fig G, the dilution factor is 18.5, the resource supply is  = {0.35,0.01, 0.55} , and the species' growth rates and resource preferences are given by Table M.In this simulation, the dilution factor is 10, the resource supply is constant with an equal supply of all three resources, and species' growth rates and preferences are given by Table N.

C5a. Seven Species on Three Resources
Growth Rates (hr  In this simulation, the dilution factor is 10, the resource supply is constant with an equal supply of all three resources, and species' growth rates and preferences are given by Table O.In this example, the dilution factor is 1.8167, the resource supply fractions are  = {0.1869,0.1945, 0.2067, 0.1974, 0.2145} , and species growth rates and resource preferences are given by Table P.All twenty three species coexist.

C6. Intuitive Construction of an Oscillating Community
In this section, we demonstrate the intuitive construction of oscillating communities with more coexisting species than resources and comment along the way on methodology for producing examples that maximize the number of coexisting species.These intuitive construction rely heavily on anomalous resource preference (that don't match the ordering of species' growth rate) and species being cyclic permutations of each other, but neither of these properties is necessary.
For an oscillation to occur, we will want species A having a large population size to promote the growth of B's population size and the shrinking of C's population.Because species A consumes R1 then R2 then R3, when species A is most of the population resources will be depleted in this order and the all-resource niche, the R2 and R3 niche and the R3 only niche will occur.Species B will be growing on its first preference, R2, during these first two niches and on its second preference, R3, during the last niche.Meanwhile, species C will be growing on its first preference, R3, in all these niches.So to have species B's population grow while species C's population shrinks will require  3 ª« >  / ¨© .
As we continue to think through our construction of this oscillation, we also note that we will want species A's population size to begin to shrink as the size of B's population starts to increase significantly.Species A consumes R1 first and B consumes R2 first and both at the same rate, so when the population is dominated by roughly equal populations of A and B, R1 and R2 will be depleted at roughly the same time and the all-resource niche and the R3-only niche will dominate the dynamics.To have species A's population size be decreasing at this point will require it to have a slow R3 growth rate.This leads us to the growth rate ordering In Fig K, we explore the oscillation that is created between species with resource preferences and growth rates given by Table Q as δg is increased (consistent with the above discussion).As expected, as δg becomes sufficiently large the community experiences a Hopf bifurcation and begins to oscillate.A small amount of random noise can be added to the growth rates without losing the oscillation (Fig K ), confirming true rather than neutral stability.This oscillation is essentially the same setup as the one discussed in the Supplementary Information for Wang et al. 2021 [2].

Fig K. Example of a simple constructed oscillation. (A)
For species A preferring R1 then R2 then R3, B preferring R2 then R3 then R1, and C preferring R3 then R1 then R2, population fractions at the end of each growth cycle (middle) and resource depletion times on each growth cycle (bottom) as the species' growth rates are varied (top).(B) Zoom in on 30 growth cycles from the last (furthest right) growth rate matrix in A, annotated with explanations of the interplay between population sizes and resource depletion times.

C6b. Adding More Species than Resources to the Oscillation
To add additional species to the oscillation in Section C6a, we can begin by considering the current matrix  " of growth rates by temporal niche (using the previous species with δg=0.2hr - ) as given Table R Looking at this matrix we observe that each species has two temporal niches in which it is the fastest.If we wanted six species that each had a temporal niche in which they were the fastest growing species (which is not a requirement for coexistence but does make it easier to manually craft examples), we could introduce three species that each grew very quickly on their last preferences.After doing this species A, B, and C will each be the fastest-growing species in one of the two-resource niches and the new species D, E, and F will each be the fastest-growing in one of the single-resource niches.A simulation of this six-species community is shown in Fig L.

C6c. Constructing an Oscillation on More Than Three Resources
The approach to constructing a three-species three-resource oscillation with cyclically permuted species (as described in Section C6a) can be easily extended to more than three resources with species that grow at a medium speed on their first preference, very fast on their second preferences, and slowly on all the rest.With cyclically permuted species (e.g.species A preferring R1 then R2 then R3, species B preferring R2 then R3 then R4, etc.) an oscillation can be easily created, but if the goal is to later add additional species to maximize diversity this is not the best approach as the cyclical structure will prevent all temporal niches from being realized.
An alternative approach is to follow the previous construction more loosely and begin with one species per resource with that species having (i) the resource as its top preference, (ii) all other preferences sampled randomly, (iii) a medium growth rate on its first (and optionally also second) preference, (iv) fast growth rates on its next preference or two, and (v) slow growth rates on all remaining preferences.Randomly sampling communities like this will yield a large variety of oscillations some of which will produce all or nearly all the possible temporal niches.To produce all possible temporal niches, it is important that each resource is the top preference of at least one species or else it can never be the first to be depleted.This form of random sampling is how we produced many of our example communities.
A third approach is two start by combining two communities each competing for a different subset of the supplied resources.

C6d. General Methodology for Adding Additional Species
We assume we've found a set of species α through μ that oscillate and we want to add another new species ν to the oscillation.Species ν will consume resources and therefore affect resource depletion times and time spent in each temporal niche at least somewhat, but if we are looking for a species that can join the community without breaking the oscillation or causing any of the original species to go extinct then we can assume an appropriately selected species ν will only change the time spent in each temporal niche by some small amount.We can therefore sample our new species ν by (i) randomly sampling its resource preference order, (ii) sampling its growth rates under the constraint (where  " ®,"• is the new species' growth rates by temporal niche and 〈 "• 〉 ¯…7 is the mean time spent in each temporal niche before its introduction), and (iii) adding a small amount of random noise to its growth rates (to ensure we're not accidentally creating a fine-tuned, structurally unstable example).This example species G happens to be a "medium-at-everything" species with similar growth rates on all resources, but if the goal is to iteratively add as many species as possible it is best to avoid introducing too many of these species (and instead ensure all species have a mix of fast and slow growth rates) or else the oscillations tend to become delicate and sensitive to increasingly small parameter perturbations.The community sometimes diverges from the limit cycle (for example around growth cycles 700 through 800) but appears to consistently recovery.(C) Zoom in of the population sizes at the end of growth cycles 880 through 1000.Thin lines show population sizes in the stochastic simulation.Thicker, paler lines show population fractions in the deterministic simulation for comparison.Despite the moderate deviation from the limit cycle having occurred ~100 growth cycles earlier, the stochastic simulation appears to still closely track the deterministic.Deterministic simulation has a visually tuned time offset to align the two simulations, but both have the same time scale and relative y-axis scales are set according to the carrying capacity  used in the stochastic simulations.(ii) To confirm the strict metabolic tradeoffs was not necessary for the competitive exclusion violation, we sampled species using a loose metabolic constraint in which after sampling from the same hypersurface species growth rates were transformed by  7# →  7# *  7 (1, 0.2) in which  7 (1, 0.2) is a normally distributed value sampled once for each species.This meant best-at-everything species were still rare but some species could grow faster on all resources than some of their competitors.Over one third of communities still violated competitive exclusion.(iii) We also tested the sampling distribution used in Wang et al. (2021) [2].This distribution sampled each component  7# independently from (0.25 hr 6/ , 0.05 hr 6/ ), thus creating species that tended to all have similar growth rates on all resources with no inverse correlations.Even with no metabolic tradeoffs at all, we still observed a 20% frequency of violations.

D2. Competitive exclusion violations are a likely outcome even if some resources support universally faster growth rates than others Fig R. Strict equality of resources is not necessary for competitive exclusion violations to be the most likely outcome.
To test whether the exact equal of resources (i.e. that they all supported the same growth rates) we had assumed in the Main Text was necessary for the diversity we had observed, we repeated the three-and four-resource simulations from Fig 4D in the Main Text, this time multiplying all R1 growth rates by 0.9, R2 growth rates by 1, and R3 growth rates by 1.1 in the three-resource case and multiplying growth rats by 0.85, 0.95, 1.05, and 1.15 in the four-resource case after sampling from the ∑  7# = 1 hr 63 hypersurfaces.Top row displays the results constraints, showing first the original three-resource constraint (left), then the modify threeresource constraints (middle), and then the modified four-resource constraint (right).In the bottom row, the left plot shows the number of survivors in the Main Text three-resource simulations (left) in comparison to the number of survivors in the three-resources simulations with these modified growth rates (right).The right plot shows the number of survivors in the four-resources simulations with these modified growth rates.Diversity remained high in both the three-and four-resource cases.Even with R4 supporting growth rates 35% faster than R1 supported, 70% of the random communities competing for four resources violated competitive exclusion.

D3. Sampling from evidence-based resource preference order distributions
Recently Takano et al. (2023) [3] explored how the basic structure of central metabolism, specifically which metabolic reactions are and are not possible based on a universal bacterial model, limits which research preference orders are most likely to occur.Takano et al found that certain resource preference orders are vastly more likely to occur than others with some orders being essentially impossible.
The results of our paper depend on species having different resource preference orders, so checking whether our results are robust to enforcing the resource preference orders observed in Takano et al. (2023) [3] is an essential control.In this section, we perform control simulations and observed that, while biodiversity is decreased, communities with more coexisting species than resources are still a frequent occurrence and for certain combinations of resources mean biodiversity is indistinguishable from when resource preference orders are uniformly sampled (Fig S ).Takano et al. (2023) [3] includes, amongst other data, the results of random walk simulations in which metabolic reactions were randomly added and removed using a universal database of bacterial metabolism.Takano et al. used flux balance analysis of the resulting metabolic networks to infer likely resource preference orders for a set of seven simple sugars and presents the fifteen most common resource preference orders along with their relative frequencies across the different random walks (Fig 1E from Takano et al. (2023) [3]). 1 About one third of random walks resulted in one of these fifteen preference orders (out of 5040 possible preference orders for seven resources) and ordering of resources was highly correlated across these top preference orders (Fig 1E from Takano et al. (2023) [3] and our Fig SA).If preference orders between species are indeed as heavily correlated as Takano's results suggest, it is initially unclear whether the increased biodiversity we observed will remain likely as it does depend on at least some variation in preference orders.
To test if we would still see highly diverse communities under the distribution of resource preference orders observed by Takano et al. (2023) [3], we performed additional control simulations.We iterated over each subset of three of the seven focal resources in Takano et al. (2023) and calculated the relative frequencies of the three-resource preference orders from the seven-resource preference order frequencies (Fig SB ).For each subset of resources, we sampled 10 communities of 500 species each with growth rates uniform-randomly sampled from Σ #  7# 3 = 1 hr 63 (as in the Main Text) and ordered to match each species' resource preference order (such that each species' fastest randomly sampled growth rate was assigned to its most preferred resource and its second fastest to its second preference).
Communities were simulated in a fluctuating environment with resource supplied uniformrandomly sampled on each growth cycle ( MG = 0.236) and the number of coexisting survivors was tallied and explored according to various breakouts (Fig SC -F).We observed that across all ten random communities for each of the 35 three-resource combinations, 17% of random communities featured more coexisting species than resources (Fig SD).This result varied considerably based on the identity of the resources.For example, on glucose, melibiose, and galactose only a single of the ten communities even had as many surviving species as resources (Fig SC ).Meanwhile, on the combination of glucose, fructose, and fucose or the combination of glucose, mannose, and fucose all ten communities featured more coexisting species than resources (Fig SC).For 10 of the 35 three-resource combinations, the mean number of surviving species was statistically indistinguishable from the mean number of survivors when resource preference order were uniformly sampled (Fig SC ).
The variation in how many species each combination of resource typically supports appears, as expected, to be largely driven by how many unique resource preference orders are possible for the combination resources (Fig SE ).For example, in all the top seven-resource preference orders fructose is preferred over fucose and both those resources are preferred over melibiose, so when these three resources are supplied all species share the same resource preference order (Fig SC ), which means resources will always be depleted in this order regardless of supply and the full temporal niche structure can never be realized, thus explaining the low diversity of the resulting communities.For other combinations of resources as many as 5 out of 6 possible resource preference orders occurred (Fig SB -C) and in these cases diversity was high with 43% of communities having more coexisting survivors than supplied resources (Figs SC and SE).In order to realize all temporal niches, it is necessary to have at least one species with each resource as its top preference.The number of unique first preferences is therefore a strong predictor of the number of coexisting species, both in theory and in the results ( Thus, highly diverse communities are possible given realistic distributions of resource preference orders but their frequency depends on which specific resource are supplied.(A) Illustration of three periodic environmental oscillations as defined in Methods using the same resource supply simplex plots as used through the paper.The "three-season" oscillation (left) is expected to produce moderate to high diversity as the large change in resource supply on each growth cycle will prevent the three most specialized species from excluding all those (as would happen under constant environmental conditions) because no ratio of those species could depleted the resources at exactly the same time and the full array of temporal niches is expected to be realized.The "six-season" oscillation (center) is expected to produce even higher diversity due to the addition of growth cycles on which one resource is supplied in a very small amount, which significantly decreases the length of the all-resources-present temporal niche incentivizing generalization into the other niches, thus separating optimal strategies that shared a first preference and increasing the likelihood that all six will be realized in the final community.The "twelve-season" oscillation (right), however, is expected to produce less diverse communities because, while three highly generalized species cannot cause the resources to all be depleted at exactly the same time, the relatively same change in environmental conditions from one cycle to the next allows their population sizes to shift quickly enough to cause resources to be depleted at very similar times, thus disincentivizing investment in resources other than one's top preference.(B) Observed diversity of the final communities after sampling 500 species uniform randomly from ∑  7# 3 # = 1 hr 63 , setting resource preferences equal to species' descending growth rate orderings, running the simulation for 1.2*10 6 growth cycles, and visually checking for and manually removing any species that were clearly going slowly extinct.The observed diversity closely matches the predictions.

F. Resource Preference Complementarity and Anomalous Species
Wang et al. (2021) [2] recently demonstrated that within our model of diauxic resource competition under a constant resource supply (i) survivors almost always had "complementary" resource preferences (such that there was usually exactly one survivor with each resource as its top preference) and (ii) that anomalous species (whose resource preference order did not match their ordering of their growth rates) rarely survived.Here we test whether our final communities of coexisting species also share these properties and confirm that they do.
Because our final communities typically featured more surviving species than resources, multiple species shared first (and even first few) resource preferences, thus prompting a definition of complementary that would be equivalent with Wang et al. (2021) [2] when considering first preferences and only as many species as resources but also extend nicely to higher preferences and larger communities.To this end, resource preference complementarity was calculated for the communities whose number of survivors are shown in This calculation generally produced multiple data points for each community at each order of preference as it considered the groups of species with the same earlier preferences separately.Complementarity was observed to indeed be high.For example, every final community had each first preference represented by at least one species -representing full first order complementarity.Similarly, 65.3% of the sets of coexisting species sharing first preferences and 81.0% of the sets of coexisting species sharing first and second preferences were fully complementary (either all having different next preferences or having all remaining resources represented as next preferences).
We additionally tested whether our final communities, like those produced in Wang et al. (2021) [2], had anomalous species rarely surviving.This test was done both for comparison to the previous report and to rule out the presence of anomalous species as essential to our results.Our Main Text simulations were run in two batches, one with anomalous species included and one without.Specifically, when we were varying the magnitude of environmental fluctuations in three-resource environments (Figs 4C and 5 in the Main Text) we included anomalous species, and when we were varying the number of resources (Fig 4D in the Main Text) we excluded anomalous species.We show in Fig V that anomalous species very rarely survived (and only did when the out-of-order growth rates were very close anyways).Their inclusion, therefore, should not have had any significant impact on our results.

G. Comparison to a Model Without Sequential Resource Utilization
To confirm and further explore the importance of sequential resource utilization specifically to enabling highly diverse communities, we here explore a simple variation on the Main Text diauxie model that removes sequential utilization while leaving all other dynamics as intact as possible.We demonstrate that with sequential utilization removed highly diverse communities become impossible.
The growth dynamics in the Main Text model can be thought of as having two main features: (i) discrete resource utilization states with constant growth rates such that Ës … = 0 for  # > 0 and (ii) increases in the consumption in one resource after another is depleted.The latter feature is the notion of sequential utilization.
Perhaps the easiest way to remove the feature of sequential resource utilization without changing any other model dynamics would be to have species each consume a single resource until it is depleted and then stop growing.This modification would create relatively uninteresting dynamics in which the species competing for resource R # and those competing resource R jÌ# do not interact and each resource independently supports whichever species has the fastest growth rate on it with no mechanisms for additional coexistence.We therefore look for a slightly more interesting model to explore.
To remove sequential utilization while still having interesting, nontrivial dynamics that closely resemble those of the Main Text diauxie model, we can define species as initially coutilizing resources (with constant growth and per capita resource uptake rates) and consuming an increasingly small subset of resources as depletions occur.Importantly, species do not increase their uptake of resources or how much growth they gain from them as other resources run out.Mathematically, this model would be defined by The integrals of the step functions are just the length of time until the resource concentrations reach zero -i.e. the depletion times -and do not depend on the resource depletion order.Therefore, Δ logÏ 7 Ð = Σ #  7#  +NH,# .
The average of a species' log-population growth across many growth cycles is a simple linear function of the average depletion time of each resource, specifically 〈Δ logÏ 7 Ð〉 = Σ #  7# 〈 +NH,# 〉 .
Importantly, nothing in the above calculation depends on the order of b +NH,# c.This independence arises because nothing changes about the species' consumption of resource R # when resource R jÌ# is depleted.
If we impose that 〈Δ logÏ 7 Ð〉 = DF for all surviving species (which is the condition that all species are exactly keeping up with the dilution factor) then by the above equation only have one degree of freedom per resource, it is impossible to have average depletion times 〈 +NH,# 〉 that allow more species than resources to coexist.Thus, when we remove sequential resource depletion while leaving all other model dynamics as intact as possible, highly diverse communities become impossible.This contrast to the Main Text diauxie model illustrates the central importance of the specific aspect of sequential resource utilization to the possibility of highly diverse communities.In this modified model, the time spent in each temporal niche does not directly matter.Instead all that impact a species' growth is the total time each resource is present, reducing the relevant set of niches to simply being one niche per resource.
The illustrate this analytic result, we sampled 300 pools of 500 species competing for 3 resources from the same Σ #   There are, of course, other models which lack sequential resource utilization but nevertheless support more coexisting species than resources [4][5][6][7][8].Sequential utilization and the temporal niches it creates are one interesting mechanism by which highly diverse communities can emerge, but it is not the only.This section demonstrates how removing sequential resource utilization from the Main Text diauxie model and replacing it with simultaneous utilization prevents the stable coexistence of more species than resources.This is because without sequential utilization there is no fundamental reshuffling of which species are in direct competition and for which resources at each resource depletion event.This reshuffling is a fundamental and specific consequence of sequential utilization and the origin of the temporal niche structure that expands the potential for highly diverse communities to coexist.This exploration thus illustrates the specific importance of sequential utilization to the emergence of highly diverse communities in our Main Text results.
in the Main Text, resources are supplied in equal amounts with ∑  # # = 1 at the start of each day and the dilution factor is DF = 10.In Fig 1A in the Main Text, the two species are started from equal population sizes  * +,-/ (0) =  2 +,-/ (0) = / 3(456/) and have growth rates and resource preferences as shown in the Fig 1A in the Main Text and below in Tables A an B:

Fig A explains the
Fig A explains the resource supply simplex plots presented in Figs 4B and 5A in the Main Text and Fig D, while Fig B explains the growth rate simplex plot used in Fig 5B in the Main Text.

Fig A .
Fig A. Explanation of resource supply simplex plots.(A) One of the simplex plots used to illustrate resource supply sampling distributions in the Main Text.(B) That simplex plot shown in threedimensional { / ,  3 ,  > } space.The constraint ∑  # @ AB #C/

Fig C .
Fig C. Linear, monomial, and exponential fits from Table K presented against the data from Fig 4D in the Main Text.

Fig D .
Fig D. Number of surviving species at all fluctuation magnitudes tested.(A) Equivalent of Figs 4B-C in the Main Text, but now included all tested fluctuation magnitudes from  MG = 0 to  MG = 0.471.(B) Reproduction of Fig 5B in the Main Text to facilitate comparison to A.

Fig E .
Fig E.Emergent oscillations are rare when sampling random species.We sampled random pools of 7 species competing for 3 resources.The dilution factor was 10 and the resource supply was constant with equal fractions of each resource.Growth rates were sampled from the same ∑  7# Fig 1C in the Main Text and explored in Fig 2 in the Main Text had anomalous resource preferences, potentially raising the question of whether anomalous resource preference is necessary for oscillations and competitive exclusion violations in the case of a constant resource supply.Fig F presents an example demonstrating that this is not the case.

Fig F .
Fig F. Example of an oscillation and competitive exclusion violation without anomalous resource preferences.(A) Growth rates for the five species on each of the four resources in this example.Growth rates are indicated by horizontal bars, colored by resource and also labeled.Arrows illustrate the species' resource preference orders, which always match their descending growth rate orders.(B) The steady-state oscillation in which the four species coexist, showing population fractions on top and resource depletion times on the bottom.

Fig G .
Fig G. Diauxic growth can exhibit chaos.(A) Population fractions at the end of each of 10 4 growth cycles for a three-species community with a chaotic attractor.Simulation parameters are presented in Table M. (B) The same trajectory as in A plotted on a simplex diagram, with population fraction fractions mapped onto the simplex diagram in the same manner resource supply fractions were mapped onto their simplex diagrams (Section A2 and Fig A).The inoculum condition (highest point on the simplex) and compositions after the first five growth cycles are shown as enlarged, connected dots.Community compositions for the remaining 9,995 growth cycles are shown as small, unconnected dots.Curved arrow illustrates direction of motion within the chaotic attractor.It takes 16.7 ± 4.4 growth cycles (mean and standard deviation) to travel around the attractor once.(C) Magnification of the region indicated by the box overlay on B. The simulation was run for 2 * 10 £ growth cycles, the last 10 £ of which are shown here.A fractal-like pattern -as is often associated with chaos -is evident.(D) To rigorously established chaos, we randomly chose 40 points from the trajectory and around each of these points created a cluster of 10 initial conditions by adding normal random noise with  = 10 68 to each species' population fraction and then renormalizing the population fractions to ∑  7 > 7C/

Fig H .
Fig H. Seven species stably coexisting on three resources.Species population fractions (top) and resource depletion times (bottom) over the first 1000 growth cycles (left) and growth cycles 1000 through 1100 (right).In the bottom right plot, the seven temporal niches are highlighted as in Fig 2C in the Main Text.All seven species coexist, saturating the upper bound.In this simulation, the dilution factor is 10, the resource supply is constant with an equal supply of all three resources, and species' growth rates and preferences are given by TableN.

C5b.
Fig I. Species population fractions (top) and resource depletion times (bottom) over the 140 growth cycles after the community has settled into its steady-state oscillation.In the bottom plot, the fifteen temporal niches are highlighted as in Fig 2C in the Main Text.(The temporal niche in which R3 and R4 are the two remaining resource occurs twice.)All fifteen species coexist, saturating the upper bound.In this simulation, the dilution factor is 10, the resource supply is constant with an equal supply of all three resources, and species' growth rates and preferences are given by TableO.
Fig J. Species population fractions (top) and resource depletion times (bottom) over 1000 growth cycles after the community has settled into its steady-state oscillation.

Fig L .
Fig L. Example of a simple constructed oscillation with more coexisting species than resources.(A) Resource preferences and growth rates for the six coexisting species.(B) Population fractions at the end of each growth cycle and resource depletion times for these six species competing for the three resources supplied in equal amounts.
Fig M shows two communities based on the discussion in Section C6a that oscillate with different periods but similar amplitudes.

Fig M .
Fig M. Two examples of three-species three-resource oscillations based on the discussion inSection C6a that oscillate with different periods.A small amount of noise was added to growth rate values after creating species that were exact cyclic permutations of each other to demonstrate that the growth rates do not need to be fine-tuned for these oscillation to occur.

Fig N .
Fig N. Example of a six-species six-resource oscillation constructed from two three-species three-resource oscillations that produces almost all the possible temporal niches.(A) Resource preference orders and growth rates.Note the near independence of A, B, and C competing for R1, R2, and R3 and D, E, and F competing for R4, R5, R6. (B) Population fractions and resource depletion times over 200 growth cycles.(C) Time spent in each temporal niche.Bar plot on top shows the mean time spent in each temporal niche at steady state.Grid on the bottom defines the temporal niches with a colored box indicating that the resource is present in the niche that the bar directly above corresponds to.
Fig O shows an example of adding a new species G to the community presented in Fig O according to this procedure.

Fig O .
Fig O. Simulation of the same community as in Fig N but with Species G now added.

Fig Q .
Fig Q. Strict metabolic constraints are not necessary for competitive exclusion violations to be a likely outcome.(i) The results on number of surviving species under a fluctuating resource supply from Fig 4D in the Main Text in which species competing for four resources were sampled from the hypersurface defined by ∑  7# 3 X #C/ = 1 hr 63 , reproduced here to facilitate comparison.(ii)To confirm the strict metabolic tradeoffs was not necessary for the competitive exclusion violation, we sampled species using a loose metabolic constraint in which after sampling from the same hypersurface species growth rates were transformed by  7# →  7# *  7 (1, 0.2) in which  7 (1, 0.2) is a normally distributed value sampled once for each species.This meant best-at-everything species were still rare but some species could grow faster on all resources than some of their competitors.Over one third of communities still violated competitive exclusion.(iii) We also tested the sampling distribution used inWang et al. (2021) [2].This distribution sampled each component  7# independently from (0.25 hr 6/ , 0.05 hr 6/ ), thus creating species that tended to all have similar growth rates on all resources with no inverse correlations.Even with no metabolic tradeoffs at all, we still observed a 20% frequency of violations.

Fig S .
Fig S. Highly diverse communities are possible when species have resource preference orders sampled from an experimentally evidenced distribution, but their likelihood depends on which resources are supplied.(A) Relatively frequencies of the fourteen 1 most frequent resource preference orders as extracted from Fig 1E of Takano et al. (2023) [3] by measuring bar heights.(B) Overview of how results from Takano et al. (2023) were incorporated into species sampling.We iterated over each subset of three of the seven resources and calculated frequencies of each of the three-resource preference orders from the frequencies of the seven-resource preference orders.We then sampled communities of 500 species with growth rates sampled from Σ #  7# 3 = 1 hr 63 and then sorted to match each species' resource preference order and simulated them in an environment Fig SE).Indeed, when all first preferences of possible, observed diversity in the communities based off results from Takano et al. (2023) is only barely lower than diversity in the Main Text communities in which resource preferences were uniformly sampled (Fig SF).

Fig T .
Fig T. Observed community diversity under a periodic environmental oscillations matches expectations.(A)Illustration of three periodic environmental oscillations as defined in Methods using the same resource supply simplex plots as used through the paper.The "three-season" oscillation (left) is expected to produce moderate to high diversity as the large change in resource supply on each growth cycle will prevent the three most specialized species from excluding all those (as would happen under constant environmental conditions) because no ratio of those species could depleted the resources at exactly the same time and the full array of temporal niches is expected to be realized.The "six-season" oscillation (center) is expected to produce even higher diversity due to the addition of growth cycles on which one resource is supplied in a very small amount, which significantly decreases the length of the all-resources-present temporal niche incentivizing generalization into the other niches, thus separating optimal strategies that shared a first preference and increasing the likelihood that all six will be realized in the final community.The "twelve-season" oscillation (right), however, is expected to produce less diverse communities because, while three highly generalized species cannot cause the resources to all be depleted at exactly the same time, the relatively same change in environmental conditions from one cycle to the next allows their population sizes to shift quickly enough to cause resources to be depleted at very similar times, thus disincentivizing investment in resources other than one's top preference.(B) Observed diversity of the final communities after sampling 500 species uniform randomly from ∑  7# Fig 4D in the Main Text as: Complimentary of N "À preferences amongst species sharing 1 "À through (N − 1) "À preferences = (Number of unique N "À preferences those species have) min[(Number of species in that set), (Number of possible N "À preferences)]

Fig U .
Fig U. Complementary of resource preferences.Complementarity of resource preferences using the above-defined formula by number of resources in the simulation and resource preference ordinal.Null model is calculated from taking the number of surviving in each community and calculating the expected complementarities if all species had randomly assigned resource preferences.

Fig V .
Fig V. Anomalous species rarely survived.(A) Frequency at which a surviving species did not have the resource it grew fastest on as its top preference (blue) and at which it grew faster on its third preference than its second preference.By fluctuation magnitude and using results from the same simulations as in Figs 4C and 5 from the Main Text.(B) For comparison the mean growth rates of surviving species by resource preference.Shaded regions indicate one standard deviation.(C) Frequency of a species preferring one resource over another that it grows slowest on as a function of the difference between the two growth rates.

𝑛 7 Í
() =  7 ()Σ #  7# Θ[ # ()] and  7 Í () = −Θ[ # ()]Σ 7  7#  7 () , where Θ[] = 1 for  > 0 and Θ[] = 0 for  = 0 and a periodic dilution and resource resupply occur as in the Main Text model.As we did in our analysis of the Main Text model, we can ask by how much species' logpopulations grow on each growth cycle.This is accomplished by integrating their growth rates over time.Doing so and plugging in the above expression for  7 Í (), we obtain

7 # 3 = 1
hr 63 distribution as in the Main Text and simulated them according to the above-described model in an environment in which the resource supply was uniform-randomly sampled ( MG = 0.236) on each growth cycle and tallied the number of coexisting survivors in each community (Fig WB).We compared these tallies to the number of coexisting species in the Main Text diauxie model (Fig WA, which presents the same data as the  GH = 3 condition in Fig 4D in the Main Text) and to the classic linear resource consumption model defined by  7 Í () =  7 ()Σ #  7#  # () and  7 Í () = − # ()Σ 7  7#  7 () , which was also simulated under the same periodic dilution and uniform-randomly sampled resource supply (Fig WC).

Fig W .
Fig W. When sequential resource utilization is removed, highly diverse communities become impossible.(A) Histogram of the number of coexisting species in the simulations of 500 species competing for three resources supplied in uniform-randomly sampled fractions on each day

Table A .
Fig 1A growth rates.

Table B .
Fig 1A preferences.In Fig 1B in the Main Text, the five species are start from equal population sizes  7 +,-/ (0) = / 8(456/) in both the single-resource and two-resource examples.Growth rates in the onespecies example are:

Table C .
Fig 1B single resource example growth rates.

Table E .
Fig 1B two-resource example resource preferences.The example of five species surviving on three resources is the same in Figs 1C and 2 in the

Table H .
Figs 1C and 2 resource preferences.

Table J .
Fig 4A resource preferences.

Table K .
in the Main Text.Table K summarizes the best fits, as well as R 2 and RMS residuals.Details of the linear, monomial, and exponential fits to the data on number of surviving species vs number of resources presented in Fig 4D in the Main Text.

Table M .
Growth rates and resource preferences for the example of chaos in Fig G.

Table N .
Growth rates and resource preferences for the example of seven species coexisting on three resources in Fig H.

Table O .
Growth rates and resource preferences for the example of fifteen species coexisting on four resources in Fig I.

Table P .
Growth rates and resource preferences for the example of twenty three species coexisting on five resources in Fig J.

Table Q .
Growth rates and resource preference for the example constructed in Section C6a and illustrated in Fig L.

Table R .
: Growth rates by temporal niche for the first three season in the example constructed in Section C6b.