Sophie

Sophie

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

Macaulay2-1.3.1-8.fc15.i686.rpm

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

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

i2 : k5 = completeGraph S

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

o2 : Graph

i3 : dv = degreeVertex(k5,a)

o3 = 4

i4 : n = neighbors(k5,a)

o4 = {b, c, d, e}

o4 : List

i5 : #n == dv

o5 = true

i6 : degreeVertex(k5,2)

o6 = 4

i7 : h = hyperGraph {a*b*c,c*d,a*d*e,b*e,c*e}

o7 = HyperGraph{edges => {{a, b, c}, {c, d}, {b, e}, {c, e}, {a, d, e}}}
                ring => S
                vertices => {a, b, c, d, e}

o7 : HyperGraph

i8 : degreeVertex(h,a)

o8 = 2

i9 : degreeVertex(h,2) -- degree of c

o9 = 3

i10 :