题解

disangan233 2020-07-22 11:06:26

修订扩充自 @yfzcsc 的官方题解。

a_k(n) 为答案,有

a_k(n)=\sum_{j=1}^n \binom {n-1}{j-1} \sum_{2r+s=k-1} (a_{2r}(j-1)+a_{2r+1}(j-1))a_s(n-j)

F_k(x) a_k(x) 的 EGF,式子可以化为

F_k'(x)=\sum_{2r+s=k-1}(F_{2r}(x)+F_{2r+1}(x))F_s(x)

A(x,t)=\sum_{n,k\geq 0} a_k(n)\frac {x^n}{n!}t^k A_1(x,t)=\sum_{k\geq 0}F_{2k}(x)t^{2k} A_2(x,t)=\sum_{k\geq 0}F_{2k+1}(x)t^{2k+1} ,有

A_1(x,t)=\frac 12(A(x,t)+A(x,-t)) \qquad A_2(x,t)=\frac 12(A(x,t)-A(x,-t))

\frac {\partial A(x,t)}{\partial x}=\frac {t+1}4(A^2(x,t)+A^2(x,-t)) \qquad \frac {\partial A(x,-t)}{\partial x}=\frac {t+1}4A(x,t)A(x,-t)

可得

\frac {\partial A_1}{\partial x} = tA_1A_2+A_1^2 \qquad \frac {\partial A_2}{\partial x}=tA_1^2+A_1A_2

那么有

\frac {\partial(A_1^2-A_2^2)}{\partial x}=0

所以可得

A_1^2(x,t)-A_2^2(x,t)=1

b_k(x)=\sum_{j\leq k}a_k(x) B_k 为其 EGF,解一下可得

A(x,t)=(1-t)B(x,t) \qquad B(x,t)= \frac {\frac 2\rho}{1-\frac {1-\rho}te^{\rho x}} - \frac 1{\sqrt{1-t^2}}

其中 \rho=\sqrt{1-t^2} 。证明如下:

\frac {\partial A}{\partial x} = (tA_1+A_2)(A_1+A_2)=\frac 12 (tA+\frac tA+A-\frac 1A)

可得

\begin{aligned} &\frac {\partial A}{A((t+1)A+\frac {t-1}A)} = \frac{\partial x}2 = \frac {\partial B}{(1-t^2)B^2-1} \\ &\partial(\rho B)(\frac 1{\rho B -1}-\frac 1{\rho B+1}) = \rho \partial x \\ &\log \frac {\rho B-1}{\rho B+1}=\rho x +C(t) \end{aligned}

所以可得

\frac {\rho B-1}{\rho B+1} = C(t)e^{\rho x} \Rightarrow B =\frac {1+C(t)e^{\rho x}}{\rho(1-C(t)e^{\rho x})}

其中

C(t)=\frac {\frac {\rho}{1-t}-1}{\frac {\rho}{1-t}+1}

证毕。


考虑一个结论

b_k(n)=\frac 1{2^k-1}\sum_{r+2s\leq k,r\equiv k \pmod 2} (-2)^s \binom {k-s}{\frac {k+r}2}\binom ns r^n

证明如下

\begin{aligned} B(x,t) &= \frac 2{\rho}\left(1-\frac{1-\rho}te^{\rho x}\right)^{-1} \\ &= \frac 2{\rho} \sum_r\left(\frac{1-\rho}te^{\rho x}\right)^re^{-r(1-\rho)x} \\ &= \frac 2{\rho} \sum_r\left(\frac{1-\rho}te^{\rho x}\right)^r \sum_s \frac{(-r(1-\rho)x)^s}{s!} \\ &= \frac 2{\rho} \sum_{r,s\geq 0} \left(\frac t2\right)^r \frac {(-rt^2\frac x2)^s}{s!}e^{rx}\left(\frac {2-2\rho}{t^2}\right)^{r+s} \\ &= 2\sum_{r,s\geq 0} \left(\frac t2\right)^r \frac {(-rt^2\frac x2)^s}{s!} \left[\sum_l\binom {r+s+2l}l\left(\frac {t^2}4\right)^l\right]\left[\sum_m\frac {(rx)^m}{m!}\right] \\ &= \sum_{r,s,l,m}(-1)^s2^{1-r-s-2l}\binom {r+s+2l}{r+s+l}\binom {s+m}s r^{s+m}t^{r+2s+2l} \binom {s+m}s r^{s+m}t^{r+2s+2l}\frac {x^{s+m}}{(s+m)!} \end{aligned}

n=s+m k=r+2s+2l 即可。

证明的其他部分都是一些基础技巧,主要难点是倒数第二步的

\left(\frac {2-2\rho}{t^2}\right)^n=\sum_i\binom {n+2i}i\left(\frac {t^2}4\right)^i

可以发现原式可以化成

\frac 1{\sqrt{1-4x}}\left(\frac {1-\sqrt{1-4x}}{2x}\right)^m = \sum_{i=0}^\infty \binom {n+2i}i x^i

具体可以参考《具体数学》公式 5.72,来自 1838 年一个广义二项式级数的 paper。

这里是来自 EI 的证明

prove


枚举 r ,接下来的问题就是快速算

g_k (x) = \sum_s(-2)^s \binom ns \binom {k-s}x

可以证明

g_k(x)=-\frac 1x((2n-x)g_k(x-1)+(k-x+2)g_k(x-2))

n=k 时显然,由 g_k (x) = g_{k−1}(x − 1) + g_{k−1}(x) 归纳即可。

O(k) 递推 g_k ,计算快速幂即可,时间复杂度 O(k \log n) O(k)

共 3 条回复

happydef

前排%dsg

Gabniel_Irrational

前排膜拜

wzp

前排摩拜