当前位置:网站首页>[combinatorics] recursive equation (solution of linear non-homogeneous recursive equation with constant coefficients | standard form and general solution of recursive equation | proof of general solut
[combinatorics] recursive equation (solution of linear non-homogeneous recursive equation with constant coefficients | standard form and general solution of recursive equation | proof of general solut
2022-07-03 17:13:00 【Programmer community】
List of articles
- One 、 Standard form and general solution of recurrence equation
- Two 、 Proof of general solution of recurrence equation
One 、 Standard form and general solution of recurrence equation
H
(
n
)
−
a
1
H
(
n
−
1
)
−
⋯
−
a
k
H
(
n
−
k
)
=
f
(
n
)
H(n) - a_1H(n-1) - \cdots - a_kH(n-k) = f(n)
H(n)−a1H(n−1)−⋯−akH(n−k)=f(n) ,
n
≥
k
,
a
k
≠
0
,
f
(
n
)
≠
0
n\geq k , a_k\not= 0, f(n) \not= 0
n≥k,ak=0,f(n)=0
The left side of the above equation And “ Linear homogeneous recurrence equation with constant coefficients ” It's the same , But not on the right
0
0
0 , It's based on
n
n
n Of function
f
(
n
)
f(n)
f(n) , This type of recursive equation is called “ Linear Nonhomogeneous recurrence equation with constant coefficients ” ;
Then the general solution of the above recursive equation is as follows :
H
(
n
)
‾
\overline{H(n)}
H(n) Is corresponding to the above recursive equation “ Linear homogeneous recurrence equation with constant coefficients ”
H
(
n
)
−
a
1
H
(
n
−
1
)
−
⋯
−
a
k
H
(
n
−
k
)
=
0
H(n) - a_1H(n-1) - \cdots - a_kH(n-k) = 0
H(n)−a1H(n−1)−⋯−akH(n−k)=0 A general understanding of ,
H
∗
(
n
)
H^*(n)
H∗(n) Is a special solution ,
“ Linear Nonhomogeneous recurrence equation with constant coefficients ” The general solution is
H
(
n
)
=
H
(
n
)
‾
+
H
∗
(
n
)
H(n) = \overline{H(n)} + H^*(n)
H(n)=H(n)+H∗(n)
“ Linear Nonhomogeneous recurrence equation with constant coefficients ” yes “ Linear homogeneous recurrence equation with constant coefficients ” Of Homogeneous general solution , Add a Special solution ;
Linear Nonhomogeneous recurrence equation with constant coefficients :
H
(
n
)
−
a
1
H
(
n
−
1
)
−
⋯
−
a
k
H
(
n
−
k
)
=
f
(
n
)
H(n) - a_1H(n-1) - \cdots - a_kH(n-k) = f(n)
H(n)−a1H(n−1)−⋯−akH(n−k)=f(n)
Linear homogeneous recurrence equation with constant coefficients :
H
(
n
)
−
a
1
H
(
n
−
1
)
−
⋯
−
a
k
H
(
n
−
k
)
=
0
\ \ \ \, H(n) - a_1H(n-1) - \cdots - a_kH(n-k) = 0
H(n)−a1H(n−1)−⋯−akH(n−k)=0
H
∗
(
n
)
H^*(n)
H∗(n) Special solution , Is a specific function that can make the equation equal on both sides ,
take
H
(
n
)
=
H
(
n
)
‾
+
H
∗
(
n
)
H(n) = \overline{H(n)} + H^*(n)
H(n)=H(n)+H∗(n) general solution Substitute into
H
(
n
)
−
a
1
H
(
n
−
1
)
−
⋯
−
a
k
H
(
n
−
k
)
=
f
(
n
)
H(n) - a_1H(n-1) - \cdots - a_kH(n-k) = f(n)
H(n)−a1H(n−1)−⋯−akH(n−k)=f(n) On the left ,
Will bring Top line Of
H
(
n
)
‾
\overline{H(n)}
H(n) Item merge , It must be
0
0
0 ,
Will bring
∗
*
∗ asterisk Of
H
∗
(
n
)
H^*(n)
H∗(n) Item merge , It must be
f
(
n
)
f(n)
f(n) ,
0
+
f
(
n
)
0 + f(n)
0+f(n) The end result is
f
(
n
)
f(n)
f(n) , With right
f
(
n
)
f(n)
f(n) equal ;
Any solution of a recursive equation , It's all one Homogeneous general solution , add A special solution The format of ;
Two 、 Proof of general solution of recurrence equation
prove : General solution of recurrence equation , A certain It's a Homogeneous general solution , add A special solution The format of ;
Recurrence equation :
H
(
n
)
−
a
1
H
(
n
−
1
)
−
⋯
−
a
k
H
(
n
−
k
)
=
f
(
n
)
H(n) - a_1H(n-1) - \cdots - a_kH(n-k) = f(n)
H(n)−a1H(n−1)−⋯−akH(n−k)=f(n) ,
n
≥
k
,
a
k
≠
0
,
f
(
n
)
≠
0
n\geq k , a_k\not= 0, f(n) \not= 0
n≥k,ak=0,f(n)=0
hypothesis
h
(
n
)
h(n)
h(n) Is the general solution of the recursive equation , Prove that
h
(
n
)
h(n)
h(n) It's a Homogeneous general solution , add A special solution The sum of the ;
take
h
(
n
)
h(n)
h(n) Into the above recursive equation ,
①
h
(
n
)
−
a
1
h
(
n
−
1
)
−
⋯
−
a
k
h
(
n
−
k
)
=
f
(
n
)
h(n) - a_1h(n-1) - \cdots - a_kh(n-k) = f(n)
h(n)−a1h(n−1)−⋯−akh(n−k)=f(n)
Special solution
H
∗
(
n
)
H^*(n)
H∗(n) It is also the solution of the recursive equation , take
H
∗
(
n
)
H^*(n)
H∗(n) Into the recursive equation , Both sides are equal ,
②
H
∗
(
n
)
−
a
1
H
∗
(
n
−
1
)
−
⋯
−
a
k
H
∗
(
n
−
k
)
=
f
(
n
)
H^*(n) - a_1H^*(n-1) - \cdots - a_kH^*(n-k) = f(n)
H∗(n)−a1H∗(n−1)−⋯−akH∗(n−k)=f(n)
Put the above ① ② Of two equations The left is subtracted from the left , The right part is subtracted from the right part ,
(
h
(
n
)
−
a
1
h
(
n
−
1
)
−
⋯
−
a
k
h
(
n
−
k
)
)
( h(n) - a_1h(n-1) - \cdots - a_kh(n-k) )
(h(n)−a1h(n−1)−⋯−akh(n−k))
−
-
−
(
H
∗
(
n
)
−
a
1
H
∗
(
n
−
1
)
−
⋯
−
a
k
H
∗
(
n
−
k
)
)
( H^*(n) - a_1H^*(n-1) - \cdots - a_kH^*(n-k) )
(H∗(n)−a1H∗(n−1)−⋯−akH∗(n−k))
=
0
=0
=0
Merge the items in the above formula :
[
h
(
n
)
−
H
∗
(
n
)
]
−
a
1
[
h
(
n
−
1
)
−
H
∗
(
n
−
1
)
]
−
⋯
−
a
k
[
h
(
n
−
k
)
−
H
∗
(
n
−
k
)
]
=
0
[ h(n) - H^*(n) ] - a_1[ h(n-1) - H^*(n-1) ] - \cdots - a_k[ h(n-k) - H^*(n-k) ] = 0
[h(n)−H∗(n)]−a1[h(n−1)−H∗(n−1)]−⋯−ak[h(n−k)−H∗(n−k)]=0
The above equation is homogeneous ,
h
(
n
)
−
H
∗
(
n
)
h(n) - H^*(n)
h(n)−H∗(n) Is the general solution of homogeneous equation ,
that
h
(
n
)
h(n)
h(n) Namely General solution of homogeneous equation And Special solution
H
∗
(
n
)
H^*(n)
H∗(n) Add up ;
therefore
H
(
n
)
=
H
(
n
)
‾
+
H
∗
(
n
)
H(n) = \overline{H(n)} + H^*(n)
H(n)=H(n)+H∗(n) The format must be general ;
边栏推荐
- 2021 ICPC regional competition (Shanghai) g.edge groups (tree DP)
- 27. 输入3个整数,按从大到小的次序输出。要求用指针方法实现。
- Test your trained model
- Meituan side: why does thread crash not cause JVM crash
- New features of C 10
- Javescript variable declaration -- VaR, let, const
- New library online | cnopendata China bird watching record data
- Necessary ability of data analysis
- Answer to the homework assessment of advanced English reading (II) of the course examination of Fuzhou Normal University in February 2022
- 27. Input 3 integers and output them in descending order. Pointer method is required.
猜你喜欢

【RT-Thread】nxp rt10xx 设备驱动框架之--rtc搭建和使用

PHP online confusion encryption tutorial sharing + basically no solution

Build your own website (23)

kubernetes资源对象介绍及常用命令(三)
The way of wisdom (unity of knowledge and action)

C language modifies files by line

New features of C 10

C语言按行修改文件

设计电商秒杀

Kubernetes resource object introduction and common commands (4)
随机推荐
线程池:业务代码最常用也最容易犯错的组件
C language string inversion
Network security web penetration technology
Leetcode13. Roman numeral to integer (three solutions)
Visual studio "usually, each socket address (Protocol / network address / port) can only be used once“
Free data | new library online | cnopendata complete data of China's insurance intermediary outlets
【RT-Thread】nxp rt10xx 设备驱动框架之--hwtimer搭建和使用
【JokerのZYNQ7020】DDS_ Compiler。
[combinatorics] recursive equation (characteristic equation and characteristic root | example of characteristic equation | root formula of monadic quadratic equation)
[RT thread] NXP rt10xx device driver framework -- pin construction and use
mysql用户管理
One brush 144 force deduction hot question-1 sum of two numbers (E)
Dagong 21 autumn "power plant electrical part" online operation 1 [standard answer] power plant electrical part
When absolutely positioned, the element is horizontally and vertically centered
One brush 149 force deduction hot question-10 regular expression matching (H)
Online assignment 3 of mobile Internet technology in the 20th autumn of electronic technology [standard answer]
Kotlin学习快速入门(7)——扩展的妙用
【Try to Hack】主动侦查隐藏技术
[combinatorial mathematics] recursive equation (example of recursive equation 2 Hanoi Tower | example of recursive equation 3 insertion sequencing)
Talk about several methods of interface optimization