Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 12 years ago

jtaa gravatar image

I've added another bit on:

sage: def c(k):
....: if k<3:
....: return 0
....: if k>2:
....: return sum_of_coeffs(nil(A,k))/(2*k)

where c(k) returns the number of simple cycles in G of length k.

click to hide/show revision 2
improved style

updated 12 years ago

fidbc gravatar image

I've added another bit on:

sage:

def c(k): 
....: if k<3:
....: return 0
....: if k>2:
....: return sum_of_coeffs(nil(A,k))/(2*k)

sum_of_coeffs(nil(A,k))/(2*k)

where c(k) returns the number of simple cycles in G of length k.