wu-shi-yi-c

iorit發表於2024-03-07

五十一(C)

link

\(f_{t,i}\) 表示第 \(t\)\(x=i\) 的機率。有

\[f_{t,i}=\sum_{j=i}^n\frac1{j+1}f_{t-1,j} \]

\(F_t(x)=\sum_{i=0}^nf_{t,i}x^i\)。有

\[\begin{aligned} F_t(x)&=\sum_{i=0}^nf_{t,i}x^i\\ &=\sum_{i=0}^n\sum_{j=i}^n\frac1{j+1}f_{t-1,j}x^i\\ &=\sum_{j=0}^n\frac1{j+1}f_{t-1,j}\sum_{i=0}^jx^i\\ &=\sum_{j=0}^n\frac1{j+1}f_{t-1,j}\frac{x^{j+1}-1}{x-1}\\ \end{aligned}\]

利用定積分展開 \(\frac{x^{j+1}-1}{j+1}\)

\[\begin{aligned} F_t(x)&=\frac1{x-1}\sum_{j=0}^nf_{t-1,j}\int_{1}^xy^j\text{d}y\\ &=\frac1{x-1}\int_{1}^x\text{d}y\sum_{j=0}^nf_{t-1,j}y^j\\ &=\frac1{x-1}\int_{1}^xF_{t-1}(y)\text{d}y\\ \end{aligned}\]

\(1\)\(x\) 難以處理,設

\[\begin{aligned} G_t(x)&=F_t(x+1)\\ &=\frac1{x}\int_{1}^{x+1}F_{t-1}(y)\text{d}y\\ &=\frac1{x}\int_{0}^{x}G_{t-1}(y)\text{d}y\\ \end{aligned}\]

若設 \(G_t(x)=\sum_{i=0}^ng_{t,i}x^i\),則有

\[\begin{aligned} G_t(x)&=\frac1{x}\int_{0}^{x}\sum_{i=0}^ng_{t-1,i}y^i\text{d}y\\ G_t(x)&=\frac1{x}\sum_{i=0}^ng_{t-1,i}\frac{x^{i+1}}{i+1}\\ G_t(x)&=\sum_{i=0}^ng_{t-1,i}\frac{x^i}{i+1}\\ \end{aligned}\]

因此有 \(g_{t,i}=\frac1{i+1}g_{t-1,i}\),即 \(g_{t,i}=\frac{g_{0,i}}{(i+1)^t}\)

考慮求 \(g_0\),有

\[G_t(x)=F_t(x+1) \]

於是

\[\sum_{i=0}^ng_{t,i}x^i=\sum_{i=0}^nf_{t,i}(x+1)^i \]

展開

\[\begin{aligned} \sum_{i=0}^ng_{t,i}x^i &=\sum_{i=0}^nf_{t,i}\sum_{j=0}^ix^j\binom{i}{j}\\ &=\sum_{j=0}^nx^j\sum_{i=j}^nf_{t,i}\binom ij\\ \end{aligned}\]

因此

\[g_{t,i}=\sum_{j=i}^nf_{t,j}\binom ji \]

可以把組合數拆開,差卷積計算 \(g_0\)

求得 \(g_m\) 之後還要求 \(f_m\),有二項式反演

\[f_{t,i}=\sum_{j=i}^ng_{t,j}\binom ji(-1)^{j-i} \]

仍然是差卷積。