欧拉数学习笔记

求法

• 如果$n$加在排列最左边，数目不变，由$\left<\begin{matrix}{n-1}\\i\end{matrix}\right>$转移
• 如果$n$加在排列最左边，数目增加，由$\left<\begin{matrix}{n-1}\\{i-1}\end{matrix}\right>$转移
• 插在某个$p_j<p_{j+1}$中间，数目不变，由$\left<\begin{matrix}{n-1}\\{i}\end{matrix}\right>\times i$转移
• 插在某个$p_j>p_{j+1}$中间，数目增加，由$\left<\begin{matrix}{n-1}\\{i-1}\end{matrix}\right>\times (n-1-i)$转移

$\left<\begin{matrix}n\\i\end{matrix}\right>=(i+1)\left<\begin{matrix}n-1\\i\end{matrix}\right>+(n-i)\left<\begin{matrix}n-1\\i-1\end{matrix}\right>$

$\begin{vmatrix}n\\k\end{vmatrix}$表示长度为$n$的排列，至少有$k$$p_j<p_{j+1}$的方案数。

$\begin{vmatrix}n\\k\end{vmatrix}=\sum\limits_{i=k}^n\dbinom ik\left<\begin{matrix}n\\i\end{matrix}\right>\\ \left<\begin{matrix}n\\k\end{matrix}\right>=\sum\limits_{i=k}^n(-1)^{i-k}\dbinom ik\begin{vmatrix}n\\i\end{vmatrix}$

\begin{aligned} n![x^n](e^x-1)^{n-k}&=n![x^n]\sum_{i=0}^{n-k}{n-k\choose i}e^{ix}(-1)^{n-k-i}\\ &=\sum_{i=0}^{n-k}{n-k\choose i} i^n (-1)^{n-k-i}\\ &=(n-k)! \sum_{i=0}^{n-k}\frac {i^n}{i!}\frac{(-1)^{n-k-i}}{(n-k-i)!} \end{aligned}

$\begin{vmatrix}n\\k\end{vmatrix}=\sum_{i=0}^{n-k}{n-k\choose i} i^n (-1)^{n-k-i}$直接代回$\left<\begin{matrix}n\\k\end{matrix}\right>=\sum\limits_{i=k}^n(-1)^{i-k}\dbinom ik\begin{vmatrix}n\\i\end{vmatrix}$，那么有

\begin{aligned} \left<\begin{matrix}n\\k\end{matrix}\right>&=\sum\limits_{i=k}^n(-1)^{i-k}\dbinom ik\begin{vmatrix}n\\i\end{vmatrix}\\ &=\sum_{i=k}^n(-1)^{i-k}{i\choose k}\sum_{j=0}^{n-i}{n-i\choose j}j^n(-1)^{n-i-j}\\ &=\sum_{i=k}^n{i\choose k}\sum_{j=0}^{n-i}{n-i\choose j}j^n(-1)^{n-k-j}\\ &=\sum_{j=0}^{n-k}\sum_{i=n-j}^n{i\choose k}{n-i\choose j}j^n(-1)^{n-k-j}\\ &=\sum_{j=0}^{n-k}(-1)^{n-k-j}j^n\sum_{i=0}^n{i\choose k}{n-i\choose j} \end{aligned}

${i\choose k}=[x^{i-k}]\frac {1}{(1-x)^{k+1}},{n-i\choose j}=[x^{n-i-j}]\frac {1}{(1-x)^{j+1}}\\ \Rightarrow \sum_{i=0}^n{i\choose k}{n-i\choose j}=[x^{n-j-k}]\frac 1{(1-x)^{k+j+2}}={n+1\choose k+j+1}$

应用

CF1349F1 Slime and Sequences (Easy Version)

$ans_k=\sum\left<\begin{matrix}n\\k-1\end{matrix}\right>{n\choose i}(n-i)!$

posted @ 2020-10-29 10:21  heyujun  阅读(455)  评论(8编辑  收藏  举报