-- -*- M2-comint -*- hash: 8536495623459880279

i1 : R = QQ[a,b,c,d,e];

i2 : cycle R

o2 = Graph{"edges" => {{a, b}, {b, c}, {c, d}, {d, e}, {a, e}}}
           "ring" => R
           "vertices" => {a, b, c, d, e}

o2 : Graph

i3 : cycle(R,3)

o3 = Graph{"edges" => {{a, b}, {b, c}, {a, c}}}
           "ring" => R
           "vertices" => {a, b, c, d, e}

o3 : Graph

i4 : cycle {e,c,d,b}

o4 = Graph{"edges" => {{c, e}, {c, d}, {b, d}, {b, e}}}
           "ring" => R
           "vertices" => {a, b, c, d, e}

o4 : Graph

i5 : R = QQ[a,c,d,b,e];-- variables given different order

i6 : cycle R

o6 = Graph{"edges" => {{a, c}, {c, d}, {d, b}, {b, e}, {a, e}}}
           "ring" => R
           "vertices" => {a, c, d, b, e}

o6 : Graph

i7 : 
