当前位置:网站首页>[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
边栏推荐
- Collection of the most beautiful graduation photos in the graduation season, collection of excellent graduation photos
- The largest matrix (H) in a brush 143 monotone stack 84 histogram
- When absolutely positioned, the element is horizontally and vertically centered
- [RT thread] NXP rt10xx device driver framework -- RTC construction and use
- 基于主机的入侵系统IDS
- Kotlin学习快速入门(7)——扩展的妙用
- Deep understanding of grouping sets statements in SQL
- Define a structure fraction to represent a fraction, which is used to represent fractions such as 2/3 and 5/6
- [2. Basics of Delphi grammar] 2 Object Pascal data type
- 新库上线 | CnOpenData中国保险机构网点全集数据
猜你喜欢
![[error reporting] omp: error 15: initializing libiomp5md dll, but found libiomp5md. dll already initialized.](/img/a0/4fc0e0741aad2885873e60f2af3387.jpg)
[error reporting] omp: error 15: initializing libiomp5md dll, but found libiomp5md. dll already initialized.

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

静态程序分析(一)—— 大纲思维导图与内容介绍
![Luogu: p2685 [tjoi2012] Bridge](/img/f5/f77027288a211ae466781b09ce650f.jpg)
Luogu: p2685 [tjoi2012] Bridge

ANOVA example

kubernetes资源对象介绍及常用命令(四)

The largest matrix (H) in a brush 143 monotone stack 84 histogram

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

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

SWM32系列教程4-端口映射及串口应用
随机推荐
【RT-Thread】nxp rt10xx 设备驱动框架之--rtc搭建和使用
Thread pool: the most common and error prone component of business code
One brush 147-force deduction hot question-4 find the median of two positive arrays (H)
What is your income level in the country?
Free data | new library online | cnopendata complete data of China's insurance intermediary outlets
Simple use of unity pen XR grab
One brush 144 force deduction hot question-1 sum of two numbers (E)
LeetCode 1657. Determine whether the two strings are close
Hands on in-depth learning notes (XIV) 3.7 Simple implementation of softmax regression
C language string practice
Examination questions for the assignment of selected readings of British and American Literature in the course examination of Fujian Normal University in February 2022
The difference between get and post
RF analyze demo build step by step
[error reporting] omp: error 15: initializing libiomp5md dll, but found libiomp5md. dll already initialized.
基于主机的入侵系统IDS
Assignment examination questions of advanced English (III) for the course examination of Fujian Normal University in February 2022
New library online | cnopendata China bird watching record data
数仓任务里面 跑SQL任务的时候用的数据库账号是在哪里配置的
C语言字符串练习
Define a structure fraction to represent a fraction, which is used to represent fractions such as 2/3 and 5/6