暴力多项式全家桶

\(d\)\(F(x)\) 的次数。

多项式求逆

\[\begin{aligned} F(x)G(x) &= 1\\ \sum_{i=0}^d f_ig_{n-i} &= 0\\ g_n &= -\frac{\sum_{i=1}^d f_ig_{n-i}}{f_0}\\ g_0 &= \frac{1}{f_0} \end{aligned} \]

复杂度 \(O(nd)\)

多项式 \(\exp\)

\[\begin{aligned} G(x) &= e^{F(x)}\\ G'(x) &= F'(x)e^{F(x)}\\ G'(x) &= F'(x)G(x)\\ g_n &= \sum_{i=0}^{d-1} (i+1)f_{i+1}g_{n-i}\\ g_0 &= 1 \end{aligned} \]

复杂度 \(O(nd)\)

多项式 \(\ln\)

\[\begin{aligned} G(x) &= \ln{F(x)}\\ G'(x) &= \frac{F'(x)}{F(x)}\\ G'(x)F(x) &= F'(x)\\ \sum_{i=0}^d f_i (n-i) g_{n-i} &= n f_n\\ g_{n} &= f_{n} - \frac{1}{n}(n-i) g_{n-i}\\ g_0 &= 0 \end{aligned} \]

复杂度 \(O(nd)\)

多项式快速幂

\[\begin{aligned} G(x) &= F(x)^k\\ \ln G(x) &= k \ln F(x)\\ \frac{G'(x)}{G(x)} &= k \frac{F'(x)}{F(x)}\\ G'(x) F(x) &= k F'(x) G(x)\\ \sum_{i=0}^d f_i (n-i)g_{n - i} &= k\sum_{i=0}^{d - 1} (i+1)f_{i+1} g_{n-i-1}\\ n g_n &= k\sum_{i=0}^{d - 1} (i+1) f_{i+1} g_{n-i-1} - \sum_{i=1}^d f_i (n-i)g_{n - i}\\ g_n &= \frac{k\sum_{i=0}^{d - 1} (i+1) f_{i+1} g_{n-i-1} - \sum_{i=1}^d f_i (n-i)g_{n - i}}{n}\\ g_0 &= 1 \end{aligned} \]

复杂度 \(O(nd)\)

多项式开根

\[G(x) = F(x)^{\frac{1}{2}} \]

复杂度 \(O(nd)\)

posted @ 2023-02-13 11:16  APJifengc  阅读(86)  评论(2编辑  收藏  举报