# 二项式反演学习笔记

$f(n) = \sum_{i = 0}^{n} (-1)^{i}\binom{n}{i}g(i) \Leftrightarrow g(n) = \sum_{i = 0}^{n} (-1)^{i} \binom{n}{i}f(i)$

$f(n) = \sum_{i = 0}^{n}\binom{n}{i}g(i) \Leftrightarrow g(n) = \sum_{i = 0}^{n} (-1)^{n - i} \binom{n}{i} f(i)$

$f(n) = \sum_{i = 0}^{n} (-1)^{i}\binom{n}{i}g(i)$
$f(n) = \sum_{i = 0}^{n} (-1)^{i}\binom{n}{i}\sum_{j = 0}^{i} (-1)^{j} \binom{i}{j} f(j)$

$f(n) = \sum_{j = 0}^{n} \sum_{i = j}^{n} (-1)^{i + j} \binom{n}{i} \binom{i}{j} f(j)$

$\sum_{j = 0}^{n} \sum_{i = j}^{n} (-1)^{i + j} \binom{n}{i} \binom{i}{j}$值为1的话，那么式子是成立的
（虽然在别的情况下例如加加减减之后也是f(n)但是这个式子就是有这样特殊的性质）
$\binom{n}{i} \binom{i}{j} = \frac{n!}{i!(n - i)!}\cdot\frac{i!}{j!(i - j)!} = \frac{n!}{(n - j)!j!}\cdot\frac{(n-j)!}{(n - i)![(n - i) - (n - j)]!} = \binom{n}{j}\binom{n - j}{n - i}$
$\sum_{j = 0}^{n} \sum_{i = j}^{n} (-1)^{2 * n - i - j} \binom{n}{j}\binom{n - j}{n - i}$
$\sum_{j = 0}^{n} (-1)^{j} \binom{n}{j}\sum_{i = j}^{n} (-1)^{n - i}\binom{n - j}{n - i}$
$\sum_{j = 0}^{n} (-1)^{n - j} \binom{n}{j}\sum_{i = 0}^{n - j} (-1)^{i}\binom{n - j}{i}$

$\sum_{j = 0}^{n} (-1)^{j} \binom{n}{j}[n == j]$

$f(n) = \sum_{i = 0}^{n} (-1)^{i}\binom{n}{i}\sum_{j = 0}^{i} (-1)^{i - j} \binom{i}{j} f(j)$
$\sum_{j = 0}^{n} \sum_{i = j}^{n} (-1)^{i - j} \binom{n}{i} \binom{i}{j}$
$\sum_{j = 0}^{n} \sum_{i = j}^{n} (-1)^{2 * n - i + j} \binom{n}{j}\binom{n - j}{n - i}$
$\sum_{j = 0}^{n} (-1)^{n + j} \binom{n}{j}\sum_{i = j}^{n} (-1)^{n - i}\binom{n - j}{n - i}$
$\sum_{j = 0}^{n} (-1)^{n + j} \binom{n}{j}[n == j]$

$f(k) = \sum_{i = k}^{n} (-1)^{i}\binom{i}{k}g(i) \Leftrightarrow g(k) = \sum_{i = k}^{n} (-1)^{i} \binom{i}{k}f(i)$

$f(k) = \sum_{i = k}^{n} \binom{i}{k}g(i) \Leftrightarrow g(k) = \sum_{i = k}^{n} (-1)^{i - k} \binom{i}{k}f(i)$

$f(k) = \sum_{i = k}^{n} (-1)^{i}\binom{i}{k}g(i)$
$f(k) = \sum_{i = k}^{n} (-1)^{i}\binom{i}{k} \sum_{j = i}^{n} \binom{j}{i} f(j)$
$f(k) = \sum_{i = k}^{n} (-1)^{i}\binom{i}{k} \sum_{j = i}^{n} (-1)^{j} \binom{j}{i} f(j)$
$f(k) = \sum_{j = k}^{n} \sum_{i = k}^{j} (-1)^{i + j}\binom{i}{k} \binom{j}{i} f(j)$
$\binom{i}{k}\binom{j}{i} = \frac{i!}{k!(i - k)!}\frac{j!}{i!(j - i)!} = \frac{j!}{k!(j - k)!}\frac{(j - k)!}{(i - k)![(j - k) - (i - k)]!} = \binom{j}{k}\binom{j - k}{i - k}$
$f(k) = \sum_{j = k}^{n} \sum_{i = k}^{j} (-1)^{i + j - 2*k}\binom{j}{k}\binom{j - k}{i - k}$
$f(k) = \sum_{j = k}^{n} (-1)^{j - k}\binom{j}{k}\sum_{i = k}^{j} (-1)^{i - k}\binom{j - k}{i - k}$
$f(k) = \sum_{j = k}^{n} (-1)^{j - k}\binom{j}{k}\sum_{i = 0}^{j - k} (-1)^{i}\binom{j - k}{i}$
$f(k) = \sum_{j = k}^{n} (-1)^{j - k}\binom{j}{k}[k == j]$

$f(k) = \sum_{j = k}^{n} \sum_{i = k}^{j} (-1)^{j - i}\binom{i}{k} \binom{j}{i} f(j)$
$f(k) = \sum_{j = k}^{n} \sum_{i = k}^{j} (-1)^{j - i - k + k}\binom{j}{k}\binom{j - k}{i - k} f(j)$
$f(k) = \sum_{j = k}^{n} (-1)^{j - k}\binom{j}{k}\sum_{i = k}^{j} (-1)^{k - i} \binom{j - k}{i - k} f(j)$
$f(k) = \sum_{j = k}^{n} (-1)^{j - k}\binom{j}{k}[j == k] f(j)$

posted @ 2018-05-18 21:28  sigongzi  阅读(1209)  评论(2编辑  收藏