# On combinatorial characterization of generators of toric ideals of weighted
oriented graphs

Ramakrishna Nanduri∗ Department of Mathematics, Indian Institute of Technology
Kharagpur, West Bengal, INDIA - 721302<EMAIL_ADDRESS>and  Tapas
Kumar Roy† Department of Mathematics, Indian Institute of Technology
Kharagpur, West Bengal, INDIA - 721302<EMAIL_ADDRESS>
###### Abstract.

In this paper, we give a combinatorial characterization of the generators of
toric ideals of weighted oriented graphs. We give explicit combinatorial
formulas for the generators of toric ideals of any number of balanced cycles
sharing a vertex and any two weighted oriented cycles sharing only a single
vertex.

† Supported by PMRF research fellowship, India.

∗ Supported by SERB grant No: CRG/2021/000465, India

AMS Classification 2020: 13F65, 13A70, 05E40, 05C50, 05C38.

##  1\. Introduction

Toric ideals are important in modern theory of algebra because of their
variety of applications in diverse research fields such as commutative
algebra, combinatorics, algebraic geometry, integer programming, semigroup
rings, combinatorial optimization, coding theory and algebraic statistics etc,
see [5, 10, 3, 2, 4] and the references therein. These ideals are a special
type of ideals in a polynomial ring known as binomial ideals.

Toric ideals of monomial ideals are of general interest of many researchers.
It is a very hard problem to find the generators of toric ideals of non-
squarefree monomial ideals. In the literature, very few results are known on
the generators of toric ideals of non-squarefree monomial ideals. Toric ideals
of square-free monomial ideals are studied in [10, 9] by using the notion of
hypergraphs. In particular, for quadratic square-free monomial ideals those
are all edge ideals of finite simple graphs, their toric ideals are well
studied, for example, generating set of toric ideal of a simple graph $G$ is
the set of all primitive even closed walks in $G$, see [8, 11]. It is natural
to consider the toric ideals of weighted oriented graphs and one can ask for a
combinatorial characterization of generators of their toric ideals like the
case of simple graphs. It is really a complicated problem as mentioned in [1].
In [1], the authors studied the toric ideals of edge ideals of weighted
oriented cycles. They showed that the toric ideal of a weighted oriented cycle
is non-zero if and only if the cycle is a balanced cycle. Also, they
characterized a weighted oriented graphs whose toric ideals are generated by
single elements. The aim of this paper is to study the toric ideals of
weighted oriented graphs and give combinatorial characterization of their
generators. The weighted oriented graphs are of independent interest to study
because of their applications in diverse fields, coding theory, combinatorics,
commutative algebra, algebraic geometry, see [10, 7]. If $D$ is a weighted
oriented graph consists of $n$ balanced cycles sharing a common vertex, then
we show that the toric ideal $I_{D}$, of $D$ has exactly $n$ generators
corresponding to their balanced cycles in $D$ respectively (Theorem 3.1).
Later if $D$ consists of two oriented balanced cycles connected by a path,
then we prove that $I_{D}$ has only two generators (Theorem 3.3) corresponding
to those two balanced cycles in $D$. We give closed combinatorial formula for
the generator of a balanced cycle (Theorem 4.1). As a result, the generator of
a balanced cycle does not depend on the weights of sink vertices in $D$
surprisingly. If $D$ consists of two cycles $\mathcal{C}_{n}$ and
$\mathcal{C}_{m}$ sharing only a single vertex such that at least one of them
is an odd cycle or an even unbalanced cycle, then we explicitly compute the
generators of $I_{D}$ in terms of combinatorial information of $D$ (see
Theorems 3.5, 4.7, 4.8, 4.9).

We organize the paper as follows. In section 2, we recall all the definitions,
notation and basic results that we will be used in subsequent sections. In
section 3, we give generators of toric ideals $I_{D}$, where $D$ is a weighted
oriented graph consists of $n$ balanced cycles sharing a vertex or $D$
consists of two balanced cycles connected by a path or $D$ consists of two
weighted oriented cycles sharing a single vertex such that one is balanced and
the other is odd or unbalanced even cycle. Finally, in section 4, we derive a
combinatorial formula for generator of $I_{D}$, where $D$ is a balanced cycle
or $D$ consists of two weighted oriented cycles sharing only a single vertex
such that none of them is balanced.

##  2\. Preliminaries

Let $R=K[x_{1},\ldots,x_{n}]$, where $K$ is a field. Let $M$ be a monomial
ideal in $R$ minimally generated by monomials
$\\{\textbf{x}^{\textbf{a}_{1}},\textbf{x}^{\textbf{a}_{2}},\ldots,\textbf{x}^{\textbf{a}_{m}}\\}$.
Let $S=K[e_{1},\ldots,e_{m}]$ be a polynomial ring. Then define a $K$-algebra
homomorphism $\phi$ : $K[e_{1},\ldots,e_{m}]\rightarrow
K[x_{1},\ldots,x_{n}]$, as $\phi(e_{i})=\textbf{x}^{\textbf{a}_{i}}$. Then the
kernel of $\phi$ is called the toric ideal of $M$, and we denote by $I_{M}$.
Then by [1, 2.1], the irreducible binomials
$\displaystyle\prod_{k=1}^{m}e_{k}^{p_{k}}-\prod_{k=1}^{m}e_{k}^{q_{k}}$
generate $I_{M}$, satisfying
$\displaystyle\sum_{k=1}^{m}p_{k}\textbf{a}_{k}=\sum_{k=1}^{m}q_{k}\textbf{a}_{k}$,
with $p_{k}$ and $q_{k}$ cannot both be non-zero simultaneously, for any $k$.
Recall that the support of a binomial
$f=\displaystyle\prod_{k=1}^{m}e_{k}^{p_{k}}-\prod_{k=1}^{m}e_{k}^{q_{k}}$,
denoted as $supp(f)$, is the set of variables $e_{k}$ which appear in $f$ with
non-zero exponent.

A (vertex) weighted oriented graph is a triplet $D=(V(D),E(D),{\bf w})$, where
$V(D)=\\{x_{1},\ldots,x_{n}\\}$ is the vertex set of $D$,

$E(D)=\\{(x_{i},x_{j}):\mbox{there is an edge from $x_{i}$ to $x_{j}$}\\}$

is the edge set of $D$ and the weight function ${\bf
w}:V(D)\rightarrow\mathbb{N}$. We simply denote the weight function ${\bf w}$
by the vector ${\bf w}=(w_{1},\ldots,w_{n})$. If $e=(x_{i},x_{j})$ is an edge
of $D$, then we call $x_{j}$ as head of $e$ and $x_{i}$ is called tail of $e$.
The indegree of $v_{i}$ is defined as $|\\{v_{j}\in V(D):(v_{j},v_{i})\in
E(D)\\}|$ and the outdegree of $v_{i}$ is defined as $|\\{v_{j}\in
V(D):(v_{i},v_{j})\in E(D)\\}|$. The edge ideal of $D$ is defined as the ideal
$I(D)=(x_{i}x_{j}^{w_{j}}:(x_{i},x_{j})\in E(D))$ in $R$. Then the toric ideal
of $D$ is defined as the toric ideal of $I(D)$ and we shortly denote as
$I_{D}$. Thus $I_{D}=$ker$(\phi)$, where $\phi:K[e:e\in E(D)]\rightarrow R$.
Let $E(D)=\\{e_{1},\ldots,e_{m}\\}$. Recall that the incidence matrix of $D$
is an $n\times m$ matrix whose $(i,j)^{th}$ entry $a_{i,j}$ is defined by

$a_{i,j}=\begin{cases}1\;\mbox{ if }\;e_{j}=(x_{i},x_{l})\in E(D)\;\mbox{ for
some }\;1\leq l\leq n\\\ w_{i}\;\mbox{ if }\;e_{j}=(x_{l},x_{i})\in
E(D)\;\mbox{ for some }\;1\leq l\leq n\\\ 0\;\mbox{ otherwise, }\end{cases}$

and we denote by $A(D)$. Recall that a weighted oriented even cycle
$\mathcal{C}_{m}$ on $m$ vertices is said to be balanced, and
$\displaystyle\prod_{k=1}^{m}a_{k,k}=a_{1,m}\prod_{k=1}^{m}a_{k+1,k}$, where
$A(\mathcal{C}_{m})=[a_{i,j}]_{m\times m}$.

For a weighted oriented $m$-cycle $\mathcal{C}_{m}$, set
$V(\mathcal{C}_{m})=\\{v_{1},\ldots,v_{m}\\}$ and
$E(\mathcal{C}_{m})=\\{e_{1},\ldots,e_{m}\\}$, where $e_{k}$ is incident to
$v_{k}$ and $v_{k+1}$ for $k=1,2,\ldots,m-1$, and $e_{m}$ is incident to
$v_{m}$ and $v_{1}$. Define
$\mathcal{C}_{m}^{+}:=\\{e_{k}=(v_{k},v_{k+1}):k=1,2,\ldots,m\\}$, and
$\mathcal{C}_{m}^{-}:=\\{e_{k}=(v_{k+1},v_{k}):k=1,2,\ldots,m\\}$. A weighted
oriented even $m$-cycle $\mathcal{C}_{m}$ is called uniformly balanced if
$|\mathcal{C}_{m}^{+}|=|\mathcal{C}_{m}^{-}|$ and weights of any two non-sink
and non-source vertices are equal. Note that $\mathcal{C}_{m}$ is naturally
oriented if $E(\mathcal{C}_{m})=\mathcal{C}_{m}^{+}$ or
$E(\mathcal{C}_{m})=\mathcal{C}_{m}^{-}$.

######  Lemma 2.1.

[1, Lemma 4.1] Let $\mathcal{C}_{m}$ be a weighted oriented $m$-cycle and $f$
is any irreducible generator of $I_{D}$. Then supp($f$) =
$E(\mathcal{C}_{m})$.

######  Theorem 2.2.

[1, Theorem 4.3, Algoritham 4.5] If $\mathcal{C}_{m}$ is weighted oriented
cycle, toric ideal $I_{\mathcal{C}_{m}}$ is non-zero if and only if
$\mathcal{C}_{m}$ is balanced. In fact, in this case, $I_{D}$ is a principal
ideal.

##  3\. On number of generators of toric ideal of a weighted oriented graph

In this section, we find the number of generators for toric ideals of certain
classes of weighted oriented graphs.

######  Theorem 3.1.

Let $D$ be a weighted oriented graph consists of $n$ balanced cycles
$\mathcal{C}_{2m_{1}}$, $\mathcal{C}_{2m_{2}}$, $\ldots$,
$\mathcal{C}_{2m_{n}}$ such that these cycles share a single vertex. Then the
toric ideal $I_{D}$ of $D$ is generated by $n$ binomials and these binomials
are precisely the generators of corresponding balanced cycles
$\mathcal{C}_{2m_{1}},\mathcal{C}_{2m_{2}},\ldots,\mathcal{C}_{2m_{n}}$.

###### Proof.

Note that $|V(D)|=2m_{1}+\cdots+2m_{n}-n+1$. Let $v_{1}\in V(D)$ be the common
vertex of all the cycles
$\mathcal{C}_{2m_{1}},\mathcal{C}_{2m_{2}},\ldots,\mathcal{C}_{2m_{n}}$. Let
$V(\mathcal{C}_{2m_{i}})=\\{v_{\sum_{j=1}^{i-1}2m_{j}+1},\ldots,v_{\sum_{j=1}^{i}2m_{j}}\\}$,
with the convention that $v_{1}=v_{\sum_{j=1}^{i}2m_{j}+1}$, for $1\leq i\leq
n$. Let the edges $e_{i}$ of $D$ be labelled in the following fashion:
For $1\leq i\leq n$, each $e_{k}$ is the edge incident to the vertices $v_{k}$
and $v_{k+1}$, for $\displaystyle\sum_{j=1}^{i-1}2m_{j}+1\leq
k\leq\sum_{j=1}^{i}2m_{j}-1$, and the edge $\displaystyle
e_{\sum_{j=1}^{i}2m_{j}}$ is incident to the vertices
$v_{\sum_{j=1}^{i}2m_{j}}$ and $v_{1}$.

We show that $\dim_{\mathbb{Q}}$(Null$(A(D)))=n$, where the incidence matrix
$A(D)$ is of size $(2m_{1}+2m_{2}+\cdots
2m_{n}-(n-1))\times(2m_{1}+2m_{2}+\cdots+2m_{n})$ and of the shape as below:

$\bordermatrix{\text{}&e_{1}\cdots&e_{2m_{1}}&\ldots&e_{k}\cdots&e_{k_{1}}\cr&a_{1,1}\cdots&a_{1,2m_{1}}&\ldots&a_{1,k}\cdots&a_{1,k_{1}}\cr&\vdots\ddots&\vdots&\ldots&\vdots&\vdots\cr&0\cdots&a_{2m_{1},2m_{1}}&\ldots&0\cdots&0\cr&\vdots\ldots&\vdots&\ldots&\vdots\ldots&\vdots\cr&0\cdots&0&\ldots&a_{k-(n-2),k}\cdots&0\cr&\vdots\cdots&\vdots&\ldots&\vdots\cdots&\vdots\cr&0\cdots&0&\ldots&0\cdots&a_{k_{1}-(n-1),k_{1}}}.$

where $k=2m_{1}+2m_{2}+\cdots 2m_{n-1}+1,k_{1}=2m_{1}+2m_{2}+\cdots+2m_{n}$,
and the rows are ordered by
$v_{1},\ldots,v_{2m_{1}},v_{2m_{1}+2},\ldots,v_{2m_{1}+2m_{2}},v_{2m_{1}+2m_{2}+2},\ldots,v_{2m_{1}+2m_{2}+2m_{3}},\ldots,v_{2m_{1}+2m_{2}+\ldots+2m_{n-1}+2},\\\
\ldots,v_{2m_{1}+\cdots+2m_{n}}.$ We define $\widetilde{A(D)}$ to be the
matrix obtained from $A(D)$ by deleting the first row(corresponds to common
vertex $v_{1}$). We see that $a_{3,3}\neq 0,a_{i,3}=0$, for $1<i<3$,
$a_{44}\neq 0,a_{i,4}=0,$ for $1<i<4$, $a_{i,i+1}\neq 0,a_{j,i+1}=0$, for
$1<j<i+1$, and $i=5,6,\cdots 2m_{1}+2m_{2}+\cdots+2m_{n}-(n-1)$. This implies
that every row of the matrix $\widetilde{A(D)}$ is not a linear combination of
its preceding rows. This gives that all rows of $\widetilde{A(D)}$ are
linearly independent. Thus the rank of $\widetilde{A(D)}$ is
$2m_{1}+2m_{2}+\cdots+2m_{n}-n$. This implies that rank$(A(D))\geq
2m_{1}+2m_{2}+\cdots+2m_{n}-n$. This gives that
$\dim_{\mathbb{Q}}(\mbox{Null}(A(D)))\leq n$. Since each
$\mathcal{C}_{2m_{i}}$ is a balanced cycle, then by Theorem 2.2, its toric
ideal is principal, say generated by irreducible binomial $f_{i}$, for $1\leq
i\leq n$. Then the elements in Null$(A(D))$ corresponding to
$f_{1},\ldots,f_{n}$ respectively are linearly independent. Thus dimQ(Null
$(A(D)))=n$. Let

$\displaystyle f_{1}$ $\displaystyle=$ $\displaystyle\prod\limits_{i=1,i\mbox{
odd}}^{2m_{1}}e_{i}^{a_{i}}-\prod\limits_{i=1,i\mbox{
even}}^{2m_{1}}e_{i}^{a_{i}}$ $\displaystyle f_{2}$ $\displaystyle=$
$\displaystyle\prod\limits_{i=1,i\mbox{
odd}}^{2m_{2}}e_{i+2m_{1}}^{a_{i+2m_{1}}}-\prod\limits_{i=1,i\mbox{
even}}^{2m_{2}}e_{i+2m_{1}}^{a_{i+2m_{1}}}$ $\displaystyle\vdots$
$\displaystyle f_{n}$ $\displaystyle=$ $\displaystyle\prod\limits_{i=1,i\mbox{
odd}}^{2m_{n}}e_{i+2m_{1}+2m_{2}+\cdots+2m_{n-1}}^{a_{i+2m_{1}+2m_{2}+\cdots+2m_{n-1}}}-\prod\limits_{i=1,i\mbox{
even}}^{2m_{n}}e_{i+2m_{1}+2m_{2}+\cdots+2m_{n-1}}^{a_{i+2m_{1}+2m_{2}+\cdots+2m_{n-1}}}.$

Then the corresponding elements in Null$(A(D))$ are respectively

$\displaystyle{\bf b_{1}}=$
$\displaystyle(a_{1},-a_{2},\ldots,-a_{2m_{1}},0,\ldots,0)^{T},$
$\displaystyle{\bf b_{2}}=$
$\displaystyle(0,\ldots,0,a_{2m_{1}+1},\ldots,-a_{2m_{1}+2m_{2}},0,\ldots,0)^{T},$
$\displaystyle\vdots$ $\displaystyle{\bf b_{n}}=$
$\displaystyle(0,\ldots,0,a_{2m_{1}+\cdots+2m_{n-1}+1},\ldots,-a_{2m_{1}+\cdots+2m_{n}})^{T}.$

Note that $\\{{\bf b_{1}},\ldots,{\bf b_{n}}\\}$ is a $\mathbb{Q}$-basis of
Null$(A(D))$. Now we show that $I_{D}$ is generated by
$\\{f_{1},\ldots,f_{n}\\}$. We know that $I_{D}$ is generated by irreducible
binomials of the form
$\prod\limits_{k=1}^{2m_{1}+\cdots+2m_{n}}e_{k}^{p_{k}}-\prod\limits_{k=1}^{2m_{1}+\cdots+2m_{n}}e_{k}^{q_{k}}$,
such that
$\sum\limits_{k=1}^{2m_{1}+\cdots+2m_{n}}p_{k}\textbf{a}_{k}=\sum\limits_{k=1}^{2m_{1}+\cdots+2m_{n}}q_{k}\textbf{a}_{k}$,
where $p_{k}$ and $q_{k}$ cannot both be non-zero simultaneously for any $k$.
By Lemma 2.1 and Theorem 2.2, the edges $e_{1},\ldots,e_{2m_{1}}$ appears in
$f_{1}$, the edge $e_{i}$, $i=2m_{1}+1,\cdots,2m_{1}+2m_{2}$ appear in $f_{2}$
and so on. Thus an arbitrary irreducible generator of $I_{D}$ is of the
following form:
$g=\left(\prod\limits_{i=1,i\mbox{ odd
}}^{2m_{1}}e_{i}^{a_{i}^{\prime}}\right)\cdots\left(\prod\limits_{i=1,i\mbox{
odd
}}^{2m_{k}}e_{2m_{1}+2m_{2}+\cdots+2m_{k-1}+i}^{a_{2m_{1}+2m_{2}+\cdots+2m_{k-1}+i}^{\prime}}\right)\left(\prod\limits_{i=1,i\mbox{
even
}}^{2m_{k+1}}e_{2m_{1}+2m_{2}+\cdots+2m_{k}+i}^{a_{2m_{1}+2m_{2}+\cdots+2m_{k}+i}^{\prime}}\right)\\\
~{}\cdots\left(\prod\limits_{i=1,i\mbox{ even
}}^{2m_{n}}e_{2m_{1}+2m_{2}+\cdots+2m_{n-1}+i}^{a_{2m_{1}+2m_{2}+\cdots+2m_{n-1}+i}^{\prime}}\right)-\left(\prod\limits_{i=1,i\mbox{
even
}}^{2m_{1}}e_{i}^{a_{i}^{\prime}}\right)\cdots\left(\prod\limits_{i=1,i\mbox{
even
}}^{2m_{k}}e_{2m_{1}+2m_{2}+\cdots+2m_{k-1}+i}^{a_{2m_{1}+2m_{2}+\cdots+2m_{k-1}+i}^{\prime}}\right)\\\
~{}\left(\prod\limits_{i=1,i\mbox{ odd
}}^{2m_{k+1}}e_{2m_{1}+2m_{2}+\cdots+2m_{k}+i}^{a_{2m_{1}+2m_{2}+\cdots+2m_{k}+i}^{\prime}}\right)\cdots\left(\prod\limits_{i=1,i\mbox{
odd
}}^{2m_{n}}e_{2m_{1}+2m_{2}+\cdots+2m_{n-1}+i}^{a_{2m_{1}+2m_{2}+\cdots+2m_{n-1}+i}^{\prime}}\right),$

for some $a_{j}^{\prime}\in\mathbb{Z}_{+}$. We show that
$g\in(f_{1},\ldots,f_{n})$. Then the theorem follows. Let ${\bf a^{\prime}}$
be the element in Null$(A(D))$ corresponding to $g$. Then
${\bf
a^{\prime}}=(a_{1}^{\prime},-a_{2}^{\prime},\ldots,-a_{2m_{1}}^{\prime},a_{2m_{1}+1}^{\prime},\ldots,-a_{2m_{1}+2m_{2}}^{\prime},\ldots,a_{2m_{1}+2m_{2}+\cdots+2m_{k-1}+1}^{\prime},\ldots,\\\
-a_{2m_{1}+2m_{2}+\cdots+2m_{k}}^{\prime},-a_{2m_{1}+2m_{2}+\cdots+2m_{k}+1}^{\prime},\ldots,a_{2m_{1}+2m_{2}+\cdots+2m_{k+1}}^{\prime},\ldots,-a_{2m_{1}+2m_{2}+\cdots+2m_{r-1}+1}^{\prime},\\\
~{}\ldots,a_{2m_{1}+2m_{2}+\cdots+2m_{r}}^{\prime})^{T}$.

Thus there exist $\lambda_{1},\lambda_{2},\ldots,\lambda_{n}\in\mathbb{Q}$
such that ${\bf a^{\prime}}=\lambda_{1}{\bf b_{1}}+\cdots+\lambda_{n}{\bf
b_{n}}$. Then substituting the vectors ${\bf b_{i}}$ and equate each component
both sides we get that

(1)
$a^{\prime}_{2m_{1}+\cdots+2m_{k-1}+i}=\lambda_{k}a_{2m_{1}+\cdots+2m_{k-1}+i}$

for $1\leq i\leq 2m_{k}$ and $k=1,\ldots,n$. Now, we show that each
$\lambda_{i}$ is an integer for $i\in\\{1,2,\ldots,n\\}$. First we show that
$\lambda_{1}$ is an integer. Assume $\lambda_{1}\neq 0$. Since ${\bf
a^{\prime}}\in$Null$(A(D))$, we have that $A(D){\bf a^{\prime}}={\bf 0}$. This
implies that

(2) $\displaystyle(-1)^{i+1}a_{i+1,i}\;a_{i}^{\prime}$ $\displaystyle+$
$\displaystyle(-1)^{i+2}a_{i+1,i+1}a_{i+1}^{\prime}=0\mbox{
for}\;\;i=1,2,\ldots 2m_{1}-1.$

This implies that

(3) $\displaystyle{\it a}_{1}^{\prime}$ $\displaystyle=$
$\displaystyle\frac{a_{2,2}a_{3,3}\cdots
a_{2m_{1},2m_{1}}}{a_{2,1}a_{3,2}\cdots
a_{2m_{1},2m_{1}-1}}a_{2m_{1}}^{\prime}$

Consider

$\displaystyle a_{1,1}a_{1}^{\prime}-a_{1,2m_{1}}a_{2m_{1}}^{\prime}$
$\displaystyle=$ $\displaystyle a_{1,1}\frac{a_{2,2}a_{3,3}\cdots
a_{2m_{1},2m_{1}}}{a_{2,1}a_{3,2}\cdots
a_{2m_{1},2m_{1}-1}}a_{2m_{1}}^{\prime}-a_{1,2m-1}a_{2m_{1}}^{\prime}$
$\displaystyle=$ $\displaystyle\frac{a_{1,1}a_{2,2}a_{3,3}\cdots
a_{2m_{1},2m_{1}}-a_{2,1}a_{3,2}\cdots
a_{2m_{1},2m_{1}-1}a_{1,2m_{1}}}{a_{2,1}a_{3,2}\cdots
a_{2m_{1},2m_{1}-1}}a_{2m_{1}}^{\prime}(\mbox{ by }\eqref{eq2})$
$\displaystyle=$
$\displaystyle\frac{\mbox{det}(A(\mathcal{C}_{2m_{1}}))}{a_{2,1}a_{3,2}\cdots
a_{2m_{1},2m_{1}-1}}a_{2m_{1}}^{\prime}$ $\displaystyle=$ $\displaystyle
0~{}~{}~{}~{}(\mbox{ since $\mathcal{C}_{2m_{1}}$ is balanced}).$

This together with (2) for $i=1,2,\ldots,2m_{1}-1$ implies that
$(a_{1}^{\prime},-a_{2}^{\prime},\ldots,a_{2m_{1}-1}^{\prime},-a_{2m_{1}}^{\prime})^{T}$
$\in$ Null($A(\mathcal{C}_{2m_{1}})$). Since each $a_{i}^{\prime}$ for
$i=1,2,\cdots 2m_{1}$, is a positive integer, we have that

$e_{1}^{a_{1}^{\prime}}e_{3}^{a_{3}^{\prime}}\cdots
e_{2m_{1}-1}^{a_{2m_{1}-1}^{\prime}}-e_{2}^{a_{2}^{\prime}}e_{4}^{a_{4}^{\prime}}\cdots
e_{2m_{1}}^{a_{2m_{1}}^{\prime}}=e_{1}^{\lambda_{1}a_{1}}e_{3}^{\lambda_{1}a_{3}}\cdots
e_{2m_{1}-1}^{\lambda_{1}a_{2m_{1}-1}}-e_{2}^{\lambda_{1}a_{2}}e_{4}^{\lambda_{1}a_{4}}\cdots
e_{2m_{1}}^{\lambda_{1}a_{2m_{1}}}\in I_{\mathcal{C}_{2m_{1}}}=(f_{1}).$

This implies that $\lambda_{1}$ is an integer, as required. By symmetry, one
can argue that all other $\lambda_{i}$ are integers. Now

$\displaystyle g$ $\displaystyle=$ $\displaystyle\prod\limits_{i=1,i\mbox{ odd
}}^{2m_{1}}e_{i}^{\lambda_{1}a_{i}}\cdots\prod\limits_{i=1,i\mbox{ odd
}}^{2m_{k}}e_{\sum_{j=1}^{k-1}2m_{j}+i}^{\lambda_{k}a_{\sum_{j=1}^{k-1}2m_{j}+i}}\prod\limits_{l=k+1}^{n}\prod\limits_{~{}~{}i=1,i\mbox{
even
}}^{2m_{l}}e_{\sum_{j=1}^{l-1}2m_{j}+i}^{\lambda_{l}a_{\sum_{j=1}^{l-1}2m_{j}+i}}$
$\displaystyle-\prod\limits_{i=1,i\mbox{ even
}}^{2m_{1}}e_{i}^{\lambda_{1}a_{i}}\cdots\prod\limits_{i=1,i\mbox{ even
}}^{2m_{k}}e_{\sum_{j=1}^{k-1}2m_{j}+i}^{\lambda_{k}a_{\sum_{j=1}^{k-1}2m_{j}+i}}\prod\limits_{l=k+1}^{n}\prod\limits_{i=1,i\mbox{
odd
}}^{2m_{l}}e_{\sum_{j=1}^{l-1}2m_{j}+i}^{\lambda_{l}a_{\sum_{j=1}^{l-1}2m_{j}+i}}$
$\displaystyle(\mbox{by }\eqref{eqn1})$ $\displaystyle=$ $\displaystyle
g_{1}h_{1}+g_{2}h_{2}+\cdots+g_{k}h_{k}-g_{k+1}h_{k+1}-g_{k+2}h_{k+2}-\cdots-
g_{n}h_{n},$

where $g_{1}=\prod\limits_{i=1,i\mbox{
odd}}^{2m_{1}}e_{i}^{\lambda_{1}a_{i}}-\prod\limits_{i=1,i\mbox{
even}}^{2m_{1}}e_{i}^{\lambda_{1}a_{i}}=g_{1,o}-g_{1,e}$ (say),
$g_{l}=\prod\limits_{i=1,i\mbox{
odd}}^{2m_{l}}e_{\sum_{j=1}^{l-1}2m_{j}+i}^{\lambda_{l}a_{\sum_{j=1}^{l-1}2m_{j}+i}}-\prod\limits_{i=1,i\mbox{
even}}^{2m_{l}}e_{\sum_{j=1}^{l-1}2m_{j}+i}^{\lambda_{l}a_{\sum_{j=1}^{l-1}2m_{j}+i}}=g_{l,o}-g_{l,e}$
(say),
for $2\leq l\leq n$, and

$h_{j}=\left\\{\begin{array}[]{ll}g_{1,e}\cdots g_{j-1,e}g_{j+1,o}\cdots
g_{k,o}g_{k+1,e}\cdots g_{n,e},&\mbox{for }1\leq j\leq k,\\\ g_{1,e}\cdots
g_{k,e}g_{k+1,o}\cdots g_{j-1,o}g_{j+1,e}\cdots g_{n,e},&\mbox{for }k+1\leq
j\leq n.\end{array}\right.$

Since each non-zero $\lambda_{i}$ is a positive integer, we have that $f_{i}$
is a factor of $g_{i}$ for each $i$. This implies that
$g\in(f_{1},\ldots,f_{n})$, as required. This completes the proof. ∎

######  Corollary 3.2.

Let $D$ be a weighted oriented connected graph consists of certain number of
trees and exactly $n$ number of even cycles
$\mathcal{C}_{2m_{1}},\ldots,\mathcal{C}_{2m_{n}}$ such that these cycles
sharing a single vertex common and each $\mathcal{C}_{2m_{i}}$ is balanced.
Then the toric ideal $I_{D}$ is generated by $n$ binomials and these binomials
are precisely the generators of corresponding balanced cycles
$\mathcal{C}_{2m_{i}}$, $i=1,\ldots,n$.

###### Proof.

Follows from Lemma [1, Corollary 3.3] and Theorem 3.1. ∎

Below we explicitly give generators of two balanced cycles connected by a
path.

######  Theorem 3.3.

Let $D$ be a weighted oriented graph consists of two oriented balanced cycles
$\mathcal{C}_{2m_{1}},\mathcal{C}_{2m_{2}}$ such that these two cycles are
connected by a path of length $k\geq 1$. Then the toric ideal $I_{D}$ is
generated by two binomials and these binomials are precisely the generators of
corresponding balanced cycles $\mathcal{C}_{2m_{1}},\mathcal{C}_{2m_{2}}$.

###### Proof.

Let $V(\mathcal{C}_{2m_{1}})=\\{v_{1},v_{2},\ldots,v_{2m_{1}}\\}$,
$V(\mathcal{C}_{2m_{2}})=\\{v_{2m_{1}+k},v_{2m_{1}+k+1},\ldots,v_{2m_{1}+k+2m_{2}-1}\\}$
and $\\{v_{1},v_{2m_{1}+1},\ldots,v_{2m_{1}+k}\\}$ are vertices of the path
connecting $\mathcal{C}_{2m_{1}}$ and $\mathcal{C}_{2m_{2}}$. Let the edges of
$D$ be labelled in the following fashion:
the edge $e_{i}$ is incident with $v_{i}$, and $v_{i+1}$, for
$i=1,2,\ldots,2m_{1}-1$, the edge $e_{2m_{1}}$ is incident with $v_{2m_{1}}$
and $v_{1}$, the edge $e_{2m_{1}+1}$ is incident with $v_{1}$ and
$v_{2m_{1}+1}$, and the edge $e_{2m_{1}+i}$ is incident with $v_{2m_{1}+i-1}$
and $v_{2m_{1}+i}$ for $i=2,3,\ldots,2m_{2}+k$, under convention that
$v_{2m_{1}+2m_{2}+k}=v_{2m_{1}+k}$. Note that the incidence matrix $A(D)$ is
of size $(2m_{1}+2m_{2}+k-1)\times(2m_{1}+2m_{2}+k)$. We show that
dimQNull$(A(D))=2$. Let $\widetilde{A(D)}$ be the matrix obtained from $A(D)$
by deleting the $1^{st}$ row, and $2m_{1}^{th},(2m_{1}+k+2m_{2})^{th}$
columns. Then $\widetilde{A(D)}$ is an upper-triangular matrix whose diagonal
entries are positive. This implies that rank
$(\widetilde{A(D)})=2m_{1}+2m_{2}+k-2$ and hence rank$(A(D))\geq
2m_{1}+2m_{2}+k-2$. This implies that $\dim_{\mathbb{Q}}$Null$(A(D))\leq 2$.
Since $\mathcal{C}_{2m_{1}},\mathcal{C}_{2m_{2}}$ are balanced cycles, then by
Theorem 2.2, their toric ideals are principal, say generated by irreducibe
binomials $f_{1},f_{2}$, respectively. Then the elements in Null$(A(D))$
corresponding to $f_{1},f_{2}$ respectively are linearly independent. Thus
dimQ(Null$(A(D)))\geq 2$. Therefore dimQ(Null$(A(D)))=2$. Let

$\displaystyle f_{1}$ $\displaystyle=$ $\displaystyle\prod\limits_{i=1,i\mbox{
odd}}^{2m_{1}}e_{i}^{a_{i}}-\prod\limits_{i=1,i\mbox{
even}}^{2m_{1}}e_{i}^{a_{i}}$ $\displaystyle f_{2}$ $\displaystyle=$
$\displaystyle\prod\limits_{i=1,i\mbox{
odd}}^{2m_{2}}e_{i+2m_{1}+k}^{a_{i+2m_{1}+k}}-\prod\limits_{i=1,i\mbox{
even}}^{2m_{2}}e_{i+2m_{1}+k}^{a_{i+2m_{1}+k}}.$

Now one can proceed in the same line of arguments as in the proof of Theorem
3.1 to yield that the toric ideal $I_{D}$ is generated by $\\{f_{1},f_{2}\\}$,
as required. ∎

######  Corollary 3.4.

Let $D$ be a weighted oriented connected graph consists of certain number of
trees and exactly two even cycles such that these cycles are connected by a
path and each cycle is balanced. Then the toric ideal $I_{D}$ is generated by
two binomials and these binomials are precisely the generators of
corresponding balanced cycles.

###### Proof.

Follows from Lemma [1, Corollary 3.3] and Theorem 3.3. ∎

If $D$ is a weighted oriented graph consists of a balanced cycle
$\mathcal{C}_{n}$ and a cycle $\mathcal{C}_{m}$ which is either an odd cycle
or an even unbalanced cycle such that these two cycles share only a single
vertex, then by [1, Theorem 5.1], we have that $I_{D}$ has single generator.
Further below we showed that the toric ideals $I_{D}$ and
$I_{\mathcal{C}_{n}}$ are equal.

######  Theorem 3.5.

Let $D$ be a weighted oriented graph of one of the below type:

  1. (i)

$D$ consists of an odd cycle $\mathcal{C}_{m}$ and a balanced even cycle
$\mathcal{C}_{n}$ such that these two cycles share only a single vertex.

  2. (ii)

$D$ consists of an even cycle $\mathcal{C}_{m}$ which is not balanced and a
balanced cycle $\mathcal{C}_{n}$ such that these two cycles share only a
single vertex.

Then $I_{D}=I_{\mathcal{C}_{n}}$.

###### Proof.

(i) Let $V(\mathcal{C}_{m})=\\{v_{1},v_{2},\ldots,v_{m}\\}$ and
$V(\mathcal{C}_{n})=\\{v_{1},v_{m+1},\ldots,v_{m+n-1}\\}$, where $v_{1}$ is
the common vertex. Let the edges of $D$ be labelled in the following fashion:
the edge $e_{i}$ is incident with $v_{i}$ and $v_{i+1}$ for
$i=1,2,\ldots,m-1$, the edge $e_{m}$ is incident with $v_{m}$ and $v_{1}$, the
edge $e_{m+1}$ is incident with $v_{m+1}$ and $v_{1}$, and the edge $e_{m+i}$
is incident with $v_{m+i-1}$ and $v_{m+i}$ for $i=2,\ldots,n$, under
convention that $v_{m+n}=v_{1}$. Since the generator of $I_{\mathcal{C}_{n}}$
belongs to $I_{D}$, we have that $I_{\mathcal{C}_{n}}\subseteq I_{D}$. Let
$I_{\mathcal{C}_{n}}$ be generated by $\prod\limits_{i=1,i\mbox{
odd}}^{n}e_{m+i}^{a_{m+i}}-\prod\limits_{i=1,i\mbox{
even}}^{n}e_{m+i}^{a_{m+i}}$, where $a_{m+i}\in\mathbb{N}$ and its
corresponding null space element is ${\bf
x}=(0,0,\ldots,0,a_{m+1},\ldots,-a_{m+n})^{T}\in$ Null$(A(D))$. Note that
$\dim_{\mathbb{Q}}$ Null$(A(D))=1$. An arbitrary irreducible generator of
$I_{D}$, say $f$, is of the form
$\prod\limits_{i=1,i\mbox{ odd}}^{m}e_{i}^{b_{i}}\prod\limits_{i=1,i\mbox{
odd}}^{n}e_{m+i}^{b_{m+i}}-\prod\limits_{i=1,i\mbox{
even}}^{m}e_{i}^{b_{i}}\prod\limits_{i=1,i\mbox{ even}}^{n}e_{m+i}^{b_{m+i}}$
or
$\prod\limits_{i=1,i\mbox{ odd}}^{m}e_{i}^{b_{i}}\prod\limits_{i=1,i\mbox{
even}}^{n}e_{m+i}^{b_{m+i}}-\prod\limits_{i=1,i\mbox{
even}}^{m}e_{i}^{b_{i}}\prod\limits_{i=1,i\mbox{ odd}}^{n}e_{m+i}^{b_{m+i}}$,
by using Lemma 2.1 for some $b_{j}\in\mathbb{Z}_{+}$. Then the element in
Null$(A(D))$ corresponding to $f$, say ${\bf y}$ is a $\mathbb{Q}$-multiple of
${\bf x}$. This implies that $b_{i}=0$ for $i=1,2,\ldots,m$. Then by using the
same argument as in 3.1, ${\bf y}\in$ Null$(A(\mathcal{C}_{n}))$. This gives
that $f\in I_{\mathcal{C}_{n}}$. This shows that $I_{D}\subseteq
I_{\mathcal{C}_{n}}$. Therefore, $I_{D}=I_{\mathcal{C}_{n}}$.

(ii) Proof is same line of arguments as in (i). ∎

######  Remark 3.6.

For a weighted oriented graph $D$, $\dim_{\mathbb{Q}}\mbox{Null}(A(D))=1$ if
and only if toric ideal $I_{D}$ is generated by a single element. But it is
not necessarily true for dimension greater than $1$. As an example, consider
the following weighted oriented graph $D$ consists of three cycles sharing
only a single vertex where vertices of these three cycles are
$\\{v_{1},v_{2},v_{3}\\},\\{v_{1},v_{4},v_{5}\\}$, $\\{v_{1},v_{6},v_{7}\\}$,
and edges are
$e_{1}=(v_{1},v_{2}),e_{2}=(v_{3},v_{2}),e_{3}=(v_{3},v_{1}),e_{4}=(v_{1},v_{4}),e_{5}=(v_{5},v_{4}),e_{6}=(v_{1},v_{5}),e_{7}=(v_{1},v_{6}),e_{8}=(v_{7},v_{6}),e_{9}=(v_{1},v_{7})$
and weight of vertex $v_{i}=i$ for $i=1,2,\ldots,7$. Then
$\dim_{\mathbb{Q}}\mbox{Null}(A(D))=2$ but the number of generators of toric
ideal $I_{D}$ is $6$ by using Macaulay2 [6].

##  4\. combinatorial characterization of generators of toric ideals of
weighted oriented graphs

In this section, we study combinatorial characterization of irreducible
binomial generators of toric ideals of weighted oriented graphs. We give
explicit combinatorial formulas of generators of $I_{D}$, where $D$ is any
balanced cycle.

######  Theorem 4.1.

Let $\mathcal{C}_{2n}$ be a balanced cycle on the vertex set
$\\{v_{1},\ldots,v_{2n}\\}$ with $w(v_{i})=w_{i}$, for $i=1,\ldots,2n$ and
edge set $\\{e_{1},\ldots,e_{2n}\\}$, where $e_{i}$ is incident with $v_{i}$
and $v_{i+1}$ for $i=1,2,\ldots,2n$ under convention that $v_{2n+1}=v_{1}$.
Then the generator of the toric ideal $I_{\mathcal{C}_{2n}}$ is precisely

  1. (1)

$e_{1}e_{3}\cdots e_{2n-1}-e_{2}e_{4}\cdots e_{2n}$, if $\mathcal{C}_{2n}$ is
naturally oriented,

  2. (2)

$e_{1}^{\frac{\alpha_{2}\alpha_{3}\cdots\alpha_{2n-1}}{d}}e_{3}^{\frac{\alpha_{3}^{\prime}\alpha_{4}\cdots\alpha_{2n-1}}{d}}\cdots
e_{2n-1}^{\frac{\alpha_{3}^{\prime}\alpha_{4}^{\prime}\alpha_{5}^{\prime}\cdots\alpha_{2n-1}^{\prime}}{d}}-e_{2}^{\frac{\alpha_{3}\alpha_{4}\cdots\alpha_{2n-1}}{d}}e_{4}^{\frac{\alpha_{3}^{\prime}\alpha_{4}^{\prime}\alpha_{5}\cdots\alpha_{2n-1}}{d}}\cdots
e_{2n}^{\frac{\alpha_{2}\alpha_{3}\alpha_{4}\alpha_{5}\cdots\alpha_{2n-1}}{d}},$
if $\mathcal{C}_{2n}$ has a sink vertex $v_{1}$,

where

$\alpha_{i}^{\prime}=\left\\{\begin{array}[]{ll}1,&\mbox{if $v_{i}$ is tail of
}e_{i-1},\\\ w_{i},&\mbox{if $v_{i}$ is head of }e_{i-1},\end{array}\right.$,
$\alpha_{j}=\left\\{\begin{array}[]{ll}1,&\mbox{if $v_{j}$ is tail of
}e_{j},\\\ w_{j},&\mbox{if $v_{j}$ is head of }e_{j},\end{array}\right.$,

for $i=2,3,\ldots,2n$, and $j=2,3,\ldots,2n-1$, and

$\displaystyle d_{1}$ $\displaystyle=$
$\displaystyle\mbox{gcd}(\alpha_{2}\alpha_{3}\cdots\alpha_{2n-1},~{}\alpha_{3}^{\prime}\alpha_{4}\cdots\alpha_{2n-1},\ldots,~{}\alpha_{3}^{\prime}\alpha_{4}^{\prime}\alpha_{5}^{\prime}\cdots\alpha_{2n-1}^{\prime})$
$\displaystyle d_{2}$ $\displaystyle=$
$\displaystyle\mbox{gcd}(\alpha_{3}\alpha_{4}\cdots\alpha_{2n-1},~{}\alpha_{3}^{\prime}\alpha_{4}^{\prime}\alpha_{5}\cdots\alpha_{2n-1},\ldots,\alpha_{2}\alpha_{3}\alpha_{4}\alpha_{5}\cdots\alpha_{2n-1})$
$\displaystyle d$ $\displaystyle=$ $\displaystyle\mbox{gcd}(d_{1},d_{2}).$

###### Proof.

Note that $\mathcal{C}_{2n}$ is either naturally oriented or
$\mathcal{C}_{2n}$ has a sink. Case-1 : Suppose $\mathcal{C}_{2n}$ is
naturally oriented. Since $\mathcal{C}_{2n}$ is balanced, we have that
det$(A(\mathcal{C}_{2n}))=0$. This gives that $w_{1}w_{2}w_{3}\cdots
w_{n}=1$.This implies that $w_{i}=1$ for each $i=1,2,\ldots,n$. Thus
$I(\mathcal{C}_{2n})=I(G)$, where $G$ is the underlying simple graph of
$\mathcal{C}_{2n}$ and hence its toric ideal is generated by the primitive
walk $e_{1}e_{3}\cdots e_{2n-1}-e_{2}e_{4}\cdots e_{2n}$. Case-2 : Suppose
$\mathcal{C}_{2n}$ has a sink. Without loss of generality assume $v_{1}$ is a
sink. Then $e_{1}=(v_{2},v_{1})$. Then the incidence matrix
$A(\mathcal{C}_{2n})$ is of the following form:

$\bordermatrix{\text{}&e_{1}&e_{2}&e_{3}&e_{4}&\ldots&e_{2n-1}&e_{2n}\cr
v_{1}&w_{1}&0&0&0&\ldots&0&w_{1}\cr v_{2}&1&\alpha_{2}&0&0&\ldots&0&0\cr
v_{3}&0&\alpha_{3}^{\prime}&\alpha_{3}&0&\ldots&0&0\cr
v_{4}&0&0&\alpha_{4}^{\prime}&\alpha_{4}&\ldots&0&0\cr\vdots&\vdots&\vdots&\vdots&\vdots&\ldots&\vdots&\vdots\cr
v_{2n}&0&0&0&0&\ldots&\alpha_{2n}^{\prime}&1}.$

Let ${\bf x}=(r_{1},-r_{2},\ldots,r_{2n-1},-r_{2n})^{T}$ $\in$
Null$(A(\mathcal{C}_{2n}))$, where $r_{i}$ $\in$ $\mathbb{N}$ for
$i=1,2,\ldots,2n$. Then we have $A(\mathcal{C}_{2n}){\bf x}={\bf 0}$. This
implies that

(4) $\displaystyle w_{1}r_{1}$ $\displaystyle-$ $\displaystyle w_{1}r_{2n}=0$
$\displaystyle(-1)^{i+1}r_{i}\alpha_{i+1}^{\prime}$ $\displaystyle+$
$\displaystyle(-1)^{i+2}r_{i+1}\alpha_{i+1}=0$

for $i=1,2\ldots,2n-1$, where $\alpha_{2}^{\prime}=1,\alpha_{2n}=1$. From(4),
we get that

$r_{2}=\frac{1}{\alpha_{2}}r_{1},~{}r_{3}=\frac{\alpha_{3}^{\prime}}{\alpha_{2}\alpha_{3}}r_{1},~{}r_{4}=\frac{\alpha_{3}^{\prime}\alpha_{4}^{\prime}}{\alpha_{2}\alpha_{3}\alpha_{4}}r_{1},\ldots,~{}r_{2n-1}=\frac{\alpha_{3}^{\prime}\alpha_{4}^{\prime}\cdots\alpha_{2n-1}^{\prime}}{\alpha_{2}\alpha_{3}\alpha_{4}\cdots\alpha_{2n-1}}r_{1}.$

By the choice of $d$, this implies that
$\frac{\alpha_{2}\alpha_{3}\cdots\alpha_{2n-1}}{d}{\bf x}\in$
Null$(A(\mathcal{C}_{2n}))\cap\mathbb{Z}^{2n}$ and

$\displaystyle\frac{\alpha_{2}\alpha_{3}\cdots\alpha_{2n-1}}{d}{\bf x}=$
$\displaystyle(\frac{\alpha_{2}\alpha_{3}\cdots\alpha_{2n-1}}{d},-\frac{\alpha_{3}\alpha_{4}\cdots\alpha_{2n-1}}{d},$
$\displaystyle\frac{\alpha_{3}^{\prime}\alpha_{4}\cdots\alpha_{2n-1}}{d},-\frac{\alpha_{3}^{\prime}\alpha_{4}^{\prime}\alpha_{5}\cdots\alpha_{2n-1}}{d},$
$\displaystyle\ldots,\frac{\alpha_{3}^{\prime}\alpha_{4}^{\prime}\lambda_{5}^{\prime}\cdots\lambda_{2n-1}^{\prime}}{d},-\frac{\alpha_{2}\alpha_{3}\alpha_{4}\alpha_{5}\cdots\alpha_{2n-1}}{d})^{T}.$

Then the generator of toric ideal $I_{\mathcal{C}_{2n}}$ corresponding to the
above null space element is

$e_{1}^{\frac{\alpha_{2}\alpha_{3}\cdots\alpha_{2n-1}}{d}}e_{3}^{\frac{\alpha_{3}^{\prime}\alpha_{4}\cdots\alpha_{2n-1}}{d}}\cdots
e_{2n-1}^{\frac{\alpha_{3}^{\prime}\alpha_{4}^{\prime}\alpha_{5}^{\prime}\cdots\alpha_{2n-1}^{\prime}}{d}}-e_{2}^{\frac{\alpha_{3}\alpha_{4}\cdots\alpha_{2n-1}}{d}}e_{4}^{\frac{\alpha_{3}^{\prime}\alpha_{4}^{\prime}\alpha_{5}\cdots\alpha_{2n-1}}{d}}\cdots
e_{2n}^{\frac{\alpha_{2}\alpha_{3}\alpha_{4}\alpha_{5}\cdots\alpha_{2n-1}}{d}},$

which is irreducible, by the choice of $d,d_{1},d_{2}$. This irreducible
binomial generates $I_{\mathcal{C}_{2n}}$, as required. ∎

######  Example 4.2.

Let $\mathcal{C}_{8}$ be the weighted oriented 8-cycle having edges
$e_{1}=(x_{1},x_{2}),e_{2}=(x_{2},x_{3}),e_{3}=(x_{4},x_{3}),e_{4}=(x_{4},x_{5}),e_{5}=(x_{5},x_{6}),e_{6}=(x_{6},x_{7}),e_{7}=(x_{8},x_{7}),e_{8}=(x_{1},x_{8})$
and weight vector, w = (1, 2, 3, 4, 5, 6, 7, 60). We compute the generator of
toric ideal of $D$. Here, we see that $x_{3}$ is sink. For applying above
formula, we assume that
$x_{3}=v_{1},x_{2}=v_{2},x_{1}=v_{3},x_{8}=v_{4},x_{7}=v_{5},x_{6}=v_{6},x_{5}=v_{7},x_{4}=v_{8};\;\;e_{2}=e_{1}^{\prime},e_{1}=e_{2}^{\prime},e_{8}=e_{3}^{\prime},e_{7}=e_{4}^{\prime},e_{6}=e_{5}^{\prime},e_{5}=e_{6}^{\prime},e_{4}=e_{7}^{\prime},e_{3}=e_{8}^{\prime}$.
Then,

$\displaystyle\alpha_{2}=2$ $\displaystyle\alpha_{3}=1$
$\displaystyle\alpha_{3}^{\prime}=1$ $\displaystyle\alpha_{4}=1$
$\displaystyle\alpha_{4}^{\prime}=60$ $\displaystyle\alpha_{5}=7$
$\displaystyle\alpha_{5}^{\prime}=7$ $\displaystyle\alpha_{6}=6$
$\displaystyle\alpha_{6}^{\prime}=1$ $\displaystyle\alpha_{7}=5$
$\displaystyle\alpha_{7}^{\prime}=1$

$d_{1}$=210, $d_{2}$ = 210. By Theorem 4.1,
${e_{1}^{\prime}}^{2}e_{3}^{\prime}{e_{5}^{\prime}}^{60}{e_{7}^{\prime}}^{2}-{e_{2}^{\prime}}{e_{4}^{\prime}}^{60}{e_{6}^{\prime}}^{10}{e_{8}^{\prime}}^{2}=e_{2}^{2}e_{8}e_{6}^{60}e_{4}^{2}-e_{1}e_{7}^{60}e_{5}^{10}e_{3}^{2}$
is the generator of $I_{\mathcal{C}_{8}}$.

######  Remark 4.3.

From theorem 4.1, the generator of toric ideal of weighted oriented balanced
cycle is independent of the weights of sink vertices.

######  Corollary 4.4.

Let $\mathcal{C}_{2n}$ be a weighted oriented cycle such that every vertex is
either source or sink. Let
$V(\mathcal{C}_{2n})=\\{v_{1},v_{2},\ldots,v_{2n}\\}$, and
$E(\mathcal{C}_{2n})=\\{e_{1},e_{2},\cdots e_{2n}\\}$, where the edge $e_{i}$
is incident to $v_{i}$ and $v_{i+1}$ for $i=1,2,\ldots,2n$ with convention
that $v_{2n+1}=v_{1}$. Then the generator of the toric ideal
$I_{\mathcal{C}_{2n}}$ is $e_{1}e_{3}\cdots e_{2n-1}-e_{2}e_{4}\cdots e_{2n}$.

###### Proof.

Let $w_{i}$ be the weight of the vertex $v_{i}$ for $i=1,2,\ldots,2n$. Note
that $\mathcal{C}_{2n}$ is a balanced cycle. Without loss of any generality we
can assume that $v_{1}$ is sink. Then by Theorem 4.1, $I_{\mathcal{C}_{2n}}$
is generated by generator of type (2), where
$\alpha_{i}=\alpha_{i}^{\prime}=w_{i}$ for $i=1,3,\ldots,2n-1$,
$\alpha_{i}=\alpha_{i}^{\prime}=1$ for $i=2,4,\ldots,2n$,
$d_{1}=d_{2}=w_{3}w_{5}\cdots w_{2n-1}$. Therefore $e_{1}e_{3}\cdots
e_{2n-1}-e_{2}e_{4}\cdots e_{2n}$ is the generator of toric ideal
$I_{\mathcal{C}_{2n}}$. ∎

######  Corollary 4.5.

Let $\mathcal{C}_{2n}$ be a weighted oriented uniformly balanced cycle having
$2n$ vertices. Suppose that $\mathcal{C}_{2n}$ has only one source and only
one sink. Let $V(\mathcal{C}_{2n})=\\{v_{1},v_{2},\ldots,,v_{2n}\\}$, and
$E(\mathcal{C}_{2n})=\\{e_{1},e_{2},\ldots,e_{2n}\\}$. where edge $e_{i}$ is
incident to $v_{i}$ and $v_{i+1}$ for $i=1,2,\ldots,2n$ with convention
$v_{2n+1}=v_{1}$. Let $a$ be the weight of any non-sink non-source vertex.
Assume that $v_{1}$ is sink. Then the generator of toric ideal $I_{D}$ is

  1. (1)

$e_{1}^{a^{n-1}}e_{3}^{a^{n-3}}\cdots
e_{n-2}^{a^{2}}e_{n}e_{n+2}^{a}e_{n+4}^{a^{3}}\cdots
e_{2n-1}^{a^{n-2}}-e_{2}^{a^{n-2}}e_{4}^{a^{n-4}}\cdots
e_{n-1}^{a}e_{n+1}e_{n+3}^{a^{2}}\cdots e_{2n}^{a^{n-1}}$, if $n$ is odd,

  2. (2)

$e_{1}^{a^{n-1}}e_{3}^{a^{n-3}}\cdots e_{n-1}^{a}e_{n+1}e_{n+3}^{a^{2}}\cdots
e_{2n-1}^{a^{n-2}}-e_{2}^{a^{n-2}}e_{4}^{a^{n-4}}\cdots
e_{n-2}^{a^{2}}e_{n}e_{n+2}^{a}\cdots e_{2n}^{a^{n-1}}$, if $n$ is even.

###### Proof.

Since $\mathcal{C}_{2n}$ is uniformly balanced and $v_{1}$ is sink, then we
have that $v_{n+1}$ must be source and $e_{i}=(v_{i+1},v_{i})$ for
$i=1,2,\ldots,n$, $e_{i}=(v_{i},v_{i+1})$ for $i=n+1,\ldots,2n$. Also, note
that all non-sink non-source vertices of $\mathcal{C}_{2n}$ have the same
weight $a$. Let $w_{1}$ be the weight of the vertex $v_{1}$. Then
det$(A(\mathcal{C}_{2n}))=0$ and $\mathcal{C}_{2n}$ is balanced. Then by
Theorem 4.1, we get that $\alpha_{i}=a$ for $i\in\\{2,3,\ldots,n\\}$;
$\alpha_{n+i}=1$ for $i\in\\{1,2,\ldots,n-1\\}$; $\alpha_{i}^{\prime}=1$ for
$i\in\\{3,\ldots,n+1\\}$; $\alpha_{n+i}^{\prime}=a$ for
$i\in\\{2,\ldots,n-1\\}$; $d_{1}=d_{2}=1$ and hence the generator of
$I_{\mathcal{C}_{2n}}$ is of type (2) and the conclusion follows. ∎

######  Proposition 4.6.

Let $\mathcal{C}_{2n}$ be a weighted oriented cycle on $2n$ vertices
$\\{v_{1},v_{2},\ldots,v_{2n}\\}$ such that it has only two vertices
$v_{1},v_{k}$ of indegree $1$( or outdegree $1$). Assume the edges of
$\mathcal{C}_{2n}$ are $\\{e_{1},e_{2},\ldots,e_{2n}\\}$, where $e_{i}$ is
incident to $v_{i}$ and $v_{i+1}$ for $i=1,2,\ldots,2n$ with convention that
$v_{2n+1}=v_{1}$. Let $w_{i}$ be the weight of the vertex $v_{i}$ for
$i=1,2,\ldots,2n$. Assume that $v_{1}$ is head of $e_{2n}$ as well as tail of
$e_{1}$. Then $I_{\mathcal{C}_{2n}}$ is generated by

$\begin{cases}e_{1}^{w_{1}}e_{3}^{w_{1}}\cdots
e_{k-2}^{w_{1}}e_{k}e_{k+1}\cdots e_{2n-1}-e_{2}^{w_{1}}e_{4}^{w_{1}}\cdots
e_{k-1}^{w_{1}}e_{k+1}e_{k+3}\cdots e_{2n},\mbox{ if $v_{k}$ is head of
$e_{k}$ and }w_{1}=w_{k},\\\ e_{1}e_{3}\cdots e_{2n-1}-e_{2}e_{4}\cdots
e_{2n},\mbox{if $v_{k}$ is tail of $e_{k}$ and }w_{1}=w_{k}=1,\\\ $0$,\mbox{
otherwise.}\end{cases}$

###### Proof.

Case-1 : Suppose $e_{k-1}=(v_{k-1},v_{k}),e_{k}=(v_{k},v_{k+1})$. In this
case, the incidence matrix $A(\mathcal{C}_{2n})$ is
$\bordermatrix{\text{}&e_{1}&e_{2}&\ldots&e_{k-2}&e_{k-1}&e_{k}&e_{k+1}&\ldots&e_{2n-1}&e_{2n}\cr
v_{1}&1&0&\ldots&0&0&0&0&\ldots&0&w_{1}\cr
v_{2}&w_{2}&w_{2}&\ldots&0&0&0&0&\ldots&0&0\cr\vdots&\vdots&\vdots&\ldots&\vdots&\vdots&\vdots&\vdots&\ldots&\vdots&\vdots\cr
v_{k-1}&0&0&\ldots&1&1&0&0&\ldots&0&0\cr
v_{k}&0&0&\ldots&0&w_{k}&1&0&\ldots&0&0\cr
v_{k+1}&0&0&\ldots&0&0&w_{k+1}&w_{k+1}&\ldots&0&0\cr\vdots&\vdots&\vdots&\ldots&\vdots&\vdots&\vdots&\vdots&\ldots&\vdots&\vdots\cr
v_{2n}&0&0&\ldots&0&0&0&0&\ldots&1&1}$.

If at least one of $w_{1},w_{k}$ is greater than $1$, then
det($A(\mathcal{C}_{2n})$) $\neq 0$ . Then $I_{\mathcal{C}_{2n}}=(0)$. Assume
$w_{1}=w_{k}=1$. Then det$(A(\mathcal{C}_{2n}))=0$. Hence the cycle
$\mathcal{C}_{2n}$ is balanced and its toric ideal is non-zero. In this case
$(1,-1,\ldots,1,-1)^{T}$ $\in$ Null$(A(\mathcal{C}_{2n}))$. This implies that
$e_{1}e_{3}\cdots e_{2n-1}-e_{2}e_{4}\cdots e_{2n}\in I_{\mathcal{C}_{2n}}$ is
the generator of $I_{\mathcal{C}_{2n}}$.  Case-2 : Suppose
$e_{k-1}=(v_{k},v_{k-1}),e_{k}=(v_{k+1},v_{k})$. The incidence matrix
$A(\mathcal{C}_{2n})$ is

$\bordermatrix{\text{}&e_{1}&e_{2}&\ldots&e_{k-2}&e_{k-1}&e_{k}&e_{k+1}&\ldots&e_{2n-1}&e_{2n}\cr
v_{1}&1&0&\ldots&0&0&0&0&\ldots&0&w_{1}\cr
v_{2}&w_{2}&w_{2}&\ldots&0&0&0&0&\ldots&0&0\cr\vdots&\vdots&\vdots&\ldots&\vdots&\vdots&\vdots&\vdots&\ldots&\vdots&\vdots\cr
v_{k-1}&0&0&\ldots&1&1&0&0&\ldots&0&0\cr
v_{k}&0&0&\ldots&0&1&w_{k}&0&\ldots&0&0\cr
v_{k+1}&0&0&\ldots&0&0&w_{k+1}&w_{k+1}&\ldots&0&0\cr\vdots&\vdots&\vdots&\ldots&\vdots&\vdots&\vdots&\vdots&\ldots&\vdots&\vdots\cr
v_{2n}&0&0&\ldots&0&0&0&0&\ldots&1&1}.$

If $w_{1}\neq w_{k}$, then det$(A(\mathcal{C}_{2n}))\neq 0$ and hence
$I_{\mathcal{C}_{2n}}=(0)$. Assume $w_{1}=w_{k}$. Then $\mathcal{C}_{2n}$ is
balanced. Suppose $k$ is even. Since $v_{k-1}$ is a sink and $v_{k-2}$ is a
source and so on which leads to have that $v_{2}$ is a source. This is a
contradiction to the fact that $v_{2}$ is head of $e_{1}$. Therefore $k$ must
be odd. Then we have
$(w_{1},-w_{1},w_{1},-w_{1},\ldots,-w_{1},1,-1,\ldots,1,-1)^{T}$ $\in$
Null($A(D)$). Therefore $e_{1}^{w_{1}}e_{3}^{w_{1}}\cdots
e_{k-2}^{w_{1}}e_{k}e_{k+2}\cdots e_{2n-1}-e_{2}^{w_{1}}e_{4}^{w_{1}}\cdots
e_{k-1}^{w_{1}}e_{k+1}e_{k+3}\cdots e_{2n}\in I_{\mathcal{C}_{2n}}$ is the
generator of $I_{\mathcal{C}_{2n}}$. ∎

We know that toric ideal of two cycles which are not balanced that share only
a single vertex is principal. We give its combinatorial characterization.

######  Theorem 4.7.

Let $D$ be weighted oriented graph consists of two odd cycles
$\mathcal{C}_{m},\mathcal{C}_{n}$ such that these two odd cycles that share
only a single vertex $v_{1}$. Let
$V(\mathcal{C}_{m})=\\{v_{1},v_{2},\ldots,v_{m}\\}$,
$V(\mathcal{C}_{n})=\\{v_{1},v_{m+2},\ldots,v_{m+n}\\}$ and the edge sets
$E(\mathcal{C}_{m})=\\{e_{1},e_{2},\ldots,e_{m}\\}$,
$E(\mathcal{C}_{n})=\\{e_{m+1},e_{m+2},\ldots,e_{m+n}\\}$, where $e_{i}$ is
incident with $v_{i}$ and $v_{i+1}$ for $i=1,2,\ldots,m-1$; $e_{m}$ is
incident with $v_{m}$ and $v_{1}$; $e_{i}$ is incident with $v_{i}$ and
$v_{i+1}$ for $i=m+1,m+2,\ldots,m+n$, under convention that
$v_{m+1}=v_{1}=v_{m+n+1}$. Then the toric ideal $I_{D}$ is generated by

$e_{1}^{\frac{a_{1}}{d}}e_{3}^{\frac{a_{3}}{d}}\cdots
e_{m}^{\frac{a_{m}}{d}}e_{m+2}^{\frac{a_{m+2}}{d}}\cdots
e_{m+n-1}^{\frac{a_{m+n-1}}{d}}-e_{2}^{\frac{a_{2}}{d}}e_{4}^{\frac{a_{4}}{d}}\cdots
e_{m-1}^{\frac{a_{m-1}}{d}}e_{m+1}^{\frac{a_{m+1}}{d}}\cdots
e_{m+n}^{\frac{a_{m+n}}{d}},$

where

$\displaystyle a_{1}$ $\displaystyle=$
$\displaystyle\alpha_{2}\alpha_{3}\ldots\alpha_{m}p,$ $\displaystyle a_{i}$
$\displaystyle=$
$\displaystyle\alpha_{2}^{\prime}\alpha_{3}^{\prime}\ldots\alpha_{i}^{\prime}\alpha_{i+1}\ldots\alpha_{m}p,\mbox{
for }i=2,3,\ldots,m-1,$ $\displaystyle a_{m}$ $\displaystyle=$
$\displaystyle\alpha_{2}^{\prime}\alpha_{3}^{\prime}\ldots\alpha_{m}^{\prime}p,$
$\displaystyle a_{m+1}$ $\displaystyle=$
$\displaystyle\alpha_{m+2}\alpha_{m+3}\ldots\alpha_{m+n}q$ $\displaystyle
a_{m+i}$ $\displaystyle=$
$\displaystyle\alpha_{m+2}^{\prime}\alpha_{m+3}^{\prime}\ldots\alpha_{m+i}^{\prime}\alpha_{m+i+1}\ldots\alpha_{m+n}q,\mbox{
for }i=2,3,\ldots,n-1,$ $\displaystyle a_{m+n}$ $\displaystyle=$
$\displaystyle\alpha_{m+2}^{\prime}\alpha_{m+3}^{\prime}\ldots\alpha_{m+n}^{\prime}q$
$\displaystyle p$ $\displaystyle=$
$\displaystyle\alpha_{m+2}\alpha_{m+3}\ldots\alpha_{m+n}\alpha_{1,m+1}+\alpha_{m+2}^{\prime}\alpha_{m+3}^{\prime}\alpha_{m+4}^{\prime}\ldots\alpha_{m+n}^{\prime}\alpha_{1,m+n}$
$\displaystyle q$ $\displaystyle=$
$\displaystyle\alpha_{1}\alpha_{2}\alpha_{3}\ldots\alpha_{m}+\alpha_{2}^{\prime}\alpha_{3}^{\prime}\alpha_{4}^{\prime}\ldots\alpha_{m}^{\prime}\alpha_{1,m},$

$\alpha_{i}^{\prime}=\left\\{\begin{array}[]{ll}1,&\mbox{if $v_{i}$ is tail of
}e_{i-1},\\\ w_{i},&\mbox{if $v_{i}$ is head of }e_{i-1},\end{array}\right.$,
$\alpha_{j}=\left\\{\begin{array}[]{ll}1,&\mbox{if $v_{j}$ is tail of
}e_{j},\\\ w_{j},&\mbox{if $v_{j}$ is head of }e_{j},\end{array}\right.$,
$\alpha_{1,k}=\left\\{\begin{array}[]{ll}1,&\mbox{if $v_{1}$ is tail of
}e_{k},\\\ w_{1},&\mbox{if $v_{1}$ is head of }e_{k},\end{array}\right.$

for $k=m,m+1,m+n$,
$d_{1}=gcd(a_{1},a_{3},\ldots,a_{m},a_{m+2},\ldots,a_{m+n-1})$,
$d_{2}=gcd(a_{2},a_{4},\ldots,a_{m-1},\\\ a_{m+1},\ldots,a_{m+n})$,
$d=gcd(d_{1},d_{2})$.

###### Proof.

Let $A(D)$ be the incidence matrix of $D$ where $v_{i}$ corresponds to the
$i$-th row for $1\leq i\leq m$, $v_{m+i}$ corresponds to the $m+i-1$-th row
for $2\leq i\leq n$, $e_{i}$ corresponds to the $i$-th column for $1\leq i\leq
m+n$. Let $A_{D}=[b_{i,j}]$. Then $b_{i,i}=\alpha_{i}$ for $i=1,2,\ldots m$;
$b_{i,i-1}=\alpha_{i}^{\prime}$ for $i=2,3,\ldots m$;
$b_{i,i}=\alpha_{i+1}^{\prime}$ for $i=m+1,m+2,\ldots m+n-1$;
$b_{i,i+1}=\alpha_{i+1}$ for $i=m+1,m+2,\ldots m+n-1$;
$b_{1,m}=\alpha_{1,m},b_{1,m+1}=\alpha_{1,m+1},b_{1,m+n}=\alpha_{1,m+n}$, all
other $b_{i,j}$’s are zeroes. Let ${\bf
x}=(r_{1},-r_{2},\ldots,-r_{m-1},r_{m},-r_{m+1},r_{m+2},\ldots,r_{m+n-1},-r_{m+n})^{T}$
$\in$ Null$(A(D))$, where $r_{i}$ $\in$ $\mathbb{N}$ for $i=1,2,\ldots,m+n$.
Then we have $A(D){\bf x}={\bf 0}$. This implies that

(5) $\displaystyle\alpha_{1}r_{1}$ $\displaystyle+$
$\displaystyle\alpha_{1,m}r_{m}$ $\displaystyle-$
$\displaystyle\alpha_{1,m+1}r_{m+1}$ $\displaystyle-\alpha_{1,m+n}r_{m+n}=0$
$\displaystyle(-1)^{i}\alpha_{i}^{\prime}r_{i-1}$ $\displaystyle+$
$\displaystyle(-1)^{i+1}\alpha_{i}r_{i}=0$

for $i=2,3,\ldots,m+n$. Let $r_{m+1}=a_{m+1}$. Then from 5, we get
$r_{i}=a_{i}$ for $i=1,2,\ldots,m+n$. So,
$(\frac{a_{1}}{d},-\frac{a_{2}}{d},\ldots,-\frac{a_{m-1}}{d},\frac{a_{m}}{d},-\frac{a_{m+1}}{d},\frac{a_{m+2}}{d},\ldots,\frac{a_{m+n-1}}{d},-\frac{a_{m+n}}{d})^{T}$
$\in$ Null$(A(D))$. The toric ideal element of $D$ corresponding to this null
space element is

$e_{1}^{\frac{a_{1}}{d}}e_{3}^{\frac{a_{3}}{d}}\cdots
e_{m}^{\frac{a_{m}}{d}}e_{m+2}^{\frac{a_{m+2}}{d}}\cdots
e_{m+n-1}^{\frac{a_{m+n-1}}{d}}-e_{2}^{\frac{a_{2}}{d}}e_{4}^{\frac{a_{4}}{d}}\cdots
e_{m-1}^{\frac{a_{m-1}}{d}}e_{m+1}^{\frac{a_{m+1}}{d}}\cdots
e_{m+n}^{\frac{a_{m+n}}{d}}$

which is irreducible by the choice of $d_{1},d_{2},d$. Thus this binomial
generates $I_{D}$. ∎

######  Theorem 4.8.

Let $D$ be weighted oriented graph consists of odd cycle $\mathcal{C}_{m}$ and
an even cycle $\mathcal{C}_{n}$ which is not balanced such that these two
cycles that share only a single vertex $v_{1}$. Let
$V(\mathcal{C}_{m})=\\{v_{1},v_{2},\ldots,v_{m}\\},V(\mathcal{C}_{n})=\\{v_{1},v_{m+2},\ldots,v_{m+n}\\}$
and the edge sets are $E(\mathcal{C}_{m})=\\{e_{1},e_{2},\ldots e_{m}\\}$ and
$E(\mathcal{C}_{n})=\\{e_{m+1},e_{m+2},\ldots e_{m+n}\\}$, where $e_{i}$ is
incident with $v_{i}$ and $v_{i+1}$ for $i=1,2,\ldots,m-1$, $e_{m}$ is
incident with $v_{m}$ and $v_{1}$ and $e_{i}$ is incident with $v_{i}$ and
$v_{i+1}$ for $i=m+1,m+2,\ldots,m+n$ under the convention that
$v_{m+1}=v_{m+n+1}=v_{1}$. Then the toric ideal $I_{D}$ is generated by

$\displaystyle(i)$ $\displaystyle
e_{1}^{\frac{a_{1}}{d}}e_{3}^{\frac{a_{3}}{d}}\cdots
e_{m}^{\frac{a_{m}}{d}}e_{m+2}^{\frac{a_{m+2}}{d}}\cdots
e_{m+n}^{\frac{a_{m+n}}{d}}-e_{2}^{\frac{a_{2}}{d}}e_{4}^{\frac{a_{4}}{d}}\cdots
e_{m-1}^{\frac{a_{m-1}}{d}}e_{m+1}^{\frac{a_{m+1}}{d}}\cdots
e_{m+n-1}^{\frac{a_{m+n-1}}{d}},\mbox{ if det}(A(\mathcal{C}_{n}))>0,$
$\displaystyle(ii)$ $\displaystyle
e_{1}^{\frac{-a_{1}}{d^{\prime}}}e_{3}^{\frac{-a_{3}}{d^{\prime}}}\cdots
e_{m}^{\frac{-a_{m}}{d^{\prime}}}e_{m+1}^{\frac{a_{m+1}}{d^{\prime}}}\cdots
e_{m+n-1}^{\frac{a_{m+n-1}}{d^{\prime}}}-e_{2}^{\frac{-a_{2}}{d^{\prime}}}e_{4}^{\frac{-a_{4}}{d^{\prime}}}\cdots
e_{m-1}^{\frac{-a_{m-1}}{d^{\prime}}}e_{m+2}^{\frac{a_{m+2}}{d^{\prime}}}\cdots
e_{m+n}^{\frac{a_{m+n}}{d^{\prime}}},$ $\displaystyle\mbox{ if
det}(A(\mathcal{C}_{n}))<0,$

where

$\displaystyle a_{1}$ $\displaystyle=$
$\displaystyle\alpha_{2}\alpha_{3}\ldots\alpha_{m}p,$ $\displaystyle a_{i}$
$\displaystyle=$
$\displaystyle\alpha_{2}^{\prime}\alpha_{3}^{\prime}\ldots\alpha_{i}^{\prime}\alpha_{i+1}\ldots\alpha_{m}p,\mbox{
for }i=2,3,\ldots,m-1,$ $\displaystyle a_{m}$ $\displaystyle=$
$\displaystyle\alpha_{2}^{\prime}\alpha_{3}^{\prime}\ldots\alpha_{m}^{\prime}p,$
$\displaystyle a_{m+1}$ $\displaystyle=$
$\displaystyle\alpha_{m+2}\alpha_{m+3}\ldots\alpha_{m+n}q,$ $\displaystyle
a_{m+i}$ $\displaystyle=$
$\displaystyle\alpha_{m+2}^{\prime}\alpha_{m+3}^{\prime}\ldots\alpha_{m+i}^{\prime}\alpha_{m+i+1}\ldots\alpha_{m+n}q,\mbox{
for }i=2,3,\ldots,n-1,$ $\displaystyle a_{m+n}$ $\displaystyle=$
$\displaystyle\alpha_{m+2}^{\prime}\alpha_{m+3}^{\prime}\ldots\alpha_{m+n}^{\prime}q,$
$\displaystyle p$ $\displaystyle=$
$\displaystyle\mbox{det}(A(\mathcal{C}_{n})),$ $\displaystyle q$
$\displaystyle=$
$\displaystyle\alpha_{1}\alpha_{2}\alpha_{3}\ldots\alpha_{m}+\alpha_{2}^{\prime}\alpha_{3}^{\prime}\alpha_{4}^{\prime}\ldots\alpha_{m}^{\prime}\alpha_{1,m},$

$\alpha_{i}^{\prime}=\left\\{\begin{array}[]{ll}1,&\mbox{if $v_{i}$ is tail of
}e_{i-1},\\\ w_{i},&\mbox{if $v_{i}$ is head of }e_{i-1},\end{array}\right.$,
$\alpha_{j}=\left\\{\begin{array}[]{ll}1,&\mbox{if $v_{j}$ is tail of
}e_{j},\\\ w_{j},&\mbox{if $v_{j}$ is head of }e_{j},\end{array}\right.$,
$\alpha_{1,k}=\left\\{\begin{array}[]{ll}1,&\mbox{if $v_{1}$ is tail of
}e_{k},\\\ w_{1},&\mbox{if $v_{1}$ is head of }e_{k},\end{array}\right.$

for $k=m,m+1,m+n$,
$d_{1}=gcd(a_{1},a_{3},\ldots,a_{m},a_{m+2},\ldots,a_{m+n})$,
$d_{2}=gcd(a_{2},a_{4},\ldots,a_{m-1},\\\ a_{m+1},\ldots,a_{m+n-1})$,
$d=gcd(d_{1},d_{2})$,
$d_{1}^{\prime}=gcd(a_{1},a_{3},\ldots,a_{m},a_{m+1},\ldots,a_{m+n-1})$,
$d_{2}^{\prime}=gcd(a_{2},a_{4},\ldots,a_{m-1},a_{m+2},\ldots,a_{m+n})$,
$d^{\prime}=gcd(d_{1}^{\prime},d_{2}^{\prime})$.

###### Proof.

Let $A(D)$ be the incidence matrix of $D$ where $v_{i}$ corresponds to the
$i^{th}$ row for $1\leq i\leq m$, $v_{m+i}$ corresponds to the $(m+i-1)^{th}$
row for $2\leq i\leq n$, $e_{i}$ corresponds to the $i^{th}$ column for $1\leq
i\leq m+n$. Let $A_{D}=[b_{i,j}]$. Then $b_{i,i}=\alpha_{i}$ for
$i=1,2,\ldots,m$, $b_{i,i-1}=\alpha_{i}^{\prime}$ for $i=2,3,\ldots,m$,
$b_{i,i}=\alpha_{i+1}^{\prime}$ for $i=m+1,m+2,\ldots m+n-1$,
$b_{i,i+1}=\alpha_{i+1}$ for $i=m+1,m+2,\ldots,m+n-1$,
$b_{1,m}=\alpha_{1,m},b_{1,m+1}=\alpha_{1,m+1},b_{1,m+n}=\alpha_{1,m+n}$, all
other $b_{i,j}$’s are zeroes. Let ${\bf
x}=(r_{1},-r_{2},\ldots,-r_{m-1},r_{m},-r_{m+1},r_{m+2},\ldots,-r_{m+n-1},r_{m+n})^{T}$
$\in$ Null$(A(D))$ or ${\bf
x}=(r_{1},-r_{2},\ldots,-r_{m-1},r_{m},r_{m+1},-r_{m+2},\ldots,r_{m+n-1},-r_{m+n})^{T}$
$\in$ Null$(A(D))$, where $r_{i}$ $\in$ $\mathbb{N}$ for $i=1,2,\ldots,m+n$.
Case-1: Suppose det$(A(\mathcal{C}_{n}))>0$. In this case,
${\bf
x}=(r_{1},-r_{2},\ldots,-r_{m-1},r_{m},r_{m+1},-r_{m+2},\ldots,r_{m+n-1},-r_{m+n})^{T}\notin\mbox{Null}(A(D)).$
Then ${\bf
x}=(r_{1},-r_{2},\ldots,-r_{m-1},r_{m},-r_{m+1},r_{m+2},\ldots,-r_{m+n-1},r_{m+n})^{T}$
$\in$ Null$(A(D))$. This implies that $A(D){\bf x}={\bf 0}$ which gives that

(6) $\displaystyle\alpha_{1}r_{1}$ $\displaystyle+$
$\displaystyle\alpha_{1,m}r_{m}$ $\displaystyle-$
$\displaystyle\alpha_{1,m+1}r_{m+1}$ $\displaystyle+\alpha_{1,m+n}r_{m+n}=0$
$\displaystyle(-1)^{i}\alpha_{i}^{\prime}r_{i-1}$ $\displaystyle+$
$\displaystyle(-1)^{i+1}\alpha_{i}r_{i}=0$

for $i=2,3,\ldots,m,m+2,\ldots,m+n$. Let $r_{m+1}=a_{m+1}$. Then from 6, we
get $r_{i}=a_{i}$ for $i=1,2,\ldots,m,m+2,\ldots,m+n$. Thus
$(\frac{a_{1}}{d},-\frac{a_{2}}{d},\ldots,-\frac{a_{m-1}}{d},\frac{a_{m}}{d},-\frac{a_{m+1}}{d},\frac{a_{m+2}}{d},\ldots,-\frac{a_{m+n-1}}{d},\frac{a_{m+n}}{d})^{T}$
$\in$ Null$(A(D))$. Then the corresponding binomial in the toric ideal $I_{D}$
is

$e_{1}^{\frac{a_{1}}{d}}e_{3}^{\frac{a_{3}}{d}}\cdots
e_{m}^{\frac{a_{m}}{d}}e_{m+2}^{\frac{a_{m+2}}{d}}\cdots
e_{m+n}^{\frac{a_{m+n}}{d}}-e_{2}^{\frac{a_{2}}{d}}e_{4}^{\frac{a_{4}}{d}}\cdots
e_{m-1}^{\frac{a_{m-1}}{d}}e_{m+1}^{\frac{a_{m+1}}{d}}\cdots
e_{m+n-1}^{\frac{a_{m+n-1}}{d}},$

which is irrducible by the choice of $d_{1},d_{2},d$. Thus this binomial is
the generator of $I_{D}$. Case-2: Suppose det$(A(\mathcal{C}_{n}))<0$. In this
case,

${\bf
x}=(r_{1},-r_{2},\ldots,-r_{m-1},r_{m},-r_{m+1},r_{m+2},\ldots,-r_{m+n-1},r_{m+n})^{T}\notin\mbox{Null}(A(D)).$

Then ${\bf
x}=(r_{1},-r_{2},\ldots,-r_{m-1},r_{m},r_{m+1},-r_{m+2},\ldots,r_{m+n-1},-r_{m+n})^{T}$
$\in$ Null$(A(D))$. This implies that $A(D){\bf x}={\bf 0}$ whcih gives that

(7) $\displaystyle\alpha_{1}r_{1}$ $\displaystyle+$
$\displaystyle\alpha_{1,m}r_{m}$ $\displaystyle+$
$\displaystyle\alpha_{1,m+1}r_{m+1}$ $\displaystyle-\alpha_{1,m+n}r_{m+n}=0$
$\displaystyle(-1)^{i}\alpha_{i}^{\prime}r_{i-1}$ $\displaystyle+$
$\displaystyle(-1)^{i+1}\alpha_{i}r_{i}=0$

for $i=2,3,\ldots,m,m+2,\ldots,m+n$. Let $r_{m+1}=a_{m+1}$. Then from 7, we
get $r_{i}=-a_{i}$ for $i=1,2,\ldots,m$ and $r_{i}=a_{i}$ for
$i=m+2,m+3,\ldots,m+n$. Thus
$(\frac{-a_{1}}{d^{\prime}},-\frac{-a_{2}}{d^{\prime}},\ldots,-\frac{-a_{m-1}}{d^{\prime}},\frac{-a_{m}}{d^{\prime}},\frac{a_{m+1}}{d^{\prime}},-\frac{a_{m+2}}{d^{\prime}},\ldots,\frac{a_{m+n-1}}{d^{\prime}},-\frac{a_{m+n}}{d^{\prime}})^{T}\in\mbox{Null}(A(D))$.
Then the corresponding binomial in the toric ideal $I_{D}$ is

$e_{1}^{\frac{-a_{1}}{d^{\prime}}}e_{3}^{\frac{-a_{3}}{d^{\prime}}}\cdots
e_{m}^{\frac{-a_{m}}{d^{\prime}}}e_{m+1}^{\frac{a_{m+1}}{d^{\prime}}}\cdots
e_{m+n-1}^{\frac{a_{m+n-1}}{d^{\prime}}}-e_{2}^{\frac{-a_{2}}{d^{\prime}}}e_{4}^{\frac{-a_{4}}{d^{\prime}}}\cdots
e_{m-1}^{\frac{-a_{m-1}}{d^{\prime}}}e_{m+2}^{\frac{a_{m+2}}{d^{\prime}}}\cdots
e_{m+n}^{\frac{a_{m+n}}{d^{\prime}}},$

whcih is irreducible by the choice of
$d_{1}^{\prime},d_{2}^{\prime},d^{\prime}$. Thus this binomial generates
$I_{D}$. ∎

######  Theorem 4.9.

Let $D$ be weighted oriented graph consists of two even cycles
$\mathcal{C}_{m},\mathcal{C}_{n}$ which are not balanced such that these two
cycles share only a single vertex $v_{1}$. Let
$V(\mathcal{C}_{m})=\\{v_{1},v_{2},\ldots,v_{m}\\}$,
$V(\mathcal{C}_{n})=\\{v_{1},v_{m+2},\ldots,v_{m+n}\\}$ and the edge sets
$E(\mathcal{C}_{m})=\\{e_{1},e_{2},\ldots,e_{m}\\}$,
$E(\mathcal{C}_{n})=\\{e_{m+1},e_{m+2},\ldots,e_{m+n}\\}$, where $e_{i}$ is
incident with $v_{i}$ and $v_{i+1}$ for $i=1,2,\ldots,m-1$; $e_{m}$ is
incident with $v_{m}$ and $v_{1}$; $e_{i}$ is incident with $v_{i}$ and
$v_{i+1}$ for $i=m+1,m+2,\ldots,m+n$, under convention that
$v_{m+1}=v_{1}=v_{m+n+1}$. Then the toric ideal $I_{D}$ is generated by

$\displaystyle(i)$ $\displaystyle
e_{1}^{\frac{a_{1}}{d}}e_{3}^{\frac{a_{3}}{d}}\cdots
e_{m-1}^{\frac{a_{m-1}}{d}}e_{m+2}^{\frac{a_{m+2}}{d}}\cdots
e_{m+n}^{\frac{a_{m+n}}{d}}-e_{2}^{\frac{a_{2}}{d}}e_{4}^{\frac{a_{4}}{d}}\cdots
e_{m}^{\frac{a_{m}}{d}}e_{m+1}^{\frac{a_{m+1}}{d}}\cdots
e_{m+n-1}^{\frac{a_{m+n-1}}{d}},$ $\displaystyle\mbox{ if
det}(A(\mathcal{C}_{m}))>0\;and\;det(A(\mathcal{C}_{n}))>0$
$\displaystyle(ii)$ $\displaystyle
e_{1}^{\frac{a_{1}}{d^{\prime}}}e_{3}^{\frac{a_{3}}{d^{\prime}}}\cdots
e_{m-1}^{\frac{a_{m-1}}{d^{\prime}}}e_{m+1}^{\frac{-a_{m+1}}{d^{\prime}}}\cdots
e_{m+n-1}^{\frac{-a_{m+n-1}}{d^{\prime}}}-e_{2}^{\frac{a_{2}}{d^{\prime}}}e_{4}^{\frac{a_{4}}{d^{\prime}}}\cdots
e_{m}^{\frac{a_{m}}{d^{\prime}}}e_{m+2}^{\frac{-a_{m+2}}{d^{\prime}}}\cdots
e_{m+n}^{\frac{-a_{m+n}}{d^{\prime}}},\;$ $\displaystyle\mbox{ if
det}(A(\mathcal{C}_{m}))<0\;and\;det(A(\mathcal{C}_{n}))>0$
$\displaystyle(iii)$ $\displaystyle
e_{1}^{\frac{-a_{1}}{d^{\prime}}}e_{3}^{\frac{-a_{3}}{d^{\prime}}}\cdots
e_{m-1}^{\frac{-a_{m-1}}{d^{\prime}}}e_{m+1}^{\frac{a_{m+1}}{d^{\prime}}}\cdots
e_{m+n-1}^{\frac{a_{m+n-1}}{d^{\prime}}}-e_{2}^{\frac{-a_{2}}{d^{\prime}}}e_{4}^{\frac{-a_{4}}{d^{\prime}}}\cdots
e_{m}^{\frac{-a_{m}}{d^{\prime}}}e_{m+2}^{\frac{a_{m+2}}{d^{\prime}}}\cdots
e_{m+n}^{\frac{a_{m+n}}{d^{\prime}}},\;$ $\displaystyle\mbox{ if
det}(A(\mathcal{C}_{m}))>0\;and\;det(A(\mathcal{C}_{n}))<0$
$\displaystyle(iv)$ $\displaystyle
e_{1}^{\frac{-a_{1}}{d}}e_{3}^{\frac{-a_{3}}{d}}\cdots
e_{m-1}^{\frac{-a_{m-1}}{d}}e_{m+2}^{\frac{-a_{m+2}}{d}}\cdots
e_{m+n}^{\frac{-a_{m+n}}{d}}-e_{2}^{\frac{-a_{2}}{d}}e_{4}^{\frac{-a_{4}}{d}}\cdots
e_{m}^{\frac{-a_{m}}{d}}e_{m+1}^{\frac{-a_{m+1}}{d}}\cdots
e_{m+n-1}^{\frac{-a_{m+n-1}}{d}},\;$ $\displaystyle\mbox{ if
det}(A(\mathcal{C}_{m}))<0\;and\;det(A(\mathcal{C}_{n}))<0.$

where

$\displaystyle a_{1}$ $\displaystyle=$
$\displaystyle\alpha_{2}\alpha_{3}\ldots\alpha_{m}p,$ $\displaystyle a_{i}$
$\displaystyle=$
$\displaystyle\alpha_{2}^{\prime}\alpha_{3}^{\prime}\ldots\alpha_{i}^{\prime}\alpha_{i+1}\ldots\alpha_{m}p,\mbox{
for }i=2,3,\ldots,m-1,$ $\displaystyle a_{m}$ $\displaystyle=$
$\displaystyle\alpha_{2}^{\prime}\alpha_{3}^{\prime}\ldots\alpha_{m}^{\prime}p,$
$\displaystyle a_{m+1}$ $\displaystyle=$
$\displaystyle\alpha_{m+2}\alpha_{m+3}\ldots\alpha_{m+n}q$ $\displaystyle
a_{m+i}$ $\displaystyle=$
$\displaystyle\alpha_{m+2}^{\prime}\alpha_{m+3}^{\prime}\ldots\alpha_{m+i}^{\prime}\alpha_{m+i+1}\ldots\alpha_{m+n}q,\mbox{
for }i=2,3,\ldots,n-1,$ $\displaystyle a_{m+n}$ $\displaystyle=$
$\displaystyle\alpha_{m+2}^{\prime}\alpha_{m+3}^{\prime}\ldots\alpha_{m+n}^{\prime}q$
$\displaystyle p$ $\displaystyle=$ $\displaystyle det(A(\mathcal{C}_{n}))$
$\displaystyle q$ $\displaystyle=$ $\displaystyle det(A(\mathcal{C}_{m})),$

$\alpha_{i}^{\prime}=\left\\{\begin{array}[]{ll}1,&\mbox{if $v_{i}$ is tail of
}e_{i-1},\\\ w_{i},&\mbox{if $v_{i}$ is head of }e_{i-1},\end{array}\right.$,
$\alpha_{j}=\left\\{\begin{array}[]{ll}1,&\mbox{if $v_{j}$ is tail of
}e_{j},\\\ w_{j},&\mbox{if $v_{j}$ is head of }e_{j},\end{array}\right.$,
$\alpha_{1,k}=\left\\{\begin{array}[]{ll}1,&\mbox{if $v_{1}$ is tail of
}e_{k},\\\ w_{1},&\mbox{if $v_{1}$ is head of }e_{k},\end{array}\right.$

for $k=m,m+1,m+n$,
$d_{1}=gcd(a_{1},a_{3},\ldots,a_{m-1},a_{m+2},\ldots,a_{m+n})$,
$d_{2}=gcd(a_{2},a_{4},\ldots,a_{m},\\\ a_{m+1},\ldots,a_{m+n-1})$,
$d=gcd(d_{1},d_{2})$,
$d_{1}^{\prime}=gcd(a_{1},a_{3},\ldots,a_{m-1},a_{m+1},\ldots,a_{m+n-1})$,
$d_{2}^{\prime}=gcd(a_{2},a_{4},\ldots,a_{m},a_{m+2},\ldots,a_{m+n})$,
$d^{\prime}=gcd(d_{1}^{\prime},d_{2}^{\prime})$,

###### Proof.

Let $A(D)$ be the incidence matrix of $D$ where $v_{i}$ corresponds to the
$i^{th}$ row for $1\leq i\leq m$, $v_{m+i}$ corresponds to the $(m+i-1)^{th}$
row for $2\leq i\leq n$, $e_{i}$ corresponds to the $i^{th}$ column for $1\leq
i\leq m+n$. Let $A_{D}=[b_{i,j}]$. Then $b_{i,i}=\alpha_{i}$ for
$i=1,2,\ldots,m$; $b_{i,i-1}=\alpha_{i}^{\prime}$ for $i=2,3,\ldots,m$;
$b_{i,i}=\alpha_{i+1}^{\prime}$ for $i=m+1,m+2,\ldots,m+n-1$;
$b_{i,i+1}=\alpha_{i+1}$ for $i=m+1,m+2,\ldots,m+n-1$;
$b_{1,m}=\alpha_{1,m},b_{1,m+1}=\alpha_{1,m+1},b_{1,m+n}=\alpha_{1,m+n}$, all
other $b_{i,j}$’s are zeroes. Let ${\bf
x}=(r_{1},-r_{2},\ldots,r_{m-1},-r_{m},-r_{m+1},r_{m+2},\ldots,-r_{m+n-1},r_{m+n})^{T}$
$\in$ Null$(A(D))$ or ${\bf
x}=(r_{1},-r_{2},\ldots,r_{m-1},-r_{m},r_{m+1},-r_{m+2},\ldots,r_{m+n-1},-r_{m+n})^{T}$
$\in$ Null$(A(D))$, where $r_{i}$ $\in$ $\mathbb{N}$ for $i=1,2,\ldots,m+n$.
Case-1: Suppose det($A(\mathcal{C}_{m}))>0$ and det($A(\mathcal{C}_{n}))>0$.
In this case,
${\bf
x}=(r_{1},-r_{2},\ldots,r_{m-1},-r_{m},r_{m+1},-r_{m+2},\ldots,r_{m+n-1},-r_{m+n})^{T}$
$\notin$ Null$(A(D))$. Then ${\bf
x}=(r_{1},-r_{2},\ldots,r_{m-1},-r_{m},-r_{m+1},r_{m+2},\ldots,-r_{m+n-1},r_{m+n})^{T}$
$\in$ Null$(A(D))$. Then we have $A(D){\bf x}={\bf 0}$. This implies that

(8) $\displaystyle\alpha_{1}r_{1}$ $\displaystyle-$
$\displaystyle\alpha_{1,m}r_{m}$ $\displaystyle-$
$\displaystyle\alpha_{1,m+1}r_{m+1}$ $\displaystyle+\alpha_{1,m+n}r_{m+n}=0$
$\displaystyle(-1)^{i}\alpha_{i}^{\prime}r_{i-1}$ $\displaystyle+$
$\displaystyle(-1)^{i+1}\alpha_{i}r_{i}=0$

for $i=2,3,\ldots,m,m+2,\ldots,m+n$. Let $r_{m+1}=a_{m+1}$. Then from 8, we
get $r_{i}=a_{i}$ for $i=1,2,\ldots,m,m+2,\ldots,m+n$. Thus
$(\frac{a_{1}}{d},-\frac{a_{2}}{d},\ldots,\frac{a_{m-1}}{d},-\frac{a_{m}}{d},-\frac{a_{m+1}}{d},\frac{a_{m+2}}{d},\ldots,-\frac{a_{m+n-1}}{d},\frac{a_{m+n}}{d})^{T}$
$\in$ Null$(A(D))$. Then the corresponding binomial in the toric ideal $I_{D}$
is

$e_{1}^{\frac{a_{1}}{d}}e_{3}^{\frac{a_{3}}{d}}\cdots
e_{m-1}^{\frac{a_{m-1}}{d}}e_{m+2}^{\frac{a_{m+2}}{d}}\cdots
e_{m+n}^{\frac{a_{m+n}}{d}}-e_{2}^{\frac{a_{2}}{d}}e_{4}^{\frac{a_{4}}{d}}\cdots
e_{m}^{\frac{a_{m}}{d}}e_{m+1}^{\frac{a_{m+1}}{d}}\cdots
e_{m+n-1}^{\frac{a_{m+n-1}}{d}}$

which is irreducible by the choice of $d_{1},d_{2},d$. Thus this binomial is
the generator of $I_{D}$. Case-2: Suppose det($A(\mathcal{C}_{m}))<0$ and
det($A(\mathcal{C}_{n}))>0$. In this case,
${\bf
x}=(r_{1},-r_{2},\ldots,r_{m-1},-r_{m},-r_{m+1},r_{m+2},\ldots,-r_{m+n-1},r_{m+n})^{T}$
$\notin$ Null$(A(D))$. Then ${\bf
x}=(r_{1},-r_{2},\ldots,r_{m-1},-r_{m},r_{m+1},-r_{m+2},\ldots,r_{m+n-1},-r_{m+n})^{T}$
$\in$ Null$(A(D))$. This implies that $A(D){\bf x}={\bf 0}$ which gives that

(9) $\displaystyle\alpha_{1}r_{1}$ $\displaystyle-$
$\displaystyle\alpha_{1,m}r_{m}$ $\displaystyle+$
$\displaystyle\alpha_{1,m+1}r_{m+1}$ $\displaystyle-\alpha_{1,m+n}r_{m+n}=0$
$\displaystyle(-1)^{i}\alpha_{i}^{\prime}r_{i-1}$ $\displaystyle+$
$\displaystyle(-1)^{i+1}\alpha_{i}r_{i}=0$

for $i=2,3,\ldots,m,m+2,\ldots,m+n$. Let $r_{m+1}=-a_{m+1}$. Then from 9, we
get $r_{i}=a_{i}$ for $i=1,2,\ldots,m$; $r_{i}=-a_{i}$ for
$i=m+2,m+3,\ldots,m+n$. Thus
$(\frac{a_{1}}{d^{\prime}},-\frac{a_{2}}{d^{\prime}},\ldots,\frac{a_{m-1}}{d^{\prime}},-\frac{a_{m}}{d^{\prime}},\frac{-a_{m+1}}{d^{\prime}},-\frac{-a_{m+2}}{d^{\prime}},\ldots,\frac{-a_{m+n-1}}{d^{\prime}},-\frac{-a_{m+n}}{d^{\prime}})^{T}$
$\in$ Null$(A(D))$. Then the corresponding binomial in the toric ideal $I_{D}$
is

$e_{1}^{\frac{a_{1}}{d^{\prime}}}e_{3}^{\frac{a_{3}}{d^{\prime}}}\cdots
e_{m-1}^{\frac{a_{m-1}}{d^{\prime}}}e_{m+1}^{\frac{-a_{m+1}}{d^{\prime}}}\cdots
e_{m+n-1}^{\frac{-a_{m+n-1}}{d^{\prime}}}-e_{2}^{\frac{a_{2}}{d^{\prime}}}e_{4}^{\frac{a_{4}}{d^{\prime}}}\cdots
e_{m}^{\frac{a_{m}}{d^{\prime}}}e_{m+2}^{\frac{-a_{m+2}}{d^{\prime}}}\cdots
e_{m+n}^{\frac{-a_{m+n}}{d^{\prime}}},$

which is irreducible by the choice of
$d_{1}^{\prime},d_{2}^{\prime},d^{\prime}$. Thus this binomial is the
generator of $I_{D}$. Case-3: Suppose det($A(\mathcal{C}_{m}))>0$ and
det($A(\mathcal{C}_{n}))<0$. In this case,
${\bf x}=(r_{1},-r_{2},\ldots,r_{m-1},-r_{m},-r_{m+1},\\\
r_{m+2},\ldots,-r_{m+n-1},r_{m+n})^{T}$ $\notin$ Null$(A(D))$. Then ${\bf
x}=(r_{1},-r_{2},\ldots,r_{m-1},-r_{m},\\\
r_{m+1},-r_{m+2},\ldots,r_{m+n-1},-r_{m+n})^{T}$ $\in$ Null$(A(D))$. This
implies that $A(D){\bf x}={\bf 0}$ which gives that

(10) $\displaystyle\alpha_{1}r_{1}$ $\displaystyle-$
$\displaystyle\alpha_{1,m}r_{m}$ $\displaystyle+$
$\displaystyle\alpha_{1,m+1}r_{m+1}$ $\displaystyle-\alpha_{1,m+n}r_{m+n}=0$
$\displaystyle(-1)^{i}\alpha_{i}^{\prime}r_{i-1}$ $\displaystyle+$
$\displaystyle(-1)^{i+1}\alpha_{i}r_{i}=0$

for $i=2,3,\ldots,m,m+2,\ldots,m+n$. Let $r_{m+1}=a_{m+1}$. Then from 10, we
get $r_{i}=-a_{i}$ for $i=1,2,\ldots,m$; $r_{i}=a_{i}$ for
$i=m+2,m+3,\ldots,m+n$. Thus
$(\frac{-a_{1}}{d^{\prime}},-\frac{-a_{2}}{d^{\prime}},\ldots,\frac{-a_{m-1}}{d^{\prime}},-\frac{-a_{m}}{d^{\prime}},\\\
\frac{a_{m+1}}{d^{\prime}},-\frac{a_{m+2}}{d^{\prime}},\ldots,\frac{a_{m+n-1}}{d^{\prime}},-\frac{a_{m+n}}{d^{\prime}})^{T}$
$\in$ Null$(A(D))$. Then the corresponding binomial in the toric ideal $I_{D}$
is

$e_{1}^{\frac{-a_{1}}{d^{\prime}}}e_{3}^{\frac{-a_{3}}{d^{\prime}}}\cdots
e_{m-1}^{\frac{-a_{m-1}}{d^{\prime}}}e_{m+1}^{\frac{a_{m+1}}{d^{\prime}}}\cdots
e_{m+n-1}^{\frac{a_{m+n-1}}{d^{\prime}}}-e_{2}^{\frac{-a_{2}}{d^{\prime}}}e_{4}^{\frac{-a_{4}}{d^{\prime}}}\cdots
e_{m}^{\frac{-a_{m}}{d^{\prime}}}e_{m+2}^{\frac{a_{m+2}}{d^{\prime}}}\cdots
e_{m+n}^{\frac{a_{m+n}}{d^{\prime}}}$

which is irreducible by the choice of
$d_{1}^{\prime},d_{2}^{\prime},d^{\prime}$. Thus this binomial is the
generator of $I_{D}$. Case-4: Suppose det($A(\mathcal{C}_{m}))<0$ and
det($A(\mathcal{C}_{n}))<0$. In this case,
${\bf
x}=(r_{1},-r_{2},\ldots,r_{m-1},-r_{m},r_{m+1},-r_{m+2},\ldots,r_{m+n-1},-r_{m+n})^{T}$
$\notin$ Null$(A(D))$. Then ${\bf
x}=(r_{1},-r_{2},\ldots,r_{m-1},-r_{m},-r_{m+1},r_{m+2},\ldots,-r_{m+n-1},r_{m+n})^{T}$
$\in$ Null$(A(D))$. This implies that $A(D){\bf x}={\bf 0}$ which gives that

(11) $\displaystyle\alpha_{1}r_{1}$ $\displaystyle-$
$\displaystyle\alpha_{1,m}r_{m}$ $\displaystyle-$
$\displaystyle\alpha_{1,m+1}r_{m+1}$ $\displaystyle+\alpha_{1,m+n}r_{m+n}=0$
$\displaystyle(-1)^{i}\alpha_{i}^{\prime}r_{i-1}$ $\displaystyle+$
$\displaystyle(-1)^{i+1}\alpha_{i}r_{i}=0$

for $i=2,3,\ldots,m,m+2,\ldots,m+n$. Let $r_{m+1}=-a_{m+1}$. Then from 11, we
get $r_{i}=-a_{i}$ for $i=1,2,\ldots,m,m+2,\ldots,m+n$. Thus
$(\frac{-a_{1}}{d},-\frac{-a_{2}}{d},\ldots,\frac{-a_{m-1}}{d},-\frac{-a_{m}}{d},-\frac{-a_{m+1}}{d},\frac{-a_{m+2}}{d},\ldots,-\frac{-a_{m+n-1}}{d},\frac{-a_{m+n}}{d})^{T}$
$\in$ Null$(A(D))$. Then the corresponding binomial in the toric ideal $I_{D}$
is

$e_{1}^{\frac{-a_{1}}{d}}e_{3}^{\frac{-a_{3}}{d}}\cdots
e_{m-1}^{\frac{-a_{m-1}}{d}}\\\ e_{m+2}^{\frac{-a_{m+2}}{d}}\cdots
e_{m+n}^{\frac{-a_{m+n}}{d}}-e_{2}^{\frac{-a_{2}}{d}}e_{4}^{\frac{-a_{4}}{d}}\cdots
e_{m}^{\frac{-a_{m}}{d}}e_{m+1}^{\frac{-a_{m+1}}{d}}\cdots
e_{m+n-1}^{\frac{-a_{m+n-1}}{d}}$

whcih is irreducible by the choice of $d_{1},d_{2},d$. Thus this binomial is
the generator of $I_{D}$. ∎

## References

  * [1] J. Biermann, S. Kara, K-N. Lin and A. B. O’Keefe, Toric ideals of weighted oriented graphs, Internat. J. Algebra Comput. 32 (2022), no. 2, 307–325.
  * [2] G. Craciun, A. Dickenstein, A. Shiu and B. Sturmfels, Toric dynamical systems. J. Symbolic Comput. 44 (2009), no. 11, 1551–1565.
  * [3] F. Catanese, S. Hoşten, A. Khetan and B. Strumfel, The maximum likelihood degree, Amer. J. Math. 128 (2006), no. 3, 671–697.
  * [4] D. A. Cox, K-N. Lin and G. Sosa, Multi-Rees algebras and toric dynamical systems. Proc. Amer. Math. Soc. 147 (2019), no. 11, 4605–4616.
  * [5] P. Diaconis, B. Sturmfels, Algebraic algorithms for sampling from conditional distributions. Ann. Statist. 26 (1998), no. 1, 363–397.
  * [6] D. R. Grayson and M. E. Stillman, Macaulay2, a software system for research in algebraic geometry. Available at http://www.math.uiuc.edu/Macaulay2/.
  * [7] J. Martínez-Bernal, Y. Pitones and R. H. Villarreal, Minimum distance functions of graded ideals and Reed-Muller-type codes, J. Pure Appl. Algebra 221 (2017), no. 2, 251–275.
  * [8] H. Ohsugi and T. Hibi, Toric ideals generated by quadratic binomials, J. Algebra 218 (1999), no. 2, 509–527.
  * [9] S. Petrović and D. Stasi, Toric algebra of hypergraphs, J. Algebraic Combin. 39 (2014), no. 1, 187–208.
  * [10] R. H. Villarreal, Monomial algebras, Monographs and Textbooks in Pure and Applied Mathematics, 238, Marcel Dekker, Inc., New York, 2001.
  * [11] R. H. Villarreal, Rees algebras of edge ideals, Comm. Algebra 23 (1995), no. 9, 3513–3524.