## 离散变换与反演

$P_n=n!=\sum_{k=0}^n \dbinom{n}{k}D_{n-k} \tag{*}$

$D_n=n!\sum_{r=0}^n{(-1)^r \frac{1}{r!}} \tag{**}$

\begin{aligned} & a_n=\sum_{k=0}^n \dbinom{n}{k}b_k \\ & b_n=\sum_{k=0}^n (-1)^{n-k}\dbinom{n}{k} a_k \end{aligned} \tag{1}

\begin{aligned} & P_n=\sum_{k=0}^n \dbinom{n}{k}D_{n-k}=\sum_{k=0}^n\dbinom{n}{k}D_k \\ & D_n=\sum_{k=0}^n (-1)^{n-k}\dbinom{n}{k} P_k = \sum_{k=0}^n (-1)^{n-k}\dfrac{n!}{(n-k)!}=n!\sum_{k=0}^n(-1)^k\frac{1}{k!} \end{aligned}

$\begin{cases} p_k(x)=\sum_{i=0}^k \alpha_{i,k}q_i(x) \\q_k(x)=\sum_{i=0}^k \beta_{i,k}p_i(x) \end{cases} (k=0,1,2,\cdots,n)$

$\begin{cases} f(k)=\sum_{i=0}^k \alpha_{i,k} g(i) \\g(k)=\sum_{i=0}^k \beta_{i,k} f(i) \end{cases} \tag{S}$

$\begin{cases} a_n=\sum_{k=0}^n \dbinom{n}{k} b_k \\b_n=\sum_{k=0}^n (-1)^{n-k}\dbinom{n}{k}a_k \end{cases} \tag{1}$

$\begin{cases} a_n=\sum_{k=n}^\infty \dbinom{n}{k} b_k \\b_n=\sum_{k=n}^\infty (-1)^{n-k}\dbinom{n}{k} a_k \end{cases} \tag{2}$
$\begin{cases} a_n=\sum_{k=0}^n \dbinom{n+p}{k+p} b_k \\b_n=\sum_{k=0}^n (-1)^{n-k}\dbinom{n+p}{k+p} a_k \end{cases} \tag{3}$
$\begin{cases} a_n=\sum_{k=n}^\infty \dbinom{n+p}{k+p} b_k \\b_n=\sum_{k=n}^\infty (-1)^{n-k}\dbinom{n+p}{k+p} a_k \end{cases} \tag{4}$

$\begin{cases} a_n=\sum_{k=0}^n s(n,k) b_k \\ b_n=\sum_{k=0}^n S(n,k) a_k \end{cases} \tag{5}$

## Mobius 反演

• 自反。$$\forall a \in X , a \leq a$$
• 反对称。如果对于两个不同元素$$a ,b$$ 有$a \leq b$ ，就一定不满足 $$b \leq a$$
• 传递。如果对于三个不同元素$$a,b,c$$$$a\leq b,b \leq c$$，则一定有$$a \leq c$$

$\mu(x,y)= \begin{cases} 1 & x=y \\ -\sum\limits_{x \leq u < y} \mu(x,u) & x<y \\ 0 & else \end{cases}$

$$f(x)$$$$g(x)$$$$X$$上的整数函数，则以下两式可逆：
\begin{aligned} & f(x)=\sum_{0 \leq u \leq x} g(u) \\ & g(x)=\sum_{0 \leq u \leq x} \mu(u,x) f(u) \end{aligned}

\begin{aligned} & f(x)=\sum_{1 | d || x} g(d) \\ & g(x)=\sum_{1 | d || x} \mu(d,x) f(d) \end{aligned}

$\mu(x,y)= \begin{cases} 1 & x=y \\ -\sum\limits_{x | u || y} \mu(x,u) & x||y \\ 0 & else \end{cases}$

\begin{aligned} \mu(1,p_1\cdots p_k)&= -\mu(1,1)- \sum_{i=1}^k \mu(1,p_i) - \sum_{1 \leq i_1 < i_2 \leq k}\mu(1,p_{i_1}p_{i_2})- \cdots \\ & = -\sum_{i=0}^{k-1}(-1)^{i}\dbinom{k}{i} \\ & = -\sum_{i=0}^{k}(-1)^{i}\dbinom{k}{i} + (-1)^k \dbinom{k}{k} \\ & = (-1)^{k} \end{aligned}

$$\mu(1,p_1P^2)=-\sum_{i=0}^2 \mu(1,P^i) - \mu(1,p_1) - \mu(1,p_1P) = 0$$
$$\mu(1,p_1P^3)=-\sum_{i=0}^3 \mu(1,p_i) - \mu(1,p_1) - \mu(1,p_1P) - \mu(1,p_1P^2) = 0$$
$\vdots$

$$\mu(1,p_1p_2P^2)=-\sum_{i=0}^2 \mu(1,P^i) - \mu(1,p_1)-\mu(1,p_1P)-\mu(1,p_1P^2) -\mu(1,p_2)-\mu(1,p_2P)- \cdots$$
$$= 0-0-0- \mu(1,p_1p_2) -\mu(1,p_1p_2P) = 0$$

$\mu(1,n)= \begin{cases} 1 & n=1 \\ (-1)^k & n=p_1\cdots p_k \\ 0 & else \end{cases}$

$$x || y$$时，我们注意到 $\mu(x,y)=-\sum_{x | d || y} \mu(x,u)$。比对 $$\mu(1,\frac{y}{x}) = -\sum_{1 | d || \frac{y}{x}} \mu(1,d)$$ ，这里的求和变量 $$d$$ 的合法个数是相同的。也就是说，满足 $$x | d || y$$$$d$$ 的个数和 $$d || \frac{y}{x}$$ 是相同的。而如果我们把这个递归的式子全部展开，那么答案就是若干个$$-1,1,0$$的和。而由于$$d$$的数量是相同的，最终展开得到的$$-1,1,0$$的个数也是相同的，答案应该也是相同的。

\begin{aligned} & f(x)=\sum_{d | x} g(d) \\ & g(x)=\sum_{d | x} \mu(\frac{x}{d}) f(d) \end{aligned}

$\mu(n)= \begin{cases} 1 & n=1 \\ (-1)^k & n=p_1\cdots p_k \\ 0 & else \end{cases}$

$\mu(B,A) = \begin{cases} (-1)^{|A|-|B|} & B \subseteq A \\ 0 & else \end{cases}$

\begin{aligned} & f(A)=\sum_{H \subseteq A} g(H) \\ & g(B)=\sum_{H \subseteq B} (-1)^{|B|-|H|}f(H) \end{aligned}

0条评论