Generating function learning record

Generating function

Ordinary generating function

普通母函数-吧组合问题的加法和幂级数的乘幂结合起来。
幂级数的乘积存在指数上的加法。

example:

我们有1, 2, 3, 4克的砝码各一个。
对于这四个砝码的选择,第一个有选和不选,第二个有选和不选,第三个第四个同理。
我们可以用数学式子表示。

\ ((x ^ 0 + x
^ 1) * (x ^ 0 + x ^ 2) * (x ^ 0 + x ^ 3) * (x ^ 0 + x ^ 4) \) to expand available
\ (x ^ 0 + x ^ 1 + x ^ 2 + 2 * x ^ 3 + 2 * x ^ 4 + 2 * x ^ 5 + 2 * x ^ 6 + x * x ^ 7 + x ^ 8 + x ^ 9 + x ^ 10 \),
wherein the coefficient is a number of types of constructed, and the constructed index, because power series multiplication, addition is exponential, multiplication can be converted to addition.
This becomes a logical formula. Each weight has selected and not selected. The contribution of each case to accumulate in the expansion.
The equation for the variable number
\ ((x ^ 0 + x ^ 1 + .. + x ^ m) * (x ^ 0 + x ^ 1 + .. + x ^ n) \)

Guess you like

Origin www.cnblogs.com/YDDDD/p/11802848.html