Macaulay2 » Documentation
Packages » Nauty :: removeEdges
next | previous | forward | backward | up | index | toc

removeEdges -- creates a list of graphs obtained by removing one edge from the given graph in all possible ways

Synopsis

Description

This method creates a list of all possible graphs obtainable from the given graph by removing one edge. Notice that isomorphic graphs are allowed within the list.

i1 : R = QQ[a..e];
i2 : removeEdges cycle R

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

o2 : List
i3 : removeEdges graph {a*b, a*c, b*c, c*d, d*e}

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

o3 : List

If the List input format is used, then one should use care as the list may contain isomorphic pairs.

See also

Ways to use removeEdges :

For the programmer

The object removeEdges is a method function with options.