Link
Soluiton
令 (f_n) 表示 (n) 个点的连通无向图个数。
枚举连通块个数,然后递归定义
[f_n=sum_{igeq 0}frac{1}{i!}sum_{k_1+dots+k_i=n-1} inom{n-1}{k_1,dots,k_i}prod_{j=1}^{i} (2^{k_j}-1)f_{k_j}
]
在经过尝试之后,发现单独对 (f_n) 来递归定义 (hat F(x)) 非常不好做,因为每项系数总会多出一个 (2^x-1)。
考虑到这样递归定义必须考虑图的连通性,故而不太好做。转而想到直接计数无向图个数。我们令 (g_n=2^{inom{n}{2}}) 表示无向图个数,还是枚举连通块个数,则
[g_n=sum_{igeq 0}frac{1}{i!}sum_{k_1+dots+k_i=n} inom{n}{k_1,dots,k_i}prod_{j=1}^{i} f_{k_j}
]
[frac{g_n}{n!}=sum_{igeq 0}frac{1}{i!}sum_{k_1+dots+k_i=n} prod_{j=1}^{i} frac{f_{k_j}}{k_j!}
]
那么就有
[frac{g_n}{n!}=[x^n]sum_{igeq 0}frac{hat F(x)^i}{i!}=[x^n]e^{hat F(x)}
]
[hat G(x)=e^{hat F(x)}
]
所以
[hat F(x)=ln hat G(x)=lnsum_{ngeq 0} frac{2^{inom{n}{2}}}{n!} x^n
]