1. 程式人生 > 遊戲 >韓國懸疑冒險《深埋之星》正式發售 首發特惠促銷

韓國懸疑冒險《深埋之星》正式發售 首發特惠促銷

引入

當我在網上查詢關於二項式反演的部落格時, 總是隻看到兩個公式, 一個原式, 一個推論(1), 所以這篇部落格主要是引出推論(2), 並且將其證明。

前兩個式子

原式:

\[{\large f(n) = \sum \limits_{i = 0}^{n} \binom{n}{i}g(i) \Leftrightarrow g(n) = \sum \limits_{i = 0}^{n}(-1)^{n - i}\binom{n}{i}f(i)} \]

推論(1):

\[{\large f(n) = \sum \limits_{i = m}^{n} \binom{n}{i}g(i) \Leftrightarrow g(n) = \sum \limits_{i = m}^{n}(-1)^{n - i}\binom{n}{i}f(i)} \]

這兩個式子網上很多人證明, 這裡也就不證了。
最關鍵的, 還是最後一個式子。

最後一個式子

推論(2):

\[{\large f(n) = \sum \limits_{i = n}^{m} \binom{i}{n}g(i) \Leftrightarrow g(n) = \sum \limits_{i = n}^{m}(-1)^{i - n}\binom{i}{n}f(i)} \]

證明:

\[{\large f(n) = \sum \limits_{i = n}^{m} \binom{i}{n}g(i) \Leftrightarrow g(n) = \sum \limits_{i = n}^{m}(-1)^{i - n}\binom{i}{n}f(i)} \]

若原式正確, 則有

\[{\large g(n) = \sum \limits_{i = n}^{m}(-1)^{i - n}\binom{i}{n}f(i)}\large\Leftrightarrow {\large g(n) = \sum \limits_{i = n}^{m}(-1)^{i - n}\binom{i}{n}\sum \limits_{j = i}^{m} \binom{j}{i}g(j)} \]\[\large\therefore {\large g(n) = \sum \limits_{i = n}^{m}(-1)^{i - n}\binom{i}{n}\sum \limits_{j = i}^{m} \binom{j}{i}g(j)} \]\[{\large = \sum \limits_{i = n}^{m} \sum\limits_{j = i}^{m} (-1)^{i - n}\binom{i}{n}\binom{j}{i}g(j)} \]\[{\large = \sum \limits_{j = n}^{m} \sum\limits_{i = n}^{j} (-1)^{i - n}\binom{i}{n}\binom{j}{i}g(j)} \]\[{\large = \sum \limits_{j = n}^{m} g(j) \sum\limits_{i = n}^{j} (-1)^{i - n}\binom{i}{n}\binom{j}{i}} \]\[{\large = \sum \limits_{j = n}^{m} g(j) \sum\limits_{i = n}^{j} (-1)^{i - n}\binom{i}{n}\binom{j}{i}} \]\[{\large = \sum \limits_{j = n}^{m} g(j) \sum\limits_{i = n}^{j} (-1)^{i - n}\frac{i!}{n!(i-n)!}\frac{j!}{i!(j-i)!}} \]\[{\large = \sum \limits_{j = n}^{m} g(j) \sum\limits_{i = n}^{j} (-1)^{i - n}\frac{1}{n!(i-n)!}\frac{j!}{(j-i)!}} \]\[{\large = \sum \limits_{j = n}^{m} g(j) \sum\limits_{i = n}^{j} (-1)^{i - n}\frac{(j-n)!}{n!(i-n)!}\frac{j!}{(j-i)!(j-n)!}} \]\[{\large = \sum \limits_{j = n}^{m} g(j) \sum\limits_{i = n}^{j} (-1)^{i - n}\frac{(j-n)!}{(j-i)!(i-n)!}\frac{j!}{n!(j-n)!}} \]\[{\large = \sum \limits_{j = n}^{m} g(j) \sum\limits_{i = n}^{j} (-1)^{i - n}\binom{j - n}{i - n}\binom{j}{n}} \]\[{\large = \sum \limits_{j = n}^{m} g(j)\binom{j}{n} \sum\limits_{i = n}^{j} (-1)^{i - n}\binom{j - n}{i - n}} \]\[{\large = \sum \limits_{j = n}^{m} g(j)\binom{j}{n} \sum\limits_{i = 0}^{j - n} (-1)^{i}\binom{j - n}{i}} \]\[{\large 設k=j - n} \]\[{\large g(n) = \sum \limits_{j = n}^{m} g(j)\binom{j}{n} \sum\limits_{i = 0}^{k} (-1)^{i}\binom{k}{i}} \]\[{\large 又\because \sum\limits_{i = 0}^{k} (-1)^{i}\binom{k}{i} = } {\large \begin{aligned} \left \{ \begin{aligned} 0, k\neq0,\\ 1, k=0. \end{aligned} \right. \end{aligned} } \]\[{\large \therefore 當且僅當k = 0, 即j = n時\sum\limits_{i = 0}^{k} (-1)^{i}\binom{k}{i} = 1} \]\[{\large \therefore g(n) = g(n)\binom{n}{n} = g(n)} \]\[{\large \therefore 原命題顯然成立} \]

至此, 二項式反演的三個式子都弄完了, 至於第三個式子的應用。。。

找到了