当前位置:网站首页>[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
边栏推荐
- Static program analysis (I) -- Outline mind map and content introduction
- 定义一个结构体Fraction,表示分数,用于表示 2/3, 5/6这样的分数
- 问题随记 —— 在 edge 上看视频会绿屏
- Online assignment 3 of mobile Internet technology in the 20th autumn of electronic technology [standard answer]
- Luogu: p1155 [noip2008 improvement group] double stack sorting (bipartite graph, simulation)
- An example of HP array card troubleshooting
- Bcvp developer community 2022 exclusive peripheral first bullet
- Atom QT 16_ audiorecorder
- RedHat 6.2 configuring ZABBIX
- Redis: operation commands for list type data
猜你喜欢

One brush 149 force deduction hot question-10 regular expression matching (H)

Redis: operation commands for list type data

跨境电商:外贸企业做海外社媒营销的优势

Qt调节Win屏幕亮度和声音大小

Kotlin学习快速入门(7)——扩展的妙用

新库上线 | CnOpenData中国保险机构网点全集数据

Test your trained model
![[JDBC] API parsing](/img/75/0f69a4e246a571688355bb13e2cd73.jpg)
[JDBC] API parsing

免费数据 | 新库上线 | CnOpenData中国保险中介机构网点全集数据

问题随记 —— 在 edge 上看视频会绿屏
随机推荐
Collection of the most beautiful graduation photos in the graduation season, collection of excellent graduation photos
Svn full backup svnadmin hotcopy
RF analyze demo build step by step
How to delete a specific line from a text file using the SED command?
One brush 146 force buckle hot question-3 longest substring without repeated characters (m)
kubernetes资源对象介绍及常用命令(四)
29:第三章:开发通行证服务:12:开发【获得用户账户信息,接口】;(使用VO类包装查到的数据,以符合接口对返回数据的要求)(在多处都会用到的逻辑,在Controller中可以把其抽成一个共用方法)
How to judge the region of an IP through C?
[error reporting] omp: error 15: initializing libiomp5md dll, but found libiomp5md. dll already initialized.
LeetCode13.罗马数字转整数(三种解法)
Why is WPA3 security of enterprise business so important?
新库上线 | CnOpenData中国观鸟记录数据
Leetcode13. Roman numeral to integer (three solutions)
Talk about several methods of interface optimization
Examination questions for the assignment of selected readings of British and American Literature in the course examination of Fujian Normal University in February 2022
One brush 144 force deduction hot question-1 sum of two numbers (E)
[combinatorics] recursive equation (constant coefficient linear homogeneous recursive equation | constant coefficient, linear, homogeneous concept description | constant coefficient linear homogeneous
Vs code plug-in korofileheader
27. Input 3 integers and output them in descending order. Pointer method is required.
汇编实例解析--实模式下屏幕显示