E x p Exp Exp的组合意义与 E u l e r Euler Euler变换
根据泰勒展开, exp ( f ( X ) ) = ∑ i = 0 ∞ f i ( X ) i ! \exp(f(X))=\sum_{i=0}^{\infty}\frac{f^i(X)}{i!} exp(f(X))=∑i=0∞i!fi(X)
设 F ( X ) = exp ( f ( X ) ) F(X)=\exp(f(X)) F(X)=exp(f(X))
注意 f 0 = 0 f_0=0 f0=0
f f f表示集合内部的分配方案数关于集合大小的EGF, F F F表示有标号小球分为若干个不能为空的无标号集合的总方案数关于小球总数的EGF
设 G n , m G_{n,m} Gn,m为将 m m m个有标号元素分为 n n n个无标号集合的总方案数, g n g_n gn为大小为 i i i的集合内部的方案数
G n , m = ∑ i = 1 m − n + 1 C m i G n − 1 , m − i × g i × 1 n ! G_{n,m}=\sum_{i=1}^{m-n+1}C_{m}^iG_{n-1,m-i}\times g_{i}\times \frac{1}{n!} Gn,m=i=1∑m−n+1CmiGn−1,m−i×gi×n!1
= ∑ i = 0 m C m i G n − 1 , m − i g i × 1 n ! =\sum_{i=0}^{m}C_{m}^iG_{n-1,m-i}g_i\times \frac{1}{n!} =i=0∑mCmiGn−1,m−igi×n!1
= ∑ i = 0 m m ! × G n − 1 , m − i ( m − i ) ! × g i i ! × 1 n ! =\sum_{i=0}^mm!\times\frac{G_{n-1,m-i}}{(m-i)!}\times\frac{g_i}{i!}\times \frac{1}{n!} =i=0∑mm!×(m−i)!Gn−1,m−i×i!gi×n!1
对 G n , g G_n,g Gn,g分别构造 E G F EGF EGF,设为 F n , f F_n,f Fn,f
F n = 1 n ! F n − 1 × f F_n=\frac{1}{n!}F_{n-1}\times f Fn=n!1Fn−1×f
= f n n ! =\frac{f^n}{n!} =n!fn
= exp f =\exp f =expf
将 E x p Exp Exp的组合意义中的有标号元素换成无标号元素就得到了 E u l e r Euler Euler变换
e u l e r ( F ( X ) ) = ∏ i 1 ( 1 − x i ) f i euler(F(X))=\prod_{i}\frac{1}{(1-x^i)^{f_i}} euler(F(X))=i∏(1−xi)fi1
大小为 i i i的每种内部方案都可以选若干个,每种内部方案的 O G F OGF OGF都为 1 ( 1 − x i ) \frac{1}{(1-x^i)} (1−xi)1
设 G ( x ) = e u l e r ( F ( x ) ) G(x)=euler(F(x)) G(x)=euler(F(x))
两边取 ln \ln ln
ln G ( x ) = − ∑ i f i ln ( 1 − x i ) \ln G(x)=-\sum_{i}f_i\ln (1-x^i) lnG(x)=−i∑filn(1−xi)
根据傅公主的背包中的套路,两边求导
G ′ ( x ) G ( x ) = − ∑ i f i − i x i − 1 1 − x i \frac{G'(x)}{G(x)}=-\sum_{i}f_i\frac{-ix^{i-1}}{1-x^i} G(x)G′(x)=−i∑fi1−xi−ixi−1
= ∑ i f i i x i − 1 ∑ j = 0 ∞ x i j =\sum_{i}f_iix^{i-1}\sum_{j=0}^{\infty}x^{ij} =i∑fiixi−1j=0∑∞xij
= ∑ i = 0 ∞ f i ∑ j = 0 ∞ i x i ( j + 1 ) − 1 =\sum_{i=0}^{\infty}f_i\sum_{j=0}^{\infty}ix^{i(j+1)-1} =i=0∑∞fij=0∑∞ixi(j+1)−1
= ∑ i = 0 ∞ f i ∑ j = 1 ∞ i x i j − 1 =\sum_{i=0}^{\infty}f_i\sum_{j=1}^{\infty}ix^{ij-1} =i=0∑∞fij=1∑∞ixij−1
再积分回来
ln G ( x ) = ∑ i = 0 ∞ f i ∑ j = 1 ∞ i x i j i j \ln G(x)=\sum_{i=0}^{\infty}f_i\sum_{j=1}^{\infty}\frac{ix^{ij}}{ij} lnG(x)=i=0∑∞fij=1∑∞ijixij
= ∑ i = 0 ∞ f i ∑ j = 1 ∞ x i j j =\sum_{i=0}^{\infty}f_i\sum_{j=1}^{\infty}\frac{x^{ij}}{j} =i=0∑∞fij=1∑∞jxij
交换求和顺序
= ∑ j = 1 ∞ 1 j ∑ i = 0 ∞ f i ( x j ) i =\sum_{j=1}^{\infty}\frac{1}{j}\sum_{i=0}^{\infty}f_i(x^{j})^i =j=1∑∞j1i=0∑∞fi(xj)i
= ∑ j = 1 ∞ F ( x j ) j =\sum_{j=1}^{\infty}\frac{F(x^j)}{j} =j=1∑∞jF(xj)
再 E x p Exp Exp回来
G ( x ) = exp ( ∑ i = 1 F ( x i ) i ) G(x)=\exp(\sum_{i=1}\frac{F(x^i)}{i}) G(x)=exp(i=1∑iF(xi))