当前位置:网站首页>[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
边栏推荐
- RedHat 6.2 配置 Zabbix
- Great changes! National housing prices fell below the 10000 yuan mark
- [error reporting] omp: error 15: initializing libiomp5md dll, but found libiomp5md. dll already initialized.
- Kotlin learning quick start (7) -- wonderful use of expansion
- Résolution de l'instance d'assemblage - - affichage à l'écran en mode réel
- 【JokerのZYNQ7020】DDS_ Compiler。
- 数仓任务里面 跑SQL任务的时候用的数据库账号是在哪里配置的
- Kotlin学习快速入门(7)——扩展的妙用
- Dagong 21 autumn "power plant electrical part" online operation 1 [standard answer] power plant electrical part
- 企业级自定义表单引擎解决方案(十一)--表单规则引擎1
猜你喜欢

ucore概述

New features of C 10

Is AI too slow to design pictures and draw illustrations? 3 sets of practical brushes to save you
![[try to hack] active detection and concealment technology](/img/43/d48f851268fec566ce0cc83bd9557e.png)
[try to hack] active detection and concealment technology

kubernetes资源对象介绍及常用命令(五)-(NFS&PV&PVC)

静态程序分析(一)—— 大纲思维导图与内容介绍

Design e-commerce spike

人生还在迷茫?也许这些订阅号里有你需要的答案!

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

大消费企业怎样做数字化转型?
随机推荐
[RT thread] construction and use of --hwtimer of NXP rt10xx device driver framework
Kotlin learning quick start (7) -- wonderful use of expansion
大消费企业怎样做数字化转型?
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
Is AI too slow to design pictures and draw illustrations? 3 sets of practical brushes to save you
One brush 148 force deduction hot question-5 longest palindrome substring (m)
How to allow remote connection to MySQL server on Linux system?
University of Electronic Science and technology, accounting computerization, spring 20 final exam [standard answer]
[RT thread] NXP rt10xx device driver framework -- Audio construction and use
29: Chapter 3: develop Passport Service: 12: develop [obtain user account information, interface]; (use VO class to package the found data to meet the requirements of the interface for the returned da
LeetCode 1658. Minimum operand to reduce x to 0
LeetCode 1657. Determine whether the two strings are close
Why is WPA3 security of enterprise business so important?
聊聊接口优化的几个方法
LeetCode 1656. Design ordered flow
HP 阵列卡排障一例
Kotlin学习快速入门(7)——扩展的妙用
Take you to API development by hand
One brush 145 force deduction hot question-2 sum of two numbers (m)
汇编实例解析--实模式下屏幕显示