# Levelness versus almost Gorensteinness of edge rings of complete
multipartite graphs

Akihiro Higashitani  and  Koji Matsushita  Department of Pure and Applied
Mathematics, Graduate School of Information Science and Technology, Osaka
University, Suita, Osaka 565-0871, Japan<EMAIL_ADDRESS>Department of Pure and Applied Mathematics, Graduate School of Information
Science and Technology, Osaka University, Suita, Osaka 565-0871, Japan
<EMAIL_ADDRESS>
###### Abstract.

Levelness and almost Gorensteinness are well-studied properties on graded
rings as a generalized notion of Gorensteinness. In the present paper, we
study those properties for the edge rings of the complete multipartite graphs,
denoted by $\Bbbk[K_{r_{1},\ldots,r_{n}}]$ with $1\leq r_{1}\leq\cdots\leq
r_{n}$. We give the complete characterization of which
$\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is level in terms of $n$ and
$r_{1},\ldots,r_{n}$. Similarly, we also give the complete characterization of
which $\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is almost Gorenstein in terms of $n$ and
$r_{1},\ldots,r_{n}$.

###### Key words and phrases:

level, almost Gorenstein, edge rings, complete multipartite graphs

###### 1991 Mathematics Subject Classification:

Primary 13H10; Secondary 52B20, 13F65, 13A02, 05C25.

##  1\. Introduction

###  1.1. Backgrounds

Cohen–Macaulay (local or graded) rings and Gorenstein (local or graded) rings
are definitely the most important properties and play the crucial roles in the
theory of commutative algebras. However, there are quite many examples which
are Cohen–Macaulay but not Gorenstein. Thus, many researchers working on
commutative algebras have been attempting the introduction of good
“intermediate” classes of those two properties. Thanks to those previous
studies, many classes of Cohen–Macaulay graded rings which are not Gorenstein
have been defined and those theories have been developed. In the present
paper, we concentrate on two well-studied properties, level rings and almost
Gorenstein homogeneous rings. For the precise definitions of level rings and
almost Gorenstein homogeneous rings, see Section 2. For example, the
characterizations of both levelness and almost Gorensteinness of Hibi rings
are given by Miyazaki ([12] and [13]). Those characterizations will be
mentioned in Section 3 in detail.

It is clear that level rings and almost Gorenstein rings are Gorenstein, but
it is hard to determine how different between levelness and Gorensteinness as
well as almost Gorensteinness and Gorensteinness. Even so, it is a naive
problem to analyze the differences of those properties. Moreover, it is also
natural to think of the difference of levelness and almost Gorensteinness for
homogeneous rings and compare these properties from points of view of an
extension of Gorenstein homogeneous rings. For those purpose, we restrict the
objects of homogeneous rings. The central objects of the present paper are the
edge rings of the complete multipartite graphs.

###  1.2. Edge polytopes and edge rings

We recall the definition of edge rings. Note that edge rings are homogeneous
rings arising from graphs and regarded as toric rings associated to some
convex polytopes, which are called edge polytopes. See, e.g., [18, Section 10]
or [7, Section 5] for the introduction to edge rings.

For a positive integer $d$, let $[d]:=\\{1,\ldots,d\\}$. Consider a finite
simple graph $G$ on the vertex set $V(G)=[d]$ with the edge set $E(G)$. Given
an edge $e=\\{i,j\\}\in E(G)$, let $\rho(e):=\mathbf{e}_{i}+\mathbf{e}_{j}$,
where $\mathbf{e}_{i}$ denotes the $i$-th unit vector of $\mathbb{R}^{d}$ for
$i=1,\ldots,d$. We define the convex polytope associated to $G$ as follows:

$P_{G}:=\operatorname{conv}(\\{\rho(e):e\in E(G)\\})\subset\mathbb{R}^{d}.$

We call $P_{G}$ the edge polytope of $G$. We also define the edge ring of $G$,
denoted by $\Bbbk[G]$, as a subalgebra of the polynomial ring $\Bbbk[{\bf
t}]=\Bbbk[t_{1},\ldots,t_{d}]$ in $d$ variables over a field $\Bbbk$ as
follows:

$\Bbbk[G]:=\Bbbk[t_{i}t_{j}:\\{i,j\\}\in E(G)].$

This is actually a monoid $\Bbbk$-algebra associated to the monoid
$\mathbb{Z}_{\geq 0}(P_{G}\cap\mathbb{Z}^{d})$, i.e., the edge ring is the
toric ring (a.k.a. the polytopal monomial subring) of the edge polytope. Note
that $\dim P_{G}=d-1$ if $G$ is non-bipartite ([14, Proposition 1.3]). Thus,
we conclude that the Krull dimension of $\Bbbk[G]$, denoted by $\dim\Bbbk[G]$,
is equial to $d$ if $G$ is non-bipartite.

###  1.3. Edge rings of complete multipartite graphs

We also recall what complete multipartite graphs are. Let
$K_{r_{1},\ldots,r_{n}}$ be the graph on the vertex set
$\bigsqcup_{k=1}^{n}V_{k}$, $|V_{k}|=r_{k}$ for $k=1,\ldots,n$ and $1\leq
r_{1}\leq\cdots\leq r_{n}$, with the edge set $\\{\\{u,v\\}:u\in V_{i},v\in
V_{j},1\leq i<j\leq n\\}.$ This graph $K_{r_{1},\ldots,r_{n}}$ is called the
complete multipartite graph with type $(r_{1},\ldots,r_{n})$. We always denote
the number of vertices of $K_{r_{1},\ldots,r_{n}}$ by $d$, i.e.,
$d=\sum_{i=1}^{n}r_{i}$.

The edge polytope and the edge ring of $K_{r_{1},\ldots,r_{n}}$ were
investigated in [15, Section 2]. For example, the Ehrhart polynomial of
$P_{K_{r_{1},\ldots,r_{n}}}$ (i.e., the Hilbert function of
$\Bbbk[K_{r_{1},\ldots,r_{n}}]$) is completely determined in [15, Theorem
2.6]. Moreover, the Gorensteinness of $\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is
proved as follows:

######  Proposition 1.1 (Characterization of Gorensteinness, [15, Remark
2.8]).

Let $1\leq r_{1}\leq\cdots\leq r_{n}$ and let $d=\sum_{i=1}^{n}r_{i}$, where
$n\geq 2$. Then the edge ring of the complete multipartite graph
$K_{r_{1},\ldots,r_{n}}$ is Gorenstein if and only if

  * •

$n=2$ and $(r_{1},r_{2})\in\\{(1,m),(m,m):m\geq 1\\}$;

  * •

$n=3$ and $1\leq r_{1}\leq r_{2}\leq r_{3}\leq 2$;

  * •

$n=4$ and $r_{1}=\cdots=r_{4}=1$.

This proposition is a direct consequence of [3].

In [10], the authors of the present paper investigated
$\Bbbk[K_{r_{1},\ldots,r_{n}}]$ from different points of view. For example, it
is proved that the class group of $\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is
isomorphic to $\mathbb{Z}^{n}$ if $n=3$ with $r_{1}\geq 2$ or $n\geq 4$.
Moreover, the authors also discuss its conic divisorial ideals and construct
non-commutative crepant resolutions for Gorenstein edge rings of
$K_{r_{1},\ldots,r_{n}}$.

###  1.4. Main Results

The goal of the present paper is to determine when
$\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is level or almost Gorenstein, where $1\leq
r_{1}\leq\cdots\leq r_{n}$. In the case where $n=2$ or $n=3$ with $r_{1}=1$,
Proposition 3.2 says that the edge ring $\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is
isomorphic to a certain Hibi ring. Thus, the characterizations can be obtained
from the results on Hibi rings. See Section 3. Hence, our main concern is in
the case where $n=3$ with $r_{1}\geq 2$ or $n\geq 4$.

The first main result is the characterization of the levelness of
$\Bbbk[K_{r_{1},\ldots,r_{n}}]$:

######  Theorem 1.2 (Characterization of levelness).

Let $1\leq r_{1}\leq\cdots\leq r_{n}$ and let $d=\sum_{i=1}^{n}r_{i}$, where
$n\geq 2$. Then the edge ring of the complete multipartite graph
$K_{r_{1},\ldots,r_{n}}$ is level if and only if $n$ and
$(r_{1},\ldots,r_{n})$ satisfy one of the following:

  1. (i)

$n=2$;

  2. (ii)

$n=3$ and $(r_{1},r_{2},r_{3})\in\\{(1,1,m):m\geq 1\\}\cup\\{(1,2,m):m\geq
2\\}$;

  3. (iii)

$n=3$ and $(r_{1},r_{2},r_{3})\in\\{(2,2,m):m\geq 2\\}\cup\\{(3,3,3)\\}$;

  4. (iv)

$n=4$ and $(r_{1},r_{2},r_{3},r_{4})\in\\{(1,1,1,m):m\geq 1\\}$;

  5. (v)

$n=5$ and $r_{1}=\cdots=r_{5}=1$.

Note that the first two cases come from the results on Hibi rings. See
Proposition 3.5.

The second main result is the characterization of the almost Gorensteinness of
$\Bbbk[K_{r_{1},\ldots,r_{n}}]$:

######  Theorem 1.3 (Characterization of almost Gorensteinness).

Let $1\leq r_{1}\leq\cdots\leq r_{n}$ and let $d=\sum_{i=1}^{n}r_{i}$, where
$n\geq 2$. Then the edge ring of the complete multipartite graph
$K_{r_{1},\ldots,r_{n}}$ is almost Gorenstein if and only if $n$ and
$(r_{1},\ldots,r_{n})$ satisfy one of the following:

  1. (i)

$n=2$ and $(r_{1},r_{2})\in\\{(1,m),(m,m):m\geq 1\\}\cup\\{(2,m):m\geq 2\\}$;

  2. (ii)

$n=3$ and $(r_{1},r_{2},r_{3})\in\\{(1,1,m),(1,m,m):m\geq 1\\}$;

  3. (iii)

$n=3$ and $(r_{1},r_{2},r_{3})=(2,2,2)$;

  4. (iv)

$n=4$ and $(r_{1},r_{2},r_{3},r_{4})\in\\{(1,1,m,m):m\geq 1\\}$;

  5. (v)

$n\geq 4$ and $(r_{1},\ldots,r_{n-1},r_{n})=(1,\ldots,1,n-3)$.

  6. (vi)

$n$ is even with $n\geq 6$ and $r_{1}=\cdots=r_{n}=1$;

Note that the first two cases come from the result on Hibi rings. See Section
3 (below Proposition 3.5).

As an immediate corollary of those theorems, we obtain the following:

######  Corollary 1.4.

The edge ring of the complete multipartite graph $K_{r_{1},\ldots,r_{n}}$ is
level and almost Gorenstein but not Gorenstein if and only if one of the
following holds:

  * •

$n=2$ and $(r_{1},r_{2})\in\\{(2,m):m\geq 3\\}$;

  * •

$n=3$ and $(r_{1},r_{2},r_{3})\in\\{(1,1,m):m\geq 3\\}$.

In particular, in both cases, the edge rings are isomorphic to certain Hibi
rings.

######  Example 1.5 ($n=2$ or $n=3$).

For $K_{r_{1},r_{2}}$, we see that $\Bbbk[K_{r_{1},r_{2}}]$ is always level.
Moreover, $\Bbbk[K_{1,m}]$ and $\Bbbk[K_{m,m}]$ are Gorenstein, while
$\Bbbk[K_{2,m}]$ is not Gorenstein but almost Gorenstein if $m\geq 3$.

For $K_{r_{1},r_{2},r_{3}}$, we see that $\Bbbk[K_{r_{1},r_{2},r_{3}}]$ is

  * •

level but not Gorenstein for $K_{1,1,m},K_{1,2,m},K_{2,2,m}$ with $m\geq 3$
and $K_{3,3,3}$;

  * •

almost Gorenstein but not Gorenstein if and only if $K_{1,1,m},K_{1,m,m}$ with
$m\geq 3$;

  * •

level and almost Gorenstein but not Gorenstein if and only if $K_{1,1,m}$ with
$m\geq 3$.

######  Example 1.6 ($n=4$).

For $K_{r_{1},r_{2},r_{3},r_{4}}$, we see that
$\Bbbk[K_{r_{1},r_{2},r_{3},r_{4}}]$ is

  * •

level for $K_{1,1,1,m}$;

  * •

almost Gorenstein for $K_{1,1,m,m}$;

  * •

Gorenstein for $K_{1,1,1,1}$.

######  Example 1.7 ($n\geq 5$).

In the case $n\geq 5$, $\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is never Gorenstein,
and it is level only for $K_{5}$. On the other hand, it is almost Gorenstein
for $K_{2m}$ with $m\geq 3$ and $K_{\underbrace{1,\ldots,1}_{n-1},n-3}$.

###  1.5. Organization

First, in Section 2, we recall the precise definitions of level rings and
almost Gorenstein homogeneous rings and some known results on them, which we
will use in the proofs of our main results. Next, in Section 3, we discuss the
main theorems in the case where $n=2$ or $n=3$ with $r_{1}=1$, which can be
deduced into the results on Hibi rings. Thus, we also recall the results on
Hibi rings. Finally, in Section 4, we give proofs of Theorems 1.2 and 1.3.

### Acknowledgement

The first named author is partially supported by JSPS Grant-in-Aid for
Scientific Research (C) 20K03513.

##  2\. Levelness and almost Gorensteinness of homogeneous rings

Throughout this section, let $R$ be a Cohen–Macaulay homogeneous ring of
dimension $d$ over an algebraically closed field $\Bbbk$ with characteristic
$0$. We recall the definitions of levelness and almost Gorensteinness and some
properties on those algebras.

Before defining them, we recall some fundamental materials. (Consult, e.g.,
[2] for the introduction to homogeneous rings.)

  * •

Let $\omega_{R}$ denote a canonical module of $R$. Let $a(R)$ denote the
$a$-invariant of $R$, i.e., $a(R)=-\min\\{j:(\omega_{R})_{j}\neq 0\\}$.

  * •

For a graded $R$-module $M$, we use the following notation:

    * –

Let $\mu_{j}(M)$ denote the number of elements of minimal generators of $M$
with degree $j$ as an $R$-module, and let
$\mu(M)=\sum_{j\in\mathbb{Z}}\mu_{j}(M)$, i.e., the number of minimal
generators.

    * –

Let $e(M)$ denote the multiplicity of $M$. Then the inequality $\mu(M)\leq
e(M)$ always holds.

    * –

Let $M(-\ell)$ denote the $R$-module whose grading is given by
$M(-\ell)_{n}=M_{n-\ell}$ for any $n\in\mathbb{Z}$.

  * •

Let $r(R)$ denote the Cohen–Macaulay type of $R$. Note that
$r(R)=\mu(\omega_{R})$. We see that $R$ is Gorenstein if and only if $r(R)=1$.

  * •

Let $H(M,m)$ denote the Hilbert function of $M$, i.e.,
$H(M,m)=\dim_{\Bbbk}M_{m}$, where $\dim_{\Bbbk}$ stands for the dimension as a
$\Bbbk$-vector space. Note that $H(M,m)$ can be described by a polynomial in
$m$ of degree $d-1$ and its leading coefficient coincides with $e(M)/d!$. (See
[2, Section 4].)

  * •

Write $(h_{0},\ldots,h_{s})$ for the $h$-vector of $R$, which is the
coefficients of the polynomial appearing in the numerator of the Hilbert
series of $R$, i.e.,

$\sum_{n=0}^{\infty}\dim_{\Bbbk}R_{n}t^{n}=\frac{\sum_{i=0}^{s}h_{i}t^{i}}{(1-t)^{d}},$

where $h_{s}\neq 0$. We call the index $s$ the socle degree of $R$. Note that
$h_{s}\leq r(R)$ holds. Moreover, we see that $d+a(R)=s$. (See [2, Section
4.4].)

######  Definition 2.1 (Level, [17]).

We say that $R$ is level if all the degrees of the minimal generators of
$\omega_{R}$ are the same. In particular, what $R$ is Gorenstein implies what
$R$ is level since $\omega_{R}$ is generated by a unique element if $R$ is
Gorenstein.

######  Remark 2.2.

Let $(h_{0},h_{1},\ldots,h_{s})$ be the $h$-vector of $R$. Assume that $R$ is
level. In this case, if $h_{s}=1$, then $R$ is Gorenstein. In fact, since what
$R$ is level is equivalent to $h_{s}=r(R)$ (see, e.g., [2, Section 5]), we
obtain that $r(R)=1$.

Regarding the levelness of homogeneous domains, we know the following:

######  Theorem 2.3 ([19, Corollary 3.11]).

Let $R$ be an almost Gorenstein homogeneous domain with its socle degree $s$.
If $s=2$, then $R$ is level.

######  Definition 2.4 (Almost Gorenstein, [5, Definition 1.5]).

We call $R$ almost Gorenstein if there exists an exact sequence of graded
$R$-modules

$\displaystyle 0\to R\to\omega_{R}(-a)\to C\to 0$ (2.1)

with $\mu(C)=e(C)$.

Note that there always exists a degree-preserving injection from $R$ to
$\omega_{R}(-a)$ if $R$ is a domain ([9, Proposition 2.2]). Moreover, we see
that $\mu(C)=r(R)-1$ ([9, Proposition 2.3]), which we will use later.

Regarding the almost Gorensteinness of homogeneous domains, we know the
following:

######  Theorem 2.5 ([9, Theorem 4.7]).

Let $R$ be an almost Gorenstein homogeneous domain and
$(h_{0},h_{1},\ldots,h_{s})$ its $h$-vector with $s\geq 2$. Then $h_{s}=1$.

##  3\. In the case of Hibi rings

In this section, we recall Hibi rings and the characterization results on
Gorensteinness, levelness and almost Gorensteinness of Hibi rings.

Let $\Pi=\\{p_{1},\ldots,p_{d-1}\\}$ be a finite partially ordered set (poset,
for short) equipped with a partial order $\prec$. For $p,q\in\Pi$, we say that
$p$ covers $q$ if $q\prec p$ and there is no
$p^{\prime}\in\Pi\setminus\\{p,q\\}$ with $q\prec p^{\prime}\prec p$. For a
subset $I\subset\Pi$, we say that $I$ is a poset ideal of $\Pi$ if $p\in I$
and $q\prec p$ then $q\in I$. Let $\mathcal{I}(\Pi)$ denote the set of all
poset ideals in $\Pi$. Note that $\emptyset\in\mathcal{I}(\Pi)$.

We define the $\Bbbk$-algebra $\Bbbk[\Pi]$ as a subalgebra of the polynomial
ring $\Bbbk[x_{1},\ldots,x_{d-1},t]$ by setting

$\Bbbk[\Pi]:=\Bbbk[{\bf x}^{I}t:I\in\mathcal{I}(\Pi)],$

where ${\bf x}^{I}=\prod_{p_{i}\in I}x_{i}$ for $I\subset\Pi$ and each ${\bf
x}^{I}t$ is defined to be of degree $1$. The standard graded $\Bbbk$-algebra
$\Bbbk[\Pi]$ is called the Hibi ring of $\Pi$. The following fundamental
properties on Hibi rings were originally proved in [8]:

  * •

The Krull dimension of $\Bbbk[\Pi]$ is equal to $|\Pi|+1$;

  * •

$\Bbbk[\Pi]$ is a Cohen–Macaulay normal domain;

  * •

$\Bbbk[\Pi]$ is an algebra with straightening laws on $\Pi$.

We say that a poset $\Pi$ is pure if each maximal chain contained in the poset
has the same length, where the length of the chain $p_{i_{0}}\prec
p_{i_{1}}\prec\cdots\prec p_{i_{\ell}}$ is defined to be $\ell$. The following
is well known:

######  Theorem 3.1 ([8]).

The Hibi ring $\Bbbk[\Pi]$ of $\Pi$ is Gorenstein if and only if $\Pi$ is
pure.

Given positive integers $m$ and $n$, let
$\Pi_{m,n}=\\{p_{1},\ldots,p_{m},p_{m+1},\ldots,p_{m+n}\\}$ be the poset
equipped with the partial orders $p_{1}\prec\cdots\prec p_{m}$ and
$p_{m+1}\prec\cdots\prec p_{m+n}$. Moreover, let $\Pi_{m,n}^{\prime}$ be the
poset having an additional relation $p_{1}\prec p_{m+n}$. Note that the Hibi
ring $\Bbbk[\Pi_{m,n}]$ is isomorphic to the Segre product of the polynomial
ring with $(m+1)$ variables and the polynomial ring with $(n+1)$ variables
(see, e.g., [11, Example 2.6]).

Actually, the certain edge rings are isomorphic to the Hibi rings
$\Bbbk[\Pi_{m,n}]$ and $\Bbbk[\Pi_{m,n}^{\prime}]$ as follows:

######  Proposition 3.2 ([10, Proposition 2.2]).

The edge ring $\Bbbk[K_{m+1,n+1}]$ (resp. $\Bbbk[K_{1,m,n}]$) is isomorphic to
the Hibi ring $\Bbbk[\Pi_{m,n}]$ (resp. $\Bbbk[\Pi_{m,n}^{\prime}]$).

Therefore, in the case where $n=2$ or $n=3$ with $r_{1}=1$, the
characterization of levelness and almost Gorensteinness of
$\Bbbk[K_{r_{1},\ldots,r_{n}}]$ can be deduced into those of the Hibi rings
$\Bbbk[\Pi_{m,n}]$ and $\Bbbk[\Pi_{m,n}^{\prime}]$.

Hence, in what follows, we give the characterizations of those properties for
$\Bbbk[\Pi_{m,n}]$ and $\Bbbk[\Pi_{m,n}^{\prime}]$, which prove Theorems 1.2
and 1.3 in the case where $n=2$ or $n=3$ with $r_{1}=1$.

Miyazaki gave the characterizations of levelness [12] and almost
Gorensteinness [13] of Hibi rings. For explaining those results, we introduce
some notions.

Given a poset $\Pi$, let $\widehat{\Pi}:=\Pi\cup\\{\hat{0},\hat{1}\\}$, where
$\hat{0}$ (resp. $\hat{1}$) denotes a new unique minimal (maximal) element.

  * •

For $x,\ y\in\Pi$ with $x\preceq y$, we set $[x,y]_{\Pi}:=\\{z\in\Pi:x\preceq
z\preceq y\\}$.

  * •

We define $\operatorname{rank}P$ to be the maximal lenth of the chains in
$\Pi$, and define $\operatorname{rank}[x,y]_{\Pi}$ analogously.

  * •

Let $y_{1},x_{1},y_{2},x_{2},\ldots,y_{t},x_{t}$ be a (possibly empty)
sequence of elements in $\widehat{\Pi}$. We say that the sequence
$y_{1},x_{1},y_{2},x_{2},\ldots,y_{t},x_{t}$ satisfies condition N if
(1) $x_{1}\neq\hat{0}$,
(2) $y_{1}\succ x_{1}\prec y_{2}\succ x_{2}\prec\cdots\prec y_{t}\succ x_{t}$,
and
(3) $y_{i}\nsucceq x_{j}$ for any $i,j$ with $1\leq i<j\leq t$.

  * •

Let

$r(y_{1},x_{1},\ldots,y_{t},x_{t}):=\sum_{i\in[t]}(\operatorname{rank}[x_{i-1},y_{i}]_{\widehat{\Pi}}-\operatorname{rank}[x_{i},y_{i}]_{\widehat{\Pi}})+\operatorname{rank}[x_{t},\hat{1}]_{\widehat{\Pi}},$

where we set an empty sum to be 0 and $x_{0}=\hat{0}$.

  * •

Given $x\in\Pi$, let

$\operatorname{star}_{\Pi}(x)=\\{y\in\Pi:y\preceq x\text{ or }x\preceq y\\}.$

######  Theorem 3.3 ([12, Theorem 3.9]).

The Hibi ring of $\Pi$ is level if and only if

$r(y_{1},x_{1},\ldots,y_{t},x_{t})\leq\operatorname{rank}\widehat{\Pi}$

holds for any sequence of elements in $\widehat{P}$ with condition N.

######  Corollary 3.4 ([12, Corollary 3.10]).

If $[x,\hat{1}]_{\widehat{\Pi}}$ is pure for any $x\in\Pi$, then $\Bbbk[\Pi]$
is level.

By using those results by Miyazaki, we can prove the following:

######  Proposition 3.5.

Let $m\leq n$.
(i) The Hibi ring $\Bbbk[\Pi_{m,n}]$ of $\Pi_{m,n}$ is level for any $m,n$.
(ii) The Hibi ring $\Bbbk[\Pi_{m,n}^{\prime}]$ of $\Pi_{m,n}^{\prime}$ is
level if and only if $m=1$ or $m=2$.

###### Proof.

The assertion (i) directly follows from Corollary 3.4.

Similarly, we see from Corollary 3.4 that $\Bbbk[\Pi_{1,n}^{\prime}]$ and
$\Bbbk[\Pi_{2,n}^{\prime}]$ are level.

Let $y_{1}=p_{m+n}$ and $x_{1}=p_{1}$ and take the sequence $y_{1},x_{1}$,
which satisfies condition N. Then we see that

$r(y_{1},x_{1})=\operatorname{rank}[\hat{0},y_{1}]_{\widehat{\Pi}}-\operatorname{rank}[x_{1},y_{1}]_{\widehat{\Pi}}+\operatorname{rank}[x_{1},\hat{1}]_{\widehat{\Pi}}=n-1+m.$

On the other hand, we have $\operatorname{rank}\widehat{\Pi}=n+1$. If $m\geq
3$, then $m-1>1$, so we have

$n+m-1=r(x_{1},y_{1})>\operatorname{rank}\widehat{\Pi}=n+1.$

Hence, $\Bbbk[\Pi_{m,n}^{\prime}]$ is not level when $m\geq 3$ by Theorem 3.3.
Therefore, the assertion (ii) follows. ∎

Hence, in the case where $n=2$ or $n=3$ with $r_{1}=1$,
$\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is level if and only if
$K_{r_{1},\ldots,r_{n}}$ satisfies (1) or (2) in Theorem 1.2.

Note that $\Bbbk[K_{1,n}]$ is isomorphic to a polynomial ring with $n$
variables.

Regarding the characterization of almost Gorenstein Hibi rings, see [13,
Introduction]. According to it, we see the following:

  * •

Let $m\leq n$. Consider the poset $\Pi_{m,n}$.

    * –

We see that $\Pi_{1,n}$ fits into the case of (1) of [13, Introduction]. Thus,
$\Bbbk[\Pi_{1,n}]$ is almost Gorenstein.

    * –

Since $\Pi_{m,m}$ is pure, we know that $\Bbbk[\Pi_{m,m}]$ is Gorenstein, in
particular, almost Gorenstein.

    * –

If $1<m<n$, then we see from the characterization that $\Bbbk[\Pi_{m,n}]$ is
never almost Gorenstein.

  * •

Let $m\leq n$. Consider the poset $\Pi_{m,n}^{\prime}$.

    * –

We have $\operatorname{star}_{\Pi_{1,n}^{\prime}}(p_{n+1})=\Pi_{1,n}^{\prime}$
and $\Pi_{1,n}^{\prime}\setminus\\{p_{n+1}\\}$ fits into the case of (1) of
[13, Introduction]. Thus, $\Bbbk[\Pi_{1,n}]$ is almost Gorenstein.

    * –

We see that $\Pi_{m,m}^{\prime}$ fits into the case of (2) (ii) (with $p=0$).
Hence, $\Bbbk[\Pi_{m,m}^{\prime}]$ is almost Gorenstein.

    * –

If $1<m<n$, then we see from the characterization that
$\Bbbk[\Pi_{m,n}^{\prime}]$ is never almost Gorenstein.

##  4\. Proofs of main theorems

The goal of this section is to complete the proofs of Theorems 1.2 and 1.3. As
shown in Section 3, the case where $n=2$ or $n=3$ with $r_{1}=1$ was already
done. Thus, in principle, we discuss the case where $n=3$ with $r_{1}\geq 2$
or $n\geq 4$.

###  4.1. Preliminaries for edge polytopes

Before proving the assertions, we recall some geometric information on edge
polytopes.

For $i\in[d]$, let $p_{i}:\mathbb{R}^{d}\to\mathbb{R}$ be the $i$-th
projection, and let $p_{V_{k}}:=\sum_{j\in V_{k}}p_{j}$ for $k\in[n]$.

For $k\in[n]$, let $\displaystyle f_{k}:=\sum_{i\in[d]\setminus
V_{k}}\mathbf{e}_{i}-\sum_{j\in V_{k}}\mathbf{e}_{j}.$ We define $\Psi_{r}$,
$\Psi_{f}$ and $\Psi$ as follows:

$\Psi_{r}:=\\{\mathbf{e}_{i}:i\in[d]\\},\quad\Psi_{f}:=\\{f_{k}:k\in[n]\\},\quad\Psi:=\Psi_{r}\cup\Psi_{f}.$

Note that for $\mathbf{e}_{i}\in\Psi_{r}$ (resp. $f_{k}\in\Psi_{f}$), we have
$\langle-,\mathbf{e}_{i}\rangle=p_{i}(-)$ (resp.
$\langle-,f_{k}\rangle=\displaystyle\biggl{(}\sum_{j\in[n]\setminus\\{k\\}}p_{V_{j}}-p_{V_{k}}\biggr{)}(-)$),
where
$\langle-,-\rangle:\mathbb{R}^{d}\times\mathbb{R}^{d}\rightarrow\mathbb{R}$
stands for the usual inner product.

It is proved in [14] that the hyperplanes
$H_{l}:=\\{x\in\mathbb{R}^{d}:\langle x,l\rangle=0\\}$ for $l\in\Psi$ define
the facets of $P_{K_{r_{1},\ldots,r_{n}}}$. Although those are not necessarily
one-to-one, in the case where $n=3$ with $r_{1}\geq 2$ or $n\geq 4$, we see
that it is one-to-one.

Let $G$ be a graph on the vertex set $[d]$. We say that $G$ satisfies odd
cycle condition if for any two distinct odd cycles which have no common
vertex, there is a bridge between them. It is known that $\Bbbk[G]$ is normal
if and only if $G$ satisfies odd cycle condition. Note that
$K_{r_{1},\ldots,r_{n}}$ satisfies odd cycle condition. Let
$(h_{0},h_{1},\ldots,h_{s})$ be the $h$-vector of the edge ring $\Bbbk[G]$,
where $s$ is the scole degree, and let
$\ell=\min\\{m\in\mathbb{Z}_{>0}:mP_{G}^{\circ}\cap\mathbb{Z}^{d}\neq\emptyset\\}$,
where $P_{G}^{\circ}$ denotes the relative interior of $P_{G}$. Since the
ideal generated by the monomials contained in the interior of $P_{G}$ is the
canonical module of $\Bbbk[G]$, we see that $\ell=-a(\Bbbk[G])$. Thus,
$d=\ell+s$ holds if $G$ is non-bipartite. In the case where $n=3$ with
$r_{1}\geq 2$ or $n\geq 4$, one has $\iota\in
mP_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$ if and only if
$\langle\iota,l\rangle>0$ holds for all $l\in\Psi$.

For $\iota\in(\ell+k)P_{G}^{\circ}\cap\mathbb{Z}^{d}$ for
$k\in\mathbb{Z}_{>0}$, then we say that $\iota$ is a first appearing interior
point in $(\ell+k)P_{G}^{\circ}\cap\mathbb{Z}^{d}$ if it cannot be written as
a sum of $\iota^{\prime}\in(\ell+i)P_{G}^{\circ}\cap\mathbb{Z}^{d}$ with
$0\leq i<k$ and $\rho(e)$’s with $e\in E(G)$, where the elements in $\ell
P_{G}^{\circ}\cap\mathbb{Z}^{d}$ are regarded as first appearing interior
points. Let $\mu_{k}(G)$ denote the number of first appearing interior points
in $(\ell+k)P_{G}^{\circ}\cap\mathbb{Z}^{d}$ for $k\in\mathbb{Z}_{\geq 0}$.
Note that $\mu_{0}(G)=h_{s}$ holds.

In what follows, for the study of $\Bbbk[K_{r_{1},\ldots,r_{n}}]$ with $1\leq
r_{1}\leq\cdots\leq r_{n}$ and $d=\sum_{i=1}^{d}r_{i}$, we divide into the
following three cases on $K_{r_{1},\ldots,r_{n}}$:

  * (A)

$2r_{n}<d$ and $d$ is even;

  * (B)

$2r_{n}<d$ and $d$ is odd;

  * (C)

$2r_{n}\geq d$.

Given a graph $G$ with the edge set $E(G)$, we say that $\mathcal{M}\subset
E(G)$ is a perfect matching (a.k.a. $1$-factor) if every vertex of $G$ is
incident to exactly one edge of $\mathcal{M}$.

######  Lemma 4.1.

The complete multipartite graph $K_{r_{1},\ldots,r_{n}}$ has a perfect
matching if and only if $d$ is even and $2r_{n}\leq d$.

###### Proof.

Tutte’s theorem (see, e.g., [4, Theorem 2.2.1]) claims that a graph $G$ on the
vertex set $V(G)$ has a perfect matching if and only if $q(G-U)\leq|U|$ holds
for any $U\subset V(G)$, where $q(\cdot)$ denotes the number of connected
components with odd cardinality and $G-U$ denotes the induced subgraph of $G$
by $V(G)\setminus U$.

When $U=V(K_{r_{1},\ldots,r_{n}})$, the inequality trivially holds. When
$U=\emptyset$, we can see that $q(G)=0$ holds if and only if $d$ is even.

Consider $\emptyset\neq U\subsetneq V(K_{r_{1},\ldots,r_{n}})$. If there are
two verticies $u,v$ in $V(K_{r_{1},\ldots,r_{n}})\setminus U$ with $u\in
V_{i}$ and $v\in V_{j}$ with $i\neq j$, the number of connected components of
$K_{r_{1},\ldots,r_{n}}-U$ is equal to $1$, so
$q(K_{r_{1},\ldots,r_{n}}-U)\leq|U|$ holds. If there exists $k\in[n]$ with
$V(K_{r_{1},\ldots,r_{n}})\setminus U\subset V_{k}$, then it follows from
$1\leq r_{1}\leq\cdots\leq r_{n}$ and $V_{i}\subset U$ for
$i\in[n]\setminus\\{k\\}$ that $q(K_{r_{1},\ldots,r_{n}}-U)\leq r_{k}\leq
r_{n}\leq|U|$. Therefore, by considering the case $k=n$, we conclude the
following:

$\displaystyle q(K_{r_{1},\ldots,r_{n}}-U)\leq|U|\ \text{for any }U$
$\displaystyle\Longleftrightarrow\ r_{n}\leq\sum_{k\in[n-1]}r_{k}\text{ and
$d$ is even }$ $\displaystyle\Longleftrightarrow\ 2r_{n}\leq d\text{ and $d$
is even.}$

∎

######  Proposition 4.2.

Let $(h_{0},h_{1},\ldots,h_{s})$ be the $h$-vector of
$\Bbbk[K_{r_{1},\ldots,r_{n}}]$.

  * (a)

In the case of (A), we have $\ell=d/2$ and $h_{s}=1$.

  * (b)

In the case of (B), we have $\ell=(d+1)/2$ and $h_{s}\geq 2$.

  * (c)

In the case of (C), we have $\ell=r_{n}+1$ and $h_{s}\geq 2$.

###### Proof.

In the case of (A), by Lemma 4.1, there exists a perfect matching
$\mathcal{M}\subset E(K_{r_{1},\ldots,r_{n}})$, and we obtain
$\rho(\mathcal{M}):=\sum_{e\in\mathcal{M}}\rho(e)=\sum_{i\in[d]}\mathbf{e}_{i}$.
We can see that $\rho(\mathcal{M})$ is the unique element in
$|\mathcal{M}|P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$ since
$\langle\rho(\mathcal{M}),l\rangle>0$ hold for all $l\in\Psi$, and it is clear
that $mP_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}=\emptyset$ for
$m<|\mathcal{M}|$. Therefore, we have $\ell=|\mathcal{M}|=d/2$ and $h_{s}=1$.

Next, assume the case of (B). We consider the induced subgraph
$K_{r_{1},\ldots,r_{n}}-\\{v_{n}\\}$ for $v_{n}\in V_{n}$. From the
assumption, we observe that $d-1$ is even and
$2\mathrm{min}\\{r_{n-1},r_{n}-1\\}\leq 2r_{n}\leq d-1$ holds. Hence, we can
take a perfect matching $\mathcal{M}^{\prime}$ of
$K_{r_{1},\ldots,r_{n}}-\\{v_{n}\\}$ by Lemma 4.1. Take $v_{1}\in V_{1}$, add
the edge $\\{v_{1},v_{n}\\}$ to $\mathcal{M}^{\prime}$ and write
$\mathcal{M}^{\prime\prime}$ for it. Then we have
$\rho(\mathcal{M}^{\prime\prime})=2\mathbf{e}_{v_{1}}+\sum_{i\in[d]\setminus\\{v_{1}\\}}\mathbf{e}_{i}$,
and $\langle\rho(\mathcal{M}^{\prime\prime}),l\rangle>0$ for all $l\in\Psi$.
In fact, for $f_{1}$, we observe that

$\langle\rho(\mathcal{M}^{\prime\prime}),f_{1}\rangle=\biggl{(}\sum_{i\in[n]\setminus\\{1\\}}p_{V_{i}}-p_{V_{1}}\biggr{)}(\rho(\mathcal{M}^{\prime\prime}))=\displaystyle\sum_{k\in[n]\setminus\\{1\\}}r_{k}-(r_{1}+1)\geq\sum_{k\in[n]\setminus\\{1,2\\}}r_{k}-1>0.$

Thus, we have
$\rho(\mathcal{M}^{\prime\prime})\in|\mathcal{M}^{\prime\prime}|P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$
and $mP_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}=\emptyset$ for
$m<|\mathcal{M}^{\prime\prime}|$. Moreover, by exchanging $v_{1}$ with another
vertex of $V_{1}$ or a vertex of $V_{2}$ if $r_{1}=1$, we obtain
$\rho(\mathcal{M}^{\prime\prime})\in|\mathcal{M}^{\prime\prime}|P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$
in the same way. Therefore, we have
$\ell=|\mathcal{M}^{\prime\prime}|=(d+1)/2$ and $h_{s}\geq 2$.

Finally, assume the case of (C). Let $r_{n}^{\prime}:=\sum_{i\in[n-1]}r_{i}$
and let $r_{n}^{\prime\prime}:=r_{n}-r_{n}^{\prime}$. We join $r_{n}^{\prime}$
verticies of $V_{n}$ to verticies of $[d]\setminus V_{n}$ one-by-one, and join
the remaining $r_{n}^{\prime\prime}$ verticies of $V_{n}$ to $v_{1}$, and join
a vertex $v_{2}\in V_{2}$ to $v_{1}$. Let $\mathcal{E}$ be the set of those
edges. Then we have
$\rho(\mathcal{E})=(r_{n}^{\prime\prime}+2)\mathbf{e}_{v_{1}}+2\mathbf{e}_{v_{2}}+\sum_{i\in[d]\setminus\\{v_{1},v_{2}\\}}\mathbf{e}_{i}$,
and $\langle\rho(\mathcal{E}),l\rangle>0$ for all $l\in\Psi$. In fact, for
$f_{1}$, we observe that

$\langle\rho(\mathcal{E}),f_{1}\rangle=\displaystyle\sum_{k\in[n]\setminus\\{1\\}}r_{k}+1-(r_{1}+r_{n}^{\prime\prime}+1)\geq\sum_{k\in[n]\setminus\\{1,2,n\\}}r_{k}+r_{n}^{\prime}>0.$

Thus, we have
$\rho(\mathcal{E})\in|\mathcal{E}|P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$
and $mP_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}=\emptyset$ for
$m<|\mathcal{E}|$ since $\langle\iota,r\rangle>0$ for all $\iota\in\ell
P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$ and $r\in\Psi$.
Moreover, by exchanging $v_{2}$ with another vertex of $V_{2}$ or a vertex of
$V_{3}$ if $r_{2}=1$, we obtain
$\rho(\mathcal{E})\in|\mathcal{E}|P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$
in the same way. Therefore, we have $\ell=|\mathcal{E}|=r_{n}+1$ and
$h_{s}\geq 2$. ∎

######  Corollary 4.3.

Assume that $n=3$ with $r_{1}\geq 2$ or $n\geq 4$. If
$\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is almost Gorenstein, then
$K_{r_{1},\ldots,r_{n}}$ is in the case of (A).

###### Proof.

In our assumption, we have $d\geq 4$. Note that $s=d-\ell$.

In the case of (B), since $s=d-\ell=d-(d+1)/2=(d-1)/2$ by Proposition 4.2 (b),
and $d$ is odd, we see that $s\geq 2$. In the case of (C), since
$s=d-\ell=\sum_{i\in[n]}r_{i}-r_{n}-1=\sum_{i\in[n-1]}r_{i}-1$ by Proposition
4.2 (c), we see that $s\geq 2$. Moreover, in both cases, we also know that
$h_{s}\geq 2$. Therefore, these are never almost Gorenstein by Theorem 2.5. ∎

###  4.2. Proof of Theorem 1.2

This subsection is devoted to proving Theorem 1.2. Since the case where $n=2$
or $n=3$ with $r_{1}=1$ has been already done in Section 3, we assume that
$n=3$ with $r_{1}\geq 2$ or $n\geq 4$. Under this assumption, we prove that
$\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is level if and only if one of the following
holds:

$\begin{split}&\text{$n=3$ with $r_{1}=r_{2}=2$ or $r_{1}=r_{2}=r_{3}=3$;}\\\
&\text{$n=4$ with $r_{1}=r_{2}=r_{3}=1$;}\\\ &\text{$n=5$ with
$r_{1}=\cdots=r_{5}=1$}.\end{split}$ (4.1)

Assume the case of (A). By Proposition 4.2, we have $h_{s}=1$. Thus,
$\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is Gorenstein if it is level (see Remark 2.2).
Hence, $\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is level if and only if
$K_{r_{1},\ldots,r_{n}}=K_{2,2,2}$ or $K_{1,1,1,1}$ by [15, Remark 2.8].

Therefore, in what follows, we consider the cases (B) and (C).

“Only if” part:

Assume the case of (B). Take $\mathcal{M}^{\prime\prime}$ and $v_{1}\in V_{1}$
as in the proof of Proposition 4.2. Then there exsists an edge
$\\{i,j\\}\in\mathcal{M}^{\prime\prime}$ such that $i\not\in V_{1}$ and
$j\not\in V_{1}$. Remove such edge from $\mathcal{M}^{\prime\prime}$ and add
$\\{v_{1},i\\}$ and $\\{v_{1},j\\}$ to $\mathcal{M}^{\prime\prime}$. Write
$\mathcal{N}$ for it. Then we have

$\rho(\mathcal{N})=4\mathbf{e}_{v_{1}}+\sum_{i\in[d]\setminus\\{v_{1}\\}}\mathbf{e}_{i}\in(\ell+1)P_{K_{r_{1},\ldots,r_{n}}}\cap\mathbb{Z}^{d}.$

Since there is only one entry which is more than $1$, we see that
$\rho(\mathcal{N})$ cannot be written as a sum of $\ell
P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$ and $\rho(e)$ for $e\in
E(K_{r_{1},\ldots,r_{n}})$. Hence, once we have
$\rho(\mathcal{N})\in(\ell+1)P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$,
it is not level. Since we know $\langle\rho(\mathcal{N}),r\rangle>0$ for all
$r\in\Psi_{r}$, we may observe those of $\Psi_{f}$:

$\displaystyle\langle
f_{1},\rho(\mathcal{N})\rangle=\sum_{i\in[n]\setminus\\{1\\}}r_{i}-(r_{1}+3)>0;$
(4.2) $\displaystyle\langle
f_{k},\rho(\mathcal{N})\rangle=\sum_{i\in[n]\setminus\\{k\\}}r_{i}+3-r_{k}>0\
\text{for}\ k\in[n]\setminus\\{1\\}.$ (4.3)

The inequality (4.3) always holds by the assumption (B). The inequality (4.2)
holds if

$\displaystyle n$ $\displaystyle\geq 6,$ $\displaystyle n$ $\displaystyle=5\
\text{with}\ r_{5}\geq 2,$ $\displaystyle n$ $\displaystyle=4\ \text{with}\
r_{4}\geq 3,\text{ or}$ $\displaystyle n$ $\displaystyle=3\ \text{with}\
r_{3}\geq 4.$

Therefore, in the case of (B),

$\Bbbk[K_{r_{1},\ldots,r_{n}}]$ are not level except for $K_{1,1,1,1,1}$,
$K_{1,1,1,2}$, $K_{2,2,3}$, and $K_{3,3,3}$.

Note that we can confirm that $\Bbbk[K_{1,2,2,2}]$ is not level by using
Macaulay2 ([6]).

Assume the case of (C). Take $\mathcal{E}$, $v_{1}\in V_{1}$, and $v_{2}\in
V_{2}$ as in the proof of Proposition 4.2. In $\mathcal{E}$, let $v_{n}\in
V_{n}$ be the vertex adjacent to $v_{2}$, and let $v_{n}^{\prime}$ be the
vertex adjacent to a vertex $v_{2}^{\prime}\neq v_{2}$ of $V_{2}$ or a vertex
$v_{3}\in V_{3}$ if $r_{2}=1$. Remove $\\{v_{2},v_{n}\\}$ and
$\\{v_{2}^{\prime},v_{n}^{\prime}\\}$ from $\mathcal{E}$ and add
$\\{v_{1},v_{n}\\}$, $\\{v_{1},v_{2}^{\prime}\\}$ and
$\\{v_{1},v_{n}^{\prime}\\}$ to $\mathcal{E}$. Write $\mathcal{N}^{\prime}$
for it. Then we have

$\rho(\mathcal{N}^{\prime})=(r_{n}^{\prime\prime}+5)\mathbf{e}_{v_{1}}+\sum_{i\in[d]\setminus\\{v_{1}\\}}\mathbf{e}_{i}\in(\ell+1)P_{K_{r_{1},\ldots,r_{n}}}\cap\mathbb{Z}^{d}.$

Then we see that $\rho(\mathcal{N}^{\prime})$ cannot be written as a sum of
$\ell P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$ and $\rho(e)$ for
$e\in E(K_{r_{1},\ldots,r_{n}})$. Hence, once we have
$\rho(\mathcal{N}^{\prime})\in(\ell+1)P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$,
it is not level. Since we know $\langle\rho(\mathcal{N}^{\prime}),r\rangle>0$
for all $r\in\Psi_{r}$, we may observe those of $\Psi_{f}$:

$\displaystyle\langle
f_{1},\rho(\mathcal{N}^{\prime})\rangle=\sum_{i\in[n]\setminus\\{1\\}}r_{i}-(r_{1}+r_{n}^{\prime\prime}+4)>0;$
(4.4) $\displaystyle\langle
f_{k},\rho(\mathcal{N}^{\prime})\rangle=\sum_{i\in[n]\setminus\\{k\\}}r_{i}+r_{n}^{\prime\prime}+4-r_{k}>0\
\text{for}\ k\in[n]\setminus\\{1\\}.$ (4.5)

The inequality (4.5) always holds by (C). The inequality (4.4) holds if

$\displaystyle n$ $\displaystyle\geq 5,$ $\displaystyle n$ $\displaystyle=4\
\text{with}\ r_{3}\geq 2,\text{ or}$ $\displaystyle n$ $\displaystyle=3\
\text{with}\ r_{2}\geq 3.$

Thus, in the case of (C),

$\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is not level except for $K_{2,2,r_{3}}$ with
$r_{3}\geq 4$ and $K_{1,1,1,r_{4}}$ with $r_{4}\geq 3$.

Therefore, we obtain that $\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is not level if not
in the case (4.1).

“If” part:

Our remaining task is to show that the edge rings of (4.1) are level.

($K_{2,2,r_{3}}$ with $r_{3}\geq 2$)

If $r_{3}=2$, $\Bbbk[K_{2,2,2}]$ is Gorenstein, and if $r_{3}=3$,
$\Bbbk[K_{2,2,3}]$ is level by using Macaulay2.

Hence, let us assume that $r_{3}\geq 4$. Then $K_{r_{1},\ldots,r_{n}}$
satisfies (C). Thus, we have $\ell=r_{3}+1$. It is enough to show that for any
$k\geq 0$ and $\iota\in(\ell+k)P_{K_{2,2,r_{3}}}^{\circ}\cap\mathbb{Z}^{d}$,
$\iota$ can be written as a sum of an element of $\ell
P_{K_{2,2,r_{3}}}^{\circ}\cap\mathbb{Z}^{d}$ and $k$ elements of
$P_{K_{2,2,r_{3}}}\cap\mathbb{Z}^{d}$, i.e., $\rho(e_{1}),\ldots,\rho(e_{k})$
with $e_{1},\ldots,e_{k}\in E(K_{2,2,r_{3}})$. We show this by induction on
$k$. The case $k=0$ trivially holds.

We have
$\biggl{(}\sum_{i\in[d]}p_{i}\biggr{)}(\iota)=2(\ell+k)=2r_{3}+2k+2\geq
2r_{3}+4$, $p_{i}(\iota)>0$ for $i\in[d]$, $p_{V_{1}}(\iota)$,
$p_{V_{2}}(\iota)\geq 2$, and $p_{V_{3}}(\iota)\geq r_{3}$. In the case
$p_{V_{3}}(\iota)=r_{3}$, we can see that $\langle\iota,f_{j}\rangle>0$ holds,
that is, $p_{V_{j}}(\iota)\geq 3$ for $j=1,2$, and there exsist a $v_{1}\in
V_{1}$ and a $v_{2}\in V_{2}$ such that $p_{v_{j}}(\iota)\geq 2$ for $j=1,2$.
Let $\iota^{\prime}:=\iota-\rho(\\{v_{1},v_{2}\\})$. If
$\langle\iota^{\prime},l\rangle>0$ holds for $l\in\Psi$, we have
$\iota^{\prime}\in(\ell+k-1)P_{K_{2,2,r_{3}}}^{\circ}\cap\mathbb{Z}^{d}$. It
is enough to discuss that of $f_{3}$:

$\langle\iota^{\prime},f_{3}\rangle=\biggl{(}\sum_{k\in\\{1,2\\}}p_{V_{k}}\biggr{)}(\iota)-2-p_{V_{3}}(\iota)=(r_{3}+2k+2)-2-r_{3}>0.$

In the case $p_{V_{3}}(\iota)\geq r_{3}+1$, there exists a $v_{3}\in V_{3}$
such that $p_{v_{3}}(\iota)=2$. We may assume that $p_{V_{1}}(\iota)\leq
p_{V_{2}}(\iota)$. Then there is a $v_{2}^{\prime}\in V_{2}$ such that
$p_{v_{2}^{\prime}}(\iota)\geq 2$. Let
$\iota^{\prime}:=\iota-\rho(\\{v_{2}^{\prime},v_{3}\\})$. If we have
$\langle\iota,l\rangle>0$ for $l\in\Psi$, we obtain
$\iota^{\prime}\in(\ell+k-1)P_{K_{2,2,r_{3}}}^{\circ}\cap\mathbb{Z}^{d}$. It
is enough to discuss that of $f_{1}$:

$\langle\iota^{\prime},f_{1}\rangle=\biggl{(}\sum_{k\in\\{2,3\\}}p_{V_{k}}\biggr{)}(\iota)-2-p_{V_{1}}(\iota)\geq
p_{V_{3}}(\iota)-2>0.$

Therefore, we obtain the desired result.

($K_{3,3,3}$)

In the same way as above, it is enough to show that for any $k\geq 0$ and
$\iota\in(\ell+k)P_{K_{3,3,3}}^{\circ}\cap\mathbb{Z}^{d}$, $\iota$ can be
written as a sum of an element of $\ell
P_{K_{3,3,3}}^{\circ}\cap\mathbb{Z}^{d}$ and $\rho(e_{1}),\ldots,\rho(e_{k})$
with $e_{1},\ldots,e_{k}\in E(K_{3,3,3})$.

By $\ell=5$, we have
$\biggl{(}\sum_{i\in[d]}p_{i}\biggr{)}(\iota)=2(\ell+k)=2k+10\geq 12$. We may
assume that $p_{V_{1}}(\iota)\leq p_{V_{2}}(\iota)\leq p_{V_{3}}(\iota)$. If
we have $p_{V_{1}}(\iota)=p_{V_{2}}(\iota)=3$, we obtain
$p_{V_{3}}(\iota)=2k+4\geq 6$ and $\langle\iota^{\prime},f_{3}\rangle\leq 0$.
This is a contradiction. Thus, we have $4\leq p_{V_{2}}(\iota)\leq
p_{V_{3}}(\iota)$. Hence, there exsist a $v_{2}\in V_{2}$ and $v_{3}\in V_{3}$
such that $p_{v_{j}}(\iota)\geq 2$ for $j=1,2$. Let
$\iota^{\prime}:=\iota-\rho(\\{v_{2},v_{3}\\})$. If
$\langle\iota^{\prime},l\rangle>0$ holds for all $\l\in\Psi$, we obtain
$\iota^{\prime}\in(\ell+k-1)P_{K_{3,3,3}}^{\circ}\cap\mathbb{Z}^{d}$. It is
enough to discuss that of $f_{1}$:

$\langle\iota^{\prime},f_{1}\rangle=\biggl{(}\sum_{k\in\\{2,3\\}}p_{V_{k}}\biggr{)}(\iota)-2-p_{V_{1}}(\iota)=\Bigl{(}p_{V_{2}}-p_{V_{1}}\Bigr{)}(\iota)+\Bigl{(}p_{V_{3}}(\iota)-2\Bigr{)}>0.$

Therefore, we obtain the desired result.

($K_{1,1,1,r_{4}}$ with $r_{4}\geq 1$)

We can see that $\Bbbk[K_{1,1,1,1}]$ is Gorenstein, and we can check by
Macaulay2 that $\Bbbk[K_{1,1,1,2}]$ is level. For $r_{4}\geq 3$, by
Proposition 4.2 (c), $K_{1,1,1,r_{4}}$ is in the case of (C) and
$s=d-r_{4}-1=2$. It is always level by Theorem 2.3.

($\Bbbk[K_{1,1,1,1,1}]$)

We can check by Macaulay2 that $\Bbbk[K_{1,1,1,1,1}]$ is level.

###  4.3. Proof of Theorem 1.3

We still assume the condition $n=3$ with $r_{1}\geq 2$ or $n\geq 4$. This
subsection is devoted to giving a proof of Theorem 1.3.

We recall a notion of Ehrhart polynomials. Let $P\subset\mathbb{R}^{N}$ be an
integral convex polytope, which is a convex polytope all of whose vertices
belong to $\mathbb{Z}^{N}$. For $m\in\mathbb{Z}_{>0}$, consider the number of
integer points contained in $mP\cap\mathbb{Z}^{N}$. Then it is known that such
number $|mP\cap\mathbb{Z}^{N}|$ can be described by a polynomial in $m$ of
degree $\dim P$, denoted by $i(P,m)$. The enumerating polynomial $i(P,m)$ is
called the Ehrhart polynomial of $P$. For the introduction to the Ehrhart
polynomials, see, e.g., [1].

Throughout the remaining parts of this section, let
$R=\Bbbk[K_{r_{1},\ldots,r_{n}}]$. Note that $R$ is normal since
$K_{r_{1},\ldots,r_{n}}$ satisfies odd cycle condition. Regarding the
definition of almost Gorensteinness, let $C$ be the cokernel of the injection
$R\to\omega_{R}(-a)$. Note that $C$ is a Cohen–Macaulay $R$-module of
dimension $d-1$. Our goal is to characterize when $e(C)=\mu(C)$ holds. For
this, we prepare the following two lemmas.

######  Lemma 4.4.

Assume the case of (A). Then

$\displaystyle
e(C)=\displaystyle\sum_{k\in[n]}\Bigl{(}\frac{d}{2}-r_{k}-1\Bigr{)}\binom{d-2}{r_{k}-1}.$

###### Proof.

Let $i(P_{K_{r_{1},\ldots,r_{n}}},m)=c_{d-1}m^{d-1}+c_{d-2}m^{d-2}+\cdots+1$
be the Ehrhart polynomial of $P_{K_{r_{1},\ldots,r_{n}}}$. Since $R$ is
normal, we see that $H(R,m)=i(P_{K_{r_{1},\ldots,r_{n}}},m)$. Note that
$i(P_{K_{r_{1},\ldots,r_{n}}}^{\circ},m)=(-1)^{d-1}i(P_{K_{r_{1},\ldots,r_{n}}},-m)$
holds. (See, e.g., [1, Theorem 4.1].) From an exact sequence (2.1), we can see
that the Hilbert function $H(C,m)$ of $C$ coincides with

$i(P_{K_{r_{1},\ldots,r_{n}}}^{\circ},m+\ell)-i(P_{K_{r_{1},\ldots,r_{n}}},m),$

where $\ell=-a(R)$. This implies that the leading coefficient of $H(C,m)$
coincides with $(d-1)\ell c_{d-1}-2c_{d-2}$. Note that $\dim C=d-1$. Thus,

$e(C)=(d-2)!((d-1)\ell c_{d-1}-2c_{d-2}).$

Here, [15, Theorem 2.6] claims that

$i(P_{K_{r_{1},\ldots,r_{n}}},m)=\displaystyle\binom{d+2m-1}{d-1}-\sum_{k\in[n]}\sum_{1\leq
i\leq j\leq r_{k}}\binom{j-i+m-1}{j-i}\binom{d-j+m-1}{d-j}.$

Hence, a direct computation shows that

$\displaystyle(d-1)!c_{d-1}=\displaystyle
2^{d-1}-\sum_{k\in[n]}\sum_{j\in[r_{k}]}\binom{d-1}{j-1}\;\text{ (see
\cite[cite]{[\@@bibref{}{OH00}{}{}, Corollary 2.7]}), and}$
$\displaystyle(d-2)!c_{d-2}=\displaystyle
2^{d-3}d-\sum_{k\in[n]}\sum_{j\in[r_{k}]}\Biggl{(}\binom{d-2}{j-2}+\frac{d-2}{2}\biggl{(}\binom{d-3}{j-3}+\binom{d-3}{j-1}\biggr{)}\Biggr{)}.$

Remark $\ell=d/2$ by Proposition 4.2 (a). Therefore, we conclude that

$e(C)=\displaystyle\sum_{k\in[n]}\sum_{j\in[r_{k}]}\Biggl{(}2\binom{d-2}{j-2}+(d-2)\biggl{(}\binom{d-3}{j-3}+\binom{d-3}{j-1}\biggr{)}-\frac{d}{2}\binom{d-1}{j-1}\Biggr{)},$

where we set $\binom{n}{r}$ for $r\in\mathbb{Z}_{<0}$ to be 0. By using

$\displaystyle\displaystyle\binom{n-1}{r-1}+\binom{n-1}{r}=\binom{n}{r}\
\text{for}\ n,r\in\mathbb{Z},$ (4.6)

we obtain that

$e(C)=\displaystyle\sum_{k\in[n]}\sum_{j\in[r_{k}]}\Biggl{(}\frac{d}{2}\binom{d-1}{j-1}-2(d-1)\binom{d-2}{j-1}+2(d-2)\binom{d-3}{j-1}\Biggr{)}.$

It is enough to prove that

$\displaystyle\displaystyle\sum_{j\in[r_{k}]}\Biggl{(}\frac{d}{2}\binom{d-1}{j-1}-2(d-1)\binom{d-2}{j-1}+2(d-2)\binom{d-3}{j-1}\Biggr{)}=\Bigl{(}\frac{d}{2}-r_{k}-1\Bigr{)}\binom{d-2}{r_{k}-1}$
(4.7)

holds. We prove this by induction on $r_{k}$. We can directly see that (4.7)
holds when $r_{k}=1$.

Suppose that $r_{k}>1$. By the hypothesis of induction, we have

$\displaystyle\displaystyle\sum_{j\in[r_{k}+1]}$
$\displaystyle\Biggl{(}\frac{d}{2}\binom{d-1}{j-1}-2(d-1)\binom{d-2}{j-1}+2(d-2)\binom{d-3}{j-1}\Biggr{)}$
$\displaystyle=$
$\displaystyle\Bigl{(}\frac{d}{2}-r_{k}-1\Bigr{)}\binom{d-2}{r_{k}-1}+\Biggl{(}\frac{d}{2}\binom{d-1}{r_{k}}-2(d-1)\binom{d-2}{r_{k}}+2(d-2)\binom{d-3}{r_{k}}\Biggr{)}.$
By using
$\displaystyle(d-r_{k}-p)\binom{d-p}{r_{k}}=(d-p)\binom{d-p-1}{r_{k}}$ for
$p=1,2$ and (4.6), we obtain that
$\displaystyle\Bigl{(}\frac{d}{2}-r_{k}-1\Bigr{)}\biggl{(}\binom{d-1}{r_{k}}-\binom{d-2}{r_{k}}\biggr{)}$
$\displaystyle+\Biggl{(}\frac{d}{2}\binom{d-1}{r_{k}}-2(d-1)\binom{d-2}{r_{k}}+2(d-r_{k}-2)\binom{d-2}{r_{k}}\Biggr{)}$
$\displaystyle=$
$\displaystyle\Bigl{(}d-r_{k}-1\Bigr{)}\binom{d-1}{r_{k}}-\Bigl{(}\frac{d}{2}+r_{k}+1\Bigr{)}\binom{d-2}{r_{k}}$
$\displaystyle=$
$\displaystyle\bigl{(}d-1\bigr{)}\binom{d-2}{r_{k}}-\Bigl{(}\frac{d}{2}+r_{k}+1\Bigr{)}\binom{d-2}{r_{k}}=\Bigl{(}\frac{d}{2}-r_{k}-2\Bigr{)}\binom{d-2}{r_{k}}.$

This completes the proof. ∎

######  Lemma 4.5.

Assume the case of (A). Then

$\mu(C)=\displaystyle\sum_{k\in[n]}\sum_{j\in[\frac{d}{2}-r_{k}-1]}\binom{r_{k}-1+2j}{r_{k}-1},$

where we let
$\displaystyle\sum_{j\in[\frac{d}{2}-r_{k}-1]}\binom{r_{k}-1+2j}{r_{k}-1}=0$
if $\displaystyle r_{k}=\frac{d}{2}-1$.

###### Proof.

Remark $\ell=d/2$.

Since
$\mu(C)=\sum_{j\geq\ell}\mu_{j}(\omega_{K_{r_{1},\ldots,r_{n}}})-1=\sum_{j\geq\ell+1}\mu_{j}(\omega_{K_{r_{1},\ldots,r_{n}}})=\sum_{j\geq
1}\mu_{j}(K_{r_{1},\ldots,r_{n}})$, where we recall that $\mu_{j}(G)$ is the
number of first appearing interior points. We compute
$\mu_{j}(K_{r_{1},\ldots,r_{n}})$ for $j\geq 1$.

From Lemma 4.6 below, we see that
$\iota\in(\ell+j)P_{K_{r_{1},\ldots,r_{n}}}\cap\mathbb{Z}^{d}$ ($j\geq 1$) is
a first appearing interior point if and only if there exists $k\in[n]$ such
that $\iota$ satisfies

$\begin{cases}p_{V_{j}}(\iota)=r_{k}+2j,\\\ p_{i}(\iota)=1\ \text{for}\
i\in[d]\setminus V_{k},\text{ and }\\\
\langle\iota,f_{k}\rangle=(d-r_{k})-(r_{k}+2j)>0,\;\text{that is},\;1\leq
j\leq d/2-r_{k}-1.\end{cases}$

Hence, for $j$ and $k$ respectively, we observe that the number of first
appearing interior points is $\displaystyle\binom{r_{k}-1+2j}{r_{k}-1}$, and
so $\mu(C)=\displaystyle\sum_{j\geq
1}\mu_{j}(K_{r_{1},\ldots,r_{n}})=\sum_{j\geq
1}\sum_{k\in[n]}\binom{r_{k}-1+2j}{r_{k}-1}.$ ∎

######  Lemma 4.6.

Assume the case of (A). Given
$\iota\in(\ell+j)P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$ for
each $j\geq 0$, $\iota$ is a first appearing interior point if and only if
there exists $k\in[n]$ such that

$\displaystyle\begin{cases}p_{V_{j}}(\iota)=r_{k}+2j,\\\ p_{i}(\iota)=1\
\text{for}\ i\in[d]\setminus V_{k}.\end{cases}$ (4.8)

###### Proof.

“If” part: By the condition on $\iota$, we see that $\iota$ cannot be written
as a sum of an element of
$(\ell+j^{\prime})P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$ with
$j^{\prime}<j$ and $\rho(e_{1}),\ldots,\rho(e_{j^{\prime}})$ with
$e_{1},\ldots,e_{j^{\prime}}\in E(K_{r_{1},\ldots,r_{n}})$. Thus, we obtain
the desired result.

“Only if” part: We prove the assertion by induction on $j\geq 0$. If $j=0$,
then $\sum_{i\in[d]}\mathbf{e}_{i}$ is the unique first appearing interior
point in $\ell P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$.

Let $j\geq 1$. Let $r_{k}^{\prime}:=p_{V_{k}}(\iota)-r_{k}$ for $k\in[n]$. By
the hypothesis of induction, there are at least two $k$’s with
$r_{k}^{\prime}\neq 0$. Take these $r_{k_{1}}^{\prime}\geq
r_{k_{2}}^{\prime}\geq\cdots\geq r_{k_{s}}^{\prime}>0$ and $k_{p}>k_{q}$ if
$r_{k_{p}}^{\prime}=r_{k_{q}}^{\prime}$. Remark $s\geq 2$. Then there are
$v_{k_{1}}\in V_{k_{1}}$ and $v_{k_{2}}\in V_{k_{2}}$ such that
$p_{v_{k_{1}}},p_{v_{k_{2}}}\geq 2$.

If we can have
$\iota^{\prime}=\iota-\rho(\\{v_{k_{1}},v_{k_{2}}\\})\in(\ell+j-1)P_{K_{r_{1},\ldots,r_{n}}}^{\circ}\cap\mathbb{Z}^{d}$,
then $\iota$ is not a first appearing interior point. Since
$\langle\iota^{\prime},r\rangle>0$ for $r\in\Psi_{r}$ holds, we may show that
$\langle\iota^{\prime},f_{k}\rangle>0$ with
$k=\max\\{p_{V_{j}}(\iota):j\in[n]\\}$. We see that $k$ should be one of
$k_{1}$, $k_{3}$ and $n$.

  * ($k=k_{1}$)

We have
$\langle\iota^{\prime},f_{k_{1}}\rangle=\langle\iota,f_{k_{1}}\rangle>0$.

  * ($k=k_{3}$)

We see that $p_{V_{k_{1}}}(\iota)=p_{V_{k_{2}}}(\iota)=p_{V_{k_{3}}}(\iota)$.
Remark $p_{V_{k}}(\iota)=r_{k}+r_{k}^{\prime}$. Then

$\displaystyle\langle\iota^{\prime},f_{k_{3}}\rangle$
$\displaystyle=\biggl{(}\sum_{i\in[n]\setminus\\{k_{3}\\}}p_{V_{i}}\biggr{)}(\iota)-2-p_{V_{k_{3}}}(\iota)$
$\displaystyle=\biggl{(}\sum_{i\in[n]\setminus\\{k_{1},k_{2},k_{3}\\}}p_{V_{i}}\biggr{)}(\iota)+(r_{k_{2}}-1)+(r_{k_{2}}^{\prime}-1)>0.$

  * ($k=n$)

If $r_{n}^{\prime}\geq r_{k_{2}}^{\prime}$, then we have $n=k_{1}$ or $k_{2}$,
so we can deduce the case $k=k_{1}$ or $k_{3}$. Hence, we may assume that
$r_{n}^{\prime}<r_{k_{2}}^{\prime}$. Then we see that

$\displaystyle\langle\iota^{\prime},f_{n}\rangle$
$\displaystyle=\biggl{(}\sum_{i\in[n-1]}p_{V_{i}}\biggr{)}(\iota)-2-p_{V_{n}}(\iota)$
$\displaystyle\geq\biggl{(}\sum_{i\in[n-1]}r_{i}-r_{n}\biggr{)}+(r_{k_{1}}^{\prime}-1)+(r_{k_{2}}^{\prime}-r_{n}^{\prime}-1)>0.$

Therefore, we obtain the desired result. ∎

######  Lemma 4.7.

Let $r_{1},\ldots,r_{n}$ be positive integers with $1\leq r_{1}\leq\cdots\leq
r_{n}$, let $d=\sum_{i\in[n]}r_{i}$ be even. Assume that $n=3$ with $r_{1}\geq
2$ or $n\geq 4$. Then $n$ and $(r_{1},\ldots,r_{n})$ satisfy one of the
conditions (iii)—(vi) in Theorem 1.3 if and only if $r_{i}\in\\{1,d/2-1\\}$
holds for any $i\in[n]$.

###### Proof.

Since “only if” part is easy to see, we prove “if” part.

Assume that $r_{i}\in\\{1,d/2-1\\}$ holds for any $i\in[n]$. Note that $d\geq
n$ by definition. Let $\alpha$ be the number of $r_{i}$’s with $r_{i}=d/2-1$.
Then $r_{1}=\cdots=r_{n-\alpha}=1$. Thus, we have
$d=(n-\alpha)+(d/2-1)\alpha$.

The case $\alpha=0$ is nothing but the case (vi). Note that $n$ should be even
by $d=n$. If $\alpha=1$, then $d=(n-1)+(d/2-1)$ holds by definition, which
implies that $d=2n-4$. Thus, this corresponds to the case (v).

Suppose $\alpha\geq 2$. When $n\geq 5$, we see that $d=(d/2-2)\alpha+n\geq
d-4+n>d$, a contradiction. Hence, $n=3$ or $n=4$.

  * •

Let $n=3$. Since we assume $r_{1}\geq 2$, we may discuss the case $\alpha=3$.
Then $d=3(d/2-1)$ holds, i.e., $d=6$. Hence, we obtain that
$r_{1}=r_{2}=r_{3}=2$, which is the case (iii).

  * •

Let $n=4$. If $\alpha=2$, then we see that $r_{3}(=r_{4})$ can be arbitrary,
which is the case (iv). If $\alpha=3$ (resp. $\alpha=4$), then $d=1+3(d/2-1)$
(resp. $d=4(d/2-1)$) holds, i.e., $d=4$. Hence, we obtain that
$r_{1}=\cdots=r_{4}=1$, which is included in (iv).

∎

Now, we are ready to give a proof of Theorem 1.3. Since the case where $n=2$
or $n=3$ with $r_{1}=1$ has been already done in Section 3, we assume that
$n=3$ with $r_{1}\geq 2$ or $n\geq 4$. Under this assumption, it suffices to
prove that $\Bbbk[K_{r_{1},\ldots,r_{n}}]$ is almost Gorenstein if and only if
$d$ is even and $r_{i}\in\\{1,d/2-1\\}$ for any $i\in[n]$ by Lemma 4.7. Then
we may assume the case (A) by Corollary 4.3. Remark that $1\leq r_{k}\leq
d/2-1$ holds. By Lemmas 4.4 and 4.5, we have
$e(C)=\displaystyle\sum_{k\in[n]}e_{k}(C)\ \text{and}\
\mu(C)=\displaystyle\sum_{k\in[n]}\mu_{k}(C)$, where

$\displaystyle
e_{k}(C):=\Bigl{(}\frac{d}{2}-r_{k}-1\Bigr{)}\binom{d-2}{r_{k}-1}\;\text{ and
}\;\mu_{k}(C)=\sum_{j\in[\frac{d}{2}-r_{k}-1]}\binom{r_{k}-1+2j}{r_{k}-1}\;\text{
for each }k\in[n].$

  * •

If $r_{k}=1$, then we have $e_{k}(C)=\mu_{k}(C)=d/2-2$.

  * •

If $r_{k}=d/2-1$, we have $e_{k}(C)=\mu_{k}(C)=0$.

  * •

If $1<r_{k}<d/2-1$, then we have

$\mu_{k}(C)\leq\sum_{j\in[\frac{d}{2}-r_{k}-1]}\binom{d-r_{k}-3}{r_{k}-1}=\left(\frac{d}{2}-r_{k}-1\right)\binom{d-r_{k}-3}{r_{k}-1}<e_{k}(C).$

Hence, if there is $k\in[n]$ with $1<r_{k}<d/2-1$, then $e(C)>\mu(C)$ holds.
Therefore, we conclude that $e(C)=\mu(C)$ holds if and only if $r_{k}=1$ or
$d/2-1$ for any $i\in[n]$.

## References

  * [1] M. Beck and S. Robins, “Computing the continuous discretely”, Undergraduate Texts in Mathematics. Springer, New York, second edition, 2015.
  * [2] W. Bruns and J. Herzog, “Cohen-Macaulay rings, revised edition”, Cambridge University Press, 1998.
  * [3] E. De Negri and T. Hibi, Gorenstein algebras of Veronese type, J. Algebra 193 (1997), 629–639.
  * [4] R. Diestel, “Graph Theory”, Fifth edition, Graduate Texts in Mathematics, 173. Springer, Berlin, 2017.
  * [5] S. Goto, R. Takahashi, N. Taniguchi, Almost Gorenstein rings – towards a theory of higher dimension, J. Pure Appl. Algebra 219, (2015), 2666–2712.
  * [6] D. Grayson and M. Stillman. Macaulay2, a software system for research in algebraic geometry, Available at http://www.math.uiuc.edu/Macaulay2/.
  * [7] J. Herzog, T. Hibi and H. Ohsugi, Binomial ideals, Graduate Texts in Mathematics, 279. Springer, Cham, (2018).
  * [8] T. Hibi, Distributive lattices, affine semigroup rings and algebras with straightening laws. In: Nagata, M., Matsumura, H. (eds.) Commutative Algebra and Combinatorics. Advanced Studies in Pure Mathematics, vol. 11, pp. 93–109. North-Holland, Amsterdam (1987).
  * [9] A. Higashitani, Almost Gorenstein homogeneous rings and their $h$-vectors, J. Algebra 456 (2016), 190–206.
  * [10] A. Higashitani and K. Matsushita, Conic divisorial ideals and non-commutative crepant resolutions of edge rings of complete multipartite graphs, arXiv:2011.07714.
  * [11] A. Higashitani and Y. Nakajima, Conic divisorial ideals of Hibi rings and their applications to non-commutative crepant resolutions, Selecta Math. 25 (2019), 25pp.
  * [12] M. Miyazaki, On the generators of the canonical module of a Hibi ring: A criterion of level property and the degrees of generators, J. Algebra 480 (2017), 215–236.
  * [13] M. Miyazaki, Almost Gorenstein Hibi rings, J. Algebra 493 (2018), 135–149.
  * [14] H. Ohsugi and T. Hibi, Normal polytopes arising from finite graphs, J. Algebra 207 (1998), 409–426.
  * [15] H. Ohsugi and T. Hibi, Compressed polytopes, initial ideals and complete multipartite graphs, Illinois J. Math. 44, No. 2 (2000), 391–406.
  * [16] A. Simis, W. V. Vasconcelos and R. H. Villarreal, The integral closure of subrings associated to graphs, J. Algebra 199 (1998), 281–289.
  * [17] R. P. Stanley, Cohen–Macaulay complexes, in: M. Aigner (Ed.), Higher Combinatorics, Reidel, Dor-drecht and Boston, (1977), 51–62.
  * [18] R. H. Villarreal, “Monomial algebras”, Monographs and Research Notes in Mathematics. CRC Press, Boca Raton, FL, 2015.
  * [19] K. Yanagawa, Castelnuovo’s Lemma and $h$-vectors of Cohen–Macaulay homogeneous domains, J. Pure Appl. Algebra 105, (1995) 107–116.