Let

be a simple graph on the vertex set

We say that the graph is closed with respect to the given ordering of vertices if

satisfies the condition that for any pair of edges

and

with

and

, the edge

is an edge of

and for any pair of edges

and

with

and

the edge

is an edge of

.
For a field

, let

be the ring of polynomials in

variables. The binomial edge ideal

is the ideal generated by the elements

where

and

is an edge of

Binomial edge ideals of graphs were introduced in [1] and play a role in the study of conditional independence statements and the subject of algebraic statistics [2]. In this Demonstration we illustrate theorem 1.1 of (1), which states that a simple graph

is closed (for a given ordering) if and only if the reduced Gröbner basis of its binomial edge ideal

with respect to the lexicographic ordering on

induced by

is quadratic (and generated by

).
[1] J. Herzog, T. Hibi, F. Hreinsdóttir, F. Kahle, and T. Rauh, "Binomial Edge Ideals and Conditional Independence Statements,"
arXiv:0909.4717, 2009.
[2] M. Drton, B. Sturmfels, and S. Sullivant,
Lectures on Algebraic Statistics, Vol. 39, Berlin: Springer, 2009.