1 Introduction

Let \(S = K[x_1,\ldots ,x_n]\) be a standard graded polynomial ring over an arbitrary field K. Let G be a simple graph with vertex set \(V=\{x_1,\ldots ,x_n\}\) and edge set E(G). By abuse of notation, we also use \(x_ix_j\) to denote an edge \(\{x_i,x_j\}\) of G. Assume that \(\textbf{w}:E(G)\rightarrow {{\,\mathrm{\mathbb {Z}}\,}}_{>0}\) is a weight function on edges of G. The edge ideal of the edge-weighted graph \((G,\textbf{w})\) is defined by

$$I(G,\textbf{w}) = \left( (x_i x_j)^{\textbf{w}(x_ix_j)} \mid \{i,j\}\in E(G) \right) \subseteq S.$$

In particular, if every edge of G has weight one then \(I(G,{\textbf {w}})\) becomes the usual edge ideal I(G).

Paulsen and Sather-Wagstaff introduced edge ideals of edge-weighted graphs in [13]. In this work, the authors described a primary decomposition of \(I(G,\textbf{w})\) and studied the Cohen–Macaulay property of \(I(G,\textbf{w})\) when the underlying graph G is a cycle, a tree, or a complete graph. A graph G (resp. \((G,\textbf{w})\)) is said to be Cohen–Macaulay if I(G) (resp. \(I(G,\textbf{w})\)) is. In particular, they proved that \(I(G,\textbf{w})\) is Cohen–Macaulay for all weight functions \(\textbf{w}\) when G is a complete graph. In our first main result, we prove the converse of this result.

Theorem 1.1

Let G be a simple graph. The following statements are equivalent:

  1. (1)

    \(I(G,\textbf{w})\) is Cohen–Macaulay for all weight functions \(\textbf{w}\);

  2. (2)

    \(I(G,\textbf{w})\) is Cohen–Macaulay for all weight functions \(\textbf{w}\) such that \(\textbf{w}(x_ix_j)\in \{1,2\}\) for all edges \(x_i x_j \in E(G)\);

  3. (3)

    G is a disjoint union of finitely many complete graphs.

A Cohen–Macaulay ideal is unmixed, but the converse is not true in general even when I is the edge ideal of a simple graph. Fakhari, Shibata, Terai and Yassemi [3] proved that the unmixed property and the Cohen–Macaulay property of \(I(G,\textbf{w})\) are equivalent when G is a very well-covered graph and characterize all weight functions \(\textbf{w}\) for which \(I(G,\textbf{w})\) are unmixed. In this context, Terai [16] proposed the following conjecture

Conjecter

(Terai) Let G be a Cohen–Macaulay very well-covered graph. Then \(I(G,\textbf{w})\) is sequentially Cohen–Macaulay for all weight functions \(\textbf{w}\).

We first recall the definition of sequentially Cohen–Macaulay modules over S.

Definition 1

Let M be a graded module over S. We say that M is sequentially Cohen–Macaulay if there exists a filtration

$$0 = M_0\subset M_1 \subset \cdots \subset M_r = M$$

of M by graded S-modules such that \(\dim (M_i/M_{i-1}) <\dim (M_{i+1}/M_i)\) for all i, where \(\dim \) denotes Krull dimension, and \(M_i/M_{i-1}\) is Cohen–Macaulay for all i. An ideal J is said to be sequentially Cohen–Macaulay if S/J is a sequentially Cohen–Macaulay S-module. A graph G (resp. \((G,\textbf{w})\)) is said to be sequentially Cohen–Macaulay if I(G) (resp. \(I(G,\textbf{w})\)) is.

The notion of sequentially Cohen–Macaulay was introduced by Stanley [14] as a generalization of the Cohen–Macaulay property in connection with the work of Björner and Wachs on nonpure shellability [1, 2]. When J is a sequentially Cohen–Macaulay ideal, it is well known that J is Cohen–Macaulay if and only if J is unmixed.

In motivation to study the conjecture of Terai, we classify graphs for which \((G,\textbf{w})\) are sequentially Cohen–Macaulay for all weight functions \(\textbf{w}\). To introduce our result, we first define a special class of simple graphs that contain 5 cycles and chordal graphs. A chordless cycle \(C_t\) of length t is a cycle with no chord \(\{i,j\}\) for \(j\ne i+1\). Equivalently, the induced graph of G on \(\{1,\ldots , t\}\) is the cycle on t vertices.

Definition 2

A simple graph G is said to be a Woodroofe graph if G has no chordless cycles of length other than 3 or 5.

Woodroofe [19] proved that a Woodroofe graph is vertex-decomposable. So, it is sequentially Cohen–Macaulay. Our second main result of this paper states that Woodroofe graphs are precisely graphs for which \((G,\textbf{w})\) are sequentially Cohen–Macaulay for all weight functions \(\textbf{w}\).

Theorem 1.2

Let G be a simple graph. The following statements are equivalent:

  1. (1)

    \(I(G,\textbf{w})\) is sequentially Cohen–Macaulay for all weight functions \(\textbf{w}\);

  2. (2)

    \(I(G,\textbf{w})\) is sequentially Cohen–Macaulay for all weight functions \(\textbf{w}\) such that \(\textbf{w}(x_ix_j)\in \{1,2\}\) for all edges \(x_i x_j \in E(G)\);

  3. (3)

    G is a Woodroofe graph.

To prove Theorem 1.2, we use the result of Jafari and Sabzrou [11] stating that a monomial ideal I is sequentially Cohen–Macaulay if and only if the associated radicals \(\sqrt{I:u}\) are sequentially Cohen–Macaulay for all monomials \(u \notin I\). We then deduce Theorem 1.1.

Now, we explain the organization of the paper. In Sect. 2, we prove Theorem 1.2 and provide counterexamples to Terai’s conjecture. In Sect. 3, we give some applications of Theorem 1.2; in particular, we prove Theorem 1.1.

2 Sequentially Cohen–Macaulay edge-weighted graphs

Throughout the paper, we denote \(S = K[x_1,\ldots , x_n]\) a standard graded polynomial ring over a field K. Let \(\mathfrak {m}= (x_1,\ldots , x_n)\) be the maximal homogeneous ideal of S. We first recall some notation and results.

For a finitely generated graded S-module L, the depth of L is defined to be

$${{\,\textrm{depth}\,}}(L) = \min \{i \mid H_{\mathfrak {m}}^i(L) \ne 0\},$$

where \(H^{i}_{\mathfrak {m}}(L)\) denotes the ith local cohomology module of L with respect to \(\mathfrak {m}\).

Hochster [9] proved that for a monomial ideal I, one has

$$\begin{aligned} {{\,\textrm{depth}\,}}(S/I) = \min \{ {{\,\textrm{depth}\,}}(S/\sqrt{I:u}) \mid u \text { is a monomial in } S, u\not \in I\}. \end{aligned}$$
(1)

An ideal of the form \(\sqrt{I:u}\) is called an associated radical of I. The associated radicals of a monomial ideal I also play an important role in studying the (sequentially) Cohen–Macaulay property and the regularity of I [11, 12]. First, we compute the associated radicals of edge ideals of edge-weighted graphs.

Let G denote a finite simple graph over the vertex set \(V(G)= \{x_1,x_2,\ldots ,x_n\}\) and the edge set E(G). A subgraph \(H=G[W]\) is called an induced subgraph of G on \(W\subset V(G)\) if for any vertices \(u,v\in W\) then \(uv\in E(H)\) if and only if \(uv\in E(G)\). For a vertex \(x\in V(G)\), let the neighbourhood of x be the subset \(N_G(x)=\{y\in V(G) \mid \{x,y\}\in E(G)\}\). For a subset \(U \subset V(G)\), the neighbourhood of U in G are defined by \(N_G(U) = \bigcup (N_G(x) \mid x \in U)\).

Let \(\textbf{w}: E(G) \rightarrow {{\,\mathrm{\mathbb {Z}}\,}}_{>0}\) be a weight function on the edges of G. For an exponent \(\textbf{a}\in {{\,\mathrm{\mathbb {N}}\,}}^n\), we denote by \(x^\textbf{a}\) the monomial \(x_1^{a_1} \cdots x_n^{a_n}\) in S.

Lemma 2.1

Let G be a simple graph and \(\textbf{w}: E(G) \rightarrow {{\,\mathrm{\mathbb {Z}}\,}}_+\) a weight function. For any exponent \(\textbf{a}\in {{\,\mathrm{\mathbb {N}}\,}}^n\), let

$$U=\{i \mid \text {there exists } j \text { such that } \{x_i,x_j\}\in E(G) \text { and } a_i < \textbf{w}(x_i x_j) \le a_j\}.$$

Then

$$\sqrt{I(G,\textbf{w}): x^\textbf{a}} = I(G\backslash U) + (x_i \mid i \in U),$$

where \(I(G\backslash U)\) is the edge ideal of the induced subgraph of G on \(V(G) \backslash U\).

Proof

Let \(J = \sqrt{I(G,\textbf{w}): x^\textbf{a}}\). By [12, Lemma 2.24], generators of J are \(x_ix_j\) with \(x_i x_j \in I\) and \(x_i\) for some \(i\in \{1,\ldots ,n\}\). Now \(x_i \in J\) if and only if there exists an index j such that

$$x_i = \sqrt{(x_ix_j)^{\textbf{w}(x_i x_j)}/\gcd ((x_ix_j)^{\textbf{w}(x_i x_j)},x^\textbf{a}) }$$

In particular, we must have \(a_i < \textbf{w}(x_i x_j) \le a_j\). The conclusion follows. \(\square \)

We now prove that the property that \(I(G,\textbf{w})\) are sequentially Cohen–Macaulay for all weight functions \(\textbf{w}\) is equivalent to the property that all induced subgraphs of G are sequentially Cohen–Macaulay.

Lemma 2.2

Let G be a simple graph. The following statements are equivalent.

  1. (1)

    \(I(G,\textbf{w})\) is sequentially Cohen–Macaulay for all weight functions \(\textbf{w}\);

  2. (2)

    \(I(G,\textbf{w})\) is sequentially Cohen–Macaulay for all weight functions \(\textbf{w}\) such that \(\textbf{w}(x_ix_j)\in \{1,2\}\) for all edges \(x_i x_j \in E(G)\);

  3. (3)

    G[W] is sequentially Cohen–Macaulay for all subsets \(W \subseteq V(G)\).

Proof

It is obvious that \((1) \Rightarrow (2)\). Now, we prove \((2) \Rightarrow (3)\). Let W be any subset of V(G). If G[W] has no edges, there is nothing to prove. Thus, we assume that G[W] has at least one edge. Let \(\textbf{w}\) be the weight function defined as follows:

$$\textbf{w}(e)= {\left\{ \begin{array}{ll} 2\text { if } e \in G[W],\\ 1\text { otherwise}. \end{array}\right. }$$

Let \(x^\textbf{a}= \prod _{x_j \in W} x_j\) and \(U = N(W) \setminus W\). By Lemma 2.1, we have

$$\begin{aligned} \sqrt{I(G,\textbf{w}):x^\textbf{a}} = I(G \backslash U ) + (x_i \mid x_i \in U). \end{aligned}$$
(2)

By [11, Proposition 2.23], \(\sqrt{I(G,\textbf{w}):x^\textbf{a}}\) is sequentially Cohen–Macaulay. Since \(U = N(W) \setminus W\), \(G \backslash U\) is the disjoint union of G[W] and \(G[W']\) where \(W' = V(G) \setminus N(W)\). By [19, Lemma 20], we deduce that I(G[W]) is sequentially Cohen–Macaulay.

\((3) \Rightarrow (1).\) By Lemma 2.1, for any weight functions \(\textbf{w}\) and any exponents \(\textbf{a}\in {{\,\mathrm{\mathbb {N}}\,}}^n\) such that \(x^\textbf{a}\notin I(G,\textbf{w})\), \(\sqrt{I(G,\textbf{w}): x^\textbf{a}}\) is of the form \(I(G[W]) + (\text {some variables})\) for some subset W of V(G). By assumption, they are sequentially Cohen–Macaulay. By [11, Proposition 2.23], \(I(G,\textbf{w})\) is sequentially Cohen–Macaulay. \(\square \)

We are now ready for the proof of Theorem 1.2.

Proof of Theorem 1.2

By the definition of Woodroofe graphs, we have the following facts.

  1. (1)

    Woodroofe graphs are sequentially Cohen–Macaulay [19, Theorem 1].

  2. (2)

    Induced subgraphs of a Woodroofe graph are Woodroofe graphs.

  3. (3)

    The cycles \(C_t\) are not sequentially Cohen–Macaulay for \(t \ne 3,5\) (see [4, Proposition 4.1] and [19, Theorem 10]).

The conclusion then follows from Lemma 2.2. \(\square \)

By Theorem 1.2, any Cohen–Macaulay very well-covered graph that is not Woodroofe is a counterexample to Terai’s conjecture. We provide some concrete examples below. Recall that a simple graph is called very well covered if the size of every minimal vertex cover is half the number of vertices. In particular, it is unmixed.

Example 2.3

Let H be a suspension of a cycle \(C_t\) for \(t\ne 3,5\), i.e. the set of edges and the set of vertices are

$$E(H)=\{x_1x_2, x_2x_3,\ldots ,x_{t-1}x_t,x_tx_1, x_1y_1,\ldots ,x_ty_t\} \text { and } V(H)=\{x_1,y_1,\ldots ,x_t,y_t\}.$$

Let \(\textbf{w}\) be a weight function on E(H) taking value \(w \ge 2\) for the edges \(x_{i}x_{i+1}\) and value 1 otherwise. Then, H is a Cohen–Macaulay very well-covered graph, but \((H,\textbf{w})\) is not sequentially Cohen–Macaulay.

Proof

The graph H is Cohen–Macaulay by [15, Theorem 2.1] (also see [17]). By definition, H is very well covered. Since

$$\sqrt{I(H,{\textbf{w}}):\prod _{i=1}^t x_i^{w-1}}=I(C_t)+(y_1,\ldots ,y_t)$$

and \(I(C_t)\) is not sequentially Cohen–Macaulay by [4, Proposition 4.1]. By [11, Proposition 2.23], \(I(H,\textbf{w})\) is not sequentially Cohen–Macaulay.

3 Cohen–Macaulay edge-weighted graphs

In this section, we give some applications of Theorem 1.2. First, we recall the definition of Cohen–Macaulay modules.

A finitely generated graded S-module L is called Cohen–Macaulay if \({{\,\textrm{depth}\,}}(L) = \dim (L)\). A homogeneous ideal \(I\subseteq S\) is said to be Cohen–Macaulay if S/I is Cohen–Macaulay. The ideal I is called unmixed if the associated primes of S/I have the same height. It is well known that I is unmixed if S/I is a Cohen–Macaulay ring.

First, we have

Corollary 3.1

Let G be a Woodroofe graph and \(\textbf{w}: E(G) \rightarrow {{\,\mathrm{\mathbb {Z}}\,}}_{>0}\) a weight function. Then \(I(G,{\textbf{w}})\) is Cohen–Macaulay if and only if \(I(G,{\textbf{w}})\) is unmixed.

Proof

The conclusion follows from Theorem 1.2 and the fact that a sequentially Cohen–Macaulay ideal is Cohen–Macaulay if and only if it is unmixed.

The following result is well known, see, for example, [6]. We include an argument here for completeness.

Lemma 3.2

Let I be a monomial ideal. Assume that I is Cohen–Macaulay. Then \(\sqrt{I:u}\) is Cohen–Macaulay for all monomials u such that \(u \notin I\).

Proof

Since I is Cohen–Macaulay, it is unmixed. Hence, \(\dim (S/\sqrt{I:u}) = \dim (S/I)\) for all monomials \(u \notin I\). By Hochster’s formula (1), we have

$${{\,\textrm{depth}\,}}(S/I) \le {{\,\textrm{depth}\,}}(S/\sqrt{I:u}) \le \dim (S/\sqrt{I:u}) = \dim (S/I).$$

The conclusion follows. \(\square \)

We are now ready for the proof of Theorem 1.1.

Proof of Theorem 1.1

It is obvious that \((1) \Rightarrow (2)\). Now, we prove \((2) \Rightarrow (3)\). By Lemma 3.2 and the proof of the implication \((2) \Rightarrow (3)\) in Lemma 2.2, we deduce that G[W] is Cohen–Macaulay for all \(W\subseteq V(G)\). The conclusion then follows from the following facts

  1. (1)

    \(P_3\) a path of length 2 is not Cohen–Macaulay.

  2. (2)

    If \(P_3\) is not an induced subgraph of G then G is a disjoint union of complete graphs.

  3. (3)

    \(\Rightarrow (1)\). Assume that G is the disjoint union of finitely many complete graphs. By [13, Proposition 4.6] and [5, Theorem 2.5], \(I(G,\textbf{w})\) is unmixed for all weight functions \(\textbf{w}\). By Theorem 1.2, the conclusion follows.

\(\square \)

Remark 3.3

We have overlooked the unmixedness condition in the previous version and stated that the Cohen–Macaulayness of I is equivalent to the Cohen–Macaulayness of all associated radicals of I. As pointed out by an anonymous referee, the Cohen–Macaulayness of all associated radicals of I is not enough to guarantee the Cohen–Macaulayness of I. One has to establish the unmixed property of I as well. We thank the anonymous referee for pointing out this gap in our earlier proof of the theorem.

When G is a Cohen–Macaulay graph, a weight function \(\textbf{w}\) on edges of G is called Cohen–Macaulay if \((G,\textbf{w})\) is Cohen–Macaulay. Before giving our next application, we recall the result of Paulsen and Sather-Wagstaff [13, Theorem 4.4] on an edge-weighted graph \((C_5,\textbf{w})\). They proved that \(\textbf{w}\) is Cohen–Macaulay if and only if there exists a vertex v so that the weights on edges of \(C_5\) starting from v in clockwise order are of the form \(v=a,b,c,d,a=v\) and that \(a \le b \ge c\le d \ge a\). We call such a vertex v a balancing vertex of \(\textbf{w}\).

Let H be a graph formed by connecting two 5 cycles by a path. By [10, Theorem 2.4], H is Cohen–Macaulay if and only if this path is of length 1. We may assume that the vertices of H are \(\{x_1, \ldots , x_5, y_1, \ldots , y_5\}\) and edges of H are \(\{x_1x_2, \ldots , x_4x_5,x_1x_5,y_1y_2, \ldots ,y_4y_5,y_1y_5,x_1y_1\}\). Note that \(I(H) + (x_i)\) and \(I(H) + (y_i)\) are not Cohen–Macaulay for \(i \in \{2,5\}\). With this assumption, we have

Proposition 3.4

The edge-weighted graph \((H,\textbf{w})\) is Cohen–Macaulay if and only if \(\textbf{w}\) satisfies the following conditions:

  1. (1)

    \(\textbf{w}(x_1y_1) \le \min \{\textbf{w}(x_1x_2),\textbf{w}(x_1x_5),\textbf{w}(y_1y_2),\textbf{w}(y_1y_5)\},\)

  2. (2)

    The induced edge-weighted graphs of \((H,\textbf{w})\) on \(\{x_1,\ldots ,x_5\}\) and \(\{y_1,\ldots ,y_5\}\) are Cohen–Macaulay.

  3. (3)

    Balancing vertices of \(\textbf{w}\) on \(\{x_1, \ldots ,x_5\}\) and \(\{y_1,\ldots ,y_5\}\) can be chosen among \(\{x_1,x_3,x_4\}\) and \(\{y_1,y_3,y_4\}\) respectively.

Proof

For simplicity of notation, we set \(I = I(H,\textbf{w})\). Let \((H_1,\textbf{w}_1)\) and \((H_2,\textbf{w}_2)\) be the induced edge-weighted graphs of \((H,\textbf{w})\) on \(\{x_1, \ldots , x_5\}\) and \(\{y_1, \ldots , y_5\}\) respectively.

First, assume that \((H,\textbf{w})\) is Cohen–Macaulay. We prove that \(\textbf{w}\) must satisfy the above conditions. For (1), assume by contradiction that \(\textbf{w}(x_1y_1) = a > \textbf{w}(y_1y_2) = b\). Let \(c = \max \{ \textbf{w}(y_3y_4),\textbf{w}(y_4y_5) \}\). Then

$$\sqrt{I: y_1^{a-1} y_4^c} = I (H[x_1,\ldots ,x_5,y_1]) + (y_2,y_3,y_5).$$

In particular, it is not Cohen–Macaulay. By Lemma 3.2, \(I(H,\textbf{w})\) is not Cohen–Macaulay, a contradiction. By symmetry, \(\textbf{w}\) must satisfy condition (1).

We now prove that \((H_2, \textbf{w}_2)\) must be Cohen–Macaulay. Assume by contradiction that \((H_2,\textbf{w}_2)\) is not Cohen–Macaulay. By Corollary 3.1, \(I(H_2,\textbf{w}_2)\) has an embedded prime \(\mathfrak {p}\). By [7, Corollary 1.3.10], there exists an exponent \(y^\textbf{b}\) such that \(\mathfrak {p}= I(H_2,\textbf{w}_2): y^\textbf{b}\). Then we have

$$I(H,\textbf{w}): x_2^{a_2}x_4^{a_4} y^\textbf{b}= \mathfrak {p}+ (x_1,x_3,x_5),$$

where \(a_2 = \max (\textbf{w}(x_2x_1),\textbf{w}(x_3x_2))\) and \(a_4 = \max (\textbf{w}(x_3x_4),\textbf{w}(x_4x_5))\). In particular, it is an embedded prime of \(I(H,\textbf{w})\), a contradiction. By symmetry, \(\textbf{w}\) must satisfy condition (2).

Now note that if \(\textbf{w}(x_2x_3) < \textbf{w}(x_3x_4)\) then \(\sqrt{I:x_3^b} = I + (x_2)\) where \(b = \textbf{w}(x_3x_4) - 1\). Since \(I + (x_2)\) is not Cohen–Macaulay, by Lemma 3.2, this implies a contradiction. Hence, \(\textbf{w}(x_2x_3) \ge \textbf{w}(x_3x_4)\). By symmetry, we deduce that \(\textbf{w}(x_4x_5) \ge \textbf{w}(x_3x_4)\). By [13, Theorem 4.4] and the previous claim that \((H_1, \textbf{w}_1)\) is Cohen–Macaulay, we deduce that a balancing vertex of \(\textbf{w}\) on \(\{x_1, \ldots , x_5\}\) can be chosen among \(\{x_1,x_3,x_4\}\). By symmetry, \(\textbf{w}\) must satisfy condition (3).

It remains to prove that if \(\textbf{w}\) satisfies conditions (1), (2), (3), then \(I = I(H,\textbf{w})\) is Cohen–Macaulay. By Corollary 3.1, it suffices to prove that \(I(H,\textbf{w})\) is unmixed. Let \(\mathfrak {p}= I:x^\textbf{a}y^\textbf{b}\) be an associated prime of \(I(H,\textbf{w})\). We need to prove that \(\mathfrak {p}\) is an associated prime of I(H). By symmetry, we may assume that \(a_1 \ge b_1\). Since \(x^\textbf{a}y^\textbf{b}\notin I(H,\textbf{w})\), we must have \(b_1 < \textbf{w}(x_1y_1) \le \min (\textbf{w}(y_1y_2), \textbf{w}(y_1y_5))\). By Lemma 2.1, we may assume that \(b_1 = 0\). There are two cases as follows.

Case 1. \(a_1 \ge \textbf{w}(x_1y_1)\). By Lemma 2.1, we have

$$\begin{aligned} \mathfrak {p}= I : x^\textbf{a}y^\textbf{b}= \sqrt{I : x^\textbf{a}y^\textbf{b}} = (y_1) + \sqrt{I(H_1,\textbf{w}_1):x^\textbf{a}} + \sqrt{I(H_2,\textbf{w}_2):y^\textbf{b}}. \end{aligned}$$
(3)

Assume by contradiction that \(\mathfrak {p}\) is an embedded associated prime of \(I(H,\textbf{w})\). Since \((H_1,\textbf{w}_1)\) and \((H_2,\textbf{w}_2)\) are Cohen–Macaulay by [13, Theorem 4.4], we must have \(\sqrt{I(H_2,\textbf{w}_2):y^\textbf{b}} = (y_2,y_4,y_5)\) or \((y_2,y_3,y_5)\). Since \(b_1 = 0\), by Lemma 2.1, we must have \(b_2 < \textbf{w}(y_2y_3) \le b_3\) and \(b_5 < \textbf{w}(y_4y_5) \le b_4\). Hence, \(y_3,y_4\) cannot be balancing vertex of \(\textbf{w}\) on \(\{y_1,\ldots ,y_5\}\). By condition (3), we deduce that \(y_1\) is the balancing vertex. In particular, \(\textbf{w}(y_3y_4) \le \textbf{w}(y_2y_3) \le b_3\) and \(\textbf{w}(y_3y_4) \le w(y_4y_5) \le b_4\). In other words, \(y^\textbf{b}\in I\), which is a contradiction.

Case 2. \(a_1 < \textbf{w}(x_1y_1)\). By Lemma 2.1, we have

$$\begin{aligned} \mathfrak {p}= \sqrt{I(H_1,\textbf{w}_1):x^\textbf{a}} + \sqrt{I(H_2,\textbf{w}_2):y^\textbf{b}} + (x_1y_1). \end{aligned}$$
(4)

Hence, either \(x_1 \in \sqrt{I(H_1,\textbf{w}_1):x^\textbf{a}}\) or \(y_1 \in \sqrt{I(H_2,\textbf{w}_2):y^\textbf{b}}\) and

$$\mathfrak {p}= \sqrt{I(H_1,\textbf{w}_1):x^\textbf{a}} + \sqrt{I(H_2,\textbf{w}_2):y^\textbf{b}}.$$

Since \((H_1,\textbf{w}_1)\) and \((H_2,\textbf{w}_2)\) are Cohen–Macaulay, we deduce that \(\mathfrak {p}\) is an associated prime of I(H).

The conclusion follows.\(\square \)

Remark 3.5

This result has been generalized to all Cohen–Macaulay graphs of large girth by Hien [8]. We keep our argument here to illustrate our technique.