1 Introduction

Let G be a finite simple graph with the vertex set V(G) and the edge set E(G). Let \(R=\mathbb {K}[x:x\in V(G)]\) be the polynomial ring, where \(\mathbb {K}\) is an arbitrary field. In [6], the notion of path ideals has been introduced. For a graph G, a square-free monomial ideal,

$$\begin{aligned} I_t(G):=\langle x_1\cdots x_t: \text { where } P:x_1,\dots ,x_t \text { is a } t\text {-path in } G\rangle \subseteq R \end{aligned}$$

is called t-path ideal of G. For the last few decades, researchers have been trying to establish the connection between the combinatorial invariants of graphs and the algebraic invariants of t-path ideal, see [1, 2, 4, 5, 7, 12, 13]. The Castelnuovo–Mumford regularity of an ideal is an important algebraic invariant that measures the complexity of the module. The Castelnuovo–Mumford regularity (or simply regularity) of a finitely generated graded R-module M, written \({\text {reg}}(M)\) is defined as \( {\text {reg}}(M):=\max \{j-i: {\text {Tor}}_i(M,\mathbb {K})_j\ne 0\}.\) There are a few classes of graphs for which the explicit formula of the regularity of t-path ideal is known. In [5], Bouchat et al. studied the t-path ideal of rooted trees, and they provided a recursive formula for computing the graded Betti numbers of t-path ideals. Also, they gave a general bound for the regularity of t-path ideal of a rooted tree. In particular, for a rooted tree G, they proved that \({\text {reg}}(R/I_t(G))\le (t-1)[l_t(G)+p_t(G)],\) where \(l_t(G)\) denotes the number of leaves in G, where level is at least \(t-1\) and \(p_t(G)\) denotes the maximal number of pairwise disjoint paths of length t in G. In [1] and [2], Alilooee and Faridi computed the regularity of t-path ideal of lines and cycles in terms of the number of vertices, respectively. Banerjee [3] studied the regularity of t-path ideal of gap free graphs and proved that the t-path ideals of gap free, claw free and whiskered-\(K_4\) free graphs have linear minimal free resolutions for all \(t\ge 3\). In this article, we restrict ourselves to \(t=3\) and study the regularity of \(I_3(G)\). It is important to note that for a 3-path ideal of gap free graph G, Banerjee proved that \({\text {reg}}(R/I_3(G))\le \max \{{\text {reg}}(R/I_2(G)),2\},\) where \(I_2(G)\) is the 2-path ideal or monomial edge ideal of G, see [3, Theorem 3.3]. In [11], Katzman proved that for any graph G, \({\text {reg}}(R/I_2(G))\ge \nu (G)\), where \(\nu (G)\) denotes the induced matching number of G. Motivated from the definition of \(\nu (G)\), in this article, we define in an obvious way the 3-path induced matching number, denoted by \(\nu _3(G)\) (see Sect 2 for the definition). Next, we prove that a similar lower bound can be obtained for the regularity of \(I_3(G)\). More precisely, we prove \({\text {reg}}(R/I_3(G))\ge 2\nu _3(G)\). We also observe that this is a sharp lower bound for \({\text {reg}}(R/I_3(G))\). In fact, we show that if G is a tree, then \({\text {reg}}(R/I_3(G))=2\nu _3(G)\), see Theorem 4.4. It is desirable to answer the following problem:

Problem 1.1

Classify the classes of graphs G that satisfy the property

$$\begin{aligned} {\text {reg}}(R/I_3(G))=2\nu _3(G). \end{aligned}$$

Theorem 4.4 gives a class of graphs that satisfies the property \({\text {reg}}(R/I_3(G))=2\nu _3(G)\). On the other hand, Example 4.7 shows that some of the unicyclic graphs satisfy the desired property but not the whole class. More concretely, in Theorem 4.6, we prove that if G is a unicyclic graph, then \({\text {reg}}(R/I_3(G))\le 2\nu _3(G)+2\). Moreover, in Example 4.7, we give examples of unicyclic graphs showing that the regularity of 3-path ideal of a unicyclic graph can attain any of the values between the lower and upper bound of the regularity.

2 Preliminaries

In this section, we recall all necessary definitions which will be used throughout the article.

Definition 2.1

Let G be a graph with the vertex set \(V(G)=\{x_1,\dots ,x_n\}\) and the edge set E(G).

  1. (i)

    A subgraph H of a graph G is called an induced subgraph if for all \(x_i,x_j\in V(H)\) such that \(\{x_i,x_j\}\in E(G)\) implies that \(\{x_i,x_j\}\in E(H)\). For a vertex \(x\in V(G)\), let \(G\setminus \{x\}\) denote the induced subgraph on the vertex set \(V(G)\setminus \{x\}.\)

  2. (ii)

    A path on n vertices is a graph whose vertices can be listed in the order \(x_1,\dots ,x_n\) such that the edge set is \(\{\{x_i,x_{i+1}\}:1\le i\le n\}\) and it is denoted by \(P_n\). For \(t\ge 2\), a path of length t in G is called a t-path.

  3. (iii)

    A cycle on n vertices \(\{x_1,\dots ,x_n\}\), denoted by \(C_n\), is the graph with the edge set \(E(P_n)\cup \{\{x_1,x_n\}\}.\) A graph G is said to be tree if it does not contain any cycle. A disconnected tree is called a forest. A graph G is called unicyclic if G contains only one cycle.

  4. (iv)

    For a vertex \(x\in V(G)\), the set \(\{y\in V(G): \{x,y\}\in E(G)\}\) is called the neighborhood of x in G and it is denoted by \(N_G(x)\). The set \(N_G[x]\) denotes \(N_G(x)\cup \{x\}\). For an edge \(e=\{x,y\}\in E(G)\), the neighborhood of e is defined as

    $$\begin{aligned} N_G(e):=(N_G(x)\setminus \{y\})\cup (N_G(y)\setminus \{x\}). \end{aligned}$$

    \(N_G[e]\) denotes the set \(N_G(e)\cup \{x,y\}\), i.e., \(N_G[e]=N_G[x]\cup N_G[y].\)

  5. v)

    For a vertex \(x\in V(G)\), the set \(\{ \{y,z\}\in E(G): \{x,y,z\} \text { is a } 3\text {-path in }G \}\) is called the neighborhood edge set of x in G and it is denoted by \(N_G^{edge}(x)\).

  6. (vi)

    A 3-path matching in a graph G is a subgraph consisting pairwise disjoint 3-paths. If the subgraph is induced, then 3-path matching is said to be a 3-path induced matching of G. The largest size of a 3-path induced matching is called the 3-path induced matching number, and it is denoted by \(\nu _3(G)\).

The following remark shows the relationship between the 3-path induced matching number of a graph and its induced subgraph (Fig. 1).

Remark 2.2

One can observe that for an induced subgraph H of G, we have \(\nu _3(H)\le \nu _3(G)\).

Example 2.3

Note that \(\{x_1,x_2,x_3\},\{x_4,x_5,x_6\}\) is a 3-path matching but not a 3-path induced matching in G. Here, \(\{x_1,x_2,x_7\},\{x_4,x_5,x_6\}\) is a 3-path induced matching in G and \(\nu _3(G)=2\).

Fig. 1
figure 1

G

3 A Lower Bound for the Regularity

For an arbitrary graph G, we first give a general lower bound for the regularity of 3-path ideal in terms of the regularity of 3-path ideal of its induced subgraph, and as a consequence, we prove that the regularity of \(R/I_3(G)\) is bounded below by \(2\nu _3(G)\).

Proposition 3.1

Let H be an induced subgraph of G. Then,

$$\begin{aligned} \beta _{i,j}(R_H/I_3(H))\le \beta _{i,j}(R/I_3(G)) \end{aligned}$$

where \(R_H=\mathbb {K}[x:x\in V(H)]\). Moreover, \({\text {reg}}(R_H/I_3(H))\le {\text {reg}}(R/I_3(G)).\)

Proof

We prove that \(R_H/I_3(H)\) is an algebra retract of \(R/I_3(G)\). We first show that \(I_3(H)=I_3(G)\cap R_H\). It is clear that \(I_3(H) \subseteq I_3(G)\cap R_H\). For the converse part, let \(f\in I_3(G)\cap R_H\). Suppose \(f=\sum gh\) for \(g\in R\) and \(h\in I_3(G)\). We consider the mapping \(\varphi :R\longrightarrow R_H\) by defining \(\varphi (x)=x\) if \(x\in V(H)\), otherwise \(\varphi (x)=0\). Therefore,

$$\begin{aligned} \varphi (f)&= \sum \varphi (g)\varphi (h) \\&=\sum \varphi (g)h, \text { where } h\in I_3(H). \end{aligned}$$

This implies that \(f\in I_3(H)\), and so \(I_3(H)=I_3(G)\cap R_H\). Thus, \(R_H/I_3(H)\) is a \(\mathbb {K}\)-subalgebra of \(R/I_3(G)\). Now consider , where \(\bar{\varphi }\) is the map induced by \(\varphi \). It can be observed that \(\bar{\varphi }\circ i\) is the identity map on \(R_H/I_3(H)\). Hence, \(R_H/I_3(H)\) is an algebra retract of \(R/I_3(G)\). Now, the assertion follows from [14, Corollary 2.5]. \(\square \)

As an immediate consequence, we have a lower bound of the regularity of 3-path ideal of any graph G in terms of the combinatorial invariants of G.

Corollary 3.2

Let G be a simple graph and \(I_3(G)\) be its 3-path ideal. Then,

$$\begin{aligned} {\text {reg}}(R/I_3(G))\ge 2\nu _3(G). \end{aligned}$$

Proof

For simplicity of notation, let \(s=\nu _3(G)\). Suppose that \(\{P_1,P_2,\dots ,P_{s}\}\) is a 3-path induced matching in G. Let H be the induced subgraph of G on the vertices \(\cup _{i=1}^{s} V(P_i)\). Then, \(I_3(H)\) is a complete intersection. Thus, by the Koszul complex, \({\text {reg}}(R_H/I_3(H))=2\nu _3(G)\). Hence, the assertion follows from Proposition 3.1. \(\square \)

4 Path Ideals of Trees and Unicyclic Graphs

In this section, we consider the 3-path ideal of trees and unicyclic graphs. In fact, we compute the exact regularity of \(I_3(G)\) when G is a tree, and for unicyclic graphs, we give a sharp upper bound of \({\text {reg}}(I_3(G))\). We first prove some technical lemmas which will be needed to prove the main results.

Lemma 4.1

Let G be a simple graph and \(I_3(G)\) be its 3-path ideal. Let \(e=\{x,y\}\in E(G)\). Then, we have the followings:

  1. (1)

    \(I_3(G):xy=L+J\), where \(L=\left\langle N_G(e)\right\rangle \) and \(J=I_3(G{\setminus } N_G[e])\).

  2. (2)

    \((I_3(G)+\langle xy \rangle ):x= \langle y \rangle +I_2(H)+I_3(G{\setminus } N_G[x]),\) where H is the union of \(N_G^{{edge}}(x)\) and the complete graph on the vertex set \(N_G(x)\setminus \{y\}\).

Proof

(1): Clearly, \(L+J\subset I_3(G):xy\). On the other side, let \(u\in I_3(G):xy\). This implies that \(uxy\in I_3(G)\), and hence, there exists a minimal monomial generator \(v\in I_3(G)\) such that \(v\mid uxy\). If \(v\not \mid u\), then \(\gcd (v, xy)\ne 1\). This forces that \({\text {supp}}(u)\cap N_G(e)\ne \emptyset \). This gives \(u\in L\), and hence, \(I_3(G):xy=L+J\).

(2): It can be easily seen that \(\langle y \rangle +I_2(H)+I_3(G{\setminus } N_G[x])\subset (I_3(G)+\langle xy \rangle ):x\). For the converse part, let \(u \in (I_3(G)+\langle xy \rangle ):x\). Then, \(ux\in I_3(G)+\langle xy \rangle \). Assume that \(y\not \mid u\). Then, \(ux\in I_3(G)\), and hence, there exists a minimal monomial generator \(v\in I_3(G)\) such that \(v\mid ux\). If \(v\not \mid u\), then \(x\mid v\). Let \(v=xv_1\). Since v is 3-path in G, \(x\in N_G(v_1)\). Now, if \(v_1\) is an edge in G, then \(v_1\in N^\text {edge}_G(x)\), on the other hand \({\text {supp}}(v_1)\subset N_G(x)\) which further implies that \(u\in I_2(H)\). This yields that \((I_3(G)+\langle xy \rangle ):x\subset \langle y \rangle +I_2(H)+I_3(G{\setminus } N_G[x])\), and hence,

$$\begin{aligned} (I_3(G)+\langle xy \rangle ):x= \langle y \rangle +I_2(H)+I_3(G\setminus N_G[x]) \end{aligned}$$

which completes the proof. \(\square \)

We recall a property satisfied by a tree from [10, Proposition 4.1].

Remark 4.2

If G is a tree containing a vertex of degree at least two, then there exists a vertex \(v\in V(G)\) with \(N_G(v)=\{v_1,\dots ,v_r\}\), where \(r\ge 2\) and \(\deg _G(v_i)=1\) for \(i< r\).

Lemma 4.3

Let G be a tree and \(v\in V(G)\) with the notation as in Remark 4.2. Then,

$$\begin{aligned} \nu _3(G\setminus N_G[e])\le \nu _3(G)-1,\text { where } e=\{v,v_r\} \end{aligned}$$

Proof

Let \(\nu _3(G{\setminus } N_G[e])=s\) and \(P_1,\dots ,P_s\) be a 3-path induced matching in \(G{\setminus } N_G[e]\). Since \(\deg _G(v_1)=1\), \(N_G(v_1)\cap V(P_i)=\emptyset \) for \(1\le i\le s\). Also, note that for \(1\le i\le s\), \(N_G(v)\cap V(P_i)=\emptyset =N_G(v_r)\cap V(P_i)\). Therefore, \(\{v_1,v,v_r\},P_1,\dots ,P_s\) is a 3-path induced matching in G, and hence, \(\nu _3(G)\ge s+1\). \(\square \)

Now, we are ready to prove the exact regularity formula for the 3-path ideals of trees.

Theorem 4.4

Let G be a tree and \(I_3(G)\) be its 3-path ideal. Then, \({\text {reg}}(R/I_3(G))=2\nu _3(G)\).

Proof

By Corollary 3.2, it is enough to prove that \({\text {reg}}(R/I_3(G))\le 2\nu _3(G)\).

We proceed by induction on |V(G)|. By Remark 4.2, let v be such a vertex of G such that \(N_G(v)=\{v_1,\dots ,v_r\}\) and \(\deg _G(v_i)=1\) for \(i<r\), where \(r\ge 2\). Set \(u=v_r\), and let \(N_G(u)=\{u_1=v,u_2,\dots ,u_s\}\) for \(s\ge 1\). Consider the following short exact sequence:

$$\begin{aligned} 0\longrightarrow \frac{R}{I_3(G):uv}(-2){\mathop {\longrightarrow }\limits ^{\cdot uv}} \frac{R}{I_3(G)}\longrightarrow \frac{R}{\langle uv,I_3(G)\rangle }\longrightarrow 0. \end{aligned}$$
(1)

Using Lemma 4.1(1), we have

$$\begin{aligned}{} & {} I_3(G):uv=\langle v_i:1\le i\le r-1\rangle +\langle u_j:2\le j\le s\rangle +I_3(G\setminus N_G[e]), \\{} & {} \text { where } e=\{u,v\}. \end{aligned}$$

By virtue of Lemma 4.3, we have \(\nu _3(G\setminus N_G[e]) \le \nu _3(G)-1\). Therefore, by inductive hypothesis, \({\text {reg}}(R/(I_3(G):uv))\le 2\nu _3(G{\setminus } N_G[e])\le 2\nu _3(G)-2.\) Now, set \(J=\langle uv,I_3(G)\rangle \) and consider the following short exact sequence:

$$\begin{aligned} 0\longrightarrow \frac{R}{J:u}(-1){\mathop {\longrightarrow }\limits ^{\cdot u}} \frac{R}{J}\longrightarrow \frac{R}{\langle u, J\rangle }\longrightarrow 0. \end{aligned}$$
(2)

Observe that, \(\langle u, J\rangle =\langle u \rangle +I_3(G{\setminus }\{u\})\). By Remark 2.2, \(\nu _3(G\setminus \{u\})\le \nu _3(G).\) Thus, it follows from inductive hypothesis that \({\text {reg}}(R/\langle u, J\rangle )\le 2\nu _3(G{\setminus } \{u\})\le 2\nu _3(G).\) On the other hand, by Lemma 4.1(2), \(J:u=\langle v\rangle +I_2(H)+I_3(G{\setminus } N_G[u]),\) where H is the union of \(N_G^{\text{ e }dge}(u)\) and the complete graph on the vertex set \(N_G(u)\setminus \{v \}\).

Case-I: If \(s=1\), then \(N_G^{\text{ e }dge}(u)=\{\{v,v_i\}:1\le i\le r-1 \}\). Also, note that the graph \(G{\setminus } N_G[u]\) does not have an edge. This implies that \(J:u=\langle v\rangle \), and hence \({\text {reg}}\left( S/(J:u)\right) =0\le 2\nu _3(G)-1\).

Case-II: Suppose \(s\ge 2\) and \(\deg (u_i)=1\) for \(2\le i\le s\). Then, H is the union of \(N_G^{\text{ e }dge}(u)=\{\{v,v_i\}:1\le i\le r-1 \}\) and the complete graph on the vertex set \(\{u_2,\dots , u_s\}\). In this case, the graph \(G{\setminus } N_G[u]\) has no edge. Thus, \(J:u=\langle v\rangle +I_2(H)\). Since H is co-chordal, by [8, Theorem 1], \(I_2(H)\) has a linear resolution. Hence, we get \({\text {reg}}(R/(J:u))=1\le 2\nu _3(G)-1\).

Therefore, it follows from [15, Corollary 18.7] applying to the short exact sequences (1) and (2) that

$$\begin{aligned} {\text {reg}}(R/I_3(G))\le \max \{ {\text {reg}}(R/(I_3(G):uv))+2,{\text {reg}}(R/(J:u))+1,{\text {reg}}(R/\langle u,J\rangle )\}. \end{aligned}$$

Hence, \({\text {reg}}(R/J)\le 2\nu _3(G)\).

Case-III: Suppose now \(s\ge 2\) and \(\deg _G(u_i)\ge 2\) for some \(2\le i\le s\). Without loss of generality, we assume that \(\deg _G(u_i)\ge 2\) for all \(2\le i\le t\) and \(\deg (u_i)=1\) for all \(t+1\le i\le s\). In this case, H is a union of the edges \(N_G^{\text {edge}}(u)\) and the complete graph on the vertex set \(\{u_2,\dots , u_s\}\), i.e.,

$$\begin{aligned} J:u= & {} \langle v\rangle +\langle u_iu_j: 2\\\le & {} i< j\le s\rangle +\sum \limits _{i=2}^t\left\langle u_ix: x\in N_G(u_i)\setminus \{u\}\right\rangle +I_3\left( G\setminus N_G[u]\right) . \end{aligned}$$

Set \(J_1=J:u\) and \(J_{i}=J_{1}+\langle u_2,\dots ,u_{i}\rangle \) for \(2\le i\le t\). For \(2\le i\le t\), consider the following short exact sequence:

$$\begin{aligned} 0\longrightarrow \frac{R}{J_{i-1}:u_i}(-1){\mathop {\longrightarrow }\limits ^{\cdot u_i}} \frac{R}{J_{i-1}}\longrightarrow \frac{R}{J_{i}}\longrightarrow 0. \end{aligned}$$
(3)

By Lemma 4.1, \(J:uu_i=\langle u_j:1\le j\le s \text { and } j\ne i\rangle + \langle w: w\in N_G(u_i){\setminus } \{u\}\rangle +I_3(G{\setminus } N_G[\{u,u_i\}]\). Therefore,

$$\begin{aligned} J_{i-1}:u_i&= (J_{1}+\langle u_2,\dots ,u_{i-1}\rangle ):u_i= (J:uu_i)+\langle u_2,\dots ,u_{i-1}\rangle \\&= \langle u_j:1\le j\le s, \ j\ne i\rangle +\langle w: w\in N_G(u_i)\setminus \{u\}\rangle +I_3(G\setminus N_G[\{u,u_i\}]. \end{aligned}$$

Further, we can write

$$\begin{aligned} J_{i-1}:u_i= & {} \langle u_j:1\le j\le s, \ j\ne i\rangle +\langle w: w\in N_G(u_i)\setminus \{u\}\rangle \\{} & {} \quad +I_3(G\setminus \{N_G[v]\cup N_G[u]\cup N_G[u_i]\}) \end{aligned}$$

for \(2\le i\le t\). Also, \(J_{t}=\langle v,u_2,\dots ,u_t\rangle +I_3(G{\setminus } \{N_G[v]\cup N_G[u]\})\). Now, it follows from [15, Corollary 18.7] applying to the short exact sequence (3) that

$$\begin{aligned} {\text {reg}}(R/J_1)\le \max \{{\text {reg}}(R/(J_{i-1}:u_i))+1, {\text {reg}}(R/J_{t}):2\le i\le t \}. \end{aligned}$$

Since \(G\setminus \{N_G[v]\cup N_G[u]\cup N_G[u_i]\}\) is an induced subgraph of \(G\setminus N_G[e]\), by Remark 2.2 and Lemma 4.3, we have \(\nu _3(G{\setminus } \{N_G[v]\cup N_G[u]\cup N_G[u_i]\})\le \nu _3(G{\setminus } \{N_G[v]\cup N_G[u]\})\le \nu _3(G)-1\).

By inductive hypothesis, \({\text {reg}}(R/(J_{i-1}:u_i))\le 2\nu _3(G{\setminus } \{N_G[v]\cup N_G[u]\cup N_G[u_i]\})\le 2(\nu _3(G)-1)\) and \({\text {reg}}(R/J_{t})\le 2\nu _3(G{\setminus } \{N_G[v]\cup N_G[u]\})\le 2\nu _3(G)-2\). By applying [15, Corollary 18.7] to the above short exact sequences, we have

$$\begin{aligned}&{\text {reg}}(R/I_3(G)) \le \max \{{\text {reg}}(R/(I_3(G):uv))+2,{\text {reg}}(R/J) \} \\&\quad \le \max \{{\text {reg}}(R/(I_3(G):uv))+2,{\text {reg}}(R/\langle u,J\rangle ),{\text {reg}}(R/J_1)+1 \} \\&\quad \le \max \{{\text {reg}}(R/(I_3(G):uv))+2,{\text {reg}}(R/\langle u,J\rangle ),\\&\quad {\text {reg}}(R/(J_1:u_2))+2,{\text {reg}}(R/J_2)+1 \} \\&\quad \le \max _{2\le i\le t} \{{\text {reg}}(R/(I_3(G):uv))+2,{\text {reg}}(R/\langle u,J\rangle ),\\&\qquad {\text {reg}}(R/(J_{i-1}:u_i))+2,{\text {reg}}(R/J_{t})+1\}. \end{aligned}$$

Hence, the assertion follows. \(\square \)

Now, we proceed to study the regularity of 3-path ideal of unicyclic graphs. If G is a cycle, then the regularity of \(R/I_3(G)\) has been computed in [2]. So, we assume that G is not a cycle. We give a sharp upper bound for the regularity of \(R/I_3(G)\). The idea of the proof is kind of similar to the proof of Theorem 4.4. We fix the following notation for unicyclic graphs.

Notation 4.5

Let G be a unicyclic graph with the induced cycle C. Then, trees are attached to at least one vertex of C, say \(u\in V(C)\). Let \(v\in N_G(u){\setminus } V(C)\) and \(e=\{u,v\}\). Clearly, \(N_G(u)\setminus \{v\}\) contains at least 2 vertices and set \(N_G(u)=\{u_1=v,u_2,\dots ,u_t\}\) for \(t\ge 3\).

Theorem 4.6

Let G be a unicyclic graph and \(I_3(G)\) be its 3-path ideal. Then,

$$\begin{aligned} 2\nu _3(G)\le {\text {reg}}(R/I_3(G))\le 2\nu _3(G)+2. \end{aligned}$$

Proof

Let G be a unicyclic graph with the notation as in Notation 4.5. The lower bound for \({\text {reg}}(R/I_3(G))\) follows from Corollary 3.2. So, here we only establish the upper bound. Consider the short exact sequence (1). By Lemma 4.1(1), \(I_3(G):uv=\langle N_G(e)\rangle +I_3(G\setminus N_G[e])\), where \(e=\{u,v\}\). Since \(G{\setminus } N_G[e]\) is an induced subgraph of G, by Remark 2.2, \(\nu _3(G{\setminus } N_G[e])\le \nu _3(G)\). Note that \(G\setminus N_G[e]\) is a tree. Thus, it follows from Theorem 4.4 that

$$\begin{aligned} {\text {reg}}(R/(I_3(G):uv))=2\nu _3(G\setminus N_G[e])\le 2\nu _3(G). \end{aligned}$$

Now, set \(J=\langle uv,I_3(G)\rangle \) and we consider the short exact sequence (2), where \(J:u=\langle v\rangle +I_2(H) +I_3(G{\setminus } \{N_G[u]\}),\) where H is the union of \(N_G^{\text{ e }dge}(u)\) and the complete graph on the vertex set \(N_G(u){\setminus } \{v\}\). Also, \(\langle u,J\rangle =\langle u,I_3(G{\setminus } \{u\})\rangle \). Since \(G{\setminus } \{u\}\) is a tree, by Theorem 4.4, we have

$$\begin{aligned} {\text {reg}}(R/\langle u,J\rangle )=2\nu _3(G\setminus \{u\})\le 2\nu _3(G). \end{aligned}$$

Set \(J_1=J:u\) and \(J_i=J_{1}+\langle u_2,\dots ,u_{i}\rangle \), where \(N_G(u)=\{v,u_2,\dots ,u_t\}\) for \(2\le i\le t\) and consider short exact sequences (3).

It can be observed that \(J_{i-1}:u_i=\langle u_j:1\le j\le t, \ j\ne i\rangle +\langle w: w\in N_G(u_i){\setminus } \{u\}\rangle +I_3(G{\setminus } \{N_G[u]\cup N_G[u_i]\})\) for \(2\le i\le t\) and \(J_{t}=\langle v,u_2,\dots ,u_t\rangle +I_3(G\setminus \{N_G[u]\})\). Now it follows from [15, Corollary 18.7] applying to the short exact sequence (3) that

$$\begin{aligned} {\text {reg}}(R/J_1)\le \max \{{\text {reg}}(R/(J_{i-1}:u_i))+1, {\text {reg}}(R/J_{t}):2\le i\le t \}. \end{aligned}$$

Now, \(\nu _3(G\setminus \{N_G[u]\cup N_G[w_i]\})\le \nu _3(G)\) and \(\nu _3(G\setminus \{N_G[u]\})\le \nu _3(G)\) follow from Remark 2.2. Since \(G{\setminus } \{N_G[u]\cup N_G[w_i]\}\) and \(G{\setminus } \{N_G[u]\}\) are trees, by Theorem 4.4, \({\text {reg}}(R/(J_i:w_i))=2\nu _3(G{\setminus } \{N_G[u]\cup N_G[w_i]\})\le 2\nu _3(G)\) and \({\text {reg}}(R/J_{t})=2\nu _3(G\setminus \{N_G[u]\})\le 2\nu _3(G)\). Therefore, it follows from applying [15, Corollary 18.7] to short exact sequences 12 and 3 that \({\text {reg}}(R/I_3(G))\le 2\nu _3(G)+2\). \(\square \)

We now show by examples that all the three possibilities for the regularity of \(R/I_3(G)\), namely \(2\nu _3(G)\), \(2\nu _3(G)+1\) and \(2\nu _3(G)+2\), indeed occur for unicyclic graphs.

Example 4.7

Consider graphs \(G_1\), \(G_2\) and \(G_3\) as in Fig. 2. Then, using Macaulay 2 ( [9]), it can be computed that \({\text {reg}}(R/I_3(G_1))=2\), \({\text {reg}}(R/I_3(G_2))=3\) and \({\text {reg}}(R/I_3(G_3))=6\). Note that \(\nu _3(G_1)=1=\nu _3(G_2)\) and \(\nu _3(G_3)=2\).

Fig. 2
figure 2

Unicyclic graphs