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

## Synopsis

• Usage:
I = stringToEdgeIdeal(S, R)
• Inputs:
• S, , a string in nauty's Sparse6 or Graph6 format
• R, , a polynomial ring
• Outputs:
• I, an ideal, an ideal in the given polynomial ring

## Description

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.