设 f i f_i fi为 i i i个点的有标号 D A G \rm DAG DAG数量。
枚举有 j j j个点使其入度为 0 0 0的 D A G \rm DAG DAG数量:
g j = ( i j ) 2 j ( i − j ) f i − j g_j = \binom ij 2^{j(i-j)} f_{i-j} gj=(ji)2j(i−j)fi−j
设恰好有 j j j个点入度为 0 0 0的 D A G \rm DAG DAG数量为 h j h_j hj
有 g k = ∑ j = k i ( j k ) h j g_k = \sum_{j=k}^i\binom jk h_j gk=∑j=ki(kj)hj
二项式反演即可得到 h k = ∑ j = k i ( − 1 ) j − k ( j k ) g j h_k = \sum_{j=k} ^i (-1)^{j-k} \binom jk g_j hk=∑j=ki(−1)j−k(kj)gj
所以 f i = ∑ j = 1 i h i = ∑ j = 1 i ∑ k = j i ( − 1 ) k − j ( k j ) g k f_i = \sum_{j=1}^i h_i = \sum_{j=1}^i \sum_{k=j}^i (-1)^{k-j} \binom kj g_k fi=∑j=1ihi=∑j=1i∑k=ji(−1)k−j(jk)gk
= ∑ k = 1 i g k ∑ j = 1 k ( − 1 ) k − j ( k j ) =\sum_{k=1}^i g_k \sum_{j=1}^k (-1)^{k-j} \binom kj =∑k=1igk∑j=1k(−1)k−j(jk)
= ∑ k = 1 i g k ( [ k = 0 ] − ( − 1 ) k ( k 0 ) ) =\sum_{k=1}^i g_k \left([k=0] - (-1)^k \binom k0\right) =∑k=1igk([k=0]−(−1)
有标号DAG计数
最新推荐文章于 2020-08-28 00:36:07 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)