公式
二项式反演
\(\displaystyle f(n)=\sum\limits^n _ {i=0}(-1)^i\binom{n}{i}g(i)\iff g(n)=\sum\limits^n_{i=0}(-1)^i\binom{n}{i}f(i)\)
\(\displaystyle f(n)=\sum\limits^n_{i=0}\binom{n}{i}g(i)\iff g(n)=\sum\limits^n_{i=0}(-1)^{n-i}\binom{n}{i}f(i)\)
\(\displaystyle f(n)=\sum\limits^m_{i=n}\binom{i}{n}g(i)\iff g(n)=\sum\limits^m_{i=n}(-1)^{i-n}\binom{i}{n}f(i)\)
斯特林数
\(\displaystyle\begin{Bmatrix}n\\m\end{Bmatrix}=\sum\limits^{m}_ {i=0}\frac{(-1)^{m-i}i^n}{(m-i)!i!}\) 注意 \(0^0=1\)
\(\displaystyle\ x^n=\sum\limits^n_ {k=0}\begin{Bmatrix}n\\k\end{Bmatrix}x^{\underline{k}}=\sum\limits^n_{k=0}(-1)^{n-k}x^{\overline{k}}\)
\(\displaystyle j!\begin{Bmatrix}i\\j\end{Bmatrix}=\sum\limits^j_{k=0}(-1)^{j-k}\binom{j}{k}k^i\)
\(\displaystyle\begin{Bmatrix}n\\k\end{Bmatrix}=k\begin{Bmatrix}n-1\\k\end{Bmatrix}+\begin{Bmatrix}n-1\\k-1\end{Bmatrix}\)
\(\displaystyle\begin{bmatrix}n\\k\end{bmatrix}=(n-1)\begin{bmatrix}n-1\\k\end{bmatrix}+\begin{bmatrix}n-1\\k-1\end{bmatrix}\)
斯特林反演
\(\displaystyle f(n)=\sum\limits^n_{k=0}\begin{Bmatrix}n\\k\end{Bmatrix}g(k)\iff g(n)=\sum\limits^n_{k=0}(-1)^{n-k}\begin{bmatrix}n\\k\end{bmatrix}f(k)\)
Min-Max容斥
\(\displaystyle \max_k(S)=\sum\limits_{\varnothing\neq T\subset S}(-1)^{|T|-k}\binom{|T|-1}{k-1}\min(T)\)
\(\displaystyle E(\max_k(S))=\sum\limits_{\varnothing\neq T\subset S}(-1)^{|T|-k}\binom{|T|-1}{k-1}E(\min(T))\)
拉格朗日插值
对于由 \(n\) 个点确定的 \(n-1\) 次多项式
\(\displaystyle f(k)=\sum\limits^n_{i=1}y_i\prod\limits_{i\neq j}\displaystyle\frac{k-x_j}{x_i-x_j}\)
下降幂
\((x+1)^{\underline{i}}=x^{\underline{i}}+i* x^{\underline{i-1}}\)
lagrange 反演
对于多项式 \(F(G(x))=x,[x^0]F(x)=[x^0]G(x)=0,[x^1]F(x)\neq 0,[x^1]G(x)\neq 0\) , 有 \(\displaystyle [x^n]G(x)=\frac{1}{n}[x^{n-1}](\frac{x}{F(x)})^n\), 同时该式中的 \(F,G\) 可交换 .
Catalan 数
\(Cat_{n+1}=\sum\limits_{2m\leq n}\binom n{2m}2^{n-2m}Cat_m\)
yy
对于正整数 \(n\geq k\) , 有 \(\sum\limits_{i=0}^{n-k}(-1)^i\binom{n-k}{i}\frac{1}{k+i+1}=\frac{k}{n+1}\) , \(n\) 个 \([0,1]\) 中连续随机变量
\(\sum\limits_{i\geq0}x^i\frac{(t+i)!}{i!}=(\frac{1}{1-x})^{t+1}t!\) , 泰勒展开逆推
\(\sum\limits_{i=m}^n(-1)^i\binom{n+1}{i+1}=(-1)^m\binom nm\)