# Multigraded commutative algebra of graph decompositions

## Abstract

The toric fiber product is a general procedure for gluing two ideals, homogeneous with respect to the same multigrading, to produce a new homogeneous ideal. Toric fiber products generalize familiar constructions in commutative algebra like adding monomial ideals and the Segre product. We describe how to obtain generating sets of toric fiber products in non-zero codimension and discuss persistence of normality and primary decompositions under toric fiber products.

Several applications are discussed, including (a) the construction of Markov bases of hierarchical models in many new cases, (b) a new proof of the quartic generation of binary graph models associated to *K*_{4}-minor free graphs, and (c) the recursive computation of primary decompositions of conditional independence ideals.

### Keywords

Toric fiber product Toric ideal Segre product Markov basis Primary decomposition Algebraic statistics Conditional independence ideal Normality of ideals## 1 Introduction

Let *I* and *J* be ideals in polynomial rings \(\mathbb{K}[x]\) and \(\mathbb{K}[y]\), respectively, that are both homogeneous with respect to a single grading by an affine semigroup \(\mathbb{N}\mathcal{A}\). The *toric fiber product of**I**and**J* (Definition 2.1), denoted \(I \times_{\mathcal{A}}J\), is a new ideal in a usually larger polynomial ring \(\mathbb{K}[z]\). An important measure of complexity of this operation is the *codimension* of the product, defined as the rank of the integer lattice \(\ker\mathcal{A}\). In [34] the third author introduced toric fiber products and proved that in the codimension zero case it is possible to construct a generating set or Gröbner basis for \(I \times _{\mathcal{A}}J\) from generating sets or Gröbner bases of *I* and *J*. In this case the algebra and geometry is significantly simpler essentially because codimension zero toric fiber products are *multigraded Segre products* (Definition 2.3), which share many nice properties with their standard graded analogues. Still in the codimension zero case, the geometry of the toric fiber product can be understood quite explicitly in terms of GIT [25] (Propositions 2.2 and 2.4). We pursue this observation and show that (under mild assumptions on \(\mathbb{K}\)) normality persists (Theorem 2.5).

The main goal of this paper, however, is to describe higher codimension toric fiber products. In Sect. 3 we show that primary decompositions persist in any codimension (Theorem 3.1). In Sect. 4 we show how to construct generating sets of toric fiber products in arbitrary codimension, but under some extra technical conditions (Theorem 4.9). This generalizes the codimension one results on cut ideals obtained by the first author in [11].

The toric fiber product frequently appears in applications of combinatorial commutative algebra, in particular in algebraic statistics [12, 31, 32]. Typically in algebraic statistics, we are interested in studying a family of ideals, where each ideal *I*_{G} is associated to a graph *G* (or other combinatorial object, like a simplicial complex or a poset). If the graph has a decomposition into two simpler graphs *G*_{1} and *G*_{2}, we would like to show that the ideal *I*_{G} has a decomposition into the two ideals \(I_{G_{1}}\) and \(I_{G_{2}}\). If we can identify *I*_{G} as a toric fiber product \(I_{G_{1}} \times_{\mathcal{A}}I_{G_{2}}\), then difficult algebraic questions for large graphs reduce to simpler problems on smaller graphs. Our inspiration comes from structural graph theory, where the imposition of forbidden substructures often implies that a graph has a specific kind of structural decomposition into simple pieces. In Sect. 5 we pursue the analogy to the theory of forbidden minors [29] by exhibiting minor-closed classes of graphs with certain degree bounds on their Markov bases.

Before proving our main theoretical results in Sects. 2–4, we motivate our study with several examples from algebraic statistics. Sections 5 and 6 contain new applications to the construction of Markov bases of hierarchical models, and to the study of primary decompositions of conditional independence ideals.

### 1.1 Hierarchical models

Hierarchical statistical models are used to analyze associations between collections of random variables. If the random variables are discrete, these models are toric varieties, and hence their vanishing ideals are toric ideals. Their binomial generators—known as *Markov bases*—are useful for performing various tests in statistics [6, 10]. From the algebraic standpoint, they are binomial ideals with a specific combinatorial parametrization in terms of a simplicial complex.

*Γ*⊆2

^{V}be a simplicial complex on a finite set

*V*and \(d \in\mathbb{Z}^{V}_{\geq2}\). Let \({\rm facet}(\varGamma)\) be the set of maximal faces of

*Γ*. For an integer

*n*, let [

*n*]={1,2,…,

*n*}. For

*F*⊆

*V*let

*d*

_{F}=(

*d*

_{v})

_{v∈F}and let D

_{F}=∏

_{v∈F}[

*d*

_{v}]. For

*i*∈D

_{V}and

*F*⊆

*V*let

*i*

_{F}=(

*i*

_{v})

_{v∈F}be the restriction. For each \(F \in{\rm facet}(\varGamma)\) and

*i*∈D

_{F}, let \(a^{F}_{i}\) be an indeterminate. For each

*i*∈D

_{V}, let

*p*

_{i}be another indeterminate. The toric ideal

*I*

_{Γ,d}of the hierarchical model for (

*Γ*,

*d*) is the kernel of the \(\mathbb{K}\)-algebra homomorphism

*I*

_{Γ,d}. Results in this direction usually depend on special properties of

*Γ*and

*d*. An example is the following theorem of Král, Norine, and Pangrác [21], which is also a corollary to our results in Sect. 5.3:

### Theorem 1.1

*Let**d*_{i}=2 *for all**i*∈*V**and let**Γ**be a graph with no**K*_{4}*minors*. *Then**I*_{Γ,d}*is generated by binomials of degrees two and four*.

Combining our techniques with results from [15], we can also make statements about the asymptotic behavior as the *d*_{i} grow. For instance, let *F*⊆*V* be an independent set of *Γ* and consider *I*_{Γ,d} as *d*_{i} tend to infinity for *i*∈*F*, while the remaining *d*_{i} are fixed. In this case, there is a bound *M*(*Γ*,*d*_{V∖F}) for the degrees of elements in minimal generating sets of *I*_{Γ,d}. Our techniques allow us to determine the values of *M*(*Γ*,*d*_{V∖F}), which were previously known only for reducible models or when *F* is a singleton [17]. Here is a simple example of how to apply Theorem 5.15.

### Example 1.2

*Γ*=[12][13][24][34] be a four cycle,

*F*={1,4}, and

*d*

_{{2,3}}=(2,2). The toric ideal

*I*

_{Γ,d}is a codimension one toric fiber product and its minimal generating set consists of the following four types of binomials, written in tableau notation (a common notation, explained below Theorem 4.2):

*i*,

*i*

_{1},

*i*

_{2},

*i*

_{3},

*i*

_{4}∈[

*d*

_{1}],

*j*,

*k*∈[2],

*l*,

*l*

_{1},

*l*

_{2},

*l*

_{3},

*l*

_{4}∈[

*d*

_{4}]. In particular,

*M*(

*Γ*,

*d*

_{V∖F})=4.

### 1.2 Conditional independence

If *G* is a graph on *V*, then its clique complex defines a hierarchical model as in the previous section. Probability distributions in this hierarchical model satisfy certain conditional independence statements associated to the graph [22]. One may ask which other distributions outside the hierarchical model also satisfy the conditional independence constraints, and algebraic statistics allows one to characterize these distributions. Consider again the polynomial ring \(\mathbb{K}[p_{i} : i \in\mathrm{D}_{V}]\) with one indeterminate for each elementary probability. If *A*,*B*,*C*⊂*V* is a partition of *V*, i.e. pairwise disjoint with *A*∪*B*∪*C*=*V*, the *conditional independence (CI)-statement*Open image in new window encodes that the random variables in *A* are independent of the random variables in *B*, given the values of the random variables in *C*. Distributions satisfying this constraint form a hierarchical model, which arises from the largest simplicial complex on *V* not containing \(\left\lbrace i,j \right\rbrace\) for any *i*∈*A*,*j*∈*B*. Its toric ideal is denoted Open image in new window. A *conditional independence model* usually contains several statements and one is led to consider intersections of toric varieties. Our main interest is in the *global Markov ideal* of a graph *G*, which is the sum of the toric ideals Open image in new window for all *A*,*B*,*C* forming a partition of *V* such that *C* separates *A* and *B* in *G*. Our goal is to determine primary decompositions and as always we want to employ the toric fiber product machinery to split the problem into several easier problems.

### Example 1.3

*G*be the binary global Markov ideal of the graph in Fig. 1. Since it decomposes as three squares glued along edges, Theorem 3.1 and Corollary 3.2 reconstruct the primary decomposition from that of the CI-ideal of a square. Our results also show that the corresponding CI-ideal is radical, as it is composed of graphs with radical CI-ideals. In total it is the intersection of 729=9

^{3}prime ideals.

A systematic check of all graphs with at most five vertices and with *d*_{v}=2 for all *v*∈*V* found no examples of a non-radical global Markov ideal. This limited computational evidence motivates the following question:

### Question 1.4

*Are global Markov ideals always radical*?

The answer to this question is negative. More than a year after first submission of the present paper, Kahle, Rauh, and Sullivant showed that the global Markov ideal of *K*_{3,3} is not radical [20].

## 2 Toric fiber products and multigraded Segre products

*r*>0 be a positive integer and \(s,t \in\mathbb{Z}^{r}_{> 0}\) be two vectors of positive integers. Let

*ω*

^{T}

**a**

^{i}=1 for all

*i*. This implies that ideals homogeneous with respect to the multigrading are homogeneous with respect to the standard coarse grading. Let \(\mathcal{A}= \{ \mathbf{a}^{1}, \ldots, \mathbf{a}^{r} \} \) and let \(\mathbb{N} \mathcal{A}\) be the affine semigroup generated by \(\mathcal{A}\). If \(I \subset\mathbb {K}[x]\) and \(J \subset\mathbb{K}[y]\) are \(\mathbb{N}\mathcal{A}\)-graded ideals, the quotient rings \(R = \mathbb{K} [x]/I\) and \(S = \mathbb{K}[y]/J\) are also \(\mathbb{N}\mathcal{A}\)-graded. Let

### Definition 2.1

*toric fiber product*\(I\times_{\mathcal{A}}J\) of

*I*and

*J*is the kernel of

*ϕ*

_{I,J}:

*codimension*of the toric fiber product is the dimension of the space of linear relations among \(\mathcal{A}\).

We can also define the \(\mathbb{K}\)-algebra homomorphism \(\phi: \mathbb{K}[z] \rightarrow \mathbb{K}[x] \otimes_{\mathbb{K}}\mathbb{K}[y] = \mathbb{K}[x,y]\) by \(z^{i}_{jk} \mapsto x^{i}_{j} y^{i}_{k}\). Then the toric fiber product is the ideal \(I\times_{\mathcal{A}}J = \phi ^{-1}(I + \nobreak J)\).

### 2.1 The geometry of toric fiber products

If \(I \times_{\mathcal{A}}J\) is a codimension zero toric fiber product, the relation between the schemes \(\operatorname{Spec}( \mathbb{K}[x]/I)\), \(\operatorname{Spec}(\mathbb{K}[y]/J)\) and \(\operatorname{Spec}( \mathbb{K}[z]/(I \times_{\mathcal{A}}J))\) can be explained in the language of GIT (geometric invariant theory) quotients. Since *I* and *J* are homogeneous with respect to the grading by \(\mathcal{A}\), both \(\operatorname{Spec}( \mathbb{K}[x]/I)\) and \(\operatorname{Spec}(\mathbb{K}[y]/J)\) have an action of a \((\dim\mathcal{A}- 1)\)-dimensional torus *T*. Thus the product scheme \(\operatorname{Spec}( \mathbb{K}[x]/I) \times\operatorname{Spec}(\mathbb{K}[y]/J)\) possesses an action of *T* via *t*⋅(*x*,*y*)=(*tx*,*t*^{−1}*y*).

### Proposition 2.2

*If*\(\mathbb{K}\)

*is algebraically closed and*\(\mathcal{A}\)

*is linearly independent*,

*then*

### Proof

*R*and

*S*are \(\mathbb{N} \mathcal{A}\)-graded, so we can write \(R = \bigoplus_{\mathbf{a}\in\mathbb{N}\mathcal{A}} R_{\mathbf{a}}\), \(S = \bigoplus _{\mathbf{a}\in \mathbb{N}\mathcal{A}} S_{\mathbf{a}}\), and

**a**−

**b**. The invariant ring of the torus action is the degree \({\bf0}\) part, which is \(\bigoplus_{\mathbf{a}\in\mathbb{N}\mathcal{A}} R_{\mathbf{a}}\otimes _{\mathbb{K}}S_{\mathbf{a}}\). The proof is complete once we show that

*ϕ*surjects onto it. As algebras,

*R*is generated by \(\bigoplus_{\mathbf{a}\in\mathcal{A}} R_{\mathbf{a}}\) and

*S*is generated by \(\bigoplus_{\mathbf{a}\in\mathcal{A}} S_{\mathbf{a}}\). Now let

*x*

^{u}⊗

*y*

^{v}be a monomial in some \(R_{\mathbf{a}}\otimes_{\mathbb{K}}S_{\mathbf{a}}\). Since \(\mathcal{A}= \{\mathbf{a}_{1}, \ldots, \mathbf{a}_{n}\}\) is linearly independent, there is a unique way to write \(\mathbf{a}= \sum_{i =1}^{n} \lambda_{i} \mathbf{a}_{i}\) with \(\lambda_{i} \in\mathbb {N}\). Thus

### Definition 2.3

*R*and

*S*be two rings graded by a common semigroup \(\mathbb {N}\mathcal{A}\). The

*multigraded Segre product*is

With this new definition, Proposition 2.2 is equivalent to the statement:

### Proposition 2.4

*If*\(\mathcal{A}\)

*is linearly independent*,

*then*

### 2.2 Persistence of normality

One of the most basic questions about an ideal *I* in a ring *R* is whether or not the quotient *R*/*I* is normal. When *I* is a toric ideal, \(\mathbb{K}[x]/I\) is an affine semigroup ring and normality can be characterized in terms of the semigroup having no holes. In algebraic statistics, normality implies favorable properties of sampling algorithms for contingency tables [4, 36]. In this section we show that normality persists under codimension zero toric fiber products. We only treat the case of (not necessarily toric) prime ideals, which suffices in many situations (see for instance [35, Proposition 2.1.16]).

### Theorem 2.5

*Let**I**and**J**be homogeneous prime*\(\mathbb{N}\mathcal{A}\)-*graded ideals*, *with*\(\mathcal{A}\)*linearly independent*, *and suppose that*\(\mathbb{K}[x]/I\)*and*\(\mathbb{K}[y]/J\)*are normal domains* (*that is*, *integrally closed in their field of fractions*). *If*\(\mathbb{K}\)*is algebraically closed*, *then*\(\mathbb{K} [z]/ (I \times_{\mathcal{A}}J)\)*is normal*.

The assumption that \(\mathbb{K}\) is algebraically closed is needed to ensure that \(\mathbb{K}[z]/ (I \times_{\mathcal{A}}J)\) is a domain. This holds more generally if *I* and *J* are geometrically prime (see Theorem 3.1). If this is given, the field assumption can be weakened to \(\mathbb{K}\) being a *perfect field*, that is, a field \(\mathbb{K}\) such that either \(\operatorname {char}(\mathbb{K}) = 0\) or \(\operatorname {char}(\mathbb{K}) = p\) and \(\mathbb{K}= \left\lbrace a^{p} : a\in\mathbb{K} \right\rbrace\). The proof of Theorem 2.5 is based on the following observation which is easy and independent of the codimension of \(\mathcal{A}\).

### Lemma 2.6

*The multigraded Segre product is a direct summand of the tensor product*\(R \otimes_{\mathbb{K}} S\) (*as a module over the subring*).

### Proof

The inclusion \(0 \to\bigoplus_{a\in\mathbb{N}\mathcal{A}} R_{a} \otimes_{\mathbb{K}} S_{a} \to \bigoplus_{a\in\mathbb{N}\mathcal{A}}\bigoplus_{b\in\mathbb {N}\mathcal{A}} R_{a} \otimes _{\mathbb{K}} S_{b}\) splits via the \((\bigoplus_{a\in\mathbb{N}\mathcal{A}} R_{a} \otimes_{\mathbb{K}} S_{a})\)-module homomorphism that maps \(x^{i}_{j}\otimes y^{l}_{k}\) to itself if **a**_{i}=**a**_{l} and zero otherwise. □

We anticipate that Lemma 2.6 will be useful in relating properties of multigraded Segre products to those of the factors. For instance, a careful analysis of the Castelnuovo–Mumford regularity would be interesting, but is beyond the scope of this paper. We apply the lemma to prove persistence of normality in codimension zero. Note that the codimension requirement enters because only if \(\mathcal{A}\) is linearly independent, Lemma 2.6 gives us a handle on the toric fiber product.

### Proof of Theorem 2.5

Let \(R = \mathbb{K}[x]/I\) and \(S=\mathbb{K}[y]/J\). It is easy to see directly (and also follows from Theorem 3.1 below) that \(\mathbb{K}[z]/(I \times _{\mathcal{A}}J)\) is a domain, given that \(\mathbb{K}\) is algebraically closed. An algebraically closed field is perfect and therefore, if *R* and *S* are normal, then \(R\otimes _{\mathbb{K} }S\) is normal. This follows from Serre’s criterion and [38, Theorem 6]. Since a direct summand of a normal domain is normal, Lemma 2.6 completes the proof. □

The main case of interest for our applications is when the ideals *I* and *J* are toric ideals and various special cases have been proved in the algebraic statistics literature. For example, Ohsugi [27] proves this for cut ideals, Sullivant [33] for hierarchical models, and Michałek [24] for group-based phylogenetic models. The proofs of these results are essentially the same, and consists of analyzing a toric fiber product of the grading semigroup. We introduce this setting now.

### 2.3 Fiber products of vector configurations

*I*and

*J*are toric ideals, then \(I \times_{\mathcal{A}}J\) is also a toric ideal. The corresponding vector configuration arises from taking the fiber product of the two vector configurations corresponding to

*I*and

*J*. Let \(\mathcal{B}= \{ \mathbf{b} ^{i}_{j} : i \in[r], j \in[s_{i}] \} \subseteq\mathbb{Z}^{d_{1}}\) and \(\mathcal{C}= \{ \mathbf{c}^{i}_{k} :\allowbreak i \in[r], k \in[t_{i}] \} \subseteq\mathbb{Z}^{d_{2}}\) be two vector configurations. As necessary, we consider \(\mathcal{B}\) and \(\mathcal{C}\) as collections of vectors or as matrices. These vector configurations define toric ideals \(I_{\mathcal{B}}\subseteq \mathbb{K}[x]\) and \(I_{\mathcal{C}} \subseteq\mathbb{K}[y]\) by

*i*and

*j*and \(\pi_{2}(\mathbf{c}^{i}_{k}) = \mathbf{a}^{i}\) for all

*i*and

*k*. The new vector configuration that arises in this case is the fiber product of the vector configurations.

*I*=ker

*ϕ*,

*J*=ker

*ψ*and both ideals are homogeneous with respect to the grading by \(\mathcal{A}\), then \(I \times_{\mathcal{A}}J = \ker (\phi\times _{\mathcal{A}}\psi)\). In the toric case, when

*ϕ*,

*ψ*are monomial homomorphisms, it is easy to see that \(\mathcal{B}\times_{\mathcal{A}}\mathcal{C}\) defines the toric fiber product homomorphism.

## 3 Persistence of primary decomposition

Primary decompositions of toric fiber products consist of toric fiber products of primary components. To state the result, recall that an ideal is *geometrically primary* if it is primary over any algebraic extension of the coefficient field.

### Theorem 3.1

*Let*\(I \subseteq\mathbb{K}[x]\)

*and*\(J \subseteq\mathbb{K}[y]\)

*be*\(\mathcal{A} \)-

*homogeneous ideals*.

*Let*

*I*=

*I*

_{1}∩⋯∩

*I*

_{k}

*and*

*J*=

*J*

_{1}∩⋯∩

*J*

_{l}

*be primary decompositions of*

*I*

*and*

*J*

*such that all ideals*

*I*

_{i}

*and*

*J*

_{j}

*are homogeneous with respect to*\(\mathcal{A}\).

*Then*

*If*,

*in addition*,

*the ideals*

*I*

_{i}

*and*

*J*

_{j}

*are all geometrically primary*,

*then*(2)

*is a primary decomposition of*\(I \times_{\mathcal{A}}J\).

### Proof

*f*belongs to a toric fiber product \(I \times_{\mathcal{A}}J\) if and only if \(\phi(f) \in I + J \subseteq\mathbb{K}[x] \otimes_{\mathbb{K}}\mathbb{K}[y] = \mathbb {K}[x,y]\). Thus where the second equivalence is because

*I*

_{i}and

*J*are ideals in disjoint sets of variables.

For the second claim, since \(I_{i} \times_{\mathcal{A}}J_{j}\) is the inverse image of *I*_{i}+*J*_{j}, and inverse images of primary ideals are primary, it suffices to show, for any geometrically primary ideals \(I \subseteq\mathbb{K}[x]\) and \(J \subseteq\mathbb{K} [y]\), that \(I+J \subseteq\mathbb{K}[x,y] \) is geometrically primary. First, note that the statement clearly holds if *I* and *J* are geometrically prime ideals, since the join of two irreducible varieties is irreducible. The proof of Proposition 1.2 (iv) in [30] contains the cases of geometrically primary ideals. □

### Theorem 3.2

*Suppose that*\(\mathcal{A}\)

*is linearly independent*.

*Then the decomposition*

*is irredundant if and only if for all*

*i*

_{1},

*i*

_{2}∈[

*k*]

*and*

*j*

_{1},

*j*

_{2}∈[

*l*]

*with*

*i*

_{1}≠

*i*

_{2}

*or*

*j*

_{1}≠

*j*

_{2}

*either*:

*there exists*\(\mathbf{a}\in\mathbb{N}\mathcal{A}\)*such that*\((I_{i_{1}})_{\mathbf{a}} \nsubseteq (I_{i_{2}})_{\mathbf{a}}\)*and*\((J_{j_{2}})_{\mathbf{a}}\neq\mathbb {K}[y]_{\mathbf{a}}\),*or**there exists*\(\mathbf{b}\in\mathbb{N}\mathcal{A}\)*such that*\((J_{j_{1}})_{\mathbf{b}} \nsubseteq (J_{j_{2}})_{\mathbf{b}}\)*and*\((I_{i_{2}})_{\mathbf{b}}\neq\mathbb {K}[x]_{\mathbf{b}}\).

### Proof

To deal with redundancy of the decomposition, we must describe conditions on \(I, K \subseteq\mathbb{K}[x]\) and \(J,L \subseteq\mathbb{K}[y]\) that imply \(I \times_{\mathcal{A}}J \subseteq K \times_{\mathcal{A}}L\). Let \(R =\mathbb{K}[x]/I\), \(S = \mathbb{K}[y]/J\), \(R' = \mathbb {K}[x]/K\), and \(S' = \mathbb{K} [y]/L\). Since \(\mathcal{A}\) is linearly independent, the rings \(\mathbb{K}[z]/ (I \times_{\mathcal{A}}J)\) and \(\mathbb{K}[z]/ (K \times_{\mathcal{A}}L)\) are multigraded Segre products. So \(I \times _{\mathcal{A}}J \subseteq K \times_{\mathcal{A}} L\) if and only if \(R' \times_{\mathbb{N}\mathcal{A}}S'\) is a quotient of \(R \times_{\mathbb{N}\mathcal{A}}S\) by the ideal generated by the image of \(K \times_{\mathcal{A}}L\) in \(R \times_{\mathbb {N}\mathcal{A}}S\). On the level of the homogeneous components, we require that \(R'_{\mathbf{a}}\otimes_{\mathbb{K}}S'_{\mathbf{a}}= R_{\mathbf{a}} \otimes_{\mathbb{K}} S_{\mathbf{a}}/ (K \times_{\mathcal{A}}L)_{\mathbf{a}}\), as \(\mathbb {K}\)-vector spaces. There are two ways that \(R'_{\mathbf{a}}\otimes_{\mathbb{K}}S'_{\mathbf{a}}\) could be a quotient of \(R_{\mathbf{a}}\otimes _{\mathbb{K}} S_{\mathbf{a}}\). If *I*_{a}⊆*K*_{a} and *J*_{a}⊆*L*_{a}, then \((I \times_{\mathcal{A}}J)_{\mathbf{a}} \subseteq(K \times_{\mathcal {A}}L)_{\mathbf{a}}\), in which case we have the desired quotient. The second way is if the tensor product \(R'_{\mathbf{a}}\otimes_{\mathbb{K}} S'_{\mathbf{a}} = \{0 \}\), which happens if and only if either \(R'_{\mathbf{a}}\) or \(S'_{\mathbf{a}}\) is {0}. On the level of ideals, this happens if and only if either \(K_{\mathbf{a}}= \mathbb{K}[x]_{\mathbf{a}}\) or \(L_{\mathbf{a}}= \mathbb{K}[y]_{\mathbf{a}}\).

The decomposition (3) is redundant if and only if there are *i*_{1},*i*_{2} and *j*_{1},*j*_{2} where \(I_{i_{1}} \times_{\mathcal{A}}J_{j_{1}} \subseteq I_{i_{2}} \times_{\mathcal{A}} J_{j_{2}}\) (where one of *i*_{1}=*i*_{2} and *j*_{1}=*j*_{2} is allowed, but not both). Now \(I_{i_{1}} \times_{\mathcal{A}}J_{j_{1}} \subseteq I_{i_{2}} \times _{\mathcal{A}}J_{j_{2}}\) if and only if for all \(\mathbf{a}\in\mathbb{N}\mathcal{A}\), \((\mathbb {K}[x]/I_{i_{2}})_{\mathbf{a}}\otimes_{\mathbb{K}}(\mathbb{K} [y]/J_{j_{2}})_{\mathbf{a}}\) is a quotient of \((\mathbb{K}[x]/I_{i_{1}})_{\mathbf{a}}\otimes_{\mathbb{K}}(\mathbb{K} [y]/J_{j_{1}})_{\mathbf{a}}\). This happens if and only if for each \(\mathbf{a}\in\mathbb {N}\mathcal{A}\) the condition in the previous paragraph is satisfied. Thus, \(I_{i_{1}} \times_{\mathcal {A}}J_{j_{1}} \nsubseteq I_{i_{2}} \times_{\mathcal{A}}J_{j_{2}}\) if and only if the negation of this condition holds. Choosing **a** from the first condition of the theorem with respect to *j*=*j*_{2}, yields the desired non-containment in the case *i*_{1}≠*i*_{2}. If *i*_{1}=*i*_{2} and *j*_{1}≠*j*_{2}, we choose **b** from the second condition of the theorem with respect to *i*=*i*_{1}. This proves the sufficiency of the conditions.

The two conditions are necessary since the first is necessary for \(I_{i_{1}} \times_{\mathcal{A}} J_{j} \nsubseteq I_{i_{2}} \times_{\mathcal{A}}J_{j}\), while the second is necessary for \(I_{i} \times_{\mathcal{A}}J_{j_{1}} \nsubseteq I_{i} \times_{\mathcal{A}}J_{j_{2}}\). □

### Corollary 3.3

*Let*\(\mathcal{A}\)

*be linearly independent*.

*Suppose that*

*I*=

*I*

_{1}∩⋯∩

*I*

_{k}

*and*

*J*=

*J*

_{1}∩⋯∩

*J*

_{l}

*are*\(\mathcal{A}\)

*homogeneous irredundant primary decompositions of*

*I*

*and*

*J*

*into geometrically primary ideals*,

*and that for each*

*i*∈[

*k*],

*j*∈[

*l*],

*and*\(\mathbf{a}\in\mathbb{N}\mathcal{A}\),

*neither*\((I_{i})_{\mathbf{a}}= \mathbb{K}[x]_{\mathbf{a}}\)

*nor*\((J_{j})_{\mathbf{a}}= \mathbb{K}[y]_{\mathbf{a}}\).

*Then*

*is an irredundant primary decomposition of*\(I \times_{\mathcal{A}}J\).

### Proof

We combine Theorems 3.1 and 3.2. Since the ideals *I*_{i} and *J*_{j} are all geometrically primary, the decomposition of \(I \times_{\mathcal{A}}J\) is a primary decomposition. Since the decomposition of *I* is irredundant, for each *i*_{1}≠*i*_{2} there exists \(\mathbf{a}\in \mathbb{N}\mathcal{A} \) such that \((I_{i_{1}})_{\mathbf{a}}\nsubseteq(I_{i_{2}})_{\mathbf{a}}\) and, by assumption, for all *j*\((J_{j})_{\mathbf{a}}\neq\mathbb{K}[y]_{\mathbf{a}}\). Similarly, the decomposition of *J* is irredundant, for each *j*_{1}≠*j*_{2} there exists \(\mathbf{b}\in \mathbb{N}\mathcal{A} \) such that \((J_{j_{1}})_{\mathbf{b}}\nsubseteq(J_{j_{2}})_{\mathbf{b}}\) and, by assumption, for all *i*, \((I_{i})_{\mathbf{b}}\neq\mathbb{K}[y]_{\mathbf{b}}\). This implies that the decomposition is irredundant. □

To apply Corollary 3.3 iteratively, we need to control when its hypotheses are preserved.

### Lemma 3.4

*Let*\(\mathcal{A}\)

*be linearly independent*,

*and let*\(\mathcal{B}\)

*induce a grading on*\(\mathbb{K}[x]\)

*such that*

*for all*\(\mathbf{b} \in\mathbb{N}\mathcal{B}\)\((I)_{\mathbf{b}} \neq \mathbb{K}[x]_{\mathbf{b}}\),*and**for all*\(\mathbf{a}\in\mathbb{N}\mathcal{A}\)\((J)_{\mathbf {a}} \neq\mathbb{K} [y]_{\mathbf{a}}\).

*In this case*\((I \times_{\mathcal{A}} J)_{\mathbf{b}} \neq\mathbb{K} [z]_{\mathbf{b}}\)

*for all*\(\mathbf{b}\in\mathbb{N}\mathcal{B}\).

### Proof

*R*into their \(\mathcal{B}\)-graded parts. The conclusion is equivalent to the statement that in

**b**there exists an

**a**such that

*R*

_{(a,b)}≠0. Now the statement holds since

*S*

_{a}≠0. □

### Example 3.5

(Monomial primary decomposition)

*y*

^{2}〉, 〈

*x*

^{2}〉. Finally, the decomposition can be redundant even when the ideals are radical, as the following calculation illustrates:

## 4 Generators of toric fiber products of toric ideals

To each higher codimension toric fiber product there is a natural codimension zero product (Definition 4.1) which contributes many of the generators. There are also additional generators *glued* from certain pairs of generators of the original ideals. Keeping track of the different contributions requires substantial notation which we found managable only in the case of toric ideals. To verify our results we require that the generating sets of the original ideals satisfy the *compatible projection property* (Definition 4.7). Any generating set can be extended to one that satisfies this property, but it may be inscrutable how to do so. In special cases, however, the condition becomes clear. For instance, in codimension one toric fiber products the simpler *slow-varying condition* (Definition 4.10) implies the compatible projection property.

*q*

^{i}are indeterminates and

*I*(

*X*) denotes the ideal obtained by replacing all occurrences of \(x^{i}_{j}\) with \(X^{i}_{j}\). Define \(\tilde{J}\subset\mathbb{K}[y]\) in the analogous way. Let \(\tilde {\mathcal{A}} = \{e_{1}, \ldots, e_{r} \}\) be the standard unit vectors in \(\mathbb{N}^{r}\). By construction, \(\tilde{I}\) and \(\tilde{J}\) are homogeneous with respect to the grading induced by \(\deg(x^{i}_{j}) = \deg(y^{i}_{k}) = e_{i}\). Consequently \(\tilde{I}\) is the subideal of

*I*generated by all \(\tilde{\mathcal{A}}\)-homogeneous elements. This property could also be used to define \(\tilde{I}\). Hence \(\tilde{I} \subseteq I\) and similarly \(\tilde{J} \subseteq J\).

### Definition 4.1

The ideal \(\tilde{I} \times_{\tilde{\mathcal{A}}}\tilde{J}\) is the *associated codimension zero toric fiber product* to \(I \times_{\mathcal{A}}J\).

*e*

_{i}is the

*i*th basis vector of \(\mathbb{Z}^{r}\). Define vector configurations

To describe generators of the toric ideal \(I_{\mathcal{B}\times _{\mathcal{A}}\mathcal{C}}\), we first relate them to Markov bases, via the fundamental theorem [6]. Let \(A \in \mathbb{Z}^{d \times n}\) be a matrix, which defines a toric ideal \(I_{A} = \left\langle p^{\mathbf{u}}- p^{\mathbf{v}}: A \mathbf{u}= A \mathbf{v}\right\rangle \subset \mathbb{K}[p_{1},\dots,p_{n}]\). Hence, binomial generators of *I*_{A} correspond to elements in ker*A*. The matrix *A* defines an \(\mathbb{N}\)-linear map \(\mathbb{N}^{n} \to\mathbb{Z}^{d}\) whose image is the affine semigroup \(\mathbb{N}A\). Let \(\mathbf{b}\in\mathbb{N}A\). The *fiber* of **b** is the set \(A^{-1}[\mathbf{b} ] := \{ \mathbf{u}\in\mathbb{N}^{n} : A \mathbf{u}= \mathbf{b}\}\). Let \(\mathcal{F} \subseteq\ker A\). For each \(\mathbf{b}\in\mathbb{N}A\) we associate a graph \(A^{-1}[\mathbf {b}]_{\mathcal{F}}\), with vertex set consisting of all lattice points in *A*^{−1}[**b**] and an edge between **u**,**v**∈*A*^{−1}[**b**] if either **u**−**v** or \(\mathbf{v}- \mathbf{u}\in\mathcal{F} \). A finite subset \(\mathcal{F}\subseteq\ker A\) is a *Markov basis* of *A* if the graph \(A^{-1}[\mathbf{b}]_{\mathcal{F}}\) is connected for each \(\mathbf {b}\in\mathbb{N}A\). The fundamental theorem of Markov bases connects these lattice-based definitions with the generators of the toric ideal *I*_{A}.

### Theorem 4.2

(Fundamental Theorem of Markov Bases [6])

*A finite subset*\(\mathcal{F}\subseteq\ker A\)*is a Markov basis of**A**if and only if the set of binomials*\(\{ p^{\mathbf{f}^{+}} - p^{\mathbf{f}^{-}} : \mathbf{f}\in\mathcal{F}\}\)*generates I*_{A}.

### 4.1 Codimension zero toric fiber products

*i*

_{1},…

*i*

_{n}} equals the multiset of indices \(\{i'_{1}, \ldots i'_{n} \}\). So after rearranging the rows of the tableau, we can assume that we have the following form:

*k*

_{1},…,

*k*

_{n}be a collection of indices such that \(z^{i_{t}}_{j_{t}k_{t}}\) is a variable in \(\mathbb{K}[z]\) for each

*t*. Construct the new polynomial

*k*

_{1},…,

*k*

_{n}. Similarly, for a collection of binomials \(\mathcal{G} \subseteq J_{\mathcal{C}}\), we can define \({\rm Lift} (\mathcal{G})\).

### Theorem 4.3

(Codimension zero toric fiber products, [34])

*Let*\(I_{\mathcal{B}} \subseteq\mathbb{K}[x]\)

*and*\(J_{\mathcal{C}} \subseteq\mathbb{K}[y]\)

*be homogeneous with respect to the grading by*\(\mathcal{A}\),

*and suppose that*\(\mathcal{A}\)

*is linearly independent*.

*Let*\(\mathcal{F}\subseteq I_{\mathcal{B}}\)

*and*\(\mathcal {G}\subseteq J_{\mathcal{C}}\)

*be binomial generating sets*.

*Then*

*is a generating set of the codimension zero toric fiber product*\(I_{\mathcal{B}} \times_{\mathcal{A}}J_{\mathcal{C}}\).

### 4.2 The compatible projection property

*n*, written in tableau notation as

*f*agrees with the first column of the leading and trailing monomial of

*g*, respectively. In this situation, we define \(\operatorname {glue}(f,g)\) to be the binomial

*ϕ*

_{xw}and

*ϕ*

_{yw}by In general, we define the gluing operation on pairs of binomials \(f \in I_{\mathcal{B}}\) and \(g \in J_{\mathcal{C}}\) such that \(\phi_{xw}(f) = w^{\mathbf {v}_{1}}(w^{\mathbf{u}_{1}} - w^{\mathbf{u}_{2}})\) and \(\phi_{yw}(g) = w^{\mathbf{v}_{2}}(w^{\mathbf{u}_{1}} - w^{\mathbf {u}_{2}})\). The binomial part in both products are assumed to be the same, and we say that

*f*and

*g*are

*compatible*. Furthermore, we can assume that \(\gcd(w^{\mathbf{v}_{1}}, w^{\mathbf{v}_{2}}) = 1\), by not factoring the polynomials completely.

Define \(L(w^{\mathbf{v}_{2}})\) to be the set of all monomials *x*^{v} in \(\mathbb{K} [x]\) such that \(\phi_{xw}(x^{\mathbf{v}}) = w^{\mathbf{v}_{2}}\). Similarly, define \(R(w^{\mathbf{v} _{1}})\) to be the set of monomials *y*^{v} in \(\mathbb{K}[y]\) such that \(\phi _{yw}(y^{\mathbf{v}}) = w^{\mathbf{v}_{1}}\). By construction if \(x^{\mathbf{v}} \in L(w^{\mathbf{v}_{2}})\) and \(y^{\mathbf{v}'} \in R(w^{\mathbf{v}_{1}})\) then *x*^{v}*f* and *y*^{v′}*g*, when written as tableaux and after reordering rows, have exactly the same first column. Thus, we can form the binomial \(\operatorname {glue}(x^{\mathbf{v}}f, y^{\mathbf{v}'} g)\).

### Definition 4.4

*glued binomials*are The set of exponent vectors of binomials in \(\operatorname {Glue}(\mathcal{F}, \mathcal{G})\) is \(\operatorname {\mathbf {Glue}}(\mathcal{F}, \mathcal{G})\).

### Proposition 4.5

*If*\(\mathcal{F}\subseteq I_{\mathcal{B}}\)

*and*\(\mathcal{G}\subseteq J_{\mathcal{C}}\)

*are sets of binomials then*

### Proof

*ϕ*

_{zx}and

*ϕ*

_{zy}are the \(\mathbb {K}\)-algebra homomorphisms For any \(\operatorname {glue}(x^{\mathbf{v}}f, y^{\mathbf{v}'} g)\) where \(f \in I_{\mathcal{B}}\) and \(g \in J_{\mathcal{C}}\), we have \(\phi_{zx}( \operatorname {glue}(x^{\mathbf{v}}f, y^{\mathbf{v}'} g) ) = x^{\mathbf{v}}f \in I_{\mathcal{B}}\), and \(\phi_{zy}( \operatorname {glue}(x^{\mathbf{v}}f, y^{\mathbf{v}'} g) ) = y^{\mathbf{v}'} g \in J_{\mathcal{C}}\). □

Consider the natural \(\mathbb{N}\)-linear projection maps \(\gamma: \mathbb{N} ^{\mathcal{B} \times_{\mathcal{A}}\mathcal{C}} \to\mathbb{N}^{r}, \gamma(e^{i}_{jk}) = e_{i}\), \(\gamma_{1} : \mathbb {N}^{\mathcal{B}} \rightarrow \mathbb{N}^{r}, \gamma_{1}( e^{i}_{j}) = e_{i}\), and \(\gamma_{2}: \mathbb{N}^{\mathcal{C}}\rightarrow\mathbb{N}^{r}, \gamma_{2}(e^{i}_{k}) = e_{i}\). These projections evaluate the additional multidegrees appearing in the definition of the associated codimension zero product. They are also defined on the fibers \(\mathcal{B}^{-1}[\mathbf{b}]\) and \(\mathcal{C}^{-1}[\mathbf{c}]\) and the graphs \(\mathcal{B} ^{-1}[\mathbf{b}]_{\mathcal{F}}\) and \(\mathcal{C}^{-1}[\mathbf{c}]_{\mathcal{G}}\). Note that if \(\mathbf{f}\in\ker\mathcal{B}\) then \(\gamma_{1}(\mathbf{f}) \in\ker\mathcal{A}\), and similarly for *γ*, and *γ*_{2}.

### Definition 4.6

Let \(\mathcal{F}\subseteq\ker\mathcal{B}\). The graph \(\gamma_{1}( \mathcal{B} ^{-1}[\mathbf{b} ]_{\mathcal{F}})\) has vertex set \(\gamma_{1}(\mathcal{B}^{-1}[\mathbf{b}])\) and an edge between **u**′ and **v**′ if there are \(\mathbf{u}, \mathbf{v}\in\mathcal {B}^{-1}[\mathbf{b}]\) such that **u** and **v** are connected by an edge in \(\mathcal{B}^{-1}[\mathbf {b}]_{\mathcal{F}}\) and *γ*_{1}(**u**)=**u**′ and *γ*_{1}(**v**)=**v**′. Similarly define the graphs \(\gamma_{2}( \mathcal{C}^{-1}[\mathbf{c}]_{\mathcal{G}})\) and \(\gamma((\mathcal {B}\times_{\mathcal{A}}\mathcal{C})^{-1}[ (\mathbf{b},\mathbf{c})]_{\mathcal{H}})\) where \(\mathcal{G}\subseteq \ker\mathcal{C}\) and \(\mathcal{H} \subseteq \ker\mathcal{B}\times_{\mathcal{A}}\mathcal{C}\). These are the *projection graphs*.

Given two graphs *G* and *H* with overlapping vertex sets, their intersection *G*∩*H* is the graph with vertex set *V*(*G*)∩*V*(*H*) and edge set *E*(*G*)∩*E*(*H*).

### Definition 4.7

*compatible projection property*if for all \(\mathbf{b}\in\mathbb{N}\mathcal{B}\) and \(\mathbf{c}\in\mathbb {N}\mathcal{C}\) such that

*π*

_{1}(

**b**)=

*π*

_{2}(

**c**), the graph

The next lemma is the main technical result allowing us to produce generating sets for toric fiber products.

### Lemma 4.8

*Let*\(\mathcal{F}\subseteq\ker\mathcal{B}\)

*and*\(\mathcal {G}\subseteq\ker\mathcal{C}\).

*Let*\(\mathbf{b} \in\mathbb{N}\mathcal{B}\)

*and*\(\mathbf{c}\in\mathbb{N}\mathcal {C}\)

*such that*

*π*

_{1}(

**b**)=

*π*

_{2}(

**c**).

*Then*

### Proof

- 1.
\(V(\gamma( (\mathcal{B}\times_{\mathcal{A}}\mathcal {C})^{-1}[ (\mathbf{b}, \mathbf{c})]_{{\operatorname {\mathbf {Glue}}}(\mathcal{F} ,\mathcal{G})})) = V(\gamma_{1}( \mathcal{B}^{-1}[\mathbf {b}]_{\mathcal{F}}) ) \cap V(\gamma_{2}( \mathcal{C}^{-1}[\mathbf{c}]_{\mathcal{G}}))\),

- 2.
\(E(\gamma( (\mathcal{B}\times_{\mathcal{A}}\mathcal {C})^{-1}[ (\mathbf{b}, \mathbf{c})]_{{\operatorname {\mathbf {Glue}}}(\mathcal{F} ,\mathcal{G})})) = E( \gamma_{1}( \mathcal{B}^{-1}[\mathbf {b}]_{\mathcal{F}}) ) \cap E(\gamma_{2}( \mathcal{C}^{-1}[\mathbf{c}]_{\mathcal{G}}))\).

*γ*(

**u**)=

*γ*

_{1}(

*π*

_{zx}(

**u**)). Similarly,

*γ*(

**u**)=

*γ*

_{2}(

*π*

_{zy}(

**u**)). Furthermore, if

**u**and

**u**′ are connected by an edge corresponding to the binomial \(\operatorname {glue}(x^{\mathbf{v}}f, y^{\mathbf{v}'}g) \in \operatorname {glue}(\mathcal{F}, \mathcal{G})\) then

*π*

_{zx}(

**u**) and

*π*

_{zx}(

**u**′) are connected by

**f**, and

*π*

_{zy}(

**u**) and

*π*

_{zy}(

**u**′) are connected by

**g**, where \(f = x^{\mathbf{f}^{+}} - x^{\mathbf{f}^{-}}\) and \(g = y^{\mathbf{g}^{+}} - y^{\mathbf{g}^{-}}\).

*Proof of part (1)* We must show that if **d** is in both \(\gamma_{1}( \mathcal {B}^{-1}[\mathbf{b} ]_{\mathcal{F}} )\) and \(\gamma_{2}( \mathcal{C}^{-1}[\mathbf{c}]_{\mathcal{G}})\) then \(\mathbf {d}\in\gamma( (\mathcal{B} \times_{\mathcal{A}} \mathcal{C})^{-1}[ (\mathbf{b}, \mathbf{c})]_{{\operatorname {\mathbf {Glue}}}(\mathcal {F},\mathcal{G})})\). By assumption there are \(\mathbf{u}_{1} \in\mathcal{B}^{-1}[\mathbf{b}]\) and \(\mathbf{u}_{2} \in\mathcal{C}^{-1}[\mathbf{c}]\) such that *γ*_{1}(**u**_{1})=*γ*_{2}(**u**_{2})=**d**. Since *π*_{1}(**b**)=*π*_{2}(**c**) and *γ*_{1}(**u**_{1})=*γ*_{2}(**u**_{2}) the corresponding monomials \(x^{\mathbf{u}_{1}}\) and \(y^{\mathbf{u}_{2}}\) have the same \(\tilde{\mathcal{A}}\) degree. Since \(\tilde {\mathcal{A}}\) is linearly independent, the monomial \(x^{\mathbf{u}_{1}} y^{\mathbf{u}_{2}} \in\mathbb{K}[x] \otimes_{\mathbb{K}} \mathbb{K}[y]\) is in the image of \(\phi_{I_{\tilde{\mathcal{B}}}, J_{\tilde {\mathcal{C} }}}\). Let *z*^{u} be a monomial such that \((\tilde{\mathcal{B}} \times _{\tilde{\mathcal{A}}}\tilde{\mathcal{C} })\mathbf{u}= (\mathbf{b}, \mathbf{c}, \mathbf{d})\) and hence \((\mathcal{B}\times_{\mathcal {A}}\mathcal{C})\mathbf{u}= (\mathbf{b}, \mathbf{c})\). But this implies \(\mathbf{d}\in\gamma( (\mathcal{B}\times_{\mathcal{A}}\mathcal {C})^{-1}[ (\mathbf{b}, \mathbf{c})]_{{\operatorname {\mathbf {Glue}}}(\mathcal{F} ,\mathcal{G})})\).

*Proof of part (2)* Suppose that **d** and **e** are both in \(\gamma_{1}( \mathcal{B} ^{-1}[\mathbf{b} ]_{\mathcal{F}}) \) and \(\gamma_{2}( \mathcal{C}^{-1}[\mathbf{c}]_{\mathcal{G}})\), and they are connected by an edge. We must show that **d** and **e** are connected by an edge in \(\gamma( (\mathcal{B}\times_{\mathcal{A}} \mathcal{C})^{-1}[ (\mathbf{b}, \mathbf{c})]_{{\operatorname {\mathbf {Glue}}}(\mathcal {F},\mathcal{G})})\). To do this, we must show that there are **w**_{1} and \(\mathbf{w}_{2} \in(\mathcal {B}\times_{\mathcal{A}}\mathcal{C} )^{-1}[(\mathbf{b}, \mathbf{c})]\), with *γ*(**w**_{1})=**d** and *γ*(**w**_{2})=**e** such that \(\mathbf{w}_{1} - \mathbf{w}_{2} \in{ \operatorname {\mathbf {Glue}}}(\mathcal{F}, \mathcal{G})\).

Since there is an edge in \(\gamma_{1}( \mathcal{B}^{-1}[\mathbf {b}]_{\mathcal{F}})\) between **d** and **e**, there exist **u**_{1} and **u**_{2} in \(\mathcal{B}^{-1}[\mathbf{b}]\) such that *γ*_{1}(**u**_{1})=**d**, *γ*_{1}(**u**_{2})=**e** and \(\mathbf{u}_{1} - \mathbf{u} _{2} = \mathbf{f}\in \mathcal{F}\). Similarly, there are **v**_{1} and \(\mathbf{v}_{2} \in\mathcal{C} ^{-1}[\mathbf{c}]\) such that *γ*_{2}(**v**_{1})=**d**, *γ*_{2}(**v**_{2})=**e** and \(\mathbf{v}_{1} - \mathbf{v} _{2} = \mathbf{g} \in\mathcal{G}\). By part (1), there exists \(\mathbf{w}_{1} \in (\mathcal{B}\times_{\mathcal{A}}\mathcal{C} )^{-1}[(\mathbf{b}, \mathbf{c})] \) which projects to (**u**_{1},**v**_{1}) and \(\mathbf{w}_{2} \in (\mathcal{B} \times_{\mathcal{A}} \mathcal{C})^{-1}[(\mathbf{b}, \mathbf{c})]\) which projects to (**u**_{2},**v**_{2}). There are many choices for **w**_{1} and **w**_{2}. We claim that we can choose them so that \(\mathbf{w}_{1} - \mathbf{w}_{2} \in{ \operatorname {\mathbf {Glue}}}(\mathcal{F}, \mathcal {G})\), which completes the proof.

**u**

_{1},

**u**

_{2},

**v**

_{1}, and

**v**

_{2}take. Writing

**u**

_{1}−

**u**

_{2}and

**v**

_{1}−

**v**

_{2}as tableaux in block form we have

*I*,

*J*,

*K*are multisets here, not ideals. The first two blocks of rows in the tableaux for

**u**

_{1}−

**u**

_{2}give the support of this difference. This corresponds to the binomial

*f*. The last block of rows corresponds to the part where the vectors agree, and hence is the same in both

**u**

_{1}and

**u**

_{2}. Similarly, the first two blocks of rows in the tableaux for

**v**

_{1}−

**v**

_{2}give the support of this difference. This corresponds to the binomial

*g*. The last block of rows corresponds to the part where the vectors agree, and hence is the same in both

**v**

_{1}and

**v**

_{2}.

The first block of rows in both **u**_{1}−**u**_{2} and **v**_{1}−**v**_{2}, have the same *I*_{1} and \(I_{1}'\) because these blocks correspond to the common binomial \((w^{\mathbf{s}_{1}} - w^{\mathbf{s}_{2}})\) in \(\phi_{xw}(f) = w^{\mathbf{r} _{1}}(w^{\mathbf{s}_{1}} - w^{\mathbf{s}_{2}})\) and \(\phi_{yw}(g) = w^{\mathbf{r}_{2}}(w^{\mathbf {s}_{1}} - w^{\mathbf{s}_{2}})\). Note that this corresponds to **d**−**e**. This implies that in the second and third blocks of rows of **u**_{1} and of **u**_{2} we have exactly the same multisets of indices in the first column. This explains why *I*_{2} and *I*_{3} appear in both the **u**_{1} and the **u**_{2} tableaux. A similar argument shows that \(I_{2}^{*}\) and \(I_{3}^{*}\) should appear in both **v**_{1} and **v**_{2}. Finally, we must have that the multiset of indices that appear in *I*_{2} and *I*_{3} together equals the multiset of indices that appear in \(I_{2}^{*}\) and \(I_{3}^{*}\) together. By our usual assumption that \(\gcd( w^{\mathbf{r}_{1}}, w^{\mathbf{r} _{2}}) = 1\), we see that the multisets *I*_{2} and \(I_{2}^{*}\) are disjoint. This implies that, as multisets, \(I_{2} \subseteq I_{3}^{*}\) and \(I_{2}^{*} \subseteq I_{3}\).

*M*is chosen so that the rows of [

*I*

_{2}

*M*] are a multi-subset of the rows of \([I_{3}^{*} \ K_{3}]\), and

*N*is chosen so that the rows of \([I_{2}^{*} \ N]\) are a multi-subset of the rows of [

*I*

_{3}

*J*

_{3}]. By construction \(h \in{ \operatorname {\mathbf {Glue}}}(\mathcal{F}, \mathcal{G})\) since the

*x*monomial corresponding to \([I_{2}^{*} \ N]\) belongs to \(L( w^{\mathbf{r}_{2}})\) and the

*y*monomial corresponding to [

*I*

_{2}

*M*] belongs to \(R(w^{\mathbf{r}_{1}})\).

**w**

_{1}and

**w**

_{2}, since there might be leftover indices from the last blocks of rows of

**u**

_{1}−

**u**

_{2}and

**v**

_{1}−

**v**

_{2}. Call these remaining rows: [

*I*

*J*]−[

*I*

*J*] in the first case, and [

*I*

*K*]−[

*I*

*K*] in the second. Note that we have the same multiset of indices

*I*in both, since we have extracted

*I*

_{2}and \(I_{2}^{*}\) from both the pair

*I*

_{2}and

*I*

_{3}and the pair \(I_{2}^{*}\) and \(I_{3}^{*}\), which had the same multiset of indices. This means, finally, that we have

**w**

_{1}and

**w**

_{2}in tableau notation as:

*π*

_{zx}(

**w**

_{1})=

**u**

_{1}and

*π*

_{zy}(

**w**

_{1})=

**v**

_{1}, this implies

*γ*(

**w**

_{1})=

**d**. Similarly,

*γ*(

**w**

_{2})=

**e**. Finally, by construction

**w**

_{1}and

**w**

_{2}are connected by the move

*h*, which is in \({\operatorname {\mathbf {Glue}}}(\mathcal{F}, \mathcal{G})\). This completes the proof since now

*γ*and showing that the image graph is connected (using Lemma 4.8), we deduce that the entire graph is connected.

### Theorem 4.9

*Let*\(\mathcal{H}\subset\ker\tilde{\mathcal{B}}\times_{\tilde {\mathcal{A}}}\tilde{\mathcal{C}}\)*be a Markov basis for the associated codimension zero toric fiber product*. *Let*\(\mathcal{F} \subseteq\ker \mathcal{B}\)*and*\(\mathcal{G}\subseteq\ker\mathcal{C}\). *Then*\(\mathcal{H}\cup{ \operatorname {\mathbf {Glue}}}(\mathcal{F}, \mathcal{G})\)*is a Markov basis for*\(\mathcal{B}\times_{\mathcal {A}}\mathcal{C}\)*if and only if*\(\mathcal{F} \)*and*\(\mathcal{G}\)*have the compatible projection property*.

### Proof

We must show that for any \((\mathbf{b}, \mathbf{c}) \in\mathbb{N}( \mathcal{B}\times_{\mathcal{A}}\mathcal{C})\) the graph \((\mathcal{B}\times_{\mathcal{A}}\mathcal{C})^{-1}[ (\mathbf{b}, \mathbf{c})]_{ \mathcal{H}\cup{ \operatorname {\mathbf {Glue}}}(\mathcal{F}, \mathcal{G})}\) is connected. For each \(\mathbf{d}\in\mathbb{N}\mathcal{D}\) consider the subgraph of \((\mathcal{B} \times_{\mathcal{A}}\mathcal{C})^{-1}[ (\mathbf{b}, \mathbf{c})]_{ \mathcal{H}\cup{ \operatorname {\mathbf {Glue}}}(\mathcal{F}, \mathcal{G} )}\) whose vertices consist of all \((\mathbf{u}, \mathbf{v}) \in(\mathcal {B}\times_{\mathcal{A}}\mathcal{C})^{-1}[ (\mathbf{b}, \mathbf{c})]\) such that *γ*_{1}(**u**)=*γ*_{2}(**v**)=**d**. This is precisely the set \(\tilde{\mathcal{B}} \times_{\tilde{\mathcal{A}}}\tilde {\mathcal{C}}^{-1}[ (\mathbf{b}, \mathbf{c}, \mathbf{d} )]\). This subgraph is connected since \(\mathcal{H}\) is a Markov basis for \(\tilde {\mathcal{B}} \times_{\tilde{\mathcal{A}}} \tilde{\mathcal{C}}\). The graph \(\gamma( (\mathcal{B}\times _{\mathcal{A}}\mathcal{C})^{-1}[ (\mathbf{b}, \mathbf{c})]_{ \mathcal{H}\cup \operatorname {\mathbf {Glue}}(\mathcal{F}, \mathcal{G})})\) equals the graph \(\gamma( (\mathcal{B} \times_{\mathcal{A}} \mathcal{C})^{-1}[ (\mathbf{b}, \mathbf{c})]_{\operatorname {\mathbf {Glue}}(\mathcal{F}, \mathcal{G})})\) because \(\mathcal{H}\) is contained in the kernel of the projection *γ*. This graph is connected since \(\mathcal{F}\) and \(\mathcal{G}\) have the compatible projection property and by Lemma 4.8. But if the image of a map of graphs is connected and each fiber is connected, then the graph itself is connected, which completes the proof of the if direction.

Conversely, if every fiber is connected, the graph \((\mathcal{B}\times _{\mathcal{A}}\mathcal{C})^{-1}[ (\mathbf{b}, \mathbf{c})]_{ \mathcal{H}\cup{ \operatorname {\mathbf {Glue}}}(\mathcal{F}, \mathcal{G})}\) is connected, so the graph \(\gamma( (\mathcal{B}\times_{\mathcal{A}}\mathcal{C})^{-1}[ (\mathbf{b}, \mathbf{c})]_{\operatorname {\mathbf {Glue}}(\mathcal{F}, \mathcal{G} )})\) is connected. By Lemma 4.8, this equals \(\gamma_{1}( \mathcal{B}^{-1}[\mathbf{b}]_{\mathcal{F}}) \cap\gamma_{2}( \mathcal {C}^{-1}[\mathbf{c}]_{\mathcal{G}})\) so that \(\mathcal{F}\) and \(\mathcal{G}\) have the compatible projection property. □

Theorem 4.9 gives an explicit way to construct a Markov basis for \(\mathcal{B} \times_{\mathcal{A}}\mathcal{C}\). However, there remains a serious difficulty in finding sets \(\mathcal{F} \subset\ker\mathcal{B}\) and \(\mathcal{G}\subset\ker\mathcal{C}\) which have the compatible projection property. In general, it is not true that \(\mathcal{F}\) and \(\mathcal{G} \) can be arbitrary Markov bases of \(\mathcal{B}\) and \(\mathcal{C}\).

### 4.3 Slow-varying Markov bases

In the remainder of the section, we describe the *slow-varying* condition (generalizing [11]) which, if the codimension is one, can be used to show that a given pair of Markov bases satisfies the compatible projection property.

### Definition 4.10

Suppose that \(\mathcal{B}\times_{\mathcal{A}}\mathcal{C}\) is a codimension one toric fiber product. Let \(\mathbf{h}\in\mathbb{Z}^{r}\) be non-zero. Let \(\mathcal {F}\subseteq\ker \mathcal{B}\) and \(\mathcal{G}\subseteq\ker\mathcal{C}\). Then \(\mathcal{F}\) and \(\mathcal{G}\) are *slow-varying* with respect to **h** if for all \(\mathbf {f}\in\mathcal{F}\), *γ*_{1}(**f**)=0, or ±**h**; and for all \(\mathbf{g}\in\mathcal{G}\), *γ*_{2}(**g**)=0 or ±**h**.

### Proposition 4.11

*Let***h***generate*\(\ker\mathcal{A}\). *If the maximum* 1-*norm of any element in*\(\mathcal{F}\)*or*\(\mathcal{G}\)*is less than* 2∥**h**∥_{1}, *then*\(\mathcal{F}\)*and*\(\mathcal{G}\)*are slow*-*varying with respect to***h**.

### Proof

Since *γ*_{1}(**f**) must be a multiple of **h** and ∥*γ*_{1}(**f**)∥_{1}≤∥**f**∥_{1}, if ∥**f**∥_{1}<2∥**h**∥_{1} then *γ*_{1}(**f**) is either 0 or ±**h**. A similar statement holds for *γ*_{2}(**g**). □

### Theorem 4.12

*Suppose that*\(\mathcal{B}\times_{\mathcal{A}}\mathcal{C}\)*is a codimension one toric fiber product*. *Let*\(\mathcal{H}\)*be a Markov basis for*\(\tilde{\mathcal{B}} \times _{\tilde{\mathcal{A}}}\tilde{\mathcal{C}}\). *Let*\(\mathcal{F}\)*and*\(\mathcal{G}\)*be Markov bases for*\(\mathcal{B}\)*and*\(\mathcal {C}\)*that are slow*-*varying with respect to*\(\mathbf{h}\in\ker\mathcal{A}\). *Then*\(\mathcal{H}\cup \operatorname {\mathbf {Glue}}(\mathcal{F}, \mathcal{G} )\)*is a Markov basis for*\(\mathcal{B}\times_{\mathcal{A}}\mathcal{C}\).

### Proof

Since the toric fiber product is codimension one, the vertex sets of the graphs \(\gamma_{1}(\mathcal{B}^{-1}[\mathbf{b}]_{\mathcal{F}})\) and \(\gamma _{2}( \mathcal{C}^{-1}[\mathbf{c} ]_{\mathcal{G}})\) are subsets of the lattice \(\mathbb{Z}\mathbf{h}\). Since \(\mathcal{F}\) and \(\mathcal{G}\) are Markov bases, these graphs are connected. By the slow-varying condition, the edges connect two points whose difference is ±**h**. Hence the graphs \(\gamma_{1}( \mathcal{B} ^{-1}[\mathbf{b} ]_{\mathcal{F}})\) and \(\gamma_{2}( \mathcal{C}^{-1}[\mathbf{c}]_{\mathcal{G}})\) are intervals of ordered points. The intersection of two such graphs is another graph of the same type, and is also connected. Thus \(\mathcal{F}\) and \(\mathcal{G}\) have the compatible projection property and Theorem 4.9 then implies that \(\mathcal{H}\cup{ \operatorname {\mathbf {Glue}}}(\mathcal{F}, \mathcal{G})\) is a Markov basis for \(\mathcal{B}\times_{\mathcal{A}}\mathcal{C}\). □

*γ*

_{1}(

*f*)=0,±

**h**,±2

**h**and every \(g \in\mathcal{G}\) satisfies

*γ*

_{2}(

*g*)=0,±

**h**,±2

**h**, but there are elements

*h*in the Markov basis for \(\mathcal{B}\times_{\mathcal{A}}\mathcal{C}\), with

*γ*(

*h*)=

*m*

**h**for

*m*large. The problem is illustrated by Fig. 3, which would require augmenting the sets \(\mathcal{F}\) and \(\mathcal{G}\) with some elements that had

*γ*

_{1}(

*f*)=

*γ*

_{2}(

*g*)=±3

**h**to guarantee the compatible projections property.

## 5 Application: Markov bases for hierarchical models

Let *Γ* be a simplicial complex with vertex set *V*, and let \(d \in \mathbb{Z}^{V}_{\geq2}\) a vector of integers. These data define a hierarchical model as in Sect. 1.1, and hence a toric ideal *I*_{Γ,d}. For any homogeneous ideal *I*, let *μ*(*I*) denote the largest degree of a minimal generator of *I*, which is an invariant of the ideal. This is a coarse measure of the complexity of the ideal *I*. If *Γ* is a graph and *d*_{v}=2 for all *v*∈*V*, *μ*(*I*_{Γ,d}), is an invariant of *Γ* dubbed the *Markov width* in [5]. We calculate *μ*(*Γ*,*d*):=*μ*(*I*_{Γ,d}) for certain simplicial complexes *Γ* and vectors *d*. The results of Sect. 4 are also useful to explicitly construct Markov bases of these hierarchical models.

*I*

_{Γ,d}is the toric ideal of a matrix

*A*

_{Γ,d}with columns indexed by elements

*i*∈D

_{V}. Each column is given by the formula

*S*⊂

*V*, let

*Γ*

_{S}denote the induced subcomplex on

*S*(that is,

*Γ*

_{S}={

*F*∈

*Γ*:

*F*⊆

*S*}). The matrix \(A_{\varGamma_{S}, d_{S}}\) induces a grading on

*I*

_{Γ,d}by \(\deg (p_{i}) = (A_{\varGamma_{S}, d_{S}})_{i_{S}}\). This grading is the

*S-grading*.

### Proposition 5.1

*Let*

*Γ*

*be a simplicial complex with*

*Γ*=

*Γ*

_{1}∪

*Γ*

_{2},

*where the vertex set of*

*Γ*

_{1}

*and*

*Γ*

_{2}

*are*

*V*

_{1}

*and*

*V*

_{2},

*respectively*.

*Let*

*S*=

*V*

_{1}∩

*V*

_{2}

*and suppose that*

*Γ*

_{1}∩

*Γ*

_{2}=(

*Γ*

_{1})

_{S}=(

*Γ*

_{2})

_{S}.

*Then*

### Proof

*A*

_{Γ,d}. For

*i*∈D

_{V}let \(\mathbf{b}_{i_{V_{1}}}\) be the column of \(A_{\varGamma_{1}, d_{V_{1}}}\) indexed by \(i_{V_{1}}\). Similarly, define \(\mathbf{c} _{i_{V_{2}}}\), and \(\mathbf{a}_{i_{S}}\) as the appropriate columns of \(A_{\varGamma_{2}, d_{V_{2}}}\) and \(A_{\varGamma_{S}, d_{S}}\), respectively. For

*l*=1,2, let \(\pi_{l} : \mathbb{R}^{\mathrm{D}_{V_{l}}} \rightarrow\mathbb{R}^{\mathrm {D}_{S}}\) be the linear projections induced by the grading that gives \(\deg p_{i_{V_{1}}} = \deg p_{i_{V_{2}}} = \mathbf{a} _{i_{S}}\). The toric fiber product of vector configurations is

*F*appears in both

*Γ*

_{1}and

*Γ*

_{2}, we can delete one of the corresponding collections of rows of \(A_{\varGamma_{1}, d_{V_{1}}} \times_{A_{\varGamma_{S}, d_{S}}} A_{\varGamma_{2}, d_{V_{2}}} \), without changing the kernel of the matrix, and hence the toric ideal. After eliminating repeats, we precisely have the matrix of

*A*

_{Γ,d}. □

*Γ*,

*d*) is given by the formula

*Γ*

_{S}=2

^{S}, and is a codimension one toric fiber product if and only if

*Γ*

_{S}=2

^{S}∖{

*S*} and

*d*

_{s}=2 for all

*s*∈

*S*.

### Proposition 5.2

*Let*

*Γ*

*be a simplicial complex with*

*Γ*=

*Γ*

_{1}∪

*Γ*

_{2},

*where the vertex set of*

*Γ*

_{1}

*and*

*Γ*

_{2}

*are*

*V*

_{1}

*and*

*V*

_{2},

*respectively*,

*and*

*Γ*

_{1}∩

*Γ*

_{2}=(

*Γ*

_{1})

_{S}=(

*Γ*

_{2})

_{S}.

*Let*\(\tilde{\varGamma} = \varGamma\cup 2^{[S]}\),

*and similarly*\(\tilde{\varGamma}_{1} = \varGamma_{1} \cup2^{[S]}\)

*and*\(\tilde{\varGamma}_{2} = \varGamma_{2} \cup2^{[S]}\).

*Then*

### Proof

*I*

_{Γ,d}, the construction of \(\tilde{I}_{\varGamma,d}\) gives \(I_{\tilde{\varGamma},d}\). Since

*I*

_{Γ,d}is the kernel of a ring homomorphism, the construction of

*F*⊆

*S*, since this does not change the kernel of the homomorphism. But then, this is precisely the parameterization associated with \(\tilde{\varGamma}\). □

### 5.1 Small examples

*d*

_{v}=2 for all

*v*∈

*V*. To this end, let \(\bf2\) be the vector every coordinate of which is equal to 2. We illustrate the constructions Quad, Lift, and Glue for small hierarchical models. Tableaux for binomials in hierarchical models have one column for each

*i*∈

*V*(and as always one row per variable appearing in a monomial). For example, we represent the binomial

*p*

_{111}

*p*

_{122}

*p*

_{212}

*p*

_{221}−

*p*

_{112}

*p*

_{121}

*p*

_{211}

*p*

_{222}as the tableau:

### Lemma 5.3

- (1)
*Let**S*_{V}=2^{V}∖{*V*},*be the boundary of a*(#*V*−1)-*dimensional simplex*.*Then*\(I_{S_{V}, {\bf2}}\)*is generated by a single binomial*:$$\prod_{i \in\mathrm{D}_{V}: \| i \|_{1} \mathrm{even}} p_{i} - \prod _{i \in\mathrm{D} _{V}: \| i \|_{1} \mathrm{odd}} p_{i}. $$ - (2)
*Let**Γ**be a simplicial complex on**V*,*let*$${\rm cone}_{v}(\varGamma) = \varGamma\cup\bigl\{F \cup\{v\} : F \in\varGamma \bigr\} $$*be the cone over**Γ**with apex**v*,*and let*\(\mathcal{F}\)*be a*(*minimal*)*generating set of I*_{Γ,d}.*Then*\(I_{{\rm cone}_{v}(\varGamma), d_{V \cup\{v\}}}\)*is*(*minimally*)*generated by*

### Proof

(1) According to the dimension formula (4), \(I_{S_{V}, {\bf 2}}\) is generated by a single equation. The proof of (4) in [16] shows that the given binomial generates the ideal.

(2) This follows because one can rearrange the rows and columns of \(A_{{\rm cone}_{v}(\varGamma), d_{V \cup\{v\}}}\) so that it is a block diagonal matrix with *d*_{v} diagonal blocks with the matrix *A*_{Γ,d} along the diagonal. This decomposition appears in [17]. □

### Example 5.4

(Binary four-cycle)

*C*be a four-cycle with edges 12,13,24,34. The cycle decomposes as the union of two paths with edges 12,13 and 24,34. With

*V*

_{1}={1,2,3} and

*V*

_{2}={2,3,4}, \(I_{C, {\bf2}}\) is the toric fiber product of \(I_{C_{V_{1}}, {\bf2}}\) and \(I_{C_{V_{2}}, {\bf2}}\). According to Lemma 5.3, the Markov basis of a path of length three with edges 12,13, consists of the two elements

**h**for the complex of two isolated vertices is

*Γ*=

*C*∪{{2,3}}, two triangles glued along an edge. It produces four quadratic elements of \({\rm Quad}\):

Similar arguments and the description of Markov bases of small cycles in Lemma 5.9 can be used to get an explicit description of Markov bases of the four-cycles that appear in Example 1.2. We can also produce analogous results for higher dimensional complexes.

### Theorem 5.5

*Let**B*_{n}*be the simplicial complex with vertex set* [*n*+2] *and minimal non*-*faces* [*n*] *and *{*n*+1,*n*+2}. *The ideal*\(I_{B_{n}, {\bf2}}\)*has a generating set consisting of binomials of degrees* 2,2^{n−1}, *and* 2^{n}.

### Proof

For *i*=1,2 let *Γ*_{i} be the cone *B*_{n}∖(*n*+*i*) over the boundary of the simplex on [*n*]. Then *B*_{n}=*Γ*_{1}∪*Γ*_{2}. According to part (1) of Lemma 5.3 the Markov basis of \(I_{\varGamma_{1} \cap \varGamma_{2} , {\bf2}}\) consists of a single element of degree 2^{n−1}; and according to part (2) the ideals \(I_{\varGamma_{i}, {\bf2}}\) are each generated by two binomials of degree 2^{n−1}. Since 2^{n−1}<2×2^{n−1}, by Proposition 4.11, the Markov bases for \(I_{\varGamma_{1}, {\bf2}}\) and \(I_{\varGamma_{2}, {\bf2}}\) are slow-varying with respect to the Markov basis of \(I_{\varGamma_{1} \cap\varGamma_{2} , {\bf2}}\). The set of glue moves consists of 4 binomials of degree 2^{n−1}.

The simplicial complex \(\tilde{\varGamma}\) appearing in the associated codimension zero toric fiber product has [*n*] as an additional face. Consequently it consists of the boundaries of two (*n*−1)-dimensional simplices that share a single facet. By part (1) of Lemma 5.3, the Markov basis of the boundary of an (*n*−1)-dimensional simplex consists of a single element of degree 2^{n}. The lifting operation preserves degree and produces \(2^{2^{n}}\) elements per boundary simplex, for a total of \(2^{2^{n} +1}\) elements of degree 2^{n}. Finally, there are 2^{n} quadrics in \({\rm Quad}\). Theorem 4.12 shows that the union of all these elements is a Markov basis. □

The simplicial complex *B*_{n} is the boundary of the polytope that is a bipyramid over a simplex. In particular, it is a simplicial sphere. Theorem 5.5 and the results of [28] provide evidence for the following conjecture.

### Conjecture 5.6

*Let**Γ**be a triangulation of a sphere of dimension n*. *Then the Markov basis of*\(I_{\varGamma, {\bf2}}\)*consists of elements of degree at most* 2^{n+1}.

To conclude this section, we give an example which shows how the gluing operation can produce Markov basis elements of larger degree than either of the constituent binomials.

### Example 5.7

*G*be the graph with vertex set [5] and all edges except 1–5, and assume that \(d = {\bf2}\). Thus,

*G*consists of two

*K*

_{4}graphs glued along an empty triangle. The Markov basis for

*K*

_{4}consists of 20 elements of degree four and 40 elements of degree six. The overlap triangle is the boundary of a simplex, whose Markov basis consists of a single element of degree four. Since 6<2×4, by Proposition 4.11 the Markov bases of each of the

*K*

_{4}are slow-varying. Consider the following two binomials in the ideal of

*K*

_{4}:

*K*

_{4}on vertex set {1,2,3,4} and the second one from the

*K*

_{4}on vertex set {2,3,4,5}. In the columns corresponding to {2,3,4} they agree in the first four rows and disagree in the last two rows. This means that upon gluing these sextics, we produce moves of degree 4+2+2=8. In particular we get

### 5.2 Cycles and ring graphs

In this subsection, and the next, *Γ*=*G* is a graph. We start with cycles and graphs that can be easily constructed from cycles, then explore *K*_{4}-minor free graphs, providing a new proof of the main result in [21]. To set up induction we provide the Markov bases of simple graphs.

### Lemma 5.8

*Let**P**be a path and*\(d\in\mathbb{Z}^{V}_{\geq2}\)*arbitrary*, *then**μ*(*P*,*d*)=2.

### Proof

This follows from Theorem 4.3 or the results on decomposable simplicial complexes in [8, 37]. □

### Lemma 5.9

(Small Graphs)

- (1)
*Let**K*_{3}*be the triangle*.*The following table contains known values of**μ*(*K*_{3},*d*):$$\begin{array}{c@{\quad }|@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} d_1 & 2 & 3 & 3 & 3 & 3 & 4 \\ d_2 & p & 3 & 3 & 3 & 4 & 4 \\ d_3 & q & 3 & 4 & q \geq5 & 4 & 4 \\ \hline \mu(I_{K_{3},d}) & \min(2p,2q) & 6 & 8 & 10 & 12 & 14 \ \\ \end{array} $$ - (2)
*If**C**is a four*-*cycle with edges*12,23,34,41,*then**μ*(*C*,*d*)*takes the following values*:$$\begin{array}{c@{\quad }|@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} d_1 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 3 \\ d_2 & 2 & 2 & 2 & 2 & 2 & 2 & 3 & 3\\ d_3 & 3 & 3 & 3 & 4 & 4 & 5 & 3 & 3\\ d_4 & 3 & 4 & 5 & 4 & 5 & 5 & 3 & 3\\ \hline \mu(C,d) & 6 & 6 & 6 & 8 & 8 & 10 & 6 & 6 \\ \end{array} $$ - (3)
*If**C**is a five*-*cycle with edges*12,23,34,45,51,*d*_{1}=*d*_{2}=2,*and**d*_{3}=*d*_{4}=*d*_{5}=3,*then**μ*(*C*,*d*)=6. - (4)
*Let**K*_{2,3}*be the complete bipartite graph on*{1,2}*and*{3,4,5}.*If**d*_{1}=*d*_{2}=3*and**d*_{3}=*d*_{4}=*d*_{5}=2,*then**μ*(*K*_{2,3},*d*)=6. - (5)
*The complete graph**K*_{4}*with*\(d = {\bf2}\)*satisfies**μ*(*K*_{4},**2**)=6.

### Proof

The computation for *K*_{3} with *d*=(2,*p*,*q*) is contained in the original work of Diaconis and Sturmfels [6]. The values for *d*=(3,3,*q*) were determined by Aoki and Takemura [2]. All other values have been computed using 4ti2 and Markov bases are available on the Markov Basis Database [19]. □

### Lemma 5.10

*Let*

*G*

*be a graph*,

*and*

*V*

_{1},

*V*

_{2}⊆

*V*

*such that*

*V*

_{1}∪

*V*

_{2}=

*V*, \(G = G_{V_{1}} \cup G_{V_{2}}\)

*and either*

*V*

_{1}∩

*V*

_{2}={

*u*}

*or*

*V*

_{1}∩

*V*

_{2}={

*u*,

*v*}

*with*

*uv*

*an edge of G*.

*Then*

### Proof

In either case *I*_{G,d} is a codimension zero toric fiber product and Theorem 4.3 applies. The statement also follows from results on reducible hierarchical model in [9, 16, 34]. □

### Lemma 5.11

*Let*

*G*

*be a graph*,

*and*

*V*

_{1},

*V*

_{2}⊆

*V*

*such that*

*V*

_{1}∪

*V*

_{2}=

*V*, \(G = G_{V_{1}} \cup G_{V_{2}}\)

*and*

*V*

_{1}∩

*V*

_{2}={

*u*,

*v*}

*where*

*uv*

*is not an edge of*

*G*,

*and suppose that*

*d*

_{u}=

*d*

_{v}=2.

*Further suppose that*\(\mu(G_{V_{1}}, d_{V_{1}}) = \mu (G_{V_{2}}, d_{V_{2}}) = 2\).

*Then*

### Proof

*d*

_{u}=

*d*

_{v}=2, the dimension formula (4) implies that this is a codimension one toric fiber product. The toric ideal of the graph consisting of two isolated nodes, and

*d*

_{u}=

*d*

_{v}=2 is generated by a single quadratic binomial, by Lemma 5.3. Furthermore, the fact that \(\mu(G_{V_{1}}, d_{V_{1}}) = \mu(G_{V_{2}}, d_{V_{2}}) = 2\), and that hierarchical models have no Markov basis elements of degree one, implies that the Markov bases of \(I_{G_{V_{1}},d_{V_{1}}}\) and \(I_{G_{V_{2}},d_{V_{2}}}\) are slow-varying, by Proposition 4.11. Hence Theorem 4.12 shows that the Markov basis of

*I*

_{G,d}consists of the glued elements of the Markov bases of \(I_{G_{V_{1}},d_{V_{1}}}\) and \(I_{G_{V_{2}},d_{V_{2}}}\), together with the Markov basis of the associated codimension zero toric fiber product, which is

### Lemma 5.12

*Let*

*C*

*be a cycle with vertex set*

*V*

*and*\(d\in\mathbb{Z}^{V}_{\geq2}\).

- (1)
*If**C**contains no edge**uv**with**d*_{u},*d*_{v}>2*then**μ*(*C*,*d*)=4. - (2)
*If all**d*_{v}≤3*and**C**contains no path**u*_{1}*u*_{2}*u*_{3}*u*_{4}*with all*\(d_{u_{i}}>2\),*then**μ*(*C*,*d*)≤6. - (3)
*If all**d*_{v}≤4*and**C**contains no path**u*_{1}*u*_{2}*u*_{3}*with all*\(d_{u_{i}}>2\),*then**μ*(*C*,*d*)≤8. - (4)
*If all**d*_{v}≤5*and**C**contains no path**u*_{1}*u*_{2}*u*_{3}*with all*\(d_{u_{i}}>2\),*then**μ*(*C*,*d*)≤10.

### Proof

We give a detailed proof of (1). According to Lemma 5.9 the statement holds for cycles of length three. We proceed by induction on the length of *C*. There are always two non-adjacent vertices *u* and *v* in *C* with *d*_{u}=*d*_{v}=2. Let *V*_{1} be the set of vertices on one of the paths in *C* from *u* to *v*, and let *V*_{2} be the set of vertices on the other path. According to Lemma 5.8 the Markov width of paths is two. By induction we find \(\mu(G_{V_{1}}\cup\, uv, d_{V_{1}}) = 4\) and \(\mu(G_{V_{2}} \cup\, uv, d_{V_{2}}) = 4\), since those graphs are shorter cycles than *C* satisfying the conditions in (1). By Lemma 5.11, the Markov width of *μ*(*C*,*d*)=4. Statements (2)–(4) follow by the same inductive argument and reducing to the small graphs in Lemma 5.9. □

Cycles can be patched together to form larger graph classes, for example ring graphs.

### Definition 5.13

A *ring graph* is a graph that can be recursively constructed from paths and cycles by disjoint unions, identifying a vertex of disjoint components, and identifying edges on disjoint components. An *outerplanar graph* is a graph with a planar embedding such that all vertices are on a circle.

Outerplanar graphs are also characterized as the largest minor closed class that excludes *K*_{4} and *K*_{2,3}. This in particular implies that all outerplanar graphs are series-parallel since they have no *K*_{4}-minors. It is easy to see that outerplanar graphs are ring graphs. Recall that a graph is *k-connected* if there is no way to disconnect it by removing at most *k*−1 vertices. We need to describe how to decompose 2-connected ring graphs into cycles.

### Definition 5.14

*cycle decomposition*of a 2-connected ring graph

*G*is a sequence

*C*

_{1},

*C*

_{2},…,

*C*

_{k}of cycles in

*G*such that

the union of all

*C*_{i}is*G*, andthe intersection of

*C*_{1}∪⋯∪*C*_{i}and*C*_{i+1}is an edge for 1≤*i*<*k*.

Any 2-connected ring graph must have a cycle decomposition, since a 2-connected ring graph is obtained by only identifying edges in disjoint components.

### Theorem 5.15

*Let*

*G*

*be a ring graph whose maximal*2-

*connected subgraphs are*

*G*

_{1},

*G*

_{2},…,

*G*

_{l}

*and assume that*\(C_{1}^{i}, C_{2}^{i}, \ldots, C_{k_{i}}^{i}\)

*is a cycle decomposition of*

*G*

_{i}

*for all*1≤

*i*≤

*l*.

*If for all*\(C=C^{i}_{j}\),

- (1)
*there is no edge**uv**in**C**with**d*_{u},*d*_{v}>2*then**μ*(*G*,*d*)≤4; - (2)
*all**d*_{v}≤3*and there is no path**u*_{1}*u*_{2}*u*_{3}*u*_{4}*in**C**with all*\(d_{u_{i}}>2\),*then**μ*(*G*,*d*)≤6; - (3)
*all**d*_{v}≤4*and there is no path**u*_{1}*u*_{2}*u*_{3}*in**C**with all*\(d_{u_{i}}>2\),*then**μ*(*G*,*d*)≤8; - (4)
*all**d*_{v}≤5*and there is no path**u*_{1}*u*_{2}*u*_{3}*in**C**with all*\(d_{u_{i}}>2\),*then**μ*(*G*,*d*)≤10.

### Proof

This follows directly from Lemma 5.8, Lemma 5.10, and Lemma 5.12. □

### Definition 5.16

A graph *G* is *Markov slim*, if for every independent set *I* of *G* the model with *d*_{v}≥2 for *v*∈*I* and *d*_{v}=2 for *v*∈*V*(*G*)∖*I* has Markov width at most four.

### Theorem 5.17

*The maximal minor*-*closed class of Markov slim graphs is the outerplanar graphs*.

### Proof

By Theorem 5.15 the outerplanar graphs are Markov slim since they are ring graphs. Say that there is a minor closed class larger than the outerplanar graphs, in which every graph is Markov slim. Then this class either contains *K*_{4} or *K*_{2,3}. By parts (4) and (5) of Lemma 5.9 neither *K*_{4} nor *K*_{2,3} are Markov slim. □

Repeated toric fiber products of cycles reduce computations of the Markov width to the three cycle. Therefore the following conjecture seems natural.

### Conjecture 5.18

*Let*

*C*

*be a cycle of length*

*n*,

*with edges*12,23,…,

*n*1.

*Then the Markov width*

*μ*(

*C*,

*d*)

*equals*

*where the indices*

*i*,

*i*+1,

*i*+2

*are considered cyclically modulo n*.

Our results so far only work with codimension one toric fiber products, which do not raise the degree of generators in the cycle case, and hence we always glued paths at a pair of vertices *u*,*v* where *d*_{u}=*d*_{v}=2. It is not clear whether or not this remains true for larger values of *d*_{u},*d*_{v}.

### 5.3 Binary series-parallel graphs

To prove Theorem 1.1 we apply a classical decomposition of *K*_{4}-minor free graphs.

### Definition 5.19

*SP*of

*connected series-parallel graphs*is the smallest collection of graphs satisfying the following properties.

Each graph

*G*∈*SP*has two distinguished vertices, the top and the bottom vertex, which are different.The graph

*K*_{2}is in*SP*.- If
*G*_{1}and*G*_{2}are in*SP*with tops and bottoms*t*_{1},*t*_{2},*b*_{1},*b*_{2}, respectively, then- Series construction
the graph obtained from

*G*_{1}and*G*_{2}by identifying*t*_{1}and*b*_{2}and calling*b*_{1}and*t*_{2}the new bottom and top also belongs to*SP*;- Parallel construction
the graph obtained form

*G*_{1}and*G*_{2}by identifying*t*_{1}and*t*_{2}and*b*_{1}and*b*_{2}(and calling these the new top and bottom) is also in*SP*.

In a graph without *K*_{4}-minors, every 2-connected component is a series-parallel graph (see [7, Chap. 7]). Since gluing two graphs at a vertex is a codimension zero toric fiber product, to prove Theorem 1.1, we can restrict to series-parallel graphs. One tool is the following lemma about choices that can be made in the parallel construction.

### Lemma 5.20

*Suppose that**G*∈*SP**has at least four vertices*. *Then**G**can be obtained by series or parallel construction from two graphs**G*_{1}*and**G*_{2}*each with fewer vertices than G*.

### Proof

The series construction of *G*_{1} and *G*_{2} clearly produces a graph *G* with a larger number of vertices. For the parallel construction, if both *G*_{1} and *G*_{2} are not single edges then their parallel construction has more vertices than either *G*_{1} or *G*_{2}. The only non-trivial case is when one of the two graphs, say *G*_{1}, is a single edge.

We can assume *G*_{2} is neither a path of one or two edges, nor *K*_{3}, since then the resulting graph would have less than three vertices. The graph *G*_{2} is obtained either by a series or by a parallel construction from two graphs *G*_{3} and *G*_{4}. In the case of a parallel construction, consider new graphs \(\tilde{G_{3}}\) and \(\tilde{G_{4}}\) with an edge glued in from *t* to *b* in both cases. The resulting parallel construction of \(\tilde{G_{3}}\) and \(\tilde{G_{4}}\) gives the same graph as the parallel construction of *G*_{1} and *G*_{2}. In the case of a series construction, one of the graphs *G*_{3} or *G*_{4} has ≥3 vertices. Assume that graph is *G*_{4}. A series construction of *G*_{1} with *G*_{3} followed by a parallel construction of the result with *G*_{4} gives the original graph. We may have to rearrange the tops and bottoms during this construction, but doing so does not change the property of being a series-parallel graph. □

### Theorem 5.21

*If*

*G*

*is a connected series*-

*parallel graph with top*

*t*

*and bottom b*,

*then*\(\mu(G, {\bf2}) = 4\)

*and a Markov basis of*\(I_{G, {\bf2}}\)

*can be chosen to consist of*:

- (1)
*Degree four binomials whose terms have the same degree on the**bt**subcomplex*. - (2)
*Degree two binomials that are slow*-*varying on the**bt**subcomplex*.

### Proof

We proceed by induction on the number of vertices of the graph. The statement is trivially true for connected series-parallel graphs with one or two vertices, since they have empty Markov basis. There are two graphs with three vertices to consider. For the triangle \(I_{K_{3}, {\bf2}}\) there is one degree four generator and it must project to the zero polynomial along the *bt* edge, since that edge belongs to *K*_{3}. In the case of the path with three vertices, there are two quadratic generators, which are slow-varying by Proposition 4.11.

Now let *G* be a series-parallel graph with at least four vertices. By Lemma 5.20 it can be built from two graphs *G*_{1} and *G*_{2} with strictly smaller numbers of vertices by either a series or a parallel construction. We must show that properties (1) and (2) of the Markov basis are preserved under either of these constructions.

*G*is obtained from

*G*

_{1}and

*G*

_{2}by a series construction. There are three types of generators that arise. The generators are given by:

- Lift 1
lifting generators from \(I_{G_{1}, {\bf2}}\) while being constant on

*G*_{2};- Lift 2
lifting generators from \(I_{G_{2}, {\bf2}}\) while being constant on

*G*_{1};- Quad
quadratic moves.

*bt*edge are constant. The crucial idea is that the degree four generators all come from three-cycles, since we are always only using series or parallel construction. The quartic generator for \(I_{K_{3}, {\bf2}}\) is

*K*

_{3}and performing a sequence of lifts. The pair

*bt*cannot go from an added vertex to the third vertex of the underlying

*K*

_{3}, otherwise we would be able to construct graphs that have

*K*

_{4}as a minor. Thus,

*b*and

*t*belong to the gluing edge, or a subset of the lifted vertices. However, by construction of the lift operation, the binomial projects to zero when restricted to such a subset of vertices.

If *G* is obtained from a parallel construction of *G*_{1} and *G*_{2}, then the top and bottom vertices can be adjacent or not. If they are adjacent, then we are gluing along an edge. All generators of \(I_{G_{1}, {\bf2}}\) and \(I_{G_{2}, {\bf 2}}\) project to zero along this edge by properties of the lift operation. If the special vertices are not adjacent, we have a codimension one toric fiber product. The associated codimension zero product consists of series-parallel graphs with fewer vertices. By the argument in the preceding paragraphs, all Markov basis elements obtained from the associated codimension zero toric fiber product satisfies either (1) or (2). Finally, consider \({\operatorname {\mathbf {Glue}}}(\mathcal{F}, \mathcal{G})\). Since all Markov bases satisfy (1) and (2), we only ever glue quadrics, producing more quadrics, which are slow-varying by Proposition 4.11. □

Instead of using binary variables for the triangle in the proof, one could have used larger values of *d*_{v} on the vertex of the triangle that is never involved in gluing or identification. This would have given an alternative but less descriptive proof of Theorem 5.15. The procedure yields a larger class than ring graphs, but it is not true that larger *d*_{v} on independent sets always produce Markov width four, as illustrated earlier by the fact that *K*_{2,3} is not Markov slim.

There are further applications of higher codimension toric fiber products in algebraic statistics lurking. For example, ideals of graph homomorphisms [12] generalize classes of toric ideals in algebraic statistics. Given graphs *G* and *H*, potentially with loops, the ideal of graph homomorphisms from *G* to *H* is *I*_{G→H}. In this language, binary hierarchical models arise as the special case where \(H = K_{2}^{o}\) is the complete graph with loops. If *H* is an edge with one loop, then the homomorphisms from *G* to *H* correspond to the independent sets of *G*. It is known that *I*_{G→H} is quadratically generated if *G* is bipartite, or becomes bipartite after the removal of one vertex [12]. Using Theorem 5.21 as a template, one derives that *I*_{G→H} is quadratically generated for series-parallel *G*.

Some toric ideals are not toric fiber products themselves, but project to one. With control over the projection one may be able to find a Markov basis anyway. An Example is Norén’s proof of a conjecture by Haws, Martin del Campo, Takemura, and Yoshida [26].

## 6 Application: conditional independence ideals

A basic problem in the algebraic study of conditional independence is to understand primary decompositions of CI-ideals. For instance, if a conditional independence model comes from a graph, the minimal primes provide information about families of probability distributions that satisfy the conditional independence constraints but do not factorize according to the graph. Moreover, primary decompositions can provide information about the connectivity of random walks using Markov subbases [20].

In this section *J* is the generic letter denoting an ideal. This is to avoid confusion between the ideals *I*_{G} of Sect. 5 and the CI-ideals *J*_{G} in Sect. 6.2. The results in this section are independent of *d*=(*d*_{v})_{v∈V}, the vector of cardinalities. It is fixed arbitrarily and does not appear in the notation.

We first develop a general theory for arbitrary conditional independence models. Then we apply it to global Markov ideals of graphs, showing that they are toric fiber products if the graph has a decomposition along a clique.

*A*,

*B*,

*C*be three pairwise disjoint subsets of

*V*, and

*D*:=

*V*∖(

*A*∪

*B*∪

*C*). If

*D*≠∅, then \(p_{i_{A}i_{B}i_{C}+} \mathrel{\mathop{:}}=\sum_{i_{D} \in\mathrm{D}_{D}} p_{i_{A}i_{B}i_{C}i_{D}}\). The

*conditional independence (CI) ideal*Open image in new window is An argument similar to that in Sect. 1.2 shows that this ideal is prime. For a collection of CI-statements, the CI-ideal is the sum of the ideals of its statements:

In statistics one is usually not interested in all of the variety of a CI-ideal, but only its intersection with the set of probability distributions. The following properties of CI-ideals imply well-known properties of conditional independence.

### Proposition 6.1

*The following ideal containments hold*:

Open image in new window (

*symmetry*);Open image in new window (

*decomposition*);Open image in new window (

*weak union*).

### 6.1 Toric fiber products of CI-models

Let \(\mathcal{M}_{1}, \mathcal{M}_{2}\) be conditional independence models on two (not necessarily disjoint) sets of variables *V*_{1},*V*_{2}, respectively. The CI-ideals \(J_{\mathcal{M}_{1}}\) and \(J_{\mathcal{M}_{2}}\) live in polynomial rings with variables indexed by \(\mathrm{D}_{V_{1}}\), and \(\mathrm{D}_{V_{2}}\), respectively. Their toric fiber product is again a CI-ideal when certain conditions are satisfied. Our aim is to define the toric fiber product of \(J_{\mathcal{M}_{1}}\) and \(J_{\mathcal{M}_{2}}\) combinatorially, using CI-statements.

### Definition 6.2

(The *S*-grading)

Let *S*⊂*V*. The grading on the polynomial ring \(\mathbb{K}[p_{i} : i \in \mathrm{D}_{V}]\) given by \(\deg(p_{i}) = e_{i_{S}} \in\mathbb {Z}^{\mathrm{D}_{S}}\) is the *S-grading*. The conditional independence model \(\mathcal{M}\) is *S-homogeneous* if each statement Open image in new window in \(\mathcal{M}\) satisfies either *S*⊆*A*∪*C* or *S*⊆*B*∪*C*.

### Lemma 6.3

*If*\(\mathcal{M}\)*is**S*-*homogeneous then*\(J_{\mathcal{M}}\)*is homogeneous in the**S*-*grading*.

### Proof

*D*=

*V*∖(

*A*∪

*B*∪

*C*). The polynomial

*S*∩

*D*≠∅ since expressions like \(p_{i_{A}i_{B}i_{C}+}\) involve sums over terms with different

*D*-degrees. Assuming that

*S*∩

*D*=∅, the degree of all terms in the polynomial \(p_{i_{A}i_{B}i_{C}+}p_{j_{A}j_{B}i_{C}+}\) is \(e_{i_{A \cap S} i_{B\cap S} i_{C \cap S}} + e_{j_{A \cap S} j_{B\cap S} i_{C \cap S}}\). The degree of all terms in \(p_{i_{A}j_{B}i_{C}+}p_{i_{A}j_{B}i_{C}+}\) is \(e_{i_{A \cap S} j_{B\cap S} i_{C \cap S}} + e_{j_{A \cap S} i_{B\cap S} i_{C \cap S}}\). These two degrees are equal if and only if

*S*⊆

*A*∪

*C*or

*S*⊆

*B*∪

*C*. □

### Example 6.4

(Homogeneity with respect to the *S*-grading)

*S*-grading. In contrast, the polynomial for Open image in new window,

*e*

_{1}+

*e*

_{2}.

The following example shows how redundant statements can seemingly complicate the situation and why it is advantageous to work with minimal sets of CI-statements defining a given CI-ideal. However, solving the conditional independence implication problem is difficult in general [14].

### Example 6.5

The converse of Lemma 6.3 need not hold. Consider the ideal Open image in new window, which is {1}-homogeneous. By Proposition 6.1 it equals the CI-ideal of Open image in new window which does not satisfy the combinatorial conditions in Lemma 6.3.

*S*-homogeneous conditional independence models \(\mathcal{M}_{1}, \mathcal{M}_{2}\) where

*S*=

*V*

_{1}∩

*V*

_{2}. To this end, consider the statement representing a separating property of

*S*. A second class of statements appearing in the toric fiber product of \(\mathcal{M}_{1}\) and \(\mathcal{M}_{2}\) comes from joining vertices in

*V*

_{2}to statements in \(\mathcal{M}_{1}\) and vice versa. By

*S*-homogeneity and symmetry in Proposition 6.1 we can assume that each statement Open image in new window in \(\mathcal {M}_{1},\mathcal{M}_{2}\) satisfies

*A*∩

*S*=∅ and define The CI-statements in (5) are constructed so that their ideal generators are exactly the lifts of ideal generators associated to the statements in \(\mathcal{M}_{1}\) and \(\mathcal{M}_{2}\). The straightforward definition of \(\operatorname {Lift}\) in the non-binomial case is contained in [34].

### Lemma 6.6

\(J_{\mathcal{L}_{i}} = \langle \operatorname {Lift}(\mathcal{M}_{i}) \rangle\).

### Proof

*D*=

*V*

_{2}∖

*S*. Lifting a polynomial

*i*

_{D},

*j*

_{D}∈D

_{D}, and lifting to:

*i*

_{D},

*j*

_{D}align with the configurations

*i*

_{B}and

*j*

_{B}by our convention that

*S*⊂

*B*∪

*C*. The lift (6) originates from one of the statements in \(\mathcal{L}_{1}\) and every statement there produces generators of the given form. □

### Definition 6.7

*V*

_{1}∪

*V*

_{2}given by all derived statements

*toric fiber product*of \(\mathcal{M}_{1}\) and \(\mathcal {M}_{2}\) along

*S*.

### Theorem 6.8

*For*

*i*=1,2

*let*\(\mathcal {M}_{i}\)

*be an*

*S*-

*homogeneous CI*-

*model where*

*S*=

*V*

_{1}∩

*V*

_{2}.

*If*\(\mathcal{A}\)

*is the linearly independent vector configuration representing the*

*S*-

*grading*,

*then*

### Proof

Homogeneity in the (codimension zero) *S*-grading follows from Lemma 6.3. The generators of the codimension zero toric fiber product on the right hand side consist of Lifts and Quads by [34] and, in the toric case, Sect. 4.1. Since the Quads correspond exactly to the independence statement \(\mathcal {S}\), the theorem is a consequence of Lemma 6.6. □

### Example 6.9

*V*

_{1}={1,2,3,4} and

*V*

_{2}={3,4,5,6}. Let Both \(\mathcal{M}_{1}\) and \(\mathcal{M}_{2}\) are {3,4}-homogeneous. The toric fiber product \(\mathcal{M}_{1} \times_{\{3,4\}} \mathcal{M}_{2}\) is

### 6.2 Graphical conditional independence models

Our main motivation for toric fiber products together of CI-ideals comes from an application to the global Markov condition in graphical models. Let *G* be a simple undirected graph on the vertex set *V*.

### Definition 6.10

### Lemma 6.11

*The global Markov ideal is a binomial ideal*.

### Proof

If a statement is valid on *G* but does not involve all vertices, then it is the consequence of a valid statement that does use all vertices. Indeed, if *v*∈*V*∖(*A*∪*B*∪*C*), then *v* cannot be connected to both *A* and *B* as then *C* would not separate. It is thus connected to at most one of them, say *A*. In this case Open image in new window is a valid statement for *G*. Now use the decomposition property, also valid for CI-ideals, Open image in new window to get the result. □

Assume that we can decompose the vertex set of *G* as *V*=*V*_{1}∪*V*_{2}, so that the induced subgraph on *S*:=*V*_{1}∩*V*_{2} is complete, and any path from *V*_{1} to *V*_{2} passes *S*. In this case *S* is a *separator*. Since a global Markov ideal is binomial it is *S*-homogeneous, and the same holds for the CI-ideals \(J_{G_{1}}\) and \(J_{G_{2}}\), arising from the induced subgraphs on *V*_{1} and *V*_{2}.

### Theorem 6.12

*Let*

*G*

*be a graph with vertex set*

*V*=

*V*

_{1}∪

*V*

_{2}

*and let*

*S*=

*V*

_{1}∩

*V*

_{2}

*be a separator*.

*Let*

*G*

_{1}

*and*

*G*

_{2}

*be the induced subgraphs of*

*G*

*on vertex sets*

*V*

_{1}

*and V*

_{2}.

*Then*

*J*

_{G}

*is the toric fiber product*

*where*\(\mathcal{A}\)

*is the matrix associated to the*

*S*-

*grading*.

### Proof

*G*and thus \(J_{G} \supseteq J_{G_{1}} \times_{\mathcal{A}}J_{G_{2}}\). For the other containment let Open image in new window be an independence statement implied by the global Markov condition on

*G*such that

*A*∪

*B*∪

*C*=

*V*. If

*A*⊆

*V*

_{1}, then Open image in new window is implied by \(\mathcal{L}_{1}\) since is a global Markov statement on

*G*

_{1}. After potentially replacing it by its symmetric version and lifting we find By the weak union property in Proposition 6.1, Open image in new window is contained in \(J_{\mathcal{L}_{1}}\). Note that if

*B*∖(

*V*

_{2}∖

*S*)=∅, then the resulting CI-statement is implied by \(\mathcal{S}\). If

*B*⊂

*V*

_{1},

*A*⊂

*V*

_{2}, or

*B*⊂

*V*

_{2}then Open image in new window is similarly implied by \(\mathcal{L}_{1}\) or \(\mathcal{L}_{2}\).

*A*and

*B*have non-trivial intersection with both

*V*

_{1}∖

*S*and

*V*

_{2}∖

*S*. Since the subgraph induced on

*S*is complete, we can assume that

*A*∩

*S*=∅. Let

*A*

_{i}=

*A*∩

*V*

_{i},

*i*=1,2 and a binomial associated to Open image in new window has the form

*G*, since any path from

*A*

_{1}to

*A*

_{2}must traverse

*S*, and all such paths are blocked either before they get to

*B*∩

*S*, or at

*C*∩

*S*. By the argument in the first paragraph of the proof, the first statement belongs to \(J_{\mathcal{L}_{1}}\) and the second statement belongs to \(J_{\mathcal{L}_{2}}\). Together they imply \(f \in J_{\mathcal{L}_{1}} + J_{\mathcal{L}_{2}}\) since Thus, all binomials from CI-statements implied by

*G*belong to \(J_{G_{1}} \times_{\mathcal{A}} J_{G_{2}}\). □

As an immediate corollary we get the following known result [8, 37].

### Corollary 6.13

*The global Markov ideal of a chordal graph is prime*.

### Proof

A chordal graph decomposes as a product of its maximal cliques. Inductively applying Theorem 6.12 and the fact that the toric fiber product of geometrically prime ideals is geometrically prime, gives the result. □

The following corollary was one of our initial motivations for this section and Theorem 3.1.

### Corollary 6.14

(Primary decompositions of graphical CI-ideals)

*Let**G**be a graph with vertex set**V*=*V*_{1}∪*V*_{2}*with**V*_{1}∩*V*_{2}*a separator in G*. *Let**G*_{1}*and**G*_{2}*be the induced subgraphs on**V*_{1}*and**V*_{2}, *respectively*. *A primary decomposition of**J*_{G}*can be obtained from toric fiber products of the primary components of*\(J_{G_{1}}\)*and *\(J_{G_{2}}\).

As the primary decompositions of the CI-ideals *J*_{G} are unknown for most graphs, we do not know in which situations we can guarantee that the toric fiber products of irredundant primary decompositions of CI-ideals yield an irredundant primary decomposition. In concrete situations Corollary 3.3 and Lemma 3.4 can be used. For instance the primary decomposition of the chain of squares in Example 1.3 is irredundant. Explicit computation shows that none of the eight monomial minimal primes contains all monomials of a given multidegree, and the same holds, of course, for the toric ideal. By Corollary 3.3 the toric fiber products of the prime components yield an irredundant prime decomposition of the ideal of two squares glued along an edge. When gluing the next square the grading is different, but Lemma 3.4 guarantees that the hypothesis of Corollary 3.3 is still fulfilled. Unfortunately this argument cannot be applied to all conditional independence models, as the following example demonstrates.

### Example 6.15

*K*

_{3,2}, labeled such that {1,2,3}, and {4,5} are independent sets. The CI-ideal \(J_{K_{3,2}}\) is radical as a computation with Binomials shows [18]. Consider the edge 1–4. Its induced grading takes values in \(\mathbb{N}^{4}\). The homogeneous elements witness minimal primes

*P*

_{1},

*P*

_{2}with the property that \((P_{1})_{\mathbf{a}} = \mathbb{K}[p]_{\mathbf{a}}\) for all \(\mathbf{a}\in\mathbb{N}\{ e_{12},e_{21}\}\) while \((P_{2})_{\mathbf{a}} = \mathbb{K}[p]_{\mathbf{a}}\) for all \(\mathbf{a}\in\mathbb{N}\{ e_{11},e_{22}\}\). The prime decomposition of the toric fiber product, given by the toric fiber products of the minimal primes of two copies of \(J_{K_{2,3}}\), has a component \(P_{1}\times _{\mathcal{A}} P_{2}\) which equals the maximal ideal of the fiber product’s polynomial ring, and is thus redundant.

## Notes

### Acknowledgements

Alexander Engström gratefully acknowledges support from the Miller Institute for Basic Research in Science at UC Berkeley. Thomas Kahle was supported by an EPDI Fellowship. Seth Sullivant was partially supported by the David and Lucille Packard Foundation and the US National Science Foundation (DMS 0954865).

The authors are happy to thank the Mittag-Leffler institute for hosting them for the final part of this project, during the program on “Algebraic Geometry with a View towards Applications”. Johannes Rauh made valuable comments on an earlier version of the manuscript.

### References

- 1.4ti2 Team: 4ti2—A software package for algebraic, geometric and combinatorial problems on linear spaces. Available at: www.4ti2.de
- 2.Aoki, S., Takemura, A.: Minimal basis for a connected Markov chain over 3×3×
*K*contingency tables with fixed two-dimensional marginals. Aust. N. Z. J. Stat.**45**(2), 229–249 (2003) CrossRefMATHMathSciNetGoogle Scholar - 3.Buczyńska, W.: Phylogenetic toric varieties on graphs. J. Algebr. Comb.
**35**(3), 421–460 (2012) CrossRefGoogle Scholar - 4.Chen, Y., Dinwoodie, I.H., Sullivant, S.: Sequential importance sampling for multiway tables. Ann. Stat.
**34**(1), 523–545 (2006) CrossRefMATHMathSciNetGoogle Scholar - 5.Develin, M., Sullivant, S.: Markov bases of binary graph models. Ann. Comb.
**7**(4), 441–466 (2003) CrossRefMATHMathSciNetGoogle Scholar - 6.Diaconis, P., Sturmfels, B.: Algebraic algorithms for sampling from conditional distributions. Ann. Stat.
**26**(1), 363–397 (1998) CrossRefMATHMathSciNetGoogle Scholar - 7.Diestel, R.: Graph Theory, 3rd edn. Graduate Texts in Mathematics, vol. 173. Springer, Berlin (2005). 411 pp. MATHGoogle Scholar
- 8.Dobra, A.: Markov bases for decomposable graphical models. Bernoulli
**9**(6), 1093–1108 (2003) CrossRefMATHMathSciNetGoogle Scholar - 9.Dobra, A., Sullivant, S.: A divide-and-conquer algorithm for generating Markov bases of multi-way tables. Comput. Stat.
**19**(3), 347–366 (2004) MATHMathSciNetGoogle Scholar - 10.Drton, M., Sturmfels, B., Sullivant, S.: Lectures on Algebraic Statistics. Oberwolfach Seminars, vol. 39. Birkhäuser Verlag, Basel (2009), viii+171 pp. CrossRefMATHGoogle Scholar
- 11.Engström, A.: Cut ideals of
*K*_{4}-minor free graphs are generated by quadrics. Mich. Math. J.**60**(3), 150–714 (2011) CrossRefGoogle Scholar - 12.Engström, A., Norén, P.: Ideals of graph homomorphisms. Ann. Comb.
**17**(1), 71–103 (2013) CrossRefMATHMathSciNetGoogle Scholar - 13.Garcia, L.D., Stillman, M., Sturmfels, B.: Algebraic geometry of Bayesian networks. J. Symb. Comput.
**39**(3–4), 331–355 (2005) CrossRefMATHMathSciNetGoogle Scholar - 14.Geiger, D., Pearl, J.: Logical and algorithmic properties of conditional independence and graphical models. Ann. Stat.
**21**(4), 2001–2021 (1993) CrossRefMATHMathSciNetGoogle Scholar - 15.Hillar, C.J., Sullivant, S.: Finite Gröbner bases in infinite dimensional polynomial rings and applications. Adv. Math.
**229**(1), 1–25 (2012) CrossRefMATHMathSciNetGoogle Scholar - 16.Hosten, S., Sullivant, S.: Gröbner bases and polyhedral geometry of reducible and cyclic models. J. Comb. Theory, Ser. A
**100**(2), 277–301 (2002) CrossRefMATHMathSciNetGoogle Scholar - 17.Hosten, S., Sullivant, S.: A finiteness theorem for Markov bases of hierarchical models. J. Comb. Theory, Ser. A
**114**(2), 311–321 (2007) CrossRefMATHMathSciNetGoogle Scholar - 18.Kahle, T.: Decompositions of binomial ideals. J. Softw. Algebr. Geom.
**4**, 1–5 (2012) MathSciNetGoogle Scholar - 19.Kahle, T., Rauh, J.: Markov bases database. http://markov-bases.de/
- 20.Kahle, T., Rauh, J., Sullivant, S.: Positive margins and primary decomposition. J. Commut. Algebra, in press. arXiv:1201.2591
- 21.Král, D., Norine, S.: Pangrác, O.: Markov bases of binary graph models of
*K*_{4}-minor free graphs. J. Comb. Theory, Ser. A**117**(6), 759–765 (2010) CrossRefMATHGoogle Scholar - 22.Lauritzen, S.L.: Graphical Models. Oxford Statistical Science Series, vol. 17. The Clarendon Press, New York (1996), x+298 pp. Google Scholar
- 23.Manon, C.A.: The algebra of conformal blocks (2009). arXiv:0910.0577
- 24.Michałek, M.: Geometry of phylogenetic group-based models. J. Algebra
**339**, 339–356 (2011) CrossRefMATHMathSciNetGoogle Scholar - 25.Mumford, D., Fogarty, J., Kirwan, F.: Geometric Invariant Theory, 3rd edn. Ergebnisse der Mathematik und ihrer Grenzgebiete (2), vol. 34. Springer, Berlin (1994), xiv+292 pp. CrossRefGoogle Scholar
- 26.Norén, P.: The three-state toric homogeneous Markov chain model has Markov degree two (2012). arXiv:1207.0077
- 27.Ohsugi, H.: Normality of cut polytopes of graphs in a minor closed property. Discrete Math.
**310**(6–7), 1160–1166 (2010) CrossRefMATHMathSciNetGoogle Scholar - 28.Petrović, S., Stokes, E.: Betti numbers of Stanley–Reisner rings determine hierarchical Markov degrees. J. Algebr. Comb. to appear. arXiv:0910.1610
- 29.Robertson, N., Seymour, P.D.: Graph minors. XX. Wagner’s conjecture. J. Comb. Theory, Ser. B
**92**(2), 325–357 (2004) CrossRefMATHMathSciNetGoogle Scholar - 30.Simis, A., Ulrich, B.: On the ideal of an embedded join. J. Algebra
**226**(1), 1–14 (2000) CrossRefMATHMathSciNetGoogle Scholar - 31.Sturmfels, B., Sullivant, S.: Toric geometry of cuts and splits. Mich. Math. J.
**57**, 689–709 (2008) CrossRefMATHMathSciNetGoogle Scholar - 32.Sturmfels, B., Welker, V.: Commutative algebra of statistical ranking. J. Algebra
**361**, 264–286 (2012) CrossRefMATHMathSciNetGoogle Scholar - 33.Sullivant, S.: Normal binary graph models. Ann. Inst. Stat. Math.
**64**(4), 717–726 (2010) CrossRefMathSciNetGoogle Scholar - 34.Sullivant, S.: Toric fiber products. J. Algebra
**316**(2), 560–577 (2007) CrossRefMATHMathSciNetGoogle Scholar - 35.Swanson, I., Huneke, C.: Integral Closure of Ideals, Rings, and Modules. LMS Lecture Note Series. Cambridge University Press, Cambridge (2006) MATHGoogle Scholar
- 36.Takemura, A., Thomas, P., Yoshida, R.: Holes in semigroups and their applications to the two-way common diagonal effect model. In: Proceedings of the 2008 International Conference on Information Theory and Statistical Learning, ITSL 2008, pp. 67–72. CSREA Press, Las Vegas (2008) Google Scholar
- 37.Takken, A.: Monte Carlo goodness-of-fit tests for discrete data. Ph.D. dissertation, Dept. Statistics, Stanford Univ. (2000) Google Scholar
- 38.Tousi, M., Yassemi, S.: Tensor products of some special rings. J. Algebra
**268**(2), 672–676 (2003) CrossRefMATHMathSciNetGoogle Scholar