当前位置:网站首页>[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 ;
边栏推荐
- mysql用户管理
- [combinatorial mathematics] recursive equation (example of recursive equation 2 Hanoi Tower | example of recursive equation 3 insertion sequencing)
- C语言按行修改文件
- 美团一面:为什么线程崩溃崩溃不会导致 JVM 崩溃
- 设计电商秒杀
- 2021 ICPC regional competition (Shanghai) g.edge groups (tree DP)
- Leetcode13. Roman numeral to integer (three solutions)
- Apache服务挂起Asynchronous AcceptEx failed.
- Kotlin learning quick start (7) -- wonderful use of expansion
- How to train mask r-cnn model with your own data
猜你喜欢

Pools de Threads: les composants les plus courants et les plus sujets aux erreurs du Code d'affaires

Kotlin learning quick start (7) -- wonderful use of expansion
![[RT thread] NXP rt10xx device driver framework -- RTC construction and use](/img/19/91a9d84ba84f81ef125c33eb4007bc.png)
[RT thread] NXP rt10xx device driver framework -- RTC construction and use

Swm32 series Tutorial 4 port mapping and serial port application

Simple use of unity pen XR grab
![[RT thread] NXP rt10xx device driver framework -- pin construction and use](/img/75/b4f034bfe49409f76e7fd92758804e.png)
[RT thread] NXP rt10xx device driver framework -- pin construction and use

Leetcode: lucky number in matrix

The most complete postman interface test tutorial in the whole network, API interface test

Prepare for the golden three silver four, 100+ software test interview questions (function / interface / Automation) interview questions. win victory the moment one raises one 's standard

【JokerのZYNQ7020】DDS_ Compiler。
随机推荐
One brush 149 force deduction hot question-10 regular expression matching (H)
定义一个结构体Fraction,表示分数,用于表示 2/3, 5/6这样的分数
Leetcode13. Roman numeral to integer (three solutions)
Free data | new library online | cnopendata complete data of China's insurance intermediary outlets
C语言按行修改文件
Installation and configuration of network hard disk NFS
Simple use of unity pen XR grab
Execute script unrecognized \r
Résolution de l'instance d'assemblage - - affichage à l'écran en mode réel
Rsync远程同步
Kotlin学习快速入门(7)——扩展的妙用
Fast Ethernet and Gigabit Ethernet: what's the difference?
[combinatorial mathematics] recursive equation (example of recursive equation 2 Hanoi Tower | example of recursive equation 3 insertion sequencing)
UCORE overview
[error reporting] omp: error 15: initializing libiomp5md dll, but found libiomp5md. dll already initialized.
[combinatorics] recursive equation (the relationship theorem between the solution of the recursive equation and the characteristic root | the linear property theorem of the solution of the recursive e
Recommendation of good books on learning QT programming
Why is WPA3 security of enterprise business so important?
Define a structure fraction to represent a fraction, which is used to represent fractions such as 2/3 and 5/6
【RT-Thread】nxp rt10xx 设备驱动框架之--Pin搭建和使用