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 (n−1)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)=explog11−T(z)=11−T(z).
In this particular case we have that there are no
fixed points or two-cycles so we get the species
Q=P(C≥3(T)).
This yields the generating function
Q(z)=exp(−T(z)−T(z)2/2)11−T(z).
Extracting coefficients via poor man's Lagrange inversion we have
Qn=n!12πi∫|z|=ϵ1zn+1exp(−T(z)−T(z)2/2)11−T(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(−w−w2/2)1−w(exp(−w)−wexp(−w))dw=n!12πi∫|w|=ϵexp(wn)wn+1exp(−w−w2/2)1−w(1−w)dw=n!12πi∫|w|=ϵexp(w(n−1)−w2/2)wn+1dw.
Extracting coefficients from this we obtain the closed formula
n!⌊n/2⌋∑q=0(−1)q2q×q!(n−1)n−2q(n−2q)!.
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