next | previous | forward | backward | up | top | index | toc | directory | Macaulay 2 web site

antiCycle -- returns a graph of an anticycle.

Synopsis

Description

This function is the reverse of the function cycle by returning the graph which is the complement of a cycle.
i1 : R = QQ[a,b,c,d,e];
i2 : antiCycle R

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

o2 : Graph
i3 : antiCycle(R,4)

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

o3 : Graph
i4 : antiCycle {e,c,d,b}

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

o4 : Graph
i5 : complementGraph antiCycle R == cycle R

o5 = true

See also

Ways to use antiCycle :