带标号的连通图计数

带标号连通图计数。统计有n(n<=50)个顶点的连通图有多少个。图的顶点有编号。例如n=3时有4个不同的图,n=4时有38个图,n=5时有728个图,n=6时有26704个图。

分析:设f(n)为所求答案,g(n)为有n个顶点的非连通图,则f(n)+g(n)=h(n)=2^n*(n-1)/2。g(n)可以这样计算:先考虑1所在连通分量包含那些顶点。假设该连通分量有k个点,就有C(n-1,k-1)种集合。确定点集后,1所在连通分量有f(k)种情况,其他连通分量有h(n-k)种情况,因此有递推公式:g(n)=sum{C(n-1,k-1)*f(k)*h(n-k)|k=1...n-1}。注意每次计算出g(n)后应立刻算出f(n)和h(n),时间复杂度为O(n*n)(不考虑高精度)。

数列为:1,1,1,4,38,728,26704,1866256,251548592,...。在OEIS中编号为A001187。

A001187

 

Number of connected labeled graphs with n nodes. 
(Formerly M3671 N1496)

 

44

 

 

1, 1, 1, 4, 38, 728, 26704, 1866256, 251548592, 66296291072, 34496488594816, 35641657548953344, 73354596206766622208, 301272202649664088951808, 2471648811030443735290891264, 40527680937730480234609755344896 (listgraphrefslistenhistorytextinternal format)

 

 

OFFSET

0,4

 

COMMENTS

"Based on experimental data obtained using the software LattE [14] and the Online Encyclopedia of Integer Sequences [19], we make the following conjecture: Conjecture 11. For j >= 2, Vol(C_j ) is equal to the number of labeled connected graphs on j - 1 vertices." [Beck et al., 2011]

For n > 1, a(n) is log-convex. Furthermore, a(n+1)*a(n-1) ~ 2*a(n)*a(n). - Ran Pan, Oct 28 2015

 

REFERENCES

Miklos Bona, Handbook of Enumerative Combinatorics, CRC Press, 2015, p. 398-402.

D. G. Cantor, personal communication.

Cowan, D. D.; Mullin, R. C.; Stanton, R. G. Counting algorithms for connected labelled graphs. Proceedings of the Sixth Southeastern Conference on Combinatorics, Graph Theory, and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1975), pp. 225-236. Congressus Numerantium, No. XIV, Utilitas Math., Winnipeg, Man., 1975. MR0414417 (54 #2519).

J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 518.

F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 7.

N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 5.2.1.

H. S. Wilf, Generatingfunctionology, Academic Press, NY, 1990, p. 78.

 

LINKS

T. D. Noe, Table of n, a(n) for n = 0..50

Matthias Beck, Benjamin Braun and Nguyen Le, Mahonian partition identities via polyhedral geometry, arXiv:1103.1070 [math.NT], 2011.

Huantian Cao, AutoGF: An Automated System to Calculate Coefficients of Generating Functions.

Patrick De Causmaecker, Stefan De Wannemacker, On the number of antichains of sets in a finite universe, arXiv:1407.4288 [math.CO], 2014.

P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009; see page 138

E. N. Gilbert, Enumeration of labelled graphs, Canad. J. Math., 8 (1956), 405-411.

E. N. Gilbert, Enumeration of labelled graphs (Annotated scanned copy)

M. Konvalinka and I. Pak, Cayley compositions, partitions, polytopes, and geometric bijections.

Albert Nijenhuis and Herbert S. Wilf, The enumeration of connected graphs and linked diagrams, J. Combin. Theory Ser. A 27 (1979), no. 3, 356--359. MR0555804 (82b:05074)

J. Novak, Three lectures on free probability, arXiv preprint arXiv:1205.2097 [math.CO], 2012.

R. W. Robinson, First 50 terms of A1187 and A1188

N. J. A. Sloane, Transforms

Eric Weisstein's World of Mathematics, Connected Graph.

Eric Weisstein's World of Mathematics, Labeled Graph.

H. S. Wilf, Generatingfunctionology, 2nd edn., Academic Press, NY, 1994, p. 87, Eq. 3.10.2.

 

FORMULA

n*2^binomial(n, 2) = Sum_k binomial(n, k)*k*a(k)*2^binomial(n-k, 2).

E.g.f.: 1 + log( sum( 2^binomial(n, 2) * x^n / n!, n=0..infinity) ). - Michael Somos, Jun 12 2000

 

EXAMPLE

E.g.f.: 1 + x + x^2/2! + 4*x^3/3! + 38*x^4/4! + 728*x^5/5! + 26704*x^6/6! + 1866256*x^7/7! + 251548592*x^8/8! + ...

 

MAPLE

t1 := 1+log( add(2^binomial(n, 2)*x^n/n!, n=0..30)): t2 := series(t1, x, 30): A001187:= n->n!*coeff(t2, x, n);

# second Maple program:

a:= proc(n) option remember; `if`(n=0, 1, 2^(n*(n-1)/2)-

      add(k*binomial(n, k)* 2^((n-k)*(n-k-1)/2)*a(k), k=1..n-1)/n)

    end:

seq(a(n), n=0..20);  # Alois P. Heinz, Aug 26 2013

 

MATHEMATICA

g = Sum[2^Binomial[n, 2] x^n/n!, {n, 0, 20}]; Range[0, 20]! CoefficientList[Series[Log[g] + 1, {x, 0, 20}], x] (* Geoffrey Critzer, Nov 12 2011*)

a[n_] := a[n] = If[n == 0, 1, 2^(n*(n-1)/2) - Sum[k*Binomial[n, k]* 2^((n-k)*(n-k-1)/2)*a[k], {k, 1, n-1}]/n]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Apr 09 2014, after Alois P. Heinz *)

 

PROG

(PARI) {a(n) = if( n<0, 0, n! * polcoeff( 1 + log( sum( k=0, n, 2^binomial(k, 2) * x^k / k!, x * O(x^n))), n))} \ Michael Somos, Jun 12 2000

(Sage)

@cached_function

def A001187(n):

    if n == 0: return 1

    return 2^(n*(n-1)/2)- sum(k*binomial(n, k)*2^((n-k)*(n-k-1)/2)*A001187(k) for k in (1..n-1))/n

[A001187(n) for n in (0..15)] # Peter Luschny, Jan 17 2016

 

CROSSREFS

Logarithmic transform of A006125 (labeled graphs). Cf. A053549.

Row sums of triangle A062734.

Sequence in context: A084284 A084285 A084286 * A093377 A178017 A131591

Adjacent sequences:  A001184 A001185 A001186 * A001188 A001189 A001190

 

KEYWORD

nonn,nice,easy

 

AUTHOR

N. J. A. Sloane

 

STATUS

approved

 

原文地址:https://www.cnblogs.com/cyb123456/p/5804351.html