Sunday, 18 December 2016

combinatorics - Counting functional graphs with no 1 or 2-cycles.



I can easily work out that the number of functional graphs (directed graphs in which all vertices have out-degree one) of size n is nn and the number of functional graphs without one-cycles is (n1)n. Is there an straight-forward way to work out the number of functional graphs of size n which have no 1-cycles (fixed points) or 2-cycles?


Answer




The problem of restricted endofunctions is a classic from
combinatorics, gives rise to some fascinating deep math and has been
studied in considerable detail.



Labelled trees are given by
T=Z×P(T)


which gives the functional equation
T(z)=zexpT(z).




The species of endofunctions is then given by
Q=P(C(T)).



Translating to generating functions we get
Q(z)=explog11T(z)=11T(z).



In this particular case we have that there are no
fixed points or two-cycles so we get the species




Q=P(C3(T)).



This yields the generating function



Q(z)=exp(T(z)T(z)2/2)11T(z).



Extracting coefficients via poor man's Lagrange inversion we have

Qn=n!12πi|z|=ϵ1zn+1exp(T(z)T(z)2/2)11T(z)dz.



Put T(z)=w so that z=w/exp(w)=wexp(w) and
dz=exp(w)wexp(w)
to get
n!12πi|w|=ϵexp(w(n+1))wn+1exp(ww2/2)1w(exp(w)wexp(w))dw=n!12πi|w|=ϵexp(wn)wn+1exp(ww2/2)1w(1w)dw=n!12πi|w|=ϵexp(w(n1)w2/2)wn+1dw.




Extracting coefficients from this we obtain the closed formula



n!n/2q=0(1)q2q×q!(n1)n2q(n2q)!.



This yields the following sequence which we have started at index one
to make things clear:




0,0,2,30,444,7360,138690,2954364,70469000,1864204416,54224221050,1721080885480,59217131089908,2195990208122880,



This is OEIS A134362 where we find
confirmation of the above analysis as well as many useful links.



Finally note that this
MSE link I and this
MSE link II

may prove useful reading.


No comments:

Post a Comment

real analysis - How to find limhrightarrow0fracsin(ha)h

How to find limh0sin(ha)h without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...