1 Introduction

Binomial edge ideals have been introduced in [9] and, independently, in [15]. They are associated to finite simple graphs, in fact they arise from the 2-minors of a \(2 \times n\) matrix related to the edges of a graph with n vertices. The problem of finding a characterization of Cohen–Macaulay binomial edge ideals has been studied intensively by many authors. There are several attempts at this problem available for some families of graphs. Some papers in this direction are [1,2,3, 6, 7, 10, 11, 14, 16,17,18]. In the last one, the authors introduce two combinatorial properties strictly related to the Cohen–Macaulayness of binomial edge ideals: accessibility and strongly unmixedness. In particular, they prove

$$\begin{aligned} J_\textrm{G} \hbox { strongly unmixed} \implies J_\textrm{G} \hbox { Cohen--Macaulay} \implies G \hbox { accessible}. \end{aligned}$$

In the same article, they show that the three conditions are equivalent for chordal and traceable graphs.

On the other hand, a fundamental condition to describe Cohen–Macaulay modules is the so-called Serre’s condition \((S_r)\). N. Terai, in [19], translates this condition into nice combinatorial terms for the class of squarefree monomial ideals. In general, for any ideal \(I \subseteq S\), one has

$$\begin{aligned} S/I \hbox { Cohen--Macaulay} \implies S/I \hbox { satisfies Serre's condition } (S_2). \end{aligned}$$

The main aim of this work is to combine all the above-mentioned algebraic and combinatorial notions, showing that

$$\begin{aligned} S/J_\textrm{G} \hbox { satisfies Serre's condition } (S_2) \implies G \hbox { accessible}, \end{aligned}$$

and finding a large family of graphs that satisfies all of them. To reach the goal, in Sect. 3, we describe the simplicial complex \(\Delta _<\) such that \(\textit{in}_<(J_\textrm{G}) = I_{\Delta _<}\), for any term order <. It is well known that \(\textit{in}_<(J_\textrm{G})\) is a squarefree monomial ideal. In [4], the authors prove that a binomial edge ideal \(J_\textrm{G}\) satisfies the Serre’s condition \((S_2)\) if and only if \(\textit{in}_<(J_\textrm{G})\) satisfies it, as well. We exploit this fact and the knowledge of \(\Delta _<\) to prove that if \(J_\textrm{G}\) satisfies \((S_2)\)-condition, then G is accessible, improving the results of [2].

In Sect. 4, we focus on accessible graphs. In particular, in Proposition 3, we show that any accessible graph induces, in a natural way, blocks with whiskers that are accessible, too. This fact gives us a sufficient condition for having non-Cohen–Macaulay binomial edge ideals. In literature, many of the examples of non-Cohen–Macaulay \(J_G\) are blocks with whiskers (see [2, 3, 17, 18]). This fact and Proposition 3 motivate us to study accessible blocks with whiskers. In particular, we identify all the blocks with whiskers having cycle rank 3 (see Fig. 2) and among them we characterize the accessible ones (see Figs. 3 and 4). This represents a further step in the study of graphs with a given cycle rank, following the 3rd author’s works done in [17, 18], where he classifies the complete intersection ideals by means of cycle rank (0 in that case), and all the Cohen–Macaulay binomial edge ideals associated with graphs having cycle rank 1 and 2. Moreover, we observe that the number of blocks with whiskers of a given cycle rank is finite (Lemmas 3 and 4). We define a rich family of blocks with whiskers of a given cycle rank that we call chain of cycles (see Definition 3), and we provide necessary conditions for being accessible. Finally, under certain hypotheses on the structure of these graphs (see Setup 1), we find an infinite subfamily of chain of cycles G for which all the above-mentioned algebraic and combinatorial properties for G and \(J_G\) are equivalent (see Theorem 3).

In the last section, we give a computational classification of all the indecomposable Cohen–Macaulay binomial edge ideals of graphs with at most 12 vertices (see Theorem 4). This result has been obtained by using a C++ implementation of the algorithms related to the combinatorial properties of accessibility, \((S_2)\)-condition and strongly unmixedness. The implementation is freely downloadable from the website [12]. This computation and Theorem 2 lead us to the following.

Conjecture 1 Let G be a graph. Then, G is accessible if and only if \(S/J_G\) satisfies Serre’s condition \((S_2)\).

In [2], the authors conjecture that accessible graphs are the only with Cohen–Macaulay binomial edge ideal. Our computation supports this conjecture. Finally, among the blocks that, after adding suitable whisker, satisfy Theorem 4 we find two polyhedral graphs; hence, Question 1 naturally arises.

2 Preliminaries

In this section, we recall some concepts and notation on graphs, simplicial complexes and binomial edge ideals that we will use in the article (see also [3, 9, 16, 19]).

Throughout this work, all graphs will be finite and simple, namely undirected graphs with no loops nor multiple edges. Given a graph G, we denote by V(G) and E(G) its vertex and edge set, respectively. Let G be a graph with vertex set \([n] = \{1, \dots , n\}\). If \(e = \{u,v\} \in E(G)\), with \(u,v \in V(G)\), we say that u and v are adjacent and the edge e is incident with u and v. We denote by \(N_G(v)\) (or simply N(v) if G is clear from the context) the set of vertices of G adjacent to v. The degree of \(v \in V(G)\), denoted by \(\deg _G v\) or simply \(\deg v\) when the graph G is clear from the context, is the number of edges of G incident with v. An edge \(\{u,v\} \in E(G)\), where \(\deg v = 1\), is called whisker on u. Given \(u,v \in V(G)\), a path from v to u of length r is a sequence of vertices \(v=v_0, \dots , v_r=u \in V(G)\), such that for each \(1 \le i,j \le r, \{v_{i-1},v_i\} \in E(G)\) and \(v_i \ne v_j\) if \(i\ne j\). A subset C of V(G) is called a clique of G if for all \(u, v \in C\), with \(u \ne v\), one has \(\{u,v\} \in E(G)\). A maximal clique is a clique that cannot be extended by including one more adjacent vertex. A vertex v is called free vertex of G if it belongs to only one maximal clique; otherwise, it is called an inner vertex of G.

If \(T \subseteq V(G)\), we denote by \(G \setminus T\) the induced subgraph of G obtained by removing from G the vertices of T and all the edges incident in them. A set \(T \subset V(G)\) is called cutset of G if \(c_G(T \setminus \{v\}) < c_G(T)\) for each \(v \in T\), where \(c_G(T)\) (or simply c(T), if the graph is clear from the context) denotes the number of connected components of \(G \setminus T\). We denote by \({\mathcal {C}}(G)\) the set of all cutsets of G. When \(T \in {\mathcal {C}}(G)\) consists of one vertex v, v is called a cutpoint. A connected induced subgraph of G that has no cutpoint and is maximal with respect to this property is called a block.

A subgraph H of G spans G if \(V(H) = V(G)\). In a connected graph G, a chord of a tree H that spans G is an edge of G not in H. The number of chords of any spanning tree of a connected graph G, denoted by m(G), is called the cycle rank of G, and it is given by \(m(G) = |E(G)| - |V (G)| + 1\).

Let \(S = {\mathbb {K}}[\{x_i, y_j\}_{1 \le i,j \le n}]\) be the polynomial ring in 2n variables with coefficients in a field \({\mathbb {K}}\). Define \(f_{ij} = x_iy_j - x_jy_i \in S\). The binomial edge ideal of G, denoted by \(J_G\), is the ideal generated by all the binomials \(f_{ij}\), for \( i<j\) and \(\{i,j\} \in E(G)\).

The cutsets of a graph G are essential tools to describe the primary decomposition and several algebraic properties of \(J_G\). Let \(T \in {\mathcal {C}}(G)\) and let \(G_1, \dots , G_{c(T)}\) denote the connected components of \(G \setminus T\). Let

$$\begin{aligned} P_T(G) = \left( \bigcup _{i \in T} \{x_i, y_i\}, J_{{\tilde{G}}_1}, \dots , J_{{\tilde{G}}_{c(T)}} \right) \subseteq S \end{aligned}$$

where \({\tilde{G}}_i\), for \(i=1, \dots , c(T)\), denotes the complete graph on \(V(G_i)\). In [9, Theorem 3.2], the authors show that the primary decomposition of \(J_G\) is given by

$$\begin{aligned} J_G = \bigcap _{T \in {\mathcal {C}}(G)} P_T(G). \end{aligned}$$
(1)

A graph G is decomposable, if there exist two subgraphs \(G_1\) and \(G_2\) of G, and a decomposition \(G=G_1\cup G_2\) with \(\{v\}=V(G_1)\cap V(G_2)\), where v is a free vertex of \(G_1\) and \(G_2\). If G is not decomposable, we call it indecomposable.

Let H be a graph. The cone G of v on H is the graph with \(V(G)=V(H) \cup \{v\}\) and edges \(E(G)= E(H) \cup \{\{v,w\} \ | \ w \in V (H)\}\).

A cutset T of G is called accessible if there exists \(t \in T\) such that \(T \setminus \{t\} \in {\mathcal {C}}(G)\). A graph G is called accessible if \(J_G\) is unmixed, and \({\mathcal {C}}(G)\) is an accessible set system that is all non-empty cutsets of G are accessible.

To describe the reduced Gröbner basis of \(J_G\), in [9] the following concept has been introduced. Let i and j be two vertices of G with \(i < j\). A path \(i=i_0, i_1, \dots , i_r = j\) from i to j is called admissible if

  1. (i)

    For each \(k=1, \dots , r-1\) one has \(i_k < i\) or \(i_k > j\);

  2. (ii)

    For any \(\{j_1, \dots , j_s\} \subset \{i_1, \dots , i_r\}\), the sequence \(i, j_1, \dots , j_s, j\) is not a path.

Given an admissible path \(\pi : i=i_0, i_1, \dots , i_r = j\) from i to j, where \(i <j\), define the monomial

$$\begin{aligned} u_{\pi } = \left( \prod _{i_k > j} x_{i_k} \right) \left( \prod _{i_\ell < i} y_{i_\ell } \right) . \end{aligned}$$

Theorem 1

Let G be a graph on [n]. Let < be the lexicographic order on S induced by \(x_1> x_2> \cdots> x_n> y_1> \cdots > y_n\). Then, the set

$$\begin{aligned} {\mathcal {G}} = \bigcup _{i<j} \{u_\pi f_{ij} \ | \ \pi \text { is an admissible path from } i \text { to } j\} \end{aligned}$$

is the reduced Gröbner basis of \(J_G\) with respect to <.

A finitely generated graded module M over a Noetherian graded \({\mathbb {K}}\)-algebra R is said to satisfy the Serre’s condition \((S_r)\), or simply M is an \((S_r)\) module if, for all \({\mathfrak {p}} \in \textrm{Spec}(R)\), the inequality

$$\begin{aligned} \textrm{depth}\ M_{{\mathfrak {p}}} \ge \min (r, \dim M_{{\mathfrak {p}}}) \end{aligned}$$

holds. The Serre’s conditions are strictly connected with the Cohen–Macaulayness of a module, in fact M is Cohen–Macaulay if and only if it is an \((S_r)\) module for all \(r \ge 1\).

A simplicial complex \(\Delta \) on the set of vertices [n] is a collection of subsets of [n] which is closed under taking subsets, that is, if \(F \in \Delta \) and \(F' \subseteq F\), then also \(F' \in \Delta \). Every element \(F \in \Delta \) is called a face of \(\Delta \); the size of a face F is defined to be |F|, that is, the number of elements of F, and its dimension is defined to be \(|F| -1\). The dimension of \(\Delta \), which is denoted by \(\dim (\Delta )\), is defined to be \(d-1\), where \(d = \max \{|F| \ | \ F \in \Delta \}\). A facet of \(\Delta \) is a maximal face of \(\Delta \) with respect to inclusion. Let \({\mathcal {F}}(\Delta )\) denote the set of facets of \(\Delta \). It is clear that \({\mathcal {F}}(\Delta )\) determines \(\Delta \). A set \(N \subseteq [n]\) that does not belong to \(\Delta \) is called a nonface of \(\Delta \). We say that \(\Delta \) is pure if all facets of \(\Delta \) have the same size. The link of \(\Delta \) with respect to a face \(F \in \Delta \), denoted by \(\text {lk}_{\Delta }(F)\), is the simplicial complex

$$\begin{aligned} \text {lk}_{\Delta }(F) = \{ G \subseteq [n] \setminus F \ | \ G \cup F \in \Delta \}. \end{aligned}$$

A simplicial complex \(\Delta \) is called connected if, for every \(F,G \in {\mathcal {F}}(\Delta )\), there exists a sequence of facets \(F=F_0, \dots , F_m=G\) such that, for every \(0 \le i,j \le m-1\), we have \(F_i \cap F_{i+1} \ne \emptyset \) and \(F_i \ne F_j\), where \(i \ne j\). We say that the sequence \(F=F_0, \dots , F_m=G\) connects F and G.

Let \(R = {\mathbb {K}}[z_1,\dots , z_k]\) be the polynomial ring in k variables over a field \({\mathbb {K}}\), and let \(\Delta \) be a simplicial complex on [k]. For every \(F\subseteq [k]\), we set \(z_F = \prod _{i \in F} z_i\). The Stanley–Reisner ideal of \(\Delta \) over \({\mathbb {K}}\) is the ideal I of R which is generated by those squarefree monomials \(z_F\) with \(F \not \in \Delta \). In other words, \(I_{\Delta }= (z_F \ | \ F \in {\mathcal {N}}(\Delta ))\), where \({\mathcal {N}}(\Delta )\) denotes the set of minimal nonfaces of \(\Delta \) with respect to inclusion. The Stanley–Reisner ring of \(\Delta \) over \({\mathbb {K}}\), denoted by \({\mathbb {K}}[\Delta ]\), is defined to be \({\mathbb {K}}[\Delta ] = R/I_{\Delta }\).

A simplicial complex \(\Delta \) is said to satisfy Serre’s condition \((S_r)\) over \({\mathbb {K}}\), or simply \(\Delta \) is an \((S_r)\) simplicial complex over \({\mathbb {K}}\), if the Stanley–Reisner ring \({\mathbb {K}}[\Delta ]\) of \(\Delta \) satisfies Serre’s condition \((S_r)\). An immediate consequence of [19, Theorem 1.4] is the following result that provides a useful combinatorial tool to check if \(\Delta \) is \((S_2)\).

Proposition 1

Let \({\mathbb {K}}\) be a field and \(\Delta \) be a simplicial complex. Then, \(\Delta \) is \((S_2)\) over \({\mathbb {K}}\) if and only if, for every face \(F \in \Delta \) with \(\dim (\textrm{lk}_{\Delta }(F)) \ge 1\), the simplicial complex \(\textrm{lk}_{\Delta }(F)\) is connected. In particular, the \((S_2)\) property of a simplicial complex is independent of the base field.

3 Simplicial complex of binomial edge ideals and (\(S_2\))-condition

The aim of this section is to prove that if \(S/J_G\) satisfies the Serre’s condition \((S_2)\), then G is an accessible graph.

Let < be a monomial order on S and \(\textit{in}_<(I)\) denote the initial ideal of an ideal I with respect to <. A consequence of [4, Theorem 1.3] is that, if I is an ideal and \(\textit{in}_<(I)\) is a square-free monomial ideal, then for any \(r \in {\mathbb {N}}\), S/I satisfies Serre’s condition \((S_r)\) if and only if \(S/ \textit{in}_<(I)\) does. Since \(\textit{in}_<(J_G)\) is square-free (see [4, Sect. 3.2]), it follows that to study the \((S_2)\) condition for \(S/J_G\) it is sufficient to study it for \(S/\textit{in}_<(J_G)\).

From now on, we fix the lexicographic order on S induced by \(x_1> x_2> \cdots> x_n> y_1> \cdots > y_n\).

Let \(T \in {\mathcal {C}}(G)\) and let \(G_1, \cdots , G_{c(T)}\) be the connected components induced by T. By Theorem 1, it follows immediately

$$\begin{aligned} \textit{in}_<(J_G) = \left( x_iy_ju_\pi \ | \ \pi \text { is an admissible path from } i \text { to } j, \text { with } i < j\right) , \end{aligned}$$

and

$$\begin{aligned} \textit{in}_<(P_T(G)) = \left( \bigcup _{t \in T} \{x_t, y_t\}\right) + \sum _{k=1}^{c(T)} \left( x_iy_j \ | \ i, j \in V(G_k) \text { and } i <j \right) . \end{aligned}$$

Moreover, thanks to [5, Corollary 1.12, Theorem 2.1], it holds

$$\begin{aligned} \textit{in}_<(J_G)=\bigcap _{T\in {\mathcal {C}}(G)} \textit{in}_<(P_T(G)). \end{aligned}$$
(2)

Define

$$\begin{aligned} P_T({\textbf{v}})=\left( \bigcup _{t\in T} \{x_t,y_t\}\right) +\sum _{k=1}^{c(T)} \left( \{x_i \mid i\in V(G_k), i<v_k\}\cup \{y_j \mid j\in V(G_k), j>v_k\}\right) \end{aligned}$$

where \({\textbf{v}}=(v_1,\ldots ,v_{c(T)})\in V(G_1)\times \cdots \times V(G_{c(T)})\).

Lemma 1

Let G be a graph. Let \(T \in {\mathcal {C}}(G)\) and let \(G_1, \cdots , G_{c(T)}\) be the connected components induced by T. Then,

$$\begin{aligned} \textit{in}_<(P_T(G)) = \bigcap _{{\textbf{v}}\in V(G_1)\times \cdots \times V(G_{c(T)})} P_T({\textbf{v}}). \end{aligned}$$

Proof

\( ``\subseteq '' \) Let u be a generator of \(\textit{in}_<(P_T(G))\). If \(u \in \{x_t, y_t\}\) for \(t \in T\), then \(u \in P_T({\textbf{v}})\), for all \({\textbf{v}}\in V(G_1)\times \cdots \times V(G_{c(T)})\). Let \(u = x_iy_j\), with \(i<j\) and \(i,j \in V(G_k)\), for some \(k=1, \dots , c(T)\), and consider \(v_k\), the k-th component of \({\textbf{v}}\). When \(v_k \le i\), then \(y_j \in P_T({\textbf{v}})\), when \(v_k >i\), then \(x_i \in P_T({\textbf{v}})\). Hence, the monomial \(x_iy_j \in P_T({\textbf{v}})\) for all \({\textbf{v}}\in V(G_1)\times \cdots \times V(G_{c(T)})\).

\(`` \supseteq ''\) Let u be a generator of \(\bigcap _{{\textbf{v}}\in V(G_1)\times \cdots \times V(G_{c(T)})} P_T({\textbf{v}})\). If \(x_t\) divides u, for some \(t\in T\), then \(u \in \textit{in}_<(P_T(G))\), as well. Assume that \(x_t\) does not divide u, for any \(t\in T\).

For \(k=1, \dots , c(T)\), denote \(J_k =\left( \{x_iy_j \ | \ i,j \in V(G_k) \text { and } i<j\right\} )\) and \(I_{v_k} = \left( \{x_i \mid i\in V(G_k), i<v_k\}\cup \{y_j \mid j\in V(G_k), j>v_k\}\right) \), for \(v_k \in V(G_k)\). Then,

$$\begin{aligned} \textit{in}_<(P_T(G)) = \left( \bigcup _{t\in T} \{x_t,y_t\}\right) +\sum _{k=1}^{c(T)} J_k \end{aligned}$$

and

$$\begin{aligned} P_T({\textbf{v}}) = \left( \bigcup _{t\in T} \{x_t,y_t\}\right) +\sum _{k=1}^{c(T)} I_{v_k}. \end{aligned}$$

Note that \(I_{v_k}\) and \(J_{k}\) are both ideals of \(S_k = {\mathbb {K}}[x_i, y_i]_{i \in V(G_k)} \subset S\). Moreover, \(I_{v_k}\) and \(I_{v_h}\), with \(v_k \in G_k\), \(v_h \in G_h\) and \(k \ne h\), are defined on disjoint sets of variables, and the same holds for the \(J_k\)’s. It is sufficient to prove that

$$\begin{aligned} J_k \supseteq \bigcap _{v_k \in V(G_k)} I_{v_k}. \end{aligned}$$

Let \(u \in \bigcap _{v_k \in V(G_k)} I_{v_k}\). Note that u cannot be the product of only \(x_i\)’s (resp. \(y_j\)’s). Indeed, when \(v_k = \min \{a \ | \ a \in V(G_k)\}\) (resp. \(v_k = \max \{b \ | \ b \in V(G_k)\}\)), then no \(x_i\) belongs to \(I_{v_k}\) (resp. no \(y_j\) belongs to \(I_{v_k}\)). Now, suppose, by contradiction, that for any \(x_iy_j\) that divides u, it holds \(i >j\). Set \(v_k = \min \{i \ | \ x_i \text { divides } u \}\). Then, all the \(x_i\)’s and \(y_j\)’s that divide u do not belong to \(I_{v_k}\), namely \(u \not \in I_{v_k}\). It follows that if \(x_iy_j\) divides u, then \(i<j\) and \(u \in J_k\). \(\square \)

Let \(T \in {\mathcal {C}}(G)\) and let \(G_1, \dots , G_{c(T)}\) denote the connected components of \(G \setminus T\). For \(i=1, \dots , c(T)\), let \(|V(G_i)| = m_i\) and \(V(G_i) = \{v_1^i, \dots , v_{m_i}^i\}\). Given \({\textbf{v}}= \left( v_{j_1}^1, \dots , v_{j_{c(T)}}^{c(T)}\right) \in V(G_1) \times \cdots \times V(G_{c(T)})\), define

$$\begin{aligned} F(T, {\textbf{v}}) = \bigcup _{i= 1}^{c(T)} \left( \left\{ y_j \ | \ j \in V(G_i) \text { and } j \le v_{j_i}^i \right\} \cup \left\{ x_j \ | \ j \in V(G_i) \text { and } j \ge v_{j_i}^i \right\} \right) . \end{aligned}$$

Since \(\textit{in}_<(J_G)\) is a squarefree monomial ideal, then there exists a unique simplicial complex \(\Delta _{<}\) such that \(\textit{in}_<(J_G) = I_{\Delta _{<}}\). Putting together Equation (2), Lemma 1, and [20, Proposition 6.3.4], we obtain the following description of \(\Delta _{<}\).

Corollary 1

Let G be a graph. Then, \(\textit{in}_<(J_G) = I_{\Delta _{<}}\), where

$$\begin{aligned} {\mathcal {F}}(\Delta _{<})=\bigcup _{T\in {\mathcal {C}}(G)} \{ F(T, {\textbf{v}}) \ | \ {\textbf{v}}\in V(G_1)\times \cdots \times V(G_{c(T)}) \} . \end{aligned}$$

For a graded S-module M of dimension d we denote the Hilbert series of M by \(H(t) = \sum _{i=0}^d (h_i(M)) t^i/(1-t)^d\) and its h-vector by \(h=(h_0,\ldots ,h_d)\). The following well-known formula relates the f-vector \((f_0, \dots , f_{d-1})\) with the h-vector of a \((d-1)\)-dimensional simplicial complex \(\Delta \):

$$\begin{aligned} h_k=\sum _{i=0}^{k}(-1)^{k-i}\left( {\begin{array}{c}d-i\\ k-i\end{array}}\right) f_{i-1}, \ \text { for } k=0, \dots , d. \end{aligned}$$
(3)

In [1], the authors provide a formula to compute the multiplicity of \(S/J_G\). By knowing \(\Delta _{<}\) such that \(\textit{in}_<(J_G) = I_{\Delta _{<}}\) and by Equation (3), one can easily obtain another simple way to get the multiplicity.

In the following, we deeply use the simplicial complex \(\Delta _{<}\) defined in Corollary 1 to prove that if \(S/J_G\) satisfies the Serre’s condition \((S_2)\), then the graph G is accessible. Nevertheless, we observe that the simplicial complex is strongly related to the chosen monomial order also for very simple graphs, as the following example shows.

Example 1

Let \(G=P_2\) be the path on 3 vertices with \(E(G) = \{\{1,2\}, \{2, 3\}\}\) and fix the lexicographic order on S induced by \(x_1> x_2> x_3> y_1> y_2 > y_3\). Then, \({\mathcal {C}}(G) =\{ \emptyset , \{2\}\}\) and \(I_{\Delta _{<}} = (x_1y_2, x_2y_3)\), where

$$\begin{aligned} {\mathcal {F}} (\Delta _{<})&= \{F(\emptyset , (1)), F(\emptyset , (2)), F(\emptyset , (3)), F(\{2\}, (1,3))\} \\&= \{ \{x_1,y_1,x_2,x_3\}, \{y_1,x_2,y_2,x_3\}, \{y_1,y_2,x_3,y_3\}, \{x_1,y_1,x_3,y_3\}\}. \end{aligned}$$

One can immediately observe that all the facets in \(\Delta _{<}\) contain the variables \(y_1\) and \(x_3\). Consider now the same graph but with a different vertex labeling with \(E(G) = \{\{1,3\}, \{2, 3\}\}\). Fix the same term order for S. Then, \({\mathcal {C}}(G) =\{ \emptyset , \{3\}\}\) and \(I_{\Delta _{<}} = (x_1y_3, x_2y_3, x_1y_2x_3)\), where

$$\begin{aligned} {\mathcal {F}} (\Delta _{<})&= \{F(\emptyset , (1)), F(\emptyset , (2)), F(\emptyset , (3)), F(\{3\}, (1,2))\} \\&= \{ \{x_1,y_1,x_2,x_3\}, \{y_1,x_2,y_2,x_3\}, \{y_1,y_2,x_3,y_3\}, \{x_1,y_1,x_2,y_2\}\}. \end{aligned}$$

In this case, only the variable \(y_1\) is contained in all the facets of \(\Delta _{<}\). This implies that the two simplicial complexes are not isomorphic.

Lemma 2

Let G be a graph such that \(J_G\) is unmixed. Let \(T \in {\mathcal {C}}(G)\) and \(v \in T\) be a cutpoint of G. Let \(H_1\) and \(H_2\) be the two connected components of \(G \setminus \{v\}\). For \(i=1,2\), define \(T_i = T \cap V(H_i)\). The following facts hold:

  1. (i)

    For \(i=1,2\), \(T_i \cup \{v\} \in {\mathcal {C}}(G)\);

  2. (ii)

    If \(T_1 \cup \{v\}\) and \(T_2 \cup \{v\}\) are accessible, then T is accessible.

Proof

First of all, we may assume \(|T|>1\). Indeed, if \(|T| =1\), then \(T=\{v\}\) and the statement follows trivially. For \(i=1,2\), let \(S_i = T_i \cup \{v\}\). Let \(\{H_{1,1}, \dots , H_{1,s}, H_{2,1}, \dots , H_{2,t}\}\) denote the connected components of \(G \setminus T\), where \(H_{1,i}\) and \(H_{2,j}\) are induced subgraphs of \(H_1\) and \(H_2\), respectively.

  1. (i)

    The connected components of \(G \setminus S_1\) are \(\{H_{1,1}, \dots , H_{1,s}, H_2\}\). Suppose, by contradiction, that \(S_1\) is not a cutset of G. This means that there exists \(W = \{w_1, \dots , w_k\} \subseteq S_1\), with \(k \ge 1\), such that \(c(S_1) = c(S_1 \setminus W)\) and \(S_1 \setminus W \in {\mathcal {C}}(G)\). If either \(k > 1\) or \(k=1\) and \(w_1 \ne v\), then the connected components of \(G \setminus (S_1 \setminus \{W\})\) are \(\{H^\prime _2, H^\prime _{1,1},\dots , H^\prime _{1,s}\}\). Then, the connected components of \(T \setminus W\) are \(\{H^\prime _{1,1},\dots , H^\prime _{1,s},H_{2,1}, \dots , H_{2,t}\}\), that is \(c(T) = c (T \setminus W) = s+t\), which is a contradiction since T is supposed to be a cutset. If \(k=1\) and \(w_1 = v\), the connected components of \(G \setminus (S_1\setminus \{v\})\) are \(\{H_2 \cup \{v\}, H_{1,1}, \dots , H_{1,s}\}\). Note that the connected component that contains v cannot have vertices of \(H_1\), otherwise, as v is a cutpoint that induces \(H_1\) and \(H_2\), then v induces two connected components in \(G \setminus (S_1 \setminus \{v\})\), and then \(S_1\) should be a cutset. Since \(J_G\) is unmixed and \(c(S_1\setminus \{v\}) = s+1\), then \(|S_1\setminus \{v\}|=s\). If \(S_2 \in {\mathcal {C}}(G)\), then \(c(S_2) = t+1\) and hence \(|S_2|=t\). It follows that \(|T|=|S_1\setminus \{v\}|+|S_2| = s+t\), but \(c(T) = s+t\) contradicting the hypothesis on the unmixedness of \(J_G\). If \(S_2 \not \in {\mathcal {C}}(G)\), then, by repeating the same argument done for \(S_1\), we get that \(|S_2\setminus \{v\}|=t\). Therefore, \(|T| = |S_1\setminus \{v\}|+|S_2\setminus \{v\}|+1 = s+t+1\), which is again a contradiction. We conclude that both \(S_1\) and \(S_2\) are cutsets of G.

  2. (ii)

    By hypothesis, both \(S_1\) and \(S_2\) are accessible, which implies there exist \(v_1 \in S_1\) and \(v_2 \in S_2\) such that \(S_1 \setminus \{v_1\}, S_2 \setminus \{v_2\} \in {\mathcal {C}}(G)\). Moreover, since \(J_G\) is unmixed and by (i), it holds \(|S_1| = s, |S_2| = t\), and \(|T|=s+t-1\). If at least one between \(v_1\) and \(v_2\) is not v, assume \(v_1 \ne v\), then \(c(G \setminus (S_1 \setminus \{v_1\}))=s\) and, up to relabeling, the connected components are \(\{H_{1,1} \cup H_{1,2} \cup \{v_1\}, H_{1,3} \dots , H_{1,s}, H_2\}\). Therefore, the connected components of \(T \setminus \{v_1\}\) are \(\{H_{1,1} \cup H_{1,2} \cup \{v_1\}, H_{1,3} \dots , H_{1,s}, H_{2,1}, \dots , H_{2,t} \}\), that is \(c(T \setminus \{v_1\}) = s+t-1\). If \(v_1 = v_2 = v\), then the connected components of \(G \setminus T_1\) and \(G \setminus T_2\) are \(\{H_2 \cup \{v\} \cup H_{1,1}, \dots , H_{1,s}\}\) and \(\{H_1 \cup \{v\} \cup H_{2,1}, \dots , H_{2,t}\}\), respectively. It follows that the connected components of \(G \setminus (T \setminus \{v\})\) are, up to relabeling, \(\{H_{1,1} \cup H_{2,1} \cup \{v\}, H_{1,2}, \dots , H_{1,s}, H_{2,2}, \dots , H_{2,t}\}\), that is \(c(T \setminus \{v_1\}) = s+t-1\). In both cases, if \(T \setminus \{v_1\}\) is not a cutset, there should exist a cutset \(T' \subset T \setminus \{v_1\}\) with less than \(s+t-2\) vertices, which induces \(s+t-1\) connected components, which contradicts that \(J_G\) is unmixed. So, we have obtained that \(T \setminus \{v_1\}\) is a cutset, namely T is accessible.

\(\square \)

Remark 1

Let G be a graph and \(T \in {\mathcal {C}}(G)\). If all the cutset \(T'\), with \(T' \subseteq T\), are accessible, then T contains a cutpoint. The proof of this fact is the same of [2, Lemma 4.1], but for the sake of completeness we will report it here. To prove it, we proceed by induction on the cardinality of |T|. If \(|T| = 1\), the claim follows. Otherwise, since T is accessible, there exists \(v \in T\) such that \(T \setminus \{v\} \in {\mathcal {C}}(G)\). By induction, there exists a cutpoint \(w \in T \setminus \{v\}\) and the same holds for T.

Theorem 2

Let G be a graph such that \(S/J_G\) satisfies the Serre’s condition \((S_2)\). Then, G is an accessible graph.

Proof

To prove the statement, we suppose that G is not accessible and we show that \(S/J_G\) does not satisfy the Serre’s condition \((S_2)\). If G is not accessible, then \(J_G\) is not unmixed or \({\mathcal {C}}(G)\) is not an accessible set system. If \(J_G\) is not unmixed, then it is known that the \((S_2)\)-condition is not satisfied. Hence, we can suppose that \(J_G\) is unmixed but \({\mathcal {C}}(G)\) is not an accessible set system. Let \(T \in {\mathcal {C}}(G)\) be the non-empty cutset with the minimum cardinality such that \(T \setminus \{v\} \not \in {\mathcal {C}}(G)\), for every \(v \in T\). Let \(T = \{w_1, \dots , w_k\}\), with \(k >1\), and, since \(J_G\) is unmixed, \(G\setminus T\) has \(k+1\) connected components, say \(G_1, \dots , G_{k+1}\). For \(i=1, \dots , k+1\), let \(|V(G_i)| = m_i\) and \(V(G_i) = \{v_1^i, \dots , v_{m_i}^i\}\).

Fix the lexicographic order on S induced by the total order

$$\begin{aligned} w_1< \cdots< w_k< v_1^1< \dots<v_{m_1}^1< \cdots< v_1^{k+1}< \dots < v_{m_{k+1}}^{k+1} \end{aligned}$$
(*)

Thanks to [4, Theorem 1.3], it is sufficient to prove that \(S/\textit{in}_<(J_G)\) does not satisfies the Serre’s condition \((S_2)\).

Consider \({\textbf{v}}= (v_{m_1}^1 , \dots , v_{m_{k+1}}^{k+1}) \in V(G_1) \times \cdots \times V(G_{k+1})\) and

$$\begin{aligned} F(T, {\textbf{v}}) = \bigcup _{i =1}^{k+1} \left\{ y_{v_1^i}, \dots , y_{v_{m_i}^i}, x_{v_{m_i}^i}\right\} \in {\mathcal {F}}(\Delta _{<}). \end{aligned}$$

The set

$$\begin{aligned} F= \bigcup _{i =1}^{k} \left\{ y_{v_1^i}, \dots , y_{v_{m_i}^i} \right\} \cup \left\{ y_{v_1^{k+1}}, \dots , y_{v_{m_{k+1}}^{k+1}}, x_{v_{m_{k+1}}^{k+1}}\right\} \end{aligned}$$

is a subset of \(F(T, {\textbf{v}})\), that is a face of \(\Delta _{<}\). Consider the link of \(\Delta _{<}\) with respect to F. The sets \(A = \{x_{v_{m_1}^1}, \dots , x_{v_{m_k}^k}\}\) and \(B = \{y_{w_1}, \dots , y_{w_k}\}\) belong to \(\text {lk}_{\Delta _{<}}(F)\). In fact, \(A \cap F = \emptyset \) and \(A \cup F = F(T, {\textbf{v}}) \in {\mathcal {F}}(\Delta _{<})\), whereas, thanks to the order \((\star )\), \(B \cap F = \emptyset \) and \(B \cup F = F(\emptyset , {\textbf{u}}) \in {\mathcal {F}}(\Delta _{<})\), where \({\textbf{u}} = (v_{m_{k+1}}^{k+1})\). Since \(|A| = |B| = k >1\), it follows \(\dim \textrm{lk}_{\Delta _{<}}(F) \ge 1\). Assume, by contradiction, that \(\text {lk}_{\Delta _{<}}(F)\) is connected, that is there exists a sequence of facets \(A = F_0, F_1, \dots , F_{t+1} = B\) of \(\text {lk}_{\Delta _{<}}(F)\) such that, for every \(0 \le i < j \le t+1\), \(F_i \cap F_{i+1} \ne \emptyset \) and \(F_i \ne F_j\). First of all, suppose that \(|F_{t} \cap B| = 1\) and \(F_{t} \cap B = \{y_{w_i}\}\), for some \(i=1, \dots , k\). Up to a relabeling of the \(w_i\)’s, assume \(i=k\). Then, there exists \(F(T',\mathbf {\overline{v}}) \in {\mathcal {F}}(\Delta _{<})\) such that \(F(T',\mathbf {\overline{v}}) = F_t \cup F\). Note that \(y_{w_k} \in F(T',\mathbf {\overline{v}})\) but \(y_{w_j} \not \in F(T',\mathbf {\overline{v}})\), for \(1 \le j < k\), otherwise \(|F_t \cap B| >1\). Since \(y_{w_j} \not \in F(T',\mathbf {\overline{v}})\), for \(1 \le j < k\), and \(y_{v} \in F(T',\mathbf {\overline{v}})\), for \(v \in (V(G) \setminus T) \cup \{w_k\}\), that is \(v \ge w_k\), then, by definition of facets of \(\Delta _<\) and due to the order \((\star )\), \(x_{w_j} \not \in F(T',\mathbf {\overline{v}})\), for \(1 \le j < k\). From the fact that \(x_{w_j}, y_{w_j} \not \in F(T',\mathbf {\overline{v}})\), for \(1 \le j < k\), it follows that \(T' = \{w_1, \dots , w_{k-1}\}\). This implies that \(T' = T \setminus \{w_k\} \in {\mathcal {C}}(G)\), but this is in contradiction with the hypothesis that T is not an accessible cutset.

Now, suppose that \(|F_{t} \cap B| > 1\). Note that \(|F_{t} \cap B| <k\), otherwise \(F_{t} \cap B= B\), that is \(F_t = F_{t+1} =B\), which contradicts the hypothesis on \(F_i\). Up to a relabeling of the \(w_i\)’s, assume \(F_{t} \cap B= \{y_{w_a}, \dots , y_{w_k}\}\), with \(1<a<k\). There exists \(F(T'',\mathbf {\overline{v}'}) \in {\mathcal {F}}(\Delta _{<})\) such that \(F(T'',\mathbf {\overline{v}'}) = F_t \cup F\). For \(i <a\), it holds \(y_{w_i} \not \in F_t\), hence \(y_{w_i} \not \in F(T'',\mathbf {\overline{v}'})\). Due to the order \((\star )\), \(x_{w_i} \not \in F(T'',\mathbf {\overline{v}'})\), for \(1 \le i < a\). Therefore, \(x_{w_i}, y_{w_i} \not \in F(T'',\mathbf {\overline{v}'})\) for \(1 \le i < a\) and \(T'' = \{w_{1}, \dots , w_{a-1}\}\). By hypothesis, T is the smallest not accessible cutset, then any cutset which is a proper subset of T is accessible. Since \(T'' \subset T\), then \(T''\) is accessible and, by Remark 1, \(T''\) contains a cutpoint, we say \(w_{1}\). Then, \(w_{1}\) induces two connected components, \(H_1\) and \(H_2\). Let \(T_i = T \cap V(H_i)\), for \(i=1,2\). By Lemma 2(i), for \(i=1,2\), \(T_i \cup \{w_{1}\}\) is a cutset of G. By the minimality of T, both \(T_1 \cup \{w_{1}\}\) and \(T_2 \cup \{w_{1}\}\) are accessible cutsets of G. By Lemma 2(ii), also T is an accessible cutset, which is a contradiction.

It follows that \(\text {lk}_{\Delta _{<}}(F)\) is not connected, and then \(S/\textit{in}_<(J_G)\) does not satisfy the Serre’s condition \((S_2)\).

\(\square \)

Remark 2

Let G be a graph on [n], with \(n \le 12\), such that \(J_G\) is unmixed. For all monomial orders < and all \(F \in \Delta _<\) such that \(\dim F < \lceil \frac{n+1}{2} \rceil \), it holds that \(\textrm{lk}_{\Delta _<}(F)\) is connected. To verify this fact, we have implemented a computer program, see [12], that checks the Serre’s condition \((S_2)\) for \(S/J_G\). In particular, there exists a unique family of graphs such that \(\textrm{lk}_{\Delta _<}(F)\) is disconnected for \(F \in \Delta _<\) with \(\dim F = \lceil \frac{n+1}{2} \rceil \), that is the one in Example 2.

Example 2

Let \(s\ge 1\) and \(n\ge 3\). Let G be a graph on [n] obtained by joining \(s+1\) complete graphs \(G_1, \dots , G_{s+1}\) such that

$$\begin{aligned} G_i \cong K_{s+1} \text { for } i=1, \dots , s, \; \text { and } \; G_{s+1} \cong {\left\{ \begin{array}{ll} K_{s+1} &{} \text { if } n \text { is odd}, \\ K_{s+2} &{} \text { if } n \text { is even}, \end{array}\right. } \end{aligned}$$

and \(G_i \cap G_j = H\), where \(H = K_s\), for all \(1 \le i < j \le s+1\). See Fig. 1 for an example, with \(n=7\) (Fig. 1A) and \(n=8\) (Fig. 1B).

Fig. 1
figure 1

Graphs (A) and (B) belong to the family described in Example 2

Note that for each \(n\ge 3\), there exists such a graph with n vertices and it is unique. In particular, if n is odd, then \(n=2s+1\), otherwise \(n=2s+2\). We observe that \({\mathcal {C}}(G) = \{\emptyset , T\}\), where \(T = V(H)\). Moreover, \(J_G\) is unmixed but G is a block that is not a complete graph; hence, \(J_G\) is not Cohen–Macaulay by [1].

Fix the lexicographic order on S induced by \(x_1> \cdots> x_n> y_1> \cdots > y_n\). Let \(V(H) = \{n-s+1, \dots , n\}\), and consider \(F = \{y_1, \dots , y_{n-s}, x_{n-s}\} \in \Delta _<\). Let \(n \ge 3\) be an odd integer. In this case, \(\dim F = n-s = \frac{n+1}{2}\). The facets of the link of F in \(\Delta _<\) are only two: \(F(\emptyset , n-s)\setminus F\) and \(F(T,(1, \dots , n-s)) \setminus F \), which are respectively \( \{x_{n-s+1}, \dots , x_n\}\) and \(\{x_1, \dots , x_{n-s-1}\}\) and they are obviously disjoint. It follows that \(\textrm{lk}_{\Delta _<}(F)\) is disconnected.

Let \(n \ge 3\) be even. Here, \(\dim F = \lceil \frac{n+1}{2} \rceil \). Let \(V(G_{s+1}) = \{n-s, n-s-1\} \cup V(H)\). The facets of the link of F in \(\Delta _<\) are only two: \(F(\emptyset , n-s)\setminus F\) and \(F(T,(1, \dots , n-s-2, n-s)) \setminus F \), which are respectively \( \{x_{n-s+1}, \dots , x_n\}\) and \(\{x_1, \dots , x_{n-s-2}\}\) and they are obviously disjoint. It follows that \(\textrm{lk}_{\Delta _<}(F)\) is disconnected.

Let G be a graph such that \(J_G\) is unmixed. The following result states that to verify the Serre’s condition \((S_2)\) for \(S/J_G\) is not necessary to check the link of all the faces F of \(\Delta _{<}\).

Proposition 2

Let G be a graph on [n] such that \(J_G\) is unmixed. Let \(F = \{x_{i_1}, \dots , x_{i_t}, y_{j_1}, \dots , y_{j_s}\} \in \Delta _{<}\), with \(1 \le j_1< \cdots< j_s< i_1< \cdots < i_t \le n\), for \(1 \le s,t \le n\), and \(\dim F \le n -2\). Then, \(\textrm{lk}_{\Delta _<}(F)\) is connected.

Proof

Let \(F = \{x_{i_1}, \dots , x_{i_t}, y_{j_1}, \dots , y_{j_s}\} \in \Delta _{<}\), with \(1 \le j_1< \cdots< j_s< i_1< \cdots < i_t\le n\), for \(1 \le s,t \le n\), and \(\dim F \le n -2\). Let \(F_1, F_2\) be facets of \(\text {lk}_{\Delta _<}(F)\). If \(F_1 \cap F_2 \ne \emptyset \), then they are connected and there is nothing to prove. Therefore, we may assume that \(F_1 \cap F_2 = \emptyset \). \(F \cup F_1\) and \(F \cup F_2\) are facets of \(\Delta _{<}\) and both of them contain \(y_{j_s}\), since \(y_{j_s} \in F\) by hypothesis. Due to Corollary 1, there exist \(x_a \in F\cup F_1\) and \(x_b \in F \cup F_2\) such that \(j_s \le a,b \le i_1\). Let \(a = \min \{a \ | \ x_a \in F \cup F_1 \text { and } j_s \le a \le i_1\}\) and \(b = \min \{b \ | \ x_b \in F \cup F_2 \text { and } j_s \le b \le i_1\}\).

Note that, if \(a=b=i_1\), then \(y_{i_1} \in F\cup F_i\), for \(i=1,2\), but \(y_{i_1} \not \in F\), then \(y_{i_1} \in F_1 \cap F_2\), which is a contradiction since \(F_1\) and \(F_2\) are supposed to be disjoint. Moreover, if \(a, b < i_1\) and \(a=b\), then \(x_a \in F_1 \cap F_2\), which is a contradiction, as well. Therefore, let \(a\ne b\), and, without loss of generality, suppose \(a<b\). Consider the facets \(F(\emptyset ,{\textbf{v}})\), for \(a \le {\textbf{v}}\le b\), namely \(F(\emptyset ,{\textbf{v}})= \{x_i \ | \ {\textbf{v}}\le i \le n\} \cup \{y_j \ | \ 1 \le j \le {\textbf{v}}\}\). Note that, for all \(a \le {\textbf{v}}\le b\), \(F(\emptyset , {\textbf{v}}) \cap F = F\), hence \(\overline{F}_{{\textbf{v}}} = F(\emptyset , {\textbf{v}}) \setminus F = \{x_i \ | \ {\textbf{v}}\le i \le n, \ i\ne i_1, \dots , i_t\} \cup \{y_j \ | \ 1 \le j \le {\textbf{v}}, \ j \ne j_1, \dots , j_s\}\) is a facet of \(\text {lk}_{\Delta _<}(F)\). Consider the sequence \(F_1, \overline{F}_a, \overline{F}_{a+1},\dots , \overline{F}_b, F_2\) of facets of \(\text {lk}_{\Delta _<}(F)\). Note that \(F_1 \cap \overline{F}_a \supseteq \{x_a\}\) and \(\overline{F}_b \cap F_2 \supseteq \{y_b\}\). If \(i_1 = j_s +1\), then \(a =j_s\) and \(b=i_1\), since \(\dim F \le \dim \Delta _{<} -2\), there exists either \(i^* > i_1\) such that \(x_{i^*} \not \in F\) or \(j^* < j_s\) such that \(y_{j^*} \not \in F\). It follows that either \(\overline{F}_a \cap \overline{F}_b \supseteq \{x_{i^*}\}\) or \(\overline{F}_a \cap \overline{F}_b \supseteq \{y_{j^*}\}\), that is \(F_1, \overline{F}_a, \overline{F}_b, F_2\) is a sequence of facets of \(\text {lk}_{\Delta _<}(F)\) that connects \(F_1\) and \(F_2\). If \(i_1 \ne j_s +1\) and \(a+1 \ne i_1\), it holds \(\overline{F}_a \cap \overline{F}_{a+1} \supseteq \{x_{a+1}\}\) and \(\overline{F}_i \cap \overline{F}_{i+1} \supseteq \{y_i\}\) for all \(i = a+1, \dots , b-1\). If \(i_1 \ne j_s +1\) and \(a+1 = b = i_1\), then \(\overline{F}_a \cap \overline{F}_b = \{y_{i_1}\}\). Hence, \(F_1, \overline{F}_a, \overline{F}_{a+1},\dots , \overline{F}_b, F_2\) is a sequence of facets of \(\text {lk}_{\Delta _<}(F)\) that connects \(F_1\) and \(F_2\). Therefore, \(\text {lk}_{\Delta _<}(F)\) is connected. \(\square \)

4 Accessible blocks with whiskers

In this section, we study a particular class of accessible graphs. We know from [2, Remark 4.2] that if an accessible graph is a block, then it is a complete graph. It arises a natural question:

“Under which hypotheses a block with whiskers is accessible?”

Let G be a connected graph such that \(J_G\) is unmixed and B be a block of G. Denote by \(W=\{w_1,\dots ,w_r\}\) the set of cutpoints of G which are vertices of B. Then,

$$\begin{aligned} G=B \cup \left( \bigcup _{i=1}^r G_i\right) \end{aligned}$$
(4)

where \(V(G_i)\cap V(B)=\{w_i\}\) for \(i=1,\ldots ,r\), and \(B\setminus W, G_1\setminus \{w_1\}, \dots , G_r\setminus \{w_r\}\) are the connected components of \(G \setminus W\).

By the decomposition (4), we define a block with whiskers, namely \(\overline{B}\), a graph obtained, roughly speaking, by replacing each subgraph \(G_i\) with a whisker. That is

  1. 1.

    \(V(\overline{B})=V(B)\cup \{f_1,\ldots ,f_r\}\);

  2. 2.

    \(E(\overline{B})=E(B)\cup \{\{w_i,f_i\} \ | \ i=1,\ldots , r\}\).

Note that \(V(\overline{B}) = V(G)/\sim \), where the relation \(\sim \) identifies each vertex of B with itself and, for \(i=1,\dots ,r\), if \(a,b\in V(G_i)\setminus \{w_i\}\), then \(a\sim b\), and we denote by \(f_i\) the equivalence class of \(V(G_i)\setminus \{w_i\}\).

Proposition 3

Let G be an accessible graph and let B be a block of G. The graph \(\overline{B}\) constructed as above is accessible.

Proof

Let \(\pi : V(G) \rightarrow V(G)/\sim \) be the canonical projection. Let \(T \in {\mathcal {C}}(\overline{B})\). By construction, for any \(i=1,\ldots , r\) \(f_i\) is a free vertex of \(\overline{B}\), hence \(T\subset V(B)\). Denote by \(\overline{\pi }\) the restriction of \(\pi \) to \(V(G)\setminus T\). We prove that \(\overline{\pi }\) induces a bijection between the connected components of \(G\setminus T\) and the ones of \(\overline{B}\setminus T\).

Let A be a connected component of \(G\setminus T\). For any \(i=1,\ldots , r\), let \(G_i\) be the connected component of \(G \setminus W\), where W is the set of all the cutpoints of \(\overline{B}\). Let \(a,b \in A\), and \(a , a_1, \dots , a_\ell , b\) be a path in \(V(G)\setminus T\) from a to b. If a and b belong to the same \(G_i\), then \(\overline{\pi }(a) = \overline{\pi }(a_j) = \overline{\pi }(b) = f_i\), for all \(j =1, \dots , \ell \). Therefore, they are obviously connected in \(\overline{B}\setminus T\). If \(a \in B\), and \(b \in G_i\), then there exists j such that \(a_j, \dots , a_{\ell } \in G_i \cup \{w_i\}\) with, in particular, \(a_j = w_i\). Then, \(\overline{\pi }(a) = a, \overline{\pi }(a_1) = a_1, \dots , \overline{\pi }(a_{j-1})=a_{j-1}, f_i\) is a path from \(\overline{\pi }(a)\) and \(\overline{\pi }(b)=f_i\). The other cases follow by the same argument. Therefore, if A is a connected component of \(G\setminus T\), then \(\overline{\pi }(A)\) is a connected component of \(\overline{B}\setminus T\).

Let D be a connected component of \(\overline{B}\setminus T\). Let \(c,d \in D\) and let \(c,u_1,\dots , u_{\ell },d\) be a path in D from c to d. Note that, by the definitions of path and \(\overline{B}\), for \(i=1, \dots , \ell \), \(u_i \in V(B)\setminus T\), that is \(\overline{\pi }^{-1}(u_i)=u_i\). If \(c = f_j\) (resp. \(d = f_j\)) for some \(j=1,\dots ,r\), then set \(\overline{\pi }^{-1}(c) = v\) (resp. \(\overline{\pi }^{-1}(d) = v\)), where \(v \in V(H_j)\) and \(\{w_j, v \}\in E(G)\). Otherwise, \(\overline{\pi }^{-1}(c) = c\) (resp. \(\overline{\pi }^{-1}(d) = d\)). Then, \(\overline{\pi }^{-1}(c), u_1,\dots , u_{\ell },\overline{\pi }^{-1}(d)\) is a path in \(V(G)\setminus T\). It follows that if D is a connected component of \(\overline{B}\setminus T\), then \(\left( D \setminus \{f_j\}_{j \in J}\right) \cup \bigcup _{j\in J}G_j\) is a connected component of \(G\setminus T\), where J is the set of indices such that \(f_j\in D\).

The bijection between the connected components of \(G\setminus T\) and the ones of \(\overline{B}\setminus T\) implies \(c_G(T)=c_{\overline{B}}(T)\). Since \(J_G\) is unmixed by hypothesis, then \(J_{\overline{B}}\) is unmixed, as well. Moreover, if \(T \in {\mathcal {C}}(\overline{B})\), then \(T \in {\mathcal {C}}(G)\). Due to the accessibility of G, there exists a vertex a such that \(T\setminus \{a\}\subset V(B)\) is a cutset of G and so, using the bijection, \(T\setminus \{a\}\) is a cutset of \(\overline{B}\), namely \(\overline{B}\) is accessible. \(\square \)

A block with a fixed number of vertices, say n, and minimum number of edges is a cycle \(C_n\). It is useful to connect the degree of the vertices with the cycle rank.

Lemma 3

Let G be a connected graph. The cycle rank of G is

$$\begin{aligned} m(G) = 1+\frac{\sum _{v\in V(G)} (\deg v - 2)}{2}. \end{aligned}$$

Proof

From ([8, Theorem 4.5(a)]), we know \(m(G)=q-p+1\) where \(q=|E(G)|\) and \(p=|V(G)|\). We can see

$$\begin{aligned} 2q = \sum _{v\in V(G)} \deg v \quad \quad \hbox {and} \quad \quad p = \sum _{v\in V(G)} 1. \end{aligned}$$

So, we conclude that

$$\begin{aligned} m(G) = q-p+1= 1+\frac{\sum _{v\in V(G)} (\deg v - 2)}{2}. \end{aligned}$$

\(\square \)

By the previous lemma, we observe that for a graph G with a fixed cycle rank \(m(G) >1\), the number of vertices with degree greater than 2 is bounded, but we do not have any information on the number of vertices v with \(\deg v\le 2\). We will show that under the hypothesis of accessibility this cardinality is bounded, too.

Now we are going to state some general results for accessible blocks that we are going to exploit for the classification of accessible graphs with cycle rank 3 and in Sect. 5. Let us introduce some notation.

Definition 1

Given a block B of a graph G, we say that a vertex \(v\in V(B)\) is pivotal if \(\deg _B{v}\ge 3\).

Note that in the definition of a pivotal vertex v, \(\deg _B {v}\) refers to the degree of v in B, and not in G.

Definition 2

Let B be a block and let \(a,b \in V(B)\) be two pivotal vertices. A path \(L_i\) of length i from a to b and such that any \(v\in V(L_i)\setminus \{a,b\}\) is not pivotal is said a line from a to b.

Lemma 4

Let G be an accessible graph and B be a block of G. If two pivotal vertices ab of B are connected by a line \(L_i\), with \(i\ge 2\), then either a or b is a cutpoint in \(\overline{B}\) and the other is not. Moreover, if we assume that a is the cutpoint, then the following conditions hold:

  1. 1.

    \(i<4\);

  2. 2.

    If \(i=3\), there exists a unique vertex \(c \in V(L_i)\setminus \{a,b\}\) that is a cutpoint in \(\overline{B}\). In particular, c is such that \(\{a,c\}\in E(G)\);

  3. 3.

    If \(m(G) \ge 3\), there are no other lines \(L_j\) from a to b, with \(j \in \{2,3\}\).

Proof

We can focus on the graph \(\overline{B}\) which is accessible by Proposition 3.

Let a and b be two pivotal vertices of B connected by a line \(L_i\), with \(i\ge 2\). We observe that \(T=\{a,b\}\) is a cutset of B, and hence of \(\overline{B}\). In fact, \(B\setminus T\) consists of at least two connected components: \(L_i \setminus \{a,b\}\) and \(B \setminus L_i\). Since \(\overline{B}\) is accessible, at least one between a and b has to be a cutpoint, assume a. Namely, there is a whisker \(\{a,f\} \in E(\overline{B})\). Moreover, at most one between a and b is a cutpoint, otherwise there should be another whisker \(\{b,f'\}\) and \(c_{\overline{B}}(T) \ge 4\), namely \(\{f\}\), \(\{f'\}\), \(L_i\setminus \{a,b\}\) and \(\overline{B}\setminus (L_i\cup \{f,f'\})\), where the last one is not empty (otherwise B is not a block).

From now on, we assume that a is a cutpoint in \(\overline{B}\), while b is not.

  1. (1)

    Let \(L_i = a, a_1, \cdots , a_{i-1}, b \) be a line from a to b. Assume \(i \ge 4\). \(T = \{a,a_2\} \in {\mathcal {C}}(\overline{B})\) and using the same argument of above, \(a_2\) is not a cutpoint and \(\overline{B}\setminus T\) consists of three connected components: \(\{f\}\), \(\{a_1\}\) and \(\overline{B}\setminus ( T \cup \{a_1\})\). At the same time, \(T'=\{a_2,b\} \in {\mathcal {C}}(\overline{B})\) but neither \(a_2\) nor b is a cutpoint, which contradicts the hypothesis of G accessible.

  2. (2)

    Let \(i=3\) and \(L_3 = a, a_1, a_2, b\) be a line from a to b. Since \(T=\{a_1, b\} \in {\mathcal {C}}(\overline{B})\), \(\overline{B}\) is accessible and b is not a cutpoint of \(\overline{B}\), then \(a_1\) is a cutpoint of \(\overline{B}\). Moreover, since \(T'=\{a,a_2\}\in {\mathcal {C}}(\overline{B})\), then \(a_2\) is not a cutpoint otherwise, \(c_{\overline{B}}(T)=4\).

  3. (3)

    Suppose there are two lines \(L_j'\ne L_i\), with \(i,j \in \{2,3\}\), from a to b. Note that \(\overline{B}\setminus (L_i \cup L_j')\) is not empty, since by hypothesis b is pivotal and then there exists at least one vertex \(v \in V(B)\) such that \(\{b,v\} \in E(B)\) and \(v \not \in L_i \cup L_j'\). Consider the cutset \(T=\{a,b\}\). Then, \(\overline{B}\setminus T\) consists of at least 4 connected components: \(\{f\}\), \(L_i \setminus \{a,b\}\), \(L_j' \setminus \{a,b\}\), and \(\overline{B}\setminus (L_i \cup L_j')\), which is a contradiction.

\(\square \)

Lemma 5

Let G be an accessible graph and B be a block of G. If two pivotal vertices ab of B are connected by a line \(L_3\), then \(\{a,b\}\in E(B)\).

Proof

It is sufficient to show that the vertices a and b are not separable, namely there does not exist a cutset of G such that in \(G \setminus T\) the vertices a and b belong to two different connected components. By Lemma 4, a is a cutpoint in \(\overline{B}\) and let \(\{a,f\} \in E(\overline{B})\) be the whisker on a. Then,

$$\begin{aligned} G\setminus \{a,b\} = \{f\} \sqcup (L_3\setminus \{a,b\}) \sqcup H, \end{aligned}$$

where H is a non-empty connected component of \(G\setminus \{a,b\}\). Assume by contradiction that a and b are separable. Let \(L_3 = a,a_1,a_2,b\) be a line from a to b and let T be a minimal cutset that separates a and b. T has vertices in \(L_3\setminus \{a,b\}\) and in H. If \(a_1\in T\), then \(T'=\left( T\setminus \{a_1\}\right) \cup \{a_2\}\) is a cutset, as well. By Lemma 4 (2), \(a_1\) is a cutpoint, but \(a_2\) is not. Therefore, \(|T| = |T'|\) but \(c(T) = c(T')+1\), which is a contradiction. \(\square \)

As an application, by means of the implementation described in Sect. 6, we will prove that the accessible blocks with whiskers of cycle rank 3 are the ones in Figs. 3 and 4. From Lemma 3, we have a bound on the number of pivotal vertices and, when \(m(G) = 3\) and G is a block, it holds

$$\begin{aligned} \sum _{v \text { pivotal vertices of } G} \left( \deg v - 2 \right) = 2\left( m(G) - 1\right) = 4. \end{aligned}$$

All of the possible blocks with cycle rank 3 are shown in Fig. 2, where the dot points denote pivotal vertices v, the number is \(\deg v -2\) and the dashed line represents a line from a pivotal vertex to another. As regards accessible graphs \(\overline{B}\) with \(m(\overline{B}) = 3\), they are obtained from the blocks B in Fig. 2 by adding opportune whiskers. By Lemma 4, there are no accessible graphs obtained from the blocks in the class of Fig. 2 (A). In Figs. 3 and 4, all the accessible graphs \(\overline{B}\) with \(m(\overline{B}) = 3\) are displayed. As regards Fig. 3, the graphs (1)–(4) are obtained from the ones in Fig. 2 (B), while the graph (5) from the ones in Fig. 2C. These five graphs are chain of cycles that we characterize in the next section. Finally, the graphs in Fig. 4 are all obtained from the blocks in Fig. 2D. In particular, they are obtained by the complete graph \(K_4\) substituting any edge by a line \(L_i\), with \(i \in {1,2,3}\), and by adding whiskers in order to have accessibility of the graph. We denote this class of graphs by \({\mathcal {K}}_4\). Note that in Fig. 4 (1) it is possible to add some whiskers.

Fig. 2
figure 2

All classes of blocks having cycle rank 3

Fig. 3
figure 3

The accessible chains of cycles with cycle rank 3

Fig. 4
figure 4

The class \({\mathcal {K}}_4\)

In the next results, by focusing on the lines connecting two pivotal vertices, we exhibit that starting from blocks belong to the class (D) of Fig. 2, there are no other possible accessible blocks with whiskers than the graphs (1)–(4) in Fig. 4.

Lemma 6

Let \(\overline{B}\) be an accessible graph such that B is a block with \(m(B)= 3\) that belongs to the class (D) of Fig. 2. Then, in B there are at most two lines \(L_2\), which have no vertex in common and there is no line \(L_3\).

Proof

Let abcd be the pivotal vertices of \(\overline{B}\). Without loss of generality, assume that there are two lines \(L_2\) in B having a vertex in common: one from a to b and a second one from a to c. We claim that a has a whisker in \(\overline{B}\) and b and c have no whiskers. In fact, \(\{a,b\}\) and \(\{a,c\}\in {\mathcal {C}}(\overline{B})\). By Lemma 4, either a has a whisker or both b and c have whiskers. Moreover, \(T=\{a,b,c\}\in {\mathcal {C}}(\overline{B})\) and if b and c have whiskers \(c(T)\ge 5\). Hence, the claim follows.

Let \(a_1\) (resp. \(a_1'\)) be the vertex of degree 2 in the line \(L_2\) from a to b (resp. to c). Let \(T'=\{c,d,a_1\}\in {\mathcal {C}}(\overline{B})\) and \(T''=\{b,d,a_1'\}\in {\mathcal {C}}(\overline{B})\). If there are no subsets of \(T'\) (resp. \(T''\)) disconnecting the block, then d, \(a_1\) and \(a_1'\) have whiskers. But, for \(T'''=\{d,a_1,a_1'\}\in {\mathcal {C}}(\overline{B})\), it holds \(c(T''')=5\), which is a contradiction. Otherwise, assume, without loss of generality, that there exists a line from c to d. Then, by Lemma 4, d has a whisker. Therefore, \(\{a,c,d\}\) is a cutset of \({\bar{B}}\) and \({\bar{B}} \setminus \{a,c,d\}\) consists of 5 connected components, which is a contradiction.

Finally, suppose by contradiction that we have a line \(L_3\) from a to b. By Lemma 5, \(\{a,b\}\in E(G)\). This implies that the cycle rank of G is greater than 3. \(\square \)

Corollary 2

The accessible graphs \(\overline{B}\) such that B belongs to the class in Fig. 2D are all and only the graphs in \({\mathcal {K}}_4\) displayed in Fig. 4.

Proof

By Lemma 6, we have at most two lines \(L_2\) connecting the 4 pivotal vertices \(\{a,b,c,d\}\) and no line \(L_3\). Moreover, we have no lines \(L_i\) with \(i>3\) by Lemma 4. If B has no line \(L_2\), then \(\overline{B}\) is a \(K_4\) with or without whiskers (Fig. 4 (1)).

If B has 2 lines \(L_2\), thanks to Lemma 6 the two lines have no vertices in common, that is we have \(V(B)=\{a,b,c,d,e,f\}\), where e and f are the only non-pivotal vertices. Moreover,

$$\begin{aligned} E(B)=\{\{a,c\},\{a,d\},\{b,c\},\{b,d\},\{a,e\},\{b,e\},\{c,f\},\{d,f\}\}. \end{aligned}$$

Hence, the graph B is bipartite with bipartition \(\{a,b,f\}\sqcup \{c,d,e\}\). Moreover, by Lemma 4, we have only two whiskers on v and w, with \(v\in \{a,b\}\) and \(w\in \{c,d\}\) (see Fig. 4 (2)).

Suppose B has exactly one line \(L_2\). Assume it is from a to b and denote by e the unique vertex of degree 2 in \(L_2\). We observe that the non-empty cutsets of B are \(\{a,b\}\) and \(\{c,d,e\}\). By Lemma 4, without loss of generality, we may assume that a has a whisker and b has no whisker. Since \(\{c,d,e\}\) has cardinality 3 and none of its subsets is a cutset of the block, we have that exactly 2 vertices in \(\{c,d,e\}\) have a whisker. That is either both c and d have a whisker, or one whisker is on e and the other one is, without loss of generality, on c. Then, the obtained \(\overline{B}\) are the non-bipartite and non-complete graphs (3) and (4) in Fig. 4. \(\square \)

5 Chain of cycles

In this section, we define a new family of graphs, the chain of cycles, and we classify the ones with Cohen–Macaulay binomial edge ideal by means of combinatorial properties.

Definition 3

Let B be a block with \(m(B) = r\) such that \(B=\bigcup _{i=1}^r D_i\) where \(D_i\) are cycles, \(E(D_i)\cap E(D_{i+1})=E(P)\), where P is a path, and, for all \(j \ne i-1, i, i+1\), \(E(D_i)\cap E(D_j)=\emptyset \). We call B a chain of cycles.

Lemma 7

Let \(\overline{B}\) be an accessible graph such that \(B = \bigcup _{i=1}^r D_i\) is a chain of cycles. Then, \(D_i\in \{C_3,C_4\}\) and \(E(D_i)\cap E(D_{i+1})\) is an edge of B.

Proof

If \(r\in \{1,2\}\), the claim follows by [18, Fig. 7] and the proof of [17, Theorem 2]. From now on, assume \(r\ge 3\), that is \(m(B) \ge 3\).

Let \(i=1\), and let \(a,b \in V(D_1)\cap V(D_2)\) be pivotal vertices of B. By Lemma 4, there is a unique line \(L_i\), with \(i \in \{2,3\}\), from a to b. Hence, we may assume \(E(D_1)\cap E(D_2)\) is an edge and \(D_1\) is either \(C_3\) or \(C_4\). By the same argument, \(D_r\) has the same property.

Let \(i\in \{2,\ldots ,r-1\}\) and let \(a,b \in V(D_{i})\cap V(D_{i+1})\) be pivotal vertices of B. \(T=\{a,b\}\) is a cutset of \(\overline{B}\) and since \(\overline{B}\) is accessible, either a or b is a cutpoint in \(\overline{B}\). Therefore, \(E(D_i)\cap E(D_{i+1})\) is an edge, due to the unmixedness of \(J_{\overline{B}}\).

Let \(a,b \in V(D_{i-1})\cap V(D_i)\) and \(c,d \in V(D_{i})\cap V(D_{i+1})\) be pivotal vertices of B. Let \(T =\{a,b\}\) and \(T'=\{c,d\}\). Assume that \(c\not \in T\), that is c is different from a and b, and, without loss of generality, assume that there exists a line \(L_j\) from a to c. We will prove that \(j=1\). By contradiction, suppose \(j>1\). Hence, \(T''=\{a,c\}\) is a cutset. By Lemma 4 applied to \(T''\) and due to the hypothesis on the accessibility applied to T and \(T'\), we have that either a and d or c and b have a whisker. Therefore, either \(c_{\overline{B}}(\{a,d\})=4\) or \(c_{\overline{B}}(\{b,c\})=4\). In both cases, we obtain a contradiction.

It follows that \(\{a,c\}\) is an edge and either \(b=d\) or \(\{b,d\}\) is an edge. That is \(D_i\) is either \(C_3\) or \(C_4\). \(\square \)

Remark 3

By Lemma 7, we can relabel the vertices of B so that \(V(D_i)\cap V(D_{i+1})=\{w_i,u_i\}\) and such that if \(w_i\ne w_{i+1}\) (resp. \(u_i\ne u_{i+1}\)), then the edge \(\{w_i,w_{i+1}\}\) (resp. \(\{u_i,u_{i+1}\}\)) belongs to \(E(D_{i+1})\) and does not belong to any cycle \(D_j\) for \(j\ne i+1\).

Lemma 8

Let \(\overline{B}\) be an accessible graph such that \(B = \bigcup _{i=1}^r D_i\) is a chain of cycles. Following the labeling defined in Remark 3, every \(w_i\) is a cutpoint in \(\overline{B}\) and \(u_i\) is not a cutpoint in \(\overline{B}\).

Proof

We observe that \(\{w_1,u_1\}\) is a cutset of \(\overline{B}\). Hence, due to accessibility of \(\overline{B}\) either \(w_1\) or \(u_1\) is a cutpoint in \(\overline{B}\). Without loss of generality, we may assume \(w_1\) is a cutpoint. We observe that also \(\{u_1,w_2\}\), \(\{w_1,u_2\}\) are cutsets of \(\overline{B}\). Hence, \(w_2\) must be a cutpoint and \(u_2\) cannot be a cutpoint. Applying the same argument for all \(\{w_i,u_i\}\), the assertion follows. \(\square \)

Remark 4

From now on, thanks to Lemmas 5 and 8, we may consider the following partition of the set of vertices of B:

$$\begin{aligned} V(B) = W \sqcup U, \end{aligned}$$

where W consists of all the cutpoints of \(\overline{B}\), and \(U=V(B)\setminus W\). We observe that the induced subgraphs on W and U (respectively) are paths.

Lemma 9

Let \(\overline{B}\) be an accessible graph such that \(B = \bigcup _{i=1}^r D_i\) is a chain of cycles. If \(D_i=C_4\), then \(D_{i+1}=C_3\).

Proof

By contradiction, suppose that \(D_i\) and \(D_{i+1}\) are both \(C_4\). By Lemma 8, \(w_{i-1}\), \(w_i\) , \(w_{i+1}\) are all cutpoints while \(u_{i-1},u_i,u_{i+1}\) are not cutpoints. We can see that \(T=\{w_{i-1},u_i,w_{i+1}\}\in {\mathcal {C}}(\overline{B})\) and \(c(T)=5\). Contradiction. \(\square \)

Lemma 10

Let \(\overline{B}\) be an accessible graph such that \(B = \bigcup _{i=1}^r D_i\) is a chain of cycles. Let \(v\in V(B)\) satisfying one of the following conditions:

  1. (1)

    \(\deg _B(v)\ge 5\);

  2. (2)

    \(\deg _B(v)\ge 4\) and v is a vertex of a \(C_4\).

Then, v is a cutpoint.

Proof

In case (1), v belongs to the cycles \(D_k, D_{k+1}, D_{k+2}, D_{k+3}\) for some \(k \in \{1,\ldots , r-3\}\) with \(D_{k}= \ldots = D_{k+3}=C_3\). From Lemma 7, one has \(E(D_{k+j-1})\cap E(D_{k+j}) =\{\{v,v_j\}\}\) for \(j \in \{1,2,3\}\) and some \(v_1,v_2, v_3 \in V(B)\).

In case (2), v belongs to the cycles \(D_k, D_{k+1}, D_{k+2}\) for some \(k \in \{1,\ldots , r-2\}\) with \(D_{k}= D_{k+1}=C_3\) and \(D_{k+2}=C_4\). From Lemma 7, one has \(E(D_{k+j-1})\cap E(D_{k+j}) =\{\{v,v_j\}\}\) for \(j \in \{1,2\}\) and some \(v_1,v_2 \in V(B)\). Moreover, let \(v_3\) be the vertex of \(D_{k+2}\) adjacent to \(v_2\), it follows that \(\{v,v_3\}\) is a cutset of B.

In both cases, we have \(T_i=\{v,v_i\}\in {\mathcal {C}}(B)\) for \(i=1,2,3\). Since \(\overline{B}\) is accessible, we obtain that each \(T_i\) contains exactly a cutpoint. By contradiction, assume that v is not a cutpoint. This implies that \(v_1,v_2\) and \(v_3\) belong to W, namely they are cutpoints in \(\overline{B}\). We observe that \(T=\{v,v_1,v_3\}\in {\mathcal {C}}(\overline{B})\), but \(c(T)=5\). Contradiction. \(\square \)

Given a graph G, we denote by \(G_v\) the graph obtained from G by adding edges \(\{u,w\}\) to E(G) for all \(u,w \in V(G)\) adjacent to v. We recall the following definition given first in [2].

Definition 4

Let G be a graph. \(J_G\) is strongly unmixed if the connected components of G are complete graphs or if \(J_G\) is unmixed and there exists a cutpoint v of G such that \(J_{G\setminus \{v\}}\), \(J_{G_v}\) and \(J_{G_{v}\setminus \{v\}}\) are strongly unmixed.

Remark 5

Let G be a graph and let \(v,w \in V(G)\) with \(v \ne w\). Then, \((G\setminus \{v\})_{w} = G_w \setminus \{v\}\). Clearly \(V((G\setminus \{v\})_{w}) =V( G_w \setminus v)=V(G\setminus \{v\})\). We have:

$$\begin{aligned} E(G_w\setminus \{v\})= (E(G) \cup \{\{x,y\} \ | \ x,y \in N_{G}(w)\}) \setminus \{\{v,u\} \ | \ u \in N_{G_w}(v)\}. \end{aligned}$$

Moreover, we observe that \(N_{G_w}(v)\) is either equal to \(N_G(v)\) if \(\{v,w\} \notin E(G)\) or to \(N_{G}(v) \cup N_{G\setminus \{v\}}(w)\) if \(\{v,w\} \in E(G)\), that is

$$\begin{aligned} E(G_w\setminus \{v\})&=(E(G) \setminus \{\{v,u\} \ | \ u \in N_{G}(v)\}) \cup \{\{x,y\} \ | \ x,y \in N_{G\setminus \{v\}}(w)\} \\ {}&=E((G\setminus \{v\})_w). \end{aligned}$$

Remark 6

Let G be a graph such that \(J_G\) is strongly unmixed with respect to the cutpoint w and let \(r=|{\mathcal {C}}(G)|\).

  1. 1.

    Since \(J_{G \setminus \{w\}}\) is strongly unmixed, then it is unmixed and from [2, Proposition 5.2] we have

    $$\begin{aligned} {\mathcal {C}}(G \setminus \{w\})=\{S \subset V(G \setminus \{w\}) : S \cup \{w\} \in {\mathcal {C}}(G)\}. \end{aligned}$$

    As \(\varnothing \in {\mathcal {C}}(G)\) cannot be expressed as \(S \cup \{w\}\), it follows \(|{\mathcal {C}}(G \setminus \{w\})|< r\).

  2. 2.

    From [2, Lemma 4.5.(1)], we have that \({\mathcal {C}}(G_w) \subseteq {\mathcal {C}}(G)\) and \(\{w\} \in {\mathcal {C}}(G) \setminus {\mathcal {C}}(G_w)\), that is \(|{\mathcal {C}}(G_w)|<r\).

  3. 3.

    From [2, Lemma 5.5], we have \({\mathcal {C}}(G_w\setminus \{w\}) \subseteq {\mathcal {C}}(G_w)\), that is \(|{\mathcal {C}}(G_w \setminus \{w\})|<r\).

Lemma 11

Let G be a graph such that \(J_G\) is unmixed and let \(v \in V(G)\) be a free vertex of G. If \(J_{G \setminus \{v\}}\) is strongly unmixed, then \(J_G\) is strongly unmixed.

Proof

We proceed by induction on the cardinality of \({\mathcal {C}}(G \setminus \{v\})\), hence set \(r=|{\mathcal {C}}(G \setminus \{v\})|\).

If \(r=0\), then \(G \setminus \{v\}\) is a complete graph. The latter implies that G is a complete graph with or without a whisker, and it is immediate to see that \(J_G\) is strongly unmixed.

We assume \(r > 0 \) and the thesis true for any graph \(G\setminus \{v\}\) with \(|{\mathcal {C}}(G\setminus \{v\})|< r\). Let \(\{w\} \in {\mathcal {C}}(G\setminus \{v\})\) such that the binomial edge ideals of \((G\setminus \{v\}) \setminus \{w\}, (G\setminus \{v\} )_w\), and \((G\setminus \{v\} )_w \setminus \{w\}\) are strongly unmixed. We observe that w is also a cutpoint for G, otherwise \(\{v,w\}\) is a cutset for G contradicting the fact that v is a free vertex. From Remark 5, one has that \((G\setminus \{v\})_w= G_w \setminus \{v\}\) and \((G\setminus \{v\})_w \setminus \{w\} = G_w \setminus \{v,w\}\), and such graphs satisfy the inductive hypothesis by Remark 6 applied to \(G\setminus \{v\}\); the assertion follows. \(\square \)

Lemma 12

Let \(G_1\) and \(G_2\) be two graphs and let \(G=G_1\cup G_2\) be such that \(V(G_1)\cap V(G_2)=\{v\}\), with v free vertex of \(G_1\) and \(G_2\). The following conditions are equivalent:

  1. 1.

    \(J_{G_1}\) and \(J_{G_2}\) are strongly unmixed (resp. \(G_1\) and \(G_2\) are accessible);

  2. 2.

    \(J_{G}\) is strongly unmixed (resp. G is accessible).

Proof

With respect to accessibility, the two conditions are equivalent by [16, Proposition 2.6] and [16, Lemma 2.3]. Now we focus on strong unmixedness.

(1)\(\Rightarrow \)(2). By [16, Proposition 2.6], \(J_G\) is unmixed. We proceed by induction on the cardinality r of \({\mathcal {C}}(G)\). We observe that \(r\ge 2\) since G is decomposable, hence we take \(r=2\) as base case. In this case, \({\mathcal {C}}(G)=\{\varnothing , \{v\}\}\), that is \(G_1\) and \(G_2\) have no cutpoints, and since they are strongly unmixed it follows that they are complete graphs, and it is easy to observe that G is also strongly unmixed. By using the same argument, if both \(G_1\) and \(G_2\) have no cutpoints, then \(r=2\). We assume \(r > 2\) and that the thesis holds true for any decomposable graph \(H=H_1 \cup H_2\) with \(J_{H_1}\) and \(J_{H_2}\) strongly unmixed with \(|{\mathcal {C}}(H)| \le r-1\). Since \(r>2\), then \(G_1\) or \(G_2\) has a cutpoint, as we have pointed out above. Without loss of generality, let w be a cutpoint of \(G_1\) such that \(J_{G_1\setminus \{w\}}, J_{(G_{1})_w}\) and \(J_{(G_{1})_w \setminus \{w\}}\) are strongly unmixed. By applying Remark 6 to the graph \(G_1\), and by using the fact that

$$\begin{aligned} G\setminus \{w\}\!=\!(G_1\setminus \{w\} )\cup G_2, \ G_w \!=\!(G_1)_w \cup G_2, \ G_w \setminus \{w\}\!=\!((G_1)_w\setminus \{w\}) \cup G_2, \end{aligned}$$

where in each graph the overlapping vertex is the free vertex v, one has that such graphs satisfy the inductive hypothesis and have a strongly unmixed binomial edge ideal, that is \(J_G\) is strongly unmixed.

(2)\(\Rightarrow \)(1). We proceed by induction on the cardinality r of \({\mathcal {C}}(G)\). We observe that \(r\ge 2\) since G is decomposable, hence we take \(r=2\) as base case. In this case, \({\mathcal {C}}(G)=\{\varnothing , \{v\}\}\), that is v is the unique cutpoint. By [16, Lemma 2.3], the graphs \(G_1\) and \(G_2\) have no cutsets. Therefore, \(G_1\) and \(G_2\) are complete and hence strongly unmixed. We assume \(r > 2\) and that the thesis holds true for any graph H with \(|{\mathcal {C}}(H)| \le r-1\). Since \(J_G\) is strongly unmixed, we take a cutpoint w of G such that \(J_{G\setminus \{w\}}, J_{G_w}\) and \(J_{G_w \setminus \{w\}}\) are strongly unmixed. If \(w =v\), then we obtain that \(J_{G_1 \setminus \{v\}}\) and \(J_{G_2\setminus \{v\}}\) are strongly unmixed, and since v is a free vertex of \(G_1\) and \(G_2\), then the assertion follows from Lemma 11. If \(w \ne v\), we assume without loss of generality that \(w \in V(G_1 \setminus \{v\})\). We obtain that \(G \setminus \{w\}\) has two connected components, \(H=H_1 \cup G_2\) with \(V(H_1)\cap V(G_2)=\{v\}\) and \(H_2\). From the strong unmixedness of \(J_{G \setminus \{w\}}\) and from Remark 6.(1), we obtain that \({\mathcal {C}}(G\setminus \{w\})< r\). Since H is an induced subgraph of \(G\setminus \{w\}\), then \(|{\mathcal {C}}(H)| < r\), and from the inductive hypothesis we obtain that \(J_{H_1}\) and \(J_{G_2}\) are strongly unmixed, while \(J_{H_2}\) is strongly unmixed by construction. Since \(G_1 \setminus \{w\}= H_1 \cup H_2\), then \(J_{G_1 \setminus \{w\}}\) is also strongly unmixed. By using similar arguments and Remark 6, one can prove that also \(J_{(G_1)_w}\) and \(J_{(G_1)_w \setminus \{w\}}\) are strongly unmixed, that is \(J_{G_1}\) is strongly unmixed. \(\square \)

Setup 1

Let \(\overline{B}\) be a block with whiskers, where \(B=\bigcup _{i=1}^r D_i\) is a chain of cycles, satisfying the following properties:

  1. 1.

    Each \(D_i\in \{C_3, C_4\}\);

  2. 2.

    If \(D_i=C_4\) then \(D_{i+1}=C_3\);

  3. 3.

    \(E(D_i)\cap E(D_{i+1})=\{\{w_i,u_i\}\}\), where \(w_i\) is a cutpoint and \(u_i\) is not a cutpoint;

  4. 4.

    \(\{w_i,w_{i+1}\}\in E(D_{i+i})\) (resp. \(\{u_i,u_{i+1}\}\in E(D_{i+1})\)) or \(w_i=w_{i+1}\) (resp. \(u_i=u_{i+1}\));

  5. 5.

    If \(D_1=C_4\) with \(V(D_1)=\{w_0,w_1,u_0,u_1\}\) with \(\{w_0,w_1\},\{u_0,u_1\}\in E(D_1)\), then \(w_0\) and \(w_1\) are cutpoints, whereas \(u_0\) and \(u_1\) are not cutpoints;

  6. 6.

    If \(D_r=C_4\) with \(V(D_r)=\{w_r,w_{r+1},u_r,u_{r+1}\}\) with \(\{w_r,w_{r+1}\},\{u_r,u_{r+1}\}\in E(D_r)\), then \(w_r\) and \(w_{r+1}\) are cutpoints, whereas \(u_r\) and \(u_{r+1}\) are not cutpoints;

  7. 7.

    If \(v\in V(B)\) with \(\deg (v)\ge 5\) or \(\deg (v)\ge 4\) with v a vertex of a \(C_4\), then v is a cutpoint.

In Fig. 5, an example of a graph \(\overline{B}\) satisfying Setup 1 is displayed.

Fig. 5
figure 5

A graph \(\overline{B}\) satisfying Setup 1

Lemma 13

Let \(\overline{B}\) be a graph satisfying Setup 1, let \(V(B)=U \sqcup W\) as in Remark 4 and let \(T\in {\mathcal {C}}(\overline{B})\). Then, for all \(u\in U\cap T\) there exists \(w\in W\cap T\) such that \(\{u,w\}\in {\mathcal {C}}(\overline{B})\).

Proof

By contradiction, assume that there exists \(u \in T\cap U\) such that any vertex \(w \in W\) for which \(\{u,w\}\in {\mathcal {C}}(\overline{B}) \) does not belong to T. Let \(T'=T\setminus \{u\}\). We prove that \(c_{\overline{B}}(T)=c_{\overline{B}}(T')\). Let H be the connected component of \(\overline{B}\setminus T'\) containing u. We prove that \(H\setminus \{u\}\) is connected. Let \(v,v' \in V(H\setminus \{u\})\) and let \(\pi : v, v_1, \ldots , v_{\ell }, v'\) be a path in H from v to \(v'\). If \(u \notin V(\pi )\), then v and \(v'\) are connected in \(H\setminus \{u\}\) through \(\pi \). If \(u\in V(\pi )\), then \(\pi : v, v_1, \ldots , v_{i-1}, u, v_{i+1}, \ldots , v_{\ell }, v'\).

We claim that there exists a path \(v_{i-1}, z_1, \ldots , z_{m}, v_{i+1}\) with \(\{u,z_j\}\in {\mathcal {C}}(\overline{B})\) and \(z_j \notin T\) for any \(j \in \{1,\ldots , m\}\). If \(v_{i-1},v_{i+1} \in W\), then \(v_{i-1}=w_{j}\), \(v_{i+1}=w_{k}\) with \(j < k\) as in the Setup 1, hence the vertices \(w_{j+1},\ldots , w_{k-1}\) make a path between \(w_j\) and \(w_k\). Furthermore, being \(w_j, w_k\) adjacent to u, then \(\{u,w_{j+1}\}, \ldots , \{u,w_{k-1}\} \in {\mathcal {C}}(\overline{B})\) and in particular \(w_{j+1},\ldots , w_{k-1} \notin T\). In this case, the claim follows.

Now, we deal with the case \(v_{i-1}\) or \(v_{i+1} \in U\). Observe that any vertex \(u' \in U\) adjacent to u is also adjacent to a vertex \(w' \in W\) such that \(\{u,w'\}\in {\mathcal {C}}(\overline{B})\). In fact, let \(D_k\) be the cycle containing u and \(u'\). The vertex \(w' \ne u\) adjacent to \(u'\) that belongs to \(D_k\) is such that \(\{u,w'\}\) disconnects \(u'\) from the rest of the graph. That is, if one or both of \(v_{i-1},v_{i+1}\) are in U, by the previous arguments we find the desired path in W. In any of the above cases, we find that \(H\setminus \{u\}\) is connected, that is \(T \notin {\mathcal {C}}(\overline{B})\). Contradiction. \(\square \)

Corollary 3

Let \(\overline{B}\) be a graph satisfying Setup 1, and let \(T\in {\mathcal {C}}(\overline{B})\). Then, for any \(u \in U\cap T\) we have \(T'=T\setminus \{u\} \in {\mathcal {C}}(\overline{B})\). In particular, \({\mathcal {C}}(\overline{B})\) is an accessible set system.

Proof

Let \(a \in T'\). Assume \(a \in U\). We claim \(c_{\overline{B}}(T')> c_{\overline{B}}(T'\setminus \{a\})\). Set \(H={\bar{B}}\setminus (T' \setminus \{a\})\). By contradiction, assume that \(c_{\overline{B}}(T')= c_{\overline{B}}(T'\setminus \{a\})\), then any two vertices \(v,v' \in N_H(a)\) are connected through a path in W, and since \(a \in U \cap T\), then there is no \(b\in W\cap T\) such that \(\{a,b\}\in {\mathcal {C}}(\overline{B})\) and this contradicts Lemma 13. From Lemma 13 there exists \(b \in W\cap T\) such that \(\{a,b\} \in {\mathcal {C}}(\overline{B})\). In particular, \(b \in T'\). If \(a\in W\), namely a is a cutpoint of \(\overline{B}\), then \(c_{\overline{B}}(T')> c_{\overline{B}}(T'\setminus \{a\})\).

Furthermore, for any non-empty \(T \in {\mathcal {C}}(\overline{B})\) if \(u \in T\cap U\ne \varnothing \), then \(T'=T\setminus \{u\} \in {\mathcal {C}}(\overline{B})\), while if \(T\cap U = \varnothing \), then any \(w \in T\) is a cutpoint, hence \(T\setminus \{w\}\in {\mathcal {C}}(\overline{B})\). \(\square \)

Proposition 4

Let \(\overline{B}\) be a graph satisfying Setup 1. Then, \(J_{\overline{B}}\) is unmixed.

Proof

We prove the statement by induction on r, the number of cycles in \(\overline{B}\).

If \(r=1\), then the claim follows. In fact, if \(D_1=C_3\), then \(\overline{B}\) is a complete graph with or without whiskers, hence \(J_{\overline{B}}\) is unmixed by [16, Proposition 2.6]. If \(D_1=C_4\), then \(\overline{B}\) has to satisfy the condition (6) in Setup 1, and the resulting graph is known to be Cohen–Macaulay and hence unmixed.

Suppose \(r>1\). By induction hypothesis we have that \(J_{\overline{B}_k}\) is unmixed with \(B_k=\bigcup _{i=k}^r D_i\) and \(k>1\).

Assume \(D_1=C_3\) with \(V(D_1)=\{u_0,u_1,w_1\}\) and \(E(D_1)\cap E(D_2) =\{\{w_1,u_1\}\}\). Let \(T \in {\mathcal {C}}(\overline{B})\). Note that \(u_0\) can have a whisker on it, say \(\{u_0, f\}\). In this case, the graph \({\bar{B}}\) is decomposable into \(H_1 = \{u_0, f\}\) and \(H_2 = {\bar{B}}\setminus \{f\}\). By [16, Proposition 2.6], \(J_{{\bar{B}}}\) is unmixed if and only if \(J_{H_1}\) and \(J_{H_2}\) are unmixed. Therefore, we can assume that \(u_0\) has no whisker. If \(w_1 \notin T\), then T is a cutset for \(\overline{B}_2\) and by induction hypothesis the assertion follows. We distinguish the following cases:

  1. 1.

    \(w_1 \in T\) and \(u_1 \notin T\);

  2. 2.

    \(w_1,u_1 \in T\).

  1. (1)

    Assume \(w_1 \in T\) and \(u_1 \notin T\). If T is a cutset of \(\overline{B}_2\) the number of connected components does not change. In fact, by adding the graph \(C_3\) and removing the vertex \(w_1\) we only obtain that the connected component of \(\overline{B}_2\setminus T\) containing \(u_1\) now contains the graph \(D_1 \setminus w_1\). If \(T \not \in {\mathcal {C}}(\overline{B}_2)\), we claim that \(T' = T \setminus \{w_1\}\) is a cutset of \(\overline{B}_2\). We start observing that the connected component of \(\overline{B}_2 \setminus T\) containing \(u_1\) contains \(D_1\setminus \{w_1\}\) in \(\overline{B}\setminus T\). Since by hypothesis for any \(a \in T'\) \(c_{\overline{B}}(T)>c_{\overline{B}}(T\setminus \{a\})\) we have that \(c_{\overline{B}_2}(T')>c_{\overline{B}_2}(T'\setminus \{a\})\), the claim follows. Hence, by induction hypothesis, \(c_{\overline{B}_2}(T')=|T'|+1\). Let H be the connected component of \(\overline{B}_2 \setminus T'\) containing \(w_1\). By adding the vertex \(w_1\) to \(T'\), \(w_1\) disconnects H into two connected components: the one containing \(u_1\) and the free vertex attached to \(w_1\).

  2. (2)

    If \(w_1,u_1 \in T\), then there exists \(v \in V(\overline{B}_2)\) adjacent to \(u_1\) such that \(u_1\) breaks the connected component H of \(\overline{B}\setminus (T\setminus \{u_1\})\) containing \(u_1\) in two, one containing v and one containing \(u_0\). By Setup 1 (7), since \(u_1\) has not whisker, then either \(\deg _B(u)\) is 3 and the vertices adjacent to \(u_1\) in \(\overline{B_2}\) are \(w_1\) and u or \(\deg _B(u)\) is 4 and the vertices adjacent to \(u_1\) in \(\overline{B_2}\) are \(w_1,w,\) and u for some u and w. In the former case, since \(w_1\in T\), then \(u\notin T\) and \(v=u\), otherwise \(u_1\) is a free vertex in \(\overline{B}\setminus (T \setminus \{w_1\})\), contradicting the fact that \(u_1 \in T\). In the latter case, \(u,w\in V(D_3)\). If \(\{u,w\}\notin {\mathcal {C}}(\overline{B}_2)\), then the claim follows. If \(\{u,w\}\in {\mathcal {C}}(\overline{B}_2)\), then \(\{u,w\}\not \subset T\), otherwise \(u_1\) is a free vertex of \(\overline{B}\setminus T\). The claim follows.

Moreover, from Corollary 3, \(T'=T\setminus \{u_1\}\) is a cutset of \(\overline{B}\) such that \(w_1 \in T'\) and \(u_1 \notin T'\). By applying Case (1), we get that \(c_{\overline{B}}(T')=|T'|+1\) and \(T' \cup \{u_1\}\) breaks the component containing \(u_1\) in two: the vertex \(u_0\), and the component containing the vertex v.

If \(D_1 = C_4\) with \(V(D_1)=\{u_0,w_0,u_1,w_1\}\), then \(E(D_1)\cap E(D_2) =\{\{w_1,u_1\}\}\). Let \(T \in {\mathcal {C}}(\overline{B})\). Assume \(w_0,w_1 \notin T\), then T is a cutset for \(\overline{B}_2\) and by induction hypothesis the assertion follows. We now assume \(u_0,u_1 \notin T\) and since \(\{w_0,u_1\}\) is the unique cutset of B with cardinality 2 containing \(w_0\) and a \(u_i\), then the cases \(w_0 \in T \) and \(w_1 \notin T\), \(w_0 \notin T\) and \(w_1 \in T\), \(w_0, w_1 \in T\) are analogous to the cases \(w_1 \notin T\) and \(u_1 \in T\) of \(D_1=C_3\). In fact, in all of the cases we obtain that \(T\setminus \{w_0\}\) is a cutset of \(\overline{B}\), that is \(c_{\overline{B}}(T\setminus \{w_0\})=|T\setminus \{w_0\}|+1\) and the component containing \(u_0\) and \(f_0\) is eventually broken by \(w_0\). We now assume \(u_1 \in T\). Observe that from Setup 1 (2) \(D_2=C_3\) and the vertex \(u\in U\) adjacent to \(u_1\) in \(\overline{B}_2\) is such that \(\{w_1,u\}\in E(\overline{B})\), otherwise \(u_0,w_1,w_2,u\) are all adjacent to \(u_1\) contradicting Setup 1 (7). That is either \(w_0\) or \(w_1 \in T\), \(u \notin T\); moreover, from Corollary 3\(T \setminus \{u_1\}\) is a cutset of \(\overline{B}\). From the above cases, we obtain \(c_{\overline{B}}(T \setminus \{u_1\})=|T \setminus \{u_1\}|+1\) and \(u_1\) breaks the component containing \(u_0\) and u. If \(u_0 \in T\), then, by Lemma 13, \(w_1 \in T\) and \(w_0,u_1 \notin T\), that is from Corollary 3\(T\setminus \{u_0\}\) is a cutset for \(\overline{B}\). By the previous cases we obtain \(c_{\overline{B}}(T \setminus \{u_0\})=|T \setminus \{u_0\}|+1\) and \(u_0\) breaks the component containing \(w_0\) and \(u_1\). \(\square \)

Theorem 3

Let \(\overline{B}\) be a graph. The following conditions are equivalent:

  1. 1.

    \(\overline{B}\) satisfies Setup 1;

  2. 2.

    \(J_{\overline{B}}\) is Cohen–Macaulay;

  3. 3.

    \(S/J_{\overline{B}}\) is \((S_2)\);

  4. 4.

    \(\overline{B}\) is accessible;

  5. 5.

    \(J_{\overline{B}}\) is strongly unmixed.

Proof

We prove the following implications:

$$\begin{aligned} (5) \implies (2) \implies (3) \implies (4) \implies (1) \implies (5). \end{aligned}$$

By [2, Theorem 5.11], it holds (5) \(\implies \) (2).

It is a well-known result that (2) \(\implies \) (3).

Theorem 2 states (3) \(\implies \) (4).

By Lemmas 79, 810, and observing that a \(C_4\) with 2 whiskers satisfying Setup 1 (5) (or Setup 1 (6)) is accessible, we have (4) \(\implies \) (1).

To prove (1) \(\implies \) (5) we proceed by induction on the number s of cutpoints of \(\overline{B}\).

Let \(s=1\) and w be the cutpoint of \(\overline{B}\). Then, \(\overline{B}\) is a cone from w to exactly 2 graphs: an isolated vertex and a path. By [16], \(J_{\overline{B}}\) is unmixed. Moreover \(\overline{B}\setminus \{w\}\) is decomposable into edges, therefore \(J_{\overline{B}}\) is strongly unmixed by Lemma 12, and \(\overline{B}_{w}\) and \(\overline{B}_{w}\setminus \{w\}\) are complete graphs.

Suppose \(s>1\) and we focus on the cycle \(D_1\). Let w be the first cutpoint, namely \(w=w_0\) if \(D_1=C_4\) or \(w=w_1\) if \(D_1=C_3\). We observe that \(\overline{B}\setminus w=\pi \cup \overline{B}_{t+1}\), where \(\pi :u_0, u_1,\ldots , u_t\) is a path, \(\{u_t\}=V(\pi )\cap V(\overline{B}_{t+1})\), and \(B_{t+1} = \bigcup _{i=t+1}^r D_i\). If \(D_{t+1}=C_3\), then \(\pi \cup \overline{B}_{t+1}\) is decomposable in \(u_t\). Note that \(D_{t+1}\) cannot be a \(C_4\). In fact, if by contradiction \(D_{t+1}=C_4\), then \(D_t=C_3\) and \(u_{t-1},u_{t+1}, w, w_t\) are all adjacent to \(u_t\). That is \(\deg u_t\ge 4\) obtaining a contradiction and the claim follows. Therefore, by Lemma 12 and by induction hypothesis, \(J_{\overline{B}\setminus w}\) is strongly unmixed.

Now we prove that \(J_{\overline{B}_{w}}\) is strongly unmixed, as well. Suppose \(D_t=C_3\) then \(\overline{B}_{w}=K_{t+3}\cup \overline{B}_{t+1}\) with \(V(K_{t+3})\cap V(D_{t+1})=\{w_t,u_t\}\). We observe that, by using Lemma 11, the graph \(K_{t+3}\) can be replaced by a \(K_3\) by eliminating t free vertices, and \(K_{3}\cup \overline{B}_{t+1}\) satisfies Setup 3 and has \(s-1\) cutpoints, that is the associated binomial edge ideal is strongly unmixed by induction hypothesis. If \(D_t=C_4\) with \(V(D_t)=\{w_{t-1},w_t,u_{t-1},u_t\}\), then \(\overline{B}_{w}=K_{t+3}\cup D'_t\cup \overline{B}_{t+1}\) where \(D'_t=C_3\), \(V(K_{t+3})\cap V(D'_t)=\{u_{t-1},w_t\}\) and \(V(\overline{B}_{t+1})\cap V(D'_t)=\{w_{t}, u_t\}\). Again, we observe that, up to applying Lemma 11 to the graph \(K_{t+3}\), \(\overline{B}_{w}\) satisfies Setup 1. By induction hypothesis, the associated binomial edge ideal is strongly unmixed. It is straightforward to observe that \(J_{\overline{B}_{w}\setminus \{w\}}\) is strongly unmixed, too. \(\square \)

6 Computation of graphs with \(n\in \{2,\ldots ,12\}\) vertices

The main aim of this section is to prove, using a computational approach, that for graphs G with at most 12 vertices, using Nauty [16], the three conditions, \(J_G\) strongly unmixed, \(J_G\) Cohen–Macaulay, and G accessible, are equivalent as conjectured in [2]. Finally, we discuss some interesting examples obtained by direct computation.

Theorem 4

Let G be a graph on [n], with \(n\le 12\). The following conditions are equivalent:

  1. 1.

    \(J_G\) is Cohen–Macaulay;

  2. 2.

    \(S/J_G\) is \((S_2)\);

  3. 3.

    G is accessible;

  4. 4.

    \(J_G\) is strongly unmixed.

Proof

We know that

$$\begin{aligned} (4) \implies (1) \implies (2) \implies (3) \end{aligned}$$

so, to prove the equivalence it is sufficient to show that \((3) \implies (4)\).

To prove the claim, we have implemented a computer program that, for a fixed number n of vertices, performs the following steps (steps (S2), (S3) and (S4) work on the result of the previous step):

  • (S1) Compute all connected non isomorphic graphs on [n];

  • (S2) Thanks to Lemma 12, keep only the graphs which are indecomposable and unmixed;

  • (S3) Keep only the ones that are accessible;

  • (S4) Keep only the ones that are strongly unmixed;

  • (S5) Verify that the graphs obtained from step (S3) and (S4) are the same.

The previous procedure was executed for the graphs whose number of vertices is between 2 and 12. In Table 1, we report the number of indecomposable graphs on n vertices that are also accessible.

Table 1 Enumeration of indecomposable accessible graphs

Finally, we refer readers to [12] for a complete description of the algorithm that we used. \(\square \)

We underline that the computation of the graphs with \(n=12\) vertices has been obtained in a month of computation on a node with 4 CPU Xeon-Gold 5118 having in total 48 cores and 96 threads. All the graphs satisfying the equivalent conditions of Theorem 4 are downloadable from [12]. Within this set, we would like to focus on the graphs shown in the following example.

Example 3

By direct computation, we obtain the two graphs in Fig. 6.

Fig. 6
figure 6

The accessible \(\overline{W}_n\)

The graphs in Fig. 6A and B are well known. In fact, the blocks that are not edges are the so-called wheel graphs and they are denoted by \(W_4\) and \(W_5\), respectively, whereas the blocks with whiskers are called Helm graphs (see [21]).

We observe that if \(i>5 \) then \(J_{\overline{W}_i}\) is not unmixed. In fact, in this case we have at least 6 vertices of degree 4, say \(v_1,\dots ,v_6\). Without loss of generality, we may assume that \(\{v_i,v_{i+1}\}\in E(\overline{W}_i)\), for \(i=1,\dots ,5\). Moreover, assume that v is the vertex of degree i. We can see that \(T=\{v,v_1,v_3,v_5\}\) is a cutset such that \(c(T)=6\).

We recall the following definition.

Definition 5

A polyhedral graph is a 3-connected planar graph.

The name of polyhedral derives from the fact that it is the graph whose vertices and edges are the ones of a convex polyhedron.

By Example 3 and Definition 5, it is natural to ask

Question 1

Is it possible to find an infinite family of accessible graphs \(\overline{B}\) such that B is a polyhedral graph?