P7481 梦现时刻 组合数 递推

梦现时刻

\(\begin{aligned}f_{a,b} & = \sum \limits _{i = 0}^b\dbinom{b}{i}\dbinom{n-i}{a} \\&=\sum \limits _{i=0}^b\dbinom{b-1}{i}\dbinom{n-i}{a}+\sum \limits _{i=0}^b\dbinom{b-1}{i-1}\dbinom{n-i}{a}\\&=f_{a,b-1}+\sum \limits _{i=0}^{b-1}\dbinom{b-1}{i}\dbinom{n-i-1}{a}\\&=f_{a,b-1}+\sum \limits _{i=0}^{b-1}\dbinom{b-1}{i}\dbinom{n-i}{a}-\sum \limits _{i=0}^{b-1}\dbinom{b-1}{i}\dbinom{n-i-1}{a-1}\\&=2f_{a,b-1}-\sum \limits _{i=0}^{b-1}\dbinom{b-1}{i}\dbinom{n-i-1}{a-1}\\&=2f_{a,b-1}-(\sum \limits _{i=0}^{b-1}\dbinom{b}{i+1}\dbinom{n-i-1}{a-1}-\sum \limits _{i=0}^{b-1}\dbinom{b-1}{i+1}\dbinom{n-i-1}{a-1})\\&=2f_{a,b-1}-\sum \limits _{i=0}^{b}\dbinom{b}{i}\dbinom{n-i}{a-1}+\sum \limits _{i=0}^{b}\dbinom{b-1}{i}\dbinom{n-i}{a-1}\\&=2f_{a,b-1}-f_{a-1,b}+f_{a-1,b-1}\end{aligned}\)

懒了不想自己打了。

posted @ 2023-09-06 22:52  chdy  阅读(72)  评论(0编辑  收藏  举报