Sophie

Sophie

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

Macaulay2-1.3.1-8.fc15.i686.rpm

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

i1 : T = QQ[x_1..x_9];

i2 : g = graph {x_1*x_2,x_2*x_3,x_3*x_4,x_4*x_5,x_5*x_6,x_6*x_7,x_7*x_8,x_8*x_9,x_9*x_1} -- a 9-cycle

o2 = Graph{edges => {{x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }}}
                       1   2     2   3     3   4     4   5     5   6     6   7     7   8     1   9     8   9
           ring => T
           vertices => {x , x , x , x , x , x , x , x , x }
                         1   2   3   4   5   6   7   8   9

o2 : Graph

i3 : smallestCycleSize g

o3 = 9

i4 : h = graph {x_1*x_2,x_2*x_3,x_3*x_4,x_4*x_5,x_5*x_6,x_6*x_7,x_7*x_8,x_8*x_9} -- a tree (no cycles)

o4 = Graph{edges => {{x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }}}
                       1   2     2   3     3   4     4   5     5   6     6   7     7   8     8   9
           ring => T
           vertices => {x , x , x , x , x , x , x , x , x }
                         1   2   3   4   5   6   7   8   9

o4 : Graph

i5 : smallestCycleSize h

o5 = infinity

o5 : InfiniteNumber

i6 : l =  graph {x_1*x_2,x_2*x_3,x_3*x_4,x_4*x_5,x_5*x_6,x_6*x_7,x_7*x_8,x_8*x_9,x_9*x_1,x_1*x_4}

o6 = Graph{edges => {{x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }}}
                       1   2     2   3     1   4     3   4     4   5     5   6     6   7     7   8     1   9     8   9
           ring => T
           vertices => {x , x , x , x , x , x , x , x , x }
                         1   2   3   4   5   6   7   8   9

o6 : Graph

i7 : smallestCycleSize l

o7 = 4

i8 :