当前位置:网站首页>[combinatorics] recursive equation (special solution form | special solution solving method | special solution example)
[combinatorics] recursive equation (special solution form | special solution solving method | special solution example)
2022-07-03 17:16:00 【Programmer community】
List of articles
- One 、 Special solution form and solution
- Two 、 Special solution form and solution Example
One 、 Special solution form and solution
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 ” ;
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)
stay 【 Combinatorial mathematics 】 Recurrence equation ( Example of solving recurrence equation without multiple roots | Complete process of solving recursive equations without multiple roots ) The blog introduces “ Linear homogeneous recurrence equation with constant coefficients ” The general solution of ;
This blog begins with Special solution
H
∗
(
n
)
H^*(n)
H∗(n) The way of seeking ;
Special solutions and “ Linear Nonhomogeneous recurrence equation with constant coefficients ” The right part of
f
(
n
)
f(n)
f(n) of ,
f
(
n
)
f(n)
f(n) by
n
n
n Of
t
t
t Sub polynomial ,
Special solution
H
∗
(
n
)
H^*(n)
H∗(n) It's also
n
n
n Of
t
t
t Sub polynomial ;
1 . Special solution form :
( 1 ) Special solution form : Special solution
H
∗
(
n
)
H^*(n)
H∗(n) yes
n
n
n Of
t
t
t Sub polynomial ,
n
n
n The power of is taken from
0
0
0 To
t
t
t , Therefore, its Number of items
t
+
1
t+1
t+1 term ;
( 2 ) Understand each component :
- ① Number of items :
t
+
1
t+1
t+1 term
- ② form : The special solution term consists of constant multiply
n
n
n Power of power form , Constants are unknown ;
- ③ constant :
t
+
1
t+1
t+1 It's a constant , Use subscripts to identify ;
- ④
n
n
0
0
0 To
t
t
t ;
n The power of : The power value is from
( 3 ) give an example : Special solution
H
∗
(
n
)
H^*(n)
H∗(n) yes
n
n
n Of
2
2
2 Sub polynomial ;
Number of special solutions : be Number of special solutions yes
2
+
1
=
3
2 + 1 = 3
2+1=3 term ;
Understand each component : Each term is explained by constant multiply
n
n
n Power of power form ,
3
3
3 It's a constant Set to
P
1
,
P
2
,
P
3
P_1, P_2, P_3
P1,P2,P3 ,
3
3
3 individual
n
n
n Power of power , Power value from
0
0
0 To
2
2
2 ,
Therefore, the form of the special solution is
H
∗
(
n
)
=
P
1
n
2
+
P
2
n
1
+
P
3
n
0
H^*(n) = P_1n^2 + P_2n^1 + P_3n^0
H∗(n)=P1n2+P2n1+P3n0 ,
It is reduced to :
H
∗
(
n
)
=
P
1
n
2
+
P
2
n
+
P
3
H^*(n) = P_1n^2 + P_2n + P_3
H∗(n)=P1n2+P2n+P3
2 . Special solution method :
( 1 ) First write the form of the special solution : Special solution
H
∗
(
n
)
H^*(n)
H∗(n) It's also
n
n
n Of
t
t
t Sub polynomial ; Such as :
f
(
n
)
f(n)
f(n) by
n
n
n Of
2
2
2 Sub polynomial , The special solution is
H
∗
(
n
)
=
P
1
n
2
+
P
2
n
+
P
3
H^*(n) = P_1n^2 + P_2n + P_3
H∗(n)=P1n2+P2n+P3
( 2 ) The special solution is substituted into the recursive equation : Then the special solution is substituted into the recursive equation , Determine the coefficients in the special solution ;
Two 、 Special solution form and solution Example
Recurrence equation :
a
n
+
5
a
n
−
1
+
6
a
n
−
2
=
3
n
2
a_n + 5a_{n-1} + 6a_{n-2}=3n^2
an+5an−1+6an−2=3n2 ;
1 . Special solution form :
On the left side of the above recursive equation is “ Linear homogeneous recurrence equation with constant coefficients ” form , Never mind ,
On the right side of the
3
n
2
3n^2
3n2 Related to special solutions ,
3
n
2
3n^2
3n2 by
n
n
n Of
2
2
2 Sub polynomial ,
Therefore, the special solution
H
∗
(
n
)
H^*(n)
H∗(n) It's also
n
n
n Of
2
2
2 Sub polynomial ;
2 . Write the special solution form :
Number of special solutions : be Number of special solutions yes
2
+
1
=
3
2 + 1 = 3
2+1=3 term ;
Understand each component : Each term is explained by constant multiply
n
n
n Power of power form ,
3
3
3 It's a constant Set to
P
1
,
P
2
,
P
3
P_1, P_2, P_3
P1,P2,P3 ,
3
3
3 individual
n
n
n Power of power , Power value from
0
0
0 To
2
2
2 ,
Therefore, the form of the special solution is
H
∗
(
n
)
=
P
1
n
2
+
P
2
n
1
+
P
3
n
0
H^*(n) = P_1n^2 + P_2n^1 + P_3n^0
H∗(n)=P1n2+P2n1+P3n0 ,
It is reduced to :
H
∗
(
n
)
=
P
1
n
2
+
P
2
n
+
P
3
H^*(n) = P_1n^2 + P_2n + P_3
H∗(n)=P1n2+P2n+P3
3 . Put the special solution into the recursive equation :
Will explain
H
∗
(
n
)
=
P
1
n
2
+
P
2
n
+
P
3
H^*(n) = P_1n^2 + P_2n + P_3
H∗(n)=P1n2+P2n+P3 ,
Into the recursive equation
a
n
+
5
a
n
−
1
+
6
a
n
−
2
=
3
n
2
a_n + 5a_{n-1} + 6a_{n-2}=3n^2
an+5an−1+6an−2=3n2 in ,
obtain :
(
P
1
n
2
+
P
2
n
+
P
3
)
+
5
(
P
1
(
n
−
1
)
2
+
P
2
(
n
−
1
)
+
P
3
)
+
6
(
P
1
(
n
−
2
)
2
+
P
2
(
n
−
2
)
+
P
3
)
=
3
n
2
(P_1n^2 + P_2n + P_3) + 5(P_1(n-1)^2 + P_2(n-1) + P_3) + 6(P_1(n-2)^2 + P_2(n-2) + P_3)=3n^2
(P1n2+P2n+P3)+5(P1(n−1)2+P2(n−1)+P3)+6(P1(n−2)2+P2(n−2)+P3)=3n2
4 . analysis
n
n
n Write the system of equations by the power of :
The left and right sides are equal , here according to
n
n
n The coefficient before the power of , Write the equations ;
analysis
n
n
n Coefficient to the power of :
n
2
n^2
3
n
2
3n^2
3n2 , therefore
n
2
n^2
n2 The coefficient before is
3
3
3 ; Expand the left side ,
n
2
n^2
n2 Add the coefficients before , In the end, it's equal to
3
3
3 ;
12
P
1
n
2
=
3
n
2
12P_1n^2 = 3n^2
12P1n2=3n2
n2 Coefficient analysis : The right side is
n
1
n^1
n
1
n^1
n1 , That is, no
n
n
n term , So on the left
n
n
n The coefficient before the term is
0
0
0 ; Expand the left side ,
n
n
n Add the coefficients before , In the end, it's equal to
0
0
0 ;
−
34
P
1
n
+
12
P
2
n
=
0
n
-34P_1n + 12P_2n = 0n
−34P1n+12P2n=0n
n1 Coefficient analysis : There's no on the right
n
0
n^0
n
0
n^0
n0 , That is, no
1
1
1 term ( Pure numeric items ) , Therefore, the number item on the left is
0
0
0 ; Expand the left side , The numerical term finally equals
0
0
0 ;
29
P
1
−
17
P
2
+
12
P
3
=
0
29P_1 - 17P_2 + 12 P_3 = 0
29P1−17P2+12P3=0
n0 Coefficient analysis : There's no on the right
Finally, we get the equations :
{
12
P
1
=
3
−
34
P
1
+
12
P
2
=
0
29
P
1
−
17
P
2
+
12
P
3
=
0
\begin{cases} 12P_1 = 3 \\\\ -34P_1 + 12P_2 = 0 \\\\ 29P_1 - 17P_2 + 12 P_3 = 0 \end{cases}
⎩⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎧12P1=3−34P1+12P2=029P1−17P2+12P3=0
Solve the above equations , Get the results :
{
P
1
=
1
4
P
2
=
7
24
P
3
=
115
288
\begin{cases} P_1 = \cfrac{1}{4} \\\\ P_2 = \cfrac{7}{24} \\\\ P_3 = \cfrac{115}{288} \end{cases}
⎩⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎧P1=41P2=247P3=288115
The special solution is :
H
∗
(
n
)
=
1
4
n
2
+
7
24
n
+
115
288
H^*(n) = \cfrac{1}{4} n^2 + \cfrac{7}{24}n + \cfrac{115}{288}
H∗(n)=41n2+247n+288115
The final general solution is :
H
(
n
)
=
c
1
(
−
2
)
n
+
c
2
(
−
3
)
n
+
1
4
n
2
+
7
24
n
+
115
288
H(n) = c_1(-2)^n + c_2(-3)^n + \cfrac{1}{4} n^2 + \cfrac{7}{24}n + \cfrac{115}{288}
H(n)=c1(−2)n+c2(−3)n+41n2+247n+288115
边栏推荐
- 在iptables防火墙下开启vsftpd的端口
- [error reporting] omp: error 15: initializing libiomp5md dll, but found libiomp5md. dll already initialized.
- SWM32系列教程4-端口映射及串口应用
- On Lagrange interpolation and its application
- 比亚迪、长城混动市场再“聚首”
- [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
- Is AI too slow to design pictures and draw illustrations? 3 sets of practical brushes to save you
- Vs code plug-in korofileheader
- Electronic Science and technology 20th autumn "Microcomputer Principle and application" online assignment 2 [standard answer]
- Execute script unrecognized \r
猜你喜欢
Collection of the most beautiful graduation photos in the graduation season, collection of excellent graduation photos
[RT thread] construction and use of --hwtimer of NXP rt10xx device driver framework
ANOVA example
One brush 145 force deduction hot question-2 sum of two numbers (m)
[RT thread] NXP rt10xx device driver framework -- RTC construction and use
【RT-Thread】nxp rt10xx 设备驱动框架之--rtc搭建和使用
Atom QT 16_ audiorecorder
Swm32 series Tutorial 4 port mapping and serial port application
Play with fancy special effects. This AE super kit is for you
Kotlin learning quick start (7) -- wonderful use of expansion
随机推荐
STM32H7 HAL库SPI DMA发送一直处于busy的解决办法
Is AI too slow to design pictures and draw illustrations? 3 sets of practical brushes to save you
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
[JDBC] API parsing
RedHat 6.2 configuring ZABBIX
[RT thread] NXP rt10xx device driver framework -- RTC construction and use
How to train mask r-cnn model with your own data
kubernetes资源对象介绍及常用命令(三)
Rsync远程同步
One brush 145 force deduction hot question-2 sum of two numbers (m)
Meituan side: why does thread crash not cause JVM crash
Golang单元测试、Mock测试以及基准测试
Kotlin learning quick start (7) -- wonderful use of expansion
Cross border e-commerce: advantages of foreign trade enterprises in overseas social media marketing
Kubernetes resource object introduction and common commands (III)
The difference between get and post
绝对定位时元素水平垂直居中
Apache service suspended asynchronous acceptex failed
汇编实例解析--实模式下屏幕显示
Kotlin学习快速入门(7)——扩展的妙用