二项式反演

也许更好的阅读体验

文章目录

表达

若有 f ( n ) = i = 0 n ( n i ) g ( i ) f(n)=\sum_{i=0}^n\binom{n}{i}g(i) f(n)=i=0n(in)g(i)
则有 g ( n ) = i = 0 n ( 1 ) n i ( n i ) f ( i ) g(n)=\sum_{i=0}^n(-1)^{n-i}\binom{n}{i}f(i) g(n)=i=0n(1)ni(in)f(i)


证明

<mstyle displaystyle="true" scriptlevel="0"> g ( n ) </mstyle> <mstyle displaystyle="true" scriptlevel="0"> = <munderover> i = 0 n </munderover> ( 1 ) n i ( n i ) f ( i ) </mstyle> <mstyle displaystyle="true" scriptlevel="0"> </mstyle> <mstyle displaystyle="true" scriptlevel="0"> = <munderover> i = 0 n </munderover> ( 1 ) n i ( n i ) <munderover> j = 0 i </munderover> ( i j ) g ( j ) </mstyle> <mstyle displaystyle="true" scriptlevel="0"> </mstyle> <mstyle displaystyle="true" scriptlevel="0"> = <munderover> i = 0 n </munderover> <munderover> j = 0 i </munderover> ( 1 ) n i ( n i ) ( i j ) g ( j ) </mstyle> <mstyle displaystyle="true" scriptlevel="0"> </mstyle> <mstyle displaystyle="true" scriptlevel="0"> = <munderover> j = 0 n </munderover> <munderover> i = j n </munderover> ( 1 ) n i ( n i ) ( i j ) g ( j ) </mstyle> \begin{aligned}g(n)&amp;=\sum_{i=0}^n(-1)^{n-i}\binom{n}{i}f(i)\\ &amp;=\sum_{i=0}^n(-1)^{n-i}\binom{n}{i}\sum_{j=0}^i\binom{i}{j}g(j)\\ &amp;=\sum_{i=0}^n\sum_{j=0}^i(-1)^{n-i}\binom{n}{i}\binom{i}{j}g(j)\\ &amp;=\sum_{j=0}^n\sum_{i=j}^n(-1)^{n-i}\binom{n}{i}\binom{i}{j}g(j)\\ \end{aligned} g(n)=i=0n(1)ni(in)f(i)=i=0n(1)ni(in)j=0i(ji)g(j)=i=0nj=0i(1)ni(in)(ji)g(j)=j=0ni=jn(1)ni(in)(ji)g(j)
在组合数中,有这么一个式子
<mstyle displaystyle="true" scriptlevel="0"> ( i j ) ( j k ) </mstyle> <mstyle displaystyle="true" scriptlevel="0"> = i ! j ! ( i j ) ! j ! k ! ( j k ) ! </mstyle> <mstyle displaystyle="true" scriptlevel="0"> </mstyle> <mstyle displaystyle="true" scriptlevel="0"> = i ! k ! ( i k ) ! ( i k ) ! ( i j ) ! ( j k ) ! </mstyle> <mstyle displaystyle="true" scriptlevel="0"> </mstyle> <mstyle displaystyle="true" scriptlevel="0"> = i ! k ! ( i k ) ! ( i k ) ! ( ( i k ) ( j k ) ) ! ( j k ) ! </mstyle> <mstyle displaystyle="true" scriptlevel="0"> </mstyle> <mstyle displaystyle="true" scriptlevel="0"> = ( <mstyle displaystyle="false" scriptlevel="0"> i </mstyle> <mstyle displaystyle="false" scriptlevel="0"> k </mstyle> ) ( <mstyle displaystyle="false" scriptlevel="0"> i k </mstyle> <mstyle displaystyle="false" scriptlevel="0"> j k </mstyle> ) </mstyle> \begin{aligned}\binom{i}{j}\binom{j}{k} &amp;= \frac{i!}{j!(i - j)!}\frac{j!}{k!(j - k)!} \\ &amp;=\dfrac {i!}{k!\left( i-k\right) !}\dfrac {\left( i-k\right) !}{\left( i-j\right) !\left( j-k\right) !}\\ &amp;=\dfrac {i!}{k!\left( i-k\right) !}\dfrac {\left( i-k\right) !}{\left( \left( i-k\right) -\left( j-k\right) \right) !\left( j-k\right) !}\\ &amp;=\begin{pmatrix} i \\ k \end{pmatrix}\begin{pmatrix} i-k \\ j-k \end{pmatrix}\end{aligned} (ji)(kj)=j!(ij)!i!k!(jk)!j!=k!(ik)!i!(ij)!(jk)!(ik)!=k!(ik)!i!((ik)(jk))!(jk)!(ik)!=(ik)(ikjk)

<mstyle displaystyle="true" scriptlevel="0"> ( i j ) ( j k ) = ( <mstyle displaystyle="false" scriptlevel="0"> i </mstyle> <mstyle displaystyle="false" scriptlevel="0"> k </mstyle> ) ( <mstyle displaystyle="false" scriptlevel="0"> i k </mstyle> <mstyle displaystyle="false" scriptlevel="0"> j k </mstyle> ) </mstyle> \begin{aligned}\binom{i}{j}\binom{j}{k}=\begin{pmatrix} i \\ k \end{pmatrix}\begin{pmatrix} i-k \\ j-k \end{pmatrix}\end{aligned} (ji)(kj)=(ik)(ikjk)
所以
<mstyle displaystyle="true" scriptlevel="0"> </mstyle> <mstyle displaystyle="true" scriptlevel="0"> = <munderover> j = 0 n </munderover> <munderover> i = j n </munderover> ( 1 ) n i ( n j ) ( n j i j ) g ( j ) </mstyle> <mstyle displaystyle="true" scriptlevel="0"> </mstyle> <mstyle displaystyle="true" scriptlevel="0"> = <munderover> j = 0 n </munderover> <munderover> i = 0 n j </munderover> ( 1 ) n i j ( <mstyle displaystyle="false" scriptlevel="0"> n </mstyle> <mstyle displaystyle="false" scriptlevel="0"> j </mstyle> ) ( <mstyle displaystyle="false" scriptlevel="0"> n j </mstyle> <mstyle displaystyle="false" scriptlevel="0"> i </mstyle> ) g ( j ) </mstyle> <mstyle displaystyle="true" scriptlevel="0"> </mstyle> <mstyle displaystyle="true" scriptlevel="0"> = <munderover> j = 0 n </munderover> ( 1 1 ) n j ( <mstyle displaystyle="false" scriptlevel="0"> n </mstyle> <mstyle displaystyle="false" scriptlevel="0"> j </mstyle> ) g ( j ) </mstyle> \begin{aligned}原式&amp;=\sum_{j=0}^n\sum_{i=j}^n(-1)^{n-i}\binom{n}{j}\binom{n-j}{i-j}g(j)\\ &amp;=\sum_{j=0}^n\sum ^{n-j}_{i=0}\left( -1\right) ^{n-i-j}\begin{pmatrix} n \\ j \end{pmatrix}\begin{pmatrix} n-j \\ i \end{pmatrix}g(j)\\ &amp;=\sum_{j=0}^n\left(1-1\right)^{n-j}\begin{pmatrix} n \\ j \end{pmatrix}g\left(j\right) \end{aligned} =j=0ni=jn(1)ni(jn)(ijnj)g(j)=j=0ni=0nj(1)nij(nj)(nji)g(j)=j=0n(11)nj(nj)g(j)
此时要求 n ! = j n != j n!=j,此时 = 0 原式=0 =0
n = j n=j n=j时, = g ( n ) 原式=g(n) =g(n)

到此,原式得证

如有哪里讲得不是很明白或是有错误,欢迎指正
如您喜欢的话不妨点个赞收藏一下吧

全部评论

相关推荐

牛客5655:其他公司的面试(事)吗
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务