next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
NautyGraphs :: stringToEdgeIdeal

stringToEdgeIdeal -- converts a Sparse6 or Graph6 String to an edge ideal in the given polynomial ring



This method converts a Sparse6 or Graph6 string S to an edge ideal I in the given polynomial ring R. That is, for each edge (a,b) in the graph given by S, the monomial a*b is added as a generator to I.

Note, this method requires that the number of variables of R be the same as the number of vertices of S.

i1 : R = QQ[a..e];
i2 : stringToEdgeIdeal("Dhc", R)

o2 = monomialIdeal (a*b, b*c, c*d, a*e, d*e)

o2 : MonomialIdeal of R

This method is almost always faster than converting the string to a graph and then to an edge ideal using the edgeIdeal method.

See also

Ways to use stringToEdgeIdeal :