二项式反演复习笔记

这篇blog讲的非常详细

列几个常用的柿子

f ( n ) = ∑ i = 0 n ( − 1 ) i ( n i ) g ( i )    ⟺    g ( n ) = ∑ i = 0 n ( − 1 ) i ( n i ) f ( i ) f(n)=\sum_{i=0}^n(-1)^i \tbinom{n}{i} g(i) \iff g(n)=\sum_{i=0}^n(-1)^i \tbinom{n}{i} f(i) f(n)=i=0n(1)i(in)g(i)g(n)=i=0n(1)i(in)f(i)

f ( n ) = ∑ i = 0 n ( n i ) g ( i )    ⟺    g ( n ) = ∑ i = 0 n ( − 1 ) n − i ( n i ) f ( i ) f(n)=\sum_{i=0}^n \tbinom{n}{i} g(i) \iff g(n)=\sum_{i=0}^n(-1)^{n-i} \tbinom{n}{i} f(i) f(n)=i=0n(in)g(i)g(n)=i=0n(1)ni(in)f(i)

f ( n ) = ∑ i = m n ( n i ) g ( i )    ⟺    g ( n ) = ∑ i = m n ( − 1 ) n − i ( n i ) f ( i ) f(n)=\sum_{i=m}^n \tbinom{n}{i} g(i) \iff g(n)=\sum_{i=m}^n(-1)^{n-i} \tbinom{n}{i} f(i) f(n)=i=mn(in)g(i)g(n)=i=mn(1)ni(in)f(i)

f ( n ) = ∑ i = n m ( i n ) g ( i )    ⟺    g ( n ) = ∑ i = n m ( − 1 ) i − n ( i n ) f ( i ) f(n)=\sum_{i=n}^m \tbinom{i}{n} g(i) \iff g(n)=\sum_{i=n}^m(-1)^{i-n} \tbinom{i}{n} f(i) f(n)=i=nm(ni)g(i)g(n)=i=nm(1)in(ni)f(i)

证明懒得写了,上面链的blog里有非常详细的证明

应用的话,主要是第3、4条柿子,可以用作将 至多 k k k、至少 k k k 的方案数,转化成恰好 k k k的方案数

你可能感兴趣的:(乱七八糟的东西)