1 Introduction

The notion of complex balancing of mass action kinetics chemical reaction networks, generalizing the classical notion of detailed balancing, dates back at least to the origin of chemical reaction network (CRN) theory; see especially [6, 11, 12]. The assumption of existence of a complex-balanced equilibrium has powerful consequences for the dynamical behavior, precluding multi-stability and oscillations. In this note we will revisit the notion of complex balancing by a systematic use of notions and results from algebraic graph theory, in particular the Laplacian matrix and Kirchhoff’s Matrix Tree theorem (see also [10, 14] for other uses of this theorem in chemical reaction dynamics). This will result in a constructive necessary and sufficient condition for complex balancing. Furthermore, motivated by recent work in [4] expanding on [7], we will provide a new perspective and results on the Wegscheider conditions for detailed balancing and formal balancing as introduced in [4].

The structure of this note is as follows. Section 2 gives a brief recap of the basic framework of CRN theory from an algebraic graph theory perspective, based on [18, 21, 23]. Section 3 introduces Kirchhoff’s Matrix Tree theorem and shows how the application of this theorem leads to an improved, and more directly verifiable, condition for complex balancing as compared to [6, 11]. Section 4 relates Kirchhoff’s Matrix Tree theorem to the notion of formal balancing, cf. [4] and [7], and shows how this leads to an insightful graph-theoretic proof of the result obtained in [4] that complex balancing together with formal balancing implies detailed balancing and conversely.

Notation: The space of \(n\)-dimensional real vectors consisting of all strictly positive entries is denoted by \({\mathbb {R}}_+^{n}\). The mapping \({\mathrm {Ln}}\,: {\mathbb {R}}_+^n \rightarrow {\mathbb {R}}^n, \quad x \mapsto {\mathrm {Ln}}\,x,\) is the elementwise logarithm, and is defined as the mapping whose \(i\)-th component is given by \(\ln (x_i).\) Similarly, \({\mathrm {Exp}}\,: {\mathbb {R}}^n \rightarrow {\mathbb {R}}_+^n\) is the mapping whose \(i\)-th component is given by \(\exp x_i\). Furthermore, for two vectors \(x,y \in {\mathbb {R}}_+^n\) we let \(\frac{x}{y}\) denote the vector in \({\mathbb {R}}_+^n\) with \(i\)-th component \(\frac{x_i}{y_i}\). Finally, \({1\!\!1}_n\) denotes the \(n\)-dimensional vector with all entries equal to 1.

Some graph-theoretic notions [3]: A directed graphFootnote 1 \({\mathcal {G}}\) with \(c\) vertices and \(r\) edges is characterized by its \(c \times r\) incidence matrix, denoted by \(D\). Each column of \(D\) corresponds to an edge of the graph, and contains exactly one element 1 at the position of the head vertex of this edge and exactly one \(-1\) at the position of its tail vertex; all other elements are zero. Clearly, \({1\!\!1}_c^TD=0\). The graph is connected if any vertex can be reached from any other vertex by following a sequence of edges; direction not taking into account. It holds that \({\mathrm {rank}}\,D= c- \ell \), where \(\ell \) is the number of connected components of the graph. In particular, \({\mathcal {G}}\) is connected if and only if \(\ker D^T = {\mathrm {span}}\,{1\!\!1}_c\). The graph is strongly connected if any vertex can be reached from any other vertex, following a sequence of directed edges. A subgraph of \({\mathcal {G}}\) is a directed graph whose vertex and edge set are subsets of the vertex and edge set of \({\mathcal {G}}\). A graph is acyclic (or, does not contain cycles) if and only if \(\ker D =0\). A spanning tree of a directed graph \({\mathcal {G}}\) is a connected, acyclic subgraph of \({\mathcal {G}}\) that contains all vertices of \({\mathcal {G}}\).

2 Recall of complex-balanced chemical reaction networks

In this section, in order to set the stage, we will briefly recall the well-established framework of (isothermal) CRN theory, originating in the work of Horn, Jackson and Feinberg in the 1970s [6, 9, 11, 12]. Consider a chemical reaction network with \(m\) chemical species (metabolites) with concentrations \(x \in {\mathbb {R}}^m_+\), among which \(r\) chemical reactions take place. The left-hand sides of the chemical reactions are called substrate complexes and the right-hand sides the product complexes. To each chemical complex (substrate and/or product) of the reaction network one can associate a vertex of a graph, and to every reaction (from substrate to product complex) a directed edge (with tail vertex the substrate and head vertex the product complex). Let \(c\) be the total number of complexes involved in the chemical reaction network, then the resulting directed graph \({\mathcal {G}}\) with \(c\) vertices and \(r\) edges is called the graph of complexes Footnote 2, and is defined by its \(c \times r\) incidence matrix \(D\). Furthermore we define the \(m \times c\) complex composition matrix Footnote 3 \(Z\) with non-negative integer elements expressing the composition of the complexes in terms of the chemical species: its \(k\)-th column expresses the composition of the \(k\)-th complex. The dynamics of the chemical reaction network takes the well-known form

$$\begin{aligned} \dot{x} = Sv(x)=ZDv(x), \end{aligned}$$
(1)

where \(v(x)\) is the vector of reaction rates, and \(S=ZD\) the stoichiometric matrix.

The most basic way to define \(v(x)\) is mass action kinetics. For example, the mass action kinetics reaction rate of the reaction \(X_1 + 2X_2 \rightarrow X_3\) is given as \(v(x) = kx_1x_2^2\) with \(k >0\) a reaction constant. In general, for a single reaction with substrate complex \({\mathcal {S}}\) specified by its corresponding column \(Z_{{\mathcal {S}}} = \begin{bmatrix} Z_{{\mathcal {S}}1}&\ldots Z_{{\mathcal {S}}m} \end{bmatrix}^T\) of the complex composition matrix \(Z\), the mass action kinetics reaction rate is given by

$$\begin{aligned} kx_1^{Z_{{\mathcal {S}}1}}x_2^{Z_{{\mathcal {S}}2}} \ldots x_m^{Z_{{\mathcal {S}}m}}, \end{aligned}$$

which can be rewritten as \(k \exp (Z_{{\mathcal {S}}}^T {\mathrm {Ln}}\,x), x \in {\mathbb {R}}^m_+\). Hence the reaction rates of the total reaction network are given by

$$\begin{aligned} v_j(x) = k_j \exp \left( Z_{{\mathcal {S}}_{j}}^T {\mathrm {Ln}}\,x\right) , \quad j=1, \ldots ,r, \end{aligned}$$

where \({\mathcal {S}}_{j}\) is the substrate complex of the \(j\)-th reaction with reaction constant \(k_j >0\). This yields the following compact description of the rate vector \(v(x)\). Define the \(r \times c\) matrix \(K\) as the matrix whose \((j,\sigma )\)-th element equals \(k_j\) if the \(\sigma \)-th complex is the substrate complex for the \(j\)-th reaction, and zero otherwise. Then \( v(x) = K {\mathrm {Exp}}\,(Z^T {\mathrm {Ln}}\,x), \,x \in {\mathbb {R}}^m_+,\) and the dynamics of the mass action reaction network takes the form

$$\begin{aligned} \dot{x} = ZDK{\mathrm {Exp}}\,\left( Z^T {\mathrm {Ln}}\,x\right) , \quad x \in {\mathbb {R}}^m_+ \end{aligned}$$
(2)

It can be easily verified that the \(c \times c\) matrix \(L:= - DK\) has nonnegative diagonal elements and nonpositive off-diagonal elements. Moreover, since \({1\!\!1}_c^TD=0\) also \({1\!\!1}_c^TL=0\), i.e., the column sums of \(L\) are all zero. Hence \(L\) defines a weighted Laplacian matrix Footnote 4 for the graph of complexes \({\mathcal {G}}\).

The aim of CRN theory, starting with [6, 11, 12], is to analyze the dynamical properties of (2), and in particular to derive conditions which ensure a dynamical behavior which is independent of the precise values of the reaction constants (which are often poorly known or varying). This has culminated in the deficiency-zero and deficiency-one theorems (see e.g. [8]), while a somewhat complementary approach is based on the assumption of existence of a complex-balanced equilibrium [6, 11], generalizing the classical notion of a detailed-balanced equilibrium.

Definition 2.1

A chemical reaction network (2) is called complex-balanced Footnote 5 if there exists an equilibrium \(x^* \in {\mathbb {R}}_+^m\), called a complex-balanced equilibrium, satisfying

$$\begin{aligned} Dv\left( x^{*}\right) = - L{\mathrm {Exp}}\,\left( Z^T {\mathrm {Ln}}\,x^*\right) =0 \end{aligned}$$
(3)

Chemically (3) means that at the complex-balanced equilibrium \(x^*\) not only all the chemical species, but also the complexes remain constant; i.e., for each complex the total inflow (from the other complexes) equals the total outflow (to the other complexes).

The assumption of complex balancing has been shown to have strong implications for the dynamical properties of (2); see in particular the classical papers [6, 11, 12]. As detailed in [18], expanding on [21], these properties can be easily proved by defining the diagonal matrix

$$\begin{aligned} \Xi \left( x^{*}\right) := {\mathrm {diag}}\,\big (\exp (Z_i^T {\mathrm {Ln}}\,x^*)\big )_{i=1, \ldots , c}, \end{aligned}$$
(4)

and rewriting the dynamics (2) into the form

$$\begin{aligned} \dot{x} = - Z{\mathcal {L}}\left( x^{*}\right) {\mathrm {Exp}}\,\left( Z^T {\mathrm {Ln}}\,\left( \frac{x}{x^*}\right) \right) ,\quad {\mathcal {L}}\left( x^{*}\right) := L \Xi \left( x^{*}\right) . \end{aligned}$$
(5)

The key point is that since \({\mathcal {L}}(x^*) {\mathrm {Exp}}\,\left( Z^T {\mathrm {Ln}}\,\left( \frac{x}{x^*}\right) \right) = 0\) for \(x=x^*\), and \({\mathrm {Exp}}\,(Z^T {\mathrm {Ln}}\,(\frac{x^*}{x^*})) = {1\!\!1}_c\), the transformed matrix \({\mathcal {L}}(x^*)\) satisfies

$$\begin{aligned} {\mathcal {L}}\left( x^{*}\right) {1\!\!1}_c =0, \quad {1\!\!1}_c^T{\mathcal {L}}\left( x^{*}\right) =0, \end{aligned}$$
(6)

and thus is a balanced Laplacian matrix (column sums and row sums are zero). Together with convexity of the exponential function this implies the following key fact.

Proposition 2.2

\(\gamma ^T {\mathcal {L}}(x^*) {\mathrm {Exp}}\,(\gamma ) \ge 0\) for any \(\gamma \in {\mathbb {R}}^c\), with equality if and only if \(D^T \gamma =0\).

First property which directly follows [18] from Proposition 2.2 is the classical result [6, 11, 12] that all positive equilibria are in fact complex-balanced, and that given one complex-balanced equilibrium \(x^*\) the set of all positive equilibria is given by

$$\begin{aligned} {\mathcal {E}} := \left\{ x^{**} \in {\mathbb {R}}^m_+ \mid S^T {\mathrm {Ln}}\,x^{**} = S^T {\mathrm {Ln}}\,x^{*} \right\} \end{aligned}$$
(7)

Furthermore, using an elegant result from [8], there exists for every initial condition \(x_0 \in {\mathbb {R}}^m_+\) a unique \(x^{* *}\in {\mathcal {E}}\) such that \(x^{**} - x_0 \in {\mathrm {im}}\,S\). By using the Lyapunov function

$$\begin{aligned} G(x) =x^T {\mathrm {Ln}}\left( \frac{x}{x^{**}}\right) + \left( x^{**} - x \right) ^T {1\!\!1}_m \end{aligned}$$
(8)

Proposition 2.2 then implies that the vector of concentrations \(x(t)\) starting from \(x_0\) will converge to \(x^{**}\); at least if the reaction network is persistentFootnote 6. The chemical interpretation is that \(G\) is (up to a constant) the Gibbs’ free energy with gradient vector \(\frac{\partial G}{\partial x}(x) = {\mathrm {Ln}}\left( \frac{x}{x^{**}}\right) \) being the chemical potentials. See e.g. [15, 21, 22] for further informationFootnote 7.

3 A graph-theoretic characterization of complex-balancing

In this section we will expand on earlier investigations to characterize the existence of a complex-balanced equilibrium (see in particular [4, 6, 11], and the references quoted therein), and derive a new necessary and sufficient condition for complex balancing which can be constructively verified.

First note that by the definition of \({\mathrm {Ln}}\,: {\mathbb {R}}_+^m \rightarrow {\mathbb {R}}^m\) the existence of an \(x^* \in {\mathbb {R}}^m_+\) such that \(L {\mathrm {Exp}}\,(Z^T{\mathrm {Ln}}\,x^*) =0\) (i.e., \(x^*\) is a complex-balanced equilibrium) is equivalent to the existence of a vector \(\mu ^* \in {\mathbb {R}}^m\) such that

$$\begin{aligned} L {\mathrm {Exp}}\,\left( Z^T\mu ^*\right) =0, \end{aligned}$$
(9)

or equivalently, \({\mathrm {Exp}}\,(Z^T\mu ^*) \in \ker L\). Furthermore, note that \({\mathrm {Exp}}\,(Z^T\mu ^*) \in {\mathbb {R}}^c_+\).

In case the graph \({\mathcal {G}}\) is connected the kernel of \(L\) is 1-dimensional, and a vector \(\rho \in \bar{{\mathbb {R}}}^c_+\) (the closure of the positive orthant) with \(\rho \in \ker L\) can be computed by what is sometimes called Kirchhoff’s Matrix Tree theorem Footnote 8, which for our purposes can be summarized as follows. Denote the \((i,j)\)-th cofactor of \(L\) by \(C_{ij}=(-1)^{i+j}M_{i,j}\), where \(M_{i,j}\) is the determinant of the \((i,j)\)-th minor of \(L\), which is the matrix obtained from \(L\) by deleting its \(i\)-th row and \(j\)-th column. Define the adjoint matrix \({\mathrm {adj}}(L)\) as the matrix with \((i,j)\)-th element given by \(C_{ji}\). It is well-known that

$$\begin{aligned} L \cdot {\mathrm {adj}}(L) = (\det {L})I_c =0 \end{aligned}$$
(10)

Furthermore, since \({1\!\!1}_c^TL=0\) the sum of the rows of \(L\) is zero, and hence by the properties of the determinant function it directly follows that \(C_{ij}\) does not depend on \(i\); implying that \(C_{ij} = \rho _j, \, j=1, \ldots , c\). Therefore by defining \(\rho := (\rho _1, \ldots , \rho _c)^T\), it follows from (10) that \(L\rho =0\). Furthermore, cf. [3, Theorem14 on p.58], \(\rho _i\) is equal to the sum of the products of weights of all the spanning trees of \({\mathcal {G}}\) directed towards vertex \(i\). In particular, it follows that \(\rho _j \ge 0, j=1, \ldots ,c\). In fact, \(\rho \ne 0\) if and only if \({\mathcal {G}}\) has a spanning tree. Furthermore, since for every vertex \(i\) there exists at least one spanning tree directed towards \(i\) if and only if the graph is strongly connected, we may conclude that \(\rho \in {\mathbb {R}}^c_+\) if and only if the graph is strongly connected.

Example 3.1

Consider the cyclic reaction network

figure a

in three (unspecified) complexes \(C_1, C_2, C_3\). The Laplacian matrix is given as

$$\begin{aligned} L = \begin{bmatrix} k_1^+ + k_3^-&\quad - k_1^-&\quad - k_3^+ \\ - k_1^+&\quad k_1^- + k_2^+&\quad -k_2^- \\ -k_3^-&\quad - k_2^+&\quad k_3^+ + k_2^- \end{bmatrix} \end{aligned}$$

By Kirchhoff’s Matrix Tree theorem the corresponding vector \(\rho \) satisfying \(L \rho =0\) is given as

$$\begin{aligned} \rho = \begin{bmatrix} k_2^+k_3^+ + k_1^-k_3^+ + k_1^-k_2^- \\ k_1^+k_3^+ + k_1^+k_2^- + k_2^-k_3^- \\ k_1^+k_2^+ + k_2^+k_3^- + k_1^-k_3^- \end{bmatrix}, \end{aligned}$$

where each term corresponds to one of the three weighted spanning trees pointed towards the three vertices.

In case the graph \({\mathcal {G}}\) is not connected the same analysis can be performed on any of its connected components.

Remark 3.2

The existence (not the explicit construction) of \(\rho \in {\mathbb {R}}^c_+\) satisfying \(L \rho =0\) already follows from the Perron-Frobenius theorem [11], [20, LemmaV.2]; exploiting the fact that the off-diagonal elements of \(-L:=DK\) are all nonnegativeFootnote 9.

Returning to the existence of \(\mu ^* \in {\mathbb {R}}^m\) satisfying \(L {\mathrm {Exp}}\,(Z^T\mu ^*)=0\) this implies the following. Let \({\mathcal {G}}_j, \, j=1, \ldots , \ell ,\) be the connected components of the graph of complexes \({\mathcal {G}}\). For each connected component, define the vectors \(\rho ^1, \ldots , \rho ^{\ell }\) as above by Kirchhoff’s Matrix Tree theorem (i.e., as cofactors of the corresponding diagonal sub-blocks of \(L\) or as sums of products of weights along spanning trees). Define the total vector \(\rho \) as the stacked column vector \(\rho := {\mathrm {col}} ( \rho ^1, \ldots , \rho ^{\ell })\). Partition correspondingly the composition matrix \(Z\) as \(Z= [Z_1 \ldots Z_{\ell }]\). Then there exists \(\mu ^* \in {\mathbb {R}}^m\) satisfying \(L {\mathrm {Exp}}\,(Z^T\mu ^*)=0\) if and only if each connected component \({\mathcal {G}}_j\), \(j=1,\ldots ,\ell ,\) is strongly connected and

$$\begin{aligned} {\mathrm {Exp}}\,\left( Z_j^T\mu ^*\right) = \beta _j \rho ^j, \qquad \beta _j>0. \end{aligned}$$
(11)

This in its turn is equivalent to strong connectedness of each connected component \({\mathcal {G}}_j\) and the existence of constants \(\beta '_j\) such that \( Z_j^T\mu ^* = {\mathrm {Ln}}\,\rho ^j + \beta _j' {1\!\!1}, j=1, \ldots , \ell \). Furthermore, this is equivalent to strong connectedness of each connected component of \({\mathcal {G}}\), and

$$\begin{aligned} {\mathrm {Ln}}\,\rho \in {\mathrm {im}}\,Z^T + \ker D^T \end{aligned}$$
(12)

Finally, (12) is equivalent to

$$\begin{aligned} D^T{\mathrm {Ln}}\,\rho \in {\mathrm {im}}\,D^TZ^T = {\mathrm {im}}\,S^T \end{aligned}$$
(13)

Summarizing we have obtained

Theorem 3.3

The reaction network dynamics \(\dot{x} = - ZL{\mathrm {Exp}}\,(Z^T {\mathrm {Ln}}\,x)\) on the graph of complexes \({\mathcal {G}}\) is complex-balanced if and only if each connected component of \({\mathcal {G}}\) is strongly connected (or, equivalently, \(\rho \in {\mathbb {R}}^c_+\)) and (13) is satisfied, where the elements of the sub-vectors \(\rho ^j\) of \(\rho \) are obtained by Kirchhoff’s Matrix Tree theorem applied to \(L\) for each \(j\)-th connected component of \({\mathcal {G}}\). Furthermore, for a complex-balanced reaction network a balanced Laplacian matrixFootnote 10 \({\mathcal {L}}(x^*)\) defined in (5) is given as

$$\begin{aligned} {\mathcal {L}}\left( x^{*}\right) = L {\mathrm {diag}}\,(\rho _1, \ldots , \rho _c) \end{aligned}$$
(14)

Remark 3.4

The above theorem is a restatement of Theorem 3C in [11]; the main difference being that in [11] the positive vector \(\rho \in \ker L\) remains unspecified, while in our case it is explicitly given by Kirchhoff’s Matrix Tree theorem.

We directly obtain the following corollary stated before in [11, Eq. (3.21)]:

Corollary 3.5

The reaction network dynamics \(\dot{x} = - ZL{\mathrm {Exp}}\,(Z^T {\mathrm {Ln}}\,x)\) is complex-balanced if and only if \(\rho \in {\mathbb {R}}^c_+\) and

$$\begin{aligned} \rho _1^{\sigma _1} \cdot \rho _2^{\sigma _2} \ldots \rho _c^{\sigma _c} =1, \end{aligned}$$
(15)

for all vectors \(\sigma =(\sigma _1, \sigma _2, \ldots , \sigma _c)^T \in \ker Z \cap {\mathrm {im}}\,D \). In particular, if \(\ker Z \cap {\mathrm {im}}\,D =0\) (zero-deficiency [8, 9, 11]) then \(\dot{x} = - ZL{\mathrm {Exp}}\,(Z^T {\mathrm {Ln}}\,x)\) is complex-balanced.

Proof

\({\mathrm {Ln}}\,\rho \in {\mathrm {im}}\,Z^T + \ker D^T\) if and only if \(\sigma ^T {\mathrm {Ln}}\,\rho =0\) for all \(\sigma \in ({\mathrm {im}}\,Z^T + \ker D^T)^{\perp } = \ker Z \cap {\mathrm {im}}\,D\), or equivalently

$$\begin{aligned} 0=\sigma _1 \ln \rho _1 + \cdots + \sigma _c \ln \rho _c = \ln \rho _1^{\sigma _1} + \cdots + \ln \rho _c^{\sigma _c} = \ln \left( \rho _1^{\sigma _1} \ldots \rho _c^{\sigma _c}\right) \end{aligned}$$

for all \(\sigma \in \ker Z \cap {\mathrm {im}}\,D\). \(\square \)

Example 3.6

Consider Example 3.1 for the special case \(k_1^- = k_2^- = k_3^-=0\) (irreversible reactions). Then the vector \(\rho \) reduces to

$$\begin{aligned} \rho = \begin{bmatrix} k_2^+k_3^+ \\ k_1^+k_3^+ \\ k_1^+k_2^+ \end{bmatrix} \end{aligned}$$

The reaction network with complex composition matrix \(Z\) is complex-balanced if and only \(k_i^+>0, i=1,2,3,\) and

$$\begin{aligned} D^T {\mathrm {Ln}}\,\rho \in {\mathrm {im}}\,D^TZ^T, \quad D= \begin{bmatrix} -1&\quad 0&\quad 1 \\ 1&\quad -1&\quad 0 \\ 0&\quad 1&\quad -1 \end{bmatrix}, \end{aligned}$$

This last condition can be further written out as

$$\begin{aligned} \begin{bmatrix} \ln \frac{k_1^+}{k_2^+} \\ \ln \frac{k_2^+}{k_3^+} \\ \ln \frac{k_3^+}{k_1^+} \end{bmatrix} \in {\mathrm {im}}\,D^TZ^T \end{aligned}$$

As a mathematical example, take the complex composition matrix \(Z= \begin{bmatrix} 1&0&2 \\ 1&1&1 \end{bmatrix}\) (corresponding to the complexes \(X_1 + X_2, X_2, 2X_1 + X_2\)). In this case the network is complex-balanced if and only if \(k_1^+>0, k_2^+>0, k_3^+>0,\) and \((k_1^+)^2 = k_2^+ k_3^+\).

4 Relation with the Wegscheider conditions and detailed balancing

In this section we will relate the conditions for complex balancing as obtained in the previous section to ’Wegscheider-type conditions’. This will also relate complex balancing to the classical concept of ’detailed balancing’.

Throughout this section we will consider reversible chemical reaction networks, in which case the edges of \({\mathcal {G}}\) come in pairs: if there is a directed edge from vertex \(i\) to \(j\) then there also is a directed edge from \(j\) to \(i\) (and in the case of multiple edges from \(i\) to \(j\) there are as many edges from \(i\) to \(j\) as edges from \(j\) to \(i\)). This means that the connected components of \({\mathcal {G}}\) are always strongly connected, or equivalently, that \(\rho \) as obtained from Kirchhoff’s Matrix Tree theorem is in \({\mathbb {R}}^c_+\).

Define the undirected graph \(\bar{{\mathcal {G}}}\) as having the same vertices as \({\mathcal {G}}\) but half its number of edges, by replacing every pair of oppositely directed edges of \({\mathcal {G}}\) by one undirected edge of \(\bar{{\mathcal {G}}}\). Denote the number of edges of \(\bar{{\mathcal {G}}}\) by \(\bar{r} = \frac{1}{2}r\). Endow subsequently \(\bar{{\mathcal {G}}}\) with an arbitrary orientation (all results in the sequel will be independent of this orientation), and denote the resulting incidence matrix by \(\bar{D}\). Clearly, after possible reordering of the edges, \(\bar{D}\) is related to the incidence matrix \(D\) of \({\mathcal {G}}\) as

$$\begin{aligned} D = \begin{bmatrix} \bar{D}&- \bar{D} \end{bmatrix} \end{aligned}$$
(16)

To the \(j\)-th edge of \(\bar{{\mathcal {G}}}\) there now correspond two reaction constants \(k_{j}^+, k_{j}^-\) (the forward and reverse reaction constants with respect to the chosen orientation of \(\bar{{\mathcal {G}}}\)). Then define the equilibrium constants \(K^{{\mathrm {eq}}}_j := \frac{k_{j}^+}{k_{j}^-}, j=1, \ldots , \bar{r}\), and the vector \(K^{{\mathrm {eq}}} := (K^{{\mathrm {eq}}}_1, \ldots , K^{{\mathrm {eq}}}_{\bar{r}})^T\).

Recall [7, 24] that the reaction network is called detailed-balanced Footnote 11 if and only if it satisfies

$$\begin{aligned} {\mathrm {Ln}}\,K^{{\mathrm {eq}}} \in {\mathrm {im}}\,\bar{S}^T, \end{aligned}$$
(17)

where \(\bar{S}:=Z\bar{D}\) is the stoichiometric matrix of the reversible network with graph \(\bar{{\mathcal {G}}}\). This is equivalent to

$$\begin{aligned} \sigma _1 {\ln } K^{{\mathrm {eq}}}_1 + \cdots + \sigma _{\bar{r}} {\ln } K^{{\mathrm {eq}}}_{\bar{r}} =0 \end{aligned}$$

for all \(\sigma =(\sigma _1, \ldots , \sigma _{\bar{r}})\) such that \(\sigma ^T \bar{S}^T=0\). Writing out \(K^{{\mathrm {eq}}}_j = \frac{k_{j}^+}{k_{j}^-}\) this is seen to be equivalent to

$$\begin{aligned} \left( k_1^+\right) ^{\sigma _1} \cdots \left( k_{\bar{r}}^+\right) ^{\sigma _{\bar{r}}} = \left( k_1^-\right) ^{\sigma _1} \cdots \left( k_{\bar{r}}^-\right) ^{\sigma _{\bar{r}}} \end{aligned}$$
(18)

for all \(\sigma \) such that \(\bar{S}\sigma =0\), known as the (generalized) Wegscheider conditions.

Recently in [4] the notion of formally balanced was introduced, based on Feinberg’s circuit conditions in [7], and weakening the above Wegscheider conditions. In our set-up this notion is defined as follows.

Definition 4.1

The reversible reaction network \(\bar{{\mathcal {G}}}\) with incidence matrix \(\bar{D}\), and vector of equilibrium constants \(K^{{\mathrm {eq}}}\) is called formally balanced if

$$\begin{aligned} {\mathrm {Ln}}\,K^{{\mathrm {eq}}} \in {\mathrm {im}}\,\bar{D}^T \end{aligned}$$

Since \(\bar{S}=Z \bar{D}\) ’formally balanced’ is trivially implied by ’detailed-balanced’, while if \({\mathrm {im}}\,\bar{S}^{T} = {\mathrm {im}}\,\bar{D}^{T}\) (zero-deficiency) the reverse holds. Furthermore, any reaction network with acyclic \(\bar{{\mathcal {G}}}\) (and thus \(\ker \bar{D} =0\)) is automatically formally balanced.

As above, the notion of ’formally balanced’ is seen to be equivalent to

$$\begin{aligned} \sigma _1 {\ln }K^{{\mathrm {eq}}}_1 + \cdots + \sigma _r {\ln }K^{{\mathrm {eq}}}_{\bar{r}} =0 \end{aligned}$$

for all \(\sigma =(\sigma _1, \ldots , \sigma _{\bar{r}})^T\) such that \(\sigma ^T \bar{D}^T=0\), which in turn is equivalent to

$$\begin{aligned} \left( k_1^+\right) ^{\sigma _1} \cdots \left( k_{\bar{r}}^+\right) ^{\sigma _{\bar{r}}} = \left( k_1^-\right) ^{\sigma _1} \cdots \left( k_{\bar{r}}^-\right) ^{\sigma _{\bar{r}}} \end{aligned}$$
(19)

for all \(\sigma \) such that \(\bar{D} \sigma =0\) (that is, for all cycles \(\sigma \)). We will refer to (19) as the weak Wegscheider conditions. Note that the weak Wegscheider conditions only depend on the structure of the graph \(\bar{{\mathcal {G}}}\) (i.e., its cycles) and the equilibrium constants, and not on the complex composition matrix \(Z\) as in the case of the ’strong’ Wegscheider conditions (18).

Theorem 4.2

Consider a reversible chemical reaction network given by the graph \(\bar{{\mathcal {G}}}\) with incidence matrix \(\bar{D}\), and with \(\rho \) determined by \(L\). The following statements are equivalent

  1. 1.

    \(L {\mathrm {diag}}\,(\rho _1, \ldots , \rho _c)\) is symmetric

  2. 2.

    \( {\mathrm {Ln}}\,(K^{{\mathrm {eq}}}) = \bar{D}^T {\mathrm {Ln}}\,\rho \)

  3. 3.

    \( {\mathrm {Ln}}\,(K^{{\mathrm {eq}}}) \in {\mathrm {im}}\,\bar{D}^T\) (formally balanced)

Proof

\((1) \Leftrightarrow (2)\)

Let us first prove the equivalence between (1) and (2). Consider the \(i\)-th and \(j\)-th vertex of \(\bar{{\mathcal {G}}}\), and suppose that the orientation has been taken such that the \(\alpha \)-th edge between \(i\) and \(j\) is such that \(i\) is the tail vertex and \(j\) is the head vertex. Then the \((i,j)\)-th element of \(L {\mathrm {diag}}\,(\rho _1, \ldots , \rho _c)\) is given by \(k_{\alpha }^- \rho _j\), while the \((j,i)\)-th element equals \(k_{\alpha }^+ \rho _i\). Symmetry of \(L {\mathrm {diag}}\,(\rho _1, \ldots , \rho _c)\) thus amounts to

$$\begin{aligned} k_{\alpha }^- \rho _j = k_{\alpha }^+ \rho _i \end{aligned}$$

for all pairs of vertices \(i,j\). On the other hand, the \(\alpha \)-th element of the vector \(\bar{D}^T {\mathrm {Ln}}\,\rho \) is given by

$$\begin{aligned} \ln \rho _j - \ln \rho _i \end{aligned}$$

while the \(\alpha \)-th element of \({\mathrm {Ln}}\,(K^{{\mathrm {eq}}})\) is given by

$$\begin{aligned} \ln \frac{k_{\alpha }^+}{k_{\alpha }^-} = \ln k_{\alpha }^+ - \ln k_{\alpha }^- \end{aligned}$$

Equality of \(\ln \rho _j - \ln \rho _i\) and \(\ln k_{\alpha }^+ - \ln k_{\alpha }^-\) is thus equivalent to

$$\begin{aligned} \ln \rho _j + \ln k_{\alpha }^- = \ln \rho _i + \ln k_{\alpha }^+ \end{aligned}$$

which in its turn is equivalent to \(k_{\alpha }^+ \rho _i = k_{\alpha }^- \rho _j\) as above.

\((2) \Leftrightarrow (3)\)

Obviously \({(2)}\) implies \({(3)}\). For the reverse implication, consider any pair of vertices linked by an edge of the graph \(\bar{{\mathcal {G}}}\). Depending on the orientation of \(\bar{{\mathcal {G}}}\) refer to one vertex as the tail vertex \(t\) and the other vertex as the head vertex \(h\). Refer to the positive reaction constant from \(t\) to \(h\) by \(k^+\) and to the negative reaction constant by \(k^-\). Now consider a spanning tree directed towards \(t\) with product of weights denoted by \(\tau _t\). In case the edge between \(t\) and \(h\) is part of this spanning tree then it follows that by reversing the orientation of this edge it defines a spanning tree directed towards to \(h\) with product of weights denoted by \(\tau _h\). It follows directly that

$$\begin{aligned} \frac{k^+}{k^-} \tau _t= \tau _h \end{aligned}$$
(20)

In case the edge between \(t\) and \(h\) is not part of this spanning tree then divide the edges of the spanning tree into two sets; the set \(E_1\) containing the edges of the part of the spanning tree from \(t\) to \(h\) (containing say \(\ell \) edges) and the set \(E_2\) containing the remaining edges of the spanning tree. Observe that \(E_1\) together with the edge from \(t\) to \(h\) forms a cycle of the graph \(\bar{{\mathcal {G}}}\). Since \({\mathrm {Ln}}\,(K^{{\mathrm {eq}}}) \in {\mathrm {im}}\,\bar{D}^T\) it follows that for the reaction constants along this cycle (choosing an appropriate orientation),

$$\begin{aligned} k^+ \cdot k_1^+ \ldots k_{\ell }^+ = k^- \cdot k_1^- \ldots k_{\ell }^-. \end{aligned}$$
(21)

Now within the spanning tree directed towards \(t\), if the orientation of each of the edges of \(E_1\) is reversed, we obtain another spanning tree directed towards \(h\) with product of weights denoted again by \(\tau _h\). By using (21) it is readily verified that also in this case we obtain the same relation (20). Summing up over all spanning trees we thus obtain the equality

$$\begin{aligned} \frac{k^+}{k^-} {\rho }_t= {\rho }_h, \end{aligned}$$
(22)

which can be equivalently written as \(\ln \frac{k^+}{k^-} = \ln {\rho }_h - \ln {\rho }_t\). Doing this for all adjacent vertices \(t\) and \(h\) this exactly amounts to the required equality \({\mathrm {Ln}}\,(K^{{\mathrm {eq}}}) = \bar{D}^T {\mathrm {Ln}}\,\rho \). \(\square \)

Example 4.3

Consider again the reaction network described in Example 3.1 (without specifying the complexes \(C_1, C_2, C_3\)). The transformed Laplacian matrix is computed as

$$\begin{aligned} \begin{array}{rcl} {\mathcal {L}} &{}=&{} \left[ {\begin{matrix} k_1^+ + k_3^- &{} - k_1^- &{} - k_3^+ \\ - k_1^+ &{} k_1^- + k_2^+ &{} -k_2^- \\ -k_3^- &{} - k_2^+ &{} k_2^- + k_3^+ \end{matrix}}\right] \left[ {\begin{matrix} k_2^+k_3^+ + k_1^-k_3^+ + k_1^-k_2^- &{} 0 &{} 0 \\ 0 &{} k_1^+k_3^+ + k_1^+k_2^- + k_2^-k_3^- &{} 0 \\ 0 &{} 0 &{} k_1^+k_2^+ + k_2^+k_3^- + k_1^-k_3^- \end{matrix}}\right] \\ &{}=&{}\left[ {\begin{matrix} \left( k_1^+ +k_2^+\right) \left( k_2^+k_3^+ + k_1^-k_3^+ + k_1^-k_2^-\right) &{} -k_1^-\left( k_1^+k_3^+ + k_1^+k_2^- + k_2^-k_3^-\right) &{} -k_3^+\left( k_1^+k_2^+ + k_2^+k_3^- + k_1^-k_3^-\right) \\ -k_1^+\left( k_2^+k_3^+ + k_1^-k_3^+ + k_1^-k_2^-\right) &{} \left( k_1^- + k_2^+\right) \left( k_1^+k_3^+ + k_1^+k_2^- + k_2^-k_3^-\right) &{} -k_2^-\left( k_1^+k_2^+ + k_2^+k_3^- + k_1^-k_3^-\right) \\ -k_3^-\left( k_2^+k_3^+ + k_1^-k_3^+ + k_1^-k_2^-\right) &{} -k_2^+\left( k_1^+k_3^+ + k_1^+k_2^- + k_2^-k_3^-\right) &{} \left( k_2^- + k_3^+\right) \left( k_1^+k_2^+ + k_2^+k_3^- + k_1^-k_3^-\right) \end{matrix}}\right] \end{array} \end{aligned}$$

which is symmetric if and only if

$$\begin{aligned} k_1^+k_2^+k_3^+ = k_1^-k_2^-k_3^- \end{aligned}$$
(23)

On the other hand, \({\mathrm {Ln}}\,K^{{\mathrm {eq}}} \in \bar{D}^T\) amounts to

$$\begin{aligned} \begin{bmatrix} \ln \frac{k_1^+}{k_1^-} \\ \ln \frac{k_2^+}{k_2^-} \\ \ln \frac{k_3^+}{k_3^-} \end{bmatrix} \in {\mathrm {im}}\,\begin{bmatrix} -1&\quad 0&\quad 1 \\ 1&\quad -1&\quad 0 \\ 0&\quad 1&\quad -1 \end{bmatrix} \end{aligned}$$

which reduces to \(\ln \frac{k_1^+}{k_1^-} + \ln \frac{k_2^+}{k_2^-} + \ln \frac{k_3^+}{k_3^-} =0\), and hence to the same condition (23). Thus the reaction network is formally balanced if and only if (23) holds.

Now let us relate all this to the necessary and sufficient conditions for complex balancing obtained before, cf. (13). Note that by (16)

$$\begin{aligned} D^T {\mathrm {Ln}}\,\rho \in {\mathrm {im}}\,D^TZ^T \Leftrightarrow \bar{D}^T {\mathrm {Ln}}\,\rho \in {\mathrm {im}}\,\bar{D}^TZ^T \end{aligned}$$

Hence a reversible reaction network is complex-balanced if and only if \(\bar{D}^T {\mathrm {Ln}}\,\rho \in {\mathrm {im}}\,\bar{D}^TZ^T = {\mathrm {im}}\,\bar{S}^T\).

We directly obtain the following corollary proved by other methods in [4]Footnote 12.

Corollary 4.4

A reversible reaction network is detailed-balanced if and only if it is formally balanced as well as complex-balanced.

Proof

We have seen before that ’detailed-balanced’ implies ’complex-balanced’ as well as ’formally balanced’. For the converse we note that formally balanced implies that \({\mathrm {Ln}}\,(K^{{\mathrm {eq}}}) \in {\mathrm {im}}\,\bar{D}^T\). Hence by Theorem 4.2 \({\mathrm {Ln}}\,(K^{{\mathrm {eq}}}) = \bar{D}^T {\mathrm {Ln}}\,\rho \). Since furthermore the network is complex-balanced \(\bar{D}^T {\mathrm {Ln}}\,\rho \in {\mathrm {im}}\,\bar{S}^T\). Hence \({\mathrm {Ln}}\,(K^{{\mathrm {eq}}}) = \bar{D}^T {\mathrm {Ln}}\,\rho \in {\mathrm {im}}\,\bar{S}^T\), i.e., the reaction network is detailed-balanced. \(\square \)

In case the reversible reaction network is formally balanced the symmetric matrix \({\mathcal {L}}(x^*)= L {\mathrm {diag}}\,(\rho _1, \ldots , \rho _c)\) can be written as

$$\begin{aligned} L {\mathrm {diag}}\,\left( \rho _1, \ldots , \rho _c\right) = \bar{D}{\mathcal {K}}\bar{D}^T \end{aligned}$$

where \({\mathcal {K}}\) is the \(\bar{r} \times \bar{r}\) diagonal matrix, with \(\alpha \)-th diagonal element given by \(\kappa _{\alpha }:=k_{\alpha }^+ \rho _j = k_{\alpha }^- \rho _i\) where the \(\alpha \)-th edge of \(\bar{{\mathcal {G}}}\) corresponds to the reversible reaction between the \(i\)-th and the \(j\)-th complex. For the interpretation of the positive constants \(\kappa _{\alpha }\) as conductances of the reversible reactions please refer to [5, 22].

If additionally the formally balanced reaction network is complex-balanced (and thus, cf. Corollary 4.4, detailed-balanced), then its dynamics thus takes the form

$$\begin{aligned} \dot{x} = - Z \bar{D}{\mathcal {K}}\bar{D}^T {\mathrm {Exp}}\,\left( Z^T {\mathrm {Ln}}\,\left( \frac{x}{x^*}\right) \right) \end{aligned}$$

In this case, see e.g. [12, 21], all equilibria \(x^{**}\) are in fact detailed-balanced equilibria, that is, \(\bar{D}^T Z^T {\mathrm {Ln}}\,x^{**} = {\mathrm {Ln}}\,(K^{{\mathrm {eq}}}) \, (= \bar{D}^T {\mathrm {Ln}}\,\rho )\).

5 Conclusions

By a systematic use of notions from algebraic graph theory, in particular the Laplacian matrix and Kirchhoff’s Matrix Tree theorem, previously derived results on complex, detailed and formal balancing have been proved in a simple manner. Furthermore, it has resulted in a new necessary and sufficient condition for complex balancing, which can be verified constructively.

The results obtained in this note can be immediately extended to mass action kinetic reaction networks with constant inflows and mass action outflow exploiting the classical idea of adding a ’zero complex’; see [9] and [23] for further details.

Current research is concerned with the application of the developed framework to questions of occurrence of multi-stability and structure-preserving model reduction; see for the latter also [17, 18, 21].