We know from [3] that any minimal generator of the phylogenetic semigroup on a graph with first Betti number \(2\) has degree at most three. In this section, we will explicitly describe which phylogenetic semigroups have which maximal degrees of the minimal generating sets for all graphs with first Betti number \(2\). We will see that there are graphs with the maximal degrees of the minimal generators equal to one, two, and three. Our analysis is based on five different cases depending on the structure of the graph—whether the cycles live in different components of the graph, share at least one edge, share exactly a single vertex, there is a single edge connecting the cycles, or the cycles are more than one edge apart from each other, see Fig. 3 for the latter four cases.
Remark 5.1
Assume a graph has a degree two vertex \(v\). Denote the edges incident to \(v\) by \(e_1\) and \(e_2\). By the definition of the phylogenetic semigroup on a graph, we have \(\omega _{e_1}=\omega _{e_2}\) for \(\omega \in \tau (G)\). Hence, the elements of \(\tau (G)\) are in one-to-one correspondence with the elements of \(\tau (G')\) where \(G'\) is obtained from \(G\) by replacing \(e_1\) and \(e_2\) by a single edge. To simplify future analysis, from now on we will assume that graphs possess no degree two vertices.
Theorem 5.2
Let \(G\) be a graph with first Betti number \(2\). The maximal degree of a minimal generator of \(\tau (G)\) is
-
one if and only if \(G\) does not contain any cycle legs that are not cycle edges;
-
two if and only if
-
the cycles of \(G\) live in different connected components, or
-
\(G\) contains at least one cycle leg that is not a cycle edge, all cycles of \(G\) live in the same connected component, and they are not separated by an inner vertex;
-
three if and only if the minimal cycles of \(G\) live in the same connected component and are more than one edge apart from each other.
We will study these different cases in Lemmas 5.5–5.10. As a corollary, we can describe the minimal generating sets of the phylogenetic semigroups on those trivalent graphs with first Betti number two that do not have any minimal generators of degree three.
From Theorem 5.2 and Lemma 3.2 we get
Corollary 5.3
Let \(G\) be a graph with first Betti number \(2\) not containing any cycle legs that are not cycle edges. A labeling \(\omega \in \tau (G)\) is a minimal generator of \(\tau (G)\) if and only if \(\omega \) is a network.
Besides, from Theorem 5.2 and Lemmas 3.2, 4.2 we conclude
Corollary 5.4
Let \(G\) be a trivalent graph with first Betti number \(2\), and
-
the cycles of \(G\) live in different connected components, or
-
\(G\) contains at least one cycle leg that is not a cycle edge, all cycles of \(G\) live in the same connected component, and they are not separated by an inner vertex.
A labeling \(\omega \in \tau (G)\) is a minimal generator of \(\tau (G)\) if and only if it satisfies one of the following conditions:
-
\(\omega \) is a network, or
-
\(\omega \) has degree two and there exists a cycle \(G'\) of \(G\) together with its cycle legs such that \(\omega |_{G'}\in \tau (G')\) is indecomposable.
Lemma 5.5
Let \(G\) be a graph with first Betti number \(2\) that does not contain any cycle legs that are not cycle edges. The maximal degree of a minimal generator of \(\tau (G)\) is one.
Proof
The cycles of \(G\) live in the same connected component. Otherwise \(G\) would have a degree two vertex. If the connected component of \(G\) containing the cycles has one vertex, then it is isomorphic to the right graph in Fig. 4. If the connected component of \(G\) containing the cycles has two vertices, then it is isomorphic to the left graph in Fig. 4. The connected component of \(G\) containing the cycles cannot have three or more vertices, because every vertex must belong to at least two cycles.
By computations with Normaliz [1], the phylogenetic semigroup on the left graph in Fig. 4 is
$$\begin{aligned} \mathbb {N} \{(0,0,0,1),(1,1,0,1),(1,0,1,1),(0,1,1,1)\}, \end{aligned}$$
where the last coordinate corresponds to the degree and the first three coordinates correspond to edges of \(G\) in any fixed order.
By simple observation, the phylogenetic semigroup on the right graph in Fig. 4 is
$$\begin{aligned} \mathbb {N} \{(0,0,1),(1,0,1),(0,1,1)\}, \end{aligned}$$
where the last coordinate corresponds to the degree and the first two coordinates correspond to edges of \(G\) in any fixed order. \(\square \)
Lemma 5.6
Let \(G\) be a graph with first Betti number \(2\) and cycles living in different connected components. The maximal degree of a minimal generator of \(\tau (G)\) is two.
Proof
Define \(\omega \in \tau (G)\) of degree two as follows: \(\omega _e=1\) for all cycle edges \(e\) of a cycle \(G'\) of \(G\), \(\omega _e=2\) for one cycle leg of \(G'\), and \(\omega _e=0\) for all other cycle legs of \(G'\). Extend this partial labeling of \(G\) in any feasible way to a degree two labeling of \(G\). By Lemma 4.1, \(\omega \) is indecomposable. Hence, the maximal degree of a minimal generator of \(\tau (G)\) is at least two.
On the other hand, we show that every element \(\omega \in \tau (G)\) can be decomposed as a sum of degree one and degree two elements. By Corollary 3.7, \(\omega \) restricted to each connected component decomposes as a sum of degree one and degree two elements. These decompositions can be combined to a decomposition of \(\omega \in \tau (G)\) as a sum of degree one and degree two elements. Hence, the maximal degree of a minimal generator of \(\tau (G)\) is exactly \(2\). \(\square \)
Let \(T\) be a trivalent tree and \(\omega _1,\omega _2\in \tau (T)\) networks. Let \(v\) be an inner vertex of \(T\). Then either \(a_v(\omega _1)=a_v(\omega _2)\), \(b_v(\omega _1)=b_v(\omega _2)\), or \(c_v(\omega _1)=c_v(\omega _2)\), since \(a_v(\omega _i)+b_v(\omega _i)+c_v(\omega _i)\in \{0,2\}\) for \(i=1,2\). We denote this edge by \(e\). By exchanging values of \(\omega _1\) and \(\omega _2\) on all edges of \(T\) that are on the same side with \(e\) from \(v\), we get \(\omega _1',\omega _2'\in \tau (T)\) such that \(\omega _1+\omega _2=\omega _1'+\omega _2'\). We call this operation branch swapping.
Lemma 5.7
Let \(G\) be a graph with first Betti number \(2\) containing at least one cycle leg that is not a cycle edge and with two cycles sharing at least one edge. The maximal degree of a minimal generator of \(\tau (G)\) is two.
Proof
By Corollary 2.10, we can assume that \(G\) is a multiple polygon graph. There is at least one cycle leg \(e'\) of \(G\) that is not a cycle edge for any of the cycles of \(G\). Assume that \(e'\) is a cycle leg of a cycle \(G'\). Define \(\omega \) of degree two as follows: \(\omega _e=1\) for all cycle edges \(e\) of \(G'\), \(\omega _{e'}=2\), and \(\omega _e=0\) for all other edges \(e\) of \(G\). By Lemma 4.1, the labeling \(\omega \in \tau (G)\) is indecomposable. Hence, the maximal degree of a minimal generator is at least two.
On the other hand, we show that every element \(\omega \in \tau (G)\) can be decomposed as a sum of degree one and degree two elements. If \(G\) is not trivalent, then by [3, Lemma 4.1] we can construct a trivalent graph \(G'\) with first Betti number \(2\) such that the maximal degree of the minimal generating set of \(\tau (G)\) is less or equal than the one of \(\tau (G')\). Moreover, two cycles of \(G'\) share an edge. Hence, we can assume that \(G\) is a trivalent graph.
If there is a cycle edge \(e\) of \(G\) with
, we construct the graph \(G^e\) with first Betti number \(1\) by cutting \(G\) at \(e\). Denote the new leaf edges by \(e_1\) and \(e_2\). The labeling \(\omega \) gives a labeling \(\overline{\omega }\) of \(G^e\). By Theorem 3.4, the labeling \(\overline{\omega }\) can be decomposed as a sum of degree one and two labelings
where
Hence, the decomposition of \(\overline{\omega }\) gives a decomposition of \(\omega \) with all labelings having degree one or two. From now on we assume that there is no cycle edge \(e\) of \(G\) with
.
There are exactly two vertices of \(G\) incident to three cycle edges. We denote them by \(u\) and \(v\). We construct a tree \(G'\) from \(G\) by replacing the vertex \(u\) with three new vertices \(u_1,u_2\), and \(u_3\) as in Fig. 5. The labeling \(\omega \) gives a labeling \(\omega '\) of \(G'\). Abusing the notation slightly, we denote by \(a_u(\omega '),b_u(\omega '),c_u(\omega ')\) the coordinates of \(\omega '\) corresponding to leaf edges with endpoints \(u_1,u_2,u_3\), respectively.
The labeling \(\omega '\) can be decomposed as a sum of degree one labelings
From this we want to construct a decomposition of \(\omega \in \tau (G)\). To lift an element of \(\tau (G')\) to an element of \(\tau (G)\), the parity and the degree condition have to be satisfied at leaf edges with endpoints \(u_1,u_2,u_3\). This is not true for all \(\omega ' _i\). We need to combine and alter these elements. We will use local paths to assure the parity and degree conditions are satisfied. We will construct the decomposition of \(\omega \in \tau (G)\) iteratively. In each step, we construct a degree one or two element \(\omega ^*\) and then replace \(\omega -\omega ^*\) with \(\omega \).
Case 1.
. Note that \(x_u(\omega ),y_u(\omega ),z_u(\omega )\ge 1\), otherwise there would be a cycle edge \(e\) of \(G\) with
.
-
If there is \(\omega '_i\) with exactly two of \(a_u(\omega '_i),b_u(\omega '_i),c_u(\omega '_i)\) equal to 1, then \(\omega '_i\) can be lifted to a degree one labeling of \(G\).
-
Otherwise if there is \(\omega '_i\) with exactly one of \(a_u(\omega '_i),b_u(\omega '_i),c_u(\omega '_i)\) equal to 1, then there is \(\omega '_j\) with all of \(a_u(\omega '_j),b_u(\omega '_j),c_u(\omega '_j)\) equal to 1. Then \(\omega '_i+\omega '_j\) can be lifted to a degree two labeling of \(G\).
-
Otherwise there has to be \(\omega '_i\) with all of \(a_u(\omega '_i),b_u(\omega '_i),c_u(\omega '_i)\) equal to 0. Then there is \(\omega '_j\) with all of \(a_u(\omega '_j),b_u(\omega '_j),c_u(\omega '_j)\) equal to 1. After branch swapping of \(\omega '_i\) and \(\omega '_j\) at \(v\), we get a labeling with exactly two values corresponding to \(a_u,b_u,c_u\) equal to 1. It can be lifted to a degree on labeling of \(G\).
Case 2.
.
Otherwise consider two subcases:
Case 2.1.
\(x_u(\omega ),y_u(\omega ),z_u(\omega )\ge 1\).
-
If there is \(\omega '_i\) with exactly two of \(a_u(\omega '_i),b_u(\omega '_i),c_u(\omega '_i)\) equal to 1, then \(\omega '_i\) can be lifted to a degree one labeling of \(G\).
-
Otherwise if there is \(\omega '_i\) with all of \(a_u(\omega '_i),b_u(\omega '_i),c_u(\omega '_i)\) equal to 1, then there is \(\omega ' _j\) with exactly one of \(a_u(\omega '_j),b_u(\omega '_j),c_u(\omega '_j)\) equal to 1. Then \(\omega '_i+\omega '_j\) can be lifted to a degree two labeling of \(G\).
-
Otherwise all \(\omega '_i\) have exactly one of \(a_u(\omega '_i),b_u(\omega '_i),c_u(\omega '_i)\) equal to 1. Since \(x_u(\omega )\ge 1\), there is \(\omega ' _i\) with \(a_u(\omega ' _i)=c_u(\omega ' _i)=0\) and \(b_u(\omega ' _i)=1\), and \(\omega ' _j\) with \(a_u(\omega ' _j)=b_u(\omega ' _j)=0\) and \(c_u(\omega ' _j)=1\). Then \(\omega ' _i+\omega ' _j\) can be lifted to a degree two labeling for \(G\).
Case 2.2. Exactly two of \(x_u(\omega ),y_u(\omega ),z_u(\omega )\ge 1\). It is not possible to have only one \(x_u(\omega ),y_u(\omega ),z_u(\omega )\ge 1\), because we assumed \(\omega _e> 0\) for every cycle edge \(e\). We assume that \(x_u(\omega ),y_u(\omega )\ge 1\), the other two cases are analogous.
-
If there is \(\omega '_i\) with exactly \(b_u(\omega '_i),c_u(\omega '_i)\), or \(a_u(\omega '_i),c_u(\omega '_i)\) equal to 1, then \(\omega '_i\) can be lifted to a degree one labeling of \(G\).
-
Otherwise if there is \(\omega '_i\) with exactly \(a_u(\omega '_i),b_u(\omega '_i)\) equal to 1, there is \(\omega ' _j\) with exactly \(c_u(\omega '_i)\) equal to 1, since \(c_u(\omega )>a_u(\omega )\) and \(c_u(\omega )>b_u(\omega )\). After branch swapping \(\omega ' _i\) and \(\omega ' _j\) at \(v\), we either get a labeling with all values corresponding to \(a_u,b_u,c_u\) equal to 0 or a labeling with values corresponding to \(b_u,c_u\) equal to 1 or a labeling with values corresponding to \(a_u,c_u\) equal to 1. They all can be lifted to a degree one labeling of \(G\).
-
Otherwise if there is \(\omega '_i\) with all of \(a_u(\omega '_i),b_u(\omega '_i),c_u(\omega '_i)\) equal to 1, there is \(\omega ' _j\) with exactly \(c_u(\omega '_j)\) equal to 1, since \(c_u(\omega )>a_u(\omega )\) and \(c_u(\omega )>b_u(\omega )\). Then \(\omega _i+\omega _j\) can be lifted to a degree two labeling of \(G\).
-
Otherwise all \(\omega '_i\) have exactly one of \(a_u(\omega '_i),b_u(\omega '_i),c_u(\omega '_i)\) equal to 1. Since \(x_u(\omega )\ge 1\), there is \(\omega ' _i\) with \(a_u(\omega ' _i)=c_u(\omega ' _i)=0\) and \(b_u(\omega ' _i)=1\), and \(\omega ' _j\) with \(a_u(\omega ' _j)=b_u(\omega ' _j)=0\) and \(c_u(\omega ' _j)=1\). Then \(\omega ' _i+\omega ' _j\) can be lifted to a degree two labeling for \(G\).
At each step a degree one or two element is constructed. This assures that the iterative process comes to an end, because the degree of \(\omega \) decreases. \(\square \)
Lemma 5.8
Let \(G\) be a graph with first Betti number \(2\) containing at least one cycle leg that is not a cycle edge and with two cycles sharing exactly one vertex. The maximal degree of a minimal generator of \(\tau (G)\) is two.
Proof
By Corollary 2.10, we can assume that \(G\) is a multiple polygon graph. There is at least one cycle leg \(e'\) of \(G\) that is not a cycle edge for any of the cycles of \(G\). Assume that \(e'\) is a cycle leg of a cycle \(G'\). Define \(\omega \) of degree two as follows: \(\omega _e=1\) for all cycle edges \(e\) of \(G'\), \(\omega _{e'}=2\), and \(\omega _e=0\) for all other edges \(e\) of \(G\). By Lemma 4.1, the labeling \(\omega \in \tau (G)\) is indecomposable. Hence, the maximal degree of a minimal generator is at least two.
On the other hand, we show that every element \(\omega \in \tau (G)\) can be decomposed as a sum of degree one and degree two elements. We construct a trivalent graph \(G'\) from \(G\) as in [3, Lemma 4.1] such that the maximal degree of the minimal generating set of \(\tau (G)\) is less than or equal to the one of \(\tau (G')\). In particular, first we decrease the valency at the vertex \(v\) that is on both cycles. We replace it by vertices \(v',v''\), and an edge \(e\) between them such that \(e\) belongs to both cycles. We repeat replacing vertices until there are only trivalent vertices left. The graph \(G'\) has two cycles that share at least one edge, thus we can apply Lemma 5.7. \(\square \)
Lemma 5.9
Let \(G\) be a graph with first Betti number \(2\) and the two cycles separated by a single edge \(e\). The maximal degree of a minimal generator of \(\tau (G)\) is two.
Proof
Define \(\omega \in \tau (G)\) of degree two as follows: \(\omega _e=1\) for all cycle edges \(e\), \(\omega _e=2\) for the single edge separating cycles, and \(\omega _e=0\) for all other edges. By Lemma 4.1, \(\omega \) is indecomposable. Hence, the maximal degree of a minimal generator of \(\tau (G)\) is at least two.
On the other hand, we show that every element \(\omega \in \tau (G)\) can be decomposed as a sum of degree one and degree two elements. If \(G\) is not trivalent, then by [3, Lemma 4.1] we can construct a trivalent graph \(G'\) with first Betti number \(2\) such that the maximal degree of the minimal generating set of \(\tau (G)\) is less than or equal to the maximal degree of the minimal generating set of \(\tau (G')\). Moreover, we may assume that every time we replace a vertex \(v\) on a cycle by vertices \(v',v''\), and an edge between them, then \(v',v''\) belong to the same cycle. This assures that the two cycles of \(G'\) are separated by a single edge. Hence, we can assume that \(G\) is a trivalent graph.
Let \(e_1,e_2\) be the new leaf edges obtained by cutting \(G\) at \(e\), and write \(G^e=G_1\sqcup G_2\). The labeling \(\omega \) gives labelings \(\omega _1\) of \(G_1\) and \(\omega _2\) of \(G_2\). By Corollary 3.7, we can decompose \(\omega _1\) and \(\omega _2\) as a sum of degree one and degree two elements. Because all degree two labelings in these decompositions have values 0 or 2 corresponding to the edges \(e_1\) and \(e_2\), we can combine decompositions of \(\omega _1\) and \(\omega _2\) to get a decomposition of \(\omega \) that consists of degree one and two elements. Hence, the maximal degree of a minimal generator of \(\tau (G)\) is exactly two. \(\square \)
Lemma 5.10
Let \(G\) be a graph with first Betti number \(2\) and the two cycles more than one edge apart from each other. The maximal degree of a minimal generator of \(\tau (G)\) is three.
Proof
By Corollary 2.10, we can assume that \(G\) is a multiple polygon graph. We need to specify a degree three indecomposable element \(\omega \in \tau (G)\). Fix an inner vertex \(v\) on the path between the two cycles of \(G\) and an edge \(e^*\) incident to \(v\) that is not on the path between the two cycles. Define \(\omega _e=2\) for all cycle edges \(e\) and all edges \(e\) on the path between the cycles of \(G\), \(\omega _{e^*}=2\), and \(\omega _e=0\) for all other edges \(e\).
We will show that \(\omega \) is indecomposable as a degree three labeling. By contradiction, assume \(\omega =\omega _1+\omega _2\) where
and
. We must have \((\omega _2)_e=1\) for all cycle edges of \(G\) and \((\omega _2)_e=2\) for both cycle legs \(e\) that lie on the path between the two cycles. Hence, we have \((\omega _2)_e=2\) for all edges \(e\) that lie on the path between the two cycles. Thus \((\omega _1)_{e^*}=2\). This leads to a contradiction, because
. Hence, the labeling \(\omega \) is a degree three indecomposable element in \(\tau (G)\). \(\square \)
Lemmas 5.5–5.10 constitute Theorem 5.2.