1 Introduction

From van Leeuwenhoeks’s earliest observations of the microverse to contemporary interest in human microbiomes, it has been apparent that microbes do not exist as monocultures. Naturally occurring ecosystems, optimized by eons of evolution, are almost exclusively organized in communities. In fact, a general positive correlation has been established between community diversity and productivity (Kassen et al. 2000; Venail et al. 2008). Recent advances in metagenomic techniques have given us the tools to estimate the diversity of naturally occurring microbial communities. In a wide range of samples from soil (Fierer and Jackson 2006), to the ocean (Venter et al. 2004), to the human gut (Gill et al. 2006), it has been found that microbial communities are incredibly diverse, often consisting of thousands of interacting species. Due to these interactions, studying the behavior of individual microbes in isolation does not capture their behavior in a natural community.

Subsets of these communities form consortia that act together to enhance their capabilities. The interactions in these consortia lead to emergent behaviors, allowing the systems to perform advanced functions that the individual microbes are not capable of Eiteman et al. (2008). Emergent properties of microbial interactions are known to be important in diverse areas including medical infections (e.g., diabetic ulcers), biofuels synthesis [e.g., biodiesel production (Zuroff and Curtis 2012; Peralta-Yahya et al. 2012)], environmental nutrient cycling (e.g., \(\hbox {CO}_2\) sequestering), bioprocessing (Shong et al. 2012) and wastewater treatment (Seitz et al. 1990a, b; Schink 1997).

Natural consortia are often organized as either syntrophic or commensal consortia around the sequential degradation of complex compounds like lignocellulosic material. In these systems, one species catabolizes the available substrate, oxidizing it to produce a byproduct that the second species can consume. If the byproduct inhibits the growth of the producer species, then the interaction is syntrophic; if it has no effect on the producer, the interaction is commensal. The syntropic chain community has been studied mathematically, and it can be shown that for n species in the chain, the coexistence state is stable (Reilly 1974; Powell 1985, 1986). This system can be modified to include other forms of inhibition, external toxins, multiple substrates and other forms of mutualism. In all cases a stable coexistence steady state is found (Aota and Nakajima 2001; Elkhader 1991; Burchard 1994; Katsuyama et al. 2009; Sari et al. 2012), indicating that this is a good candidate system for producing stable consortia.

The commensal chain can be seen as a way of dividing up the steps involved in degrading the available substrate, thereby allowing for the maximum utilization rate of the available energy, in agreement with the maximum power principle (MPP). Originally formulated by Lotka (1922) and further developed by Odum and Pinkerton (1955), the MPP states that biological systems capture and use energy to build and maintain structures and gradients, allowing additional capture and utilization of energy. Some arguments have been put forward to explain how such a system might naturally evolve and reach a steady state (de Mazancourt and Schwartz 2010; Doebeli 2002; Pfeiffer and Bonhoeffer 2004; Bull and Harcombe 2009; Estrela and Gudejl 2010; Beardmore et al. 2011). An alternative resource ratio theory (de Mazancourt and Schwartz 2010; Tilman 1982) can describe cooperative populations by accounting for mutualistic resource exchange. Cooperating populations that exchange limiting resources can exist in a wider range of resource environments than is possible for either population individually. This highlights an evolutionary advantage of cooperation that has been observed in natural ecosystems (de Mazancourt and Schwartz 2010).

In experiments where a wild-type E. coli was allowed to evolve for many generations, it was found to lead to a similar system, where one strain consumed the glucose substrate and another consumed the acetate the first strain produced. However, there was an additional secondary scavenger species that preferentially consumed glycerol (another byproduct of the primary glucose consumer) (Rosenzweig et al. 1994). This hub system of a primary producer and multiple scavengers has been found to evolve repeatably and to be robust to system perturbations (Helling et al. 1987; Treves et al. 1998; Rozen and Lenski 2000) and thus is another good candidate for producing stable consortia.

Our goal in this paper is to develop a general theory for a commensal food web of arbitrary size, where the product of one species is consumed by another species. Since we want to concentrate on commensal relationships, we exclude competition from consideration. The food webs that we consider include both the food chains, where a resource is sequentially degraded by a set of organism, and a hub-type food webs, where the principal resource is degraded to a set of secondary resources which then support a set of specialist species.

We now briefly summarize our results. We show under very general assumptions that a \(n + m\)-dimensional consortium model which includes n species and m essential resources has an n-dimensional invariant manifold. It follows that the system can always be reduced to an n-dimensional system. We compute the reduced equations on this manifold. We then consider a narrower class of simple food webs with no competition for resources and commensal relationships between species. We show that there is at most one equilibrium with a given set of species surviving, and we provide a condition in terms of available resources that guarantees the survival of a particular species in such a community equilibrium.

Our main result concerns the stability of the equilibria. We show that there is unique stable equilibrium in the system which corresponds to the largest community that can be supported by the available resources. In other words, out of all existing equilibria, the one that is stable has the greatest number of species. Furthermore, this equilibrium maximizes biomass over all other equilibria. This is in agreement with the MPP principle which suggests that if coexistence occurs, the resulting communities should have higher power than either species could have alone, or other less effective communities (DeLong 2008). Indeed, the stable equilibrium corresponds to the consortium that transforms more of the resources into biomass, and hence utilizes more of the available energy than any other consortium in the system.

2 General System

We consider a chemostat model with n microbes and m substrates, which are both consumed and produced by the microorganisms.

$$\begin{aligned} \dot{x}_1= & {} (f_1 - D) x_1 \nonumber \\ \dot{x}_2= & {} (f_2- D)x_2 \nonumber \\&\vdots&\nonumber \\ \dot{x}_n= & {} (f_n - D)x_n \nonumber \\ \dot{S}_1= & {} (S_1^{\mathrm{in}} - S_1)D - \sum _{j} \alpha _{1j} f_j x_j + \sum _{j} \beta _{1j} f_j x_j\nonumber \\ \dot{S}_2= & {} (S_2^{\mathrm{in}}-S_2)D - \sum _{j} \alpha _{2j} f_j x_j + \sum _{j} \beta _{2j} f_j x_j \nonumber \\&\vdots&\nonumber \\ \dot{S}_m= & {} (S_m^{\mathrm{in}}-S_m)D - \sum _{j} \alpha _{mj} f_j x_j + \sum _{j} \beta _{mj} f_j x_j \end{aligned}$$
(1)

Here \(S_i^{\mathrm{in}}\) is the influx rate of the substrate \(S_i\) into the chemostat, \(x_i\) is a concentration of the ith microorganism, and D is a dilution rate, which is assumed to be the same for all substrates and species. The growth rate \(f_i= f_i( S_1, \ldots , S_m)\) of each microbe \(x_i\) may depend on every other substrate \(S_i\), and the effect of a substrate may be positive when a substrate is consumed or detrimental when the substrate is poisonous and decreases the growth rate of \(x_i\). We denote consumption yield coefficients by \(\alpha _{ij}>0\) where i is the substrate and j is the consumer. On the other hand, when a microbe j produces a substrate i, we denote the corresponding conversion, or yield coefficient, by \(\beta _{ij}\). We assume that both types of yield coefficients are constant.

In vector form these equations can be written as

$$\begin{aligned} \dot{\mathbf {x}}= & {} (\mathbf {F}-D\mathbf {I}) \mathbf {x}\nonumber \\ \dot{\mathbf {S}}= & {} (\mathbf {S}^{\mathrm{in}} - \mathbf {S})D - \mathbf {Y F x} \end{aligned}$$
(2)

where \(\mathbf {S}^{\mathrm{in}} - \mathbf {S}\) is a vector with elements \( S^{\mathrm{in}}_i - S_i\), \(\mathbf {Y}\) is the net consumption matrix with (ij)th element \(y_{ij}:= \alpha _{ij} - \beta _{ij}\), and the matrix \(\mathbf {F} = \mathbf {F}(\mathbf {S})\) is a \(n \times n\) diagonal matrix with \(f_i(\mathbf {S})\) being the (ii) element on the diagonal.

Following Smith and Li (2003), our first observation is that this system admits a globally attracting affine n-dimensional manifold M. To see this, consider a new set of variables

$$\begin{aligned} w_i= S_i + \sum _{j} \alpha _{ij} x_j - \sum _{j} \beta _{ij} x_j, \qquad i=1, \ldots , m \end{aligned}$$

which summarize the influx and outflow of substrate i. We write this change of variables in the vector form

$$\begin{aligned} \mathbf {w}= \mathbf {Y x} + \mathbf {S}, \end{aligned}$$

where \(\mathbf {w}, \mathbf {S}\) and \(\mathbf {x}\) are vectors of the corresponding variables

Then the \(\mathbf {S}\) equations in (2) can be replaced by m equations in new variables \(\mathbf {w}\)

$$\begin{aligned} \dot{\mathbf {w}}= & {} \mathbf {Y} \dot{\mathbf {x}} + \dot{\mathbf {S}} \nonumber \\= & {} \mathbf {Y}(\mathbf {F}-D\mathbf {I})\mathbf {x} + (\mathbf {S}^{\mathrm{in}} - \mathbf {S})D - \mathbf {YFx} \nonumber \\= & {} -D \mathbf {Yx} + (\mathbf {S}^{\mathrm{in}} - \mathbf {S})D \nonumber \\= & {} (\mathbf {S}^{\mathrm{in}} - \mathbf {w})D \end{aligned}$$
(3)

Therefore the system (2) is transformed into

$$\begin{aligned} \dot{\mathbf {w}}= & {} (\mathbf {S}^{\mathrm{in}} - \mathbf {w})D \nonumber \\ \dot{\mathbf {x}}= & {} (\mathbf {F}(\mathbf {w} - \mathbf {Yx})-D\mathbf {I}) \mathbf {x} \end{aligned}$$
(4)

Observe that this system has a globally attracting n-dimensional affine invariant manifold defined by

$$\begin{aligned} M := \left\{ (\mathbf {x},\mathbf {w}) \in {\mathbb {R}}^{n+} \times {\mathbb {R}}^{m+} \;|\, \mathbf {w} = \mathbf {S}^{\mathrm{in}} \right\} = \left\{ (\mathbf {x},\mathbf {S})\in {\mathbb {R}}^{n+} \times {\mathbb {R}}^{m+} \,|\, \mathbf {S} = \mathbf {S}^{\mathrm{in}} - \mathbf {Yx} \right\} \end{aligned}$$

where \({\mathbb {R}}^{n+}\) denotes the nonnegative orthant in \({\mathbb {R}}^n\). The dynamics of the original system on the manifold M have the form

$$\begin{aligned} \dot{\mathbf {x}} = (\mathbf {F}(\mathbf {S}^\mathrm{in} - \mathbf {Yx})-D\mathbf {I}) \mathbf {x} \end{aligned}$$
(5)

where the dependence of \(\mathbf {F}\) on \(\mathbf {S}\) is replaced by a dependence on \(\mathbf {S}^\mathrm{in} - \mathbf {Yx}\).

Note that the dynamics on the invariant manifold M depend on the yield matrix \(\mathbf {Y}\).

3 Simple Food Webs

In what follows we will put additional simplifying assumptions that will allow us to analyze the system, yet that are general enough to include interesting examples, some of which are analyzed in the following section. To describe the set of assumptions, we will use the language of graph theory.

Let G(VE) be an oriented graph, where each vertex is labeled by a species \(x_i\), and each edge is labeled by a resource \(S_j\). Each edge connects a producer to a consumer of the resource labeling the edge. In other words, an edge starting at a node \(x_i\) corresponds to a resource \(S_j\) that is produced by \(x_i\), and an edge that terminates in \(x_k\) corresponds to a resource that is consumed by \(x_k\). The influx of external resources to chemostat is represented by edges with only a terminal node and labeled by a particular resource.

Definition 1

A simple food web is a collection of n species and m resources, represented by an oriented graph G(VE) where

  1. 1.

    there are no nontrivial oriented cycles in G, i.e., no cycles except possibly when a species produces and consumes the same substrate;

  2. 2.

    each species \(x_i\) consumes a dedicated substrate \(S_j\). This eliminates the competition in the system. After a change of indices, if necessary, we will assume that species \(x_i\) consumes substrate \(S_i\). This means that all edges that terminate at a vertex \(x_i\) must have the same label and that these labels are distinct for different vertices;

  3. 3.

    the growth functions \(f_i\), which by (2) depend on a single substrate \(S_i\), are monotonically increasing.

  4. 4.

    If species i produces \(S_j\) and consumes the same \(S_j\), then the substrate-from-biomass yield \(\beta _{ji} \) is smaller than the biomass-from-substrate yield \(\alpha _{ji}\). The opposite case would allow a net production of biomass without any external resource.

We now discuss several consequences of our assumptions.

  • Without loss of generality, we can restrict our attention on simple food webs that are represented by a connected graph; if this is not the case, we can restrict our attention to each connected component separately.

  • Assumption (2) implies that \(m \ge n\), i.e., the number of resources m is greater or equal to number of species n. If \(m >n\), then the extra resources are not consumed, and their dynamic behavior does not affect the rest of the system. Therefore we can restrict our attention to the core system of n species and n resources that are consumed by these species. If some species produce resources that are not consumed, their behavior can be determined after the behavior of the core system is identified.

  • Our assumptions imply a stratification of G into food chain layers \(X_0, X_1, \ldots , X_k\). We denote the set of all vertices i with \(S_i^\mathrm{in} > 0\) by \(X_S\). A depth \(d(x_i)\) of the species \(x_i\) in the food chain is defined to be the length of the longest path in G from \(x_i\) to some vertex in \(X_S\). Again, by assumption (1) depth is well defined for each species. The jth layer of the simple food chain is the set \(X_k\) of those species \(x_i\) with \(d(x_i) = k\).

We now prove that simple food webs have the following property.

Lemma 1

In the core system of any simple food web, the n species and n resources can be relabeled in such a way that the matrix \(\mathbf {Y}\) is lower triangular and invertible.

Proof

We order all species according to their depth, starting with \(X_0\), species with depth 0. Since each substrate \(S_i\) is assigned to a unique species \(x_i\), we order substrates in the same order the species are in. Therefore \(\alpha _{ij} = 0\) for all \( i \not = j\), and \(\alpha _{ii} > 0\) for all i.

Now we examine yields \(\beta _{ij}\). Observe that a species \(x_i\) with depth \(d(x_i) = k\) cannot depend on resource \(S_j\) if \(d(x_j) \ge k\). If this was the case, then there will be a path in G from \(X_S\) to \(x_i\) through \(x_j\) with length at least \(k+1\). This contradicts the fact that \(x_i\) has depth k. Therefore \(\beta _{ij}\), the measure of production for substrate i by species j, is 0 for \(i \le j\).

Finally, by (4) the diagonal entries \(y_{ii} = \alpha _{ii} - \beta _{ii}\) are greater than zero. Hence the yield matrix \(\mathbf {Y}\) representing the core system is square and lower triangular with nonzero entries along the diagonal. Therefore \(\mathbf {Y}\) is invertible. \(\square \)

4 Existence of Equilibria

Let \(N := \{ 1, \ldots , n\}\) and let \({\mathscr {P}}(N)\) be the collection of all subsets of N. Then the phase space \({\mathbb {R}}^{n+}\) can be decomposed into disjoint subsets \(C_U\), parameterized by the sets \(U \in {\mathscr {P}}(N)\), and defined by

$$\begin{aligned} C_{U} = \{ x \in {\mathbb {R}}^{n+} \,\, | \,\, x_i > 0 \,\, \text{ for } \,\, i \in U, \, x_i= 0 \,\, \text{ for } \,\, i\not \in U \} . \end{aligned}$$

Definition 2

The necessary resource for a species \(x_i\) is the value \(S_i^{nec}\) implicitly defined by

$$\begin{aligned} f_i(S_i^\mathrm{nec}) = D. \end{aligned}$$

The proof of the next theorem requires conditions that are significantly weaker than those in Definition 1. In particular, we only require monotonicity of each \(f_i\), not that \(f_i\) is an increasing function.

Theorem 1

Assume that every \(f_i(S_i)\) is monotonically increasing, or monotonically decreasing. Let \(\mathbf {Y}_U\) be a principal minor of U specified by the index set \(U \in {\mathscr {P}}(N)\); that is, \(\mathbf {Y_U}\) is submatrix of \(\mathbf {Y}\) that is constructed by deleting all rows and columns i where \(i \not \in U\).

Then, if \(\det \mathbf {Y}_U \not = 0\), then the system (5) can have at most one equilibrium in \(C_{U}\).

This equilibrium, if it exists, is determined by equations

$$\begin{aligned} x_{i} = 0 \text{ for } \text{ all } i \not \in U; \qquad x_i > 0 \text{ for } \text{ all } i \in U; \qquad \, \mathbf {S}_U^\mathrm{in} - \mathbf {S}^\mathrm{nec}_U = \mathbf {Y}_U \mathbf {x}_U , \end{aligned}$$

where \(\mathbf {x}_U, \, \mathbf {S}^\mathrm{in}_U\) and \(\mathbf {S}^\mathrm{nec}_U\) are vectors of \(\mathbf {x}, \mathbf {S}^\mathrm{in}\) and \(\mathbf {S}^\mathrm{nec}\) restricted to indices \(i \in U\), respectively.

Proof

In a given set U, the equations that determine the equilibria are

$$\begin{aligned} x_{i} = 0 \text{ for } \text{ all } i \not \in U; \qquad f_i(S^\mathrm{nec}_i) = D \text{ for } \text{ all } i \in U, \end{aligned}$$

which follows immediately from (5) and the fact that at an equilibrium where \(x_i \not = 0\), we must have \( f_i(S_i) = D\). By monotonicity of \(f_i\), there is at most one solution \(S^\mathrm{nec}_i\) of \(f_i(S_i) = D\) for any \(i \in U\). If for some \(i \in U\) such \(S^\mathrm{nec}_i\) does not exist, then \(C_U\) will not contain an equilibrium. With the vector \(\mathbf {S}^\mathrm{nec}_U\) assembled, we compute the \(x_i\) components of the equilibrium by solving [see (5)] \( \mathbf {S}^\mathrm{nec} - \mathbf {S}^\mathrm{in} = \mathbf {Yx} \) restricted to the species \(x_i, \, i \in U\). This yields equation

$$\begin{aligned} \mathbf {S}_U^\mathrm{in} - \mathbf {S}^\mathrm{nec}_U = \mathbf {Y}_U \mathbf {x}_U \end{aligned}$$

which has a unique solution when \(\mathbf {Y}_U\) is invertible. If this solution has a positive component \(x_i > 0\) for all \(i \in U\), then \(C_U\) contains an equilibrium. \(\square \)

We have the following corollary for a simple food web.

Corollary 1

In a simple food web, each \(C_U\) contains at most one equilibrium.

Proof

Since \(\mathbf {Y}\) is lower triangular with nonzero diagonal elements, each principal minor is invertible. \(\square \)

At this point a natural question is whether there is a simple criterion to determine whether a given \(C_U\) contains an equilibrium. We will need a concept of an available resource at \(\mathbf {x} = (x_1, \ldots , x_n)\).

Definition 3

Given a location in phase space \(\mathbf {x} = (x_1, \ldots , x_n)\), the available resource for species i is

$$\begin{aligned} S_i^\mathrm{av}(\mathbf {x}) := S_i^\mathrm{in} - [\mathbf {Yx}]_i \end{aligned}$$

where \([\mathbf {Yx}]_i\) is the ith entry of the vector \(\mathbf {Yx}\).

Definition 4

For each species \(x_i\) the set of predecessors \(P_i\) is the set of species j such that \(x_j \) produces the essential resource needed by \(x_i\). In other words, \(j \in P_i\) if, and only if, there is an edge from \(j \rightarrow i\) in the graph G.

For each vector \(\mathbf {e}= (e_1, \ldots , e_n)\), let \(\hat{\mathbf {e}}_j\) be a vector

$$\begin{aligned} \hat{e}_{j_{\,i}} = \left\{ \begin{array}{ll} e_i &{}\quad \text{ if } i \in P_i \setminus \{j\} \\ 0 &{}\quad \text{ otherwise. } \end{array} \right. \end{aligned}$$

Theorem 2

A vector \(\mathbf {e} = (e_1, \ldots , e_n) \in {\mathbb {R}}^{n+}\) is a equilibrium if, and only if, for each i, either \(e_i=0\) or, if \(e_i > 0\), then

$$\begin{aligned} e_i = \frac{S_i^\mathrm{av}(\hat{\mathbf {e}}_i) - S_i^\mathrm{nec}}{y_{ii}}. \end{aligned}$$
(6)

Proof

\((\implies )\) We assume that \(\mathbf {e}\) is an equilibrium in \({\mathbb {R}}^{n+}\). Then by (5) either \(e_i=0\), or, if \(e_i >0\), then \(f_i(S_i^\mathrm{nec}) = D\) and \( S_i^\mathrm{nec} = S_i^\mathrm{in} - [\mathbf {Ye}]_i \).

This implies

$$\begin{aligned} S_i^\mathrm{nec}= & {} S_i^\mathrm{in} - [\mathbf {Ye}]_i \\= & {} S_i^\mathrm{in} - \sum _{k \in P_i} y_{ik}e_k - y_{ii}e_i \\= & {} S_i^\mathrm{av}(\hat{\mathbf {e}}_i) - y_{ii}e_i, \end{aligned}$$

from which (6) follows.

Observe that \(e_i=0\) always satisfies (5). Suppose that if \(e_i > 0\) then (6) holds. Then we have

$$\begin{aligned} S_i^\mathrm{in} - [\mathbf {Ye}]_i= & {} S_i^\mathrm{in} - \sum _{k \in P_i} y_{ik}e_k - y_{ii}e_i \\= & {} S_i^\mathrm{av}(\hat{\mathbf {e}}_i) - y_{ii}e_i \\= & {} S_i^\mathrm{nec} \end{aligned}$$

and therefore (5) is satisfied for component i. This shows that (5) holds for all components and hence \(\mathbf {e}\) is an equilibrium. \(\square \)

Definition 5

A set of species corresponding to a set of vertices I is independent if \( i \not \in P_j\) for any two indices \(i,j \in I\).

The next corollary gives an inductive way to construct the set of all possible equilibria, after taking into account that \(\mathbf {0} = (0,\ldots ,0)\) is always an equilibrium.

Corollary 2

Let \(\mathbf {e} = (e_1, \ldots , e_n)\) be an equilibrium contained in some \(C_U\). Let I be an independent set of species with \(U \cap I = \emptyset \), satisfying \(S_i^\mathrm{av}(\mathbf {e}) > S_i^\mathrm{nec}\) for all \( i \in I\). Then there exists an equilibrium \(\mathbf {E}=(E_1, \ldots , E_n)\) in \(C_{U \cup I}\) with \(E_i > 0\) for all \(i \in I\cup U\).

Proof

Pick an arbitrary \(i_1 \in I\). We observe that since \(I \cap U = \emptyset \), we have \(e_{i_1}=0\) and thus

$$\begin{aligned} S_{i_1}^\mathrm{av}(\hat{\mathbf {e}}_{i_1}) = S_{i_1}^\mathrm{av}(\mathbf {e}) = S_{i_1}^\mathrm{in} - \sum _{k \in P_{i_1} \cap U} y_{ik}e_k. \end{aligned}$$

We construct a vector \(\mathbf {E}^1\) where \(E^1_j = e_j \) for all \(j \not = i_1\) and replace \(e_{i_1} = 0\) by

$$\begin{aligned} E^1_{i_1}= \frac{S_{i_1}^\mathrm{av}(\hat{\mathbf {e}}_{i_1}) - S_{i_1}^\mathrm{nec}}{y_{i_1 i_1}} = \frac{S_{i_1}^\mathrm{av}(\mathbf {e}) - S_{i_1}^\mathrm{nec}}{y_{i_1 i_1}}>0, \end{aligned}$$

then by Theorem 2 the resulting vector \(\mathbf {E}^1\) is an equilibrium with \(\mathbf {E}^1 \in C_{U \cup \{i_1\}}\).

Select now an arbitrary \(i_2 \in I \setminus \{i_1\}\). Since I is an independent set of species, \(i_1 \not \in P_{i_2}\) and therefore the \(i_1\)th component of \(\hat{\mathbf {e}}_{i_2}\) is zero. Therefore

$$\begin{aligned} S_{i_2}^\mathrm{av}(\hat{\mathbf {e}}_{i_2}) = S_{i_2}^\mathrm{av}(\mathbf {e}) = S_{i_2}^\mathrm{av}(\mathbf {E}^1) = S_{i_2}^\mathrm{in} - \sum _{k \in P_{i_2} \cap U} y_{ik}e_k. \end{aligned}$$

As before, we construct a vector \(\mathbf {E}^2\) such that \(E^2_j = E^1_j \) for all \(j \not = i_2\) and replace \(e_{i_2} = 0\) by

$$\begin{aligned} E^1_{i_2}= \frac{S_{i_2}^\mathrm{av}(\hat{\mathbf {e}}_{i_2}) - S_{i_2}^\mathrm{nec}}{y_{i_2 i_2}} = \frac{S_{i_2}^\mathrm{av}(\mathbf {E}^1) - S_{i_2}^\mathrm{nec}}{y_{i_2 i_2}}>0. \end{aligned}$$

By Theorem 2 the resulting vector \(\mathbf {E}^2\) is an equilibrium with \(\mathbf {E}^2 \in C_{U \cup \{i_1,i_2\}}\). Repeating the argument until we exhaust the index set I finishes the proof. \(\square \)

Lemma 2

Consider any equilibrium \(\mathbf {e}=(e_1, \ldots , e_n)\). Then, for each i such that \(e_i >0\), there is an oriented path p in the graph G connecting a vertex in \(X_S\) with external resource input to the vertex \(x_i\), such that \(e_k > 0\) for all \(k \in p\).

Stated more strongly, for each equilibrium \(\mathbf {e}\) there is a set of species \(x_{i_1}, \ldots , x_{i_k}\) and (not necessarily disjoint) oriented paths \(p_{i_1}, \ldots , p_{i_k}\) such that \(p_{i_j}\) connects a vertex in \(X_S\) to vertex \(x_{i_j}\), with the property that \(e_i >0\) if, and only if, \( i \in \bigcup _{j} p_{i_j}\).

Proof

Let \(e_i > 0\). Consider the equation

$$\begin{aligned} S_i^\mathrm{nec} = S_i^\mathrm{in} - [\mathbf {Ye}]_i = S_i^\mathrm{in} - \sum _{k \in P_i} y_{ik}e_k - y_{ii}e_i = S_i^\mathrm{in} + \sum _{k \in P_i} \beta _{ik}e_k - y_{ii}e_i \end{aligned}$$
(7)

Note that since \(S_i^\mathrm{nec} >0\), in order for (7) to hold there must be either \(S_i^\mathrm{in} > 0\), and hence \(x_j \in X_S\), or there must be at least one \(k \in P_i\) with \(e_k >0\). Repeating this argument for every such k, we see that there must be at least one path in G from \(X_S\) to vertex \(x_i\) such that \(e_k >0\) for all k along that path.

To show the second statement of the theorem, we start with some \(e_i >0\). Then we enumerate all the paths that connect \(X_S\) to \(x_i\) and for which each \(x_k\) along these paths satisfies \(e_k >0\). If this exhausts the nonzero entries of e, we are done; if there is an \(e_j>0\) that is not accounted for by the paths already selected, we repeat the argument for \(e_j\). Since the number of components of \(\mathbf {e}\) is finite, this process will terminate in finitely many steps. \(\square \)

Theorem 2 and Lemma 2 motivate the following definition.

Definition 6

Fix the structure of simple food web, the yield matrix Y, and the set of growth functions \(f_i\). The set of feasible equilibria

$$\begin{aligned} E= E(S^\mathrm{in},D) \end{aligned}$$

is defined to be the set of equilibria of the system (5) at a given level of inputs \(S^\mathrm{in}\) and dilution rate D.

Corollary 2 gives an algorithm how to build the set E from the bottom up by starting with the zero equilibrium \((0,\ldots , 0)\) and adding equilibria to E based on sufficiency of available resources. On the other hand, Lemma 2 gives a recursive characterization of equilibria in E. Since the growth functions \(f_i\) are monotone, the sets of feasible equilibria are nested as a function of external resources, or the dilution rate D. In particular, if \(D_1 < D_2\) then

$$\begin{aligned} E(\mathbf {S}^\mathrm{in}, D_2) \subseteq E(\mathbf {S}^\mathrm{in}, D_1) \quad \text{ for } \text{ any } \text{ fixed } \mathbf {S}^\mathrm{in} \end{aligned}$$

Similar containment holds for external resources. If \(\mathbf {S}^\mathrm{in}\prec \bar{\mathbf {S}}^\mathrm{in}\) stands for partial order of vectors in the positive orthant (that is \(S_i^\mathrm{in} < \bar{S}_i^\mathrm{in}\) for at least one i and \( S_j^\mathrm{in} \le \bar{S}_j^\mathrm{in}\)   \(\forall j \not = i\) ), then

$$\begin{aligned} E(S^\mathrm{in}, D) \subseteq E(\bar{S}_i^\mathrm{in}, D) \quad \text{ for } \text{ any } \text{ fixed } D . \end{aligned}$$

The structure of feasible sets of equilibria is not a priori clear in simple food webs that are not chains. As an example, consider simple food web in Fig. 1. As we increase available external resources \(S_1\) and \(S_2\), a possible sequence of sets of feasible equilibria may be

$$\begin{aligned} E_1= & {} \{(0,0,0,0,0), (e^1_1, 0,0,0,0)\}, \\ E_2= & {} \{ (0,0,0,0,0), (e^2_1, 0,0,0,0),(e^2_{21}, e^2_{22},0,0,0)\}, \\ E_3= & {} \{ (0,0,0,0,0), (e^3_1, 0,0,0,0),(e^3_{21}, e^3_{22},0,0,0), (e^3_{31}, 0, e^3_{33},0,0) \}, \end{aligned}$$

where we assume that all \(e^i_j >0\). However, as we will show in Theorem 3, the set \(E_3\) is not feasible. If equilibria \((e^3_{21}, e^3_{22},0,0,0)\) and \((e^3_{31}, 0, e^3_{33},0,0)\) exist, there also must be an equilibrium of the form \((e^3_{41},e^3_{42} , e^3_{43},0,0)\).

To study the structure of feasible equilibria, we introduce a set L of all subspaces that support an equilibrium.

Definition 7

Let

$$\begin{aligned} L = \{ U \in {\mathscr {P}}(N) \,\,| \,\, \exists \, \mathbf {e} \in C_U \,\, \text {such that} \,\, \mathbf {e} \,\, \text {is an equilibrium of} \,\, (5)\}. \end{aligned}$$

where L is partially ordered by inclusion.

Fig. 1
figure 1

(Color figure online) An example of a simple food web

We then have the following theorem.

Theorem 3

If \(U, W \in L\), then \(U\cup W \in L\).

Proof

Let \(\mathbf {e}\) be an equilibrium in \(C_U\) and let \(\mathbf {v}\) be an equilibrium in \(C_W\). Let \(\mathbf {0} = (0, \ldots , 0)\) be the zero equilibrium. We construct, by induction on the depth of coordinates in \(U \cup W\), a set of equilibria \(\mathbf {E}^0, \mathbf {E}^1, \ldots , \mathbf {E}^n\), where n is the maximal depth of any vertex in \(U\cup W\). Let \(A_j:= \{ i \in U \cup W \,\, | \,\, x_i \in X_j \}\) be the stratification of vertices in \(U\cup W\) according to their depth. We construct the equilibria \(\mathbf {E}^j\) in such a way that they satisfy the following properties;

  1. (a)

    the ith component of \(\mathbf {E}^j\)

    $$\begin{aligned} \left\{ \begin{array}{ll} E^j_i >0 &{}\quad \text{ for } i \in \bigcup _{k \le j} A_k \\ 0 &{} \quad \text{ otherwise. } \end{array} \right. \end{aligned}$$
  2. (b)

    Furthermore, we have the following inequalities

    $$\begin{aligned} \left\{ \begin{array}{ll} E^j_i \ge e_i &{} \quad \text{ for } i \in A_j \cap U \\ E^j_i \ge v_i &{} \quad \text{ for } i \in A_j \cap W \end{array} \right. \end{aligned}$$

Clearly, when \(j = n\) condition (a) implies the statement of the theorem, since we will then have an equilibrium whose set of positive components is exactly \(U \cup W\).

To start the induction, consider first \( A_0 := \{ i \in U \cup W \,\, | \,\, x_i \in X_0 \}\). Since species corresponding to vertices in \(A_0\) depend exclusively on the external resources, we have

$$\begin{aligned} S^\mathrm{av}_i(\mathbf {0}) =S_i^\mathrm{in} = S^\mathrm{av}_i(\mathbf {e}) \text{ if } i \in A_0 \cap U \nonumber \\ S^\mathrm{av}_i(\mathbf {0}) =S_i^\mathrm{in} = S^\mathrm{av}_i(\mathbf {v}) \text{ if } i \in A_0 \cap W \end{aligned}$$
(8)

By assumption, the equilibrium \(\mathbf {e} \in C_U\) exists, and therefore by Theorem 2, we have \(S^\mathrm{av}_i(\mathbf {e}) > S^\mathrm{nec}_i\) which implies

$$\begin{aligned} S^\mathrm{av}_i(\mathbf {0}) > S^\mathrm{nec}_i \quad \text{ for } \text{ all } \quad i \in A_0 \cap U . \end{aligned}$$

Similarly, since \(\mathbf {v} \in C_W\) exists, we have \(S^\mathrm{av}_i(\mathbf {v}) > S^\mathrm{nec}_i\) which implies

$$\begin{aligned} S^\mathrm{av}_i(\mathbf {0}) > S^\mathrm{nec}_i \quad \text{ for } \text{ all } \quad i \in A_0 \cap W. \end{aligned}$$

Since species in \(I:=A_0\) are clearly independent, by Corollary 2 with \(I := A_0\), there is an equilibrium \(\mathbf {E}^0\) where

  • if \( i \in A_0\) then

    $$\begin{aligned} E^0_i := \frac{S^\mathrm{av}_i(\mathbf {0}) - S^\mathrm{nec}_i}{y_{ii}} > 0;\end{aligned}$$
  • if \(i \not \in A_0 \) then \(E^0_i := 0\).

This proves (a) for \(j=0\). Furthermore, since by Theorem 2

$$\begin{aligned} e_i = \frac{S^\mathrm{av}_i(\mathbf {e}) - S^\mathrm{nec}_i}{y_{ii}} \end{aligned}$$

for \(i \in U\), (8) implies that

$$\begin{aligned} E^0_i = e_i \quad \text{ for } \text{ all } i \in A_0 \cap U. \end{aligned}$$

A similar argument for \(i \in W\) implies statement (b) for \(j=0\).

We now proceed with the inductive step. Let

$$\begin{aligned} B_j = \bigcup _{0 \le k \le j} A_k. \end{aligned}$$

Assume that (a) and (b) hold for index j.

Recall that since consumption yields \(\alpha _{ii}\) only lie on the diagonal of matrix Y, we have \(y_{ik} = -\beta _{ik} \le 0\) for \(i\not = k\). We compute for a arbitrary index i

$$\begin{aligned} S^\mathrm{av}_i(\mathbf {E}^j)= & {} S^\mathrm{in}_i - \sum _{k \in B_j \cap U} y_{ik} E^j_k - \sum _{k \in B_j \cap W} y_{ik}E^j_k \nonumber \\= & {} S^\mathrm{in}_i + \sum _{k \in B_j \cap U} \beta _{ik}E^j_k + \sum _{k \in B_j\cap W} \beta _{ik}E^j_k \nonumber \\\ge & {} S^\mathrm{in}_i + \sum _{k \in B_j \cap U} \beta _{ik} e_k + \sum _{k \in B_j \cap W} \beta _{ik}v_k, \end{aligned}$$
(9)

where we used the inductive hypothesis (b) in the last line. Since at the equilibrium \(\mathbf {e}\), the species in \(A_{j+1} \cap U\) only depend on resources produces by species in \( B_j \cap U\), we have that

$$\begin{aligned} S^\mathrm{av}_i(\mathbf {e}) = S^\mathrm{in}_i + \sum _{k \in B_j \cap U} \beta _{ik} e_k \quad \text{ for } \text{ all } i \in A_{j+1} \cap U . \end{aligned}$$

Therefore (9) implies

$$\begin{aligned} S^\mathrm{av}_i(\mathbf {E}^j) \ge S^\mathrm{av}_i(\mathbf {e}) \quad \text{ if } i \in A_{j+1} \cap U \end{aligned}$$
(10)

A similar argument with equilibrium \(\mathbf {v}\) yields

$$\begin{aligned} S^\mathrm{av}_i(\mathbf {E}^j) \ge S^\mathrm{av}_i(\mathbf {v}) \quad \text{ if } i \in A_{j+1} \cap W \end{aligned}$$
(11)

As before, since the equilibria \(\mathbf {e} \in C_U\) and \(\mathbf {v} \in C_W\) exist, we have \(S^\mathrm{av}_i(\mathbf {e}) > S^\mathrm{nec}_i\) and \(S^\mathrm{av}_i(\mathbf {v}) > S^\mathrm{nec}_i\), which imply

$$\begin{aligned} S^\mathrm{av}_i(\mathbf {E}^j) > S^\mathrm{nec}_i \quad \text{ for } \text{ all } \quad i \in A_{j+1} \cap U\; ;\; S^\mathrm{av}_i(\mathbf {E}^j) > S^\mathrm{nec}_i \quad \text{ for } \text{ all } \quad i \in A_{j+1} \cap W. \end{aligned}$$

Therefore by Corollary 2 with \(I := A_{j+1}\), there is an equilibrium \(\mathbf {E}^{j+1}\) where

  • if \( i \in A_{j+1} \) then

    $$\begin{aligned} E^{j+1}_i := \frac{S^\mathrm{av}_i(\mathbf {E}^j) - S^\mathrm{nec}_i}{y_{ii}} > 0; \end{aligned}$$
  • if \( i \in B_{j} \) then \(E^{j+1}_i := E^j_i\);

  • if \(i \not \in B_{j+1} \) then \(E^{j+1}_i := 0\).

This proves (a) for the inductive step.

We observe that (10) and (11) together with definition of \(E^{j+1}_i\) imply

$$\begin{aligned} E^1_i \ge e_i \quad \text{ for } \text{ all } i \in A_1 \cap U \; \text{ and } \; E^1_i \ge v_i \quad \text{ for } \text{ all } i \in A_1 \cap W . \end{aligned}$$

This proves (b) for the inductive step and thus finishes the proof. \(\square \)

Corollary 3

Let \(\mathbf {e}\) be an equilibrium in \(C_U\), let \(\mathbf {v}\) be an equilibrium in \(C_W\), and let \(\mathbf {q}\) be an equilibrium in \(C_{U\cup W}\). Then the total biomass \(\sum _{i=1}^n q_i\) at equilibrium \(\mathbf {q}\) is larger than a total biomass at \(\mathbf {e}\) and a total biomass at \(\mathbf {v}\):

$$\begin{aligned} \sum _{i=1}^n q_i \ge \sum _{i=1}^n e_i, \quad \text{ and } \quad \sum _{i=1}^n q_i \ge \sum _{i=1}^n v_i . \end{aligned}$$

Proof

This is a direct corollary of uniqueness of equilibria in each \(C_U\) (Corollary 1) and the inductive statement (b) in the proof of Theorem 3. \(\square \)

Theorem 3 and Corollary 3 illustrate two important aspects about simple food webs. If the microbes in a community do not harm each other directly or indirectly and the growth rate functions are monotone, then increasing either the external resources or the number of microbes that produce resources internally will result in the existence of equilibria that represent a larger community in number of species Theorem 3, or overall biomass Corollary 3. Naturally this leads to the question of stability in the class of feasible equilibria.

5 Stability Analysis

We now offer a complete characterization of the stability of all feasible equilibria \(E(\mathbf {S^\mathrm{in}},D)\) for the system.

Theorem 4

The unstable manifold of an equilibrium \(\mathbf {e} \in C_U\) of the system (5) has dimension

$$\begin{aligned} k = \# \{ i \not \in U \; | \; S_i^\mathrm{av}(\mathbf {e}) > S_i^\mathrm{nec} \}. \end{aligned}$$

Therefore an equilibrium \(\mathbf {e} \in C_U\) is stable if \(k = 0\), which corresponds to \(S_i^\mathrm{av}(\mathbf {e}) \le S_i^\mathrm{nec}\) for all \(i \not \in U\).

Proof

We denote by \(J_{ij}\) the (ij) entry of the Jacobian \(\mathbf {J}\). Using the Chain Rule, we evaluate Jacobian at a point x to get

$$\begin{aligned} J_{ii}(x) = f_i(\mathbf {S}) - D + \nabla f_i(\mathbf {S}) \cdot \frac{\partial \mathbf {S}}{\partial x_i}x_i. \end{aligned}$$
(12)

and for \(i \not = j\),

$$\begin{aligned} J_{ij} = \nabla f_i(\mathbf {S}) \cdot \frac{\partial \mathbf {S}}{\partial x_j}x_i . \end{aligned}$$

Since we have \(\mathbf {S} = \mathbf {S}^\mathrm{in} - \mathbf {Ye}\), then

$$\begin{aligned} \frac{\partial \mathbf {S}}{\partial x_j} = -\mathbf {y_j} \end{aligned}$$

where \(\mathbf {y_j}\) is the jth column of the yield matrix \(\mathbf {Y}\). The Jacobian matrix \(\mathbf {J}\) can then be written as

$$\begin{aligned} \mathbf {J} = -\begin{bmatrix} \nabla f_1(\mathbf {S}) \\ \vdots \\ \nabla f_k(\mathbf {S}) \, \end{bmatrix} \mathbf {Y X} + \mathbf {F}(\mathbf {S}) - D\mathbf {I} \end{aligned}$$

where X is a diagonal matrix with iith entry \(x_i\). With our assumptions on resource consumption, we can write the Jacobian as

$$\begin{aligned} \mathbf {J} = -\mathbf {F_S Y X} + \mathbf {F}(\mathbf {S}) - D\mathbf {I} \end{aligned}$$
(13)

where \(\mathbf {F_S}\) is a diagonal matrix with iith entry \( \frac{\partial f_i}{\partial S_i}\). These entries are all positive since \(f_i\) is a monotone increasing function. The matrices \(\mathbf {X}\), \(D\mathbf {I}\), and \(\mathbf {F}(\mathbf {S})\) have nonnegative entries as well. Recall that by Definition 1, assumption (4), the diagonal entries in \(\mathbf {Y}\) are positive.

Now we evaluate Jacobian at an equilibrium \(\mathbf {e} \in C_U\). Since \(\mathbf {J}\) is lower triangular, the eigenvalues are the diagonal entries of the Jacobian. We note that if \(i \in U\), and hence \(e_i >0\), then we have \(f_i(S_i) = D\). By inspection of (12), we have

$$\begin{aligned} J_{ii}(\mathbf {e}) = - y_{ii} \frac{{\text {d}}f_i}{{\text {d}}S_i} e_i <0 . \end{aligned}$$

It follows that \(\mathbf {e}\) is always stable within the subspace \(C_U \subset {\mathbb {R}}^{n+}\).

If \(i \not \in U\) then \(e_i =0\) and from (12)

$$\begin{aligned} J_{ii}(\mathbf {e}) = f_i (S_i^\mathrm{av}) - D . \end{aligned}$$

Therefore the positive eigenvalues correspond to those \(i \not \in V\) with

$$\begin{aligned} f_i (S_i^\mathrm{av}(\mathbf {e})) > D. \end{aligned}$$

Since \(D = f_i(S_i^\mathrm{nec})\) and \(f_i\) is monotonically increasing function, this is equivalent to

$$\begin{aligned} S_i^\mathrm{av}(\mathbf {e}) > S_i^\mathrm{nec} \end{aligned}$$

completing the proof. \(\square \)

We are ready for the proof of the main theorem, which states that every simple food web has a unique stable equilibrium. Furthermore, this equilibrium represents the most diverse consortium that can survive in the chemostat. In addition to maximizing diversity, this equilibrium also maximizes biomass of the system.

Theorem 5

Any simple food web has a unique stable equilibrium \(\mathbf {E}_s = (e_1, \ldots , e_n)\) of (5). The stable equilibrium solves two independent optimization problems over the set of feasible equilibria \(E(S^\mathrm{in},D)\):

  1. 1.

    \(E_s\) has the maximal number of nonzero components (\(e_i > 0\)), i.e., the maximal number of species that are present;

  2. 2.

    \(E_s\) has the maximal overall biomass \( \sum _{i=1}^n e_i\).

Proof

By Theorem 3 if \(C_{U_1}\) and \(C_{U_2}\) contain equilibria, then also \(C_{U\cup W}\) contains an equilibrium. In other words, we have shown that the partially ordered set L, which is a subset of the lattice of all subsets P(N) of index set \(N=\{1, \ldots , n\}\), is closed under the join operation in that lattice. Since L is finite, this implies that L has a unique maximal element Z. Let \(\mathbf {e}\) be the unique equilibrium in \(C_Z\).

We now show that \(\mathbf {e}\) is stable. Assume by contradiction that \(\mathbf {e}\) is not stable. This implies that there is \(i \not \in Z\) such that \(S_i^\mathrm{av}(\mathbf {e}) > S_i^\mathrm{nec}\). By Corollary 2, this implies that there is an equilibrium in \(C_{Z \cup \{ i\}}\). This contradicts maximality of the set Z, and therefore \(\mathbf {e} \in C_Z\) is stable.

Since Z is maximal in L, and L is closed under join operation, every other set \(U \not = Z\) in the lattice L is a subset of another set that belongs to L. Let V be an immediate successor of U in the lattice ordering, i.e., \(U \subsetneq V\) and there is no set Q with \(U\subsetneq Q \subsetneq V\). Then \(V \setminus U = \{j\}\) for some j. Let \(\mathbf {e} \in C_U and\,\, \mathbf {v} \in C_V\) be the equilibria in \(C_U\) and \(C_V\), respectively. Then \(S_j^\mathrm{av}(\mathbf {e}) = S_j^\mathrm{av}(\hat{\mathbf {v}})> S_j^\mathrm{nec}\), which implies by Theorem 4 that \(\mathbf {e}\) has at least a one-dimensional unstable manifold.

This shows that equilibria in \(C_U\) for \(U\not = Z\) are unstable and the dimension of the unstable manifold is equal to the difference in cardinality \(|Z|-|U|\). As a consequence, the system has unique stable equilibrium in \(C_Z\). Maximization of nonzero entries follows directly from the fact that U is maximal in L, and the maximization of biomass follows from Corollary 3. \(\square \)

Remark

We can interpret Theorem 5 as a statement that the stable equilibrium of the system corresponds to the most diverse population that is sustainable on a given set of resources. The condition \(S_i^\mathrm{av}(\mathbf {e}) \le S_i^\mathrm{nec}\) means that the supply of the resource needed to support the growth of \(x_i\) is insufficient for its survival.

6 Examples

The theory we have developed for our restricted system (5) can be applied to several systems that have a specific interaction graph. We will look at two archetypical examples: consortium with hub-like graph of interactions and a consortium with a chain-like graph (Fig. 2).

Fig. 2
figure 2

(Color figure online) A chain consortium (left) and a hub consortium (right)

6.1 Hub Consortium

Our first example is a consortium with hub-like structure, where one species produces all the substrates that other species feed on. The primary motivation is the evolved consortium studied by Rosenzweig et al. (1994) and described in the introduction.

Only the initial substrate \(S_1\) which feeds species \(x_1\) is externally fed into the system.

Consider the system

$$\begin{aligned} \dot{x}_1= & {} (f_1(S_1) - D) x_1 \nonumber \\ \dot{S}_1= & {} (S_1^{\mathrm{in}} - S_1)D - \alpha _{11} f_1(S_1) x_1\nonumber \\ \dot{x}_2= & {} (f_2(S_2)- D)x_2 \nonumber \\ \dot{S}_2= & {} - S_2 D - \alpha _{22} f_2(S_2) x_2 + \beta _{21} f_1(S_1) x_1 \nonumber \\&\vdots&\nonumber \\ \dot{x}_k= & {} (f_n(S_n)- D)x_n \nonumber \\ \dot{S}_k= & {} - S_n D - \alpha _{nn} f_n(S_n) x_n + \beta _{n1} f_1(S_1) x_1. \end{aligned}$$
(14)

As always, \(\mathbf {0} = (0, \ldots , 0)\) is an equilibrium. By Corollary 2, there are two possibilities. If

$$\begin{aligned} S_1^\mathrm{in} = S_1^\mathrm{av}(\mathbf {0}) > S_1^\mathrm{nec} \end{aligned}$$

then there is an equilibrium \(\mathbf {e} = (e_1, 0, \ldots , 0)\); if \(S_1^\mathrm{in} \le S_1^\mathrm{nec}\), the only equilibrium is \(\mathbf {0}\) (which is also then stable).

As an initial check, since \(S_k^\mathrm{in} = 0\) for \(k >1\) it follows from (5) that at an equilibrium \(\mathbf {E}\) with species beyond the first present we need to have \([-\mathbf {Ye}]_i = S_i^\mathrm{nec}\). This in turn implies \(\beta _{k1} E_1 - \alpha _{kk}E_k = S_i^\mathrm{nec} > 0\), and thus it follows that any equilibrium with \(E_k > 0\) also must have \(E_1 > 0\).

If \(\mathbf {e}\) exists, then by Corollary 2, \(C_U\) with \(U \not = \emptyset \) will contain an equilibrium \(\mathbf {e}_U\) if, and only if

  1. 1.

    \( 1 \in U\); and

  2. 2.

    for every \(i\in U, i \not = 1\) we have \( S_i^\mathrm{av}(\mathbf {e}) > S_i^\mathrm{nec}\).

Thus if we set \(Q :=\{ i>1 ;|\; S_i^\mathrm{av}(\mathbf {e}) > S_i^\mathrm{nec} \}\), then any \(C_U\) with \(U = \{1\} \cup B\), for any \(B \subset Q\), contains a unique equilibrium \(\mathbf {e}_U\).

By Theorem 5, the only stable equilibrium will be that which correspond to \(U= \{1\} \cup Q\) which is the one where the most possible species survive.

6.2 Chain Consortium

We now analyze systems with a chain-like interaction structure, where each species beyond the first is dependent on the resource produced by its predecessor in the chain. Again, we are assuming that only the substrate \(S_1\) is fed externally into the system.

We consider the equations

$$\begin{aligned} \dot{x}_1= & {} (f_1(S_1) - D) x_1 \nonumber \\ \dot{S}_1= & {} (S_1^{\mathrm{in}} - S_1)D - \alpha _{11} f_1(S_1) x_1\nonumber \\ \dot{x}_2= & {} (f_2(S_2)- D)x_2 \nonumber \\ \dot{S}_2= & {} - S_2 D - \alpha _{22} f_2(S_2) x_2 + \beta _{21} f_1(S_1) x_1 \nonumber \\&\vdots&\nonumber \\ \dot{x}_k= & {} (f_n(S_n)- D)x_n \nonumber \\ \dot{S}_m= & {} - S_n D - \alpha _{nn} f_n(S_n) x_n + \beta _{n,n-1} f_{n-1}(S_{n-1}) x_{n-1} \end{aligned}$$
(15)

It follows from (5) and the chain structure of the equations that if an equilibrium \(\mathbf {E}\) with \(E_i > 0 \) exists, then we must have \(E_{i-1} >0\) and, by induction, \(E_j >0 \) for all \(j <i\). Therefore the indexing sets U for which \(C_U\) contains an equilibrium are nested. In other words, there is a maximal k such that for all sets \(U_s = \{ 1, \ldots , s\}\) for \(s\le k\), \(C_{U_s}\) contains an equilibrium \(\mathbf {E}_s\). In the case of the zero equilibrium, \(k = 0\). By Theorem 5, the equilibrium \(\mathbf {E}_k\) in \(C_{U_k}\) is stable.

To illustrate these ideas in more detail, it is instructive to make explicit calculations. By Corollary 2, the equilibrium \(\mathbf {E}_1\) in \(C_{U_1}\) exists if, and only if,

$$\begin{aligned} S_1^\mathrm{av}(\mathbf {0}) = S_1^\mathrm{in} > S_1^\mathrm{nec}. \end{aligned}$$

We compute the available resource at \(\mathbf {E}_1\) for species \(x_2\)

$$\begin{aligned} S_2^\mathrm{av}(\mathbf {E}_1) = \frac{\beta _{21}}{\alpha _{11}}(S_1^\mathrm{in} - S_1^\mathrm{nec}) \end{aligned}$$
(16)

Applying Corollary 2 to \(\mathbf {E}_1\), if \(S_2^\mathrm{av}(\mathbf {E}_1) \le S_2^\mathrm{nec}\), then there is no equilibrium \(\mathbf {E}_2\) with both first and second components greater than zero. On the other hand, if \(S_2^\mathrm{av}(\mathbf {E}_1) > S_2^\mathrm{nec}\), then \(\mathbf {E}_2\) exists and we can calculate available resource at \(\mathbf {E}_2\) for species \(x_3\)

$$\begin{aligned} S_3= & {} - \alpha _{33} x_3 + \beta _{32} x_2 \nonumber \\= & {} - \alpha _{33} x_3 + \frac{\beta _{32}}{\alpha _{22}}(\beta _{21} x_1 - S_2) \\= & {} - \alpha _{33} x_3 + \frac{\beta _{32}}{\alpha _{22}}\left( \frac{\beta _{21}}{\alpha _{11}}(S_1^\mathrm{in} - S_1) - S_2\right) \nonumber \end{aligned}$$

which implies

$$\begin{aligned} S_3^\mathrm{av}(\mathbf {E}_2) = \frac{\beta _{32}}{\alpha _{22}}\left( \frac{\beta _{21}}{\alpha _{11}}\left( S_1^\mathrm{in} - S_1^\mathrm{nec}\right) - S_2^\mathrm{nec}\right) \end{aligned}$$
(17)

By Corollary 2 \(S_3^\mathrm{av}(\mathbf {E}_2) > S_3^\mathrm{nec}\), then \(\mathbf {E}_3\) exists and we can continue by induction.

To make the induction easier, we will make the change of variables

$$\begin{aligned}&s_1^\mathrm{nec} := \frac{S_1^\mathrm{nec}}{S_1^\mathrm{in}} \\&s_i^\mathrm{nec} = \frac{\alpha _{i-1,i-1} \alpha _{i-2,i-2} \ldots \alpha _{11} S_1^\mathrm{in}}{\beta _{i,i-1} \beta _{i-1,i-2} \ldots \beta _{2,1} }S_i^\mathrm{nec} \quad \text{ for } \,\, i \ge 2. \end{aligned}$$

With these new variables, a short calculation shows that

$$\begin{aligned} S_i^\mathrm{av}(\mathbf {E}_{i-1}) = \frac{\beta _{i,i-1} \beta _{i-1,i-2} \ldots \beta _{2,1} }{\alpha _{i-1,i-1} \alpha _{i-2,i-2} \ldots \alpha _{11} S_1^\mathrm{in}} \left( 1 - \sum _{j=1}^{i-1} s_i^\mathrm{nec}\right) . \end{aligned}$$
(18)

This formula allows us to sequentially calculate how far down the chain the species survive. The chain will end at the first species i which satisfies

$$\begin{aligned} S_{i+1}^\mathrm{av}(\mathbf {E}_{i}) \le S_{i+1}^\mathrm{nec}. \end{aligned}$$

7 Discussion

In this paper we formulate and study simple food webs, where each microbial species depends on a dedicated resource that is supported either externally or by other species. Although the real consortia are much more complex, involve mutualistic as well as antagonistic relationships, and often have multiple alternative food sources, our analysis allows a rather complete understanding of which consortia can be supported in a simple food web.

Our motivation comes from trying to understand coexistence principles that govern natural, evolved (Rosenzweig et al. 1994; Helling et al. 1987; Treves et al. 1998; Rozen and Lenski 2000) and synthetic (Bernstein et al. 2012) microbial consortia. Synthetic consortia allow to test experimentally in simplified settings principles that apply in much more complex interactions in microbial communities, as well as to test predictions of mathematical theory.

We showed that there is at most one consortium of each type, that is with the same set of microbial species present (Corollary 1). Furthermore, which communities are sustainable depends on a simple condition that summarizes sufficiency of supplied resources (Theorem 2). Finally, we show that the only stable community is the one that has maximum number of species present for given supply of resources (Theorem 5). We also show that such a community maximizes the overall biomass over all sustainable communities, which supports the maximal power principle (Lotka 1922; Odum and Pinkerton 1955; de Mazancourt and Schwartz 2010; Doebeli 2002; Pfeiffer and Bonhoeffer 2004; Bull and Harcombe 2009; Estrela and Gudejl 2010; Beardmore et al. 2011).

Our results apply to simple prototypes of food webs: chains and fan-like food webs. For both, we derive conditions that characterize the stable equilibrium in each system.

Real consortia and microbial communities are clearly more complex than those studied here; however, we believe that the framework developed in this paper can be used to study communities with syntrophic as well as indirect antagonistic interactions.