# Level and pseudo-Gorenstein binomial edge ideal of graphs with $$n\leq 12$$ vertices

In the paper Level and Pseudo-Gorenstein Binomial Edge Ideals by Giancarlo Rinaldo and Rajib Sarkar, (section 7), we present the following table representing the cardinalities of Cohen-Macaualay, level and pseudo-Gorenstein binomial edge ideals $$J_G$$ on $$n$$ vertices. In this file we give the set of graphs in nauty format. Moreover we provide the implementation in Macaulay 2 for the filtration of level and pseudo-Gorenstein given a set of Cohen-Macaulay binomial edge ideals, downloadable from here.

We refer to the article for the notation and results. In this page you will find a description of the algorithm and implementation with an example of computation

## Algorithm and computation

To filter the level binomial edge ideals of graphs with a given number of vertices from the Cohen-Macaulay ones, we need to compute the Betti table and remove the ones that have non-zero entries with the exception of the unique extremal Betti number.

To filter the pseudo-Gorenstein binomial edge ideals of graphs with a given number of vertices from the Cohen-Macaulay ones, either we compute the Betti table and remove the ones that have the unique extremal Betti number equal to 1, or compute the Hilbert series $$\frac{h(t)}{(1-t)^d}$$, and check that the leading coefficient of $$h(t)$$ is $$1$$. We use this second and more efficient algorithm.

For this purpose we use the database of Cohen-Macaulay graphs that has been computed here, and a script in Macaulay 2 written by the authors.

tar -xzvf level_pg.tgz


move to the folder

cd level_pg


Now, suppose that we are interested in all the level binomial edge ideals of graphs with 6 vertices, we can simply run:


M2 --script FilterLevel.m2 6


And the output is


------(1)------
{set {0, 3}, set {0, 4}, set {0, 5}, set {1, 4}, set {1, 5}, set {2, 5}}
CM type=5
Reg=3
0 1  2  3  4 5
total: 1 6 20 28 18 5
0: 1 .  .  .  . .
1: . 6  .  .  . .
2: . . 20 16  2 .
3: . .  . 12 16 5
------(2)------
{set {0, 3}, set {3, 4}, set {3, 5}, set {0, 4}, set {0, 5}, set {1, 4}, set {4, 5}, set {1, 5}, set {2, 5}}
CM type=6
Reg=2
0 1  2  3  4 5
total: 1 9 28 39 25 6
0: 1 .  .  .  . .
1: . 9 10  3  . .
2: . . 18 36 25 6
------(3)------
{set {0, 1}, set {1, 2}, set {1, 3}, set {1, 4}, set {1, 5}, set {0, 2}, set {0, 3}, set {0, 4}, set {0, 5}, set {2, 3}, set {2, 4}, set {2, 5}, set {3, 4}, set {3, 5}, set {4, 5}}
CM type=5
Reg=1
0  1  2  3  4 5
total: 1 15 40 45 24 5
0: 1  .  .  .  . .
1: . 15 40 45 24 5


Thewn we are interested in all pseudo-Gorenstein binomial edge ideals of graphs with 6 vertices, so we run:


M2 --script FilterPseudoGorenstein.m2 6


And the output is .


------(1)------
{set {0, 3}, set {3, 5}, set {0, 4}, set {0, 5}, set {1, 4}, set {4, 5}, set {1, 5}, set {2, 5}}
2    3
1 + 5T + 7T  + T
------(2)------
{set {0, 3}, set {3, 5}, set {0, 5}, set {1, 4}, set {2, 4}, set {4, 5}, set {1, 5}, set {2, 5}}
2    3
1 + 5T + 7T  + T



We observe that the graphs are the ones described in Section 7.