Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 1782

Macaulay2-1.3.1-8.fc15.i686.rpm

-- -*- M2-comint -*- {* hash: 1376617026 *}

i1 : S = QQ[a..e];

i2 : g = graph {a*b,b*c,c*d,d*e,a*e} -- the 5-cycle (connected)

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

o2 : Graph

i3 : h = graph {a*b,b*c,c*a,d*e} -- a 3-cycle and a disjoint edge (not connected)

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

o3 : Graph

i4 : k = graph {a*b,b*c,c*d,a*d} -- 4-cycle and isolated vertex (not connected)

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

o4 : Graph

i5 : numConnectedGraphComponents g

o5 = 1

i6 : numConnectedGraphComponents h

o6 = 2

i7 : numConnectedGraphComponents k

o7 = 2

i8 :