标签:ref because 解决 递归 play isp AMM 符号 end
符号:\(\huge\sum\)
eg.
将\(\sum_{k=1}^nk转为封闭式\)
方法:成套方法
令\(S(n)=\sum_{k=1}^nk\)
不难看出,\(S(n)=S(n-1)+n\)
令\(R(n)\)为\(S(n)\)的一般形式
即\(R(0)=\alpha \qquad R(n)=R(n-1)+\beta n+\gamma\)
(1) 令\(R(n)=1\)
\[\therefore R(0)=1\]
\[\therefore \alpha = 1\]
\[\because R(n)=R(n-1)+\beta n+\gamma\]
\[\therefore 1=1+\beta n + \gamma\]
\[ \left\{ \begin{aligned} \alpha = 1 \\beta = 0 \\gamma = 0 \end{aligned} \right. \]
(2) 令\(R(n)=n\)
\[\therefore R(0) = 0\]
\[\therefore \alpha = 0\]
\[\because R(n)=R(n-1)+\beta n+\gamma\]
\[\therefore n = (n-1)+\beta n + \gamma\]
\[ \left\{ \begin{aligned} \alpha = 0 \\beta = 0 \\gamma = 1 \end{aligned} \right. \]
(3) 令\(R(n) = n^2\)
\[\therefore R(0) = 0\]
\[\therefore \alpha = 0\]
\[\because R(n)=R(n-1)+\beta n+\gamma\]
\[\therefore n^2 = (n-1)^2+\beta n + \gamma\]
\[\therefore n^2 = n^2 - 2n + 1+\beta n + \gamma\]
\[\therefore -1 =(\beta - 2) n + \gamma\]
\[ \left\{ \begin{aligned} \alpha = 0 \\beta = 2 \\gamma = -1 \end{aligned} \right. \]
3.计算系数
令\(R(n)=x\alpha + y\beta + z\theta\)
(1) 当\(R(n) = 1\)时:
\[\because\left\{ \begin{aligned} \alpha = 1 \\beta = 0 \\gamma = 0 \end{aligned} \right. \]
\[\therefore x = 1\]
(2) 当\(R(n) = n\)时:
\[\because\left\{ \begin{aligned} \alpha = 0 \\beta = 0 \\gamma = 1 \end{aligned} \right. \]
\[\therefore z = n\]
(3) 当\(R(n) = n^2\)时:
\[ \left\{ \begin{aligned} \alpha = 0 \\beta = 2 \\gamma = -1 \end{aligned} \right. \]
\[\therefore 2y - z = n^2\]
综上:
\[ \left\{ \begin{aligned} x = 1 \z = n \2y - z = n^2 \end{aligned} \right. \]
解得
\[ \left\{
\begin{aligned}
x = 1 \y = \frac{n\cdot (n+1)}{2} \z = n
\end{aligned}
\right.
\]
4.具体化
\[S(n) = S(n-1) + n\]
令\(P(n)\)为当\(\beta = 1, \gamma = 0\)时\(R(n)\)的值
\[\therefore P(n) = P(n-1) + n = S(n)\]
\(\therefore S(n)\)为当\(\beta = 1, \gamma = 0\)时\(R(n)\)的值
\[\therefore S(n) = y\]
\[\therefore S(n) = \frac{n \cdot (n+1)}{2}\]
标签:ref because 解决 递归 play isp AMM 符号 end
原文地址:https://www.cnblogs.com/zhangtianli/p/12233360.html