If you want to play with digraphs attached is program for generating digraph diregular cages of any girth and degree.
On Wed, Oct 31, 2012 at 10:53:56AM +0100, Nathann Cohen wrote: > > Some benchmarks on moderate cages (4324 vertices, girth 19) suggest i > > probably will lose if you implement it correctly ;) > > Well, for those things we may be happy to have a good C implementation. I > will try to do that quickly. How long is it, if I may ask, for such graphs > ? Could you also give me one such instance, so that I may compare ? > > Nathann > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To post to this group, send email to sage-support@googlegroups.com. > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-support?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
def cycgr(n,r): """ cyclic digraph """ ed=[] for v in xrange(n): ed += [(v,(v+i)%n) for i in xrange(1,r+1)] g=DiGraph(ed) return g def dicage(g,d): """ diregular cage of girth $g$ and in- and out-degrees $d$ """ v=d*(g-1)+1 #this is minimal under a conjecture may safely be increased return cycgr(v,d) gi=8 d=5 g=dicage(gi,d) m=g.adjacency_matrix() for i in range(2,gi+1): print i,(m**i).trace() print uniq(g.out_degree()),uniq(g.in_degree())